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; }
/** * @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; }
/** * @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; }
/** * @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; }