mirror of
https://github.com/sibyperiyar/Easy-HotSpot.git
synced 2024-09-20 07:16:02 +08:00
16 lines
367 B
PHP
16 lines
367 B
PHP
<?php
|
|
if ( !isset($_SESSION) ) session_start();
|
|
include('dbconfig.php');
|
|
|
|
$np = $_GET['np'];
|
|
If ($_SESSION['user_level'] <= 3) {
|
|
$np = sha1($np);
|
|
$stmt = $DB_con->prepare("update hotspot_users set password = :np where user_id = :session_id");
|
|
$stmt->execute(array(':np' => $np, ':session_id' => $_SESSION['id']));
|
|
echo 1;
|
|
}
|
|
else
|
|
{
|
|
echo 0;
|
|
}
|
|
?>
|