<?php

include("../includes/db.inc.php");

include("../includes/config.php");

$msql=new SHARP_SQL;

if(isset($COUSER) && isset($COPASS) && $COUSER!="" && $COUSER!="deleted"){

	$msql->query("select * from auto_co where user='$COUSER' and password='$COPASS' and checked='1'");

	if($msql->next_record()){

		$coid=$msql->f('coid');

		$oof=$msql->f('oof');

		$jibie=$msql->f('jibie');

		$leiji=$msql->f('leiji');

		$tyw=$msql->f('tyw');

		$tjj=$msql->f('tjj');

		$zq=$msql->f('zq');

	}else{

		Header("Location: index.php3"); 

	}

}else{

		Header("Location: index.php3"); 

}



?>

<HTML>



<HEAD>

<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=big5">

<style type=text/css>



<!--



a { text-decoration: none; color: #000000}



a:hover { text-decoration: underline }



EM { font-size:9pt;font-family:CourierNew;font-style:normal }



a,td,p {font-size:9pt}



.hh input {background-color: #ffffff; border-style: solid; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px}



-->



</style>

</HEAD>



<BODY LEFTMARGIN="0" MARGINWIDTH="0" TOPMARGIN="0" MARGINHEIGHT="0" bgcolor="#1C2630" background="images/bg5.gif">

<div align="center"> 

  <table width="778" border="0" cellpadding="0" cellspacing="0" bgcolor="#FF6600">

    <tr> 

      <td bgcolor="#0099FF"><img src="images/top.gif" width="778"></td>

    </tr>

  </table>

  <table width="778" border="0" cellpadding="0" cellspacing="0">

    <tr bgcolor="#FFFFFF"> 

      <td width="2%" height="19">&nbsp;</td>

      <td align="right">| <a href="welcome.php3">¸ÛÁÜ¥[·ù</a> | <a href="reg.php3">¥N²zµn°O</a> 

        | <a href="main.php3">§Úªº±b¤á</a> | <a href="myuser.php3">§Úªº«È¤á</a> | <a href="in.php3">«È¤áÂà¤J</a> 

        | <a href="moduser.php3">­×§ï¸ê®Æ</a> | <a href="pay.php3">·~°È°e¥X</a> | <a href="index.php3?type=exit">°h¥X</a> 

        | </td>

      <td width="2%">&nbsp;</td>

    </tr>

    <tr bgcolor="#FFCC00"> 

      <td height="5" colspan="3" ></td>

    </tr>

  </table>

  <table width="778" border="0" cellpadding="0" cellspacing="0" bgcolor="#FF6600">

    <tr> 

      <td bgcolor="#99CCFF"> 

        <table width="100%" border="0" cellspacing="1" cellpadding="2" align="center">

          <tr valign="bottom" align="center"> 

            <td height="30"> <font size="2"><b></b></font> <?php





if($from=="in"){

$msql->query("select userid from auto_user where user='$kuser' and password='$kpass'");

if($msql->next_record()){

$ifex="1";

}else{

sendback("«È¤áªº¥Î¤á¦W±K½X¿é¤J¿ù»~¡A©Î¨S¦³³o­Ó¥Î¤á¡C½Ð¦V«È¤á®Ö¹ê«á¥¿½T¿é¤J");

}

if($ifex=='1'){

$msql->query("update auto_user set hezuoid='$coid' where user='$kuser' and password='$kpass'");

}



}



$msql->query("select count(userid) from auto_user where hezuoid='$coid'");



if($msql->next_record()){

$totalnums=$msql->f('count(userid)');

$totalpage=ceil($totalnums/20);

$totalgroup=ceil($totalpage/20);

}

if($page==""){

$page=1;

}







if($group==""){

$group=ceil($page/20);

}else{

$page=($group-1)*20+1;

}

$pagelimit=($page-1)*20;



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>

          <tr valign="top"> 

            <td height="285" bgcolor="#99CCFF"> 

              <table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">

                <tr> 

                  <td height="26" width="42%"> 

                    <table border=0 cellpadding=0 cellspacing=0 height="14">

                      <tr> 

                        <td> <?php

if($gg1=="off"){

echo "";

}else{

$group1=$group-1;

echo "<a href=myuser.php3?page=$page&group=$group1>«e¤Q­¶</a>";

}



?> </td>

                        <td> <?php

if($pp1=="off"){

echo "";

}else{

$page1=$page-1;

echo "<a href=myuser.php3?page=$page1>¤W¤@­¶</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=myuser.php3?page=$i><font color=#000000>$i</font></a>";

}

echo "|";

?> </font></td>

                        <td> <?php

if($pp2=="off"){

echo "";

}else{

$page2=$page+1;

echo "<a href=myuser.php3?page=$page2>¤U¤@­¶</a>";

}



?> </td>

                        <td> <?php

if($gg2=="off"){

echo "";

}else{

$group2=$group+1;

echo "<a href=myuser.php3?page=$page&group=$group2>«á¤Q­¶</a>";

}

?> </td>

                      </tr>

                    </table>

                  </td>

                  <td height="26" width="58%" valign="middle"> 

                    <div align="right"><font color="#000000">¦@ <?php echo "$totalnums"; ?> 

                      ­Ó¥Î¤á ¤À <?php echo "$totalpage"; ?> ­¶ Åã¥Ü²Ä <?php echo "$page"; ?> 

                      ­¶ –R</font></div>

                  </td>

                </tr>

              </table>

              <br>

              <table width="98%" cellspacing="2" cellpadding="1" align="center" bgcolor="#FFCC66" border="1" bordercolor="#333333">

                <tr bgcolor="#FFCC66"> 

                  <td height="25" width="22"><font color="#000000">ID</font></td>

                  <td height="25" width="140"> 

                    <div align="center"><font color="#000000">ºô¯¸¦WºÙ</font></div>

                  </td>

                  <td height="25" width="57"> 

                    <div align="center"><font color="#000000">¥Î¤á¦W</font></div>

                  </td>

                  <td height="25" width="92"> 

                    <div align="center"><font color="#000000">¹q¤l¶l¥ó</font></div>

                  </td>

                  <td height="25" width="54"> 

                    <div align="center"><font color="#000000">¹q¸Ü</font></div>

                  </td>

                  <td height="25" width="46"> 

                    <div align="center"><font color="#000000">Ápµ¸¤H</font></div>

                  </td>

                  <td height="25" width="46"> 

                    <div align="center"><font color="#000000">ª¬ºA</font></div>

                  </td>

                </tr>

                <?php 



$msql->query("select * from auto_user  where  hezuoid='$coid' order by userid desc limit $pagelimit,20");



while($msql->next_record()){

$user=$msql->f('user');

$userid=$msql->f('userid');

$sitename=$msql->f('sitename');

$urlname=$msql->f('urlname');

$email=$msql->f('email');

$tel=$msql->f('tel');

$name=$msql->f('name');

$regtime=$msql->f('regtime');



$checked=$msql->f('checked');

if($checked=="0"){

$saycheck="¸Õ¥Î";

}

if($checked=="1"){

$saycheck="¥I¶O";

}

?> 

                <tr bgcolor="#F2F2F2"> 

                  <td width="22"><font color="#000000"><?php echo "$userid"; ?></font></td>

                  <td width="140"> <font color="#000000"><a href="<?php echo "$baseurl"; ?>com/<?php echo "$urlname"; ?>" target="_blank"><?php echo "$sitename"; ?> 

                    </a> </font></td>

                  <td width="57"> 

                    <div align="center"><font color="#000000"> <?php echo "<font color=#000000>$user</font>"; ?> 

                      </font></div>

                  </td>

                  <td width="92"> <font color="#000000"> <a href="biz_send_mail1.php3?userid=<?php echo "$userid"; ?>" target=down><?php echo "<a href=mailto:$email>$email</a>"; ?></a> 

                    </font></td>

                  <td width="54"> 

                    <div align="center"><font color="#000000"> <?php echo "$tel"; ?> 

                      </font></div>

                  </td>

                  <td width="46"> <font color="#000000"> <?php echo "$name"; ?> 

                    </font></td>

                  <td width="46"> 

                    <div align="center"><font color="#000000"><?php echo "$saycheck"; ?> 

                      </font></div>

                  </td>

                </tr>

                <?php

}

?> 

              </table>

              <br>

              <table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">

                <tr> 

                  <td height="26" width="42%"> 

                    <table border=0 cellpadding=0 cellspacing=0 height="14">

                      <tr> 

                        <td> <?php

if($gg1=="off"){

echo "";

}else{

$group1=$group-1;

echo "<a href=myuser.php3?page=$page&group=$group1>«e¤Q­¶</a>";

}



?> </td>

                        <td> <?php

if($pp1=="off"){

echo "";

}else{

$page1=$page-1;

echo "<a href=myuser.php3?page=$page1>¤W¤@­¶</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=myuser.php3?page=$i><font color=#000000>$i</font></a>";

}

echo "|";

?> </font></td>

                        <td> <?php

if($pp2=="off"){

echo "";

}else{

$page2=$page+1;

echo "<a href=myuser.php3?page=$page2>¤U¤@­¶</a>";

}



?> </td>

                        <td> <?php

if($gg2=="off"){

echo "";

}else{

$group2=$group+1;

echo "<a href=myuser.php3?page=$page&group=$group2>«á¤Q­¶</a>";

}

?> </td>

                      </tr>

                    </table>

                  </td>

                  <td height="26" width="58%" valign="middle"> 

                    <div align="right"><font color="#000000">¦@ <?php echo "$totalnums"; ?> 

                      ­Ó¥Î¤á ¤À <?php echo "$totalpage"; ?> ­¶ Åã¥Ü²Ä <?php echo "$page"; ?> 

                      ­¶ –R</font></div>

                  </td>

                </tr>

              </table>

            </td>

          </tr>

        </table>

        <p>&nbsp;</p>

        <div align="center"> 

          <p>&nbsp;</p>

          <p>&nbsp;</p>

        </div>

      </td>

    </tr>

  </table>

  <table width="778" border="0" cellspacing="0" cellpadding="0">

    <tr> 

      <td height="5" bgcolor="#FFCC00"></td>

    </tr>

    <tr> 

      <td height="30" align="center" background="images/bg2.gif"><strong>SYOC 
        ºô­¶³]­pDIY¨t²Î ¥ô¦ó°ÝÃD½ÐÁpµ¸ <a href="mailto:daten@daten.com.tw">WEBMASTER</a></strong></td>

    </tr>

  </table>

</div>

</BODY>



</HTML>

