Jestes pewniej bardzie zaawansowany niz ja i wybacz ale nie rozumiem gdzie lub cos mam wkleic ten kod co podałem wyzej odpowiada za wyswietlenie danych podczas edycji wiec jak mam go zmodyfikować lub co mam zrobić. Proszę o pomoc ?
To jest cala funkcja u mnie co odpowiada za edytowanie newsa:
<?php
function edit_form() {
global $PHP_SELF, $news_tbl, $id, $access, $nick, $op, $goto, $op, $topic_tbl, $source, $sources_tbl;
if(have_access($op)=='ok') {
$query = "SELECT * FROM $news_tbl WHERE id=$id";
$text = $r['text'];
$topic = $r['topic'];
$textcd = $r['textcd'];
$title = $r['title'];
$author = $r['author'];
$icon = $r['icon'];
$source = $r['source'];
echo '<form name="post" method="post" action="'.$PHP_SELF.'?op='.$op.'" enctype="multipart/form-data"> <table width="80%" border="0" cellspacing="3" cellpadding="0" align="center">
<tr>
<td align="right" valign="top" class="uni_01">tytuł newsa</td>
<td>
<input type="text" name="title" size="35" value="'.$title.'">
</td>
</tr>
<tr>
<td align="right" valign="top" class="uni_01">link do wywiadu audio</td>
<td>
<input type="text" name="wywiad" size="35" value="'.$r['wywiad'].'">
</td>
</tr>
<tr><td align="right" valign="top" class="uni_01">Ľródło</td>
<td class="uni_01">
<select name="source">
<option value="0">brak</option>';
$query = "SELECT * FROM $sources_tbl";
$linkb = $rs['linkb'];
$sid = $rs['id'];
echo'<option value="'.$sid.'">'.$linkb.'</option>';}
<tr>
<td align="right" valign="top" class="uni_01">dział</td>
<td class="next">';
echo '<select name="topic"> <option value="no">(pomiń działy)</option>';
$query = "SELECT * FROM $topic_tbl ORDER BY title";
$tid = $r['id'];
$title = $r['title'];
if($tid==$topic) {
echo '<option value="'.$tid.'" selected>'.$title.'</option>'; } else {
echo '<option value="'.$tid.'">'.$title.'</option>'; }
}
</tr>
</table>';
echo '<table width="80%" cellpadding="0" cellspacing="0" border="0" align="center"> <tr>
<td class="uni_01"><br><Br>Krótka tre¶ć:<br><Br>';
$oFCKeditor = new FCKeditor('text') ;
$oFCKeditor->BasePath = '/FCKeditor/';
$oFCKeditor->Value = $text;
$oFCKeditor->Width = '100%' ;
$oFCKeditor->Height = '300' ;
$oFCKeditor->Create() ;
</tr>
<tr>
<td class="uni_01"><br>Długa tre¶ć:<br><br>';
$oFCKeditor = new FCKeditor('textcd') ;
$oFCKeditor->BasePath = '/FCKeditor/';
$oFCKeditor->Value = $textcd;
$oFCKeditor->Width = '100%' ;
$oFCKeditor->Height = '300' ;
$oFCKeditor->Create() ;
</tr>
</table>
<table cellpadding="0" cellspacing="0" border="0" align="center">
<tr>
<td align="right" class="uni_01">ikonka: upload <input class="poll" type="radio" name="itype" value="upload"></td>
<td>
<input type="file" name="icon" size="35">
</td>
</tr>
<tr>
<td align="right" class="uni_01">ikonka: url <input class="poll" type="radio" name="itype" value="url"';
if($icon<>'') echo ' checked'; <td>
<input type="text" name="icon_" size="35" value="'.$icon.'">
</td>
</tr>
<tr>
<td align="right" class="uni_01">ikonka: brak <input class="poll" type="radio" name="itype" value="none"';
if($icon=='') echo ' checked'; <td> </td>
</tr>
<tr>
<td align="right" class="uni_01">ikonka: z kolekcji <input class="poll" type="radio" name="itype" value="library"></td>
<td valign="top">
<script language="javascript">
<!--
function showimage()
{
if (!document.images)
return
document.images.pictures.src=
document.post.icons_.options[document.post.icons_.selectedIndex].value
}
//-->
</script>
<select name="icons_" onChange="showimage()">';
$i=0;
$h_roz = substr($h_plik, $h_dl, 3
); if($h_GIF==0 || $h_BMP==0 || $h_JPG==0 || $h_PNG==0){
$tab[$i]=$h_plik;
$i++;}}}
if($i!=0){
for($a=0 ; $a<$i ; $a++){
$h_plik=$tab[$a];
$h_nazwa = substr($h_plik, 0
, $h_dl-1
); echo '<option value="uploads/news/'.$h_plik.'">'.$h_nazwa.'</option>'; if(!$h_pierwszy)$h_pierwszy=$h_plik;
}}
if($icon=="")$icon="uploads/news/".$h_pierwszy;
</select>
</td>
</tr>
<tr><td></td><td><img src="'.$icon.'" name="pictures"></td></tr>
<tr><td></td><td height="20"></td></tr>
<tr>
<td align="right" valign="top" class="uni_01"> </td>
<td>
<input style="font-weight: bold;" type="submit" name="ok" value="zapisz">
<input type="reset" name="Reset" value="wyczy¶ć">
<input type="hidden" name="goto" value="'.$goto.'">
<input type="hidden" name="cmd" value="update">
<input type="hidden" name="id" value="'.$id.'">
</td>
</tr>
</table>
</form>
';
}
}
?>
Czy ktos pomógł by mi aby po edycji wyswietlało by mi sie wszytsko poprawnie a nie tak jak dotychczas kod html
Link 1 pisanie newsa:
http://ekonin.net/nowy.gifLink 2 edycja tego newsa:
http://ekonin.net/edycja.gifProszę o pomoc chyba nikt nie chce widzę pomagać tu