function index()
 {
     $order = f('order');
     if (!$this->table_cols[$order]) {
         $order = $this->table_detail[0]['name'];
     }
     $pagedata = $this->modeldb->peeks_page(array(), "`{$order}` desc", f("page"), 20);
     $allnum = $this->modeldb->peek_num(array());
     $foot = pagerfoot2(f("page"), $allnum, PREFIXURL . "/" . $this->ctl . "/" . $this->action . '/?order=' . $order, 20, 11, "<br>");
     foreach ($pagedata as &$i) {
         $i = array_change_key_case($i, CASE_LOWER);
     }
     $this->sv("list", $pagedata);
     $this->sv("foot", $foot["pagecode"]);
     $this->sf("scaffold/index");
     if ($this->format == "xml") {
         $this->outXML($pagedata);
     }
     if ($this->format == "fpdf") {
         $this->outPDFTABLE($pagedata);
     }
 }
 function picture($params)
 {
     $filename = get_w($params[0]) ? get_w($params[0]) : "my";
     $filepath = ROOT . "data/pic-{$filename}.data";
     if (!file_exists($filepath)) {
         $this->do404();
     }
     $files = file($filepath);
     $foot = pagerfoot2(f("page"), $files, '/' . $this->ctl . '/' . $this->action, 6);
     $files = $foot["data"];
     foreach ($files as &$i) {
         $i = 'http://dl.getdropbox.com/u/637079/album/' . $i;
     }
     $this->sv("piclist", $files);
     $this->sv("foot", $foot["pagecode"]);
 }