<?php
if( !defined('ISDVBBS') ){
	header('HTTP/1.0 404 Not Found');
	exit;
}
if($action=="showlog"){
?>
<br>
<table border="0" cellspacing="1" cellpadding="1"  align="center" class="tableborder">
  <tr>
    <td colspan="5" class="tit1"><? echo $lang['mail.info1']?></td>
  </tr>
  <tr>
    <td width="20%" class="forumrow" valign="center">
      <input type="submit" name="Submit" value="<? echo $lang['note.info']?>" style="color: #FF0000;width:80px;height:50px;border:1px outset;">
   </td>
    <td class="forumrow" colspan="4" width="80%"><? echo $lang['mail.info2']?></td>
  </tr>
</table>
<table border="0" cellspacing="0" cellpadding="0"  align="center" class="tableborder">
  <tr>
    <td height="25" align="center" width="20%" <?if($action==''){echo 'bgcolor="#C9DEFA"';}else{echo 'bgcolor="#F1F3F5"';}?>><a href="sendemail.php">
	<font color="<?if($action==''){echo 'red';}else{echo '#000000';}?>"><? echo $lang['mail.info3']?></font></a></td>
    <td height="25" width="20%" align="center" <?if($action=='showlog'){echo 'bgcolor="#C9DEFA"';}else{echo 'bgcolor="#F1F3F5"';}?>><a href="sendemail.php">
  <a href="sendemail.php?action=showlog"><font color="<?if($action=='showlog'){echo 'red';}else{echo '#000000';}?>"><? echo $lang['mail.info4']?></font></a></td>
  <td bgcolor="#F1F3F5" width="20%"></td>
  <td bgcolor="#F1F3F5" width="20%"></td>
  <td bgcolor="#F1F3F5" width="20%"></td>
  </tr>
</table>
<table border="0" cellspacing="0" cellpadding="0"  align="center" class="tableborder">
  <form name="TheForm" method="post" action="">
	<input type="hidden" name="doaction" value="">
	<tr>
    <td colspan="8" class="tdtit"><? echo $lang['str.info1']?></td>
  </tr>
  <tr class="forumrow2">
    <td style="text-align:center;"><? echo $lang['str.info2']?></td>
    <td style="text-align:center;"><? echo $lang['str.info3']?></td>
    <td style="text-align:center;"><? echo $lang['str.info4']?></td>
    <td style="text-align:center;"><? echo $lang['str.info5']?></td>
    <td style="text-align:center;"><? echo $lang['str.info6']?></td>
    <td style="text-align:center;"><? echo $lang['str.info7']?></td>
    <td style="text-align:center;"><? echo $lang['str.info8']?></td>
    <td style="text-align:center;"><? echo $lang['str.info9']?></td>
  </tr>
  <tr>
    <td colspan="9" class="forumrow" height="25"><? echo $lang['str.info11']?><input type="text" name="email_num" size="5" value="10"><? echo $lang['str.info12']?></td>
  </tr>
<?
	if(!empty($record_row)){
		  if(is_array($record_row)){
			  $n=count($record_row);
			  for($i=0;$i<$n-1;$i++){
				  $post_info=explode("@@-##",$record_row[$i]);				  
?>
  <tr class=forumrow style="padding:1px;">
    <td height="25" style="text-align:center;">
	<input type="checkbox" class="button" name="DelNodes[]" value="<? echo $i?>"></td>
    <td height="25" style="text-align:center;"><? echo $post_info[1]?></td>
    <td height="25" style="text-align:center;"><? echo $post_info[3]?></td>
    <td height="25" style="text-align:center;"><? echo $post_info[4]?></td>
    <td height="25" style="text-align:center;"><? echo $post_info[5]?></td>
    <td height="25" style="text-align:center;"><? echo $post_info[6]?></td>
    <td height="25" style="text-align:center;"><? echo gmdate('Y-m-d H:i:s',$post_info[7]+getUserTimeZoneOffset())?></td>
    <td height="25" style="text-align:center;"><? echo gmdate('Y-m-d H:i:s',$post_info[8]+getUserTimeZoneOffset())?></td>
  </tr>
<?	 
			  }
		  }
	  }
	?>
  <tr>
    <td colspan="8" class="forumrow1" height="30"><input type="submit" class="button" name="Submit" onclick="this.form.doaction.value='sendok'" value="<? echo $lang['str.info15']?>">&nbsp;&nbsp;<input type="submit" class="button" onclick="this.form.doaction.value='del'" value="<? echo $lang['str.info13']?>">
      &nbsp;&nbsp;<input type="checkbox" class="button" name="all_select" value="Y" onclick="un(this)"><? echo $lang['str.info14']?></td>
  </tr>
 </form>
</table>
<?}else{?>
<br>
<div class="menuskin" id="popmenu" onmouseover="clearhidemenu();" onmouseout="dynamichide(event)" style="Z-index:100"></div>
<table border="0" cellspacing="0" cellpadding="0"  align="center" class="tableborder">
  <tr>
    <td colspan="2" class="tit1"><? echo $lang['mail.info1']?></td>
  </tr>
  <tr>
    <td width="20%" class=forumrow valign="center">
      <input type="submit" name="Submit" value="<? echo $lang['note.info']?>" style="color: #FF0000;width:80px;height:50px;border:1px outset;">
   </td>
    <td class="forumrow" width="80%"><? echo $lang['mail.info2']?></td>
  </tr>
</table>
<table border="0" cellspacing="0" cellpadding="0"  align="center" class="tableborder">
  <tr>
    <td height="25" align="center" width="20%" <?if($action==''){echo 'bgcolor="#C9DEFA"';}else{echo 'bgcolor="#F1F3F5"';}?>><a href="sendemail.php">
	<font color="<?if($action==''){echo 'red';}else{echo '#000000';}?>"><? echo $lang['mail.info3']?></font></a></td>
    <td height="25" width="20%" align="center" <?if($action=='showlog'){echo 'bgcolor="#C9DEFA"';}else{echo 'bgcolor="#F1F3F5"';}?>><a href="sendemail.php">
  <a href="sendemail.php?action=showlog"><font color="<?if($action=='showlog'){echo 'red';}else{echo '#000000';}?>"><? echo $lang['mail.info4']?></font></a></td>
  <td bgcolor="#F1F3F5" width="20%"></td>
  <td bgcolor="#F1F3F5" width="20%"></td>
  <td bgcolor="#F1F3F5" width="20%"></td>
  </tr>
</table>
<table border="0" cellspacing="0" cellpadding="0"  align="center" class="tableborder">
  <form name="TheForm" method="post" action="?action=create_email">
  <tr>
    <td colspan="2" class="tdtit"><? echo $lang['mail.info1']?></td>
  </tr>
  <tr>
    <td width="20%" class="forumrow" height="30" style="text-align:right;"><? echo $lang['mail.info5']?>&nbsp;&nbsp;</td>
    <td width="80%" class="forumrow" height="30" align="left">
      <input type="text" name="UserName" size="50">&nbsp;&nbsp;<?echo $lang['mail.info6']?>
    </td>
  </tr>
  <tr>
    <td width="20%" class="forumrow" height="30" style="text-align:right;"><? echo $lang['mail.info7']?>&nbsp;&nbsp;</td>
    <td width="80%" height="30" class="forumrow" align="left"><input type="radio" checked name="usertype" value="1" onclick="UType(this.value)"><?echo $lang['mail.info8']?>
      <input type="radio" name="usertype" value="2" onclick="UType(this.value)"><?echo $lang['mail.info9']?>
      <input type="radio" name="usertype" value="3" onclick="UType(this.value)"><?echo $lang['mail.info10']?><b><?echo $lang['sys.info24']?></b>
			<div id="ToUserGroup" style="display:none;">
			<table width="100%" border="0" cellspacing="0" cellpadding="0" align=center>
			<tr><td class="forumrow1"><? echo $lang['mail.info17']?></td></tr>
			<tr class="forumrow"><td>
			<? 
				if(!empty($groups_list)){
					if(is_array($groups_list)){
						foreach($groups_list as $groups_val){
							$n+=1;
			?>
			<INPUT TYPE="checkbox" NAME="GetGroupID[]" value="<? echo $groups_val['usergroupid']?>"><? echo $groups_val['usertitle']?>&nbsp;
			<?
							if($n==12) echo "<br>";
						}
					}
				}
			?>
			</td></tr>
			<tr><td height=20 class="td1">
			<input type="button" value="<?echo $lang['tmp.info1']?>" NAME="OPENSET" onclick="openset(this,'UpSetting')"></td>
			</tr>
			<tr><td height=20 ID="UpSetting" style="display:NONE" class="td1">
				<table width="100%" border="0" cellspacing="0" cellpadding="0" align=center>
				<tr><td colspan="4" class="forumrow1"><? echo $lang['tmp.info3']?></td></tr>
				<tr class="forumrow">
				<td width="15%"><? echo $lang['tmp.info4']?></td>
				<td width="35%">
				<input type="text" name="LoginTime" onkeyup="CheckNumer(this.value,this,'')" size=6><? echo $lang['tmp.info10']?> &nbsp;<INPUT TYPE="radio" NAME="LoginTimeType" checked value="0"><? echo $lang['tmp.info13']?> <INPUT TYPE="radio" NAME="LoginTimeType" value="1"><? echo $lang['tmp.info14']?>
				</td>
				<td width="15%"><? echo $lang['tmp.info7']?></td>
				<td width="35%">
				<input type="text" name="RegTime" onkeyup="CheckNumer(this.value,this,'')" size=6><? echo $lang['tmp.info10']?> &nbsp;<INPUT TYPE="radio" NAME="RegTimeType" checked value="0"><? echo $lang['tmp.info13']?> <INPUT TYPE="radio" NAME="RegTimeType" value="1"><? echo $lang['tmp.info14']?>
				</td>
				</tr>
				<tr class="forumrow">
				<td><? echo $lang['tmp.info5']?></td>
				<td><input type="text" name="Logins" size=6 onkeyup="CheckNumer(this.value,this,'')"><? echo $lang['tmp.info11']?> &nbsp;<INPUT TYPE="radio" NAME="LoginsType" checked value="0"><? echo $lang['tmp.info13']?> <INPUT TYPE="radio" NAME="LoginsType" value="1"><? echo $lang['tmp.info14']?>
				</td>
				<td><? echo $lang['tmp.info8']?></td>
				<td><input type="text" name="UserPost" size=6 onkeyup="CheckNumer(this.value,this,'')"><? echo $lang['tmp.info12']?> &nbsp;<INPUT TYPE="radio" NAME="UserPostType" checked value="0"><? echo $lang['tmp.info13']?> <INPUT TYPE="radio" NAME="UserPostType" value="1"><? echo $lang['tmp.info14']?></td>
				</tr>
				<tr class="forumrow">
				<td><? echo $lang['tmp.info6']?></td>
				<td><input type="text" name="UserTopic" size=6 onkeyup="CheckNumer(this.value,this,'')"><? echo $lang['tmp.info12']?> &nbsp;<INPUT TYPE="radio" NAME="UserTopicType" checked value="0"><? echo $lang['tmp.info13']?> <INPUT TYPE="radio" NAME="UserTopicType" value="1"><? echo $lang['tmp.info14']?></td>
				<td><? echo $lang['tmp.info9']?></td>
				<td><input type="text" name="UserBest" size=6 onkeyup="CheckNumer(this.value,this,'')"><? echo $lang['tmp.info12']?> &nbsp;<INPUT TYPE="radio" NAME="UserBestType" checked value="0"><? echo $lang['tmp.info13']?> <INPUT TYPE="radio" NAME="UserBestType" value="1"><? echo $lang['tmp.info14']?>
				</td>
				</tr>
				</table>
				</td>
			</tr>
			</table>
		</div>
	  </td>
  </tr>
  <tr>
    <td width="20%" class="forumrow" height="30" style="text-align:right;"><? echo $lang['mail.info11']?>&nbsp;&nbsp;</td>
    <td width="80%" height="30" class=forumrow align="left"><input type="text" name="title" size="80"></td>
  </tr>
  <tr>
    <td width="20%" class="forumrow" height="30" style="text-align:right;"><? echo $lang['mail.info12']?>&nbsp;&nbsp;</td>
    <td width="80%" height="30" class=forumrow align="left"><textarea name="body" style="width:100%" rows="13"></textarea></td>
  </tr>
  <tr>
    <td width="20%" class="forumrow1" height="30" style="text-align:right;"></td>
    <td width="80%" class=forumrow1><input type="submit" class="button" name="Submit" value="<? echo $lang['mail.info13']?>">&nbsp;&nbsp;&nbsp;
      <input type="reset" class="button" name="Submit" value="<? echo $lang['mail.info14']?>"></td>
  </tr>
 </form>
</table>
<?}?>