public function transfers_table() { $rows[] = array("id", "request", "filename", "accessed", "size", "progress", "pcount", "ip", "pid", "% done", "inactive"); //$rows1=$this->db->get_rows("temporary",array(),"ORDER BY `request` asc"); $rows1 = $this->db->sql("select *,ROUND((100/size)*progress),TIMEDIFF(NOW(),`accessed`) from `temporary` ORDER BY `request` asc"); $this->content .= rows2table(array_merge($rows, $rows1), true); }
public function access_table() { $rows[] = array("id", "ip", "date", "request", "vid"); $rows1 = $this->db->get_rows("visits", array(), "LIMIT 100"); foreach ($rows1 as $row) { $row["request"] = str_replace("&", "<br /> ", $row["request"]); $row["visit_date"] = str_replace(" ", "<br />", $row["visit_date"]); //$row["request"]=str_replace("?","<br /> ",$row["request"]); $rows2[] = $row; } $table = rows2table(array_merge($rows, $rows2), true); $this->content .= $table; }
public function debug_table($filter, $value) { $rows[] = array("id", "severity", "function", "message", "date", "PID"); if (!empty($filter)) { $find = array($filter => $value); $rows1 = $this->db->get_rows("debug", $find); } else { $rows1 = $this->db->get_rows("debug"); } foreach ($rows1 as $row) { $row["message"] = str_replace("&", "<br /> ", $row["message"]); $row["message"] = str_replace("?", "<br /> ", $row["message"]); $row["message"] = "<a href='{$_SERVER["REQUEST_URI"]}&message={$row["message"]}'>{$row["message"]}</a>\n"; $row["pid"] = "<a href='{$_SERVER["REQUEST_URI"]}&pid={$row["pid"]}'>{$row["pid"]}</a>\n"; $row["debug_date"] = "<a href='{$_SERVER["REQUEST_URI"]}&debug_date={$row["debug_date"]}'>{$row["debug_date"]}</a>\n"; $row["severity"] = "<a href='{$_SERVER["REQUEST_URI"]}&severity={$row["severity"]}'>{$row["severity"]}</a>\n"; $row["facility"] = "<a href='{$_SERVER["REQUEST_URI"]}&facility={$row["facility"]}'>{$row["facility"]}</a>\n"; $rows2[] = $row; } $table = rows2table(array_merge($rows, $rows2), true); $this->content .= $table; }
public function videos_table() { $rows = array("id", "request", "path", "storage", "ip", "added", "size", "accessed", "visits", "enabled", "reply"); foreach ($rows as $row) { ${$row} = "{$row}<a href='{$_SERVER["REQUEST_URI"]}&sort_by_asc={$row}'><img src='{$this->template_path}/images/down_arrow.gif' /></a><a href='{$_SERVER["REQUEST_URI"]}&sort_by_desc={$row}'><img src='{$this->template_path}/images/up_arrow.gif' /></a><a href='{$_SERVER["REQUEST_URI"]}&search={$row}'><img src='{$this->template_path}/images/edit.gif' /></a>"; } $rows = array(array("{$id}", "{$request}", "{$path}", "{$storage}", "{$ip}", "{$added}", "{$size}", "{$accessed}", "{$visits}", "{$enabled}", "reply headers")); $sort_by_asc = $this->requests["sort_by_asc"]; $sort_by_desc = $this->requests["sort_by_desc"]; if (!empty($sort_by_asc)) { $sort_by_asc = "order by {$sort_by_asc} asc"; } if (!empty($sort_by_desc)) { $sort_by_asc = "order by {$sort_by_desc} desc"; } $rows1 = $this->db->get_rows("videos", array(), "{$sort_by_asc} limit 100"); foreach ($rows1 as $row) { $row["reply_headers"] = implode(";", unserialize($row["reply_headers"])); $row["storage"] = "<a href='stream_local.php?filename={$row["storage"]}'>{$row["storage"]}</a>"; $row["size"] = $row["size"] . " <strong>(" . number_readable($row["size"]) . ")</strong>"; if ($row["enabled"] == 1) { $row["enabled"] = "yes"; } else { $row["enabled"] = "no"; } $row["id"] = "<a href='index.php?page=videos&delvideo={$row["id"]}'>X</a> " . $row["id"]; $rows2[] = $row; } $this->content .= rows2table(array_merge($rows, $rows2), true); }