]> git.datanom.net - qtadmin.git/blobdiff - lib/utils.inc.php
More functions for wblist page
[qtadmin.git] / lib / utils.inc.php
index fdeab70baffc6869331b0c483982f866998b6035..b61796c1d2d20f7f0be8c9157abdaaab199b50ee 100644 (file)
@@ -23,23 +23,53 @@ class Utils {
     <title>__TITLE__</title>
 </head>
 <body>
+<!--
 <nav>
-       <ul>
-               <li><a href="index.php">Home</a></li>
-               <li>
-                       <a href="index.php">Sections <span class="caret"></span></a>
-                       <div>
-                               <ul>
-                                       <li><a href="qtadmin.php">Quarantine admin</a></li>
-                                       <li><a href="wblist.php">WB list admin</a></li>
-                               </ul>
-                       </div>
-               </li>
-               <li><a href="about.html">About</a></li>
-               <li><a href="help.html">Help</a></li>
-       </ul>
+    <ul>
+        <li><a href="index.php">Home</a></li>
+        <li>
+            <a href="#">Sections <span class="caret"></span></a>
+            <div>
+                <ul>
+                    <li><a href="qtadmin.php">Quarantine admin</a></li>
+                    <li><a href="wblist.php">WB list admin</a></li>
+                </ul>
+            </div>
+        </li>
+        <li><a href="about.html">About</a></li>
+        <li><a href="auth.php?op=logout">Logout</a></li>
+    </ul>
 </nav>
-       <div id="container">';
+-->
+<nav>
+    <ul>
+        <li><a href="index.php">Home</a></li>
+        <li>
+            <a href="#">Sections <span class="caret"></span></a>
+            <div>
+                <ul>
+                    <li>
+                        <a href="qtadmin.php">Quarantine admin</span></a>
+                    </li>
+                    <li><a href="#">WB list admin <span class="caret"></a>
+                        <div>
+                            <ul>
+                                <li><a href="wblist.php?p=show&amp;s=all">Show All</a></li>
+                                <li><a href="wblist.php?p=show&amp;s=blacklist">Show Blacklist</a></li>
+                                <li><a href="wblist.php?p=show&amp;s=whitelist">Show Whitelist</a></li>
+                                <li><a href="wblist.php?p=add">Add Rule</a></li>
+                                <li><a href="wblist.php?p=del">Delete Rule</a></li>
+                            </ul>
+                        </div>
+                    </li>
+                </ul>
+            </div>
+        </li>
+        <li><a href="about.html">About</a></li>
+        <li><a href="auth.php?op=logout">Logout</a></li>
+    </ul>
+</nav>
+    <div id="container">';
     private $footer = '</div><div id="footer"><p>Powered by <a href="https://qtadmin.datanom.net"
             title="Goto QtAdmin homepage">QtAdmin</a>. &copy; 2015 by Michael Rasmussen</p>
     </div></body></html>';
@@ -224,7 +254,11 @@ class Utils {
             } else {
                 // HTTP GET
                 $data = json_decode($response['content']);
-                $result = $data->data;
+                if (is_object($data)) {
+                    $result = $data->data;
+                } else {
+                    $result = array('No result');
+                }
             }
         } else {
             $result = ($data) ? false : array();
This page took 0.208397 seconds and 5 git commands to generate.