一段代码!

      PHP 2005-4-11 17:40
<?php

require "./include/common.php";


$action=

一段代码!

      PHP 2005-4-11 17:40
{logcontent}
标签集:TAGS:
回复Comments() 点击Count()
GET[action];
if($action==check){

$domainname=

一段代码!

      PHP 2005-4-11 17:40
{logcontent}
标签集:TAGS:
回复Comments() 点击Count()
GET[domainname];
$host=

一段代码!

      PHP 2005-4-11 17:40
{logcontent}
标签集:TAGS:
回复Comments() 点击Count()
GET[host];
$query = $db->query("SELECT COUNT(*) FROM $table_domain WHERE domainname='$domainname' and host='$host'");
require TYFEE_ROOT.'./include/forum.php';
$array_reserved=array(www,ww,wwww,my,mail,ftp,dns,edu,cool,bbs,forum,sex);
if($db->result($query, 0) or str_in_array($domainname,$array_reserved))
showmessage('have_registered');
else
{
showmessage('you_can_register_it');
}


}elseif($action==submit){

$domainname=

一段代码!

      PHP 2005-4-11 17:40
{logcontent}
标签集:TAGS:
回复Comments() 点击Count()
POST[domainname];
$host=

一段代码!

      PHP 2005-4-11 17:40
{logcontent}
标签集:TAGS:
回复Comments() 点击Count()
POST[host];
$query = $db->query("SELECT COUNT(*) FROM $table_domain WHERE domainname='$domainname' and host='$host'");
require TYFEE_ROOT.'./include/forum.php';
$array_reserved=array(www,ww,wwww,my,mail,ftp,dns,edu,cool,bbs,forum);
if($db->result($query, 0) or str_in_array($domainname,$array_reserved))
showmessage('have_registered');
else
{
$domainname=base64_encode(

一段代码!

      PHP 2005-4-11 17:40
{logcontent}
标签集:TAGS:
回复Comments() 点击Count()
POST[domainname]);
$host=

一段代码!

      PHP 2005-4-11 17:40
{logcontent}
标签集:TAGS:
回复Comments() 点击Count()
POST[host];
$to_url=

一段代码!

      PHP 2005-4-11 17:40
{logcontent}
标签集:TAGS:
回复Comments() 点击Count()
POST[to_url];
$type=

一段代码!

      PHP 2005-4-11 17:40
{logcontent}
标签集:TAGS:
回复Comments() 点击Count()
POST[type];
$homepagename=

一段代码!

      PHP 2005-4-11 17:40
{logcontent}
标签集:TAGS:
回复Comments() 点击Count()
POST[homepagename];
$dateline=$timestamp;
$db->query("INSERT INTO $table_domain (uid,domainname,host,to_url,type,homepagename,dateline)
valueS ('$tyfee_uid','$domainname','$host','$to_url','$type','$homepagename','$dateline')");
showmessage('domain_register_succeed');
}

}elseif($action==apply){

$navtitle = '二级域名申请';
$navigation = '二级域名申请';
$query = $db->query("SELECT COUNT(*) FROM $table_domain WHERE uid='$tyfee_uid'");
if($db->result($query, 0))
showmessage('domain_already_applied');
else
include template('domain');

}elseif($action==modify){

if(!$tyfee_uid)
showmessage('not_loggedin');
else
{
$navtitle = '二级域名管理';
$navigation = '二级域名管理';
$query = $db->query("SELECT b.uid, b.username AS uid, m.domainname,m.host,m.to_url,m.homepagename,m.type,m.dateline FROM $table_members b
LEFT JOIN $table_domain m ON m.uid=b.uid
WHERE b.uid='$tyfee_uid'");
$domain = $db->fetch_array($query);
$domain[domainname]=base64_decode($domain[domainname]);
include template('domain');
}

}elseif($action==modify_save){

if(!$tyfee_uid)
showmessage('not_loggedin');
else
{
$domainname=base64_encode(

一段代码!

      PHP 2005-4-11 17:40
{logcontent}
标签集:TAGS:
回复Comments() 点击Count()
POST[domainname]);
$host=

一段代码!

      PHP 2005-4-11 17:40
{logcontent}
标签集:TAGS:
回复Comments() 点击Count()
POST[host];
$query = $db->query("SELECT COUNT(*) FROM $table_domain WHERE domainname='$domainname' and host='$host' and uid!='$tyfee_uid'");
require TYFEE_ROOT.'./include/forum.php';
$array_reserved=array(www,ww,wwww,my,mail,ftp,dns,edu,cool,bbs,forum);
if($db->result($query, 0) or str_in_array($domainname,$array_reserved))
showmessage('have_registered');
else
{
$domainname=

一段代码!

      PHP 2005-4-11 17:40
{logcontent}
标签集:TAGS:
回复Comments() 点击Count()
POST[domainname];
$host=

一段代码!

      PHP 2005-4-11 17:40
{logcontent}
标签集:TAGS:
回复Comments() 点击Count()
POST[host];
$to_url=

一段代码!

      PHP 2005-4-11 17:40
{logcontent}
标签集:TAGS:
回复Comments() 点击Count()
POST[to_url];
$type=

一段代码!

      PHP 2005-4-11 17:40
{logcontent}
标签集:TAGS:
回复Comments() 点击Count()
POST[type];
$homepagename=

一段代码!

      PHP 2005-4-11 17:40
{logcontent}
标签集:TAGS:
回复Comments() 点击Count()
POST[homepagename];
$db->query("UPDATE $table_domain SET domainname='$domainname',host='$host',to_url='$to_url',type='$type',homepagename='$homepagename' WHERE uid='$tyfee_uid'", 'UNBUFFERED');
showmessage('domain_update_succeed');
}
}

}
else{

$array = explode(".", strrev($HTTP_HOST));
$domainname=base64_encode(strrev($array[2]));
$host=strrev($array[1]).".".strrev($array[0]);
$query = $db->query("SELECT * FROM $table_domain WHERE domainname='".$domainname."' and host='".$host."'");
$domain = $db->fetch_array($query);
$to_url=$domain[to_url];
$type=$domain[type];
$db->query("UPDATE LOW_PRIORITY $table_domain SET times=times+1 WHERE domainname='".$domainname."' and host='".$host."'", 'UNBUFFERED');
if($to_url){
if($type){
echo "<html>
<head>
<meta http-equiv='Content-Language' content='zh-cn'>
<meta http-equiv='Content-Type' content='text/html; charset=gb2312'>
<title>$domain[homepagename]———Powered by Tyfee CMS</title>
</head>
<frameset rows='0%,*' frameborder='NO' border='0' framespacing='0'>
<frame src='$domain[to_url]' name='topFrame' scrolling='NO' noresize>
<frame src='$domain[to_url]' name='mainFrame'>
</frameset>
<noframes><body>
<a href='http://www.tyfee.com'>太妃设计</a>
</body></noframes>
</html>
</html>
";
}
else
echo "<meta http-equiv='refresh' content='0;URL=".$to_url."'>";
}
else{
echo "<meta http-equiv='refresh' content='0;URL=domain.php?action=apply'>";
}

}
?>
标签集:TAGS:
回复Comments() 点击Count()

回复Comments

{commentauthor}
{commentauthor}
{commenttime}
{commentnum}
{commentcontent}
作者:
{commentrecontent}