Location: PHPKode > scripts > OekakiPoteto > oekakipoteto/massmail.php
<?
include('dbconn.php');
include('flagchk.php');
if(isset($OekakiU)){
$result = mysql_query("SELECT usrname, usrflags FROM ".$OekakiPoteto_MemberPrefix."oekaki WHERE usrname='$OekakiU'");
extract(mysql_fetch_array($result));
	if (!check_flag('O')) {
		header('Location: error.php?error='.urlencode("You cannot access the mass send."));
		exit;
	} 
} else {
	header('Location: error.php?error='.urlencode("You need to login to access the mailbox."));
	exit;
}
?>

<?
if($action==reply){
$result = mysql_query("SELECT * FROM ".$OekakiPoteto_MemberPrefix."oekakimailbox WHERE MID='$MID'");
$row = mysql_fetch_array($result);
if($row[reciever] != $OekakiU){
		header('Location: error.php?error='.urlencode("You cannot access messages in the mailbox that do not belong to you."));
		exit;
}
}

mysql_close($dbconn);
?>
<html>
<?
include('header.php');
if($action==reply){
$result = mysql_query("SELECT * FROM ".$OekakiPoteto_MemberPrefix."oekakimailbox WHERE MID='$MID'");
$row = mysql_fetch_array($result);
}
?>
<p></p>
<br>
<form name="form1" method="post" action="functions.php?mailbox=masssend">
<table width="<?=$hWidth?>" cellpadding="<?=$hCellPadding?>" align="center">
    <tr> 
      <td class="infotable"><font size="-2"><strong><?=$langop_word_mailbox?></strong> [<a href="mailbox.php"><?=$langop_word_inbox?></a>] 
        [<a href="mailout.php"><?=$langop_word_outbox?></a>]</font></td>
    </tr>
    <tr> 
      <td ><table width="100%" border="0" cellspacing="0" cellpadding="2">
          <tr >
            <td class="header"><strong><?=$langop_massm_smassm?></strong></td>
          </tr>
          <tr > 
            <td><table width="75%" border="0" align="center" cellpadding="2" cellspacing="0" class="infotable">
                <tr>
                  <td><?=$langop_massm_disc?></td>
                </tr>
                <tr> 
                  <td>&nbsp;</td>
                </tr>
                <tr> 
                  <td><?=$langop_word_subject?><br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <em><?=$langop_mail_subdesc?></em></td>
                </tr>
                <tr> 
                  <td><input name="subject" type="text" class="txtinput" id="subject" style="width:100%;" value="<?if($action==reply) echo "RE: ".$row[subject];?>" size="40" maxlength="255"></td>
                </tr>
                <tr> 
                  <td>&nbsp;</td>
                </tr>
                <tr> 
                  <td><?=$langop_word_message?> (<a href="#" onClick="openWindow('niftyusage.php', 500, 300); return false"><?=$langop_common_niftytoo?></a>)<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<em><?=$langop_mail_bodydesc?></em></td>
                </tr>
                <tr> 
                  <td><textarea name="body" cols="40" rows="10" class="multiline" id="body" style="width:100%;"><?if($action==reply) echo "\n\n\nOriginal Message: \n".$row[body];?></textarea></td>
                </tr>
                <tr> 
                  <td> 
                    <?if($action == "reply"){?>
                    <input type="hidden" name="MID" value="<?=$MID?>"> <input type="hidden" name="action" value="reply"> 
                    <?}?>
                  </td>
                </tr>
                <tr> 
                  <td><input name="mass" type="submit" id="mass" value="Send" class="submit"></td>
                </tr>
                <tr> 
                  <td>&nbsp;</td>
                </tr>
              </table></td>
          </tr>
        </table></td>
    </tr>
  </table>
</form>
</body>
<? include('footer.php'); ?>
Return current item: OekakiPoteto