function reviews() { global $xoopsDB; $ids = isset($_GET['ids']) ? $_GET['ids'] : 0; if ($ids <= 0) { header('location: downs.php'); die; } include 'functions.php'; include XOOPS_ROOT_PATH . "/include/xoopscodes.php"; xoops_cp_header(); DP_ShowNav(); echo "<table width='100%' cellspacing='1' class='outer'>\n\t\t\t<tr><th colspan='2'>" . _AM_RMDP_REVIEWTITLE . "</th></tr>\n\t\t\t<form name='frmRev' method='post' action='downs.php'>\n\t\t\t<tr><td class='even' align='left'>" . _AM_RMDP_SHOTDOWN . "</td>\n\t\t\t<td class='odd' align='left'><strong>" . DP_DownloadName($ids) . "</strong></td>\n\t\t\t</tr><tr align='left'><td class='even'>" . _AM_RMDP_REVIEW . "</td>\n\t\t\t<td class='odd'>\n\t\t\t"; list($text) = $xoopsDB->fetchRow($xoopsDB->query("SELECT text FROM " . $xoopsDB->prefix('rmdp_editorcom') . " WHERE id_soft='{$ids}'")); $GLOBALS['text'] = $text; xoopsCodeTarea("text", 20, 15); xoopsSmilies("text"); echo "</td></tr>\n\t\t <tr align='left'><td class='even'>" . _AM_RMDP_RATING . "</td>\n\t\t <td class='odd'><select name='rate'>"; list($rate) = $xoopsDB->fetchRow($xoopsDB->query("SELECT calificacion FROM " . $xoopsDB->prefix('rmdp_software') . " WHERE id_soft='{$ids}'")); for ($i = 1; $i <= 5; $i++) { if ($i == $rate) { echo "<option value='{$i}' selected>{$i}</option>"; } else { echo "<option value='{$i}'>{$i}</option>"; } } echo "</td></tr>\n\t\t <tr align='left'><td class='even'> </td>\n\t\t <td class='odd'><input type='submit' name='sbt' value='" . _AM_RMDP_MODIFY . "'>\n\t\t <input type='hidden' name='op' value='savereview'>\n\t\t <input type='hidden' name='ids' value='{$ids}'></td></tr></form></table>"; xoops_cp_footer(); }
function ModifyShot() { global $xoopsDB, $ids; $shot = $_GET['shot']; if ($shot <= 0) { header('location: downs.php'); die; } $result = $xoopsDB->query("SELECT * FROM " . $xoopsDB->prefix('rmdp_shots') . " WHERE id_shot='{$shot}'"); $num = $xoopsDB->getRowsNum($result); if ($num <= 0) { redirect_header('downs.php?op=shots&ids=' . $ids, 1, _AM_RMDP_SHOTNOEXIST); die; } $row = $xoopsDB->fetchArray($result); include 'functions.php'; xoops_cp_header(); DP_ShowNav(); echo "<table width='60%' align='center' class='outer'>\n\t\t<tr><th colspan='2'>" . _AM_RMDP_SHOTMOD . "</th></tr>\n\t\t<form name='frmNew' method='post' action='downs.php'>\n\t\t<tr align='left'><td class='even'>" . _AM_RMDP_SHOTDOWN . "</td>\n\t\t<td class='odd'><strong>" . DP_DownloadName($row['id_soft']) . "</strong>\n\t\t<input type='hidden' name='ids' value='{$row['id_soft']}'></td></tr>\n\t\t<tr align='left'><td class='even'>" . _AM_RMDP_SHOTSMALL . "</td>\n\t\t<td class='odd'><input type='text' value='{$row['small']}' name='small' size='30' maxlength='255'></td></tr>\n\t\t<tr align='left'><td class='even'>" . _AM_RMDP_SHOTBIG . "</td>\n\t\t<td class='odd'><input type='text' value='{$row['big']}' name='big' size='30' maxlength='255'></td></tr>\n\t\t<tr align='left'><td class='even'>" . _AM_RMDP_SHOTDESC . "</td>\n\t\t<td class='odd'><input type='text' value='{$row['text']}' name='text' size='50' maxlength='255'></td></tr>\n\t\t<tr><td class='even'> </td>\n\t\t<td class='odd' align='left'>\n\t\t<input type='submit' name='sbt' value='" . _AM_RMDP_MODIFY . "'>\n\t\t<input type='button' name='cancel' value='" . _AM_RMDP_CANCEL . "' onClick='history.go(-1);'>\n\t\t<input type='hidden' name='action' value='savemod'>\n\t\t<input type='hidden' name='op' value='shots'>\n\t\t<input type='hidden' name='shot' value='{$shot}'>\n\t </td></tr></form>\n\t\t</table>"; xoops_cp_footer(); }