<?php
include("../includes/db.inc.php");
$msql=new SHARP_SQL;
$fsql=new SHARP_SQL;
if(!isset($ADMINSTAR)){
sendback('¹ï¤£°_¡A±z©|¥¼µn¿ý');
}else{

}



?>
<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=#999999 leftMargin=0 link=#000000 topMargin=0 
vLink=#000000 marginwidth="0" marginheight="0">
<table width="100%" border="0" bgcolor="#000000" cellpadding="2" cellspacing="1">
  <tr bgcolor="#FFCC00"> 
    <form name="form1" >
      <td width="71%"> ºô§}µù¥UºÞ²z ¡G 
        <input type="text" name="key">
        <input type="submit" name="Submit" value="·j´M">
      
    </td></form>
    <td width="29%"><?php
if($step=="del"){
if($ADMINSTAR<2){
sendback("¨S¦³Åv­­¶i¦æ¦¹¶µ¾Þ§@");
}
$msql->query("delete from auto_dns where id='$id'");
echo "¤w¸g§R°£";
}
if($step=="ok"){
if($ADMINSTAR<2){
sendback("¨S¦³Åv­­¶i¦æ¦¹¶µ¾Þ§@");
}
$msql->query("update auto_dns set pay='1',worked='1',exptime='$exptime' where id='$id'");
echo "¤w¸g½T»{";
}
if($key==""){
$msql->query("select count(id) from auto_dns");
}else{
$msql->query("select count(id) from auto_dns where dname='$key'");
}
if($msql->next_record()){
$totalnums=$msql->f('count(id)');
$totalpage=ceil($totalnums/10);
$totalgroup=ceil($totalpage/10);
}
if($page==""){
$page=1;
}



if($group==""){
$group=ceil($page/10);
}else{
$page=($group-1)*10+1;
}
$pagelimit=($page-1)*10;

if($group=="1"){
$gg1="off";
}else{
$gg1="on";
}
if($page=="1"){
$pp1="off";
}else{
$pp1="on";
}
if($page>=$totalpage){
$pp2="off";
}else{
$pp2="on";
}
if($group>=$totalgroup){
$gg2="off";
}else{
$gg2="on";
}

?></td>
  </tr>
</table>
<table width="98%" border="0" cellspacing="0" cellpadding="0" align="center">
  <tr bgcolor="#959595"> 
    <td height="12" bgcolor="#959595" width="42%"> 
      <table border=0 cellpadding=0 cellspacing=0 height="14">
        <tr> 
          <td> 
            <?php
if($gg1=="off"){
echo "<img border=0 height=14 hspace=0 src=images/2arrow_l_".$gg1.".gif width=15>";
}else{
$group1=$group-1;
echo "<a href=auto_dns.php3?ord=$ord&page=$page&group=$group1><img border=0 height=14 hspace=0 src=images/2arrow_l_".$gg1.".gif width=15></a>";
}

?>
          </td>
          <td>
            <?php
if($pp1=="off"){
echo "<img border=0 height=14 hspace=3 src=images/1arrow_l_".$pp1.".gif width=15>";
}else{
$page1=$page-1;
echo "<a href=auto_dns.php3?ord=$ord&page=$page1><img border=0 height=14 hspace=3 src=images/1arrow_l_".$pp1.".gif width=15></a>";
}

?>
          </td>
          <td height="14"><font color=#000000> <b><?php
$minpage=($group-1)*10+1;
$maxpage=$minpage+9;
if($maxpage>$totalpage){
$maxpage=$totalpage;
}
for($i=$minpage;$i<=$maxpage;$i++){
echo "|<a href=auto_dns.php3?ord=$ord&page=$i><font color=#000000>$i</font></a>";
}
echo "|";
?></b> </font></td>
          <td>
            <?php
if($pp2=="off"){
echo "<img border=0 height=14 hspace=3 src=images/1arrow_r_".$pp2.".gif width=15>";
}else{
$page2=$page+1;
echo "<a href=auto_dns.php3?ord=$ord&page=$page2><img border=0 height=14 hspace=3 src=images/1arrow_r_".$pp2.".gif width=15></a>";
}

?>
          </td>
          <td>
            <?php
if($gg2=="off"){
echo "<img border=0 height=14 hspace=0 src=images/2arrow_r_".$gg2.".gif width=15>";
}else{
$group2=$group+1;
echo "<a href=auto_dns.php3?ord=$ord&page=$page&group=$group2><img border=0 height=14 hspace=0 src=images/2arrow_r_".$gg2.".gif width=15></a>";
}
?>
          </td>
        </tr>
      </table>
    </td>
    <td height="12" width="58%" valign="middle"> 
      <div align="right"><font color="#FFFFFF">Åã¥Ü²Ä</font><font 
            color=#ffffff>
        <?php echo "$page"; ?>
        </font><font color="#FFFFFF">­¶ ¦@</font><font 
            color=#ffffff>
        <?php echo "$totalpage"; ?>
        </font><font color="#FFFFFF">­¶</font><font 
            color=#ffffff>
        <?php echo "$totalnums"; ?>
        </font><font color="#FFFFFF">±ø–R</font></div>
    </td>
  </tr>
</table>
<br>
<table width="100%" border="0" cellspacing="1" cellpadding="1" align="center">
  <tr bgcolor="#FFCC00"> 
    <td height="25" width="54"> 
      <div align="center"><font color="#000000">¥Î¤áID</font></div>
    </td>
    <td height="25" width="49"> 
      <div align="center"><font color="#000000">½s¸¹</font></div>
    </td>
    <td height="25" width="137"> 
      <div align="center"><font color="#000000">ºô§}©MÁpµ¸¤H</font></div>
    </td>
    <td height="25" width="139"> 
      <div align="center"><font color="#000000">ºô§}</font></div>
    </td>
    <td height="25" width="183"> 
      <div align="center"><font color="#000000">¤½¥q</font></div>
    </td>
    <td height="25" width="142"> 
      <div align="center"><font color="#000000">¶l¥ó¹q¸Ü</font></div>
    </td>
    <td height="25" width="87"> 
      <div align="center"><font color="#000000">ºô§}¦³®Ä´Á</font></div>
    </td>
    <td height="25" width="44"> 
      <div align="center"><font color="#000000">§R°£</font></div>
    </td>
    <td height="25" width="131"> 
      <div align="center"><font color="#000000">¼Ðª`¦³®Ä´Á</font></div>
    </td>
  </tr>
  <?php 
if($key==""){
$msql->query("select * from auto_dns order by id desc limit $pagelimit,10");
}else{
$msql->query("select * from auto_dns where dname='$key' or userid='$key' order by id desc limit $pagelimit,10");
} 
while($msql->next_record()){

$id=$msql->f('id');
$company_cn=$msql->f('company_cn');
$company_en=$msql->f('company_en');
$url=$msql->f('url');
$dname=$msql->f('dname');
$email=$msql->f('email');
$name=$msql->f('name');
$tel=$msql->f('tel');
$pay=$msql->f('pay');
$userid=$msql->f('userid');
$password=$msql->f('password');
$worked=$msql->f('worked');
$exptime=$msql->f('exptime');
?> 
  <tr bgcolor="#FFFFFF"> 
    <td width="54"> 
      <div align="center"><font color="#000000"> </font> <?php echo "$userid"; ?><font color="#000000"> 
        </font></div>
    </td>
    <td width="49"> 
      <div align="center"><font color="#000000"> <?php echo "<font color=#000000>$id</font>"; ?> 
        </font></div>
    </td>
    <td width="137"><font color="#000000"><?php echo "$dname"; ?><br>
      <?php echo "$name"; ?><br>
      </font></td>
    <td width="139"><font color="#000000"><?php echo "$url"; ?></font></td>
    <td width="183"><font color="#000000"><?php echo "$company_cn"; ?><br>
      <?php echo "$company_en"; ?></font></td>
    <td width="142"> 
      <div align="left"><font color="#000000"><?php echo "<a href=mailto:$email>$email</a>"; ?><br>
        <?php echo "$tel"; ?> </font></div>
    </td>
    <td width="87"> 
      <div align="left"><font color="#000000"><?php echo "<font color=#000000>$exptime</font>"; ?> 
        </font></div>
    </td>
    <td width="44"> 
      <div align="center"><a href='auto_dns.php3?step=del&amp;id=<?php echo "$id"; ?>&amp;page=<?php echo "$page"; ?>'>§R°£</a></div>
    </td>
    <td width="131"> 
      <form method="post" action="">
        <input type="text" name="exptime" size="6">
        <input type="hidden" name="step" value="ok">
        <input type="image" border="0" name="imageField" src="IMAGES/1arrow_r_on.gif" width="15" height="14">
        <input type="hidden" name="id" value="<?php echo "$id"; ?>">
      </form>
    </td>
  </tr>
  <?php
}
?> 
</table>
<table width="98%" border="0" cellspacing="0" cellpadding="0" align="center">
  <tr bgcolor="#959595"> 
    <td height="12" bgcolor="#959595" width="42%"> 
      <table border=0 cellpadding=0 cellspacing=0 height="14">
        <tr> 
          <td> <?php
if($gg1=="off"){
echo "<img border=0 height=14 hspace=0 src=images/2arrow_l_".$gg1.".gif width=15>";
}else{
$group1=$group-1;
echo "<a href=auto_dns.php3?ord=$ord&page=$page&group=$group1><img border=0 height=14 hspace=0 src=images/2arrow_l_".$gg1.".gif width=15></a>";
}

?> </td>
          <td> <?php
if($pp1=="off"){
echo "<img border=0 height=14 hspace=3 src=images/1arrow_l_".$pp1.".gif width=15>";
}else{
$page1=$page-1;
echo "<a href=auto_dns.php3?ord=$ord&page=$page1><img border=0 height=14 hspace=3 src=images/1arrow_l_".$pp1.".gif width=15></a>";
}

?> </td>
          <td height="14"><font color=#000000> <b><?php
$minpage=($group-1)*10+1;
$maxpage=$minpage+9;
if($maxpage>$totalpage){
$maxpage=$totalpage;
}
for($i=$minpage;$i<=$maxpage;$i++){
echo "|<a href=auto_dns.php3?ord=$ord&page=$i><font color=#000000>$i</font></a>";
}
echo "|";
?></b> </font></td>
          <td> <?php
if($pp2=="off"){
echo "<img border=0 height=14 hspace=3 src=images/1arrow_r_".$pp2.".gif width=15>";
}else{
$page2=$page+1;
echo "<a href=auto_dns.php3?ord=$ord&page=$page2><img border=0 height=14 hspace=3 src=images/1arrow_r_".$pp2.".gif width=15></a>";
}

?> </td>
          <td> <?php
if($gg2=="off"){
echo "<img border=0 height=14 hspace=0 src=images/2arrow_r_".$gg2.".gif width=15>";
}else{
$group2=$group+1;
echo "<a href=auto_dns.php3?ord=$ord&page=$page&group=$group2><img border=0 height=14 hspace=0 src=images/2arrow_r_".$gg2.".gif width=15></a>";
}
?> </td>
        </tr>
      </table>
    </td>
    <td height="12" width="58%" valign="middle"> 
      <div align="right"><font color="#FFFFFF">Åã¥Ü²Ä</font><font 
            color=#ffffff> <?php echo "$page"; ?> </font><font color="#FFFFFF">­¶ 
        ¦@</font><font 
            color=#ffffff> <?php echo "$totalpage"; ?> </font><font color="#FFFFFF">­¶</font><font 
            color=#ffffff> <?php echo "$totalnums"; ?> </font><font color="#FFFFFF">±ø–R</font></div>
    </td>
  </tr>
</table>
<p></p>
<div align="center"> 
  <center>
  </center>
</div>
<div align="center"></div>
<p align="center"> <br>
<p align="center">
<p><br clear=all>
</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
</BODY></HTML>

