]> git.datanom.net - qtadmin.git/blobdiff - lib/utils.inc.php
fix footer position
[qtadmin.git] / lib / utils.inc.php
index 773e45fceee4d66dc6335f891cfe516fb7ca13d9..9c6be9b51fe8e301a2e59c5d6725e9eacd216826 100644 (file)
@@ -1,6 +1,7 @@
 <?php
 /* vim: set ts=4 tw=0 sw=4 noet: */
 require_once $CFG->root .'config.php';
 <?php
 /* vim: set ts=4 tw=0 sw=4 noet: */
 require_once $CFG->root .'config.php';
+require_once $CFG->root . 'lib/session_handler.inc.php';
 
 class Utils {
 
 
 class Utils {
 
@@ -18,11 +19,13 @@ class Utils {
     </script>
     <script src="__ROOT__js/timer.js"></script>
     <script src="__ROOT__js/checkbox.js"></script>
     </script>
     <script src="__ROOT__js/timer.js"></script>
     <script src="__ROOT__js/checkbox.js"></script>
+    <script src="__ROOT__js/forms.js"></script>
     <title>__TITLE__</title>
 </head>
     <title>__TITLE__</title>
 </head>
-<body>';
-    private $footer = '<p class="footer">Powered by <a href="https://qtadmin.datanom.net"
-            title="Goto QtAdmin homepage">QtAdmin</a>. &copy; 2015 by Michael Rasmussen</p></body></html>';
+<body><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 $heading = '<p id="time" class="time">Session timeout:
             <span id="timer"></span></p><h1 class="h1">__TITLE__</h1>';
 
     private $heading = '<p id="time" class="time">Session timeout:
             <span id="timer"></span></p><h1 class="h1">__TITLE__</h1>';
 
@@ -91,10 +94,11 @@ class Utils {
                 } else {
                     $file = $CFG->root.'qtadmin.log';
                 }
                 } else {
                     $file = $CFG->root.'qtadmin.log';
                 }
-                file_put_contents($file, "[$time]: $message", FILE_APPEND | LOCK_EX);
+                file_put_contents($file, "[$time]: $message\n", FILE_APPEND | LOCK_EX);
+                chmod($file, 0600);
                 break;
             case 'stderr':
                 break;
             case 'stderr':
-                file_put_contents('php://stderr', "[$time]: $message");
+                file_put_contents('php://stderr', "[$time]: $message\n");
                 break;
             case 'syslog':
                 syslog($priority, $message);
                 break;
             case 'syslog':
                 syslog($priority, $message);
This page took 0.033096 seconds and 5 git commands to generate.