<?php
include("../includes/db.inc.php");
include("../includes/config.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="#FFCC33"> 
    <form method="post" action="auto_member.php3" > 
      <td> <font color="#000000">ºô­¶³]­pDIY¸Õ¥Î¥Î¤á²M³æ ¡G</font> <font color="#000000">·j´M</font><font color="#FFFFFF"> 
        </font> 
        <input type="text" name="key">
        <input type="submit" name="Submit" value="go">
        <?php


if($step=="check"){

if($ADMINSTAR<2){
sendback("¨S¦³Åv­­¶i¦æ¦¹¶µ¾Þ§@");
}
$msql->query("update auto_user set checked='1' where userid='$userid'");
echo "¤w¸g¥¿¦¡¶}³q";
}
//////

if($step=="mod"){
if($ADMINSTAR<2){
sendback("¨S¦³Åv­­¶i¦æ¦¹¶µ¾Þ§@");
}

$msql->query("update auto_user set exptime='$newexptime',hezuoid='$hezuoid' where userid='$userid'");
echo "¤w¸g­×§ï";

}

if($step=="del"){
if($ADMINSTAR<2){
sendback("¨S¦³Åv­­¶i¦æ¦¹¶µ¾Þ§@");
}
////////////////////§R°£¤º®e¹Ï¤ù
$msql->query("select id from auto_con where userid='$userid'");
while($msql->next_record()){
$id=$msql->f('id');
$save_directory = "../comimg/";
  			$savefile=$save_directory.$id.".jpg";
		if(file_exists($savefile)){
  			unlink($savefile);
		}
}
/////////////////§R°£¥ø·~§Î¶H¹Ï¤ù©M¼s§i¹Ï¤ù
$save_directory = "../webimg/";
  			$savefile=$save_directory.$userid.".jpg";
		if(file_exists($savefile)){
  			unlink($savefile);
		}
$save_directory = "../banner/";
  			$savefile=$save_directory.$userid.".jpg";
		if(file_exists($savefile)){
  			unlink($savefile);
		}
$save_directory = "../logo/";
  			$savefile=$save_directory.$userid.".jpg";
		if(file_exists($savefile)){
  			unlink($savefile);
		}
/////////////////§R°£ºô¯¸¥Ø¿ý
$deldir="../com/$urlname";
if(file_exists($deldir)){
$handle=opendir($deldir);
while ($files = readdir($handle)) {
if($files!="." && $files!=".."){
$delfile=$deldir."/".$files;
 unlink($delfile);
}
}
closedir($handle);
rmdir($deldir);
}else{
echo "¤å¥ó¥Ø¿ý¤£¦s¦b";
}
/////////////////§R°£¤º®e
$msql->query("delete from auto_user where userid='$userid'");
$msql->query("delete from auto_con where userid='$userid'");
$msql->query("delete from auto_link where userid='$userid'");
$msql->query("delete from auto_dir where userid='$userid'");


echo "¤w¸g§R°£";
}



$msql->query("select count(userid) from auto_user where checked='0'");

if($msql->next_record()){
$totalnums=$msql->f('count(userid)');
$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>
   </form>
      </tr>
</table>
<table width="100%" 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_member.php3?local=$local&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_member.php3?local=$local&page=$page1&local=$local><img border=0 height=14 hspace=3 src=images/1arrow_l_".$pp1.".gif width=15></a>";
}

?>
          </td>
          <td height="14"><font color=#000000>
            <?php
$minpage=($group-1)*10+1;
$maxpage=$minpage+9;
if($maxpage>$totalpage){
$maxpage=$totalpage;
}
for($i=$minpage;$i<=$maxpage;$i++){
echo "|<a href=auto_member.php3?local=$local&page=$i><font color=#000000>$i</font></a>";
}
echo "|";
?>
            </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_member.php3?local=$local&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_member.php3?local=$local&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>
<table width="100%" border="0" cellspacing="1" cellpadding="1" align="center">
  <tr bgcolor="#FFCC33" align="center"> 
    <td height="30" width="30"><font color="#000000">ID</font></td>
    <td height="30" width="60"> 
      <div align="center"><font color="#000000">¥Ó½Ð®É¶¡</font></div>
    </td>
    <td height="30" width="50"> 
      <div align="center"><font color="#000000">ºô§}</font></div>
    </td>
    <td height="30" width="60"> 
      <div align="center"><font color="#000000">ºô¯¸¦W</font></div>
    </td>
    <td height="30" width="60"> 
      <div align="center"><font color="#000000">¥Î¤á/±K½X</font></div>
    </td>
    <td height="30" width="100"> 
      <div align="center"><font color="#000000">¶l¥ó</font></div>
    </td>
    <td height="30" width="80"> 
      <div align="center"><font color="#000000">Ápµ¸</font></div>
    </td>
    <td height="30" width="150"> 
      <div align="center"><font color="#FFFFFF"><font color="#000000">­­´Á/¥N²z¸¹</font></font></div>
    </td>
    <td height="30" width="25"> 
      <div align="center"><font color="#000000">§R°£ </font></div>
    </td>
    <td height="30" width="30"><font color="#000000">¤å¥ó¼Æ</font></td>
    <td height="30" width="30"> 
      <div align="center"><font color="#000000">¥¿¦¡¶}³q</font></div>
    </td>
    <td height="30" width="30"> 
      <div align="center"><font color="#000000">¥Î¤á¨t²Î</font></div>
    </td>
  </tr>
  <?php 
if($key==""){
	
		$msql->query("select * from auto_user  where checked!='1' order by userid desc limit $pagelimit,10");

}else{
	
		$msql->query("select * from auto_user  where checked!='1' and (sitename regexp '$key' or name regexp '$key' or user regexp '$key' or urlname regexp '$key') order by userid desc");

}
while($msql->next_record()){
$user=$msql->f('user');
$userid=$msql->f('userid');
$password=$msql->f('password');
$urlname=$msql->f('urlname');
$sitename=$msql->f('sitename');
$ensitename=$msql->f('ensitename');
$email=$msql->f('email');
$tel=$msql->f('tel');
$fax=$msql->f('fax');
$mod=$msql->f('mod');
$name=$msql->f('name');
$regtime=$msql->f('regtime');
$exptime=$msql->f('exptime');
$addr=$msql->f('addr');
$hezuoid=$msql->f('hezuoid');
$coid=$msql->f('coid');
?> 
  <tr bgcolor="#FFFFFF"> 
    <td height="18" width="30"><font color="#000000"><?php echo "$userid"; ?> 
      </font></td>
    <td height="18" width="60"> 
      <div align="center"><font color="#000000"><?php echo "$regtime"; ?></font></div>
    </td>
    <td height="18" width="50"> 
      <div align="center"><a href="<?php echo "$baseurl" ; ?>com/<?php echo "$urlname"; ?>" target="_blank">¬d¬Ý 
        </a> <br>
      </div>
    </td>
    <td height="18" width="60" align="center"> <?php echo "$sitename"; ?> <br>
      <?php echo "$ensitename"; ?></td>
    <td height="18" width="60"> 
      <div align="center"><font color="#000000"> <?php echo "<font color=#000000>$user</font></a>"; ?> 
        <br>
        <?php echo "<font color=#000000>$password</font></a>"; ?> </font></div>
    </td>
    <td height="18" width="100"> 
      <div align="center"><font color="#000000"><?php echo "<a href=mailto:$email>$email</a>"; ?></font></div>
    </td>
    <td height="18" width="80"> 
      <div align="center"><font color="#000000"> <br>
        <?php echo "$tel"; ?><br>
        <?php echo "$name"; ?> </font></div>
    </td>
    <form>
      <td height="20" class="bb" width="150" align="center"> <font color="#000000"> 
        <input type="text" name="newexptime" size="8" value="<?php echo "$exptime"; ?>">
        <input type="text" name="hezuoid" size="4" value="<?php echo "$hezuoid"; ?>">
        <input type="hidden" name="userid" value="<?php echo "$userid"; ?>">
        <input type="hidden" name="step" value="mod">
        <font color="#FF0000"> 
        <input type="image" border="0" name="imageField" src="images/2arrow_r_on.gif" width="15" height="14">
        </font> 
        <input type="hidden" name="page" value="<?php echo "$page"; ?>">
        <input type="hidden" name="mod" value="<?php echo "$mod"; ?>">
        </font></td>
    </form>
    <td height="18" width="25"> 
      <div align="center"><a href="auto_member.php3?step=del&amp;userid=<?php echo "$userid"; ?>&amp;e=<?php echo "$email"; ?>&amp;urlname=<?php echo "$urlname"; ?>&amp;page=<?php echo "$page"; ?>">§R</a></div>
    </td>
    <td height="18" width="30" align="center"><?php
if(file_exists("../com/$urlname")){
$handle=opendir("../com/$urlname");
$fnums=0;
$size=0;
while ($files = readdir($handle)) {
if($files!="." && $files!=".."){
$fnums++;
}

}
echo "<a href=# onClick='window.open(\"size.php3?fnums=$fnums&userid=$userid&size=$size\",\"size\",\"width=150,height=150\")'>$fnums ­Ó¤å¥ó</a>";
}else{
echo "¥Ø¿ý¥¼¥Í¦¨";
}
?> </td>
    <td height="18" width="30"> 
      <div align="center"><a href=auto_member.php3?userid=<?php echo "$userid"; ?>&page=<?php echo "$page"; ?>&step=check> 
        ½T»{</a></div>
    </td>
    <form method="post" action="<?php echo "$baseurl"; ?>admin.php3" target=auto_log>
      <td height="18" width="30" align="center"> 
        <input type="submit" name="Submit2" value="go">
        <font color="#000000"> 
        <input type="hidden" name="user" value="<?php echo "$user"; ?>">
        </font> <font color="#000000"> 
        <input type="hidden" name="password" value="<?php echo "$password"; ?>">
        </font> </td>
    </form>
  </tr>
  <?php
}
?> 
</table>
<table width="100%" 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_member.php3?local=$local&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_member.php3?local=$local&page=$page1&local=$local><img border=0 height=14 hspace=3 src=images/1arrow_l_".$pp1.".gif width=15></a>";
}

?>
          </td>
          <td height="14"><font color=#000000>
            <?php
$minpage=($group-1)*10+1;
$maxpage=$minpage+9;
if($maxpage>$totalpage){
$maxpage=$totalpage;
}
for($i=$minpage;$i<=$maxpage;$i++){
echo "|<a href=auto_member.php3?local=$local&page=$i><font color=#000000>$i</font></a>";
}
echo "|";
?>
            </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_member.php3?local=$local&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_member.php3?local=$local&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 align="center">
<p>&nbsp;
<p align="center">&nbsp;</p>
</BODY></HTML>
