<?
require"ygl.php";
if(!isset($ses_user_id)||!isset($ses_user_psd)){errorview("对不起，你没有登陆！！");exit;}
$user_login_id=$ses_user_id;
$user_login_psd=$ses_user_psd;
if(!ynjoinclass($user_login_id)){errorview("对不起，你没有加入该班！！");exit;}
readclass();
read_user_zl($user_login_id);
$ynhead1="1";
$ynhead2="1";
$ynhead3="1";
$title="发邮件";
include"header.php";
if($mailpage==""||$mailpage=="invites")invites();
if($mailpage=="maillist")maillist();
if($invitesend!="")invitesend();
##########
function invites()
{
global $txlurl,$schooln,$classn;
print<<<EOT
<form name="form1" method="post" action="mailpost.php">
 <table width="500" border="1" cellspacing="0" cellpadding="2" align="center" bordercolorlight="#B5E1F7" bordercolordark="#FFFFFF">
  <tr>
   <td align=center><font color="#003399">-=发邀请函=-</font></td>
  </tr>
  <tr>
   <td>
    <table width="100%" border="0" cellspacing="0" cellpadding="3">
     <tr>
      <td width="30%">第一位同学的邮件地址：</td>
      <td width="70%">
       <input type="text" name="email1" class=text size=30>
      </td>
     </tr>
     <tr>
      <td width="30%">第二位同学的邮件地址：</td>
      <td width="70%">
       <input type="text" name="email2" class=text size=30>
      </td>
     </tr>
     <tr>
      <td width="30%">第三位同学的邮件地址：</td>
      <td width="70%">
       <input type="text" name="email3" class=text size=30>
      </td>
     </tr>
     <tr>
      <td width="30%">第四位同学的邮件地址：</td>
      <td width="70%">
       <input type="text" name="email4" class=text size=30>
      </td>
     </tr>
     <tr>
      <td width="30%">第五位同学的邮件地址：</td>
      <td width="70%">
       <input type="text" name="email5" class=text size=30>
      </td>
     </tr>
    </table>
   </td>
  </tr>
  <tr>
   <td>
    <table width="100%" border="0" cellspacing="0" cellpadding="3">
     <tr>
      <td>请在下面的格子里写上您给朋友们的话：</td>
     </tr>
     <tr>
      <td>
       <textarea name="content" cols="60" rows="5" class=text>老同学您最近好吗？我可是很想你啊！大家一起来这里聚一聚好吗？</textarea>
      </td>
     </tr>
    </table>
   </td>
  </tr>
  <tr>
   <td>
    <table width="100%" border="0" cellspacing="0" cellpadding="3">
     <tr>
      <td>您的校友录的地址：</td>
     </tr>
     <tr>
      <td>
       <textarea name="txladdr" cols="60" rows="3" class=text readonly>请到这里注册一个帐号：$txlurl
       加入我们这班：$schooln$classn
       $txlurl</textarea>
      </td>
     </tr>
    </table>
   </td>
  </tr>
  <tr>
   <td>
    <div align="center">
     <input type="submit" name="invitesend" value="发 送" class=text>
     <input type="reset" name="Submit2" value="重 置" class=text>
    </div>
   </td>
  </tr>
 </table>
</form>
EOT;
}
#####
function maillist()
{
print<<<EOT
<form name="form2" method="post" action="mailpost.php">
 <table width="500" border="1" cellspacing="0" cellpadding="2" align="center" bordercolorlight="#B5E1F7" bordercolordark="#FFFFFF">
  <tr align="center">
   <td colspan="2">-=发群体信=-</td>
  </tr>
  <tr>
   <td colspan="2">
    <table width="100%" border="0" cellspacing="0" cellpadding="3">
     <tr>
      <td width="21%">邮件标题：</td>
      <td width="79%">
       <input type="text" name="mailtitle" class=text>
      </td>
     </tr>
    </table>
   </td>
  </tr>
  <tr>
   <td colspan="2">
    <table width="100%" border="0" cellspacing="0" cellpadding="0">
     <tr>
      <td width="21%" valign="top">邮件正文：</td>
      <td width="79%">
       <textarea name="mcontent" cols="55" rows="5" class=text></textarea>
      </td>
     </tr>
    </table>
   </td>
  </tr>
  <tr>
   <td colspan="2" align="center">
    <p>
     <input type="submit" name="sendlist" value="发 送" class=text>
     <input type="reset" name="Submit4" value="重 置" class=text>
    </p>
   </td>
  </tr>
 </table>
</form>
EOT;
}
include"footer.php";
###############

?>