Пример #1
0
 public function test()
 {
     $domain = '9933.net';
     $s = \common\domain\Domain::getDomainClass($domain);
     var_dump($s);
     $domain = '9333.net';
     $s = \common\domain\Domain::getDomainClass($domain);
     var_dump($s);
     $domain = 'aabb.net';
     $s = \common\domain\Domain::getDomainClass($domain);
     var_dump($s);
     $domain = '3a9.net';
     $s = \common\domain\Domain::getDomainClass($domain);
     var_dump($s);
     $domain = '3ab.net';
     $s = \common\domain\Domain::getDomainClass($domain);
     var_dump($s);
 }
Пример #2
0
 /**
  * 发布域名到审核表
  * @params $domain string 域名
  * @params $type int 交易类型
  *
  */
 public function publicToCheck($uId, $domain, $desc, $expireTime, $type, $price, $endTime, $moneyType, $isOur, $isHot, $ip, $topic, $orderId = false, $startTime = false)
 {
     $domainInfo = new \common\Common();
     $body = $domainInfo->getDomainBody($domain);
     $domainClass = \common\domain\Domain::getDomainClass($domain);
     $data = array('t_dn' => $domain, 't_body' => $domainClass[4], 't_type' => $type, 't_topic' => $topic, 't_enameid' => $uId, 't_start_price' => $price, 't_now_price' => $price, 't_create_time' => $_SERVER['REQUEST_TIME'], 't_start_time' => $startTime ? $startTime : $_SERVER['REQUEST_TIME'], 't_end_time' => $endTime, 't_tld' => $domainInfo->getTldType($domain), 't_len' => $domainClass[3], 't_desc' => $desc, 't_money_type' => $moneyType, 't_ip' => $ip, 't_is_our' => $isOur, 't_exp_time' => $expireTime, 't_hot' => $isHot, 't_class_name' => $domainClass[0], 't_two_class' => !$domainClass[1] ? 0 : $domainClass[1], 't_three_class' => !$domainClass[2] ? 0 : $domainClass[2]);
     $verifyModel = new NewTaoVerifyModel();
     $res = $verifyModel->insertVerify($data);
     if (!$res) {
         \core\Logger::write("domain.log", array(__METHOD__, "域名{$domain}发布插入到审核表new_tao_verify失败,用户id:{" . $uId . "},发布时间:" . date('Y-m-d H:i:s', $_SERVER['REQUEST_TIME'])));
     }
     return $res;
 }