add order route
This commit is contained in:
@@ -221,6 +221,37 @@ function client_find_email_kuri($mail){
|
||||
|
||||
}
|
||||
|
||||
|
||||
# узнаем id клиента по мылу или создаем его
|
||||
function api_add_client($mail){
|
||||
|
||||
$find_mail = dbl_get("SELECT `client_id`, `clienthash` FROM `clients` WHERE `clientmail` = '$mail' LIMIT 1");
|
||||
|
||||
if (isset($find_mail['client_id'])){
|
||||
$result = $find_mail['clienthash'];
|
||||
}
|
||||
else {
|
||||
$add['clientmail'] = $mail;
|
||||
$add['clienthash'] = md5($mail);
|
||||
$add['clientdate'] = date("Y-m-d H:i:s");
|
||||
|
||||
$res = db_insert('clients', $add, 'chitatel');
|
||||
|
||||
if ($res > 0){
|
||||
$result = $add['clienthash'];
|
||||
}
|
||||
else{
|
||||
$result = false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return $result;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
function client_find_hash($hash){
|
||||
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ function bookid_kuri($slug) {
|
||||
|
||||
$query = "
|
||||
SELECT
|
||||
`price_id`, `pricename`, `categoryname`, `categoryslug`, price.category_id AS category_id, `BeginDate`, `priceanons`, `priceimg`, `pricehash`, `price`, `sub`
|
||||
`price_id`, `pricename`, `categoryname`, `priceslug`, `categoryslug`, price.category_id AS category_id, `BeginDate`, `priceanons`, `priceimg`, `pricehash`, `price`, `offline_price`, `sub`
|
||||
FROM
|
||||
`price`
|
||||
LEFT JOIN `pricecategory`
|
||||
|
||||
Reference in New Issue
Block a user