add base href
This commit is contained in:
@@ -126,7 +126,8 @@ function client_check_auth($login, $pwd){
|
||||
return ['error' => 'client not found'];
|
||||
}
|
||||
|
||||
$hash_pwd = md5($login.$client['clientpassword']);
|
||||
$hash_pwd = client_secret($client['client_id'], $client['clientpassword']);
|
||||
|
||||
|
||||
if ($pwd == $hash_pwd){
|
||||
return ['data' => $client];
|
||||
@@ -138,6 +139,11 @@ function client_check_auth($login, $pwd){
|
||||
}
|
||||
|
||||
|
||||
function client_secret($id, $password){
|
||||
return md5($id.$password);
|
||||
}
|
||||
|
||||
|
||||
function client_add_password($client_id, $password, $confirm, $minlen = 5){
|
||||
|
||||
|
||||
|
||||
@@ -118,24 +118,6 @@ h1 {
|
||||
position:relative;
|
||||
}
|
||||
|
||||
#container_form{
|
||||
width:450px;
|
||||
height: 500px;
|
||||
background-color: rgba(24, 33, 52, 0.7);
|
||||
margin: 250px auto 0 auto;
|
||||
text-align: center;
|
||||
box-shadow: 0 -5px 0 #3adbfd;
|
||||
}
|
||||
|
||||
|
||||
input[type="text"],input[type="password"], input[type="email"]{
|
||||
width: 300px;
|
||||
height:50px;
|
||||
font-size: 18px;
|
||||
margin-bottom: 25px;
|
||||
border-radius: 4px;
|
||||
padding-left: 10px;
|
||||
}
|
||||
|
||||
|
||||
@media screen and (max-width: 560px) {
|
||||
|
||||
@@ -11,7 +11,7 @@ function anpromo_kuri($page = 1, $scale = 1){
|
||||
$file = SITEPATH.'pub/files/source/742.pdf';
|
||||
$data = pdfs_init($file, $page);
|
||||
|
||||
$pdfile = $data['pdfpgurl'];
|
||||
$pdfile = SITE.$data['pdfpgurl'];
|
||||
|
||||
$fullpdf = $data['pdfurl'];
|
||||
|
||||
|
||||
@@ -19,6 +19,10 @@ function login_kuri(){
|
||||
|
||||
}
|
||||
|
||||
// if (isset($_COOKIE['chitatel'])){
|
||||
// out();
|
||||
// }
|
||||
|
||||
$tempcontent = VIEWPATH.'login.phtml';
|
||||
include VIEWPATH.'layout_lite.phtml';
|
||||
|
||||
@@ -29,11 +33,15 @@ function login_kuri(){
|
||||
|
||||
function out_kuri(){
|
||||
|
||||
unset($_COOKIE['user']);
|
||||
setcookie('user', null, -1,'/');
|
||||
if (isset($_COOKIE['chitatel'])) {
|
||||
unset($_COOKIE['chitatel']);
|
||||
setcookie('chitatel', null, -1,'/', $_SERVER['HTTP_HOST']);
|
||||
}
|
||||
|
||||
unset($_COOKIE['pwd']);
|
||||
setcookie('pwd', null, -1, '/');
|
||||
if (isset($_COOKIE['code'])) {
|
||||
unset($_COOKIE['code']);
|
||||
setcookie('code', null, -1, '/', $_SERVER['HTTP_HOST']);
|
||||
}
|
||||
|
||||
header('Location: '.SITE.'login');
|
||||
|
||||
@@ -48,8 +56,10 @@ function add_user_cookie($user, $pwd){
|
||||
// ini_set ("session.use_trans_sid", true);
|
||||
// session_start();
|
||||
|
||||
setcookie ("user", $user, $timeout, '/');
|
||||
setcookie ("pwd", md5($user.$pwd), $timeout, '/');
|
||||
$secret = client_secret($user, $pwd);
|
||||
|
||||
setcookie ("chitatel", $user, $timeout, '/', $_SERVER['HTTP_HOST']);
|
||||
setcookie ("code", $secret, $timeout, '/', $_SERVER['HTTP_HOST']);
|
||||
|
||||
}
|
||||
|
||||
@@ -59,7 +69,7 @@ function check_login_kuri(){
|
||||
//ini_set ("session.use_trans_sid", true);
|
||||
//session_start();
|
||||
|
||||
$client = client_check_auth($_COOKIE['user'], $_COOKIE['pwd']);
|
||||
$client = client_check_auth($_COOKIE['chitatel'], $_COOKIE['code']);
|
||||
|
||||
if (!isset($client['data'])){
|
||||
return $client;
|
||||
|
||||
@@ -84,11 +84,14 @@ function mybooks_kuri($page = 1){
|
||||
|
||||
$login = check_login_kuri();
|
||||
|
||||
if (!isset($login['data']['clienthash'])){
|
||||
|
||||
if (!isset($login['client_id'])){
|
||||
header('Location: '.SITE.'login');
|
||||
exit;
|
||||
}
|
||||
|
||||
|
||||
|
||||
$limit = 25;
|
||||
$client = api_client_kuri($login['data']['clienthash']);
|
||||
$baseurl = SITE."mybooks/";
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>Еженедельник Аргументы Недели - <?=$title?></title>
|
||||
<//base href="<?=SITE?>">
|
||||
<script src="/pub/scripts/pdf.min.js"></script>
|
||||
<script src="/pub/scripts/anviewer.js?ver=43"></script>
|
||||
<link rel="stylesheet" type="text/css" href="/pub/css/an.css?ver=39">
|
||||
<link rel="stylesheet" type="text/css" href="/pub/css/an.css?ver=40">
|
||||
<link rel="icon" type="image/ico" href="https://argumenti.ru/favicon.ico">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<link rel="stylesheet" href="/pub/fontawesome/css/all.css">
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<p><label for="username">Вход в личный кабинет</label></p>
|
||||
<p><input name="username" type="email" autocomplete="on" placeholder="Введите электронную почту"/></p>
|
||||
<p><input name="password" type="password" minlength="5" autocomplete="current-password" placeholder="Введите пароль"></p>
|
||||
<p><input type="submit" value="ВОЙТИ"></p>
|
||||
<p><input class="submit" type="submit" value="ВОЙТИ"></p>
|
||||
</form>
|
||||
|
||||
<?if (isset($error)):?>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<p><label for="new-password">Придумайте пароль не менее 5 символов и повторите его для подтверждения:</label></p>
|
||||
<p><input name="new-password" id="new-password" type="password" autocomplete="new-password" minlength="<?=$minlen?>" placeholder="Введите пароль" required /></p>
|
||||
<p><input name="confirm-password" id="confirm-password" type="password" autocomplete="new-password" minlength="<?=$minlen?>" placeholder="Повторите пароль" required /></pdf>
|
||||
<p><input name="reset-submit" type="submit" value="Сохранить пароль"></p>
|
||||
<p><input name="reset-submit" class="submit" type="submit" value="Сохранить пароль"></p>
|
||||
</form>
|
||||
|
||||
<?endif?>
|
||||
|
||||
Reference in New Issue
Block a user