コード例 #1
0
ファイル: cpanel.class.php プロジェクト: carriercomm/NeoBill
 /**
  * Suspend an Account
  *
  * Suspend a control panel account
  *
  * @param ServerDBO $server The server the account is on
  * @param string $username The account's username
  */
 public function suspendAccount(ServerDBO $server, $username)
 {
     $CPServerDBO = $this->getCPanelServerDBO($server);
     $result = suspend($server->getHostName(), $CPServerDBO->getUsername(), $CPServerDBO->getAccessHash(), false, $username);
     if (null == stristr($result, "account has been suspended")) {
         if (stristr($result, "Account Already Suspended")) {
             throw new SWUserException("[CPANEL_ACCOUNT_HAS_ALREADY_BEEN_SUSPENDED]");
         } else {
             throw new SWUserException("[CPANEL_FAILED_TO_SUSPEND_ACCOUNT]: " . $result);
         }
     }
 }
コード例 #2
0
ファイル: WHM.php プロジェクト: hbustun/agilebill
 function p_inactive()
 {
     $result = suspend($this->server_cfg['host'], $this->server_cfg['account'], $this->server_cfg['accesshash'], $this->usessl, $this->service['host_username']);
     if ($this->server['debug']) {
         echo "<pre> {$result} </pre>";
     }
     if (eregi("account has been suspended", @$result)) {
         return true;
     } else {
         return false;
     }
 }