\n";
echo html_frame_end("Click the Version Name to view the details of that Version");
}
}
if(!is_numeric($_REQUEST['appId']) && !is_numeric($_REQUEST['versionId']))
{
errorpage("Something went wrong with the application or version id");
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) ? "webPage\">".substr(stripslashes($oApp->sWebpage),0,30)."": " ";
// start display application
echo html_frame_start("","98%","",0);
echo "";
echo "
\n"; /* close of super maintainers table */
echo "
\n";
echo " \n";
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 Version - ".$oVersion->sName);
// cat
display_catpath($oApp->iCatId, $oApp->iAppId, $oVersion->iVersionId);
// set URL
$appLinkURL = ($oApp->sWebpage) ? "".substr(stripslashes($oApp->sWebpage),0,30)."": " ";
// start version display
echo html_frame_start("","98%","",0);
echo "";
echo '
',"\n";
echo '
',"\n";
echo "
Name
".$oApp->sName."
\n";
echo "
Version
".$oVersion->sName."
\n";
// links
$result = query_appdb("SELECT * FROM appData WHERE versionID = ".$oVersion->iVersionId." AND type = 'url'");
if($result && mysql_num_rows($result) > 0)
{
echo "
";
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 '";
} else
{
echo '';
}
echo "
";
if ($_SESSION['current']->hasPriv("admin") || $_SESSION['current']->isMaintainer($oVersion->iVersionId))
{
echo "