echo "<a href='index.php'>Back</a>"; die; } if ($hpi !== $hp) { echo "We have detected that you may be using automated methods to shorten links. <br>We offer a free API, please do not use our shorten page as an API.<br>If you are getting this message, but you are not a bot, please email support@polr.cf <br> Thanks."; die; } function rStr($length = 4) { return substr(str_shuffle("0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"), 0, $length); } if ($ps == "s") { // if secret url $rstr = rStr(4); } $userinfo = $polrauth->islogged(); if (!is_array($userinfo)) { $il = false; } else { $il = true; } $urlr = $mysqli->real_escape_string($urlr); //Other URL Shorteners List Array $isshort = array('polr.me', 'polr.cf', 'bit.ly', 'is.gd', 'tiny.cc', 'adf.ly', 'ur1.ca', 'goo.gl', 'ow.ly', 'j.mp', 't.co'); foreach ($isshort as $url_shorteners) { if (strstr($urlr, $protocol . $url_shorteners)) { echo "You entered an already shortened URL.<br>"; echo "<a href='index.php'>Back</a>"; 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';
<?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';
} $markup .= "<li class='{$next_class}'><a href='?{$pag_name}={$next_page}#{$sel_name}'>»</a></li>"; $markup .= '</ul>'; return $markup; } function user_link_table_length($current_user) { global $mysqli; $current_user = $mysqli->real_escape_string($current_user); $result = $mysqli->query("SELECT COUNT(`rurl`) FROM `redirinfo` WHERE `user` = '{$current_user}';") or showerror(); $count = $result->fetch_assoc(); $count = (double) $count["COUNT(`rurl`)"]; $pages = $count / 30; return ceil($pages); } if (!is_array($auth->islogged())) { echo "<h3>You must <a href='../login.php'>login</a> to access this page.</h3><br><a href='index.php'>Home</a>"; require_once '../layout-footerlg.php'; die; } else { $userinfo = $auth->islogged(); function fetchurls($lstart = 0, $limit = 30) { global $userinfo; global $mysqli; $sqr = "SELECT `baseval`,`rurl`,`date`,`lkey` FROM `redirinfo` WHERE user = '******'username'])}' ORDER BY `rid` LIMIT {$lstart} , 30;"; $res = $mysqli->query($sqr); $links = mysqli_fetch_all($res, MYSQLI_ASSOC); $linkshtml = '<table class="table table-hover"><tr><th>Link ending</th><th>Long Link</th><th>Date</th><th>Secret</th></tr>'; foreach ($links as $link) { $is_secret = "False";