]> git.datanom.net - qtadmin.git/blobdiff - lib/utils.inc.php
First upload of wblist page
[qtadmin.git] / lib / utils.inc.php
index de2cbfcc63e7be3f3bc35c2e2c26af653bb70d16..62c3be20c71d136047835400f2801686373cf1c2 100644 (file)
@@ -22,7 +22,54 @@ class Utils {
     <script src="__ROOT__js/forms.js"></script>
     <title>__TITLE__</title>
 </head>
     <script src="__ROOT__js/forms.js"></script>
     <title>__TITLE__</title>
 </head>
-<body><div id="container">';
+<body>
+<!--
+<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</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>
+-->
+<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 class="caret"></span></a>
+                                       </li>
+                                       <li><a href="#">WB list admin</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=b">Show Blacklist</a></li>
+                                                               <li><a href="wblist.php?p=show&amp;s=w">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>';
     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>';
@@ -174,6 +221,8 @@ class Utils {
     }
 
     private function getRestTicket($username, $password) {
     }
 
     private function getRestTicket($username, $password) {
+        global $CFG;
+
         $result = false;
         $url = $CFG->wblistadm_url . '/ticket';
 
         $result = false;
         $url = $CFG->wblistadm_url . '/ticket';
 
@@ -190,9 +239,11 @@ class Utils {
     }
 
     public function makeRestCall($method, $data = null) {
     }
 
     public function makeRestCall($method, $data = null) {
+        global $CFG;
+
         $result;
 
         $result;
 
-        $url = $CFG->wblistadm_url . "/$method";
+        $url = $CFG->wblistadm_url . "$method";
         $token = $this->getCSRFPreventionToken($_SESSION['ticket']);
         $response = $this->RESTCall($url, $data, $_SESSION['cookies'], $token);
 
         $token = $this->getCSRFPreventionToken($_SESSION['ticket']);
         $response = $this->RESTCall($url, $data, $_SESSION['cookies'], $token);
 
This page took 0.057608 seconds and 5 git commands to generate.