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['versionId']) ) { errorpage('Internal Database Access Error'); exit; } if(!is_numeric($aClean['thread'])) { $aClean['thread'] = 0; } ############################ # ADDS COMMENT TO DATABASE # ############################ if(!empty($aClean['body'])) { $oComment = new Comment(); $oComment->create($aClean['subject'], $aClean['body'], $aClean['thread'], $aClean['versionId']); redirect(apidb_fullurl("appview.php?versionId=".$oComment->iVersionId)); } ################################ # USER WANTS TO SUBMIT COMMENT # ################################ else { apidb_header("Add Comment"); $mesTitle = "Post New Comment"; if($aClean['thread'] > 0) { $hResult = query_appdb("SELECT * FROM appComments WHERE commentId = ".$aClean['thread']); $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['thread'])) { echo "\n"; } echo "
"; } apidb_footer(); ?>