function verifyUser($con, $LoginID, $LoginPass) { global $handle, $EOT, $logTxt; $timestamp = currentDate(); $sql = "SELECT password FROM user WHERE username = '******'"; $rs = mysqli_query($con, $sql); if ($rs && mysqli_num_rows($rs) > 0) { $row = mysqli_fetch_row($rs); $pass = $row[0]; if ($pass = $LoginPass) { file_put_contents($logTxt, '**VERIFED** [' . $timestamp . ']' . " Param: {$LoginID}; Value: {$LoginPass}\n", FILE_APPEND | LOCK_EX); return true; } } $package = array("0" => array("status" => false, "reason" => 998)); packageLog($package); file_put_contents($logTxt, "USER NOT VERIFIED!\n{$EOT}", FILE_APPEND | LOCK_EX); echo json_encode($package); fclose($handle); exit; }
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <?php // init db connection include '../lib/lib.php'; opendb(); ?> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <link rel="stylesheet" media="all" type="text/css" href="style.css" /> <title>Manage RSK Database</title> </head> <body> <?php switcher(); ?> <h4>Sunrises Around The World (<?php currentDate(); ?> )</h4> <?php generateSunriseSchedule(); ?> </body> </html> <?php closedb();
<?php /** * Load required classes */ load_class(array('login', 'admin')); $login_obj = new login(); if (isset($_GET["logout"])) { admin::logout(); } if (isset($_POST["method"]) && $_POST["method"] == 'change_password') { $current_password = $_POST["current_password"]; $new_password = $_POST["new_password"]; $user_id = $_SESSION["admin_data"]["user_id"]; $data_array = array("password" => $new_password, "modified" => currentDate()); $login_obj->db->where("user_id", $user_id); $login_obj->db->where("password", $current_password); $row = $login_obj->db->get($login_obj->tableName, null, 'user_id'); if ($row) { $login_obj->db->where("user_id", $user_id); $row = $login_obj->db->update($login_obj->tableName, $data_array); echo "success"; } else { echo "invaild"; } die; }
function lockReportValid($commDate) { date_default_timezone_set('Asia/Calcutta'); $commDt = $commDate[2] . "-" . $commDate[1] . "-" . $commDate[0]; $lockDate = date('Y-m-d', strtotime('-5 days')); $crntDate = currentDate(); $crntDt = $crntDate['year'] . "-" . $crntDate['mon'] . "-" . $crntDate['day']; if ((int) $crntDate['day'] >= 3 && (int) $crntDate['day'] <= 5) { if (strtotime($commDt) >= strtotime(date("Y-m-01"))) { return true; } else { return false; } } else { if (strtotime($commDt) >= strtotime($lockDate) && strtotime($commDt) <= strtotime($crntDt)) { return true; } else { return false; } } }
echo ", {$row['time_from']}"; } if (strlen(isset($row['time_to'])) > 0) { echo " - {$row['time_to']}"; } if (strlen($row['location']) > 0) { echo ", {$row['location']}"; } echo '</span>'; echo "<br />"; echo $row['summary']; echo "<br />"; if (strlen($row['description']) > 0) { echo "<a class='news_url' href='?i=events&id=" . $row['ID'] . "'>MORE INFO</a>"; } echo "</div>"; } if (!$nothing) { echo "There are currently no scheduled events."; } } $currentDate = currentDate(); if (isset($_POST['freq']) && $_POST['freq'] == 'upcoming') { $sql = "SELECT * FROM events WHERE (status='approved' && date_from >= '{$currentDate}') ORDER BY date_from ASC"; $results = mysql_query($sql) or die("Unable to execute:" . mysql_error()); displayResults($results); } elseif (isset($_POST['freq']) && $_POST['freq'] == 'recent') { $sql = "SELECT * FROM events WHERE (status='approved' && date_from < '{$currentDate}') ORDER BY date_from DESC"; $results = mysql_query($sql) or die("Unable to execute:" . mysql_error()); displayResults($results); }
case '8': faDublOrder('L3'); break; //дублирование ордера //дублирование ордера case '9': faCheckOrder('L3'); break; //Проверка ордера //Проверка ордера case '10': fLogOut('L3'); break; //удалить авторизацию //удалить авторизацию case '11': currentDate('L3'); break; //текущая неделя //текущая неделя case '12': faDeleteDublOrder('L3'); break; //удалить dubl ордера //удалить dubl ордера case '13': fLoginGet('L3'); break; //авторизация } }
<?php if (strtolower($_GET['s']) == 'verify') { $verify = TRUE; } else { $verify = FALSE; } if ($verify) { if (isset($_GET['u'])) { $rand = $_GET['u']; } // verify the date selected is greater than the current date $sqlV = "SELECT fieldtripdates.dateFrom FROM fieldtrippeople JOIN fieldtripdates ON fieldtrippeople.datePreffered=fieldtripdates.ID WHERE rand='{$rand}'"; $resultsV = mysql_query($sqlV); $rowV = mysql_fetch_array($resultsV); if ($rowV['dateFrom'] > currentDate()) { ///// update $sqlu = "UPDATE fieldtrippeople SET status='accepted' WHERE rand='{$rand}'"; $resultsu = mysql_query($sqlu); if (mysql_affected_rows($conn) > 0) { echo "<p class='green_message' style='width:600px;'>Your submission has been confirmed.</p>"; echo "<p class='green_message' style='width:600px;'>Click the following link to see the signup sheet. <a href='http://www.uta.edu/ees/index.php?i=field-trip&s=view'>http://www.uta.edu/ees/index.php?i=field-trip&s=view.</a></p>"; } else { echo "<p class='red_message' style='width:600px;'>Your submission has been already confirmed or the record does not exist. <br><br></p>"; } } else { echo "<p class='red_message' style='width:600px;'>Signup for the selected date is over.<br><br></p>"; } } else { echo "<p>ERROR</p>"; }
//require_once("auth/newMyClass.php"); require_once "function.php"; $numm = array("0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "13", "14"); if (isset($_REQUEST['f'])) { $f = $_REQUEST['f']; } else { $f = '1'; } if (isset($_REQUEST['value'])) { $value = $_REQUEST['value']; } //else $value="1"; if (in_array($f, $numm)) { switch ($f) { case '0': currentDate('L1'); break; //текущая неделя //текущая неделя case '1': fsLoadFamily('L1'); break; //фамилии в выпадающий список/таблица //фамилии в выпадающий список/таблица case '2': fsLoadOrder('L1'); break; //ордера в выпадающий список //ордера в выпадающий список case '3': fsLoadSectons('L1');
/** * get particular attorney detail */ $attorney_edit_data = $attorney_obj->GetAttorneyDetailById($edit_id); } elseif (isset($_POST["method"]) && $_POST["method"] == 'update_status') { $status = $_POST["status"]; $attorney_id = $_POST["attorney_id"]; if ($status == 'active') { $title = "Click to Active"; $link = "Inactive"; $status = 'inactive'; } else { $title = "Click to Inactive"; $link = "Active"; $status = 'yes'; } $data_array = array("attorney_status" => $status, "modified" => currentDate()); $attorney_obj->db->where("attorney_id", $attorney_id); $row = $attorney_obj->db->update($attorney_obj->tableName, $data_array); if ($row) { echo 'success|' . $link . '|' . $title . '|' . $status; } else { echo "failed"; } die; } else { /** * get list of attorney */ $attorney_data = $attorney_obj->GetAttorneyList(); }