<?php

include("../includes/config.php");

include("../includes/db.inc.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');

		$name=$msql->f('name');

		$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">代理登記</a> 

        | <a href="main.php3">我的帳戶</a> | <a href="myuser.php3">我的客戶</a> | <a href="in.php3">客戶轉入</a> 

        | <a href="moduser.php3">修改資料</a> | <a href="pay.php3">業務送出</a> | <a href="index.php3?type=exit">退出</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"> 

        <p>&nbsp;</p>

        <div align="center"> 

          <table width="80%" border="1" cellspacing="2" cellpadding="8" bordercolor="#1C2630" align="center" bgcolor="#FFCC66">

            <tr valign="top"> 

              <td height="48">　　如果你在本合作專區存有預付款，可以通過這裡送出你需要開通的網站客戶，我們會在24小時內受理開通客戶網站。並按你的代理級別扣除相應預付款。<br>

                <br>

                　　如果該客戶原來不在你的名下，送出後自動轉入你的名下： </td>

            </tr>

          </table>

          <div align="center"><br>

            <?php

if($cc=="送出"){

$msql->query("select userid from auto_user where user='$kuser' and password='$kpass'");

if($msql->next_record()){

$ifex="1";

}else{

sendback("客戶的用戶名密碼輸入錯誤，或沒有這個用戶。請向客戶核實後正確輸入");

}

if($ifex=='1'){

$msql->query("update auto_user set hezuoid='$coid' where user='$kuser' and password='$kpass'");

}

/////////////////通知郵件/////////////////////////////////////////////////////





$adminmail=$owneremail;

$subject="代理商業務送出通知";

$message="

代理商用戶名： $COUSER

代理商聯絡人： $name

代理商ID： $coid

項目： $kuser 客戶網站開通

附言： $con

";



mail($adminmail,$subject,$message,"From: $from\nReply-To: $from\nX-Mailer: PHP/".phpversion());



echo "您的業務已經送出，我們將在２４小時內開通客戶網站";

exit;

}

?> </div>

          <table width="80%" border="1" cellspacing="2" cellpadding="12" align="center" bgcolor="#FFCC66" bordercolor="#333333">

            <tr> 

              <td height="71"> 

                <div align="center"> 

                  <form method="post" action="">

                    <div align="left"> 

                      <table width="100%" border="0" cellspacing="1" cellpadding="0">

                        <tr> 

                          <td width="28%"> 

                            <div align="right"><font color="#000000">客戶用戶名：</font></div>

                          </td>

                          <td width="72%"><font color="#FFFFFF"> 

                            <input type="text" name="kuser" size="12">

                            </font></td>

                        </tr>

                        <tr> 

                          <td width="28%"> 

                            <div align="right"><font color="#000000">客戶密碼：</font></div>

                          </td>

                          <td width="72%"><font color="#FFFFFF"> 

                            <input type="password" name="kpass" size="12">

                            </font></td>

                        </tr>

                        <tr> 

                          <td width="28%"> 

                            <div align="right"><font color="#000000">附言： </font></div>

                          </td>

                          <td width="72%"><font color="#FFFFFF"> 

                            <textarea name="con" cols="40" rows="8"></textarea>

                            <br>

                            (需要註冊的網址，同時開通其他服務等) </font></td>

                        </tr>

                        <tr> 

                          <td width="28%">&nbsp;</td>

                          <td width="72%"><font color="#FFFFFF"> 

                            <input type="submit" name="cc" value="送出">

                            </font></td>

                        </tr>

                      </table>

                      <font color="#FFFFFF"> <br>

                      </font> </div>

                  </form>

                </div>

              </td>

            </tr>

          </table>

          <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 
        網頁設計DIY系統 任何問題請聯絡 <a href="mailto:daten@daten.com.tw">WEBMASTER</a></strong></td>

    </tr>

  </table>

</div>

</BODY>



</HTML>

