1
I have coded in the koivi editor within this form and when I press the modify button, to modify the review, it places a new review post instead of replacing the old like the original form does.
echo "<table>";
echo "<form method=post action=index.php>";
echo "<tr><td>"._MD_FILEID."</td><td><b>$lid</b></td></tr>";
echo "<tr><td>"._MD_FILETITLE."</td><td><input type=text name=title value="$title" size=50 maxlength=100></input></td></tr>n";
echo "<tr><td>"._MD_DLURL."</td><td><input type=text name=url value="$url" size=50 maxlength=100></input></td></tr>n";
echo "<tr><td>"._MD_HOMEPAGEC."</td><td><input type=text name=homepage value="$homepage" size=50 maxlength=100></input></td></tr>n";
echo "<tr><td>"._MD_CATEGORYC."</td><td>";
$mytree->makeMySelBox("title", "title", $cid);
//TR EDIT: Koivi Editor and File Upload
echo "<tr><td align="right"nowrap>"._MD_SHOTIMAGE."</td><td>n";
echo "<input type="text" name="logourl" value="$logourl" size="50" maxlength="60" value="">n";
echo "<input type='button' value='Upload' onclick='javascript:openWithSelfMain("".XOOPS_URL."/modules/myReviews/upload.php?img_path=$img_path&target=logourl&logo=1&target2=cimgwidth&target3=cimgheight","upload",450,450);' />n";
echo "<tr><td align="right"></td><td>";
$directory = XOOPS_URL."/modules/myReviews/images/shots/";
printf(_MD_MUSTBEVALID,$directory);
echo "</td></tr>n";
//echo "<input type="hidden" name="op" value="addDownload"></input>";
echo "<tr><td align="right" valign="top" nowrap>"._MD_DESCRIPTIONC."</td><td>n";
$sform = new XoopsThemeForm( _MD_DESCRIPTIONC, "storyform", "index.php" );
$hidden_element = new XoopsFormHidden('op', 'addDownload');
$sform->addElement( $hidden_element );
$wysiwyg_text_area = new XoopsFormWysiwygTextArea(_MD_DESCRIPTIONC, 'description', $description , '100%', '400px','');
$wysiwyg_text_area->setUrl("/class/wysiwyg");
$sform->addElement( $wysiwyg_text_area );
$button_tray = new XoopsFormElementTray( '', '' );
$button_tray->addElement( new XoopsFormButton( '', 'submit', _MD_MODIFY, 'submit') );
$sform->addElement( $button_tray);
$sform->display();
echo "</td></tr>n";
echo "</td></tr>n";
echo "</table>";
echo "</form>n";
echo "<table><tr><td>n";
echo myTextForm("index.php?op=delDownload&lid=".$lid , _MD_DELETE);
echo "</td><td>n";
echo myTextForm("index.php?op=booksConfigMenu", _MD_CANCEL);
echo "</td></tr></table>n";
echo "<hr>";