本文整理汇总了PHP中Domain::AddDomain方法的典型用法代码示例。如果您正苦于以下问题:PHP Domain::AddDomain方法的具体用法?PHP Domain::AddDomain怎么用?PHP Domain::AddDomain使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Domain
的用法示例。
在下文中一共展示了Domain::AddDomain方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: header
<?php
include './includes/loader.php';
if ($LoggedIn === false) {
header("Location: index.php");
die;
} else {
if ($_GET['id'] == InitialSetup && $_POST['domain'] != NULL && $_POST['stats'] != NULL) {
$sDomain = $_POST['domain'];
if (!empty($sDomain)) {
$return = Domain::AddDomain($_POST['domain']);
$sUser->uInitialSetup = 1;
$sUser->InsertIntoDatabase();
} else {
header("Location: main.php");
die("There seems to be a problem with your request. Please go back and try again.");
}
} elseif ($_GET['id'] == WelcomeClosed) {
$sUser->uWelcomeClosed = 1;
$sUser->InsertIntoDatabase();
} elseif ($_GET['id'] == WizardClosed) {
$sUser->uWizardClosed = 1;
$sUser->InsertIntoDatabase();
} elseif ($_GET['id'] == DefaultEditorTheme) {
$sUser->uDefaultEditorTheme = $_POST['theme'];
$sUser->InsertIntoDatabase();
}
}
示例2: header
<?php
include './includes/loader.php';
if ($LoggedIn === false) {
header("Location: index.php");
die;
} else {
if (!empty($_GET['format'])) {
$sFormat = $_GET['format'];
}
if (!empty($_GET['action'])) {
$sAction = $_GET['action'];
}
if ($sAction == adddomain) {
$return = Domain::AddDomain($_GET['name']);
}
if ($sAction == removedomain) {
$return = Domain::RemoveDomain($_GET['name']);
}
$sUserDomains = $database->CachedQuery("SELECT * FROM domains WHERE `user_id` = :UserId ", array(':UserId' => $sUser->sId), 1);
if (!empty($sUserDomains)) {
foreach ($sUserDomains->data as $key => $value) {
$sDomains[] = array("id" => $value["id"], "domain" => $value["domain_name"]);
}
}
$sDomainManager = Templater::AdvancedParse('/blue_default/domainmanager', $locale->strings, array('ErrorMessage' => "", 'Domains' => $sDomains));
if (!isset($sFormat)) {
$sContent = Templater::AdvancedParse('/blue_default/domains', $locale->strings, array('ErrorMessage' => "", 'DomainManagerCode' => $sDomainManager));
echo Templater::AdvancedParse('/blue_default/master', $locale->strings, array('PageTitle' => "Domain Manager", 'PageName' => "domainmanager", 'ErrorMessage' => "", 'Content' => $sContent));
} else {
$sContent = preg_replace('/\\r\\n|\\r|\\n/', '', $sDomainManager);