OSDN Git Service

增加用户登录LOG记录功能,删除Friendlist产生的多余空格
authortanyuliang <tanyuliang2@gmail.com>
Fri, 10 Jul 2015 00:12:53 +0000 (08:12 +0800)
committertanyuliang <tanyuliang2@gmail.com>
Fri, 10 Jul 2015 00:12:53 +0000 (08:12 +0800)
FriendList.py
LoginGui.py
tyl.xml [new file with mode: 0644]

index c548f01..a7db7f9 100644 (file)
@@ -30,20 +30,14 @@ class MyFrame(wx.Frame):
         p=per.findall('/family/person')
         q=per.findall('/friend/person')
         r=per.findall('/teacher/person')
-        for x in p:
-            print
         for oneper in p:  #找出person节点
                 for child in oneper.getchildren(): #找出person节点的子节点
                         self.tree.AppendItem(fm, child.text)
-        for x in r:
-            print
         for oneper in r:  
                 for child in oneper.getchildren(): 
                         self.tree.AppendItem(tr, child.text)
         #cl = self.tree.AppendItem(pl, 'Dev Language')
         #sl = self.tree.AppendItem(pl, 'Shell')
-        for x in q:
-                print
         for oneper in q:  
                 for child in oneper.getchildren(): 
                         self.tree.AppendItem(fr, child.text)        
index fb0c75d..7ea879b 100644 (file)
@@ -44,6 +44,7 @@ class LoginFrame(wx.Frame):
                 pwd_txt = ''.join( [ str(x) for x in node_find.attrib.values()])
                 passwd0 = pc.decrypt(pwd_txt)
                 if self.passWord.GetValue()==passwd0:
+                    urllib2.urlopen('http://chat-tyl.coding.io/user_log.php?info=User___'+self.userName.GetValue()+'___Login')
                     wx.MessageBox('Login Successful', 'Information', 
                     wx.OK | wx.ICON_INFORMATION)
                     self.Hide()
diff --git a/tyl.xml b/tyl.xml
new file mode 100644 (file)
index 0000000..8da4782
--- /dev/null
+++ b/tyl.xml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+<login passwd='f17ec4800201595a70b2508df1a9772e5914682f0bdf838ef7547a56ae36ad23'>
+</login>
+<family>
+ <person age="18">
+    <name>hzj</name>
+ </person>
+ <person age="19" des="hello">
+    <name>kiki</name>
+ </person>
+ <person age="12">
+    <name>tyl</name>
+ </person>
+ <person age="40">
+    <name>Test</name>
+ </person>
+</family>
+<friend>
+ <person age="20">
+    <name>Linus</name>
+ </person>
+ <person age="21" des="hello">
+    <name>MIUI</name>
+ </person>
+ <person age="22">
+    <name>BSD</name>
+</person>
+ </friend>
+<teacher>
+ <person age="40">
+    <name>Miss Liang</name>
+ </person>
+ <person age="50">
+    <name>Miss Liu</name>
+ </person>
+ <person age="40">
+    <name>Miss She</name>
+ </person>
+</teacher>
+</root>
\ No newline at end of file