<?php header("Content-type: text/css; charset: UTF-8"); require_once "../lib/functions.php"; $Input = array("xCol" => $_GET['xcol'], "emptyVid" => $_GET['ev']); extract(SecureVars($Input), EXTR_OVERWRITE); $yCol = round($xCol / 1.78); //-- Start Output /* if ($emptyVid == 1) { echo ' main > section#FixedDisplay { display:none; } main > section#MainOutput { margin-left:190px; } '; }*/ ?> div#container div.item, div#container div.item .box { width: <?php echo $xCol; ?> px; height: <?php echo $yCol; ?> px; }
public function setAuthUser() { global $AuthUser; //Test is session Name and Token exist if (!empty($_SESSION['user_name']) and !empty($_SESSION['token'])) { $Input = array("session_User" => $_SESSION['user_name']); //Prepare user_name from session extract(SecureVars($Input), EXTR_OVERWRITE); //Output secure $session_User //if user_name pass SecureVars() exam and stayed the same if ($_SESSION['user_name'] == $session_User) { //Send user_name query $TestUserQuery = 'SELECT last_login_mt FROM u186876_tvarts.users WHERE user_name = "' . $session_User . '"'; $result = $this->Query($TestUserQuery); if ($result->num_rows > 0) { //if user exist in db while ($row = mysqli_fetch_assoc($result)) { $Last_Time_Hold = $row['last_login_mt']; } //Test last token (word + tm) with word + last db tm if ($_SESSION['token'] == md5(PREPEND_KEY . $Last_Time_Hold . APPEND_KEY)) { $AuthUser = $session_User; //echo "ok sess " . $_SESSION['token'] . " = db " . md5(PREPEND_KEY . $Last_Time_Hold . APPEND_KEY); return true; } } else { return false; } //user not exist in db } else { echo "user_name is not secure"; return false; } //user_name is not secure } else { return false; } }