Файл: 4mast/profmas.ru/pages/shop/incfiles/myout.php
Строк: 17
<?php
define('ROOT', $_SERVER['DOCUMENT_ROOT'].'/');
require_once(ROOT.'includes/Headers.php');
require_once(ROOT.'includes/PDO_func.php');
H('Мои продажи','<a href="/shop/">Магазин</a> | <b>Мои продажи</b>');
$count = DB::$dbs->querySingle("SELECT count(id) FROM `magazin_myout` WHERE `user_id` = ?",array($us['id']));
if ($count==0) {
echo '<div class="error">Продаж пока нет</div>';
}
$sql = DB::$dbs->query("SELECT * FROM `magazin_myout` WHERE `user_id` = ? ORDER BY `id` DESC",array($us['id']));
while($a = $sql->fetch()){
$file = DB::$dbs->queryFetch("SELECT * FROM `magazin_file` WHERE `id` = ?",array($a['file']));
echo '<div class="lst"><a href="/pages/shop/file/'.$file['id'].'"><b>'.$file['name'].'</b></a> ('.$file['price'].' р. / '.datef($file['time']).')<br /><small>'.mb_substr($file['opis'],0,40).'</small><br/>» Покупатель: '.Nick($a['user_buyid']).'</div>';
}
require_once(ROOT.'includes/Footers.php');
?>