isLoggedIn()) { apidb_header("Please login"); echo "To submit a comment for an application you must be logged in. Please login now or create a new account.","\n"; exit; } if( !is_numeric($aClean['iVersionId']) ) util_show_error_page('Internal Database Access Error'); if(!is_numeric($aClean['iThread'])) { $aClean['iThread'] = 0; } ############################ # ADDS COMMENT TO DATABASE # ############################ if(!empty($aClean['sBody'])) { $oComment = new Comment(); $oComment->create($aClean['sSubject'], $aClean['sBody'], $aClean['iThread'], $aClean['iVersionId']); redirect(apidb_fullurl("appview.php?iVersionId=".$oComment->iVersionId)); } ################################ # USER WANTS TO SUBMIT COMMENT # ################################ else { apidb_header("Add Comment"); $mesTitle = "Post New Comment"; if($aClean['iThread'] > 0) { $hResult = query_parameters("SELECT * FROM appComments WHERE commentId = '?'", $aClean['iThread']); $oRow = mysql_fetch_object($hResult); if($oRow) { $mesTitle = "Replying To ... $oRow->subject\n"; $originator = $oRow->userId; echo html_frame_start($oRow->subject,500); echo htmlify_urls($oRow->body), "

\n"; echo html_frame_end(); } } echo "
\n"; echo html_frame_start($mesTitle,500,"",0); echo '',"\n"; echo "\n"; echo " \n"; echo "\n"; echo " \n"; echo "\n"; echo "\n"; echo "
From:  ".$_SESSION['current']->sRealname."
Subject:  
\n"; echo " \n"; echo " \n"; echo "
\n"; echo html_frame_end(); echo "\n"; echo "\n"; echo "\n"; if (!empty($aClean['iThread'])) { echo "\n"; } echo "
"; } apidb_footer(); ?>