本文整理汇总了PHP中ctrl_options类的典型用法代码示例。如果您正苦于以下问题:PHP ctrl_options类的具体用法?PHP ctrl_options怎么用?PHP ctrl_options使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了ctrl_options类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: GenerateVisitorStats
function GenerateVisitorStats()
{
include 'cnf/db.php';
$z_db_user = $user;
$z_db_pass = $pass;
try {
$zdbh = new db_driver("mysql:host=localhost;dbname=" . $dbname . "", $z_db_user, $z_db_pass);
} catch (PDOException $e) {
}
$sql = $zdbh->prepare("SELECT * FROM x_vhosts LEFT JOIN x_accounts ON x_vhosts.vh_acc_fk=x_accounts.ac_id_pk WHERE vh_deleted_ts IS NULL");
$sql->execute();
echo "Generating visitor stats html..." . fs_filehandler::NewLine();
while ($rowvhost = $sql->fetch()) {
if (!file_exists(ctrl_options::GetOption('sentora_root') . "modules/visitor_stats/stats/" . $rowvhost['ac_user_vc'] . "")) {
@mkdir(ctrl_options::GetOption('sentora_root') . "modules/visitor_stats/stats/" . $rowvhost['ac_user_vc'] . "", 777, TRUE);
}
if (sys_versions::ShowOSPlatformVersion() == "Windows") {
$runcommand = ctrl_options::GetOption('sentora_root') . "modules/visitor_stats/bin/visitors.exe -A -m 30 " . ctrl_options::GetOption('log_dir') . "domains/" . $rowvhost['ac_user_vc'] . "/" . $rowvhost['vh_name_vc'] . "-access.log -o html > " . ctrl_options::GetOption('sentora_root') . "modules/visitor_stats/stats/" . $rowvhost['ac_user_vc'] . "/" . $rowvhost['vh_name_vc'] . ".html";
} else {
chmod(ctrl_options::GetOption('sentora_root') . "modules/visitor_stats/bin/visitors", 4777);
$runcommand = ctrl_options::GetOption('sentora_root') . "modules/visitor_stats/bin/visitors -A -m 30 " . ctrl_options::GetOption('log_dir') . "domains/" . $rowvhost['ac_user_vc'] . "/" . $rowvhost['vh_name_vc'] . "-access.log -o html > " . ctrl_options::GetOption('sentora_root') . "modules/visitor_stats/stats/" . $rowvhost['ac_user_vc'] . "/" . $rowvhost['vh_name_vc'] . ".html";
}
echo "Generating stats for: " . $rowvhost['ac_user_vc'] . "/" . $rowvhost['vh_name_vc'] . fs_filehandler::NewLine();
system($runcommand);
}
}
开发者ID:TGates71,项目名称:Sentora-Windows-Upgrade,代码行数:26,代码来源:OnDaemonHour.hook.php
示例2: DeleteAliasForDeletedClient
function DeleteAliasForDeletedClient()
{
global $zdbh;
$deletedclients = array();
$sql = "SELECT COUNT(*) FROM x_accounts WHERE ac_deleted_ts IS NOT NULL";
if ($numrows = $zdbh->query($sql)) {
if ($numrows->fetchColumn() != 0) {
$sql = $zdbh->prepare("SELECT * FROM x_accounts WHERE ac_deleted_ts IS NOT NULL");
$sql->execute();
while ($rowclient = $sql->fetch()) {
$deletedclients[] = $rowclient['ac_id_pk'];
}
}
}
// Include mail server specific file here.
if (file_exists("modules/aliases/hooks/" . ctrl_options::GetSystemOption('mailserver_php') . "")) {
include "modules/aliases/hooks/" . ctrl_options::GetSystemOption('mailserver_php') . "";
}
foreach ($deletedclients as $deletedclient) {
$bindArray = array(':deletedclient' => $deletedclient);
$sqlStatment = $zdbh->bindQuery("SELECT * FROM x_aliases WHERE al_acc_fk=:deletedclient AND al_deleted_ts IS NULL", $bindArray);
$result = $zdbh->returnRow();
if ($result) {
$sql = $zdbh->prepare("UPDATE x_aliases SET al_deleted_ts=:time WHERE al_acc_fk=:deletedclient");
$sql->bindParam(':time', time());
$sql->bindParam(':deletedclient', $deletedclient);
$sql->execute();
}
}
}
开发者ID:bbspike,项目名称:sentora-core,代码行数:30,代码来源:OnAfterDeleteClient.hook.php
示例3: getConfig
static function getConfig()
{
global $zdbh;
$currentuser = ctrl_users::GetUserDetail();
$sql = "SELECT * FROM x_settings WHERE so_module_vc=:name AND so_usereditable_en = 'true' ORDER BY so_cleanname_vc";
//$numrows = $zdbh->query($sql);
$name = ui_module::GetModuleName();
$numrows = $zdbh->prepare($sql);
$numrows->bindParam(':name', $name);
$numrows->execute();
if ($numrows->fetchColumn() != 0) {
$sql = $zdbh->prepare($sql);
$sql->bindParam(':name', $name);
$res = array();
$sql->execute();
while ($rowmailsettings = $sql->fetch()) {
if (ctrl_options::CheckForPredefinedOptions($rowmailsettings['so_defvalues_tx'])) {
$fieldhtml = ctrl_options::OuputSettingMenuField($rowmailsettings['so_name_vc'], $rowmailsettings['so_defvalues_tx'], $rowmailsettings['so_value_tx']);
} else {
$fieldhtml = ctrl_options::OutputSettingTextArea($rowmailsettings['so_name_vc'], $rowmailsettings['so_value_tx']);
}
array_push($res, array('cleanname' => ui_language::translate($rowmailsettings['so_cleanname_vc']), 'name' => $rowmailsettings['so_name_vc'], 'description' => ui_language::translate($rowmailsettings['so_desc_tx']), 'value' => $rowmailsettings['so_value_tx'], 'fieldhtml' => $fieldhtml));
}
return $res;
} else {
return false;
}
}
开发者ID:bbspike,项目名称:sentora-core,代码行数:28,代码来源:controller.ext.php
示例4: GenerateWebalizerStats
function GenerateWebalizerStats()
{
global $zdbh;
$sql = $zdbh->prepare("SELECT * FROM x_vhosts LEFT JOIN x_accounts ON x_vhosts.vh_acc_fk=x_accounts.ac_id_pk WHERE vh_deleted_ts IS NULL");
$sql->execute();
echo "Generating webalizer stats html..." . fs_filehandler::NewLine();
while ($rowvhost = $sql->fetch()) {
$basedir = ctrl_options::GetSystemOption('MADmin_root') . "modules/webalizer_stats/stats/" . $rowvhost['ac_user_vc'] . "/" . $rowvhost['vh_name_vc'];
if (!file_exists($basedir)) {
@mkdir($basedir, 0755, TRUE);
}
/** set webalizer command dependant on OS */
if (sys_versions::ShowOSPlatformVersion() == "Windows") {
$command = ctrl_options::GetSystemOption('MADmin_root') . 'modules/webalizer_stats/bin/webalizer.exe';
} else {
chmod(ctrl_options::GetSystemOption('MADmin_root') . "modules/webalizer_stats/bin/webalizer", 4777);
$command = "webalizer";
}
/** all other args and flags are the same so keep them outsite to avoid duplication */
$flag = '-o';
$secondFlags = '-d -F clf -n';
$domain = $rowvhost['vh_name_vc'];
$logFile = realpath(ctrl_options::GetSystemOption('log_dir') . 'domains/' . $rowvhost['ac_user_vc'] . '/' . $rowvhost['vh_name_vc'] . '-access.log');
$statsPath = ctrl_options::GetSystemOption('MADmin_root') . "modules/webalizer_stats/stats/" . $rowvhost['ac_user_vc'] . '/' . $rowvhost['vh_name_vc'];
/** build arg array, this is in the required order! do not just change the order of this array */
$args = array($logFile, $flag, $statsPath, $secondFlags, $domain);
echo "Generating stats for: " . $rowvhost['ac_user_vc'] . "/" . $rowvhost['vh_name_vc'] . fs_filehandler::NewLine();
$returnValue = ctrl_system::systemCommand($command, $args);
echo (0 === $returnValue ? 'Succeeded' : 'Failed') . fs_filehandler::NewLine();
}
}
开发者ID:Boter,项目名称:madmin-core,代码行数:31,代码来源:OnDaemonHour.hook.php
示例5: DisplayApacheConfig
static function DisplayApacheConfig()
{
global $zdbh;
$line = "<h2>" . ui_language::translate("Configure your Apache Settings") . "</h2>";
$line .= "<form action=\"./?module=apache_admin&action=UpdateApacheConfig\" method=\"post\">";
$line .= "<table class=\"table table-striped\">";
$count = 0;
$sql = "SELECT COUNT(*) FROM x_settings WHERE so_module_vc=:module AND so_usereditable_en = 'true'";
$moduleName = ui_module::GetModuleName();
$numrows = $zdbh->prepare($sql);
$numrows->bindParam(':module', $moduleName);
$numrows->execute();
if ($numrows) {
if ($numrows->fetchColumn() != 0) {
$sql = $zdbh->prepare("SELECT * FROM x_settings WHERE so_module_vc=:module AND so_usereditable_en = 'true' ORDER BY so_cleanname_vc");
$sql->bindParam(':module', $moduleName);
$sql->execute();
while ($row = $sql->fetch()) {
$count++;
if (ctrl_options::CheckForPredefinedOptions($row['so_defvalues_tx'])) {
$fieldhtml = ctrl_options::OuputSettingMenuField($row['so_name_vc'], $row['so_defvalues_tx'], $row['so_value_tx']);
} else {
$fieldhtml = ctrl_options::OutputSettingTextArea($row['so_name_vc'], $row['so_value_tx']);
}
$line .= "<tr valign=\"top\"><th nowrap=\"nowrap\">" . ui_language::translate($row['so_cleanname_vc']) . "</th><td>" . $fieldhtml . "</td><td>" . ui_language::translate($row['so_desc_tx']) . "</td></tr>";
}
$line .= "<tr><th>" . ui_language::translate("Force Update") . "</th><td><input type=\"checkbox\"></td><td>" . ui_language::translate("Force vhost.conf to be updated on next daemon run. Any change in settings also triggers vhost.conf to be updated.") . "</td></tr>";
$line .= "<tr><th colspan=\"3\"><button class=\"button-loader btn btn-primary\" type=\"submit\" id=\"button\" name=\"inSaveSystem\">" . ui_language::translate("Save Changes") . "</button><button class=\"button-loader btn btn-default\" type=\"button\" onclick=\"window.location.href='./?module=moduleadmin';return false;\">" . ui_language::translate("Cancel") . "</button></th></tr>";
}
}
$line .= "</table>";
$line .= runtime_csfr::Token();
$line .= "</form>";
return $line;
}
开发者ID:TGates71,项目名称:Sentora-Windows-Upgrade,代码行数:35,代码来源:controller.ext.php
示例6: DeleteMailboxesForDeletedClient
function DeleteMailboxesForDeletedClient()
{
global $zdbh;
$deletedclients = array();
$sql = "SELECT COUNT(*) FROM x_accounts WHERE ac_deleted_ts IS NOT NULL";
if ($numrows = $zdbh->query($sql)) {
if ($numrows->fetchColumn() != 0) {
$sql = $zdbh->prepare("SELECT * FROM x_accounts WHERE ac_deleted_ts IS NOT NULL");
$sql->execute();
while ($rowclient = $sql->fetch()) {
$deletedclients[] = $rowclient['ac_id_pk'];
}
}
}
// Include mail server specific file here.
if (file_exists("modules/mailboxes/hooks/" . ctrl_options::GetSystemOption('mailserver_php') . "")) {
include "modules/mailboxes/hooks/" . ctrl_options::GetSystemOption('mailserver_php') . "";
}
foreach ($deletedclients as $deletedclient) {
// $result = $zdbh->query("SELECT * FROM x_mailboxes WHERE mb_acc_fk=" . $deletedclient . " AND mb_deleted_ts IS NULL")->Fetch();
$numrows = $zdbh->prepare("SELECT * FROM x_mailboxes WHERE mb_acc_fk=:deletedclient AND mb_deleted_ts IS NULL");
$numrows->bindParam(':deletedclient', $deletedclient);
$numrows->execute();
$result = $numrows->fetch();
if ($result) {
$time = time();
$sql = $zdbh->prepare("UPDATE x_mailboxes SET mb_deleted_ts=:time WHERE mb_acc_fk=:deletedclient");
$sql->bindParam(':time', $time);
$sql->bindParam(':deletedclient', $deletedclient);
$sql->execute();
}
}
}
开发者ID:TGates71,项目名称:Sentora-Windows-Upgrade,代码行数:33,代码来源:OnAfterDeleteClient.hook.php
示例7: ListPackages
/**
* The 'worker' methods.
*/
static function ListPackages($uid)
{
global $zdbh;
$sql = "SELECT * FROM x_packages WHERE pk_reseller_fk=:uid AND pk_deleted_ts IS NULL";
//$numrows = $zdbh->query($sql);
$numrows = $zdbh->prepare($sql);
$numrows->bindParam(':uid', $uid);
$numrows->execute();
if ($numrows->fetchColumn() != 0) {
$sql = $zdbh->prepare($sql);
$sql->bindParam(':uid', $uid);
$res = array();
$sql->execute();
while ($rowpackages = $sql->fetch()) {
//$numrows = $zdbh->query("SELECT COUNT(*) FROM x_accounts WHERE ac_package_fk=" . $rowpackages['pk_id_pk'] . " AND ac_deleted_ts IS NULL")->fetchColumn();
$numrows = $zdbh->prepare("SELECT COUNT(*) FROM x_accounts WHERE ac_package_fk=:pk_id_pk AND ac_deleted_ts IS NULL");
$numrows->bindParam(':pk_id_pk', $rowpackages['pk_id_pk']);
$numrows->execute();
$Column = $numrows->fetchColumn();
array_push($res, array('packageid' => $rowpackages['pk_id_pk'], 'created' => date(ctrl_options::GetSystemOption('MADmin_df'), $rowpackages['pk_created_ts']), 'clients' => $Column[0], 'packagename' => ui_language::translate($rowpackages['pk_name_vc'])));
}
return $res;
} else {
return false;
}
}
开发者ID:Boter,项目名称:madmin-core,代码行数:29,代码来源:controller.ext.php
示例8: SendEmail
/**
* Sends the email with the contents of the object (Body etc. set using the parant calls in phpMailer!)
* @author Bobby Allen ([email protected])
* @return boolean
*/
public function SendEmail()
{
$this->Mailer = ctrl_options::GetSystemOption('mailer_type');
$this->From = ctrl_options::GetSystemOption('email_from_address');
$this->FromName = ctrl_options::GetSystemOption('email_from_name');
if (ctrl_options::GetSystemOption('email_smtp') != 'false') {
$this->IsSMTP();
if (ctrl_options::GetSystemOption('smtp_auth') != 'false') {
$this->SMTPAuth = true;
$this->Username = ctrl_options::GetSystemOption('smtp_username');
$this->Password = ctrl_options::GetSystemOption('smtp_password');
}
if (ctrl_options::GetSystemOption('smtp_secure') != 'false') {
$this->SMTPSecure = ctrl_options::GetSystemOption('smtp_secure');
}
$this->Host = ctrl_options::GetSystemOption('smtp_server');
$this->Port = ctrl_options::GetSystemOption('smtp_port');
}
ob_start();
$send_resault = $this->Send();
$error = ob_get_contents();
ob_clean();
if ($send_resault) {
runtime_hook::Execute('OnSuccessfulSendEmail');
return true;
} else {
$logger = new debug_logger();
$logger->method = ctrl_options::GetSystemOption('logmode');
$logger->logcode = "061";
$logger->detail = 'Error sending email (using sys_email): ' . $error . '';
$logger->writeLog();
runtime_hook::Execute('OnFailedSendEmail');
return false;
}
}
开发者ID:bbspike,项目名称:sentora-core,代码行数:40,代码来源:email.class.php
示例9: DeleteApacheClientFiles
function DeleteApacheClientFiles()
{
global $zdbh;
$sql = "SELECT * FROM x_accounts WHERE ac_deleted_ts IS NOT NULL";
$numrows = $zdbh->query($sql);
if ($numrows->fetchColumn() != 0) {
$sql = $zdbh->prepare($sql);
$res = array();
$sql->execute();
while ($rowdeletedaccounts = $sql->fetch()) {
// Check for an active user with same username
$sql2 = "SELECT COUNT(*) FROM x_accounts WHERE ac_user_vc=:user AND ac_deleted_ts IS NULL";
$numrows2 = $zdbh->prepare($sql2);
$user = $rowdeletedaccounts['ac_user_vc'];
$numrows2->bindParam(':user', $user);
if ($numrows2->execute()) {
if ($numrows2->fetchColumn() == 0) {
if (file_exists(ctrl_options::GetSystemOption('hosted_dir') . $rowdeletedaccounts['ac_user_vc'])) {
fs_director::RemoveDirectory(ctrl_options::GetSystemOption('hosted_dir') . $rowdeletedaccounts['ac_user_vc']);
}
}
}
}
}
}
开发者ID:bbspike,项目名称:sentora-core,代码行数:25,代码来源:OnAfterDeleteClient.hook.php
示例10: Template
public static function Template()
{
if (!fs_director::CheckForEmptyValue(ctrl_options::GetSystemOption('server_ip'))) {
return ctrl_options::GetSystemOption('server_ip');
} else {
return sys_monitoring::ServerIPAddress();
}
}
开发者ID:Boter,项目名称:madmin-core,代码行数:8,代码来源:serveripaddress.class.php
示例11: Template
public static function Template()
{
$currentuser = ctrl_users::GetUserDetail(ctrl_auth::CurrentUserID());
if ($currentuser['lastlogon']) {
return date(ctrl_options::GetSystemOption('sentora_df'), $currentuser['lastlogon']);
} else {
return "<: Never :>";
}
}
开发者ID:TGates71,项目名称:Sentora-Windows-Upgrade,代码行数:9,代码来源:lastlogon.class.php
示例12: getZpanelNews
static function getZpanelNews()
{
$handle = @file_get_contents(ctrl_options::GetSystemOption('news_url'));
$content = $handle;
if (!$content) {
return false;
}
return ws_generic::JSONToArray($content, true);
}
开发者ID:TGates71,项目名称:Sentora-Windows-Upgrade,代码行数:9,代码来源:controller.ext.php
示例13: CheckServerAPIKey
/**
* Checks that the Server API given in the webservice request XML is valid and matches the one stored in the x_settings table.
* @author Bobby Allen ([email protected])
* @return boolean
*/
public function CheckServerAPIKey()
{
if ($this->wsdataarray['apikey'] != ctrl_options::GetSystemOption('apikey')) {
runtime_hook::Execute('OnBadAPIKeyAuth');
return false;
} else {
runtime_hook::Execute('OnGoodAPIKeyAuth');
return true;
}
}
开发者ID:BIGGANI,项目名称:zpanelx,代码行数:15,代码来源:xmws.class.php
示例14: 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
示例15: LocalPortStatus
/**
* Reports on whether a TCP port is listening for connections.
* @author Pascal peyremorte
* @param int $port The port number of which to check (eg. 25 for SMTP).
* @return boolean
*/
static function LocalPortStatus($port)
{
$timeout = ctrl_options::GetSystemOption('servicechk_to');
$fp = @fsockopen('127.0.0.1', $port, $errno, $errstr, $timeout);
if ($fp !== false) {
fclose($fp);
#do not leave the port open.
return true;
}
return false;
}
开发者ID:Boter,项目名称:madmin-core,代码行数:17,代码来源:monitoring.class.php
示例16: getZpanelUpdates
public static function getZpanelUpdates()
{
if (ctrl_options::GetSystemOption('dbversion') < ctrl_options::GetSystemOption('latestzpversion')) {
$msg = ui_language::translate("There are currently new updates for your ZPanel installation, please download the latest release") . " (<strong>" . ctrl_options::GetSystemOption('latestzpversion') . "</strong>) from <a href=\"http://www.zpanelcp.com/\">http://www.zpanelcp.com/</a>.";
} elseif (ctrl_options::GetSystemOption('dbversion') == ctrl_options::GetSystemOption('latestzpversion')) {
$msg = "Congratulations, You are running the most recent version of ZPanel (<strong>" . ctrl_options::GetSystemOption('latestzpversion') . "</strong>)!";
} else {
$msg = "You appear to be running a BETA release, unless you are testing or developing we recommend you download and use the latest stable release (<strong>" . ctrl_options::GetSystemOption('latestzpversion') . "</strong>).";
}
return $msg;
}
开发者ID:BIGGANI,项目名称:zpanelx,代码行数:11,代码来源:controller.ext.php
示例17: Template
public static function Template()
{
global $controller;
if (!$controller->GetControllerRequest('URL', 'module')) {
$line = "";
$modcats = ui_moduleloader::GetModuleCats();
foreach ($modcats as $modcat) {
$mods = ui_moduleloader::GetModuleList($modcat['mc_id_pk'], "modadmin");
if ($mods) {
$line .= "<table class=\"zcat\">";
$line .= "<tr>";
$line .= "<th align=\"left\">";
$line .= "<a name=\"" . str_replace(" ", "_", strtolower($modcat['mc_name_vc'])) . "\"></a>";
$line .= "" . ui_language::translate($modcat['mc_name_vc']) . "";
$line .= "<a href=\"#\" class=\"zcat\" id=\"zcat_" . str_replace(" ", "_", strtolower($modcat['mc_name_vc'])) . "_a\"></a>";
$line .= "</th>";
$line .= "</tr>";
$line .= "<tr>";
$line .= "<td align=\"left\">";
$line .= "<div class=\"zcat_" . str_replace(" ", "_", strtolower($modcat['mc_name_vc'])) . "\" id=\"zcat_" . str_replace(" ", "_", strtolower($modcat['mc_name_vc'])) . "\">";
$line .= "<table class=\"zcatcontent\" align=\"left\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">";
$line .= "<tr>";
$line .= "<td>";
$line .= "<table align=\"left\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">";
$line .= "<tr>";
$icons_per_row = ctrl_options::GetSystemOption('module_icons_pr');
$num_icons = 0;
foreach ($mods as $mod) {
//$translatename = '<: '.$mod['mo_name_vc'].' :>';
//$translatename = $mod['mo_name_vc'];
$translatename = ui_language::translate($mod['mo_name_vc']);
$cleanname = str_replace(" ", "ZP(br)", $translatename);
if ($num_icons == $icons_per_row) {
$line .= "</tr><tr>";
$num_icons = 0;
}
$line .= "<td style=\"text-align:center;\" align=\"left\">";
$line .= "<a href=\"?module=" . $mod['mo_folder_vc'] . "\" title=\"<: " . $mod['mo_desc_tx'] . " :>\">";
$line .= "<img src=\"modules/" . $mod['mo_folder_vc'] . "/assets/icon.png\" border=\"0\" />";
$line .= "</a>";
$line .= "<br />";
$line .= "<a href=\"?module=" . $mod['mo_folder_vc'] . "\">" . $cleanname . "</a>";
$line .= "</td>";
$num_icons++;
}
$line .= "</tr></table></td></tr></table></div></td></tr></table><br>";
}
}
return $line;
}
}
开发者ID:TGates71,项目名称:Sentora-Windows-Upgrade,代码行数:51,代码来源:modulelist.class.php
示例18: ListAvaliableCSS
/**
* Returns a list of all avaliable CSS styles for a given theme. If only a single CSS style then it will return false.
* @author Bobby Allen ([email protected])
* @param string $template The template name (folder name) of which to check for extra CSS stlyes.
* @return array List of avaliable CSS styles for this theme.
*/
static function ListAvaliableCSS($template)
{
$allstyles = array();
$handle = @opendir(ctrl_options::GetSystemOption('sentora_root') . "etc/styles/" . $template . "/css");
$chkdir = ctrl_options::GetSystemOption('sentora_root') . "etc/styles/" . $template . "/css/";
if ($handle) {
while ($file = readdir($handle)) {
if ($file != "." && $file != ".." && strtolower(substr($file, -4)) == ".css") {
if (is_file($chkdir . $file)) {
array_push($allstyles, array('name' => str_replace(".css", "", $file)));
}
}
}
closedir($handle);
}
return $allstyles;
}
开发者ID:TGates71,项目名称:Sentora-Windows-Upgrade,代码行数:23,代码来源:template.class.php
示例19: getSentoraUpdates
public static function getSentoraUpdates()
{
$installed = ctrl_options::GetSystemOption('dbversion');
$lastest = ctrl_options::GetSystemOption('latestzpversion');
$lastest_tagged = ' (<strong>' . $lastest . '</strong>)';
if ($installed < $lastest) {
$msg = ui_language::translate('There are currently new updates for your Sentora installation, please download the latest release') . $lastest_tagged . ' from <a href="http://www.sentora.org/">http://www.sentora.org/</a>.';
} elseif ($installed == $lastest) {
$msg = 'Congratulations, You are running the most recent version of Sentora' . $lastest_tagged . '!';
} else {
$msg = 'You are running a BETA release (<strong>' . $installed . '</strong>), thank you to report what you observed.<br>' . '<b>Do not use it for production.</b>';
if ($latest >= '1.0.3') {
$msg .= '<br><br>Unless you are testing or developing we recommend you to download and use the latest stable release' . $lastest_tagged . '.';
}
}
return $msg;
}
开发者ID:TGates71,项目名称:Sentora-Windows-Upgrade,代码行数:17,代码来源:controller.ext.php
示例20: WriteCronFile
function WriteCronFile()
{
global $zdbh;
$line = "";
$sql = "SELECT * FROM x_cronjobs WHERE ct_deleted_ts IS NULL";
$numrows = $zdbh->query($sql);
if ($numrows->fetchColumn() != 0) {
$sql = $zdbh->prepare($sql);
$sql->execute();
$line .= "#################################################################################" . fs_filehandler::NewLine();
$line .= "# CRONTAB FOR ZPANEL CRON MANAGER MODULE " . fs_filehandler::NewLine();
$line .= "# Module Developed by Bobby Allen, 17/12/2009 " . fs_filehandler::NewLine();
$line .= "# Automatically generated by Sentora " . sys_versions::ShowSentoraVersion() . " " . fs_filehandler::NewLine();
$line .= "#################################################################################" . fs_filehandler::NewLine();
$line .= "# WE DO NOT RECOMMEND YOU MODIFY THIS FILE DIRECTLY, PLEASE USE ZPANEL INSTEAD! " . fs_filehandler::NewLine();
$line .= "#################################################################################" . fs_filehandler::NewLine();
if (sys_versions::ShowOSPlatformVersion() == "Windows") {
$line .= "# Cron Debug infomation can be found in this file here:- " . fs_filehandler::NewLine();
$line .= "# C:\\WINDOWS\\System32\\crontab.txt " . fs_filehandler::NewLine();
$line .= "#################################################################################" . fs_filehandler::NewLine();
$line .= "" . ctrl_options::GetSystemOption('daemon_timing') . " " . ctrl_options::GetSystemOption('php_exer') . " " . ctrl_options::GetSystemOption('daemon_exer') . "" . fs_filehandler::NewLine();
$line .= "#################################################################################" . fs_filehandler::NewLine();
}
$line .= "# DO NOT MANUALLY REMOVE ANY OF THE CRON ENTRIES FROM THIS FILE, USE ZPANEL " . fs_filehandler::NewLine();
$line .= "# INSTEAD! THE ABOVE ENTRIES ARE USED FOR ZPANEL TASKS, DO NOT REMOVE THEM! " . fs_filehandler::NewLine();
$line .= "#################################################################################" . fs_filehandler::NewLine();
while ($rowcron = $sql->fetch()) {
//$rowclient = $zdbh->query("SELECT * FROM x_accounts WHERE ac_id_pk=" . $rowcron['ct_acc_fk'] . " AND ac_deleted_ts IS NULL")->fetch();
$numrows = $zdbh->prepare("SELECT * FROM x_accounts WHERE ac_id_pk=:userid AND ac_deleted_ts IS NULL");
$numrows->bindParam(':userid', $rowcron['ct_acc_fk']);
$numrows->execute();
$rowclient = $numrows->fetch();
if ($rowclient && $rowclient['ac_enabled_in'] != 0) {
$line .= "# CRON ID: " . $rowcron['ct_id_pk'] . "" . fs_filehandler::NewLine();
$line .= "" . $rowcron['ct_timing_vc'] . " " . ctrl_options::GetSystemOption('php_exer') . " " . $rowcron['ct_fullpath_vc'] . "" . fs_filehandler::NewLine();
$line .= "# END CRON ID: " . $rowcron['ct_id_pk'] . "" . fs_filehandler::NewLine();
}
}
if (fs_filehandler::UpdateFile(ctrl_options::GetSystemOption('cron_file'), 0777, $line)) {
return true;
} else {
return false;
}
}
}
开发者ID:TGates71,项目名称:Sentora-Windows-Upgrade,代码行数:45,代码来源:OnAfterDeleteClient.hook.php
注:本文中的ctrl_options类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论