Beispiel #1
0
 function Main()
 {
     $this->tpl->set_var("Session", $this->sess->url(""));
     $db = new DB_Records();
     $sql = sprintf("select %s from %s order by LGUName;", "LGUID", LGU_TABLE);
     $db->query($sql);
     $this->tpl->set_block("rptsTemplate", "DBList", "DBListBlock");
     while ($db->next_record()) {
         $lgu = new LGU();
         $lgu->selectRecord($db->f("LGUID"));
         $this->tpl->set_var("lguName", $lgu->getLGUDB());
         $this->tpl->set_var("lguDB", $lgu->getLGUID());
         $this->tpl->parse("DBListBlock", "DBList", true);
     }
     $this->tpl->parse("templatePage", "rptsTemplate");
     $this->tpl->finish("templatePage");
     $this->tpl->p("templatePage");
 }
Beispiel #2
0
 function selectRecord($LGUID, $limit = "")
 {
     if ($LGUID == "") {
         return;
     }
     $db = new DB_Records();
     $sql = sprintf("SELECT * FROM %s WHERE LGUID=%s %s;", LGU_TABLE, $LGUID, $limit);
     //echo $sql;
     $db->query($sql);
     if ($db->next_record()) {
         $this->LGUID = $db->f("LGUID");
         $this->LGUName = $db->f("LGUName");
         $this->LGUBiz = $db->f("LGUBiz");
         $this->LGUDB = $db->f("LGUDB");
         $this->LGUusername = $db->f("LGUusername");
         $this->LGUpassword = $db->f("LGUpassword");
         //$this->setDomDocument();
         $ret = true;
     } else {
         $ret = false;
     }
     return $ret;
 }