<?php
/**
 * @version        Somao_Search X1.0 9:23 2012-1-1 Somao $
 * @package        Somao_Search.Site
 * @copyright      Copyright (c) 2009 - 2012, Somao, Inc.
 * @license        http://www.somao123.com/
 * @link           http://www.somao.cc/
 */
require "global.php";
CheckPurview('admin_sys',$authoritys,$rank);
$action=$_GET["action"];
switch ($action)
{
case "saveconfig":
saveconfig();
break;
}
$rs=$db->get_one("select * from ve123_sysconfig");
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gbk">
<meta http-equiv="x-ua-compatible" content="ie=7" />
<link href="css/admincp.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div class="container">
  <div class="floattop">
    <div class="itemtitle"><h3>系统配置</h3>
      <ul class="tab1" id="submenu">
        <li id="two1" onclick="setTaball('two',1,6)" class="current"><a href="#"><span>基本设置</span></a></li>
        <li id="two6" onclick="setTab('two',6,6)"><a href="#"><span>蜘蛛参数</span></a></li>
        <li id="two4" onclick="setTab('two',4,6)"><a href="#"><span>推广设置</span></a></li>
        <li id="two2" onclick="setTab('two',2,6)"><a href="#"><span>UC设置</span></a></li>
        <li id="two3" onclick="setTab('two',3,6)"><a href="#"><span>支付宝设置</span></a></li>
        <li id="two5" onclick="setTab('two',5,6)"><a href="#"><span>SPHINX设置</span></a></li>
      </ul>
     </div>
    </div>
    <div class="floattopempty"></div>
<form id="configform" name="configform" method="post" action="?action=saveconfig">



<table class="tb tb2 nobdb" id="con_two_1">
  <tr>
    <td colspan="2" class="td27" s="1">网站地址:</td>
  </tr>
  <tr class="noborder">
    <td class="vtop rowform"><input name="url" type="text" class="txt" value="<?php echo $rs["url"]?>" /></td>
    <td class="vtop tips2" s="1"></td>
  </tr>
  <tr>
    <td colspan="2" class="td27" s="1">网站名称:</td>
  </tr>
  <tr class="noborder">
    <td class="vtop rowform"><input name="name" type="text" class="txt" value="<?php echo $rs["name"]?>" /></td>
    <td class="vtop tips2" s="1">建议不要设置太长</td>
  </tr>
    <tr>
    <td colspan="2" class="td27" s="1">Keywords:</td>
  </tr>
  <tr class="noborder">
    <td class="vtop rowform"><input name="Keywords" type="text" class="txt" value="<?php echo $rs["Keywords"]?>" /></td>
    <td class="vtop tips2" s="1"></td>
  </tr>
  <tr>
    <td colspan="2" class="td27" s="1">description:</td>
  </tr>
  
  <tr class="noborder">
    <td class="vtop rowform"><textarea name="description" cols="50" rows="5"><?php echo $rs["description"];?></textarea></td>
    <td class="vtop tips2" s="1"></td>
  </tr>
  <tr>
    <td colspan="2" class="td27" s="1">搜索页顶部标题:</td>
  </tr>
  <tr class="noborder">
    <td class="vtop rowform"><input name="adtitle" type="text" class="txt" value="<?php echo $rs["adtitle"]?>" /></td>
    <td class="vtop tips2" s="1"></td>
  </tr>
  <tr>
    <td colspan="2" class="td27" s="1">ICP备案:</td>
  </tr>
  <tr class="noborder">
    <td class="vtop rowform"><input name="icp" type="text" class="txt" value="<?php echo $rs["icp"]?>" /></td>
    <td class="vtop tips2" s="1">备案号</td>
  </tr>
  <tr>
    <td colspan="2" class="td27" s="1">联系电话:</td>
  </tr>
  <tr class="noborder">
    <td class="vtop rowform"><input name="telephone" type="text" class="txt" value="<?php echo $rs["telephone"]?>" /></td>
    <td class="vtop tips2" s="1">建议填写</td>
  </tr>
  <tr>
    <td colspan="2" class="td27" s="1">QQ:</td>
  </tr>
  <tr class="noborder">
    <td class="vtop rowform"><input name="QQ" type="text" class="txt" value="<?php echo $rs["QQ"]?>" /></td>
    <td class="vtop tips2" s="1">建议填写</td>
  </tr>

  <tr>
    <td colspan="2" class="td27" s="1">热门关键字:</td>
  </tr>
  <tr class="noborder">
    <td class="vtop rowform"><input name="hot_words" type="text" class="txt" value="<?php echo $rs["hot_words"]?>" /></td>
    <td class="vtop tips2" s="1">提示：词与词关请以&quot;,&quot;号隔开</td>
  </tr>

 
  <tr>
    <td colspan="2" class="td27" s="1">网站统计代码:</td>
  </tr>
  <tr class="noborder">
    <td class="vtop rowform"><textarea name="statcode" cols="50" rows="5"><?php echo $rs["statcode"];?></textarea></td>
    <td class="vtop tips2" s="1">提示：词与词关请以 | 号隔开</td>
  </tr>
  <tr>
    <td colspan="2" class="td27" s="1">网站版权:</td>
  </tr>
  <tr class="noborder">
    <td class="vtop rowform"><textarea name="copyright" cols="50" rows="5"><?php echo $rs["copyright"];?></textarea></td>
    <td class="vtop tips2" s="1">提示：词与词关请以 | 号隔开</td>
  </tr>
</table>

<table class="tb tb2 nobdb" style="display:none"  id="con_two_6" >
  <tr>
    <td colspan="2" class="td27" s="1">蜘蛛名称:</td>
  </tr>
  <tr class="noborder">
    <td class="vtop rowform"><input name="user_agent" type="text" class="txt" value="<?php echo $rs["user_agent"]?>" /></td>
    <td class="vtop tips2" s="1">建议不要设置太长</td>
  </tr>
   <tr>
    <td colspan="2" class="td27" s="1">关键词过滤:</td>
  </tr>
  <tr class="noborder">
    <td class="vtop rowform"><textarea name="filter_word" cols="50" rows="5"><?php echo $rs["filter_word"];?></textarea></td>
    <td class="vtop tips2" s="1">提示：词与词关请以 | 号隔开</td>
  </tr>
   <tr>
    <td colspan="2" class="td27" s="1">是否马上收录:</td>
  </tr>
  <tr class="noborder">
    <td class="vtop rowform"><input name="is_tijiao_shoulu" type="checkbox" value="1" <?php if($rs["is_tijiao_shoulu"]){echo "checked=\"checked\"";}?> /></td>
    <td class="vtop tips2" s="1">网友提交登录入口后是否马上收录网页</td>
  </tr>
  
  <tr>
    <td colspan="2" class="td27" s="1">蜘蛛默认收录深度:</td>
  </tr>
  <tr class="noborder">
    <td class="vtop rowform"><input name="spider_depth" type="text" class="txt" value="<?php echo $rs["spider_depth"]?>" /></td>
    <td class="vtop tips2" s="1">0表示只收首页,1表示收首页上的网页,2,3,4,以此类推</td>
  </tr>
  <tr>
    <td colspan="2" class="td27" s="1">快照是否保存到服务器:</td>
  </tr>
  <tr class="noborder">
    <td class="vtop rowform"><input name="kz_seve" type="checkbox" value="1" <?php if($rs["kz_seve"]){echo "checked=\"checked\"";}?> /></td>
    <td class="vtop tips2" s="1">保存到服务器会加大服务器容量</td>
  </tr>
  
</table>

<table class="tb tb2 nobdb" style="display:none"  id="con_two_2">
  <tr>
    <td colspan="2" class="td27" s="1">UC开关:</td>
  </tr>
  <tr class="noborder">
    <td class="vtop rowform"><input type="radio" name="uc_off"  value="1" <?php if($rs["uc_off"]==1) echo 'checked="checked"';?>/>开启 <input type="radio" name="uc_off" value="0" <?php if($rs["uc_off"]==0) echo 'checked="checked"';?>/>关闭</td>
    <td class="vtop tips2" s="1"></td>
  </tr>
  
  <tr>
    <td colspan="2" class="td27" s="1">服务端地址:</td>
  </tr>
  <tr class="noborder">
    <td class="vtop rowform"><input name="ucapi" type="text" class="txt" value="<?php echo $rs["ucapi"]?>" /></td>
    <td class="vtop tips2" s="1">在您 UCenter   地址或者目录改变的情况下，修改此项，一般情况请不要改动 例如: http://www.site.com/uc_server (最后不要加'/')。</td>
  </tr>
  <tr>
    <td colspan="2" class="td27" s="1">服务端 IP:</td>
  </tr>
  <tr class="noborder">
    <td class="vtop rowform"><input name="ucip" type="text" class="txt" value="<?php echo $rs["ucip"]?>" /></td>
    <td class="vtop tips2" s="1">正常情况下留空即可。如果由于域名解析问题导致 UCenter 与该应用通信失败，请尝试设置为该应用所在服务器的 IP 地址。</td>
  </tr>
  <tr>
    <td colspan="2" class="td27" s="1">通信密钥:</td>
  </tr>
  <tr class="noborder">
    <td class="vtop rowform"><input name="authkey" type="text" class="txt" value="<?php echo $rs["authkey"]?>" /></td>
    <td class="vtop tips2" s="1">只允许使用英文字母及数字，限 64 字节。应用端的通信密钥必须与此设置保持一致，否则该应用将无法与 UCenter 正常通信。</td>
  </tr>
  <tr>
    <td colspan="2" class="td27" s="1">连接方式:</td>
  </tr>
  <tr class="noborder">
    <td class="vtop rowform">
         <select name="connect" onChange="if(this.value==''){document.getElementById('ucmysql').style.display = 'none';}else{document.getElementById('ucmysql').style.display = '';}">
			<option value="mysql" selected="selected"> 数据库方式(MySQL) </option>
        </select></td>
    <td class="vtop tips2" s="1">请根据您的服务器网络环境选择适当的连接方式。</td>
  </tr>
  <tr>
    <td colspan="2" class="td27" s="1">数据库服务器:</td>
  </tr>
  <tr class="noborder">
    <td class="vtop rowform"><input name="dbhost" type="text" class="txt" value="<?php echo $rs["dbhost"]?>" /></td>
    <td class="vtop tips2" s="1">默认:localhost, 如果 MySQL 端口不是默认的 3306，请填写如下形式：127.0.0.1:6033。</td>
  </tr>
  
  <tr>
    <td colspan="2" class="td27" s="1">数据库用户名:</td>
  </tr>
  <tr class="noborder">
    <td class="vtop rowform"><input name="dbuser" type="text" class="txt" value="<?php echo $rs["dbuser"]?>" /></td>
    <td class="vtop tips2" s="1">登录uc服务端的数据库用户名。</td>
  </tr>
  
  <tr>
    <td colspan="2" class="td27" s="1">数据库密码:</td>
  </tr>
  <tr class="noborder">
    <td class="vtop rowform"><input name="passwd" type="text" class="txt" value="<?php echo $rs["passwd"]?>" /></td>
    <td class="vtop tips2" s="1">登录uc服务端数据库使用的密码。</td>
  </tr>
  
  <tr>
    <td colspan="2" class="td27" s="1">数据库名:</td>
  </tr>
  <tr class="noborder">
    <td class="vtop rowform"><input name="dbname" type="text" class="txt" value="<?php echo $rs["dbname"]?>" /></td>
    <td class="vtop tips2" s="1">登录uc服务端的数据库名称</td>
  </tr>
  <tr>
    <td colspan="2" class="td27" s="1">数据库表前缀:</td>
  </tr>
  <tr class="noborder">
    <td class="vtop rowform"><input name="dbtablepre" type="text" class="txt" value="<?php echo $rs["dbtablepre"]?>" /></td>
    <td class="vtop tips2" s="1">uc服务端使用的数据库表前缀,一不般为 uc_ 。</td>
  </tr>
</table>


<table class="tb tb2 nobdb" style="display:none"  id="con_two_3" >
  <tr>
    <td colspan="2" class="td27" s="1">支付宝用户账号:</td>
  </tr>
  <tr class="noborder">
    <td class="vtop rowform"><input name="alipay_account" type="text" class="txt" value="<?php echo $rs["alipay_account"]?>" /></td>
    <td class="vtop tips2" s="1">支付宝登录E-MAIL.</td>
  </tr>
  <tr>
    <td colspan="2" class="td27" s="1">交易安全校验码:</td>
  </tr>
  <tr class="noborder">
    <td class="vtop rowform"><input name="alipay_key" type="text" class="txt" value="<?php echo $rs["alipay_key"]?>" /></td>
    <td class="vtop tips2" s="1"></td>
  </tr>
  <tr>
    <td colspan="2" class="td27" s="1">合作者身份ID:</td>
  </tr>
  <tr class="noborder">
    <td class="vtop rowform"><input name="alipay_partner" type="text" class="txt" value="<?php echo $rs["alipay_partner"]?>" /></td>
    <td class="vtop tips2" s="1"></td>
  </tr>
  <tr>
    <td colspan="2" class="td27" s="1">在线充值比例:</td>
  </tr>
  <tr class="noborder">
    <td class="vtop rowform"><input name="alipay_propor" type="text" class="txt" value="<?php echo $rs["alipay_propor"]?>" /></td>
    <td class="vtop tips2" s="1">请填写整数。</td>
  </tr>
</table>
 
 <table class="tb tb2 nobdb" style="display:none"  id="con_two_4" >
  <tr>
    <td colspan="2" class="td27" s="1">开放平台月费用:</td>
  </tr>
  <tr class="noborder">
    <td class="vtop rowform"><input name="open_point" type="text" class="txt" value="<?php echo $rs["open_point"]?>" /></td>
    <td class="vtop tips2" s="1">请填写整数。</td>
  </tr>
  <tr>
    <td colspan="2" class="td27" s="1">右侧推广月费用:</td>
  </tr>
  <tr class="noborder">
    <td class="vtop rowform"><input name="adright_point" type="text" class="txt" value="<?php echo $rs["adright_point"]?>" /></td>
    <td class="vtop tips2" s="1">请填写整数。</td>
  </tr>
  <tr>
    <td colspan="2" class="td27" s="1">关键词最低起价:</td>
  </tr>
  <tr class="noborder">
    <td class="vtop rowform"><input name="default_point" type="text" class="txt" value="<?php echo $rs["default_point"]?>" /></td>
    <td class="vtop tips2" s="1">请填写整数。</td>
  </tr>
  <tr>
    <td colspan="2" class="td27" s="1">会员注册赠送积分:</td>
  </tr>
  <tr class="noborder">
    <td class="vtop rowform"><input name="zs_points" type="text" class="txt" value="<?php echo $rs["zs_points"]?>" /></td>
    <td class="vtop tips2" s="1">请填写整数。</td>
  </tr>
  <tr>
    <td colspan="2" class="td27" s="1">联盟贡献比例:</td>
  </tr>
  <tr class="noborder">
    <td class="vtop rowform"><input name="union" type="text" class="txt" value="<?php echo $rs["union"]?>" /></td>
    <td class="vtop tips2" s="1">填写为整数比例</td>
  </tr>
 </table>
 
 <table class="tb tb2 nobdb" style="display:none"  id="con_two_5" >
  <tr>
    <td colspan="2" class="td27" s="1">sphinx服务器:</td>
  </tr>
  <tr class="noborder">
    <td class="vtop rowform"><input type="radio" name="sphinx_article"  value="1" <?php if($rs["sphinx_article"]==1) echo 'checked="checked"';?>/>开启 <input type="radio" name="sphinx_article" value="0" <?php if($rs["sphinx_article"]==0) echo 'checked="checked"';?>/>关闭</td>
    <td class="vtop tips2" s="1">是否启用文章全文检索功能（需配置sphinx服务器）</td>
  </tr>
  <tr>
    <td colspan="2" class="td27" s="1">Sphinx服务器主机地址:</td>
  </tr>
  <tr class="noborder">
    <td class="vtop rowform"><input name="sphinx_host" type="text" class="txt" value="<?php echo $rs["sphinx_host"]?>" /></td>
    <td class="vtop tips2" s="1"></td>
  </tr>
  <tr>
    <td colspan="2" class="td27" s="1">Sphinx服务器端口号:</td>
  </tr>
  <tr class="noborder">
    <td class="vtop rowform"><input name="sphinx_port" type="text" class="txt" value="<?php echo $rs["sphinx_port"]?>" /></td>
    <td class="vtop tips2" s="1">请填写整数。</td>
  </tr>

 </table>

<table class="tb tb2 ">
   <tr><td colspan="15">  <div class="fixsel"><input type="submit" class="btn"  name="settingsubmit" value="提交" /></div></td>
   </tr>
</table>
</form>

</div>
</body>
</html>
<?php
function saveconfig()
{
global $db;
$uc_off=$_POST["uc_off"];
$ucapi=$_POST["ucapi"];
$ucip=$_POST["ucip"];
$authkey=$_POST["authkey"];
$connect=$_POST["connect"];
$dbhost=$_POST["dbhost"];
$dbuser=$_POST["dbuser"];
$passwd=$_POST["passwd"];
$dbname=$_POST["dbname"];
$dbtablepre=$_POST["dbtablepre"];

$alipay_account=$_POST["alipay_account"];
$alipay_key=$_POST["alipay_key"];
$alipay_partner=$_POST["alipay_partner"];
$alipay_propor=$_POST["alipay_propor"];

$open_point=intval($_POST["open_point"]);
$adright_point=intval($_POST["adright_point"]);
$default_point=intval($_POST["default_point"]);
$zs_points=intval($_POST["zs_points"]);
$getpoints=my_addslashes($_POST["getpoints"]);

$name=HtmlReplace($_POST["name"]);
$user_agent=HtmlReplace($_POST["user_agent"]);
$adtitle=$_POST["adtitle"];
$copyright=$_POST["copyright"];
$icp=HtmlReplace($_POST["icp"]);
$url=HtmlReplace($_POST["url"]);
$status_content=HtmlReplace($_POST["status_content"]);
$statcode=$_POST["statcode"];
$Keywords=HtmlReplace($_POST["Keywords"]);
$description=$_POST["description"];
$telephone=$_POST["telephone"];
$qq=$_POST["qq"];
$union=intval($_POST["union"]);
$hot_words=HtmlReplace($_POST["hot_words"]);

$spider_depth=intval($_POST["spider_depth"]);
$is_tijiao_shoulu=intval($_POST["is_tijiao_shoulu"]);
$kz_seve=intval($_POST["kz_seve"]);
$filter_word=$_POST["filter_word"];
$sphinx_article=$_POST["sphinx_article"];
$sphinx_host=$_POST["sphinx_host"];
$sphinx_port=intval($_POST["sphinx_port"]);

$array=array('name'=>$name,'user_agent'=>$user_agent,'adtitle'=>$adtitle,'copyright'=>$copyright,'icp'=>$icp,'statcode'=>$statcode,'url'=>$url,'status_content'=>$status_content,'Keywords'=>$Keywords,'description'=>$description,'telephone'=>$telephone,'qq'=>$qq,'is_tijiao_shoulu'=>$is_tijiao_shoulu,'kz_seve'=>$kz_seve,'spider_depth'=>$spider_depth,'filter_word'=>$filter_word,'union'=>$union,'hot_words'=>$hot_words,'uc_off'=>$uc_off,'ucapi'=>$ucapi,'ucip'=>$ucip,'authkey'=>$authkey,'connect'=>$connect,'dbhost'=>$dbhost,'dbuser'=>$dbuser,'passwd'=>$passwd,'dbname'=>$dbname,'dbtablepre'=>$dbtablepre,'alipay_account'=>$alipay_account,'alipay_key'=>$alipay_key,'alipay_partner'=>$alipay_partner,'alipay_propor'=>$alipay_propor,'default_point'=>$default_point,'getpoints'=>$getpoints,'zs_points'=>$zs_points,'sphinx_article'=>$sphinx_article,'sphinx_host'=>$sphinx_host,'sphinx_port'=>$sphinx_port,'open_point'=>$open_point,'adright_point'=>$adright_point);

$db->update("ve123_sysconfig",$array,"config_id='1'");
$config=$db->get_one("select * from ve123_sysconfig limit 1");
$str.="<?php".chr(13).chr(10);
$str.="\$config['name']=\"".$name."\";".chr(13).chr(10);
$str.="\$config['user_agent']=\"".$user_agent."\";".chr(13).chr(10);
$str.="\$config['adtitle']=\"".$adtitle."\";".chr(13).chr(10);
$str.="\$config['copyright']=\"".$copyright."\";".chr(13).chr(10);
$str.="\$config['icp']=\"".$icp."\";".chr(13).chr(10);
$str.="\$config['url']=\"".$url."\";".chr(13).chr(10);
$str.="\$config['status_content']=\"".$status_content."\";".chr(13).chr(10);
$str.="\$config['statcode']=\"".addslashes($statcode)."\";".chr(13).chr(10);
$str.="\$config['Keywords']=\"".$Keywords."\";".chr(13).chr(10);
$str.="\$config['description']=\"".$description."\";".chr(13).chr(10);
$str.="\$config['telephone']=\"".$telephone."\";".chr(13).chr(10);
$str.="\$config['qq']=\"".$qq."\";".chr(13).chr(10);
$str.="\$config['is_tijiao_shoulu']=\"".$is_tijiao_shoulu."\";".chr(13).chr(10);
$str.="\$config['kz_seve']=\"".$kz_seve."\";".chr(13).chr(10);

$str.="\$config['spider_depth']=".$spider_depth.";".chr(13).chr(10);
$str.="\$config['author']=\"".$config["author"]."\";".chr(13).chr(10);
$str.="\$config['copyright']=\"".$copyright."\";".chr(13).chr(10);
$str.="\$config['union']=\"".$union."\";".chr(13).chr(10);
$str.="\$config['hot_words']=\"".$hot_words."\";".chr(13).chr(10);
$str.="\$config['filter_word']=\"".$filter_word."\";".chr(13).chr(10);

$str.="\$config['alipay_account']=\"".$alipay_account."\";".chr(13).chr(10);
$str.="\$config['alipay_key']=\"".$alipay_key."\";".chr(13).chr(10);
$str.="\$config['alipay_partner']=\"".$alipay_partner."\";".chr(13).chr(10);

$str.="\$config['alipay_propor']=\"".$alipay_propor."\";".chr(13).chr(10);

$str.="\$config['open_point']=".$open_point.";".chr(13).chr(10);
$str.="\$config['adright_point']=".$adright_point.";".chr(13).chr(10);
$str.="\$config['default_point']=".$default_point.";".chr(13).chr(10);
$str.="\$config['zs_points']=".$zs_points.";".chr(13).chr(10);
$str.="\$config['getpoints']=\"".$getpoints."\";".chr(13).chr(10);

$str.="\$config['sphinx_article']=\"".$sphinx_article."\";".chr(13).chr(10);
$str.="\$config['sphinx_host']=\"".$sphinx_host."\";".chr(13).chr(10);
$str.="\$config['sphinx_port']=\"".$sphinx_port."\";".chr(13).chr(10);

//配置uc
$str.="define('UC_OFF', '$uc_off');".chr(13).chr(10);
$str.="define('UC_CONNECT', '$connect');".chr(13).chr(10);
$str.="define('UC_DBHOST', '$dbhost');".chr(13).chr(10);
$str.="define('UC_DBUSER', '$dbuser');".chr(13).chr(10);
$str.="define('UC_DBPW', '$passwd');".chr(13).chr(10);
$str.="define('UC_DBNAME', '$dbname');".chr(13).chr(10);
$str.="define('UC_DBCHARSET', 'gbk');".chr(13).chr(10);
$str.="define('UC_DBTABLEPRE', '`$dbname`.uc_');".chr(13).chr(10);
$str.="define('UC_DBCONNECT', '0');".chr(13).chr(10);
$str.="define('UC_KEY', '$authkey');".chr(13).chr(10);
$str.="define('UC_API', '$ucapi');".chr(13).chr(10);
$str.="define('UC_CHARSET', 'gbk');".chr(13).chr(10);
$str.="define('UC_IP', '$ucip');".chr(13).chr(10);
$str.="define('UC_APPID', '$appid');".chr(13).chr(10);
$str.="define('UC_PPP', '20');".chr(13).chr(10);
$str.="?>";
 $fp=@fopen("../data/site_config.php","w") or die("写方式打开文件失败，请检查程序目录是否为可写");//配置conn.php文件
 @fputs($fp,$str) or die("文件写入失败,请检查程序目录是否为可写"); 
 @fclose($fp);
jsalert ("修改成功!");
}
?>
<script type="text/javascript"> 
<!--
function setTab(name,cursel,n){
for(i=1;i<=n;i++){
var menu=document.getElementById(name+i);
var con=document.getElementById("con_"+name+"_"+i);
menu.className=i==cursel?"current":"";
con.style.display=i==cursel?"block":"none";
}
}
function setTaball(name,cursel,n){
for(i=1;i<=n;i++){
var menu2=document.getElementById(name+i);
var con2=document.getElementById("con_"+name+"_"+i);
menu2.className=i==cursel?"current":"";
con2.style.display="none";
document.getElementById("con_"+name+"_"+1).style.display="block";
}
}
//-->
</script>
