<a class="navbar-brand" href="index.php"><?php require_once 'config.php'; echo $wsn; ?> </a> </div> <ul id="navbar" class="nav navbar-collapse collapse navbar-nav" id="nbc"> <li><a href="about.php">About</a></li> <li class="visible-xs"><a href="login.php">Sign In</a></li> <li class="visible-xs"><a href="admin/index.php">Dashboard</a></li> </ul> <ul class="nav pull-right navbar-nav hidden-xs"> <?php require_once 'lib-auth.php'; $polrauth = new polrauth(); $polrauth->headblock(); ?> <?php require_once 'config.php'; if ($regtype != 'none') { echo '<li><a href="register.php">Sign Up</a></li>'; } ?> <li class="divider-vertical"></li> <li class="dropdown"> <a class="dropdown-toggle" href="#" data-toggle="dropdown">Sign In <strong class="caret"></strong></a> <div class="dropdown-menu pull-right" id="dropdown" style="padding: 15px; padding-bottom: 0px;"> <h2>Login</h2> <form action="handle-login.php" method="post" accept-charset="UTF-8"> <input id="user_username" style="margin-bottom: 15px;" type="text" name="username" placeholder='Username' size="30" class="form-control">
<?php require_once "lib-core.php"; require_once 'layout-headerlg.php'; require_once 'lib-auth.php'; $polrauth = new polrauth(); $protocol = '://'; $hpi = $_POST['hp']; $ps = $_POST['options']; $country_code = @$_SERVER["HTTP_CF_IPCOUNTRY"]; if ($li_shorten_only == true) { if (!isset($_SESSION['username'])) { echo "<h2>Only logged in users may shorten links. Did you mean to <a href='login.php'>log in</a>?</h2>"; require_once 'layout-footerlg.php'; die; } } function bve($bv) { global $mysqli; $query1 = "SELECT `rid` FROM `redirinfo` WHERE baseval='{$bv}'"; // Check if exists natura $result = $mysqli->query($query1); $row = mysqli_fetch_assoc($result); $existing = $row['rid']; if ($existing != NULL) { return true; } else { return false; } }
<?php require_once 'lib-auth.php'; $polrauth = new polrauth(); if ($polrauth->islogged() != false) { header("Location: ucp.php"); die; } require_once 'layout-headersm.php'; echo ' <div style="text-align:center"> <h1>Login</h1><br/><br/> <div class="col-md-2"></div> <div class="col-md-8"> <form action="handle-login.php" method="POST"><b>Username:</b><br/> <input type="text" name="username" id="username" class="form-control"/><br/><b>Password:</b><br/> <input type="password" name="password" id="password" class="form-control"/><br /> <input id="remember_me" style="padding-botton: 15px" type="checkbox" name="remember_me" value="remember_me" size="30" /> <b>Remember Me</b> <br /><br /> <input type="submit" id="submit" style="width:80%" value="Login" class="btn btn-success"/> </form> </div> <div class="col-md-2"></div> </div>'; require_once 'layout-footerlg.php';
<?php require_once 'lib-password.php'; //password hashing lib - crpypt forward compat require_once 'lib-core.php'; require_once 'lib-auth.php'; $polrauth = new polrauth(); $authcreds['username'] = $mysqli->real_escape_string($_POST['username']); $authcreds['password'] = $mysqli->real_escape_string($_POST['password']); if (strstr($authcreds['username'], ' ')) { $authcreds['username'] = trim($authcreds['username']); } $authed = $polrauth->processlogin($authcreds['username'], $authcreds['password']); if ($authed == true) { $_SESSION['li'] = sha1('li'); $_SESSION['username'] = $authcreds['username']; $_SESSION['role'] = $polrauth->getrole($authcreds['username']); header('Location:index.php'); } else { require_once 'layout-headerlg.php'; echo '<h2>Incorrect password or username (or account not activated). Try again</h2><br />'; if ($fpass == true) { echo '<a href="forgotpass.php">Forgot Password?</a><br />'; } require_once 'layout-footerlg.php'; die; }
<?php require_once '../lib-core.php'; if (!$_SESSION['li']) { header('Location: index.php'); } require_once '../lib-auth.php'; $polrauth = new polrauth(); $islogged = $polrauth->islogged(); $action = $mysqli->real_escape_string($_POST['action']); $username = $mysqli->real_escape_string($_SESSION['username']); if ($action == 'changepw') { $currpw = $mysqli->real_escape_string($_POST['currpw']); $newpw = $mysqli->real_escape_string($_POST['newpw']); require_once '../lib-password.php'; function noMc($length = 23) { return substr(str_shuffle("0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"), 0, $length); } $salt = noMc(); $opts = array('cost' => 10, 'salt' => $salt); $hashed = password_hash($newpw, PASSWORD_BCRYPT, $opts); $sqr = "SELECT `password` FROM `auth` WHERE `username`='{$username}';"; $res = $mysqli->query($sqr); $fetch = mysqli_fetch_assoc($res); $hpw = $fetch['password']; $islegit = $polrauth->processlogin($username, $currpw); if (!$islegit) { require_once 'header.php'; echo "Invalid current password. <a href=\"index.php\">Back</a>"; require_once 'layout-footerlg.php';
require_once 'config.php'; if ($fpass == false) { die('This service was disabled by the site owner. '); } require_once 'lib-core.php'; // require core libs require_once 'lib-auth.php'; // require auth libs require_once 'helpers/helper-mailsend.php'; // require mail libs require_once 'lib-password.php'; // require password encryption libs require_once 'fpasslib.php'; // require fpass functions $polrauth = new polrauth(); $fpass = new fpass(); require_once 'layout-headerlg.php'; if (isset($_POST['rnpass']) && isset($_POST['npass']) && isset($_POST['crkey']) && isset($_POST['cuser'])) { // if submitting new password $ckey = $mysqli->real_escape_string($_POST['crkey']); $rnpass = $mysqli->real_escape_string($_POST['rnpass']); $cuser = $mysqli->real_escape_string($_POST['cuser']); $npass = $mysqli->real_escape_string($_POST['npass']); $userinfoc = $polrauth->getinfomu($cuser); // fetch the user's information if ($userinfoc == false) { echo "<h2>That username is not associated with any account. Please try again.</h2>" . "<br />" . "<a href='forgotpass.php'>Back</a>"; require_once 'layout-footerlg.php'; die; }
<?php require_once '../lib-core.php'; require_once 'headerpage.php'; require_once '../lib-auth.php'; $auth = new polrauth(); $isadmin = $auth->isadminli(); @($users_page = $_GET['upage']); @($links_page = $_GET['lpage']); @($admin_links_page = $_GET['alpage']); function table_length($table_name) { global $mysqli; if ($table_name == "redirinfo") { $colname = "rurl"; } else { if ($table_name == "auth") { $colname = "username"; } } $result = $mysqli->query("SELECT COUNT(`{$colname}`) FROM `{$table_name}`;") or showerror(); $count = $result->fetch_assoc(); $count = (double) $count["COUNT(`{$colname}`)"]; $pages = $count / 30; return ceil($pages); } function paginate_table($current_page = 0, $total_pages = 0, $pag_name, $sel_name) { $markup = '<ul class="pagination">'; $next_page = $current_page + 1; $prev_page = $current_page - 1;