must be removed from this file before distribution. ************************************************************************************/ require_once 'include/functions.php'; function displayMainPage() { $query = "SELECT username, admin FROM users WHERE sha256_user = '******'ID') . "'"; $check = mysql_query($query) or die(mysql_error()); $info = mysql_fetch_array($check); echoMainHeader(); echo "<div>\n"; echo "Welcome <b>'" . $info['username'] . "'</b> "; if ($info['admin'] == 1) { echo " | <a href=\"#\" onClick=\"main_setBodyFrame('body.php')\">Home Page</a>\n"; echo " | <a href=\"#\" onClick=\"main_setBodyFrame('admin.php')\">Admin Page</a>\n"; } echo "</div>\n"; echo "<div class=\"class_body\" id=\"div_body\">\n"; echo "<script language=\"javascript\" type=\"text/javascript\">main_showLoader();</script>\n"; echo "<iframe class=\"class_iframe_body\" id=\"iframe_body\" src=\"body.php\"></iframe>\n"; echo "</div>\n"; echoMainFooter(); } if (!isSSL()) { header("Location: logout.php"); } else { validateSession(); displayMainPage(); die; // attempt to guard against any code insertion at the end of the file }
$st = $s20Table[$mac]['st']; $newSt = actionAndCheck($mac, $st == 0 ? 1 : 0, $s20Table); $s20Table[$mac]['st'] = $newSt; $swVal = $s20Table[$mac]['switchOffTimer']; if ($st == 0 && $newSt == 1 && $swVal > 0) { $s20Table[$mac]['timerVal'] = $swVal; $s20Table[$mac]['timerAction'] = 0; } } else { if ($actionValue == "setCountdown" || $actionValue == "clearCountdown" || $actionValue == "clearSwitchOff") { require_once ORVFMS_PATH . "timer_settings.php"; timerSettings($s20Table, $actionValue); } } require_once ORVFMS_PATH . "main_page.php"; displayMainPage($s20Table, $myUrl); require_once ORVFMS_PATH . "main_page_scripts.php"; } else { if (isset($_POST['toCountDownPage'])) { $actionValue = $_POST['toCountDownPage']; if (substr($actionValue, 0, 6) == "timer_") { $timerName = substr($actionValue, 6); } require_once ORVFMS_PATH . "timer_page.php"; displayTimerPage($timerName, $s20Table, $myUrl); } else { if (isset($_POST['toDetailsPage'])) { $actionValue = $_POST['toDetailsPage']; $timerName = $_POST['name']; require_once ORVFMS_PATH . "edit_process.php"; if ($actionValue == "updateOrAdd") {
<head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1"> <!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags --> <title>Better YouTube</title> <meta name="description" content="Better YouTube"> <meta name="author" content="Seungmin Lee"> <link rel="stylesheet" href="css/index.css"> </head> <body> <?php $username = isset($_POST['username']) ? $_POST['username'] : ""; $password = isset($_POST['password']) ? $_POST['password'] : ""; displayMainPage($username, $password); ?> </body> </html> <?php function displayMainPage($username, $passwd) { ?> <div id="wrapper"> <form method="post" class="login-form" > <div class="header"> <h1>Login to betterTube</h1> <span>Please enter your username and password!</span> </div>