예제 #1
0
파일: header.php 프로젝트: jhogan/nplay
     }
 }
 $post = $_POST['blnHeaderPost'] == 1 ? true : false;
 $searchText = $_POST['txtSearch'];
 if ($searchText == "") {
     $searchText = $_GET['txtSearch'];
 }
 $postType = $_POST['txtPostType'];
 $RSS = $_GET['RSS'] == 1 ? true : false;
 $logout = $_GET['logout'] == 1 ? true : false;
 $returnURI = rawurlencode($_GET['returnURI']);
 $delete = $_GET['delete'] == 1 ? true : false;
 $updateDB = $_GET['updateDB'] == 1 ? true : false;
 $username = $_GET['username'];
 require_once "Business_Objects.php";
 $bom =& Business_Objects_Manager::getInstance();
 $bom->addDSN($DEF_DSN, "default");
 /* Manager dsn can't have a db */
 $bom->addDSN($MAN_DSN, "manager");
 if ($DEBUG && $updateDB) {
     $bom->TableChangeType(BOM_CONSTRUCTIVE_AND_DESTUCTIVE_TABLE_CHANGE);
     $bom->ClassFiles('^[A-Z].*\\.php$');
     $bom->UpdateDBStructures();
     echo "DB Changes:<br/>" . $bom->DBChangeLogString();
 } else {
     require_once "I18N.php";
     require_once "Captions.php";
     require_once "Users.php";
     require_once "Movies.php";
 }
 $locale = 1033;
예제 #2
0
 function Business_Base($condition = null)
 {
     $this->_bom =& Business_Objects_Manager::GetInstance();
     $this->_conn =& $this->_bom->GetConnection("default");
     $this->_managerConn =& $this->_bom->GetConnection("manager");
     $this->_reverse = $this->_managerConn->reverse;
     if (trim($this->_conn->database_name) == '') {
         throw new Exception('BOM\'s default DB isn\'t set');
     }
     $this->_managerConn->setDatabase($this->_conn->database_name);
     if ($condition) {
         if (is_numeric($condition)) {
             # $this->_id = $condition;
             $this->Business_Base0($condition);
         } else {
             $this->LoadWhere($condition);
         }
         if (!$this->IsEmpty()) {
             $this->LoadChildren();
         }
     } else {
         $this->MarkNew();
     }
 }