diff --git a/app/routes/client.php b/app/routes/client.php index 8b689f9..3ffafd9 100644 --- a/app/routes/client.php +++ b/app/routes/client.php @@ -131,3 +131,41 @@ function mybooks_kuri($page = 1){ +//все покупки +function payments_kuri(){ + + $login = check_login_kuri(); + + if (!isset($login['client_id'])){ + header('Location: '.SITE.'login'); + exit; + } + + $paysql = " + SELECT + date, anbuy.price AS price, buy_status, pricename, category_id, pricehash + FROM + anbuy + LEFT JOIN price ON + anbuy.number_id = price.price_id + WHERE + client_id = {$login['client_id']} + ORDER BY + buy_id DESC + "; + + $payments = db_get($paysql); + + $title = 'Мои покупки'; + + $tempcontent = VIEWPATH.'payments.phtml'; + include VIEWPATH.'layout.phtml'; + + + + + +} + + + diff --git a/app/views/payments.phtml b/app/views/payments.phtml new file mode 100644 index 0000000..4ec0d34 --- /dev/null +++ b/app/views/payments.phtml @@ -0,0 +1,27 @@ + + + + + + + + + + + + 2 && $payment['buy_status'] == 1):?> + + + + + + + + + + + + +
ДатаПродуктСтатус
- руб.неоплачен
+ + \ No newline at end of file