$page .= table_bills($list_res); } } else { $page .= "<tr><td colspan='6' class='not_found'>Не найдено записей</td></tr>"; } $page .= "</table>"; $page .= "<div class='table-footer'><span class='statusbar'>Всего счетов: {$list_cnt}</span>"; $page .= switch_pages($stage, $page_num, $pages, $filter); // Переключатель страниц $page .= "</div>"; } $page .= "<div class='buttons'>{$btn_home} <div class='right'>{$btn_new_bill}</div></div>"; break; } // ---------------------------------------------------- // // ВЫВОД echo $page; // Тело eval(tmplt_gen('../stat/forms/end.form')); // Тапки $db_err = $db->error(); $db->close(); } } else { $_SESSION["ref"] = "bills"; authorize(); } if ($db_err['error_no'] != null) { print_r($db_err); } // DB-errors
$page .= table_supply($index_res); } } else { $page .= "<tr><td colspan='6' class='not_found'>Не найдено записей</td></tr>"; } $page .= "</table>"; $page .= "<div class='table-footer'><span class='statusbar'>Всего картриджей: {$index_cnt}</span>"; $page .= switch_pages("", $page_num, $pages, $filter); // Переключатель страниц if ($stage == "list") { $page .= "</div><div class='buttons'>{$btn_home}<div class='right'>{$btn_new_supply}</div></div>"; } else { $page .= "</div><div class='buttons'><div class='right'>{$btn_new_supply}</div></div>"; } } } // ---------------------------------------------------- // // ВЫВОД echo $page; // Тело eval(tmplt_gen("../stat/forms/end.form")); // Тапки $db_err = $db->error(); } else { $_SESSION["ref"] = "supply"; authorize(); } if ($db_err["error_no"] != null) { print_r($db_err); } // DB-errors
<?php require "subs.php"; require_once "conf.inc.php"; require_once "lib/dblayer.php"; $btn_home = "<a class='button' href='./'><<</a>"; $db = new DBLayer($CNF["db_host"], $CNF["db_user"], $CNF["db_pass"], $CNF["db_name"]); $db->query("SET NAMES utf8"); $q = "SELECT\n u.`uid`,\n u.`modiff`,\n DATE_FORMAT(u.`modiff`,'%d.%m.%Y %H:%i:%s') AS `modiff_fmt`,\n (SELECT CONCAT(`lastname`,' ',`firstname`) FROM users WHERE `uid`=u.`modiff_uid`) AS `modiff_uid`,\n u.`status_id`,\n u.`lastname`,\n u.`firstname`,\n u.`middlename`,\n u.`login`,\n u.`pass`\n FROM users AS u ORDER BY `uid` DESC LIMIT 5"; if ($qry = $db->query($q)) { eval(tmplt_gen("stat/forms/begin.form")); eval(tmplt_gen("users/forms/filter.form")); while ($res = $db->fetch_assoc($qry)) { $page .= table_users($res); } $page .= "</table>"; $page .= "<div class='table-footer'><span class='statusbar'> </span>"; } else { echo 'error'; } //print_r($res); echo $page; $db_err = $db->error(); $db->close(); if ($db_err["error_no"] != null) { print_r($db_err); } // DB-errors