<?php
include("../includes/db.inc.php");
include("../includes/config.php");
$msql=new SHARP_SQL;
$fsql=new SHARP_SQL;
if(!isset($ADMINSTAR) || $ADMINSTAR=="" || $ADMINSTAR=="deleted"){
sendback('對不起，您尚未登錄');
}else{
if($ADMINSTAR<3){
sendback("沒有權限");
}
}



?>
<?php
if($cc=="修改設置"){
if($ADMINSTAR<4){
sendback("只有系統管理員才可以修改設置");
}
$fd=fopen("../includes/config.php","r");
$con = fread($fd,2000);
fclose($fd);
$con=str_replace($baseurl,$newbaseurl,$con);
$con=str_replace($owner,$newowner,$con);
$con=str_replace($owneremail,$newowneremail,$con);
$con=str_replace($ownerurl,$newownerurl,$con);

$fp=fopen("../includes/config.php","w");
fwrite($fp,$con,2000);
fclose($fp);
$baseurl=$newbaseurl;
$owner=$newowner;
$owneremail=$newowneremail;
$ownerurl=$newownerurl;
}
?>
<?php
if($cc=="修改協議"){
if($ADMINSTAR<4){
sendback("只有系統管理員才可以修改協議");
}
$fd=fopen("../includes/items.txt","r");
$con = fread($fd,10000);
fclose($fd);
$con=str_replace($con,$items,$con);
$fp=fopen("../includes/items.txt","w");
fwrite($fp,$con,10000);
fclose($fp);

}
?>
<?php
if($cc=="送出修改"){
if($ADMINSTAR<4){
sendback("只有系統管理員才可以送出修改");
}
$fd=fopen("../includes/hezuo.txt","r");
$con = fread($fd,10000);
fclose($fd);
$con=str_replace($con,$hezuo,$con);
$fp=fopen("../includes/hezuo.txt","w");
fwrite($fp,$con,10000);
fclose($fp);

}
?>
<?php
if($cc=="修改規則"){
if($ADMINSTAR<4){
sendback("只有系統管理員才可以送出修改");
}
$fd=fopen("../includes/guize.txt","r");
$con = fread($fd,10000);
fclose($fd);
$con=str_replace($con,$guize,$con);
$fp=fopen("../includes/guize.txt","w");
fwrite($fp,$con,10000);
fclose($fp);

}
?>
<HTML><HEAD><TITLE></TITLE>
<META content="text/html; charset=big5" http-equiv=Content-Type>
<STYLE>HTML {
	TEXT-DECORATION: none
}
A:link {
	COLOR: #000000; TEXT-DECORATION: none
}
A:hover {
	COLOR: rgb(0,147,43); TEXT-DECORATION: underline
}
EM {
	FONT-FAMILY: CourierNew; FONT-SIZE: 16pt; FONT-STYLE: normal
}
A {
	FONT-SIZE: 9pt
}
TD {
	FONT-SIZE: 9pt
}
P {
	FONT-SIZE: 9pt
}
</STYLE>

<META content="MSHTML 5.00.2614.3500" name=GENERATOR></HEAD>
<BODY aLink=#000000 bgColor=#FFFFFF leftMargin=0 link=#000000 topMargin=0 
vLink=#000000 marginwidth="0" marginheight="0">

<form method="post" action="">
  <br>
  <table width="80%" border="0" cellspacing="1" cellpadding="4" align="center" bgcolor="#000000">
    <tr bgcolor="#FFFFFF"> 
      <td height="4" width="29%" bgcolor="#EAEAEA"> 
        <div align="right">系統安裝路徑：</div>
      </td>
      <td height="4" width="71%"> 
        <input type="text" name="newbaseurl" value="<?php echo "$baseurl"; ?>" size="40">
      </td>
    </tr>
    <tr bgcolor="#FFFFFF"> 
      <td width="29%" bgcolor="#EAEAEA"> 
        <div align="right">系統名稱：</div>
      </td>
      <td width="71%">
        <input type="text" name="newowner" value="<?php echo "$owner"; ?>" size="40">
      </td>
    </tr>
    <tr bgcolor="#FFFFFF"> 
      <td width="29%" bgcolor="#EAEAEA"> 
        <div align="right">業務聯絡郵件：</div>
      </td>
      <td width="71%">
        <input type="text" name="newowneremail" value="<?php echo "$owneremail"; ?>" size="40">
      </td>
    </tr>
    <tr bgcolor="#FFFFFF"> 
      <td width="29%" bgcolor="#EAEAEA"> 
        <div align="right">主站網址：</div>
      </td>
      <td width="71%">
        <input type="text" name="newownerurl" value="<?php echo "$ownerurl"; ?>" size="40">
      </td>
    </tr>
    <tr bgcolor="#FFFFFF"> 
      <td width="29%" bgcolor="#EAEAEA"> 
        <div align="right"></div>
      </td>
      <td width="71%">
        <input type="submit" name="cc" value="修改設置">
      </td>
    </tr>
  </table>
</form>
<form method="post" action="">
  <br>
  <table width="80%" border="0" cellspacing="1" cellpadding="4" align="center" bgcolor="#000000">
    <tr bgcolor="#E8E8E8"> 
      <td height="28" width="71%"> 
        <div align="center">新建網站註冊協議修改</div>
      </td>
    </tr>
    <tr bgcolor="#FFFFFF"> 
      <td width="71%"> 
        <textarea name="items" cols="100%" rows="15"><?php include("../includes/items.txt"); ?></textarea>
      </td>
    </tr>
    <tr bgcolor="#FFFFFF">
      <td width="71%">
        <div align="center">
          <input type="submit" name="cc" value="修改協議">
        </div>
      </td>
    </tr>
  </table>
</form>
<form method="post" action="">
  <br>
  <table width="80%" border="0" cellspacing="1" cellpadding="4" align="center" bgcolor="#000000">
    <tr bgcolor="#E8E8E8"> 
      <td height="28" width="71%"> 
        <div align="center">誠徵代理文章修改</div>
      </td>
    </tr>
    <tr bgcolor="#FFFFFF"> 
      <td width="71%"> 
        <textarea name="hezuo" cols="100%" rows="15"><?php include("../includes/hezuo.txt"); ?></textarea>
      </td>
    </tr>
    <tr bgcolor="#FFFFFF"> 
      <td width="71%"> 
        <div align="center"> 
          <input type="submit" name="cc" value="送出修改">
        </div>
      </td>
    </tr>
  </table>
</form>
<form method="post" action="">
  <br>
  <table width="80%" border="0" cellspacing="1" cellpadding="4" align="center" bgcolor="#000000">
    <tr bgcolor="#E8E8E8"> 
      <td height="28" width="71%"> 
        <div align="center">代理結算規則修改</div>
      </td>
    </tr>
    <tr bgcolor="#FFFFFF"> 
      <td width="71%"> 
        <textarea name="guize" cols="100%" rows="15"><?php include("../includes/guize.txt"); ?></textarea>
      </td>
    </tr>
    <tr bgcolor="#FFFFFF"> 
      <td width="71%"> 
        <div align="center"> 
          <input type="submit" name="cc" value="修改規則">
        </div>
      </td>
    </tr>
  </table>
</form>
<p>&nbsp;</p>
</BODY></HTML>
