本文整理汇总了PHP中Domain::load方法的典型用法代码示例。如果您正苦于以下问题:PHP Domain::load方法的具体用法?PHP Domain::load怎么用?PHP Domain::load使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Domain
的用法示例。
在下文中一共展示了Domain::load方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: show
public function show()
{
//if(!$this->id) return '';
global $LANG, $lInfo, $DB;
list($amount, $bonustime, $closetime) = $this->getBalance();
//list($amount2,$bonustime2,$closetime2) = $this->getBalance_old();
$whois = new Whois($this->domain);
if (!empty($this->domain)) {
$result = $DB->make_select('Domains', '*', "`username`='{$this->username}' AND `ServerID`='{$this->ServerID}'");
if (!($row = $DB->row($result))) {
$DB->make_insert('Domains', array('name' => $this->domain, 'username' => $this->username, 'ServerID' => $this->ServerID));
$result = $DB->make_select('Domains', '*', "`username`='{$this->username}' AND `ServerID`='{$this->ServerID}'");
$row = $DB->row($result);
}
$domain = new Domain();
$domain->load($row);
if (!empty($domain->expirate)) {
$domain_str = "<a href='http://{$this->domain}' target='_blank'>{$this->domain}</a>" . '<br />Истекает: ' . $domain->expirate;
} else {
//if($_SERVER['HTTP_HOST'] != 'localhost') {
if ($whois->is_available()) {
$domain_str = "<a href='http://{$this->ServerID}/~{$this->username}/' target='_blank'>{$this->domain} [Not Delegeted]</a>";
} else {
$whois_parsed = $whois->parsed_info();
$domain_str = "<a href='http://{$this->domain}' target='_blank'>{$this->domain}</a>" . '<br />Истекает: ' . $whois_parsed['expirate'];
$domain->expirate = $whois_parsed['expirate'];
$DB->make_update('Domains', '`DomainID`=' . $domain->id, array('expirate' => $domain->expirate));
}
//}else $domain_str = "<a href='http://$this->domain' target='_blank'>$this->domain</a>";
}
} else {
$domain_str = "<a href='http://{$this->domain}' target='_blank'>{$this->domain}</a>";
}
$show = beginTable("{$LANG['AccountDetails']} c ID {$this->id} , {$this->reseller->label}", '100%');
$show .= StaticField($LANG['Domain'], $domain_str);
$show .= StaticField($LANG['Server'], $this->ServerID);
if (!empty($this->ServerID)) {
$show .= StaticField('Проверить', '<a href="http://' . $this->ServerID . '/~' . $this->username . '/">' . $this->ServerID . '/~' . $this->username . '</a>');
}
$show .= StaticField($LANG['Username'], $this->username);
$show .= StaticField($LANG['Password'], $this->password);
$show .= StaticField('Дата Создания', date('d.m.Y H:i:s', strtotime($this->opentime)));
$show .= '<tr><td colspan="2">Биллинг:</td></tr>';
$show .= StaticField($LANG['Status'], Account::show_status($this->status));
if ($this->status == 'Suspend' || $this->status == 'Deleted') {
$show .= StaticField('Остановлен', '<b>' . date('d.m.Y H:i', strtotime($this->closetime)) . '</b>');
} else {
$show .= StaticField('Оплачен по', date('d.m.Y H:i', $closetime));
if ($this->billing_opts['credit_days'] > 0) {
$show .= StaticField('Проработает до', date('d.m.Y H:i', $closetime + iDAY * $this->billing_opts['credit_days']));
}
}
$show .= StaticField($LANG['Amount'], '<b>' . round($amount, 2) . ' руб.</b>');
$show .= StaticField($LANG['Bonus'], '<b>' . round($bonustime / iDAY, 1) . '</b> дн.');
//$show .= StaticField('OLD | Оплачен по', date('d.m.Y H:i', $closetime2));
//$show .= StaticField('OLD | '.$LANG['Amount'], '<b>'.round($amount2,2).' руб.</b>');
//$show .= StaticField('OLD | '.$LANG['Bonus'], '<b>'.round($bonustime2/iDAY,1).'</b> дн.');
$show .= StaticField('Макс. глубина минуса', $this->billing_opts['negativ_days'] . ' дн.');
$show .= StaticField('Возможный кредит', $this->billing_opts['credit_days'] . ' дн.');
$show .= StaticField($LANG['Package'], '<a href="' . iSELF . '?object=package&action=show&PackageID=' . $this->package->id . '">' . $this->package->title . ' (' . round($this->package->price, 2) . ' руб.)</a>');
$show .= '<tr><td colspan="2">Доп. информация:</td></tr>';
$show .= StaticField($LANG['Client_type'], $lInfo[$this->contype]);
$show .= StaticField('RUCenter Anketa', $this->info['ruanketa']);
$show .= StaticField('<a href="?object=account&action=edit_comment&AccountID=' . $this->id . '">' . Account::$LANG['comment'] . '</a>', '<pre>' . $this->info['comment'] . '</pre>');
$show .= StaticField('Последний вход', $this->lastlogin == '0000-00-00 00:00:00' ? 'никогда' : date('d.m.Y H:i', strtotime($this->lastlogin)));
if ($this->itsResellerID) {
$show .= StaticField('Система управления бизнесом', '<font color="blue"><b>' . $this->itsResellerID . '</b></font>');
}
$show .= endTable();
$show .= '<br />' . $this->contact->show();
return $show;
}
示例2: load_domains
public static function load_domains($columns = null, $filter = null, $sortby = null, $sortdir = null, $limit = null, $start = null)
{
global $DB;
$result = $DB->make_select('Domains', $columns, $filter, $sortby, $sortdir, $limit, $start);
$domain_array = array();
while ($data = $DB->row($result)) {
$domain = new Domain();
$domain->load($data);
$domain_array[] = $domain;
}
return $domain_array;
}