本文整理汇总了PHP中server::decline方法的典型用法代码示例。如果您正苦于以下问题:PHP server::decline方法的具体用法?PHP server::decline怎么用?PHP server::decline使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类server
的用法示例。
在下文中一共展示了server::decline方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: ApproveClientSignups
private function ApproveClientSignups()
{
global $dbh, $postvar, $getvar, $instance;
if ($getvar['do']) {
$client = $dbh->client($getvar['do']);
if ($getvar['accept'] == 1) {
if (server::approve($getvar['do'])) {
$emaildata = email::emailTemplate("client-account-approved");
$dbh->update("users", array("status" => "1"), array("id", "=", $client['id']));
email::send($client['email'], $emaildata['subject'], $emaildata['content']);
main::errors("Account activated!");
}
} else {
if (server::decline($getvar['do'])) {
main::errors("Account declined!");
}
}
}
$user_adminval_query = $dbh->select("users", array("status", "=", "3"), 0, 0, 1);
if ($dbh->num_rows($user_adminval_query) == 0) {
echo "No clients are awaiting validation!";
} else {
$tpl .= "<ERRORS>";
while ($user_adminval_data = $dbh->fetch_array($user_adminval_query)) {
$admin_validate_array['USER'] = $user_adminval_data['user'];
$admin_validate_array['EMAIL'] = $user_adminval_data['email'];
$admin_validate_array['DOMAIN'] = $user_adminval_data['domain'];
$admin_validate_array['ID'] = $user_adminval_data['id'];
$admin_validate_array['CLIENTID'] = $user_adminval_data['id'];
$tpl .= style::replaceVar("tpl/admin/clients/admin-validate.tpl", $admin_validate_array);
}
echo $tpl;
}
}