"); if ($session['user']['superuser'] & SU_IS_GAMEMASTER) { rawoutput(""); } rawoutput(""); $superusers = array(); if (($session['user']['superuser'] & SU_IS_GAMEMASTER) && $from > "") { output("`2From: `^%s`n", $from); } if (isset($row['login']) && $row['login']!=""){ output_notl("",true); output("`2To: `^%s`n",$row['name']); if (($row['superuser'] & SU_GIVES_YOM_WARNING) && !($row['superuser'] & SU_OVERRIDE_YOM_WARNING)) { array_push($superusers,$row['login']); } }else{ output("`2To: "); $to = httppost('to'); $sql = "SELECT login,name,superuser FROM accounts WHERE login = '".addslashes($to)."' AND locked = 0"; $result = db_query($sql); $db_num_rows = db_num_rows($result); if($db_num_rows != 1) { $string="%"; $to_len = strlen($to); for($x=0; $x < $to_len; ++$x) { $string .= $to{$x}."%"; } $sql = "SELECT login,name,superuser FROM " . db_prefix("accounts") . " WHERE name LIKE '".addslashes($string)."' AND locked=0 ORDER by login='$to' DESC, name='$to' DESC, login"; $result = db_query($sql); $db_num_rows = db_num_rows($result); } if ($db_num_rows==1){ $row = db_fetch_assoc($result); output_notl("",true); output_notl("`^{$row['name']}`n"); if (($row['superuser'] & SU_GIVES_YOM_WARNING) && !($row['superuser'] & SU_OVERRIDE_YOM_WARNING)) { array_push($superusers,$row['login']); } }elseif ($db_num_rows==0){ output("`\$No one was found who matches \"%s\".`n",stripslashes($to)); output("`@Please try again.`n"); httpset('prepop', $to, true); rawoutput(""); require("lib/mail/case_address.php"); popup_footer(); }else{ output_notl("`n",true); } } rawoutput(""); output("`2Subject:"); rawoutput("
"); rawoutput(""); output("`2Body:`n"); require_once("lib/forms.php"); previewfield("body", "`^", false, false, array("type"=>"textarea", "class"=>"input", "cols"=>"60", "rows"=>"9", "onKeyDown"=>"sizeCount(this);"), htmlentities($body, ENT_COMPAT, getsetting("charset", "ISO-8859-1")).htmlentities(stripslashes(httpget('body')), ENT_COMPAT, getsetting("charset", "ISO-8859-1"))); //rawoutput("
"); $send = translate_inline("Send"); rawoutput("
"); rawoutput(""); $sizemsg = "`#Max message size is `@%s`#, you have `^XX`# characters left."; $sizemsg = translate_inline($sizemsg); $sizemsg = sprintf($sizemsg,getsetting("mailsizelimit",1024)); $sizemsgover = "`\$Max message size is `@%s`\$, you are over by `^XX`\$ characters!"; $sizemsgover = translate_inline($sizemsgover); $sizemsgover = sprintf($sizemsgover,getsetting("mailsizelimit",1024)); $sizemsg = explode("XX",$sizemsg); $sizemsgover = explode("XX",$sizemsgover); $usize1 = addslashes("".appoencode($sizemsg[0]).""); $usize2 = addslashes("".appoencode($sizemsg[1]).""); $osize1 = addslashes("".appoencode($sizemsgover[0]).""); $osize2 = addslashes("".appoencode($sizemsgover[1]).""); rawoutput(" "); ?>