Witam mam problem z dalszą modyfikacją pliku postnewthread.php otóż zmieniłem już sobie formularz dodawania posta zależny od ID forum który wygląda teraz tak:
oraz kod:
opentable($locale['401']);
if ($forum_id == "2") {
echo "<form name='inputform' method='post' action='".FUSION_SELF."?action=newthread&forum_id=$forum_id' enctype='multipart/form-data'>
<table cellpadding='0' cellspacing='0' width='100%' class='tbl-border'>
<tr>
<td>
<table width='100%' border='0' cellspacing='1' cellpadding='0'>
<tr>
<td width='145' class='tbl2'>".$locale['460']."</td>
[b]<td class='tbl2'>Drużyna: <input type='text' name='druzyna' value='[color=red]$druzyna[/color]' class='textbox' maxlength='200' style='width: 100px'> Liga: <input type='text' name='liga' value='[color=red]$liga[/color]' class='textbox' maxlength='150' style='width: 80px'> Poziom: <input type='text' name='poziom' value='[color=red]$poziom[/color]' class='textbox' maxlength='2' style='width: 20px'> Data: <input type='text' name='data' value='[color=red]$data[/color]' class='textbox' maxlength='10' style='width: 60px'></td>[/b]
</tr>
<tr>
<td valign='top' width='145' class='tbl2'>".$locale['461']."</td>
<td class='tbl1'>
<b>Opis :</b><br><textarea name='opis' cols='80' rows='4' class='textbox'>$opis</textarea><br><br>
<b>Statystyki :</b><br>1. Sezon: <input type='text' name='sezon1' value='$sezon1' class='textbox' maxlength='12' style='width: 80px'>
NSBR: <input type='text' name='nsbr1' value='$nsbr1' class='textbox' maxlength='2' style='width: 20px'>
OS: <input type='text' name='os1' value='$os1' class='textbox' maxlength='4' style='width: 35px'>
Remisy: <input type='text' name='remisy1' value='$remisy1' class='textbox' maxlength='2' style='width: 20px'>
R.Ligi: <input type='text' name='rligi1' value='$rligi1' class='textbox' maxlength='2' style='width: 20px'><br>
2. Sezon: <input type='text' name='sezon2' value='$sezon2' class='textbox' maxlength='12' style='width: 80px'>
NSBR: <input type='text' name='nsbr2' value='$nsbr2' class='textbox' maxlength='2' style='width: 20px'>
OS: <input type='text' name='os2' value='$os2' class='textbox' maxlength='4' style='width: 35px'>
Remisy: <input type='text' name='remisy2' value='$remisy2' class='textbox' maxlength='2' style='width: 20px'>
R.Ligi: <input type='text' name='rligi2' value='$rligi2' class='textbox' maxlength='2' style='width: 20px'><br>
3. Sezon: <input type='text' name='sezon3' value='$sezon3' class='textbox' maxlength='12' style='width: 80px'>
NSBR: <input type='text' name='nsbr3' value='$nsbr3' class='textbox' maxlength='2' style='width: 20px'>
OS: <input type='text' name='os3' value='$os3' class='textbox' maxlength='4' style='width: 35px'>
Remisy: <input type='text' name='remisy3' value='$remisy3' class='textbox' maxlength='2' style='width: 20px'>
R.Ligi: <input type='text' name='rligi3' value='$rligi3' class='textbox' maxlength='2' style='width: 20px'><br><br>
<b>Terminarz :</b><br>
1. Data:<input type='text' name='data1' value='$data1' class='textbox' maxlength='10' style='width: 60px'> Gospodarze: <input type='text' name='home1' value='$home1' class='textbox' maxlength='100' style='width: 100px'> Go¶cie: <input type='text' name='gos1' value='$gos1' class='textbox' maxlength='100' style='width: 100px'><br>
2. Data:<input type='text' name='data2' value='$data2' class='textbox' maxlength='10' style='width: 60px'> Gospodarze: <input type='text' name='home2' value='$home2' class='textbox' maxlength='100' style='width: 100px'> Go¶cie: <input type='text' name='gos2' value='$gos2' class='textbox' maxlength='100' style='width: 100px'><br>
3. Data:<input type='text' name='data3' value='$data3' class='textbox' maxlength='10' style='width: 60px'> Gospodarze: <input type='text' name='home3' value='$home3' class='textbox' maxlength='100' style='width: 100px'> Go¶cie: <input type='text' name='gos3' value='$gos3' class='textbox' maxlength='100' style='width: 100px'><br>
4. Data:<input type='text' name='data4' value='$data4' class='textbox' maxlength='10' style='width: 60px'> Gospodarze: <input type='text' name='home4' value='$home4' class='textbox' maxlength='100' style='width: 100px'> Go¶cie: <input type='text' name='gos4' value='$gos4' class='textbox' maxlength='100' style='width: 100px'><br>
5. Data:<input type='text' name='data5' value='$data5' class='textbox' maxlength='10' style='width: 60px'> Gospodarze: <input type='text' name='home5' value='$home5' class='textbox' maxlength='100' style='width: 100px'> Go¶cie: <input type='text' name='gos5' value='$gos5' class='textbox' maxlength='100' style='width: 100px'><br>
6. Data:<input type='text' name='data6' value='$data6' class='textbox' maxlength='10' style='width: 60px'> Gospodarze: <input type='text' name='home6' value='$home6' class='textbox' maxlength='100' style='width: 100px'> Go¶cie: <input type='text' name='gos6' value='$gos6' class='textbox' maxlength='100' style='width: 100px'><br>
7. Data:<input type='text' name='data7' value='$data7' class='textbox' maxlength='10' style='width: 60px'> Gospodarze: <input type='text' name='home7' value='$home7' class='textbox' maxlength='100' style='width: 100px'> Go¶cie: <input type='text' name='gos7' value='$gos7' class='textbox' maxlength='100' style='width: 100px'><br>
8. Data:<input type='text' name='data8' value='$data8' class='textbox' maxlength='10' style='width: 60px'> Gospodarze: <input type='text' name='home8' value='$home8' class='textbox' maxlength='100' style='width: 100px'> Go¶cie: <input type='text' name='gos8' value='$gos8' class='textbox' maxlength='100' style='width: 100px'>
</td>
</tr>
<tr>
<td valign='top' width='145' class='tbl2'>".$locale['463']."</td>
<td class='tbl1'>\n";
if (iMOD || iSUPERADMIN) {
echo "<input type='checkbox' name='sticky' value='1'$sticky_check>".$locale['480']."<br>\n";
}
echo "<input type='checkbox' name='disable_smileys' value='1'$disable_smileys_check>".$locale['483'];
if ($userdata['user_sig']) {
echo "<br>\n<input type='checkbox' name='show_sig' value='1'$sig_checked>".$locale['481'];
}
if ($settings['thread_notify']) echo "<br>\n<input type='checkbox' name='notify_me' value='1'$notify_checked>".$locale['485'];
echo "</td>
</tr>\n";
if ($settings['attachments'] == "1") {
echo "<tr>
<td width='145' class='tbl2'>".$locale['464']."</td>
<td class='tbl1'><input type='file' name='attach' enctype='multipart/form-data' class='textbox' style='width:200px;'><br>
<span class='small2'>".sprintf($locale['466'], parsebytesize($settings['attachmax']), str_replace(',', ' ', $settings['attachtypes']))."</span></td>
</tr>\n";
}
echo "</table>
</td>
</tr>
</table>
<table cellpadding='0' cellspacing='0' width='100%'>
<tr>
<td align='center' colspan='2' class='tbl1'>
<input type='submit' name='previewpost' value='".$locale['400']."' class='button'>
<input type='submit' name='postnewthread' value='".$locale['401']."' class='button'>
</td>
</tr>
</table>
</form>\n";
} else {
ale mam straszny problem teraz z wpakowaniem zmiennych $druzyna, $liga, $poziom, $data do zmiennej odpowiedzialnej za temat - $subject i zrobieniem z tego ciągu znaków który zapisze się w bazie, oraz pozostałych do $message ale to już sobie zrobię jak będę wiedział jak zrobić chociaż ten Temat
Stronę mam na extreme-fusion więc zamieszczam na wszelki wypadek mój przerobiony plik postnewthread.php w załączniku. |