public function index() { $page = 1; if (isset($_GET['page'])) { $page = $_GET['page']; } $where = null; $paginate = ScriptLog::paginate("", "scriptlogs.created_at DESC, scriptlogs.id DESC", $page, 50); $this->assign("page", $paginate); $this->title = "Script Logs"; $this->render("scriptlog/index.tpl"); }
public function logs($limit = 20, $offset = 0, $order = "scriptlogs.created_at DESC, scriptlogs.id DESC") { $id = mysql_real_escape_string($this->id); return ScriptLog::find_all("scripts.id = '{$id}'", $order, $limit, $offset); }