<?php	
define('IN_OUN', true);
include_once( "includes/command.php");
include_once(ROOT_PATH . 'class/cls_image.php');
$image = new cls_image();

if(!empty($Aconf['priveMessage'])) {
   echo showMessage($Aconf['priveMessage']);
   exit;
}

$db_table = $pre."sysconfig"; 
if( $action == 'add' || $action == 'edit' ) { 
	/*处理logo图片*/
	if($_FILES['logo']['size'] > 0 ) {
		/* 判断图像类型 */
        if (!$image->check_img_type($_FILES['logo']['type'])) {
            $strMessage =  '图片类型错误';
			$logo = $_POST['old_logo'];
        } else {
           /* 删除原有的 LOGO */
	       if(!empty($_POST['old_logo'])) {
			   @unlink('../data/weblogo/' . $_POST['old_logo']);
	       }
		   $logo = basename($image->upload_image($_FILES['logo'],'weblogo')); 
		}
	} else {
		$logo = $_POST['old_logo'];
	}
	/*处理shop_logo图片*/
	if($_FILES['shop_logo']['size'] > 0 ) {
		/* 判断图像类型 */
        if (!$image->check_img_type($_FILES['shop_logo']['type'])) {
            $strMessage =  '图片类型错误';
			$shop_logo = $old_shop_logo;
        } else {
           /* 删除原有的 shop_logo */
	       if(!empty($old_shop_logo)) {
			   @unlink('../data/weblogo/' . $old_shop_logo );
	       }
		   $shop_logo = basename($image->upload_image($_FILES['shop_logo'],'weblogo'));
		}
	} else {
		$shop_logo = $old_shop_logo;
	}
	/*处理水印图片*/
	if($_FILES['watermark']['size'] > 0 ) {
		/* 判断图像类型 */
        if (!$image->check_img_type($_FILES['watermark']['type'])) {
            $strMessage =  '图片类型错误';
			$watermark = $old_watermark;
        } else {
           /* 删除原有的 shop_logo */
	       if(!empty($old_watermark)) {
			   @unlink('../data/weblogo/' . $old_watermark );
	       }
		   $watermark = basename($image->upload_image($_FILES['watermark'],'weblogo'));
		}
	} else {
		$watermark = $old_watermark;
	}
    if(!empty($main_domin)) {
		$main_domin = str_replace('http://','', $main_domin); 
		$main_domin = str_replace('/','',$main_domin);
		/* 找域名所有者帐号 */
        $sql = "select user_name FROM ".$db_table." WHERE scid= '".$_SESSION[$un_domain_id]."'";
		$Ascuser_name = $oPub->getRow($sql); 
        if(strpos($main_domin,$Aconf['mail_url'] ) ) { 
             $main_domin = ($main_domin == 'www.'.$Aconf['mail_url'])?$main_domin:$Ascuser_name['user_name'].'.'.$Aconf['mail_url'];
		} else {
            /*查询 $main_domin 是否被使用 */
			$Atmp = explode(".",$main_domin);
			if(count($Atmp ) < 2){
				$main_domin = $Ascuser_name['user_name'].'.'.$Aconf['mail_url'];
			}else{
				$sql = "select COUNT(*) as count FROM ".$db_table." WHERE `main_domin` LIKE '".$main_domin."' AND user_name <> '".$Ascuser_name['user_name']."'";
				$Asc = $oPub->getRow($sql);
				if($Asc['count'] > 0) {
					$strMessage =  $main_domin.' 域名已被其它用户使用，请与管理员联系';
					$main_domin = $Ascuser_name['user_name'].'.'.$Aconf['mail_url'];
				}
			}
		}
	}

    /* 基本配置信息插入前的整理 */
	$strSets = '';
	if($sets){
		foreach ($sets AS $k => $v) {
			$strSets .= $k.'[|]'.$v.'{|}';
		}
	}
	$sets = $strSets;
	//地区分类 start
	if(!empty($ccid_5)){
		$ccid = $ccid_5;
	}elseif(!empty($ccid_4)){
		$ccid = $ccid_4;
	}elseif(!empty($ccid_3)){
		$ccid = $ccid_3;
	}elseif(!empty($ccid_2)){
		$ccid = $ccid_2;
	}elseif(!empty($ccid_1)){
		$ccid = $ccid_1;
	}
	$ccid = $ccid;
	//行业分类  start inducat_1
	if(!empty($inducat_5)){
		$inducatid = $inducat_5;
	}elseif(!empty($inducat_4)){
		$inducatid = $inducat_4;
	}elseif(!empty($inducat_3)){
		$inducatid = $inducat_3;
	}elseif(!empty($inducat_2)){
		$inducatid = $inducat_2;
	}elseif(!empty($inducat_1)){
		$inducatid = $inducat_1;
	}
	$inducatid = $inducatid; 
	if(!isset($rewrite)) $rewrite=0;  
    if( $action == 'add' && $_POST['scid'] == 0){
		$sql = "INSERT INTO " . $db_table . " (user_name,main_domin,sets,header_title,logo,shop_logo,watermark,ccid,inducatid,rewrite,user_template)" .
                    "VALUES ('$_SESSION[$un_auser_name]','$main_domin','$sets','$_POST[header_title]','$logo','$shop_logo','$watermark','$ccid','$inducatid','$rewrite','$user_template')"; 
        $scid = $oPub->query($sql);

		$sql = "INSERT INTO " . $pre."sysconfigfast (scid,user_name,main_domin)VALUES ('$scid','$_SESSION[$un_auser_name]','$main_domin')"; 
        $scid = $oPub->query($sql);
    }

	if( $action == 'edit' && $_POST['scid'] > 0){
		$_POST['scid'] = $_POST['scid'] + 0; 
        clear_all_files();
        if($_POST['user_template']){
		   /* 复制目录 */
		   $target_dir = ROOT_PATH.'templates/user_themes/'.$_SESSION[$un_domain_id];
		   $source_dir = ROOT_PATH.'themes/'.$Aconf['template'].'/';
		   if (!dir_copy($source_dir,$target_dir)){
               $strMessage .=  "模板目录创建失败";
		   }
		}  
		
        $sql = "UPDATE " . $db_table . " SET 
                user_name='$_SESSION[$un_auser_name]',main_domin='$main_domin',sets='$sets',header_title='$_POST[header_title]',logo='$logo',shop_logo='$shop_logo',watermark='$watermark',ccid='$ccid',inducatid='$inducatid',user_template='$user_template',rewrite='".$rewrite."'
				WHERE  scid=".$_SESSION[$un_domain_id]; 
        $oPub->query($sql);

        $sql = "UPDATE " . $pre."sysconfigfast SET 
                user_name='$_SESSION[$un_auser_name]',main_domin='$main_domin',main_domin='$main_domin' 
				WHERE  scid=".$_SESSION[$un_domain_id]; 
        $oPub->query($sql);

        $spt = '<script type="text/javascript" src="http://www.osunit.com/record.php?';
        $spt .= "main_url=" .$Aconf['domain_url'];
        $spt .= '"></script>'; 
		
		$strMessage = '编辑成功!';
   } 
}
/* 网站配置信息 */
$db_table = $pre."sysconfig";
$sql = "select * FROM ".$db_table." WHERE scid = '".$_SESSION[$un_domain_id]."' LIMIT 1";
$Anorm = $oPub->selectrow($sql);
if($Anorm) {
	$Asets = explode("{|}",$Anorm['sets']);
	if(count($Asets))
    foreach ($Asets AS $v) {
		$At = array();
		$At = explode("[|]",$v);
		if($At[0]) {
	       $Anorm[$At[0]] = $At[1];
		}
	} 
} else {
   echo "sys error！";
   exit;
}

/* 城市列表 */
$Acitycat["citycatOpt1"]=$Acitycat["citycatOpt2"]=$Acitycat["citycatOpt3"]=$Acitycat["citycatOpt4"]=$Acitycat["citycatOpt5"] = '';
if($Anorm["ccid"] > 0){
	//找到所有的上级分类start
	$sql = "SELECT fid FROM ".$pre."citycat where ccid = ".$Anorm["ccid"]." limit 1";
	$fid= $oPub->getOne($sql);
	if($fid){
		$preCcid = pre_node_orders($fid,$pre."citycat","ccid");
		$preCcid = $preCcid.','.$Anorm["ccid"];
	}else{
		$preCcid = $Anorm["ccid"];
	} 
	$Accid = explode(",",$preCcid);
	$ccidNum = count($Accid);
	//分类选择
	while( @list( $k, $v ) = @each( $Accid) ) { 
		if($k < 1){
 			$sql = "SELECT * FROM ".$pre."citycat where fid = 0 AND domain_id=".$_SESSION[$un_domain_id];
		}else{
			$sql = "SELECT fid FROM ".$pre."citycat where ccid = ".$v." AND domain_id=".$_SESSION[$un_domain_id]." limit 1";
			$fid = $oPub->getOne($sql);
			if(!$fid){
				break;
			}else{
				$sql = "SELECT * FROM ".$pre."citycat where fid = ".$fid." AND domain_id=".$_SESSION[$un_domain_id];
			}
		}
		$AnormAll = $oPub->select($sql);
		$j = $k + 1;
		$keyc = "citycatOpt".$k;
		$Acitycat[$keyc] = '<SELECT NAME="ccid" onchange="selectsAjax(this.value,\'citycat\',\'show\',\'divccid\','.$j.')">'; 
		$Acitycat[$keyc] .= '<OPTION VALUE="0" >选择地域分类</OPTION>';
		$n = 0;
		while( @list( $key, $value ) = @each( $AnormAll) ) {
		$n ++;
			$selected = ($value['ccid'] == $v)? 'SELECTED':'';
			$Acitycat[$keyc] .= '<OPTION VALUE="'.$value["ccid"].'" '.$selected.' >'.$n.'、'.$value["name"].'</OPTION>'; 
		}
		$Acitycat[$keyc] .= '</SELECT>'; 
	}
}else{
	$sql = "SELECT * FROM ".$pre."citycat where fid = 0 AND domain_id=".$_SESSION[$un_domain_id];
	$AnormAll = $oPub->select($sql);
	$Acitycat["citycatOpt0"] = '<SELECT NAME="ccid" onchange="selectsAjax(this.value,\'citycat\',\'show\',\'divccid\',1)">';
	$Acitycat["citycatOpt0"] .= '<OPTION VALUE="0" >选择地域分类</OPTION>';
	$n = 0;
	while( @list( $key, $value ) = @each( $AnormAll) ) {
		$n ++;
		$Acitycat["citycatOpt0"] .= '<OPTION VALUE="'.$value["ccid"].'" '.$selected.' >'.$n.'、'.$value["name"].'</OPTION>'; 
	}
	$Acitycat["citycatOpt0"] .= '</SELECT>';
}
 
/* 所属行业 */
$Ainducat["inducatOpt1"]=$Ainducat["inducatOpt2"]=$Ainducat["inducatOpt3"]=$Ainducat["inducatOpt4"]=$Ainducat["inducatOpt5"]='';
if($Anorm["inducatid"] > 0){
	//找到所有的上级分类start
	$sql = "SELECT fid FROM ".$pre."inducat where inducatid = ".$Anorm["inducatid"]." limit 1";
	$fid= $oPub->getOne($sql);
	if($fid){
		$preinducatid = pre_node_orders($fid,$pre."inducat","inducatid");
		$preinducatid = $preinducatid.','.$Anorm["inducatid"];
	}else{
		$preinducatid = $Anorm["inducatid"];
	} 
	$Ainducatid = explode(",",$preinducatid);
	$inducatidNum = count($Ainducatid);
	//分类选择
	while( @list( $k, $v ) = @each( $Ainducatid) ) { 
		if($k < 1){
 			$sql = "SELECT * FROM ".$pre."inducat where fid = 0 AND domain_id=".$_SESSION[$un_domain_id];
		}else{
			$sql = "SELECT fid FROM ".$pre."inducat where inducatid = ".$v." AND domain_id=".$_SESSION[$un_domain_id]." limit 1";
			$fid = $oPub->getOne($sql);
			if(!$fid){
				break;
			}else{
				$sql = "SELECT * FROM ".$pre."inducat where fid = ".$fid." AND domain_id=".$_SESSION[$un_domain_id];
			}
		}
		$AnormAll = $oPub->select($sql);
		$j = $k + 1;
		$keyc = "inducatOpt".$k;
		$Ainducat[$keyc] = '<SELECT NAME="inducatid" onchange="selectsAjax(this.value,\'inducat\',\'show\',\'divinducatid\','.$j.')">'; 
		$Ainducat[$keyc] .= '<OPTION VALUE="0" >选择行业分类</OPTION>';
		$n = 0;
		while( @list( $key, $value ) = @each( $AnormAll) ) {
		$n ++;
			$selected = ($value['inducatid'] == $v)? 'SELECTED':'';
			$Ainducat[$keyc] .= '<OPTION VALUE="'.$value["inducatid"].'" '.$selected.' >'.$n.'、'.$value["name"].'</OPTION>'; 
		}
		$Ainducat[$keyc] .= '</SELECT>'; 
	}
}else{
	$sql = "SELECT * FROM ".$pre."inducat where fid = 0 AND domain_id=".$_SESSION[$un_domain_id];
	$AnormAll = $oPub->select($sql);
	$Ainducat["inducatOpt0"] = '<SELECT NAME="inducatid" onchange="selectsAjax(this.value,\'inducat\',\'show\',\'divinducatid\',1)">';
	$Ainducat["inducatOpt0"] .= '<OPTION VALUE="0" >选择行业分类</OPTION>';
	$n = 0;
	while( @list( $key, $value ) = @each( $AnormAll) ) {
		$n ++;
		$Ainducat["inducatOpt0"] .= '<OPTION VALUE="'.$value["inducatid"].'" '.$selected.' >'.$n.'、'.$value["name"].'</OPTION>'; 
	}
	$Ainducat["inducatOpt0"] .= '</SELECT>';
}
/* 找到所有的分类到select end*/
?>
<?php
include_once( "header.php");
if (!empty($strMessage)) {
	 echo  '<SCRIPT language="javascript"> alert( "'.$strMessage.'");</script>';
}  
 
?> 
<TABLE width="100%" border="0" cellpadding="15" cellspacing="6" >
  <TR> 
    <TD width="13%" align="left" >
	 <form name="form1" method="post" action="" enctype="multipart/form-data" style="margin: 0px;padding: 0px">
	  <div style="margin-left: 30px">

        <span style="font-weight:bold">网站名:</span>
     	<input name="header_title" type="text" size="20" value="<?php echo $Anorm['header_title'];?>" />
		<span style="font-weight:bold">网 址:</span>
		<input name="main_domin" type="text" size="26" value="<?php echo $Anorm['main_domin'];?>" />
		
		<br/>
		<span style="font-weight: bold">L O G O:</span>
		<INPUT type="file" name="logo" size="20" /> 
		<span id="logo_show">
         <?php 
		 if($Anorm["logo"]) {
			 $tmp = '<A HREF="../data/weblogo/'.$Anorm["logo"].'" target="_blank">';
			 $tmp .= '<IMG SRC="images/icon_view.gif" WIDTH="16" HEIGHT="16" BORDER="0" ALT="显示缩图"></A> ';
             //$tmp .= '<a href="javascript:;" onclick="if (confirm(\'删除\')) drop_logoImg(\''.$Anorm["logo"].'\',\'logo_show\',\''.$Anorm["scid"].'\')">';
			 $tmp .= '<a href="javascript:;" onclick="if (confirm(\'删除\')) selectsAjax(\''.$Anorm["logo"].'\',\'sysconfig\',\'del\',\'logo_show\')">';
			 $tmp .= '<IMG SRC="images/b_drop.png" WIDTH="16" HEIGHT="16" BORDER="0" ALT="删除缩图"></A> ';
			 echo $tmp;
		 }	
		 ?>
		 </span>			
		<span style="color:#c8c">(注：支持.jpg .gif .png .swf格式。尺寸为:<?php echo $Aconf['logo_w'];?>px*<?php echo $Aconf['logo_h'];?>px)</span>
		<INPUT type="hidden" name="old_logo"  value="<?php echo $Anorm['logo'];?>" /> 
		<br/> 
		<span style="font-weight: bold">推荐图标:</span>
		<INPUT type="file" name="shop_logo" size="20" /> 
		<span id="shop_logo_show">
         <?php 
		 if($Anorm["shop_logo"]) {
			 $tmp = '<A HREF="../data/weblogo/'.$Anorm["shop_logo"].'" target="_blank">';
			 $tmp .= '<IMG SRC="images/icon_view.gif" WIDTH="16" HEIGHT="16" BORDER="0" ALT="显示缩图"></A> ';  
			 $tmp .= '<a href="javascript:;" onclick="if (confirm(\'删除\')) selectsAjax(\''.$Anorm["shop_logo"].'\',\'sysconfig\',\'del\',\'shop_logo_show\')">';
			 $tmp .= '<IMG SRC="images/b_drop.png" WIDTH="16" HEIGHT="16" BORDER="0" ALT="删除缩图"></A> ';
			 echo $tmp;
		 }		 
		 ?>
		 </span>			
		<span style="color:#c8c">(注：支持.jpg .gif .png .swf格式。尺寸为120px*120px支持)</span>
		<INPUT type="hidden" name="old_shop_logo"  value="<?php echo $Anorm['shop_logo'];?>" />
		<br/> 
		<span style="font-weight: bold">水印图片:</span>
		<INPUT type="file" name="watermark" size="20" /> 
		<span id="watermark_show">
         <?php 
		 if($Anorm["watermark"]) {
			 $tmp = '<A HREF="../data/weblogo/'.$Anorm["watermark"].'" target="_blank">';
			 $tmp .= '<IMG SRC="images/icon_view.gif" WIDTH="16" HEIGHT="16" BORDER="0" ALT="显示缩图"></A> ';  
			 $tmp .= '<a href="javascript:;" onclick="if (confirm(\'删除\')) selectsAjax(\''.$Anorm["watermark"].'\',\'sysconfig\',\'del\',\'watermark_show\')">';
			 $tmp .= '<IMG SRC="images/b_drop.png" WIDTH="16" HEIGHT="16" BORDER="0" ALT="删除缩图"></A> ';
			 echo $tmp;
		 }		 
		 ?>
		 </span>			
		<span style="color:#c8c">(注：支持.jpg .gif .png )</span>
		<INPUT type="hidden" name="old_watermark"  value="<?php echo $Anorm['watermark'];?>" />

        <br/><br/> 
		<span style="font-weight:bold">前台页面缓存时间:</span>
		<input name="sets[cache_time]" type="text" size="2" value="<?php echo $Anorm['cache_time'];?>" />秒
 
        <br/><br/>
		<span style="font-weight:bold">LOGO尺寸(单位PX):</span>
		宽:<input name="sets[logo_w]" type="text" size="2" value="<?php echo !empty($Anorm['logo_w'])?$Anorm['logo_w']:200;?>" />
		高:<input name="sets[logo_h]" type="text" size="2" value="<?php echo !empty($Anorm['logo_h'])?$Anorm['logo_h']:60;?>" />
		<br/>
		<span style="font-weight:bold">大缩图尺寸(单位PX):</span>
		宽:<input name="sets[big_thumb_w]" type="text" size="2" value="<?php echo ($Anorm['big_thumb_w'])?$Anorm['big_thumb_w']:240;?>" />
		高:<input name="sets[big_thumb_h]" type="text" size="2" value="<?php echo ($Anorm['big_thumb_h'])?$Anorm['big_thumb_h']:180;?>" />
		<br/>
		<span style="font-weight:bold">小缩图尺寸:</span>
		宽:<input name="sets[min_thumb_w]" type="text" size="2" value="<?php echo $Anorm['min_thumb_w']?$Anorm['min_thumb_w']:90;?>" />
		高:<input name="sets[min_thumb_h]" type="text" size="2" value="<?php echo $Anorm['min_thumb_h']?$Anorm['min_thumb_h']:68;?>" />
		<br/><br/>
 
 		<span style="font-weight:bold">网站静态:</span>
		<?PHP
		 $temChecked1 = ($Anorm['rewrite'])?'CHECKED':'';
		 $temChecked0 = ($Anorm['rewrite'])?'':'CHECKED';
		?>
		是<INPUT TYPE="radio" NAME="sets[rewrite]" value="1" <?php echo $temChecked1;?>>
		否<INPUT TYPE="radio" NAME="sets[rewrite]" value="0" <?php echo $temChecked0;?>>
		<span style="color:#ccc">如果开启网站伪静态，需要Apache 服务器下开启 Rewrite 模块，才能使用。</span>
		<br/> 
 		<span style="font-weight:bold">自定义模版:</span>
		<?PHP
		 $temChecked1 = ($Anorm['user_template'])?'CHECKED':'';
		 $temChecked0 = ($Anorm['user_template'])?'':'CHECKED';
		?>
		是<INPUT TYPE="radio" NAME="user_template" value="1" <?php echo $temChecked1;?>>
		否<INPUT TYPE="radio" NAME="user_template" value="0" <?php echo $temChecked0;?>>
		<span style="color:#ccc">启用自定义模版后，能在<A HREF="template_edit.php">模版管理->自定义模版</A>修改网站首页</span>
		<br/><br/>
		<span style="font-weight:bold">用户留言:</span>
		<?PHP
		 $temChecked1 = ($Anorm['support'])?'CHECKED':'';
		 $temChecked0 = ($Anorm['support'])?'':'CHECKED';
		?>
		是<INPUT TYPE="radio" NAME="sets[support]" value="1" <?php echo $temChecked1;?>>
		否<INPUT TYPE="radio" NAME="sets[support]" value="0" <?php echo $temChecked0;?>>
		<span style="color:#ccc">留言审核后才显示</span>
 
        <br/>
		<span style="font-weight:bold">友情链接:</span>
		<?PHP
		 $temChecked1 = ($Anorm['links'])?'CHECKED':'';
		 $temChecked0 = ($Anorm['links'])?'':'CHECKED';
		?>
		是<INPUT TYPE="radio" NAME="sets[links]" value="1" <?php echo $temChecked1;?>>
		否<INPUT TYPE="radio" NAME="sets[links]" value="0" <?php echo $temChecked0;?>>
		<span style="color:#ccc">友情链接审核后才显示</span>
	
		<br/><br/>
		<span style="font-weight:bold">TITLE:</span>
		<input name="sets[title]" type="text" size="52" value="<?php echo !empty($Anorm['title'])?$Anorm['title']:'';?>"/>
		<br/>
		<span style="font-weight:bold">SEO搜索关键词:</span>
		<input name="sets[keywords]" type="text" size="52" value="<?php echo $Anorm['keywords'];?>"/>
		<br/>
		<span style="font-weight:bold">SEO描述:</span>
		<br/>
		<TEXTAREA NAME="sets[description]" style="width:500;height:30px"><?php echo $Anorm['description'];?></TEXTAREA>

		<br/><br/>

		<span style="font-weight:bold;margin-left:25px">邮编:</span>
		<input name="sets[zip]" type="text" size="6" value="<?php echo $Anorm['zip'];?>" />
        <span style="font-weight:bold">城市选择：</span> 
        <?php echo $Acitycat["citycatOpt0"];?>
		<span id="divccid_1"><?php echo $Acitycat["citycatOpt1"];?></span><span id="divccid_2"><?php echo $Acitycat["citycatOpt2"];?></span><span id="divccid_3"><?php echo $Acitycat["citycatOpt3"];?></span><span id="divccid_4"><?php echo $Acitycat["citycatOpt4"];?></span><span id="divccid_5"><?php echo $Acitycat["citycatOpt5"];?></span> 
		<A HREF="http://www.<?php echo $Aconf['mail_url'].'/'.$SUBPATH;?>support.php" target="_blank">建议增加地区城市>></A> 
		
		<br/> 
		<span style="font-weight:bold">详细地址:</span>
        <input name="sets[address]" type="text" size="52" value="<?php echo $Anorm['address'];?>" />
		<br/><br/>		

        <span style="font-weight:bold">单位名:</span>
		<input name="sets[shop_name]" type="text" size="30" value="<?php echo $Anorm['shop_name'];?>" />
		<?php echo $Ainducat["inducatOpt0"];?> 
		<span id="divinducatid_1"><?php echo $Ainducat["inducatOpt1"];?></span><span id="divinducatid_2"><?php echo $Ainducat["inducatOpt2"];?></span><span id="divinducatid_3"><?php echo $Ainducat["inducatOpt3"];?></span><span id="divinducatid_4"><?php echo $Ainducat["inducatOpt4"];?></span><span id="divinducatid_5"><?php echo $Ainducat["inducatOpt5"];?></span>
        <A HREF="http://www.<?php echo $Aconf['mail_url'].'/'.$SUBPATH;?>support.php" target="_blank">建议增加行业分类>></A> 
		<br/>
		<span style="font-weight:bold">联系人:</span>
		<input name="sets[contact]" type="text" size="8" value="<?php echo $Anorm['contact'];?>" /><span style="color:#F00">*</span>

		<span style="font-weight:bold">电话:</span>
		<input name="sets[phone]" type="text" size="16" value="<?php echo $Anorm['phone'];?>" />

		<span style="font-weight:bold">传真:</span>
        <input name="sets[fax]" type="text" size="16" value="<?php echo $Anorm['fax'];?>" />
		<span style="font-weight:bold">手机:</span>
		<input name="sets[tel]" type="text" size="16" value="<?php echo $Anorm['tel'];?>" />

		<br/>	

		<span style="font-weight:bold">Email:</span>
          <input name="sets[email]" type="text" size="20" value="<?php echo $Anorm['email'];?>" />
		<span style="font-weight:bold">MSN:</span>
         <input name="sets[msn]" type="text" size="20" value="<?php echo $Anorm['msn'];?>" />
		<span style="font-weight:bold">QQ:</span>
		<input name="sets[qq]" type="text" size="20" value="<?php echo $Anorm['qq'];?>" />
		<br/><br/>
		<span style="font-weight:bold" >版权提示:</span>
		<input name="sets[footer_title]" type="text" size="40" value="<?php echo $Anorm['footer_title'];?>" />
		<span style="font-weight:bold">ICP:</span>
		<input name="sets[icp]" type="text" size="30" value="<?php echo $Anorm['icp'];?>" />
		<br/>
		<input type="hidden" name="action" value="<?php echo ($Anorm['scid'])?'edit':'add';?>" />
        <input type="submit" name="Submit" value="<?php echo ($Anorm['scid'])?'网站基本资料编辑修改':'网站基本资料增加';?>" style="margin:10px 0 0 40px;background-color:#FFCC00"/>
		<input type="hidden" name="scid" value="<?php echo ($Anorm['scid'])?$Anorm['scid']:'0';?>" /> 
	  </div>
	 </form>
    </TD> 
  </TR>	 
</TABLE>

<SCRIPT src="../js/ajax.js" type="text/javascript"></SCRIPT> 
<?php echo $spt;?>
<?php
include_once( "footer.php");
?>