예제 #1
0
 function SelectLastFunabolCronRun()
 {
     $run_date = null;
     if (!$this->_dbConnection->Execute($this->_commandCreator->SelectLastFunabolCronRun())) {
         return false;
     }
     $row = $this->_dbConnection->GetNextRecord();
     if ($row) {
         $run_date = $row->run_date;
         $this->_dbConnection->FreeResult();
     }
     return $run_date;
 }
예제 #2
0
 /**
  * @return	int
  */
 function AllUserCount()
 {
     $cnt = 0;
     if (!$this->_connector->Execute($this->_commandCreator->AllUserCount())) {
         return false;
     }
     $row = $this->_connector->GetNextRecord();
     if ($row) {
         $cnt = (int) $row->user_cnt;
         $this->_connector->FreeResult();
     }
     return $cnt;
 }
예제 #3
0
 /**
  * @return	CCommonSubAdmin
  */
 function GetSubAdminByLoginPassword($login, $password)
 {
     $_subadmin = false;
     if (!$this->_connector->Execute($this->_commandCreator->GetSubAdminByLoginPassword($login, $password))) {
         return $_subadmin;
     }
     $row = $this->_connector->GetNextRecord();
     if ($row) {
         $_subadmin = new CCommonSubAdmin();
         $_subadmin->InitByDbRow($row);
         $this->_connector->FreeResult();
         $this->InitSubAdminDomains($_subadmin);
     }
     return $_subadmin;
 }
예제 #4
0
 /**
  * @param int $pageNumber
  * @param string $condition
  * @param int $groupId
  * @param string $sortField
  * @param bool $sortOrder
  * @return ContactCollection
  */
 function &SearchContactsAndGroups($pageNumber, $condition, $groupId, $sortField, $sortOrder, $lookForType)
 {
     $contacts = null;
     if ($this->_dbConnection->Execute($this->_commandCreator->SearchContactsAndGroups($pageNumber, $condition, $groupId, $sortField, $sortOrder, $this->Account, $lookForType))) {
         $contacts =& new ContactCollection();
         $k = 0;
         while ($row = $this->_dbConnection->GetNextRecord()) {
             if ($lookForType == 1 && $k > SUGGESTCONTACTS) {
                 $this->_dbConnection->FreeResult();
                 break;
             }
             $contact =& new Contact();
             $contact->Id = $row->id;
             $contact->IsGroup = $row->is_group;
             $contact->Name = $row->name;
             $contact->Email = $row->email;
             $contact->Frequency = $row->frequency;
             $contact->UseFriendlyName = (bool) $row->usefriendlyname;
             $contacts->Add($contact);
             $k++;
         }
     }
     return $contacts;
 }