Example #1
0
 public function __construct($limit)
 {
     parent::__construct($limit);
     $db = PearDatabase::getInstance();
     $result = $db->pquery('SELECT * FROM vtiger_systems WHERE server_type = ?', array('local_backup'));
     $this->path = $db->query_result($result, 0, 'server_path');
     $this->path = $this->addTrailingSlash($this->path);
 }
Example #2
0
 public function __construct($limit)
 {
     parent::__construct($limit);
     $db = PearDatabase::getInstance();
     $details = array();
     $query = "select * from vtiger_systems where server_type=?";
     $result = $db->pquery($query, array('ftp_backup'));
     $rowCount = $db->num_rows($result);
     if ($rowCount > 0) {
         $this->server = $db->query_result($result, 0, 'server');
         $this->username = $db->query_result($result, 0, 'server_username');
         $this->password = $db->query_result($result, 0, 'server_password');
     } else {
         //TODO handler error;
     }
 }