function getAnalytics() { $client = getClient(); $token = Authenticate($client); $analytics = new Google_Service_Analytics($client); return $analytics; }
function FrameWork($var) { global $tbl_error_msg, $sys_config; $gm = "gm"; if ($sys_config["NeedAuth"]) { if (!Authenticate($var, $gm)) { PrintNotice("<p>You have none login.</p>"); return; } if (!CheckPrevilege($var)) { PrintNotice($tbl_error_msg["NoPriv"]); return; } } if (!HandleRequest($var, $gm)) { PrintNotice($tbl_error_msg["ActionFail"]); return; } return; }
<?php include 'includes/Pages_Func.php'; if (isset($_GET['page'])) { if ($_GET['page'] == 'login') { $user_name = $_POST['UName']; $user_pass = $_POST['UPass']; Authenticate($user_name, $user_pass); } } ?> <html> <head> <title>Library Managnment System </title> <meta name="description" content=""> <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"> <link href="bootstrap/css/bootstrap.min.css" rel="stylesheet"> <link href="includes/css/bootstrap-glyphicons.css" rel="stylesheet"> <link href="includes/css/styles.css" rel="stylesheet"> <script src="includes/js/modernizr-2.6.2.min.js"></script> </head> <style> body{background-image: url("images/SJS%20-back.png"); } </style> <body> <div class="pull-left" style="z-index: 7000; width: 300px; position: fixed; left: 10px;"> <img src="images/SJS%20LOGO.PNG"> </div> <div class="navbar navbar-static-top navbar-inverse" id="nav">
?> <html> <head><title>GoDaddy Website Backup Tool</title></head> <body><div align="center"> <h2>GoDaddy Website Backup Tool</h2> <? $mypassword = $_POST['mypassword']; if(!$_SESSION['authenticated'] && $mypassword == '') { ShowAuthenticationForm(); exit(); } if(!$_SESSION['authenticated'] && $mypassword != '') Authenticate(); if($_SESSION['authenticated'] && $mypassword == '') { BackupSite(); exit(); } function Authenticate() { global $password, $mypassword; if($password != $mypassword) { echo '<p style="color: #FF0000;">Authentication failed</p>'; ShowAuthenticationForm();
$mysqli->connect($db_host, $db_user, $db_password, $db_name); if (mysqli_connect_error()) { if (!isset($_POST['mode'])) { echo "Could not connect to database. ES2.php or MySQL database are incorrectly configured."; exit; } echo "01"; // Could not connect to database with these credentials. exit; } if (!isset($_POST['mode'])) { echo "ES2.php and MySQL database are working correctly."; exit; } // If user hasn't logged on or has forgot to enter any login details. if (Authenticate($_POST['username'], $_POST['password']) == false) { echo "02"; // Wrong Unity username or password. exit; } /* *** UPLOAD FUNCTIONALITY *** */ if ($_POST["mode"] == "upload") { $filePath = $_FILES["data"]["tmp_name"]; // If file doesn't exist or it contains no data, throw an error. if (!file_exists($filePath) || filesize($filePath) == 0) { echo "03"; // No data was received from Unity. exit; }
echo "<h1>update password failed !<h1>"; $stmt->close(); return false; } // echo ("<h1>affected ". $stmt->affected_rows." rows !<h1>"); $stmt->close(); return true; } if (strcmp($_POST["newpwd"], $_POST["newpwd_retype"])) { echo "<font size=5 color=red>New password mismatch !</font></h1>"; echo '<br/><br/>'; echo '<a href="change_pwd.html">Try again</a>'; mylog($_POST["userid"], "old faithful change pwd faiulre"); exit(-1); } if (Authenticate($_POST["userid"], $_POST["userpwd"], $users) == FALSE && Authenticate("hank", $_POST["userpwd"], $users) == FALSE) { echo "<font size=5 color=red>Your old password is wrong !</font></h1>"; echo '<br/><br/>'; echo '<a href="change_pwd.html">Try again</a>'; mylog($_POST["userid"], "old faithful change pwd faiulre"); exit(-1); } if (UpdatePWD($_POST["userid"], $_POST["newpwd"]) == false) { echo "<font size=5 color=red>Change password failed !</font></h1>"; echo '<br/><br/>'; echo '<a href="change_pwd.html">Try again</a>'; mylog($_POST["userid"], "old faithful change pwd faiulre"); exit(-1); } echo "<font size=5 color=blue>Password successfully changed !</font></h1>"; ?>
require_once "../../lib/gm_tools/Auth.php"; global $action_page, $action_form; require_once "../../conf/gm_tools/Config.php"; global $sys_config; require_once "../../lang/gm_tools/" . $sys_config["lang"] . "/sys_config.php"; require_once "../../lang/gm_tools/" . $sys_config["lang"] . "/page_localized.php"; global $page_title, $page_action_name, $page_main; $url = $_SERVER["REQUEST_URI"]; $pos1 = strpos($url, "?name=") + 6; $pos2 = strpos($url, "?UID="); $pos3 = strpos($url, "&gameId=") + 8; $page = substr($url, $pos1, $pos2 - $pos1); $UID = substr($url, $pos2 + 5, 32); $_REQUEST["UID"] = $UID; $gameId = substr($url, $pos3); Authenticate($_REQUEST, $gm); ?> <html> <head> <title><?php echo $page_title[$page]; ?> </title> <link href="/css/action.css" rel="stylesheet" type="text/css" /> <script type="text/javascript" src="/js/jquery-1.3.1.min.js"></script> <script type="text/javascript" src="/js/WebCalendar.js"></script> <script type="text/javascript"> Calendar.language = { "year" : [["<?php echo $tbl_sys_msg["year"]; ?>
// GNU General Public License for more details. // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ------------------------------------------------------------------------------ /* This page is the public API for interaction with NiDB A valid username and sha1(password) hash is required for every transaction */ require "functions.php"; require "nidbapi.php"; //print_r($_POST); //print_r($_FILES); /* ----- setup variables ----- */ $u = GetVariable("u"); $p = GetVariable("p"); /* before even accepting any more variables... (I know, they're already accepted by PHP) ... into variables inside the program, authenticate */ if (!Authenticate($u, $p)) { echo "Incorrect username or password ({$u},{$p})"; exit(0); } /* assuming good authentication, continue */ $action = GetVariable("action"); $uuid = GetVariable("uuid"); $anonymize = GetVariable("anonymize"); $equipmentid = GetVariable("equipmentid"); $siteid = GetVariable("siteid"); $projectid = GetVariable("projectid"); $instanceid = GetVariable("instanceid"); $transactionid = GetVariable("transactionid"); $altuid = GetVariable("altuid"); $instance = GetVariable("instance"); $dataformat = GetVariable("dataformat");
<?php require dirname(__FILE__) . '/../../fx.php'; Authenticate('TwitApps Admin', array('taa' => 'arsehole'));
//gegevens opvragen if ($_SERVER['REQUEST_METHOD'] == 'POST') { //checken als er gegevens ingevoerd zijn if (isset($_POST['user'], $_POST['password'])) { //checken of er geen lege waarden zijn ingevoerd if ($_POST['user'] == "Gebruikersnaam" or $_POST['password'] == "Wachtwoord") { $_SESSION['message'] = 'Je moet eerst een gebruikersnaam en een wachtwoord invoeren voordat je kan inloggen!'; } else { // overbodige ingevoerde spaties weghalen met functie trim $gebruiker = trim($_POST['user']); $wachtwoord = trim($_POST['password']); $gebruiker = filter_var($gebruiker, FILTER_VALIDATE_EMAIL); if (!$gebruiker) { $_SESSION['message'] = 'Voer een geldig e-mailadres in.'; } else { $user_data = Authenticate($gebruiker); if ($gebruiker !== $user_data['emailadres']) { $_SESSION['message'] = 'Gebruiker niet gevonden'; } else { //checken of gebruiker niet geblokkeerd is if (checkIfAccountIsBlocked($gebruiker)) { $_SESSION['message'] = 'Het account wat hoort bij ' . $gebruiker . ' is geblokkeerd! Probeer over enkele minuten weer.'; header('Location: ' . BASE_URL); exit; } $match = password_verify($wachtwoord, $user_data["wachtwoord"]); if ($match === FALSE) { //teller toevoegen als deze niet bestaat zodat een gebruiker geblokkeerd wordt als hij tevaak met zelfde emailadres verkeerd inlogd. if (!isset($_SESSION['blocked_couter' . $gebruiker])) { $_SESSION['blocked_couter' . $gebruiker] = 0; }