當前位置: 首頁>>代碼示例>>PHP>>正文


PHP ctrl_options::SetSystemOption方法代碼示例

本文整理匯總了PHP中ctrl_options::SetSystemOption方法的典型用法代碼示例。如果您正苦於以下問題:PHP ctrl_options::SetSystemOption方法的具體用法?PHP ctrl_options::SetSystemOption怎麽用?PHP ctrl_options::SetSystemOption使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在ctrl_options的用法示例。


在下文中一共展示了ctrl_options::SetSystemOption方法的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: doGenerate

 /**
  * Generate a new API key and add it to the database. 
  */
 static function doGenerate()
 {
     $new_random_key = sha1(rand() . ctrl_options::GetOption('server_ip'));
     ctrl_options::SetSystemOption('apikey', $new_random_key);
     self::$updated = true;
     return true;
 }
開發者ID:TGates71,項目名稱:Sentora-Windows-Upgrade,代碼行數:10,代碼來源:controller.ext.php

示例2: CheckZPanelLatestVersion

function CheckZPanelLatestVersion()
{
    // Grab the latest version of ZPanel from the ZPanel API servers and cache it into the database.
    $live_version = ws_generic::ReadURLRequestResult(ctrl_options::GetSystemOption('update_url'));
    if (!$live_version) {
        return false;
    }
    $versionnumber = ws_generic::JSONToArray($live_version);
    ctrl_options::SetSystemOption('latestzpversion', $versionnumber[0]['version']);
    return true;
}
開發者ID:BIGGANI,項目名稱:zpanelx,代碼行數:11,代碼來源:OnDaemonDay.hook.php

示例3: CheckMADminLatestVersion

function CheckMADminLatestVersion()
{
    // Grab the latest version of MADmin from the MADmin API servers and cache it into the database.
    $live_version = ws_generic::ReadURLRequestResult(ctrl_options::GetSystemOption('update_url'));
    if (!$live_version) {
        return false;
    }
    $versionnumber = ws_generic::JSONToArray($live_version);
    # MADmin API returns simple object not in an array like it was for zpanel.
    #    if(count($versionnumber) > 1) {
    #        $currentVersionSetting = current($versionnumber);
    #        $currentVersion = $currentVersionSetting['version'];
    #    } else {
    $currentVersion = $versionnumber['version'];
    #    }
    ctrl_options::SetSystemOption('latestzpversion', $currentVersion);
    return true;
}
開發者ID:Boter,項目名稱:madmin-core,代碼行數:18,代碼來源:OnDaemonDay.hook.php

示例4: time

    ctrl_options::SetSystemOption('daemon_hourrun', time());
    runtime_hook::Execute("OnStartDaemonHour");
    runtime_hook::Execute("OnDaemonHour");
    runtime_hook::Execute("OnEndDaemonHour");
}
if (time() >= ctrl_options::GetSystemOption('daemon_dayrun') + 24 * 3600) {
    ctrl_options::SetSystemOption('daemon_dayrun', time());
    runtime_hook::Execute("OnStartDaemonDay");
    runtime_hook::Execute("OnDaemonDay");
    runtime_hook::Execute("OnEndDaemonDay");
}
if (time() >= ctrl_options::GetSystemOption('daemon_weekrun') + 7 * 24 * 3600) {
    ctrl_options::SetSystemOption('daemon_weekrun', time());
    runtime_hook::Execute("OnStartDaemonWeek");
    runtime_hook::Execute("OnDaemonWeek");
    runtime_hook::Execute("OnEndDaemonWeek");
}
if (time() >= ctrl_options::GetSystemOption('daemon_monthrun') + 30 * 24 * 3600) {
    ctrl_options::SetSystemOption('daemon_monthrun', time());
    runtime_hook::Execute("OnStartDaemonMonth");
    runtime_hook::Execute("OnDaemonMonth");
    runtime_hook::Execute("OnEndDaemonMonth");
}
echo "\nDaemon run complete! (" . date($dateformat) . ")\n";
ctrl_options::SetSystemOption('daemon_lastrun', time());
$daemonLog->detail = "Daemon execution completed!";
$daemonLog->writeLog();
if (!runtime_controller::IsCLI()) {
    echo "</pre>";
}
exit;
開發者ID:Boter,項目名稱:madmin-core,代碼行數:31,代碼來源:daemon.php

示例5: checkVersion

 function checkVersion($whmcs_version = null)
 {
     $version = module_controller::getVersion();
     if (empty($whmcs_version)) {
         $request_data = $this->XMLDataToArray($this->wsdata);
         $ctags = $request_data['xmws']['content'];
         $whmcs_version = $ctags['whmcs_version'];
     }
     $dataobject = new runtime_dataobject();
     $dataobject->addItemValue('response', '');
     if ((int) $version != (int) $whmcs_version) {
         $dataobject->addItemValue('content', ws_xmws::NewXMLTag('pass', 'false'));
         //check database if this is first time
         $alreadyReported = ctrl_options::GetSystemOption('whmcs_reported');
         if ($alreadyReported == 'false') {
             //if so then update database
             ctrl_options::SetSystemOption('whmcs_reported', $ctags['whmcs_version']);
             //then send email to admins if possible
             $sendemail = ctrl_options::GetSystemOption('whmcs_sendemail_bo');
             if ($sendemail == 'true') {
                 module_controller::sendBadVersionMail($ctags['whmcs_version']);
             }
         }
     } else {
         $alreadyReported = ctrl_options::GetSystemOption('whmcs_reported');
         if ($alreadyReported != 'false') {
             ctrl_options::SetSystemOption('whmcs_reported', 'false');
         }
         $dataobject->addItemValue('content', ws_xmws::NewXMLTag('pass', 'true'));
     }
     return $dataobject->getDataObject();
 }
開發者ID:kadivar,項目名稱:sentora-whmcs,代碼行數:32,代碼來源:webservice.ext.php

示例6: doUpdateSettings

 /**
  * Accepts Admin settings form
  * @return null
  */
 static function doUpdateSettings()
 {
     global $controller;
     runtime_csfr::Protect();
     $form = $controller->GetAllControllerRequests('FORM');
     if (!isset($form['inAdminSettings'])) {
         return false;
     }
     ctrl_options::SetSystemOption('whmcs_sendemail_bo', $form['SendEmail']);
     ctrl_options::SetSystemOption('whmcs_link', $form['Link']);
     self::$Results[] = ui_sysmessage::shout('Settings updated!', 'alert-success');
 }
開發者ID:nmsde,項目名稱:sentora-whmcs,代碼行數:16,代碼來源:controller.ext.php

示例7: doUpdateSettings

 static function doUpdateSettings()
 {
     global $controller;
     runtime_csfr::Protect();
     $form = $controller->GetAllControllerRequests('FORM');
     if (!isset($form['inAdminSettings'])) {
         return false;
     }
     if (!self::getIsAdmin()) {
         return false;
     }
     ctrl_options::SetSystemOption('whmcs_sendemail_bo', $form['SendEmail']);
     ctrl_options::SetSystemOption('whmcs_reseller_view_api', $form['ResellerViewAPI']);
     ctrl_options::SetSystemOption('whmcs_link', $form['Link']);
     self::$Results[] = ui_sysmessage::shout(ui_language::translate("Changes to your settings have been saved successfully!"));
 }
開發者ID:kadivar,項目名稱:sentora-whmcs,代碼行數:16,代碼來源:controller.ext.php


注:本文中的ctrl_options::SetSystemOption方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。