]> jfr.im git - irc/UndernetIRC/cservice-web.git/commitdiff
fix: quiet log warnings about undefined cookies
authorStefan Wold <redacted>
Sun, 5 Feb 2023 15:29:24 +0000 (16:29 +0100)
committerStefan Wold <redacted>
Sun, 5 Feb 2023 15:29:24 +0000 (16:29 +0100)
docs/gnuworld/left.php
docs/gnuworld/right.php

index b9d0d43b5fd1fab38aaf2b5028897991fb0301f3..11dbcaa0bd3c22137f18d2857154e67444e0c9d3 100755 (executable)
@@ -1,24 +1,26 @@
-<?
-       $noregwrite_lvl=1;
+<?php
+$noregwrite_lvl = 1;
 
-        require("../../php_includes/cmaster.inc");
-        header("Pragma: no-cache");
-        std_connect();
-               $min_lvl=800; // for WEBACCESS TEAM admin.
-        $current_page="left.php";
-        $user_id = std_security_chk($auth);
-        $admin = std_admin();
+require("../../php_includes/cmaster.inc");
+header("Pragma: no-cache");
+std_connect();
+$min_lvl = 800; // for WEBACCESS TEAM admin.
+$current_page = "left.php";
+$user_id = isset($auth) ? std_security_chk($auth) : 0;
+$admin = std_admin();
 
-       $cTheme = get_theme_info();
+$cTheme = get_theme_info();
 
-       if (isset($authtok)) { unset($authtok); }
-       if (isset($authcsc)) { unset($authcsc); }
-       $authtok = explode(":",$auth);
-       $authcsc = $authtok[3];
-?>
-<!-- $Id: left.php,v 1.23 2004/08/10 11:57:52 nighty Exp $ //-->
-<?
-        echo "<html><head><title>LEFT MENU</title>";
+if (isset($authtok)) {
+    unset($authtok);
+}
+if (isset($authcsc)) {
+    unset($authcsc);
+}
+$authtok = explode(":", $auth);
+$authcsc = $authtok[3];
+
+echo "<html><head><title>LEFT MENU</title>";
 ?>
 <style type=text/css>
 <!--
index e7166dbb5bd3e3b0a1495516089c91dbd038f64e..8636763129ac41e2c492cee97d7a9427fb763280 100755 (executable)
@@ -1,8 +1,7 @@
-<?
+<?php
 $default_gopage="login.php";
 require("../../php_includes/cmaster.inc");
 std_connect();
-/* $Id: right.php,v 1.15 2005/03/07 04:48:03 nighty Exp $ */
 $user_id = std_security_chk($auth);
 $admin = std_admin();
 $cTheme = get_theme_info();
@@ -154,7 +153,7 @@ $cTheme = get_theme_info();
        } else {
        header("Pragma: no-cache");
         std_theme_styles(1);
-        if ($_COOKIE['rlogin']!="") {
+        if (isset($_COOKIE['rlogin'])) {
                std_theme_body("","document.forms[0].password.focus();");
         } else {
                std_theme_body("","document.forms[0].username.focus();");
@@ -177,12 +176,12 @@ echo "<font color=#" . $cTheme->main_textcolor . ">\n";
 echo "<font size=+2><b>CService Login</b></font>\n";
 echo "<form method=post action=login.php" . $tgt . " target=body>\n";
 echo "<table border=0><tr><td><font color=\"#" . $cTheme->main_textcolor . "\">Username</td><td><input type=text name=username value=\"";
-if (REMEMBER_LOGIN || PREFILL_NOTICE) { echo $_COOKIE['rlogin']; }
+if (isset($_COOKIE["rlogin"]) && (REMEMBER_LOGIN || PREFILL_NOTICE)) { echo $_COOKIE['rlogin']; }
 echo "\"></td></tr>\n";
 echo "<tr><td><font color=\"#" . $cTheme->main_textcolor . "\">Password</td><td><input type=password name=password></td></tr></table>\n";
 echo "<br><input type=submit value=Login>\n";
 echo "</center>";
-if (PREFILL_NOTICE && trim($_COOKIE['rlogin']) != "") {
+if (PREFILL_NOTICE && isset($_COOKIE['rlogin'])) {
        echo "<br><table border=0 cellspacing=0 cellpadding=2 bgcolor=#ffff99>";
        echo "<tr><td valign=top bgcolor=#ff9999>";
        echo "<font style=\"font-size: 13px; color: #000000; font-weight: bold;\">";