本文整理汇总了PHP中main::countries方法的典型用法代码示例。如果您正苦于以下问题:PHP main::countries方法的具体用法?PHP main::countries怎么用?PHP main::countries使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类main
的用法示例。
在下文中一共展示了main::countries方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: stripslashes
$order_form_array['FIRSTNAME'] = stripslashes($postvar['firstname']);
$order_form_array['LASTNAME'] = stripslashes($postvar['lastname']);
$order_form_array['ADDRESS'] = $postvar['address'];
$order_form_array['CITY'] = $postvar['city'];
$order_form_array['STATE'] = $postvar['state'];
$order_form_array['ZIP'] = $postvar['zip'];
$order_form_array['PHONE'] = $postvar['phone'];
$order_form_array['COUPON'] = $postvar['coupon'] == "" ? $getvar['coupon'] : $postvar['coupon'];
$order_form_array['PACKID'] = $getvar['package'];
$domain_array['DOMAIN'] = $postvar['cdom'];
if (empty($domain_array['DOMAIN'])) {
$domain_array['DOMAIN'] = $postvar['csub'];
}
$order_form_array['TOS'] = $dbh->config("tos");
$order_form_array['TZADJUST'] = main::tzlist($tz_default);
$order_form_array['COUNTRIES'] = main::countries(1, $postvar['country']);
//1 = Make it a drop down instead of pulling an array. The second part makes it set it's default.
$ptype = type::packagetype($getvar['package']);
$order_form_array['TYPESPECIFIC'] = type::orderForm($ptype);
if ($getvar['domsub'] == "dom") {
$order_form_array['DOMORSUB'] = style::replaceVar("tpl/order/domain.tpl", $domain_array);
} else {
$pack = $getvar['package'];
$server_type = type::packageserver($pack);
$serverfile = server::createServer($server_type);
$can_create_subs = $serverfile->subdomains;
if ($can_create_subs == false) {
$maincontent = main::table("Subdomain Error", "Sorry, but the server for this package doesn't allow subdomains to be used without a unique domain present on the account. If you'd like to\n use a domain, please go back and select the domain option.");
} else {
$subdomains_query = $dbh->select("subdomains", array("server", "=", $server_type), array("subdomain", "ASC"), 0, 1);
while ($subdomains_data = $dbh->fetch_array($subdomains_query)) {
示例2: content
public function content()
{
global $dbh, $postvar, $getvar, $instance;
$client = $dbh->client($_SESSION['cuser']);
$edit_account_array['USER'] = $client['user'];
$edit_account_array['EMAIL'] = $client['email'];
$edit_account_array['DOMAIN'] = $client['domain'];
$edit_account_array['FIRSTNAME'] = $client['firstname'];
$edit_account_array['LASTNAME'] = $client['lastname'];
$edit_account_array['ADDRESS'] = $client['address'];
$edit_account_array['CITY'] = $client['city'];
$edit_account_array['STATE'] = $client['state'];
$edit_account_array['ZIP'] = $client['zip'];
$edit_account_array['PHONE'] = $client['phone'];
$edit_account_array['TZADJUST'] = main::tzlist($client['tzadjust']);
$edit_account_array['DISP'] = "<div>";
$edit_account_array['COUNTRY'] = main::countries(1, $client['country']) . '<a title="Your country." class="tooltip"><img src="<ICONDIR>information.png" /></a>';
if ($_POST) {
if (!check::email($postvar['email'], $_SESSION['cuser'])) {
main::errors("Your email is the wrong format!");
}
if (!check::state($postvar['state'])) {
main::errors("Please enter a valid state!");
}
if (!check::address($postvar['address'])) {
main::errors("Please enter a valid address!");
}
if (!check::phone($postvar['phone'])) {
main::errors("Please enter a valid phone number!");
}
if (!check::zip($postvar['zip'])) {
main::errors("Please enter a valid zip/postal code!");
}
if (!check::city($postvar['city'])) {
main::errors("Please enter a valid city!");
}
if (!check::firstname($postvar['firstname'])) {
main::errors("Please enter a valid first name!");
}
if (!check::lastname($postvar['lastname'])) {
main::errors("Please enter a valid time last name!");
}
if (!main::errors()) {
if ($postvar['country']) {
$country_q = "";
}
$users_update = array("email" => $postvar['email'], "state" => $postvar['state'], "address" => $postvar['address'], "phone" => $postvar['phone'], "zip" => $postvar['zip'], "city" => $postvar['city'], "tzadjust" => $postvar['tzones'], "firstname" => $postvar['firstname'], "lastname" => $postvar['lastname'], "country" => $postvar['country']);
$dbh->update("users", $users_update, array("id", "=", $_SESSION['cuser']));
if ($postvar['change']) {
$client = $dbh->client($_SESSION['cuser']);
if (crypto::passhash($postvar['currentpass'], $client['salt']) == $client['password']) {
if ($postvar['newpass'] === $postvar['cpass']) {
$cmd = main::changeClientPassword($_SESSION['cuser'], $postvar['newpass']);
if ($cmd === true) {
main::errors("Details updated!");
} else {
main::errors((string) $cmd);
}
} else {
main::errors("Your passwords don't match!");
}
} else {
main::errors("Your current password is incorrect.");
}
} else {
$edit_account_array['DISP'] = "<div style=\"display:none;\">";
main::errors("Details updated!");
}
}
}
echo style::replaceVar("tpl/client/edit-account.tpl", $edit_account_array);
}