Surplus_Up (2DU) 7 rokov pred
rodič
commit
ca6f91be30
2 zmenil súbory, kde vykonal 59 pridanie a 74 odobranie
  1. 57 52
      func.py
  2. 2 22
      views/easter_egg.html

+ 57 - 52
func.py

@@ -500,82 +500,87 @@ def load_skin(data = ''):
 
 def acl_check(name, tool = ''):
     ip = ip_check()
+    
+    if tool == 'render':
+        curs.execute("select view from acl where title = ?", [name])
+        acl_data = curs.fetchall()
+        if acl_data:
+            if acl_data[0][0] == 'user':
+                if not user_data:
+                    return 1
 
-    if ban_check() == 1:
-        return 1
+            if acl_data[0][0] == 'admin':
+                if not user_data:
+                    return 1
 
-    acl_c = re.search("^user:([^/]*)", name)
-    if acl_c:
-        acl_n = acl_c.groups()
+                if not admin_check(5, 'view (' + name + ')') == 1:
+                    return 1
 
-        if admin_check(5, None) == 1:
-            return 0
+        return 0
+    else:
+        if ban_check() == 1:
+            return 1
 
-        curs.execute("select dec from acl where title = ?", ['user:' + acl_n[0]])
-        acl_data = curs.fetchall()
-        if acl_data:
-            if acl_data[0][0] == 'all':
-                return 0
+        acl_c = re.search("^user:([^/]*)", name)
+        if acl_c:
+            acl_n = acl_c.groups()
 
-            if acl_data[0][0] == 'user' and not re.search("(\.|:)", ip):
+            if admin_check(5, None) == 1:
                 return 0
 
-            if ip != acl_n[0] or re.search("(\.|:)", ip):
-                return 1
-        
-        if ip == acl_n[0] and not re.search("(\.|:)", ip) and not re.search("(\.|:)", acl_n[0]):
-            return 0
-        else:
-            return 1
-
-    file_c = re.search("^file:(.*)", name)
-    if file_c and admin_check(5, 'edit (' + name + ')') != 1:
-        return 1
+            curs.execute("select dec from acl where title = ?", ['user:' + acl_n[0]])
+            acl_data = curs.fetchall()
+            if acl_data:
+                if acl_data[0][0] == 'all':
+                    return 0
 
-    curs.execute("select acl from user where id = ?", [ip])
-    user_data = curs.fetchall()
+                if acl_data[0][0] == 'user' and not re.search("(\.|:)", ip):
+                    return 0
 
-    curs.execute("select dec, view from acl where title = ?", [name])
-    acl_data = curs.fetchall()
-    if acl_data:
-        if acl_data[0][0] == 'user':
-            if not user_data:
+                if ip != acl_n[0] or re.search("(\.|:)", ip):
+                    return 1
+            
+            if ip == acl_n[0] and not re.search("(\.|:)", ip) and not re.search("(\.|:)", acl_n[0]):
+                return 0
+            else:
                 return 1
 
-        if acl_data[0][0] == 'admin':
-            if not user_data:
-                return 1
+        file_c = re.search("^file:(.*)", name)
+        if file_c and admin_check(5, 'edit (' + name + ')') != 1:
+            return 1
 
-            if not admin_check(5, 'edit (' + name + ')') == 1:
-                return 1
+        curs.execute("select acl from user where id = ?", [ip])
+        user_data = curs.fetchall()
 
-        if tool == 'render':
-            if acl_data[0][1] == 'user':
+        curs.execute("select dec from acl where title = ?", [name])
+        acl_data = curs.fetchall()
+        if acl_data:
+            if acl_data[0][0] == 'user':
                 if not user_data:
                     return 1
 
-            if acl_data[0][1] == 'admin':
+            if acl_data[0][0] == 'admin':
                 if not user_data:
                     return 1
 
-                if not admin_check(5, 'view (' + name + ')') == 1:
+                if not admin_check(5, 'edit (' + name + ')') == 1:
                     return 1
 
-    curs.execute('select data from other where name = "edit"')
-    set_data = curs.fetchall()
-    if set_data:
-        if set_data[0][0] == 'login':
-            if not user_data:
-                return 1
+        curs.execute('select data from other where name = "edit"')
+        set_data = curs.fetchall()
+        if set_data:
+            if set_data[0][0] == 'login':
+                if not user_data:
+                    return 1
 
-        if set_data[0][0] == 'admin':
-            if not user_data:
-                return 1
+            if set_data[0][0] == 'admin':
+                if not user_data:
+                    return 1
 
-            if not admin_check(5, None) == 1:
-                return 1
+                if not admin_check(5, None) == 1:
+                    return 1
 
-    return 0
+        return 0
 
 def ban_check(ip = None, tool = None):
     if not ip:

+ 2 - 22
views/easter_egg.html

@@ -1,26 +1,6 @@
-<iframe width="560" height="315" src="https://www.youtube.com/embed/Al-C1dQnE0o" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>
+<iframe width="560" height="315" src="https://www.youtube.com/embed/O6BJiije6m4" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>
 <br>
 <br>
 <div>
-    우리가 바라보았던 그 물결이 지금도 떠오르는걸. 모래 위에 끄적여 새겼던 말들과 돌아선 너의 뒷모습. <br>
-    돌아오는 파도가 발밑을 지나가면서 무언갈 쓸어가네. 해가 질 무렵 쯤에 저녁 노을만이 파도를 따라 흘러가... <br>
-    <br>                
-    팟하면서 피어나는 불꽃놀이를 바라봐. 아직 끝이 나지 않은 여름이. <br>
-    애매할 뿐인 마음을 풀고선 다시 엮어서 오늘 밤이 계속 되길 바랬어... <br>
-    <br>
-    앞으로 더 얼마나 너와 같은 불꽃놀이를 볼 수 있을까? 웃고 있는 네 얼굴에 나는 말을 잃어버려. <br>
-    상처받게되고, 기뻐하게되고 파도처럼 반복된 감정, 초조, 떠나는 열차 소리. <br>
-    몇번이고 나는 또다시 널 부르게 될 꺼야 파도와 함께 너와 한번 더 더 더 더. <br>
-    두번 다시 슬프지않도록 끝나게끔... <br>
-    <br>
-    팟하면서 들이키면 사라질 듯한 불빛이. 아직 여기 마음에 남아있어. <br>
-    손을 뻗어보면 닿았던 따스한 듯한 미래가. 조용하게 우리를 지켜봤어... <br>
-    <br> 
-    팟 한 불꽃들이.  (팟 한 불꽃들이) 오늘 밤 피었어. (오늘 밤 피었어) 오늘 밤 피어선. (오늘 밤 피어선) <br>
-    조용히 사라져. (조용히 사라져) 놓치지 말아줘. (떠나지 말아줘) 조금만 이대로. (조금만 이대로) <br>
-    조금만 이대로 여기에 있어... <br>
-    <br>
-    우리가 바라보았던 그 물결이 지금도 떠오르는걸. 모래 위에 끄적여 새겼던 말들과 돌아선 너의 뒷모습... <br>
-    팟하면서 피어나는 불꽃놀이를 바라봐. 아직 끝이 나지 않은 여름이. <br>
-    애매할 뿐인 마음을 풀고선 다시 엮어서 오늘 밤이 계속 되길 바랬어...
+    노라조와 영접하십셔.
 </div>