Ejemplo n.º 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");
 }
Ejemplo n.º 2
0
Archivo: LGU.php Proyecto: armic/erpts
 function updateRecord()
 {
     $sql = sprintf("update %s set" . " LGUName = '%s'" . ", LGUBiz = '%s'" . ", LGUDB = '%s'" . ", LGUusername = '******'" . ", LGUpassword = '******'" . " where LGUID = '%s';", AFS_TABLE, fixQuotes($this->LGUName), fixQuotes($this->LGUBiz), fixQuotes($this->LGUDB), fixQuotes($this->LGUusername), fixQuotes($this->LGUpassword), $this->LGUID);
     //echo $sql;
     //*
     $db = new DB_Records();
     $db->beginTransaction();
     $db->query($sql);
     if ($db->Errno != 0) {
         $db->rollbackTransaction();
         $db->resetErrors();
         $ret = false;
     } else {
         $db->endTransaction();
         $ret = $this->afsID;
     }
     //*/
     return $ret;
 }