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; } }