Grzes napisał/a:
Można ale może się okazać że szybciej Ci się ktoś włamie nim się zorientujesz. Pozwalając na html w nadsyłanych materiałach otwierasz sporą furtkę dla włamywaczy.
Nie bez powodu zablokowany jest html we wszystkim do czego ma zwykły użytkownik dostęp.
Wez pod uwage powyzsze.
Grzes jest naszym szefem bezpieczenstwa i mysle,z e rozsadnie byloby go posluchac.
Ale oczywiscie to Twoj wybor..
Sagitarius napisał/a:
Niestety ten mod jest kulawy, tzn nie działa jak trzeba. Trzeba klikać dwa razy na publikację/podgląd a mi zależy na funkcjonalności.
Nie ja bede mial problem ;)
Prosze:
Edytuj plik submit.php, znajdz:
echo $locale['520']."<br><br>
<form name='submit_form' method='post' action='".FUSION_SELF."?stype=a' onSubmit='return validateArticle(this);'>
<table align='center' cellpadding='0' cellspacing='0'>
<tr>
<td width='100' class='tbl'>".$locale['521']."</td>
<td class='tbl'><select name='article_cat' class='textbox'>
$cat_list</select></td>
</tr>
<tr>
<td class='tbl'>".$locale['522']."</td>
<td class='tbl'><input type='text' name='article_subject' value='$article_subject' maxlength='64' class='textbox' style='width:300px;'></td>
</tr>
<tr>
<td valign='top' class='tbl'>".$locale['523']."</td>
<td class='tbl'><textarea class='textbox' name='article_snippet' rows='3' style='width:300px;'>$article_snippet</textarea></td>
</tr>
<tr>
<td valign='top' class='tbl'>".$locale['524']."</td>
<td class='tbl'><textarea class='textbox' name='article_body' rows='8' style='width:300px;'>$article_body</textarea></td>
</tr>
<tr>
<td colspan='2' class='tbl'><br><center>
<input type='checkbox' name='line_breaks' value='yes'$breaks>".$locale['525']."<br><br>
<input type='submit' name='preview_article' value='".$locale['526']."' class='button'>
<input type='submit' name='submit_article' value='".$locale['527']."' class='button'></center>
</td>
</tr>
</table>
</form>\n";
Zamien na:
echo $locale['520']."<br><br>
<form name='inputform' method='post' action='".FUSION_SELF."?stype=a' onSubmit='return validateArticle(this);'>
<table align='center' cellpadding='0' cellspacing='0'>
<tr>
<td width='100' class='tbl'>".$locale['521']."</td>
<td class='tbl'><select name='article_cat' class='textbox'>
$cat_list</select></td>
</tr>
<tr>
<td class='tbl'>".$locale['522']."</td>
<td class='tbl'><input type='text' name='article_subject' value='$article_subject' maxlength='64' class='textbox' style='width:300px;'></td>
</tr>
<tr>
<td valign='top' class='tbl'>".$locale['523']."</td>
<td class='tbl'><textarea class='textbox' name='article_snippet' rows='3' style='width:300px;'>$article_snippet</textarea></td>
</tr>
<tr>\n<td class='tbl'></td>\n<td class='tbl'>
<input type='button' value='b' class='button' style='font-weight:bold;width:25px' onClick=\"addText('article_snippet', '<b>', '</b>');\">
<input type='button' value='i' class='button' style='font-style:italic;width:25px' onClick=\"addText('article_snippet', '<i>', '</i>');\">
<input type='button' value='u' class='button' style='text-decoration:underline;width:25px' onClick=\"addText('article_snippet', '<u>', '</u>');\">
<input type='button' value='link' class='button' style='width:35px' onClick=\"addText('article_snippet', '<a href=\'', '\' target=\'_blank\'>Link</a>');\">
<input type='button' value='center' class='button' style='width:45px' onClick=\"addText('article_snippet', '<center>', '</center>');\">
<input type='button' value='small' class='button' style='width:40px' onClick=\"addText('article_snippet', '<span class=\'small\'>', '</span>');\">
<input type='button' value='small2' class='button' style='width:45px' onClick=\"addText('article_snippet', '<span class=\'small2\'>', '</span>');\">
<input type='button' value='alt' class='button' style='width:25px' onClick=\"addText('article_snippet', '<span class=\'alt\'>', '</span>');\">
</td>
</tr>
<tr>
<td valign='top' class='tbl'>".$locale['524']."</td>
<td class='tbl'><textarea class='textbox' name='article_body' rows='8' style='width:300px;'>$article_body</textarea></td>
</tr>
<tr>\n<td class='tbl'></td>\n<td class='tbl'>
<input type='button' value='b' class='button' style='font-weight:bold;width:25px' onClick=\"addText('article_body', '<b>', '</b>');\">
<input type='button' value='i' class='button' style='font-style:italic;width:25px' onClick=\"addText('article_body', '<i>', '</i>');\">
<input type='button' value='u' class='button' style='text-decoration:underline;width:25px' onClick=\"addText('article_body', '<u>', '</u>');\">
<input type='button' value='link' class='button' style='width:35px' onClick=\"addText('article_body', '<a href=\'', '\' target=\'_blank\'>Link</a>');\">
<input type='button' value='center' class='button' style='width:45px' onClick=\"addText('article_body', '<center>', '</center>');\">
<input type='button' value='small' class='button' style='width:40px' onClick=\"addText('article_body', '<span class=\'small\'>', '</span>');\">
<input type='button' value='small2' class='button' style='width:45px' onClick=\"addText('article_body', '<span class=\'small2\'>', '</span>');\">
<input type='button' value='alt' class='button' style='width:25px' onClick=\"addText('article_body', '<span class=\'alt\'>', '</span>');\">
</td>
</tr>
<tr>
<td colspan='2' class='tbl'><br><center>
<input type='checkbox' name='line_breaks' value='yes'$breaks>".$locale['525']."<br><br>
<input type='submit' name='preview_article' value='".$locale['526']."' class='button'>
<input type='submit' name='submit_article' value='".$locale['527']."' class='button'></center>
</td>
</tr>
</table>
</form>\n";
Jesli chcesz miec dodatkowo podglad (tu juz podkladasz sie totalnie..)
Znajdz:
if (isset($_POST['preview_article'])) {
$article_cat = $_POST['article_cat'];
$article_subject = stripinput($_POST['article_subject']);
$article_snippet = phpentities(descript(stripslash($_POST['article_snippet'])));
$article_body = phpentities(descript(stripslash($_POST['article_body'])));
$breaks = (isset($_POST['line_breaks']) ? " checked" : "");
opentable($article_subject);
echo (isset($_POST['line_breaks']) ? nl2br($article_body) : $article_body);
closetable();
tablebreak();
}
I zamien na:
if (isset($_POST['preview_article'])) {
$article_cat = $_POST['article_cat'];
$article_subject = stripinput($_POST['article_subject']);
$article_snippet = descript(stripslash($_POST['article_snippet']));
$article_body = descript(stripslash($_POST['article_body']));
$breaks = (isset($_POST['line_breaks']) ? " checked" : "");
opentable($article_subject);
echo (isset($_POST['line_breaks']) ? nl2br($article_body) : $article_body);
closetable();
tablebreak();
}
Uzywasz na wlasna odpowiedzialnosc.
Edytowane przez Pieka dnia 20.08.2007 13:42:20
Jestem jaki jestem
|