witam
chcialbym poprosic o wyjasnienie mi co nazlezy zmienic aby subject byl pobierany z linku
Kod
usercp.php?do=pm&action=edit&subject=TUTAJ JEST TYTUŁ&uid=2&what=new&to=user1
pozdrawiam
<?php
elseif ($do=="pm" && $action=="edit")
{
// if new pm will give id=0 and empty array
if (isset($_GET['id']) && $_GET['id']) if (!isset($_GET['what'])) $_GET['what'] = ''; if (!isset($_GET['to'])) $_GET['to'] = '';
$res=mysql_query("select messages.*, users.username as sendername FROM messages INNER JOIN us
ers on users.id=messages.sender WHERE receiver=$uid AND messages.id=$id"); block_begin(PRIVATE_MSG);
if (!$res)
err_msg(ERROR,BAD_ID);
else
{
print("n<form method=post name=edit action=usercp.php?do=$do&action=post&uid=$uid><table class="lista
" width="100%" align="center
" cellpadding="2">"); print("n<tr><td class=header>".RECEIVER
.":</td><td class=header><input type="text
" name="receiver
" value="".($_GET["what
"]!="new" ? unesc($result["sendername
"]):urldecode($_GET["to
"]))."" size="40" maxlength="40" ".($_GET["what"]!="new" ?
" readonly" : "")." /> ".($_GET["what"]=="new" ?
"<a href="javascript
:popusers
('searchusers.php');">".FIND_USER
."</a>" : "")."</td></tr>"); print("n<tr><td class=header>".SUBJECT
.":</td><td class=header><input type="text
" name="subject
" value="".($_GET["what
"]!="new" ? (strpos(unesc($result["subject
"]), "Re
:")===false?"Re
:":"").unesc($result["subject
"]):"")."" size="40" maxlength="40" /></td></tr>"); print("n<tr><td colspan=2>".textbbcode
("edit","msg",($_GET["what"]=="quote" ?
"[quote=".htmlspecialchars($result["sendername"])."]".unesc
($result["msg"])."[/quote]" : ""))."</td></tr>"); print("n<table class=lista width=100% align=center>"); print("n<tr><td class=lista align=center><input type="submit
" name="confirm
" value="".FRM_CONFIRM."" /></td><td class=lista align=center><input type="submit
" name="confirm
" value="".FRM_CANCEL."" /></td></tr>"); print("n</table></form>"); }
?>