?> ">Отобразить с подробными данными</a></div> <?php } else { ?> <div align=left><a href="<?php OUT("?p={$p}&act={$act}&action={$action}&show=tbl&page={$page}"); ?> ">Отобразить в виде таблицы</a></div> <?php } if (!isset($page) || $page < 1 && $page != "all") { $page = 1; } $BILL = new CBilling($GV["dbhost"], $GV["dbname"], $GV["dblogin"], $GV["dbpassword"]); $ulist = $BILL->GetUsersList(); $pgcnt = $PDIV->GetPagesCount($ulist); if ($page != "all") { $list = $PDIV->GetPage($ulist, $page); } else { $list = $ulist; } for ($i = 0; $i < $pgcnt; ++$i) { if ($page != $i + 1) { $pagestext .= "<a href=\"?p={$p}&act={$act}&action={$action}&show={$show}&page=" . ($i + 1) . "\">" . ($i + 1) . "</a>"; } else { $pagestext .= "" . ($i + 1) . ""; } $pagestext .= ", "; } if ($page != "all") {
?> <div align=left><a href="<?php OUT("?p={$p}&act={$act}&action={$action}&show=tbl&page={$page}"); ?> ">Отобразить в виде таблицы</a></div> <?php } if ($form) { if (!isset($page) || $page < 1 && $page != "all") { $page = 1; } if (!isset($sort)) { $sort = ""; } $BILL = new CBilling($GV["dbhost"], $GV["dbname"], $GV["dblogin"], $GV["dbpassword"]); $ulist = $BILL->GetUsersList($sort); if ($sort == "traffic" || $sort == "time") { for ($i = 0; $i < count($ulist); ++$i) { $data = $BILL->GetUserTotalAcctsData($ulist[$i]); $tmplist[$i]["traffic"] = $data["traffic"]; $tmplist[$i]["uid"] = $ulist[$i]; $tmplist[$i]["time"] = $data["time"]; } if ($sort == "traffic") { usort($tmplist, "accts_compare_traffic_desc"); } elseif ($sort == "time") { usort($tmplist, "accts_compare_time_desc"); } $tmplist = array_values($tmplist); for ($i = 0; $i < count($tmplist); ++$i) { $ulist[$i] = $tmplist[$i]["uid"];
function GetUsersList() { global $MDL, $GV; $MDL->Load("smadbis"); $BILL = new CBilling($GV["dbhost"], $GV["dbname"], $GV["dblogin"], $GV["dbpassword"]); return $BILL->GetUsersList(); //include $this->list_file; //return $USERS; }