continue; } $qPM = "insert into pmsgs (userto, userfrom, date, ip, msgread) values (" . $recipient . ", " . $loguserid . ", " . time() . ", '" . $_SERVER['REMOTE_ADDR'] . "', 0)"; $rPM = Query($qPM); $pid = mysql_insert_id(); $qPMT = "insert into pmsgs_text (pid,title,text) values (" . $pid . ", '" . justEscape($_POST['title']) . "', '" . $post . "')"; $rPMT = Query($qPMT); } Redirect(__("PM sent!"), "private.php?show=1", __("your PM outbox")); exit; } } else { Alert(__("Enter a message and try again."), __("Your PM is empty.")); } } else { Alert(__("Enter a title and try again."), __("Your PM is untitled.")); } } //if($_POST['text']) $prefill = htmlval($_POST['text']); //if($_POST['title']) $trefill = htmlval($_POST['title']); $prefill = $pm['text']; $trefill = $pmtitle; MakePost($pm, 0, 0, 1); Write("\n\t<table style=\"width: 100%;\">\n\t\t<tr>\n\t\t\t<td style=\"vertical-align: top; border: none;\">\n\t\t\t\t<form action=\"showprivate.php\" method=\"post\">\n\t\t\t\t\t<table class=\"outline margin width100\">\n\t\t\t\t\t\t<tr class=\"header1\">\n\t\t\t\t\t\t\t<th colspan=\"2\">\n\t\t\t\t\t\t\t\t" . __("Edit Draft") . "\n\t\t\t\t\t\t\t</th>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr class=\"cell0\">\n\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t" . __("To") . "\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t<input type=\"text\" name=\"to\" style=\"width: 98%;\" maxlength=\"1024\" value=\"{2}\" />\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr class=\"cell1\">\n\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t" . __("Title") . "\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t<input type=\"text\" name=\"title\" style=\"width: 98%;\" maxlength=\"60\" value=\"{1}\" />\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t<tr class=\"cell0\">\n\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t" . __("Message") . "\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t<textarea id=\"text\" name=\"text\" rows=\"16\" style=\"width: 98%;\">{0}</textarea>\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr class=\"cell2\">\n\t\t\t\t\t\t\t<td></td>\n\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t<input type=\"submit\" name=\"action\" value=\"" . __("Send") . "\" /> \n\t\t\t\t\t\t\t\t<input type=\"submit\" name=\"action\" value=\"" . __("Preview") . "\" />\n\t\t\t\t\t\t\t\t<input type=\"submit\" name=\"action\" value=\"" . __("Update Draft") . "\" /> \n\t\t\t\t\t\t\t\t<input type=\"submit\" name=\"action\" value=\"" . __("Discard Draft") . "\" /> \n\t\t\t\t\t\t\t\t<input type=\"hidden\" name=\"id\" value=\"{3}\" />\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t</table>\n\t\t\t\t</form>\n\t\t\t</td>\n\t\t\t<td style=\"width: 200px; vertical-align: top; border: none;\">\n", $prefill, $trefill, $to, $pmid); DoSmileyBar(); DoPostHelp(); Write("\n\t\t\t</td>\n\t\t</tr>\n\t</table>\n"); } else { MakePost($pm, 0, 0, 1); } MakeCrumbs(array("Main" => "./", "Private messages" => "private.php", $pmtitle => ""), $links);
function doPostForm($form) { global $mobileLayout; if ($mobileLayout) { echo $form; } else { print "\n\t\t\t<table style=\"width: 100%;\">\n\t\t\t\t<tr>\n\t\t\t\t\t<td style=\"vertical-align: top; border: none;\">\n\t\t\t\t\t\t{$form}\n\t\t\t\t\t</td>\n\t\t\t\t\t<td style=\"width: 20%; vertical-align: top; border: none;\">"; DoSmileyBar(); DoPostHelp(); echo "\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\t\t\t</table>"; } echo "\n\t\t<script type=\"text/javascript\">\n\t\t\tdocument.postform.text.focus();\n\t\t</script>\n\t"; }