From 347c9bddb0080d78f7b86da3a903f359704f66e2 Mon Sep 17 00:00:00 2001
From: Your Name
Date: Fri, 3 Jul 2020 14:29:46 +0300
Subject: [PATCH] consult
---
app/confg.php | 18 +++++------
app/pub/css/an.css | 47 ++++++++++++++++++---------
app/routes/client.php | 70 +++++++++++++++++++++-------------------
app/views/allbooks.phtml | 14 +++++---
app/views/layout.phtml | 24 +++++++-------
5 files changed, 98 insertions(+), 75 deletions(-)
diff --git a/app/confg.php b/app/confg.php
index fffa1dd..77ed654 100644
--- a/app/confg.php
+++ b/app/confg.php
@@ -1,6 +1,6 @@
'noreply@argumenti.ru',
'name' => 'Аргументы Недели',
diff --git a/app/pub/css/an.css b/app/pub/css/an.css
index eb8c6a9..d300d28 100644
--- a/app/pub/css/an.css
+++ b/app/pub/css/an.css
@@ -243,7 +243,7 @@ h1 {
font-weight: bold;
margin: 20px;
font-size: 1.2em;
-}
+}
.book_small{
position:relative;
@@ -254,11 +254,11 @@ h1 {
width: 100%;
margin-top: 10%;
text-align: center;
-}
+}
#form_title{
font-size: 18px;
-}
+}
#container_form p {
font-size: 1.3em;
margin-bottom: 8px;
@@ -281,7 +281,7 @@ input[type="email"],input[type="password"]{
padding-left: 10px;
font-size: 16px;
box-sizing: border-box;
-}
+}
#container_form span.icon {
width: 50px;
transition: all 800ms;
@@ -304,20 +304,20 @@ input[type="email"],input[type="password"]{
background-color: #69c;
border: none;
cursor: pointer;
- }
-
+ }
+
.submit:hover{
transition: all 0.5s;
background: #fff;
color: #2c536c;
- }
-
+ }
+
.lib_container {
display: flex;
flex-direction: row;
justify-content: left;
flex-wrap: wrap;
-}
+}
.book_skeleton {
width:25%;
margin-bottom: 30px;
@@ -399,14 +399,14 @@ input[type="email"],input[type="password"]{
float: left;
margin: 0px;
margin-right: 25px;
-}
+}
.anphoto IMG {
width: 100%;
margin: 0px;
display: block;
}
-
+
@@ -443,10 +443,16 @@ input[type="email"],input[type="password"]{
#book-html p {
width: 85%;
}
-
+ #lk-menu div, .header-div {
+ margin-right: 5px;
+ padding: 10px 7px;
+ }
}
@media screen and (max-width: 768px) {
+ body {
+ width:92%;
+ }
#book-html p {
width: 100%;
}
@@ -507,13 +513,12 @@ input[type="email"],input[type="password"]{
}
@media screen and (max-width: 560px) {
+ body {
+ width: 97%;
+ }
#pages {
font-size: .7em;
}
-
- body {
- width:90%;
- }
header .lite-logo {
width: 45%;
}
@@ -580,8 +585,18 @@ input[type="email"],input[type="password"]{
.antitle {
font-size: 1.2em;
}
+ .header-div, #lk-menu div {
+ margin-right: 4px;
+ font-size: .9em;
+ }
}
@media screen and (max-width: 460px) {
+ .hid460 {
+ display:none;
+ }
+ .header-div, #lk-menu div {
+ font-size:1.1em;
+ }
header {
font-size:.8em;
}
diff --git a/app/routes/client.php b/app/routes/client.php
index 114c6c0..ef98c39 100644
--- a/app/routes/client.php
+++ b/app/routes/client.php
@@ -11,16 +11,16 @@ function addclient(){
$clientdate = date('Y-m-d G:i:s');
else
$clientdate = $buy['date_start'];
-
- $clientmail = strtolower(trim($buy['buy_email']));
+
+ $clientmail = strtolower(trim($buy['buy_email']));
$clienthash = md5($clientmail);
$client = db_get("SELECT `client_id`, `clientcard`, `clientdate` FROM `clients` WHERE `clientmail` = '$clientmail' LIMIT 1");
-
+
if (isset($client['client_id'])){
-
+
if ($client['clientdate'] == '0000-00-00 00:00:00'){
$updsql = "UPDATE `clients` SET `clientdate` = '$clientdate' WHERE `client_id` = '{$client['client_id']}'";
db_get($updsql, 'writer');
@@ -41,12 +41,12 @@ function addclient(){
}
else {
-
+
$inssql = "INSERT INTO `clients` (clientmail, clientdate, clienthash) VALUES ('$clientmail', '$clientdate', '$clienthash')";
db_get($inssql, 'writer');
echo "$inssql \n";
}
- }
+ }
}
@@ -56,15 +56,15 @@ function addclientid(){
$buys = db_get("SELECT `buy_id`, `buy_email` FROM `anbuy` WHERE `client_id` = 0");
foreach ($buys as $buy){
- $clientmail = strtolower(trim($buy['buy_email']));
+ $clientmail = strtolower(trim($buy['buy_email']));
$client = db_get("SELECT `client_id` FROM `clients` WHERE `clientmail` = '$clientmail' LIMIT 1");
if (isset($client['client_id'])){
$updsql = "UPDATE `anbuy` SET `client_id` = '{$client['client_id']}' WHERE `buy_id` = '{$buy['buy_id']}'";
echo "$updsql\n";
db_get($updsql);
- }
+ }
- }
+ }
}
@@ -85,13 +85,13 @@ function restoration_kuri(){
if (isset($_POST['reset_mail'])){
$email = $_POST['reset_mail'];
$title = 'Восстановление пароля';
-
+
$hash = api_restore_mail($mail);
if ($hash !== false) {
$hashlink = SITE.'resetlink/'.$hash;
- }
-
+ }
+
echo $hashlink;
$tempcontent = VIEWPATH.'restore_add.phtml';
@@ -113,13 +113,13 @@ function resetlink_kuri($hash){
$res = api_restore_hash($hash);
if (!$res){
-
+
}
- else {
- header("HTTP/1.1 301 Moved Permanently");
+ else {
+ header("HTTP/1.1 301 Moved Permanently");
header("Location: ${SITE}/resetpwd/"); exit();
}
-
+
}
@@ -138,8 +138,8 @@ function mybooks_kuri($category = 'gazeta', $filter = 'all', $page = 1){
if ($category == 'gazeta')
$category_id = 1;
elseif ($category == 'books')
- $category_id = 3;
-
+ $category_id = 3;
+
$limit = 25;
$client = api_client_kuri($login['clienthash']);
$baseurl = SITE.'mybooks/'.$category.'/'.$filter.'/';
@@ -152,7 +152,7 @@ function mybooks_kuri($category = 'gazeta', $filter = 'all', $page = 1){
$items = clientbuys_kuri($client['clientmail'], $page, $category_id, $client['clientgroup_id'], $filter);
$count = $items['count'];
-
+
if ($count > $limit){
$pages = ceil($count / $limit);
}
@@ -161,19 +161,19 @@ function mybooks_kuri($category = 'gazeta', $filter = 'all', $page = 1){
$title = "Моя библиотека - страница $page";
$prevpage = $page - 1 ;
$prevurl = $baseurl.$prevpage;
- }
+ }
else {
- $title = "Моя библиотека";
- }
+ $title = "Моя библиотека";
+ }
+
-
if ($pages > $page){
$nextpage = $page + 1;
$nexturl = $baseurl.$nextpage;
$endurl = $baseurl.$pages;
- }
-
+ }
+
$tempcontent = VIEWPATH.'allbooks.phtml';
include VIEWPATH.'layout.phtml';
@@ -183,16 +183,18 @@ function mybooks_kuri($category = 'gazeta', $filter = 'all', $page = 1){
function form_kuri(){
+ $type='form';
$checklogin = check_login_kuri();
-
+ $title = "Бесплатные юридические консультации";
+
if ($checklogin['error'] == 'client not found'){
login_kuri();
}
else {
$tempcontent = VIEWPATH.'form.phtml';
include VIEWPATH.'layout.phtml';
- }
+ }
}
@@ -210,18 +212,18 @@ function payments_kuri($filter = 1 ){
}
$paysql = "
- SELECT
+ SELECT
buy_id, date, anbuy.price AS price, buy_status, pricename, category_id, pricehash
- FROM
- anbuy
+ FROM
+ anbuy
LEFT JOIN price ON
- anbuy.number_id = price.price_id
- WHERE
+ anbuy.number_id = price.price_id
+ WHERE
client_id = {$login['client_id']}
AND
buy_status = $filter
- ORDER BY
- buy_id DESC
+ ORDER BY
+ buy_id DESC
";
$payments = db_get($paysql);
diff --git a/app/views/allbooks.phtml b/app/views/allbooks.phtml
index f3acda8..56d42c5 100644
--- a/app/views/allbooks.phtml
+++ b/app/views/allbooks.phtml
@@ -8,8 +8,8 @@
Газета
Книги
-
-
+
+
@@ -25,15 +25,19 @@
= 2006; $y--):?>
$selected = ($filter == $y) ? ' selected' : ''?>
-
+
+
+
@@ -46,7 +50,7 @@
=$book['pricename']?>
Читать
-
+
diff --git a/app/views/layout.phtml b/app/views/layout.phtml
index 90050aa..3d6e399 100644
--- a/app/views/layout.phtml
+++ b/app/views/layout.phtml
@@ -5,13 +5,13 @@
-
+
-
+
@@ -60,12 +60,14 @@ _tmr.push({id: "1069168", type: "pageView", start: (new Date()).getTime()});
-
-
-
-
+ //if ($type !== 'form'):?>
+
+
+
+
+ //endif?>
@@ -81,7 +83,7 @@ _tmr.push({id: "1069168", type: "pageView", start: (new Date()).getTime()});
-
+
@@ -109,7 +111,7 @@ _tmr.push({id: "1069168", type: "pageView", start: (new Date()).getTime()});
})(this, this.document, "yandexContextAsyncCallbacks");
-
+
@@ -136,4 +138,4 @@ _tmr.push({id: "1069168", type: "pageView", start: (new Date()).getTime()});
-
+