getCategoryPath(), $appId, $versionId); echo html_frame_start("",'98%','',2); echo "

Category: ". $catFullPath ."
\n"; echo html_frame_end(); } /** * display the SUB apps that belong to this app */ function display_bundle($appId) { $oApp = new Application($appId); $result = query_appdb("SELECT appFamily.appId, appName, description FROM appBundle, appFamily ". "WHERE appFamily.queued='false' AND bundleId = $appId AND appBundle.appId = appFamily.appId"); if(!$result || mysql_num_rows($result) == 0) { return; // do nothing } echo html_frame_start("","98%","",0); echo "\n\n"; echo "\n"; echo " \n"; echo " \n"; echo "\n\n"; $c = 0; while($ob = mysql_fetch_object($result)) { //set row color $bgcolor = ($c % 2 == 0) ? "color0" : "color1"; //display row echo "\n"; echo " \n"; echo " \n"; echo "\n\n"; $c++; } echo "
Application NameDescription
appId\">".stripslashes($ob->appName)."".trim_description($oApp->sDescription)."
\n\n"; echo html_frame_end(); } /* Show note */ function show_note($sType,$oData){ global $oVersion; switch($sType) { case 'WARNING': $color = 'red'; $title = 'Warning'; break; case 'HOWTO'; $color = 'green'; $title = 'HOWTO'; break; default: if(!empty($oData->noteTitle)) $title = $oData->noteTitle; else $title = 'Note'; $color = 'blue'; } $s = html_frame_start("","98%",'',0); $s .= "\n"; $s .= "\n"; $s .= "\n"; if ($_SESSION['current']->hasPriv("admin") || $_SESSION['current']->isMaintainer($oVersion->iVersionId) || $_SESSION['current']->isSuperMaintainer($oVersion->iAppId)) { $s .= "'; } $s .= "
".$title."
\n"; $s .= $oData->noteDesc; $s .= "
"; $s .= "
noteId}\">"; $s .= ''; $s .= '
\n"; $s .= html_frame_end(); return $s; } if(!is_numeric($_REQUEST['appId']) && !is_numeric($_REQUEST['versionId'])) { errorpage("Something went wrong with the application or version id"); exit; } if ($_REQUEST['sub']) { if(($_REQUEST['sub'] == 'delete' ) && ($_REQUEST['buglinkId'])) { if(($_SESSION['current']->hasPriv("admin") || $_SESSION['current']->isMaintainer($oVersion->iVersionId) || $_SESSION['current']->isSuperMaintainer($oVersion->iAppId))) { $oBuglink = new bug($_REQUEST['buglinkId']); $oBuglink->delete(); redirect(apidb_fullurl("appview.php?versionId=".$_REQUEST['versionId'])); exit; } } if(($_REQUEST['sub'] == 'unqueue' ) && ($_REQUEST['buglinkId'])) { if(($_SESSION['current']->hasPriv("admin") || $_SESSION['current']->isMaintainer($oVersion->iVersionId) || $_SESSION['current']->isSuperMaintainer($oVersion->iAppId))) { $oBuglink = new bug($_REQUEST['buglinkId']); $oBuglink->unqueue(); redirect(apidb_fullurl("appview.php?versionId=".$_REQUEST['versionId'])); exit; } } if(($_REQUEST['sub'] == 'Submit a new bug link.' ) && ($_REQUEST['buglinkId'])) { $oBuglink = new bug(); $oBuglink->create($_REQUEST['versionId'],$_REQUEST['buglinkId']); redirect(apidb_fullurl("appview.php?versionId=".$_REQUEST['versionId'])); exit; } } /** * We want to see an application family (=no version). */ if($_REQUEST['appId']) { $oApp = new Application($_REQUEST['appId']); // show Vote Menu if($_SESSION['current']->isLoggedIn()) apidb_sidebar_add("vote_menu"); // header apidb_header("Viewing App - ".$oApp->sName); // cat display display_catpath($oApp->iCatId, $oApp->iAppId); // set Vendor $oVendor = new Vendor($oApp->iVendorId); // set URL $appLinkURL = ($oApp->sWebpage) ? "sWebpage."\">".substr(stripslashes($oApp->sWebpage),0,30)."": " "; // start display application echo html_frame_start("","98%","",0); echo "\n"; echo " \n"; echo " \n"; echo " \n"; echo "
\n"; echo ' ',"\n"; echo " \n"; echo " \n"; echo " \n"; // main URL echo " \n"; // optional links $result = query_appdb("SELECT * FROM appData WHERE appId = ".$_REQUEST['appId']." AND versionID = 0 AND type = 'url'"); if($result && mysql_num_rows($result) > 0) { echo " \n"; } // image $img = get_screenshot_img($oApp->iAppId); echo "\n"; echo "
Name ".$oApp->sName."
Vendor ". " ".$oVendor->sName."  \n"; echo "
BUGS ". " iAppId."\">Check for bugs in bugzilla  \n"; echo "
Votes "; echo vote_count_app_total($oApp->iAppId); echo "
URL".$appLinkURL."
Links\n"; while($ob = mysql_fetch_object($result)) { echo " ".substr(stripslashes($ob->description),0,30)."
\n"; } echo "
$img
\n"; /* close of name/vendor/bugs/url table */ echo "
\n"; // Display all supermaintainers maintainers of this application echo " \n"; echo " \n"; $other_maintainers = getSuperMaintainersUserIdsFromAppId($oApp->iAppId); if($other_maintainers) { echo " \n"; } else { echo " \n"; } // Display the app maintainer button echo ' \n"; echo "
Super maintainers:
    \n"; while(list($index, $userIdValue) = each($other_maintainers)) { $oUser = new User($userIdValue); echo "
  • ".$oUser->sRealname."
  • \n"; } echo "
No maintainers.Volunteer today!
'; if($_SESSION['current']->isLoggedIn()) { /* are we already a maintainer? */ if($_SESSION['current']->isSuperMaintainer($oApp->iAppId)) /* yep */ { echo '
'; } else /* nope */ { echo ' '; } echo " iAppId."\">"; echo " "; /* set superMaintainer to 1 because we are at the appFamily level */ echo "
"; if($_SESSION['current']->isSuperMaintainer($oApp->iAppId) || $_SESSION['current']->hasPriv("admin")) { echo '
'; } if($_SESSION['current']->isLoggedIn()) { echo '
'; echo ''; echo '
'; } if($_SESSION['current']->hasPriv("admin")) { $url = BASE."admin/deleteAny.php?what=appFamily&appId=".$oApp->iAppId."&confirmed=yes"; echo "
"; echo '
'; } } else { echo '
'; } echo "
\n"; /* close of super maintainers table */ echo "
\n"; /* close the table that contains the whole left hand side of the upper table */ // description echo " \n"; echo "
Description\n"; echo $oApp->sDescription; echo "
\n"; echo html_frame_end("For more details and user comments, view the versions of this application."); // display versions display_versions($oApp->iAppId,$oApp->aVersionsIds); // display bundle display_bundle($oApp->iAppId); // disabled for now //log_application_visit($oApp->iAppId); } /* * We want to see a particular version. */ else if($_REQUEST['versionId']) { $oVersion = new Version($_REQUEST['versionId']); $oApp = new Application($oVersion->iAppId); if(!$oApp->iAppId) { // Oops! application not found or other error. do something errorpage('Internal Database Access Error. No App found.'); exit; } if(!$oVersion->iVersionId) { // Oops! Version not found or other error. do something errorpage('Internal Database Access Error. No Version Found.'); exit; } // header apidb_header("Viewing App- ".$oApp->sName." Version - ".$oVersion->sName); // cat display_catpath($oApp->iCatId, $oApp->iAppId, $oVersion->iVersionId); // set URL $appLinkURL = ($oApp->sWebpage) ? "sWebpage."\">".substr(stripslashes($oApp->sWebpage),0,30)."": " "; // start version display echo html_frame_start("","98%","",0); echo '',"\n"; echo '',"\n"; echo "\n"; echo "\n"; // main URL echo " \n"; // links $result = query_appdb("SELECT * FROM appData WHERE versionID = ".$oVersion->iVersionId." AND type = 'url'"); if($result && mysql_num_rows($result) > 0) { echo " \n"; } // rating Area echo "\n"; echo "\n"; // image $img = get_screenshot_img($oApp->iAppId, $oVersion->iVersionId); echo "\n"; // display all maintainers of this application echo ""; // display the app maintainer button echo '"; if ($_SESSION['current']->hasPriv("admin") || $_SESSION['current']->isMaintainer($oVersion->iVersionId) || $_SESSION['current']->isSuperMaintainer($oVersion->iAppId)) { echo '"; } echo "
Name".$oApp->sName."
Version".$oVersion->sName."
URL".$appLinkURL."
Links\n"; while($ob = mysql_fetch_object($result)) { echo " url\">".substr(stripslashes($ob->description),0,30)."
\n"; } echo "
Maintainer Rating".$oVersion->sTestedRating."
Maintainers Version".$oVersion->sTestedRelease."
$img
Maintainers of this version:\n"; echo ""; $aMaintainers = getMaintainersUserIdsFromAppIdVersionId($oVersion->iVersionId); $aSupermaintainers = getSuperMaintainersUserIdsFromAppId($oVersion->iAppId); $aAllMaintainers = array_merge($aMaintainers,$aSupermaintainers); $aAllMaintainers = array_unique($aAllMaintainers); if(sizeof($aAllMaintainers)>0) { echo "\n"; } else { echo "\n"; } echo "
    "; while(list($index, $userIdValue) = each($aAllMaintainers)) { $oUser = new User($userIdValue); echo "
  • ".$oUser->sRealname."
  • "; } echo "
"; echo "No maintainers. Volunteer today!
'; if($_SESSION['current']->isLoggedIn()) { /* is this user a maintainer of this version by virtue of being a super maintainer */ /* of this app family? */ if($_SESSION['current']->isSuperMaintainer($oApp->iAppId)) { echo '
'; echo ''; echo ''; } else { /* are we already a maintainer? */ if($_SESSION['current']->isMaintainer($oVersion->iVersionId)) /* yep */ { echo ''; echo ''; echo ''; } else /* nope */ { echo ''; echo ''; } } echo "iAppId."\">"; echo "iVersionId."\">"; echo "
"; } else { echo '
'; echo ''; echo ''; echo '
'; } echo "
'; echo '
'; echo ''; echo ''; echo ''; echo '
'; $url = BASE."admin/deleteAny.php?what=appVersion&appId=".$oApp->iAppId."&versionId=".$oVersion->iVersionId."&confirmed=yes"; echo "
"; echo ''; echo '
'; echo '
'; echo ''; echo ''; echo '
'; echo '
iVersionId.'>'; echo ''; echo ''; echo '
'; echo '
iVersionId.'>'; echo ''; echo ''; echo '
'; echo "
\n"; // description echo ""; /* close the table */ echo "
Description
\n"; echo $oVersion->sDescription; echo "
\n"; echo html_frame_end(); view_version_bugs($oVersion->iVersionId, $oVersion->aBuglinkIds); $rNotes = query_appdb("SELECT * FROM appNotes WHERE versionId = ".$oVersion->iVersionId); while( $oNote = mysql_fetch_object($rNotes) ) { echo show_note($oNote->noteTitle,$oNote); } // Comments Section view_app_comments($oVersion->iVersionId); } else { // Oops! Called with no params, bad llamah! errorpage('Page Called with No Params!'); exit; } apidb_footer(); ?>