本文整理汇总了PHP中ctrl_users::CheckUserEnabled方法的典型用法代码示例。如果您正苦于以下问题:PHP ctrl_users::CheckUserEnabled方法的具体用法?PHP ctrl_users::CheckUserEnabled怎么用?PHP ctrl_users::CheckUserEnabled使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ctrl_users
的用法示例。
在下文中一共展示了ctrl_users::CheckUserEnabled方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: TriggerApacheQuotaUsage
function TriggerApacheQuotaUsage()
{
global $zdbh;
global $controller;
$sql = $zdbh->prepare("SELECT * FROM x_vhosts WHERE vh_deleted_ts IS NULL");
$sql->execute();
while ($rowvhost = $sql->fetch()) {
if ($rowvhost['vh_enabled_in'] == 1 && ctrl_users::CheckUserEnabled($rowvhost['vh_acc_fk']) || $rowvhost['vh_enabled_in'] == 1 && ctrl_options::GetSystemOption('apache_allow_disabled') == strtolower("true")) {
//$checksize = $zdbh->query("SELECT * FROM x_bandwidth WHERE bd_month_in = " . date("Ym") . " AND bd_acc_fk = " . $rowvhost['vh_acc_fk'] . "")->fetch();
$date = date("Ym");
$findsize = $zdbh->prepare("SELECT * FROM x_bandwidth WHERE bd_month_in = :date AND bd_acc_fk = :acc");
$findsize->bindParam(':date', $date);
$findsize->bindParam(':acc', $rowvhost['vh_acc_fk']);
$findsize->execute();
$checksize = $findsize->fetch();
$currentuser = ctrl_users::GetUserDetail($rowvhost['vh_acc_fk']);
if ($checksize['bd_diskover_in'] != $checksize['bd_diskcheck_in'] && $checksize['bd_diskover_in'] == 1) {
echo "Disk usage over quota, triggering Apache..." . fs_filehandler::NewLine();
$updateapache = $zdbh->prepare("UPDATE x_settings SET so_value_tx = 'true' WHERE so_name_vc ='apache_changed'");
$updateapache->execute();
//$updateapache = $zdbh->query("UPDATE x_bandwidth SET bd_diskcheck_in = 1 WHERE bd_acc_fk =" . $rowvhost['vh_acc_fk'] . "");
$updateapache2 = $zdbh->prepare("UPDATE x_bandwidth SET bd_diskcheck_in = 1 WHERE bd_acc_fk = :acc");
$updateapache2->bindParam(':acc', $rowvhost['vh_acc_fk']);
$updateapache2->execute();
}
if ($checksize['bd_diskover_in'] != $checksize['bd_diskcheck_in'] && $checksize['bd_diskover_in'] == 0) {
echo "Disk usage under quota, triggering Apache..." . fs_filehandler::NewLine();
$updateapache = $zdbh->prepare("UPDATE x_settings SET so_value_tx = 'true' WHERE so_name_vc ='apache_changed'");
$updateapache->execute();
//$updateapache = $zdbh->query("UPDATE x_bandwidth SET bd_diskcheck_in = 0 WHERE bd_acc_fk =" . $rowvhost['vh_acc_fk'] . "");
$updateapache2 = $zdbh->prepare("UPDATE x_bandwidth SET bd_diskcheck_in = 0 WHERE bd_acc_fk = :acc");
$updateapache2->bindParam(':acc', $rowvhost['vh_acc_fk']);
$updateapache2->execute();
}
if ($checksize['bd_transover_in'] != $checksize['bd_transcheck_in'] && $checksize['bd_transover_in'] == 1) {
echo "Bandwidth usage over quota, triggering Apache..." . fs_filehandler::NewLine();
$updateapache = $zdbh->prepare("UPDATE x_settings SET so_value_tx = 'true' WHERE so_name_vc ='apache_changed'");
$updateapache->execute();
//$updateapache = $zdbh->query("UPDATE x_bandwidth SET bd_transcheck_in = 1 WHERE bd_acc_fk =" . $rowvhost['vh_acc_fk'] . "");
$updateapache2 = $zdbh->prepare("UPDATE x_bandwidth SET bd_transcheck_in = 1 WHERE bd_acc_fk = :acc");
$updateapache2->bindParam(':acc', $rowvhost['vh_acc_fk']);
$updateapache2->execute();
}
if ($checksize['bd_transover_in'] != $checksize['bd_transcheck_in'] && $checksize['bd_transover_in'] == 0) {
echo "Bandwidth usage under quota, triggering Apache..." . fs_filehandler::NewLine();
$updateapache = $zdbh->prepare("UPDATE x_settings SET so_value_tx = 'true' WHERE so_name_vc ='apache_changed'");
$updateapache->execute();
//$updateapache = $zdbh->query("UPDATE x_bandwidth SET bd_transcheck_in = 0 WHERE bd_acc_fk =" . $rowvhost['vh_acc_fk'] . "");
$updateapache2 = $zdbh->prepare("UPDATE x_bandwidth SET bd_transcheck_in = 0 WHERE bd_acc_fk = :acc");
$updateapache2->bindParam(':acc', $rowvhost['vh_acc_fk']);
$updateapache2->execute();
}
}
}
}