// end foreach } echo "</form></td><td valign=\"top\" width=33%>"; if ($dir = opendir('./../content/')) { while (($file = readdir($dir)) !== false) { if (is_file('./../content/' . $file)) { //no folders echo "{$file}<br>\n"; } //if } // while closedir($dir); } echo "</td></tr></table>"; CLoseTable(); echo "<br />"; //END SOURCEFILE //START IMAGEFILE OpenTable(); echo "<table border=0 cellpadding=5 width=95%>"; echo "<tr><td colspan=3><center><h3>" . _CC_TITLE_IMAGE . "</h3></center></td></tr>"; echo "<tr><td width=33%><b>" . _CC_NUM_IMAGE . "</b></td><td><b>" . _CC_SEL_IMAGE . "</b></td><td><b>" . _CC_OLD_IMAGE . "</b></td></tr>"; echo "<tr><td valign=\"top\">"; echo "<form action=\"./fm.php\" method=\"post\">"; for ($j = 1; $j < 6; $j++) { echo "<input type=\"radio\" name=\"numfiles1\" value=\"{$j}\">{$j}\n"; } echo "<br><input type=\"Submit\" value=\"" . _CC_SUB_IMAGE . "\" name=\"regnum1\">"; echo "</form></td>"; echo "<td valign=\"top\" width=33%><form enctype=\"multipart/form-data\" method=\"post\" action=\"./fm.php\">";
function galEditComment() { global $db, $prefix, $user_prefix, $admin_file, $moduleName; $commentId = isset($_GET['id']) ? intval($_GET['id']) : 0; $commentEditSave = isset($_GET['save']) ? intval($_GET['save']) : 0; if (!$commentId) { $commentId = isset($_POST['id']) ? intval($_POST['id']) : 0; } if (!$commentEditSave) { $commentEditSave = isset($_POST['save']) ? intval($_POST['save']) : 0; } if ($commentId && !$commentEditSave) { include 'header.php'; galAdminMenu(); $comment = $db->sql_fetchrow($db->sql_query('SELECT * FROM ' . $prefix . '_igallery_comments WHERE comment_id=' . $commentId . ' LIMIT 1 ;')); if ($comment) { $userId = $comment['comment_userid']; $usrInfo = $db->sql_fetchrow($db->sql_query('SELECT username FROM ' . $user_prefix . '_users WHERE user_id=' . $userId . ' LIMIT 1 ;')); $posterName = $usrInfo['username']; $message = $comment['comment_data']; echo '<div id="comment-editor">' . PHP_EOL; echo '<h2>' . _IG_ADM_COMMENT_EDITOR . '</h2>' . PHP_EOL; echo '<form action="' . $admin_file . '.php" method="post">' . PHP_EOL; echo ' <p>' . PHP_EOL; echo ' <label for="comment_userid">' . _IG_USERNAME . ':</label><br />' . PHP_EOL; echo ' <input type="text" name="comment_userid" id="comment_userid" value="' . $posterName . '" readonly="readonly" />' . PHP_EOL; echo ' </p>' . PHP_EOL; echo ' <p>' . PHP_EOL; echo ' <label for="comment_data">' . _IG_COMMENT . ':</label><br />' . PHP_EOL; echo ' <textarea name="comment_data" id="comment_data" cols="80" rows="10">' . $message . '</textarea>' . PHP_EOL; echo ' </p>' . PHP_EOL; echo ' <input type="hidden" name="op" value="galEditComment" />' . PHP_EOL; echo ' <input type="hidden" name="id" value="' . $commentId . '" />' . PHP_EOL; echo ' <input type="hidden" name="save" value="1" />' . PHP_EOL; echo ' <input type="submit" value="' . _IG_ADM_SAVE_COMMENT . '" />' . PHP_EOL; echo ' </form>' . PHP_EOL; echo '</div>' . PHP_EOL; } else { echo '<div id="comment-editor">' . PHP_EOL; echo ' <div class="warning">' . _IG_ERROR_LOADING_INFO . '</div>' . PHP_EOL; echo '</div>' . PHP_EOL; } CLoseTable(); include 'footer.php'; } elseif ($commentId && $commentEditSave) { $message = check_html($_POST['comment_data'], 'nohtml'); $result = $db->sql_query('UPDATE ' . $prefix . '_igallery_comments SET comment_data=\'' . $message . '\' WHERE comment_id=' . $commentId . ' LIMIT 1 ;'); if ($result) { header('location:' . $admin_file . '.php?op=galManageComments&updated=1'); } else { header('location:' . $admin_file . '.php?op=galManageComments&updated=2'); } } else { header('location:' . $admin_file . '.php?op=galManageComments'); } }