Module: appdb Branch: master Commit: 1753ff9757830afea1b7e78d48811cd0d0fdfc32 URL: http://source.winehq.org/git/appdb.git/?a=commit;h=1753ff9757830afea1b7e78d4...
Author: Alexander Nicolaysen Sørnes alex@thehandofagony.com Date: Mon Oct 22 17:09:24 2007 +0200
Remove addcomment.php
---
addcomment.php | 89 -------------------------------------------------------- 1 files changed, 0 insertions(+), 89 deletions(-)
diff --git a/addcomment.php b/addcomment.php deleted file mode 100644 index 92bedaf..0000000 --- a/addcomment.php +++ /dev/null @@ -1,89 +0,0 @@ -<?php -/** - * Adds a new comment. - * - * Mandatory parameters: - * - iVersionId, version identifier - * - * Optional parameters: - * - iThread, parent comment identifier - * - sBody, body of the comment - * - sSubject, title of the comment - */ - -// application environment -require("path.php"); -require(BASE."include/incl.php"); -require_once(BASE."include/comment.php"); - -// you must be logged in to submit comments -if(!$_SESSION['current']->isLoggedIn()) -{ - apidb_header("Please login"); - echo "To submit a comment for an application you must be logged in. Please <a href=\"account.php?sCmd=login\">login now</a> or create a <a href=\"account.php?sCmd=new\">new account</a>.","\n"; - exit; -} - -// the user submitted his comment -if(!empty($aClean['sBody'])) -{ - // create a new comment - $oComment = new Comment(); - $oComment->sSubject = $aClean['sSubject']; - $oComment->sBody = $aClean['sBody']; - $oComment->iParentId = $aClean['iThread']; - $oComment->iVersionId = $aClean['iVersionId']; - $oComment->create(); - - $oVersion = new version($oComment->iVersionId); - util_redirect_and_exit($oVersion->objectMakeUrl()); -// let's show the comment form -} else -{ - apidb_header("Add Comment"); - - $mesTitle = "<b>Post New Comment</b>"; - - if($aClean['iThread'] > 0) - { - $hResult = query_parameters("SELECT * FROM appComments WHERE commentId = '?'", - $aClean['iThread']); - $oRow = query_fetch_object($hResult); - if($oRow) - { - $mesTitle = "<b>Replying To ...</b> $oRow->subject\n"; - echo html_frame_start($oRow->subject,500); - echo htmlify_urls($oRow->body), "<br /><br />\n"; - echo html_frame_end(); - } - } - - echo "<p align=\"center\">Enter your comment in the box below."; - echo "</br>Please do not paste large terminal or debug outputs here.</p>"; - - echo "<form method=\"post\" action=\"addcomment.php\">\n"; - - echo html_frame_start($mesTitle,500,"",0); - - echo '<table width="100%" border=0 cellpadding=0 cellspacing=1>',"\n"; - echo "<tr class=\"color0\"><td align=right><b>From:</b> </td>\n"; - echo " <td> ".$_SESSION['current']->sRealname."</td></tr>\n"; - echo "<tr class=\"color0\"><td align=right><b>Subject:</b> </td>\n"; - echo " <td> <input type=\"text\" size=\"35\" name=\"sSubject\" value=\"".$aClean['sSubject']."\" /> </td></tr>\n"; - echo "<tr class=\"color1\"><td colspan=2><textarea name=\"sBody\" cols=\"70\" rows=\"15\" wrap=\"virtual\">".$aClean['sBody']."</textarea></td></tr>\n"; - echo "<tr class=\"color1\"><td colspan=2 align=center>\n"; - echo " <input type=\"submit\" value=\"Post Comment\" class=\"button\" />\n"; - echo " <input type=\"reset\" value=\"Reset\" class=\"button\" />\n"; - echo "</td></tr>\n"; - echo "</table>\n"; - - echo html_frame_end(); - - echo "<input type=\"hidden\" name=\"iThread\" value=\"".$aClean['iThread']."\" />\n"; - echo "<input type=\"hidden\" name=\"iAppId\" value=\"".$aClean['iAppId']."\" />\n"; - echo "<input type=\"hidden\" name=\"iVersionId\" value=\"".$aClean['iVersionId']."\" />\n"; - echo "</form>"; -} - -apidb_footer(); -?>