Пример #1
0
 public function registrars()
 {
     $auth = Zend_Auth::getInstance();
     if ($auth->hasIdentity()) {
         $registrars = Registrars::findActiveRegistrars();
         $this->view->data = $registrars;
         // Path of the template
         return $this->view->render('partials/registrars.phtml');
     }
 }
Пример #2
0
 /**
  * checkdomainAction
  * Check domains availability
  * @return json string
  */
 public function checkdomainAction()
 {
     try {
         $config = Registrars::findActiveRegistrars();
         $domain = $this->getRequest()->getParam('fulldomain');
         if (isset($config[0])) {
             $registrar_class = $config[0]['class'];
             $reg = new $registrar_class();
             $reg->setConfig($config);
             $check = $reg->domainCheck($domain);
             echo json_encode($check);
         }
     } catch (Exception $e) {
         echo json_encode($e->getMessage());
     }
     die;
 }
Пример #3
0
 /**
  * Execute all the registered tasks for the domain
  */
 private function domainsTask()
 {
     // Get 20 Active tasks items
     $tasks = DomainsTasks::getTasks(Statuses::id('active', 'domains_tasks'), 20);
     // Check if an active registrar is active
     $registrar = Registrars::findActiveRegistrars();
     // If exist a registrar set in the database
     if (isset($registrar[0])) {
         // Check all the tasks saved within the Domains_Tasks table.
         foreach ($tasks as $task) {
             Shineisp_Commons_Utilities::logs($task['action'] . " - " . $task['Domains']['domain'] . "." . $task['Domains']['tld'], "tasks.log");
             try {
                 self::doDomainTask($task);
             } catch (SoapFault $e) {
                 Shineisp_Commons_Utilities::logs($e->faultstring, "tasks.log");
             }
         }
     }
     return true;
 }