Prefix all GPC variables according to our coding standard

This commit is contained in:
Jonathan Ernst
2006-07-06 17:27:54 +00:00
committed by WineHQ
parent bd19dc7a0b
commit 735a2bc65f
59 changed files with 794 additions and 799 deletions

View File

@@ -13,12 +13,12 @@ header("Cache-control: no-cache");
$aClean = array(); //array of filtered user input
// check command and process
if(!empty($_POST['cmd']))
$aClean['cmd'] = makeSafe( $_POST['cmd'] );
if(!empty($_POST['sCmd']))
$aClean['sCmd'] = makeSafe( $_POST['sCmd'] );
else
$aClean['cmd'] = makeSafe( $_GET['cmd'] );
$aClean['sCmd'] = makeSafe( $_GET['sCmd'] );
do_account($aClean['cmd']);
do_account($aClean['sCmd']);
/**
@@ -195,7 +195,7 @@ function cmd_send_passwd()
.$shNote, "red");
}
redirect(apidb_fullurl("account.php?cmd=login"));
redirect(apidb_fullurl("account.php?sCmd=login"));
}
/**

View File

@@ -6,10 +6,10 @@ require(BASE."include/mail.php");
$aClean = array(); //array of filtered user input
$aClean['versionId'] = makeSafe($_REQUEST['versionId']);
$aClean['thread'] = makeSafe($_REQUEST['thread']);
$aClean['body'] = makeSafe($_REQUEST['body']);
$aClean['subject'] = makeSafe($_REQUEST['subject']);
$aClean['iVersionId'] = makeSafe($_REQUEST['iVersionId']);
$aClean['iThread'] = makeSafe($_REQUEST['iThread']);
$aClean['sBody'] = makeSafe($_REQUEST['sBody']);
$aClean['sSubject'] = makeSafe($_REQUEST['sSubject']);
/********************************/
/* code to submit a new comment */
@@ -22,29 +22,29 @@ $aClean['subject'] = makeSafe($_REQUEST['subject']);
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?cmd=login\">login now</a> or create a <a href=\"account.php?cmd=new\">new account</a>.","\n";
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;
}
if( !is_numeric($aClean['versionId']) )
if( !is_numeric($aClean['iVersionId']) )
{
util_show_error_page('Internal Database Access Error');
exit;
}
if(!is_numeric($aClean['thread']))
if(!is_numeric($aClean['iThread']))
{
$aClean['thread'] = 0;
$aClean['iThread'] = 0;
}
############################
# ADDS COMMENT TO DATABASE #
############################
if(!empty($aClean['body']))
if(!empty($aClean['sBody']))
{
$oComment = new Comment();
$oComment->create($aClean['subject'], $aClean['body'], $aClean['thread'], $aClean['versionId']);
redirect(apidb_fullurl("appview.php?versionId=".$oComment->iVersionId));
$oComment->create($aClean['sSubject'], $aClean['sBody'], $aClean['iThread'], $aClean['iVersionId']);
redirect(apidb_fullurl("appview.php?iVersionId=".$oComment->iVersionId));
}
################################
@@ -56,10 +56,10 @@ else
$mesTitle = "<b>Post New Comment</b>";
if($aClean['thread'] > 0)
if($aClean['iThread'] > 0)
{
$hResult = query_parameters("SELECT * FROM appComments WHERE commentId = '?'",
$aClean['thread']);
$aClean['iThread']);
$oRow = mysql_fetch_object($hResult);
if($oRow)
{
@@ -79,8 +79,8 @@ else
echo "<tr class=\"color0\"><td align=right><b>From:</b>&nbsp;</td>\n";
echo " <td>&nbsp;".$_SESSION['current']->sRealname."</td></tr>\n";
echo "<tr class=\"color0\"><td align=right><b>Subject:</b>&nbsp;</td>\n";
echo " <td>&nbsp;<input type=\"text\" size=\"35\" name=\"subject\" value=\"".$aClean['subject']."\" /> </td></tr>\n";
echo "<tr class=\"color1\"><td colspan=2><textarea name=\"body\" cols=\"70\" rows=\"15\" wrap=\"virtual\">".$aClean['body']."</textarea></td></tr>\n";
echo " <td>&nbsp;<input type=\"text\" size=\"35\" name=\"sSubject\" value=\"".$aClean['sSubject']."\" /> </td></tr>\n";
echo "<tr class=\"color1\"><td colspan=2><textarea name=\"body\" 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";
@@ -89,12 +89,12 @@ else
echo html_frame_end();
echo "<input type=\"hidden\" name=\"thread\" value=\"".$aClean['thread']."\" />\n";
echo "<input type=\"hidden\" name=\"appId\" value=\"".$aClean['appId']."\" />\n";
echo "<input type=\"hidden\" name=\"versionId\" value=\"".$aClean['versionId']."\" />\n";
if (!empty($aClean['thread']))
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";
if (!empty($aClean['iThread']))
{
echo "<input type=\"hidden\" name=\"originator\" value=\"$originator\" />\n";
echo "<input type=\"hidden\" name=\"iOriginator\" value=\"$originator\" />\n";
}
echo "</form>";
}

View File

@@ -33,7 +33,7 @@ if(!$_SESSION['current']->hasPriv("admin") &&
//set link for version
if(is_numeric($aClean['iVersionId']) and !empty($aClean['iVersionId']))
{
$sVersionLink = "versionId={$aClean['iVersionId']}";
$sVersionLink = "iVersionId={$aClean['iVersionId']}";
}
else
exit;

View File

@@ -5,46 +5,46 @@ require(BASE."include/category.php");
$aClean = array(); //array of filtered user input
$aClean['catId'] = makeSafe($_REQUEST['catId']);
$aClean['name'] = makeSafe($_REQUEST['name']);
$aClean['description'] = makeSafe($_REQUEST['description']);
$aClean['parentId'] = makeSafe($_REQUEST['parentId']);
$aClean['submit'] = makeSafe($_REQUEST['submit']);
$aClean['iCatId'] = makeSafe($_REQUEST['iCatId']);
$aClean['sName'] = makeSafe($_REQUEST['sName']);
$aClean['sDescription'] = makeSafe($_REQUEST['sDescription']);
$aClean['iParentId'] = makeSafe($_REQUEST['iParentId']);
$aClean['sSubmit'] = makeSafe($_REQUEST['sSubmit']);
if(!$_SESSION['current']->hasPriv("admin"))
{
util_show_error_page();
exit;
}
$oCat = new Category($aClean['catId']);
if($aClean['submit'])
$oCat = new Category($aClean['iCatId']);
if($aClean['sSubmit'])
{
$oCat->update($aClean['name'],$aClean['description'],$aClean['parentId']);
redirect(apidb_fullurl("appbrowse.php?catId=".$oCat->iCatId));
$oCat->update($aClean['sName'],$aClean['sDescription'],$aClean['iParentId']);
redirect(apidb_fullurl("appbrowse.php?iCatId=".$oCat->iCatId));
}
else
{
apidb_header("Add Category");
$sQuery = "SELECT catId, catName FROM appCategory WHERE catId!='?'";
$hResult = query_parameters($sQuery, $aClean['catId']);
$hResult = query_parameters($sQuery, $aClean['iCatId']);
while($oRow = mysql_fetch_object($hResult))
{
$aCatsIds[]=$oRow->catId;
$aCatsNames[]=$oRow->catName;
}
echo "<form method=\"post\" action=\"addCategory.php\">
<input type=\"hidden\" name=\"catId\" value=\"".$oCat->iCatId."\" />
<input type=\"hidden\" name=\"iCatId\" value=\"".$oCat->iCatId."\" />
<table border=\"0\" width=\"100%\" cellspacing=\"0\" cellpadding=\"2\">
<tr>
<td width=\"15%\" class=\"box-label\"><b>Category name</b></td>
<td class=\"box-body\">
<input type=\"text\" size=\"50\" name=\"name\" value=\"".$oCat->sName."\" />
<input type=\"text\" size=\"50\" name=\"sName\" value=\"".$oCat->sName."\" />
</td>
</tr>
<tr>
<td width=\"15%\" class=\"box-label\"><b>Description</b></td>
<td class=\"box-body\">
<input type=\"text\" size=\"50\" name=\"description\" value=\"".$oCat->sDescription."\" />
<input type=\"text\" size=\"50\" name=\"sDescription\" value=\"".$oCat->sDescription."\" />
</td>
</tr>
<tr>
@@ -55,7 +55,7 @@ else
</tr>
<tr>
<td colspan=\"2\" class=\"box-body\">
<input type=\"submit\" name=\"submit\" value=\"Submit\" />
<input type=\"submit\" name=\"sSubmit\" value=\"Submit\" />
</td>
</tr>
</table>

View File

@@ -11,12 +11,12 @@ require(BASE."include/application.php");
$aClean = array(); //array of user input
$aClean['id'] = makeSafe($_REQUEST['id']);
$aClean['sub'] = makeSafe($_REQUEST['sub']);
$aClean['add'] = makeSafe($_REQUEST['add']);
$aClean['description'] = makeSafe($_REQUEST['description']);
$aClean['replyText'] = makeSafe($_REQUEST['replyText']);
$aClean['reject'] = makeSafe($_REQUEST['reject']);
$aClean['iId'] = makeSafe($_REQUEST['iId']);
$aClean['sSub'] = makeSafe($_REQUEST['sSub']);
$aClean['sAdd'] = makeSafe($_REQUEST['sAdd']);
$aClean['sDescription'] = makeSafe($_REQUEST['sDescription']);
$aClean['sReplyText'] = makeSafe($_REQUEST['sReplyText']);
$aClean['sReject'] = makeSafe($_REQUEST['sReject']);
// deny access if not admin or at least some kind of maintainer
if(!$_SESSION['current']->hasPriv("admin") && !$_SESSION['current']->isMaintainer())
@@ -26,7 +26,7 @@ if(!$_SESSION['current']->hasPriv("admin") && !$_SESSION['current']->isMaintaine
}
// shows the list of appdata in queue
if (!$aClean['id'])
if (!$aClean['iId'])
{
apidb_header("Admin Application Data Queue");
@@ -76,7 +76,7 @@ if (!$aClean['id'])
echo "<td>".Application::lookup_name($oRow->appId)."</td>\n";
echo "<td>".Version::lookup_name($oRow->versionId)."</td>\n";
echo "<td>".$oRow->type."</td>\n";
echo "<td align=\"center\">[<a href='adminAppDataQueue.php?id=$oRow->id'>process</a>]</td>\n";
echo "<td align=\"center\">[<a href='adminAppDataQueue.php?iId=$oRow->id'>process</a>]</td>\n";
echo "</tr>\n\n";
$c++;
}
@@ -85,14 +85,14 @@ if (!$aClean['id'])
}
} else // shows a particular appdata
{
$hResult = $_SESSION['current']->getAppDataQuery($aClean['id'], false, false);
$hResult = $_SESSION['current']->getAppDataQuery($aClean['iId'], false, false);
$obj_row = mysql_fetch_object($hResult);
if(!$aClean['sub']=="inside_form")
if(!$aClean['sSub']=="inside_form")
{
apidb_header("Admin Application Data Queue");
echo '<form name="qform" action="adminAppDataQueue.php" method="post">',"\n";
echo '<form name="sQform" action="adminAppDataQueue.php" method="post">',"\n";
// help
echo "<div align=center><table width='90%' border=0 cellpadding=3 cellspacing=0><tr><td>\n\n";
echo "Please enter an accurate and personalized reply anytime a submitted scrrenshot is rejected.\n";
@@ -113,7 +113,7 @@ if (!$aClean['id'])
//dataDescription
echo '<tr valign=top><td class=color0><b>Description</b></td>',"\n";
echo '<td><textarea name="description" rows=10 cols=35>'.stripslashes($obj_row->description).'</textarea></td></tr>',"\n";
echo '<td><textarea name="sDescription" rows=10 cols=35>'.stripslashes($obj_row->description).'</textarea></td></tr>',"\n";
//data
if($obj_row->type == "image")
@@ -121,16 +121,16 @@ if (!$aClean['id'])
$oScreenshot = new Screenshot($obj_row->id);
echo '<tr valign=top><td class=color0><b>Submited image</b></td>',"\n";
echo '<td>';
$imgSRC = '<img width="'.$oScreenshot->oThumbnailImage->width.'" height="'.$oScreenshot->oThumbnailImage->height.'" src="../appimage.php?queued=true&id='.$obj_row->id.'" />';
$imgSRC = '<img width="'.$oScreenshot->oThumbnailImage->width.'" height="'.$oScreenshot->oThumbnailImage->height.'" src="../appimage.php?bQueued=true&iId='.$obj_row->id.'" />';
// generate random tag for popup window
$randName = User::generate_passwd(5);
// set image link based on user pref
$img = '<a href="javascript:openWin(\'../appimage.php?queued=true&id='.$obj_row->id.'\',\''.$randName.'\','.$oScreenshot->oScreenshotImage->width.','.($oScreenshot->oScreenshotImage->height+4).');">'.$imgSRC.'</a>';
$img = '<a href="javascript:openWin(\'../appimage.php?bQueued=true&iId='.$obj_row->id.'\',\''.$randName.'\','.$oScreenshot->oScreenshotImage->width.','.($oScreenshot->oScreenshotImage->height+4).');">'.$imgSRC.'</a>';
if ($_SESSION['current']->isLoggedIn())
{
if ($_SESSION['current']->getpref("window:screenshot") == "no")
{
$img = '<a href="../appimage.php?queued=true&id='.$obj_row->id.'">'.$imgSRC.'</a>';
$img = '<a href="../appimage.php?bQueued=true&iId='.$obj_row->id.'">'.$imgSRC.'</a>';
}
}
echo $img;
@@ -138,26 +138,26 @@ if (!$aClean['id'])
} elseif($obj_row->type == "url")
{
echo '<tr valign=top><td class=color0><b>Submitted link</b></td>',"\n";
echo '<td><textarea name="content" rows=10 cols=35>'.stripslashes($obj_row->url).'</textarea></td></tr>',"\n";
echo '<td><textarea name="sContent" rows=10 cols=35>'.stripslashes($obj_row->url).'</textarea></td></tr>',"\n";
}
//email response
echo '<tr valign=top><td class=color0><b>Email reply</b></td>',"\n";
echo "<td><textarea name='replyText' rows=10 cols=35>Enter a personalized reason for acceptance or rejection of the submitted application data here</textarea></td></tr>\n";
echo "<td><textarea name='sReplyText' rows=10 cols=35>Enter a personalized reason for acceptance or rejection of the submitted application data here</textarea></td></tr>\n";
/* Add button */
echo '<tr valign=top><td class=color3 align=center colspan=2>' ,"\n";
echo '<input type=submit name=add value=" Add data to this application " class=button /> </td></tr>',"\n";
echo '<input type=submit name=sAdd value=" Add data to this application " class=button /> </td></tr>',"\n";
/* Reject button */
echo '<tr valign=top><td class=color3 align=center colspan=2>' ,"\n";
echo '<input type=submit name=reject value=" Reject this request " class=button /></td></tr>',"\n";
echo '<input type=submit name=sReject value=" Reject this request " class=button /></td></tr>',"\n";
echo '</table>',"\n";
echo '<input type=hidden name="sub" value="inside_form" />',"\n";
echo '<input type=hidden name="id" value="'.$aClean['id'].'" />',"\n";
echo '<input type=hidden name="sSub" value="inside_form" />',"\n";
echo '<input type=hidden name="iId" value="'.$aClean['iId'].'" />',"\n";
echo '</form>';
} elseif ($aClean['add']) // we accepted the request
} elseif ($aClean['sAdd']) // we accepted the request
{
$statusMessage = "";
$goodtogo = 0;
@@ -172,7 +172,7 @@ if (!$aClean['id'])
$hResult = query_parameters("INSERT INTO appData (id, appId, versionId, type, ".
"description, url) VALUES (?, '?', '?', '?', '?', '?')",
"null", $obj_row->appId, $obj_row->versionId,
"url", $aClean['description'], $obj_row->url);
"url", $aClean['sDescription'], $obj_row->url);
if($hResult)
{
$statusMessage = "<p>The application data was successfully added into the database</p>\n";
@@ -186,7 +186,7 @@ if (!$aClean['id'])
{
$sSubject = "Application Data Request Report";
$sMsg = "Your submission of an application data for ".Application::lookup_name($obj_row->appId).Version::lookup_name($obj_row->versionId)." has been accepted. ";
$sMsg .= $aClean['replyText'];
$sMsg .= $aClean['sReplyText'];
$sMsg .= "We appreciate your help in making the Application Database better for all users.\r\n";
mail_appdb($oUser->sEmail, $sSubject ,$sMsg);
@@ -194,7 +194,7 @@ if (!$aClean['id'])
}
}
redirect(apidb_fullurl("admin/adminAppDataQueue.php"));
} elseif ($aClean['reject'])
} elseif ($aClean['sReject'])
{
if($obj_row->type == "image")
{
@@ -208,7 +208,7 @@ if (!$aClean['id'])
{
$sSubject = "Application Data Request Report";
$sMsg = "Your submission of an application data for ".Application::lookup_name($obj_row->appId).Version::lookup_name($obj_row->versionId)." was rejected. ";
$sMsg .= $aClean['replyText'];
$sMsg .= $aClean['sReplyText'];
mail_appdb($oUser->sEmail, $sSubject ,$sMsg);
}

View File

@@ -13,16 +13,16 @@ require_once(BASE."include/testResults.php");
$aClean = array(); //array of filtered user input
$aClean['iTestingId'] = makeSafe($_REQUEST['iTestingId']);
$aClean['sub'] = makeSafe($_REQUEST['sub'] );
$aClean['apptype'] = makeSafe($_REQUEST['apptype']);
$aClean['appId'] = makeSafe($_REQUEST['appId']);
$aClean['versionId'] = makeSafe($_REQUEST['versionId']);
$aClean['appVendorName'] = makeSafe($_REQUEST['appVendorName']);
$aClean['appVendorId'] = makeSafe($_REQUEST['appVendorId']);
$aClean['appWebpage'] = makeSafe($_REQUEST['appWebpage']);
$aClean['appIdMergeTo'] = makeSafe($_REQUEST['appIdMergeTo']);
$aClean['replyText'] = makeSafe($_REQUEST['replyText']);
$aClean['versionIdMergeTo'] = makeSafe($_REQUEST['versionIdMergeTo']);
$aClean['sSub'] = makeSafe($_REQUEST['sSub'] );
$aClean['sAppType'] = makeSafe($_REQUEST['sAppType']);
$aClean['iAppId'] = makeSafe($_REQUEST['iAppId']);
$aClean['iVersionId'] = makeSafe($_REQUEST['iVersionId']);
$aClean['sAppVendorName'] = makeSafe($_REQUEST['sAppVendorName']);
$aClean['iAppVendorId'] = makeSafe($_REQUEST['iAppVendorId']);
$aClean['sAppWebpage'] = makeSafe($_REQUEST['sAppWebpage']);
$aClean['iAppIdMergeTo'] = makeSafe($_REQUEST['iAppIdMergeTo']);
$aClean['sReplyText'] = makeSafe($_REQUEST['sReplyText']);
$aClean['iVersionIdMergeTo'] = makeSafe($_REQUEST['iVersionIdMergeTo']);
$aClean['sDistribution'] = makeSafe($_REQUEST['sDistribution']);
function get_vendor_from_keywords($sKeywords)
@@ -62,7 +62,7 @@ function outputSearchTableForDuplicateFlagging($currentAppId, $hResult)
//display row
echo "<tr class=$sBgColor>\n";
/* map the merging of the current app to the app we are displaying in the table */
echo " <td>".html_ahref($oRow->appName,"adminAppQueue.php?sub=duplicate&apptype=application&appId=".$currentAppId."&appIdMergeTo=".$oRow->appId)."</td>\n";
echo " <td>".html_ahref($oRow->appName,"adminAppQueue.php?sSub=duplicate&sAppType=application&iAppId=".$currentAppId."&appIdMergeTo=".$oRow->appId)."</td>\n";
echo " <td>$oVersionCount->versions versions &nbsp;</td>\n";
echo "</tr>\n\n";
@@ -113,7 +113,7 @@ function display_move_test_to_versions_table($aVersionsIds,$icurrentVersionId)
//display row
echo "<tr class=$sBgColor>\n";
echo " <td>".html_ahref($oVersion->sName,"adminAppQueue.php?sub=movetest&apptype=version&versionId=".$icurrentVersionId."&versionIdMergeTo=".$oVersion->iVersionId)."</td>\n";
echo " <td>".html_ahref($oVersion->sName,"adminAppQueue.php?sSub=movetest&sAppType=version&iVersionId=".$icurrentVersionId."&iVersionIdMergeTo=".$oVersion->iVersionId)."</td>\n";
echo " <td>".util_trim_description($oVersion->sDescription)."</td>\n";
echo " <td align=center>".$oVersion->sTestedRating."</td>\n";
@@ -138,9 +138,9 @@ if(!$_SESSION['current']->hasPriv("admin") && !$_SESSION['current']->isSuperMain
}
$oTest = new testData($aClean['iTestingId']);
if ($aClean['sub'])
if ($aClean['sSub'])
{
if($aClean['apptype'] == 'application')
if($aClean['sAppType'] == 'application')
{
/* make sure the user is authorized to view this application request */
if(!$_SESSION['current']->hasPriv("admin"))
@@ -149,20 +149,20 @@ if ($aClean['sub'])
exit;
}
$oApp = new Application($aClean['appId']);
$oApp = new Application($aClean['iAppId']);
// if we are processing a queued application there MUST be an implicitly queued
// version to go along with it.
$hResult = query_parameters("SELECT versionId from appVersion where appId='?';", $aClean['appId']);
$hResult = query_parameters("SELECT versionId from appVersion where appId='?';", $aClean['iAppId']);
$oVersionRow = mysql_fetch_object($hResult);
$oVersion = new Version($oVersionRow->versionId);
}
else if($aClean['apptype'] == 'version')
else if($aClean['sAppType'] == 'version')
{
/* make sure the user has permission to view this version */
$oVersion = new Version($aClean['versionId']);
$oVersion = new Version($aClean['iVersionId']);
if(!$_SESSION['current']->hasAppVersionModifyPermission($oVersion))
{
util_show_error_page("Insufficient privileges.");
@@ -188,21 +188,21 @@ if ($aClean['sub'])
$oTest = new testData();
}
if($aClean['sub'] == 'add')
if($aClean['sSub'] == 'add')
{
$oVersion = new Version($aClean['versionId']);
$oVersion = new Version($aClean['iVersionId']);
$oTest = new testData($aClean['iTestingId']);
$oVersion->GetOutputEditorValues();
$oTest->GetOutputEditorValues();
if ($aClean['apptype'] == "application") // application
if ($aClean['sAppType'] == "application") // application
{
$oApp = new Application($aClean['appId']);
$oApp = new Application($aClean['iAppId']);
$oApp->GetOutputEditorValues(); // load the values from $_REQUEST
// add new vendor
if($aClean['appVendorName'] and !$aClean['appVendorId'])
if($aClean['sAppVendorName'] and !$aClean['iAppVendorId'])
{
$oVendor = new Vendor();
$oVendor->create($aClean['appVendorName'],$aClean['appWebpage']);
$oVendor->create($aClean['sAppVendorName'],$aClean['sAppWebpage']);
$oApp->iVendorId = $oVendor->iVendorId;
}
$oApp->update(true);
@@ -214,16 +214,16 @@ if ($aClean['sub'])
$oTest->unQueue();
redirect($_SERVER['PHP_SELF']);
}
else if ($aClean['sub'] == 'duplicate')
else if ($aClean['sSub'] == 'duplicate')
{
if(is_numeric($aClean['appIdMergeTo']))
if(is_numeric($aClean['iAppIdMergeTo']))
{
/* move this version submission under the existing app */
$oVersion->iAppId = $aClean['appIdMergeTo'];
$oVersion->iAppId = $aClean['iAppIdMergeTo'];
$oVersion->update();
/* delete the appId that is the duplicate */
$aClean['replyText'] = "Your Vesion information was moved to an existing Application";
$aClean['sReplyText'] = "Your Vesion information was moved to an existing Application";
$oAppDelete = new Application($oApp->iAppId);
$oAppDelete->delete();
}
@@ -231,51 +231,51 @@ if ($aClean['sub'])
/* redirect back to the main page */
redirect(apidb_fullurl("admin/adminAppQueue.php"));
}
else if ($aClean['sub'] == 'movetest')
else if ($aClean['sSub'] == 'movetest')
{
if(is_numeric($aClean['versionIdMergeTo']))
if(is_numeric($aClean['iVersionIdMergeTo']))
{
// move this Test submission under the existing version
$oTest->iVersionId = $aClean['versionIdMergeTo'];
$oTest->iVersionId = $aClean['iVersionIdMergeTo'];
$oTest->update();
// delete the Version entry
$aClean['replyText'] = "Your Test results were moved to existing version";
$oVersion = new Version($aClean['versionId']);
$aClean['sReplyText'] = "Your Test results were moved to existing version";
$oVersion = new Version($aClean['iVersionId']);
$oVersion->delete();
}
// redirect back to the main page
redirect(apidb_fullurl("admin/adminAppQueue.php"));
}
else if ($aClean['sub'] == 'Delete')
else if ($aClean['sSub'] == 'Delete')
{
if (($aClean['apptype'] == "application") && is_numeric($aClean['appId'])) // application
if (($aClean['sAppType'] == "application") && is_numeric($aClean['iAppId'])) // application
{
// delete the application entry
$oApp = new Application($aClean['appId']);
$oApp = new Application($aClean['iAppId']);
$oApp->delete();
} else if(($aClean['apptype'] == "version") && is_numeric($aClean['versionId'])) // version
} else if(($aClean['sAppType'] == "version") && is_numeric($aClean['iVersionId'])) // version
{
// delete the Version entry
$oVersion = new Version($aClean['versionId']);
$oVersion = new Version($aClean['iVersionId']);
$oVersion->delete();
}
redirect(apidb_fullurl("admin/adminAppQueue.php"));
}
else if ($aClean['sub'] == 'Reject')
else if ($aClean['sSub'] == 'Reject')
{
$oVersion = new Version($aClean['versionId']);
$oVersion = new Version($aClean['iVersionId']);
$oTest = new testData($aClean['iTestingId']);
$oVersion->GetOutputEditorValues();
$oTest->GetOutputEditorValues();
if ($aClean['apptype'] == "application") // application
if ($aClean['sAppType'] == "application") // application
{
$oApp = new Application($aClean['appId']);
$oApp = new Application($aClean['iAppId']);
$oApp->GetOutputEditorValues(); // load the values from $_REQUEST
$oApp->update(true);
$oApp->reject();
@@ -288,13 +288,13 @@ if ($aClean['sub'])
}
//process according to sub flag
if ($aClean['sub'] == 'view')
if ($aClean['sSub'] == 'view')
{
$x = new TableVE("view");
apidb_header("Admin App Queue");
echo '<form name="qform" action="adminAppQueue.php" method="post" enctype="multipart/form-data">',"\n";
echo '<input type="hidden" name="sub" value="add">',"\n";
echo '<form name="sQform" action="adminAppQueue.php" method="post" enctype="multipart/form-data">',"\n";
echo '<input type="hidden" name="sSub" value="add">',"\n";
echo html_back_link(1,'adminAppQueue.php');
@@ -404,21 +404,21 @@ if ($aClean['sub'])
echo html_frame_start("Reply text", "90%", "", 0);
echo "<table width='100%' border=0 cellpadding=2 cellspacing=0>\n";
echo '<tr valign=top><td class="color0"><b>email Text</b></td>',"\n";
echo '<td><textarea name="replyText" style="width: 100%" cols="80" rows="10"></textarea></td></tr>',"\n";
echo '<td><textarea name="sReplyText" style="width: 100%" cols="80" rows="10"></textarea></td></tr>',"\n";
echo '<tr valign=top><td class=color3 align=center colspan=2>' ,"\n";
if ($oApp) //application
{
echo '<input type="hidden" name="apptype" value="application" />';
echo '<input type="hidden" name="sAppType" value="application" />';
echo '<input type=submit value=" Submit App Into Database " class=button>&nbsp',"\n";
} else // app version
{
echo '<input type="hidden" name="apptype" value="version" />';
echo '<input type="hidden" name="sAppType" value="version" />';
echo '<input type="submit" value=" Submit Version Into Database " class="button">&nbsp',"\n";
}
echo '<input name="sub" type="submit" value="Delete" class="button" />',"\n";
echo '<input name="sub" type="submit" value="Reject" class="button" />',"\n";
echo '<input name="sSub" type="submit" value="Delete" class="button" />',"\n";
echo '<input name="sSub" type="submit" value="Reject" class="button" />',"\n";
echo '</td></tr>',"\n";
echo '</table>',"\n";
echo '</form>',"\n";
@@ -432,7 +432,7 @@ if ($aClean['sub'])
redirect(apidb_fullurl("admin/adminAppQueue.php"));
}
}
else /* if ($aClean['sub']) is not defined, display the main app queue page */
else /* if ($aClean['sSub']) is not defined, display the main app queue page */
{
apidb_header("Admin App Queue");

View File

@@ -13,11 +13,11 @@ require(BASE."include/mail.php");
$aClean = array(); //array of filtered user input
$aClean['sub'] = makeSafe($_REQUEST['sub']);
$aClean['buglinkId'] = makeSafe($_REQUEST['buglinkId']);
$aClean['ItemsPerPage'] = makeSafe($_REQUEST['ItemsPerPage']);
$aClean['QueuedOnly'] = makeSafe($_REQUEST['QueuedOnly']);
$aClean['page'] = makeSafe($_REQUEST['page']);
$aClean['sSub'] = makeSafe($_REQUEST['sSub']);
$aClean['iBuglinkId'] = makeSafe($_REQUEST['iBuglinkId']);
$aClean['iItemsPerPage'] = makeSafe($_REQUEST['iItemsPerPage']);
$aClean['sQueuedOnly'] = makeSafe($_REQUEST['sQueuedOnly']);
$aClean['iPage'] = makeSafe($_REQUEST['iPage']);
// deny access if not logged in
@@ -27,19 +27,19 @@ if(!$_SESSION['current']->hasPriv("admin"))
exit;
}
if ($aClean['sub'])
if ($aClean['sSub'])
{
if(($aClean['sub'] == 'delete' ) && ($aClean['buglinkId']))
if(($aClean['sSub'] == 'delete' ) && ($aClean['iBuglinkId']))
{
$oBuglink = new bug($aClean['buglinkId']);
$oBuglink = new bug($aClean['iBuglinkId']);
$oBuglink->delete();
}
if(($aClean['sub'] == 'unqueue' ) && ($aClean['buglinkId']))
if(($aClean['sSub'] == 'unqueue' ) && ($aClean['iBuglinkId']))
{
$oBuglink = new bug($aClean['buglinkId']);
$oBuglink = new bug($aClean['iBuglinkId']);
$oBuglink->unqueue();
}
redirect($_SERVER['PHP_SELF']."?ItemsPerPage=".$aClean['ItemsPerPage']."&QueuedOnly=".$aClean['QueuedOnly']."&page=".$aClean['page']);
redirect($_SERVER['PHP_SELF']."?iItemsPerPage=".$aClean['iItemsPerPage']."&sQueuedOnly=".$aClean['sQueuedOnly']."&ipage=".$aClean['iPage']);
exit;
}
@@ -49,13 +49,13 @@ if ($aClean['sub'])
$pageRange = 10;
$ItemsPerPage = 10;
$currentPage = 1;
$QueuedOnly = empty($aClean['QueuedOnly'])? NULL: $aClean['QueuedOnly'];
$QueuedOnly = empty($aClean['sQueuedOnly'])? NULL: $aClean['sQueuedOnly'];
$BugLinks = ($QueuedOnly == 'on')?getNumberOfQueuedBugLinks():getNumberOfBugLinks();
if($aClean['ItemsPerPage'])
$ItemsPerPage = $aClean['ItemsPerPage'];
if($aClean['iItemsPerPage'])
$ItemsPerPage = $aClean['iItemsPerPage'];
if($aClean['page'])
$currentPage = $aClean['page'];
if($aClean['iPage'])
$currentPage = $aClean['iPage'];
$ItemsPerPage = min($ItemsPerPage,100);
$totalPages = max(ceil($BugLinks/$ItemsPerPage),1);
@@ -63,18 +63,18 @@ if ($aClean['sub'])
$offset = (($currentPage-1) * $ItemsPerPage);
/* display page selection links */
echo '<form method="get" name="message" action="'.$_SERVER['PHP_SELF'].'">',"\n";
echo '<form method="get" name="sMessage" action="'.$_SERVER['PHP_SELF'].'">',"\n";
echo '<center>',"\n";
echo '<b>Page '.$currentPage.' of '.$totalPages.'</b><br />',"\n";
display_page_range($currentPage, $pageRange, $totalPages, $_SERVER['PHP_SELF']."?ItemsPerPage=".$ItemsPerPage."&QueuedOnly=".$QueuedOnly);
display_page_range($currentPage, $pageRange, $totalPages, $_SERVER['PHP_SELF']."?iItemsPerPage=".$ItemsPerPage."&sQueuedOnly=".$QueuedOnly);
echo '<br />',"\n";
echo '<br />',"\n";
/* display the option to choose how many comments per-page to display */
echo '<input type=hidden name=page value='.$currentPage.'>';
echo '<input type=hidden name=iPage value='.$currentPage.'>';
echo '<b>Number of Bug Links per page: </b>';
echo '<select name="ItemsPerPage">';
echo '<select name="iItemsPerPage">';
$ItemsPerPageArray = array(2 ,10, 20, 50, 100);
foreach($ItemsPerPageArray as $i => $value)
@@ -87,7 +87,7 @@ if ($aClean['sub'])
echo '</select>',"\n";
echo '<br />',"\n";
echo '<b>View queued links only: </b><input type=checkbox name="QueuedOnly" '.($QueuedOnly == "on"?" CHECKED":"").'>',"\n";
echo '<b>View queued links only: </b><input type=checkbox name="sQueuedOnly" '.($QueuedOnly == "on"?" CHECKED":"").'>',"\n";
echo '<br />',"\n";
echo '<input type=submit value="Refresh">',"\n";
@@ -144,26 +144,26 @@ if ($aClean['sub'])
echo ' <td align=center>'.$oRow->bug_status.'</td>',"\n";
echo ' <td>'.$oRow->short_desc.'</td>',"\n";
echo ' <td>',"\n";
echo ' <a href="'.apidb_fullurl('appview.php?appId='.$oRow->appId).'">'.$oRow->appName.'</a>',"\n";
echo ' <a href="'.apidb_fullurl('appview.php?iAppId='.$oRow->appId).'">'.$oRow->appName.'</a>',"\n";
echo ' </td>',"\n";
echo ' <td>'.$oRow->appDescription.'</td>',"\n";
echo ' <td>',"\n";
echo ' <a href="'.apidb_fullurl('appview.php?versionId='.$oRow->versionId).'">'.$oRow->versionName.'</a>',"\n";
echo ' <a href="'.apidb_fullurl('appview.php?iVersionId='.$oRow->versionId).'">'.$oRow->versionName.'</a>',"\n";
echo ' </td>',"\n";
echo ' <td align=center>[<a href="adminBugs.php?sub=delete',"\n";
echo '&buglinkId='.$oRow->linkId,"\n";
echo '&QueuedOnly='.$QueuedOnly,"\n";
echo '&ItemsPerPage='.$ItemsPerPage,"\n";
echo '&page='.$currentPage,"\n";
echo ' <td align=center>[<a href="adminBugs.php?sSub=delete',"\n";
echo '&iBuglinkId='.$oRow->linkId,"\n";
echo '&sQueuedOnly='.$QueuedOnly,"\n";
echo '&iItemsPerPage='.$ItemsPerPage,"\n";
echo '&iPage='.$currentPage,"\n";
echo '">delete</a>]</td>',"\n";
$bQueued = ($oRow->queued=="true")?true:false;
if ($bQueued)
{
echo '<td align=center>[<a href="adminBugs.php?sub=unqueue',"\n";
echo '&buglinkId='.$oRow->linkId,"\n";
echo '&QueuedOnly='.$QueuedOnly,"\n";
echo '&ItemsPerPage='.$ItemsPerPage,"\n";
echo '&page='.$currentPage,"\n";
echo '<td align=center>[<a href="adminBugs.php?sSub=unqueue',"\n";
echo '&iBuglinkId='.$oRow->linkId,"\n";
echo '&sQueuedOnly='.$QueuedOnly,"\n";
echo '&iItemsPerPage='.$ItemsPerPage,"\n";
echo '&iPage='.$currentPage,"\n";
echo '">OK</a>]</td>',"\n";
} else
{
@@ -176,7 +176,7 @@ if ($aClean['sub'])
echo "</table>","\n";
echo "<center>","\n";
display_page_range($currentPage, $pageRange, $totalPages, $_SERVER['PHP_SELF']."?ItemsPerPage=".$ItemsPerPage."&QueuedOnly=".$QueuedOnly);
display_page_range($currentPage, $pageRange, $totalPages, $_SERVER['PHP_SELF']."?iItemsPerPage=".$ItemsPerPage."&sQueuedOnly=".$QueuedOnly);
echo "</center>","\n";
apidb_footer();

View File

@@ -17,13 +17,13 @@ $currentPage = 1;
$aClean = array(); //array of filtered user input
$aClean['ItemsPerPage'] = makeSafe($_REQUEST['ItemsPerPage']);
$aClean['page'] = makeSafe($_REQUEST['page']);
$aClean['iItemsPerPage'] = makeSafe($_REQUEST['iItemsPerPage']);
$aClean['iPage'] = makeSafe($_REQUEST['iPage']);
if($aClean['ItemsPerPage'])
$ItemsPerPage = $aClean['ItemsPerPage'];
if($aClean['page'])
$currentPage = $aClean['page'];
if($aClean['iItemsPerPage'])
$ItemsPerPage = $aClean['iItemsPerPage'];
if($aClean['iPage'])
$currentPage = $aClean['iPage'];
$totalPages = ceil(getNumberOfComments()/$ItemsPerPage);
@@ -33,14 +33,14 @@ if($ItemsPerPage > 100) $ItemsPerPage = 100;
/* display page selection links */
echo "<center>";
echo "<b>Page $currentPage of $totalPages</b><br />";
display_page_range($currentPage, $pageRange, $totalPages, $_SERVER['PHP_SELF']."?ItemsPerPage=".$ItemsPerPage);
display_page_range($currentPage, $pageRange, $totalPages, $_SERVER['PHP_SELF']."?iItemsPerPage=".$ItemsPerPage);
echo "<br />";
echo "<br />";
/* display the option to choose how many comments per-page to display */
echo "<form method=\"get\" name=\"message\" action=\"".$_SERVER['PHP_SELF']."\">";
echo "<form method=\"get\" name=\"sMessage\" action=\"".$_SERVER['PHP_SELF']."\">";
echo "<b>Number of comments per page:</b>";
echo "&nbsp<select name='ItemsPerPage'>";
echo "&nbsp<select name='iItemsPerPage'>";
$ItemsPerPageArray = array(10, 20, 50, 100, 500);
foreach($ItemsPerPageArray as $i => $value)
@@ -52,7 +52,7 @@ foreach($ItemsPerPageArray as $i => $value)
}
echo "</select>";
echo "<input type=hidden name=page value=$currentPage>";
echo "<input type=hidden name=iPage value=$currentPage>";
echo "&nbsp<input type=submit value='Refresh'>";
echo "</form>";
@@ -76,7 +76,7 @@ while ($oRow = mysql_fetch_object($commentIds))
/* display page selection links */
echo "<center>";
display_page_range($currentPage, $pageRange, $totalPages, $_SERVER['PHP_SELF']."?ItemsPerPage=".$ItemsPerPage);
display_page_range($currentPage, $pageRange, $totalPages, $_SERVER['PHP_SELF']."?iItemsPerPage=".$ItemsPerPage);
echo "</center>";
apidb_footer();

View File

@@ -13,11 +13,11 @@ require(BASE."include/mail.php");
$aClean = array(); //array of filtered user input
$aClean['sub'] = makeSafe( $_REQUEST['sub'] );
$aClean['queueId'] = makeSafe( $_REQUEST['queueId'] );
$aClean['add'] = makeSafe( $_REQUEST['add'] );
$aClean['reject'] = makeSafe( $_REQUEST['reject'] );
$aClean['replyText'] = makeSafe( $_REQUEST['replyText'] );
$aClean['sSub'] = makeSafe( $_REQUEST['sSub'] );
$aClean['iQueueId'] = makeSafe( $_REQUEST['iQueueId'] );
$aClean['sAdd'] = makeSafe( $_REQUEST['sAdd'] );
$aClean['sReject'] = makeSafe( $_REQUEST['sReject'] );
$aClean['sReplyText'] = makeSafe( $_REQUEST['sReplyText'] );
if(!$_SESSION['current']->hasPriv("admin"))
{
@@ -25,16 +25,16 @@ if(!$_SESSION['current']->hasPriv("admin"))
exit;
}
if ($aClean['sub'])
if ($aClean['sSub'])
{
if ($aClean['queueId'])
if ($aClean['iQueueId'])
{
//get data
$sQuery = "SELECT queueId, appId, versionId,".
"userId, maintainReason, superMaintainer,".
"UNIX_TIMESTAMP(submitTime) as submitTime ".
"FROM appMaintainerQueue WHERE queueId = '?'";
$hResult = query_parameters($sQuery, $aClean['queueId']);
$hResult = query_parameters($sQuery, $aClean['iQueueId']);
$oRow = mysql_fetch_object($hResult);
$oUser = new User($oRow->userId);
mysql_free_result($hResult);
@@ -46,10 +46,10 @@ if ($aClean['sub'])
}
//process according to which request was submitted and optionally the sub flag
if (!$aClean['add'] && !$aClean['reject'] && $aClean['queueId'])
if (!$aClean['sAdd'] && !$aClean['sReject'] && $aClean['iQueueId'])
{
apidb_header("Admin Maintainer Queue");
echo '<form name="qform" action="adminMaintainerQueue.php" method="post" enctype="multipart/form-data">',"\n";
echo '<form name="sQform" action="adminMaintainerQueue.php" method="post" enctype="multipart/form-data">',"\n";
$x = new TableVE("view");
@@ -155,23 +155,23 @@ if ($aClean['sub'])
//maintainReason
echo '<tr valign=top><td class=color0><b>Maintainer request reason</b></td>',"\n";
echo '<td><textarea name="maintainReason" rows=10 cols=35>'.$oRow->maintainReason.'</textarea></td></tr>',"\n";
echo '<td><textarea name="sMaintainReason" rows=10 cols=35>'.$oRow->maintainReason.'</textarea></td></tr>',"\n";
//email response
echo '<tr valign=top><td class=color0><b>Email reply</b></td>',"\n";
echo "<td><textarea name='replyText' rows=10 cols=35>Enter a personalized reason for acceptance or rejection of the users maintainer request here</textarea></td></tr>\n";
echo "<td><textarea name='sReplyText' rows=10 cols=35>Enter a personalized reason for acceptance or rejection of the users maintainer request here</textarea></td></tr>\n";
/* Add button */
echo '<tr valign=top><td class=color3 align=center colspan=2>' ,"\n";
echo '<input type=submit name=add value=" Add maintainer to this application " class=button /> </td></tr>',"\n";
echo '<input type=submit name=sAdd value=" Add maintainer to this application " class=button /> </td></tr>',"\n";
/* Reject button */
echo '<tr valign=top><td class=color3 align=center colspan=2>' ,"\n";
echo '<input type=submit name=reject value=" Reject this request " class=button /></td></tr>',"\n";
echo '<input type=submit name=sReject value=" Reject this request " class=button /></td></tr>',"\n";
echo '</table>',"\n";
echo '<input type=hidden name="sub" value="inside_form" />',"\n";
echo '<input type=hidden name="queueId" value="'.$aClean['queueId'].'" />',"\n";
echo '<input type=hidden name="sSub" value="inside_form" />',"\n";
echo '<input type=hidden name="iQueueId" value="'.$aClean['iQueueId'].'" />',"\n";
echo html_frame_end("&nbsp;");
echo html_back_link(1,'adminMaintainerQueue.php');
@@ -180,7 +180,7 @@ if ($aClean['sub'])
exit;
}
else if ($aClean['add'] && $aClean['queueId'])
else if ($aClean['sAdd'] && $aClean['iQueueId'])
{
/* create a new user object for the maintainer */
$maintainerUser = new User($oRow->userId);
@@ -188,11 +188,11 @@ if ($aClean['sub'])
/* add the user as a maintainer and return the statusMessage */
$statusMessage = $maintainerUser->addAsMaintainer($oRow->appId, $oRow->versionId,
$oRow->superMaintainer,
$aClean['queueId']);
$aClean['iQueueId']);
//done
addmsg("<p><b>$statusMessage</b></p>", 'green');
}
else if (($aClean['reject'] || ($aClean['sub'] == 'reject')) && $aClean['queueId'])
else if (($aClean['sReject'] || ($aClean['sSub'] == 'sReject')) && $aClean['iQueueId'])
{
$sEmail = $oUser->sEmail;
if ($sEmail)
@@ -201,7 +201,7 @@ if ($aClean['sub'])
$oVersion = new Version($oRow->versionId);
$sSubject = "Application Maintainer Request Report";
$sMsg = "Your application to be the maintainer of ".$oApp->sName." ".$oVersion->sName." was rejected. ";
$sMsg .= $aClean['replyText'];
$sMsg .= $aClean['sReplyText'];
$sMsg .= "";
$sMsg .= "-The AppDB admins\n";
@@ -210,7 +210,7 @@ if ($aClean['sub'])
//delete main item
$sQuery = "DELETE from appMaintainerQueue where queueId = '?'";
$hResult = query_parameters($sQuery, $aClean['queueId']);
$hResult = query_parameters($sQuery, $aClean['iQueueId']);
if(!$hResult) addmsg("unable to delete selected maintainer application", "red");
echo html_frame_start("Delete maintainer application",400,"",0);
if($hResult)
@@ -230,7 +230,7 @@ if ($aClean['sub'])
/* display the list of all outstanding maintainer requests */
{
apidb_header("Admin Maintainer Queue");
echo '<form name="qform" action="adminMaintainerQueue.php" method="post" enctype="multipart/form-data">',"\n";
echo '<form name="sQform" action="adminMaintainerQueue.php" method="post" enctype="multipart/form-data">',"\n";
//get available maintainers
$sQuery = "SELECT queueId, appId, versionId,".
@@ -291,7 +291,7 @@ if ($aClean['sub'])
}
echo " <td><a href=\"mailto:".$oUser->sEmail."\">".$oUser->sRealname."</a></td>\n";
echo " <td>[<a href=\"adminMaintainerQueue.php?sub=view&queueId=$oRow->queueId\">answer</a>]</td>\n";
echo " <td>[<a href=\"adminMaintainerQueue.php?sSub=view&iQueueId=$oRow->queueId\">answer</a>]</td>\n";
echo "</tr>\n\n";
$c++;
}

View File

@@ -11,8 +11,8 @@ require(BASE."include/incl.php");
$aClean = array(); //array of filtered user input
$aClean['sub'] = makeSafe($_REQUEST['sub']);
$aClean['maintainerId'] = makeSafe($_REQUEST['maintainerId']);
$aClean['sSub'] = makeSafe($_REQUEST['sSub']);
$aClean['iMaintainerId'] = makeSafe($_REQUEST['iMaintainerId']);
// deny access if not logged in
if(!$_SESSION['current']->hasPriv("admin"))
@@ -22,15 +22,15 @@ if(!$_SESSION['current']->hasPriv("admin"))
}
apidb_header("Admin Maintainers");
echo '<form name="qform" action="adminMaintainers.php" method="post" enctype="multipart/form-data">',"\n";
echo '<form name="sQform" action="adminMaintainers.php" method="post" enctype="multipart/form-data">',"\n";
if ($aClean['sub'])
if ($aClean['sSub'])
{
if($aClean['sub'] == 'delete')
if($aClean['sSub'] == 'delete')
{
$sQuery = "DELETE FROM appMaintainers WHERE maintainerId = '?'";
$hResult = query_parameters($sQuery, $aClean['maintainerId']);
echo html_frame_start("Delete maintainer: ".$aClean['maintainerId'],400,"",0);
$hResult = query_parameters($sQuery, $aClean['iMaintainerId']);
echo html_frame_start("Delete maintainer: ".$aClean['iMaintainerId'],400,"",0);
if($hResult)
{
// success
@@ -115,14 +115,14 @@ if ($aClean['sub'])
echo " <td><a href=\"mailto:".$oUser->sEmail."\">".$oUser->sRealname."</a></td>\n";
if($oRow->superMaintainer)
{
echo " <td><a href='".BASE."appview.php?appId=$oRow->appId'>".Application::lookup_name($oRow->appId)."</a></td>\n";
echo " <td><a href='".BASE."appview.php?iAppId=$oRow->appId'>".Application::lookup_name($oRow->appId)."</a></td>\n";
echo " <td>*</td>\n";
} else
{
echo " <td><a href='".BASE."appview.php?appId=$oRow->appId'>".Application::lookup_name($oRow->appId)."</a></td>\n";
echo " <td><a href='".BASE."appview.php?versionId=$oRow->versionId'>".Version::lookup_name($oRow->versionId)."</a>&nbsp;</td>\n";
echo " <td><a href='".BASE."appview.php?iAppId=$oRow->appId'>".Application::lookup_name($oRow->appId)."</a></td>\n";
echo " <td><a href='".BASE."appview.php?iVersionId=$oRow->versionId'>".Version::lookup_name($oRow->versionId)."</a>&nbsp;</td>\n";
}
echo " <td align=\"center\">[<a href='adminMaintainers.php?sub=delete&maintainerId=$oRow->maintainerId'>delete</a>]</td>\n";
echo " <td align=\"center\">[<a href='adminMaintainers.php?sSub=delete&iMaintainerId=$oRow->maintainerId'>delete</a>]</td>\n";
echo "</tr>\n\n";
$c++;
}

View File

@@ -12,12 +12,12 @@ require(BASE."include/mail.php");
$aClean = array(); //array of filtered user input
$aClean['cmd'] = makeSafe($_REQUEST['cmd']);
$aClean['imageId'] = makeSafe($_REQUEST['imageId']);
$aClean['ItemsPerPage'] = makeSafe($_REQUEST['ItemsPerPage']);
$aClean['page'] = makeSafe($_REQUEST['page']);
$aClean['regenerate'] = makeSafe($_REQUEST['regenerate']);
$aClean['versionId'] = makeSafe($_REQUEST['versionId']);
$aClean['sCmd'] = makeSafe($_REQUEST['sCmd']);
$aClean['iImageId'] = makeSafe($_REQUEST['iImageId']);
$aClean['iItemsPerPage'] = makeSafe($_REQUEST['iItemsPerPage']);
$aClean['iPage'] = makeSafe($_REQUEST['iPage']);
$aClean['bRegenerate'] = makeSafe($_REQUEST['bRegenerate']);
$aClean['iVersionId'] = makeSafe($_REQUEST['iVersionId']);
// deny access if not admin
if(!$_SESSION['current']->hasPriv("admin"))
@@ -28,18 +28,18 @@ if(!$_SESSION['current']->hasPriv("admin"))
/*
* We issued a delete command.
*/
if($aClean['cmd'])
if($aClean['sCmd'])
{
// process screenshot deletion
if($aClean['cmd'] == "delete" && is_numeric($aClean['imageId']))
if($aClean['sCmd'] == "delete" && is_numeric($aClean['iImageId']))
{
$oScreenshot = new Screenshot($aClean['imageId']);
$oScreenshot = new Screenshot($aClean['iImageId']);
$oScreenshot->delete();
$oScreenshot->free();
}
redirect($_SERVER['PHP_SELF'].
"?ItemsPerPage=".$aClean['ItemsPerPage'].
"&page=".$aClean['page']);
"?iItemsPerPage=".$aClean['iItemsPerPage'].
"&iPage=".$aClean['iPage']);
exit;
}
@@ -47,7 +47,7 @@ if($aClean['cmd'])
apidb_header("Screenshots");
// regenerate all screenshots
if($aClean['regenerate'])
if($aClean['sRegenerate'])
{
$sQuery = "SELECT id FROM appData WHERE type = 'image'";
$hResult = query_parameters($sQuery);
@@ -62,7 +62,7 @@ if($aClean['regenerate'])
}
echo "<center>";
echo "<a href=\"".$_SERVER['PHP_SELF'].
"?regenerate=true\">Regenerate all screenshots ! ".
"?bRegenerate=true\">Regenerate all screenshots ! ".
"(use only if you know what you are doing)</a><br />";
echo "</center>";
@@ -72,10 +72,10 @@ $pageRange = 10;
$ItemsPerPage = 6;
$currentPage = 1;
if($aClean['ItemsPerPage'])
$ItemsPerPage = $aClean['ItemsPerPage'];
if($aClean['page'])
$currentPage = $aClean['page'];
if($aClean['iItemsPerPage'])
$ItemsPerPage = $aClean['iItemsPerPage'];
if($aClean['iPage'])
$currentPage = $aClean['iPage'];
$ItemsPerPage = min($ItemsPerPage,100);
$totalPages = ceil(getNumberOfImages()/$ItemsPerPage);
@@ -87,14 +87,14 @@ $offset = (($currentPage-1) * $ItemsPerPage);
echo "<center>";
echo "<b>Page $currentPage of $totalPages</b><br />";
display_page_range($currentPage, $pageRange, $totalPages,
$_SERVER['PHP_SELF']."?ItemsPerPage=".$ItemsPerPage);
$_SERVER['PHP_SELF']."?iItemsPerPage=".$ItemsPerPage);
echo "<br />";
echo "<br />";
/* display the option to choose how many screenshots per-page to display */
echo '<form method="get" name="message" action="'.$_SERVER['PHP_SELF'].'">';
echo '<b>Number of Screenshots per page:</b>';
echo "&nbsp<select name='ItemsPerPage'>";
echo "&nbsp<select name='iItemsPerPage'>";
$ItemsPerPageArray = array(6, 9, 12, 15, 18, 21, 24);
foreach($ItemsPerPageArray as $i => $value)
@@ -129,21 +129,21 @@ while ($oRow = mysql_fetch_object($Ids))
echo "<div align=center>". substr($oRow->description,0,20). "\n";
echo "<br />[<a href='".apidb_fullurl("appview.php");
echo "?appId=".$oApp->iAppId."'>";
echo "?iAppId=".$oApp->iAppId."'>";
echo $oApp->sName."</a>]";
echo "<br />[<a href='".apidb_fullurl("appview.php");
echo "?versionId=".$oVersion->iVersionId."'>";
echo "?iVersionId=".$oVersion->iVersionId."'>";
echo "Version: ".$oVersion->sName."</a>]";
//show admin delete link
if($_SESSION['current']->isLoggedIn() &&
($_SESSION['current']->hasPriv("admin") ||
$_SESSION['current']->isMaintainer($aClean['versionId'])))
$_SESSION['current']->isMaintainer($aClean['iVersionId'])))
{
echo "<br />[<a href='".$_SERVER['PHP_SELF'];
echo "?cmd=delete&imageId=$oRow->id";
echo "&page=".$currentPage."&ItemsPerPage=".$ItemsPerPage."'>";
echo "?sCmd=delete&iImageId=$oRow->id";
echo "&iPage=".$currentPage."&iItemsPerPage=".$ItemsPerPage."'>";
echo "Delete Image</a>]";
}
echo "</div></td>\n";
@@ -157,7 +157,7 @@ echo "</tr></table></div><br />\n";
/* display page selection links */
echo "<center>";
display_page_range($currentPage, $pageRange, $totalPages,
$_SERVER['PHP_SELF']."?ItemsPerPage=".$ItemsPerPage);
$_SERVER['PHP_SELF']."?iItemsPerPage=".$ItemsPerPage);
echo "</center>";
apidb_footer();

View File

@@ -13,10 +13,10 @@ require_once(BASE."include/distributions.php");
$aClean = array();
$aClean['sub'] = makeSafe($_REQUEST['sub']);
$aClean['sSub'] = makeSafe($_REQUEST['sSub']);
$aClean['iTestingId'] = makeSafe($_REQUEST['iTestingId']);
if ($aClean['sub'])
if ($aClean['sSub'])
{
$oTest = new testData($aClean['iTestingId']);
$oVersion = new Version($oTest->iVersionId);
@@ -26,26 +26,26 @@ if ($aClean['sub'])
exit;
}
if(($aClean['sub'] == 'Submit') || ($aClean['sub'] == 'Save') ||
($aClean['sub'] == 'Reject') || ($aClean['sub'] == 'Delete'))
if(($aClean['sSub'] == 'Submit') || ($aClean['sSub'] == 'Save') ||
($aClean['sSub'] == 'Reject') || ($aClean['sSub'] == 'Delete'))
{
if(is_numeric($aClean['iTestingId']))
{
$oTest = new testData($aClean['iTestingId']);
$oTest->GetOutputEditorValues();
if($aClean['sub'] == 'Submit') // submit the testing results
if($aClean['sSub'] == 'Submit') // submit the testing results
{
$oTest->update(true);
$oTest->unQueue();
} else if($aClean['sub'] == 'Save') // save the testing results
} else if($aClean['sSub'] == 'Save') // save the testing results
{
$oTest->update();
} else if($aClean['sub'] == 'Reject') // reject testing results
} else if($aClean['sSub'] == 'Reject') // reject testing results
{
$oTest->update(true);
$oTest->Reject();
} else if($aClean['sub'] == 'Delete') // delete testing results
} else if($aClean['sSub'] == 'Delete') // delete testing results
{
$oTest->delete();
}
@@ -62,7 +62,7 @@ if ($aClean['sub'])
$oApp = new application($oVersion->iAppId);
$sVersionInfo = $oApp->sName." ".$oVersion->sName;
if ($aClean['sub'] == 'view')
if ($aClean['sSub'] == 'view')
{
switch($oTest->sQueued)
{
@@ -76,7 +76,7 @@ if ($aClean['sub'])
apidb_header("Edit testing results for ".$sVersionInfo);
break;
}
echo '<form name="qform" action="'.$_SERVER['PHP_SELF'].'" method="post" enctype="multipart/form-data">',"\n";
echo '<form name="sQform" action="'.$_SERVER['PHP_SELF'].'" method="post" enctype="multipart/form-data">',"\n";
// View Testing Details
echo "<table width='100%' border=0 cellpadding=2 cellspacing=0>\n";
@@ -107,7 +107,7 @@ if ($aClean['sub'])
echo html_frame_start("Reply text", "90%", "", 0);
echo "<table width='100%' border=0 cellpadding=2 cellspacing=0>\n";
echo '<tr valign=top><td class="color0"><b>email Text</b></td>',"\n";
echo '<td><textarea name="replyText" style="width: 100%" cols="80" rows="10"></textarea></td></tr>',"\n";
echo '<td><textarea name="sReplyText" style="width: 100%" cols="80" rows="10"></textarea></td></tr>',"\n";
echo '<tr valign=top><td class=color3 align=center colspan=2>' ,"\n";
@@ -115,18 +115,18 @@ if ($aClean['sub'])
switch($oTest->sQueued)
{
case "false":
echo '<input name="sub" type="submit" value="Save" class="button" >&nbsp',"\n";
echo '<input name="sub" type="submit" value="Delete" class="button" >',"\n";
echo '<input name="sSub" type="submit" value="Save" class="button" >&nbsp',"\n";
echo '<input name="sSub" type="submit" value="Delete" class="button" >',"\n";
break;
case "true":
echo '<input name="sub" type="submit" value="Submit" class="button" >&nbsp',"\n";
echo '<input name="sub" type="submit" value="Reject" class="button" >&nbsp',"\n";
echo '<input name="sub" type="submit" value="Delete" class="button" >',"\n";
echo '<input name="sSub" type="submit" value="Submit" class="button" >&nbsp',"\n";
echo '<input name="sSub" type="submit" value="Reject" class="button" >&nbsp',"\n";
echo '<input name="sSub" type="submit" value="Delete" class="button" >',"\n";
break;
case "rejected":
echo '<input name="sub" type="submit" value="Submit" class="button" >&nbsp',"\n";
echo '<input name="sub" type="submit" value="Save" class="button" >&nbsp',"\n";
echo '<input name="sub" type="submit" value="Delete" class="button" >',"\n";
echo '<input name="sSub" type="submit" value="Submit" class="button" >&nbsp',"\n";
echo '<input name="sSub" type="submit" value="Save" class="button" >&nbsp',"\n";
echo '<input name="sSub" type="submit" value="Delete" class="button" >',"\n";
break;
}
echo '</td></tr>',"\n";
@@ -144,7 +144,7 @@ if ($aClean['sub'])
redirect($_SERVER['PHP_SELF']);
}
}
else // if ($aClean['sub']) is not defined, display the Testing results queue page
else // if ($aClean['sSub']) is not defined, display the Testing results queue page
{
$oTest = new TestData();
apidb_header("Testing Results");

View File

@@ -8,8 +8,8 @@ include(BASE."include/incl.php");
$aClean = array(); //filtered user input
$aClean['action'] = makeSafe($_REQUEST['action']);
$aClean['userId'] = makeSafe($_REQUEST['userId']);
$aClean['sAction'] = makeSafe($_REQUEST['sAction']);
$aClean['iUserId'] = makeSafe($_REQUEST['iUserId']);
$aClean['sSearch'] = makeSafe($_REQUEST['sSearch']);
$aClean['iLimit'] = makeSafe($_REQUEST['iLimit']);
$aClean['sOrderBy'] = makeSafe($_REQUEST['sOrderBy']);
@@ -24,9 +24,9 @@ if(!$_SESSION['current']->hasPriv("admin"))
}
// we want to delete a user
if($aClean['action'] == "delete" && is_numeric($aClean['userId']))
if($aClean['sAction'] == "delete" && is_numeric($aClean['iUserId']))
{
$oUser = new User($aClean['userId']);
$oUser = new User($aClean['iUserId']);
$oUser->delete();
}
@@ -103,7 +103,7 @@ if($aClean['sSubmit'])
if($oUser->hasPriv("admin")) echo "A";
if($oUser->isMaintainer()) echo "M";
echo " </td>\n";
echo " <td align=\"center\">[<a href=\"../preferences.php?userId=".$oRow->userid."&sSearch=".$sSearch."&iLimit=".$aClean['iLimit']."&sOrderBy=".$aClean['sOrderBy']."\">edit</a>]&nbsp;[<a onclick=\"if(!confirm('".$sAreYouSure."'))return false;\" \"href=\"".$_SERVER['PHP_SELF']."?action=delete&userId=".$oRow->userid."&sSearch=".$sSearch."&iLimit=".$aClean['iLimit']."&sOrderBy=".$aClean['sOrderBy']."&sSubmit=true\">delete</a>]</td>\n";
echo " <td align=\"center\">[<a href=\"../preferences.php?iUserId=".$oRow->userid."&sSearch=".$sSearch."&iLimit=".$aClean['iLimit']."&sOrderBy=".$aClean['sOrderBy']."\">edit</a>]&nbsp;[<a onclick=\"if(!confirm('".$sAreYouSure."'))return false;\" \"href=\"".$_SERVER['PHP_SELF']."?sAction=delete&iUserId=".$oRow->userid."&sSearch=".$sSearch."&iLimit=".$aClean['iLimit']."&sOrderBy=".$aClean['sOrderBy']."&sSubmit=true\">delete</a>]</td>\n";
echo "</tr>\n\n";
}
}

View File

@@ -16,13 +16,13 @@ require_once(BASE."include/testResults.php");
$aClean = array(); //filtered user input
$aClean['confirmed'] = makeSafe($_REQUEST['confirmed']);
$aClean['what'] = makeSafe($_REQUEST['what']);
$aClean['catId'] = makeSafe($_REQUEST['catId']);
$aClean['appId'] = makeSafe($_REQUEST['appId']);
$aClean['versionId'] = makeSafe($_REQUEST['versionId']);
$aClean['sConfirmed'] = makeSafe($_REQUEST['sConfirmed']);
$aClean['sWhat'] = makeSafe($_REQUEST['sWhat']);
$aClean['iCatId'] = makeSafe($_REQUEST['iCatId']);
$aClean['iAppId'] = makeSafe($_REQUEST['iAppId']);
$aClean['iVersionId'] = makeSafe($_REQUEST['iVersionId']);
if($aClean['confirmed'] != "yes")
if($aClean['sConfirmed'] != "yes")
{
// ask for confirmation
// could do some Real Damage if someone accidently hits the delete button on the main category :)
@@ -32,13 +32,13 @@ if($aClean['confirmed'] != "yes")
util_show_error_page("Not confirmed");
}
if($aClean['what'])
if($aClean['sWhat'])
{
switch($aClean['what'])
switch($aClean['sWhat'])
{
case "category":
// delete category and the apps in it
$oCategory = new Category($aClean['catId']);
$oCategory = new Category($aClean['iCatId']);
if(!$oCategory->delete())
util_show_error_page();
else
@@ -46,18 +46,18 @@ if($aClean['what'])
break;
case "appFamily":
// delete app family & all its versions
$oApp = new Application($aClean['appId']);
$oApp = new Application($aClean['iAppId']);
if(!$oApp->delete())
util_show_error_page();
else
redirect(BASE."appbrowse.php");
break;
case "appVersion":
$oVersion = new Version($aClean['versionId']);
$oVersion = new Version($aClean['iVersionId']);
if(!$oVersion->delete())
util_show_error_page();
else
redirect(BASE."appview.php?appId=".$aClean['appId']);
redirect(BASE."appview.php?iAppId=".$aClean['iAppId']);
break;
}
}

View File

@@ -12,25 +12,25 @@ require(BASE."include/mail.php");
$aClean = array(); //array of filtered user input
$aClean['appId'] = makeSafe($_REQUEST['appId']);
$aClean['submit'] = makeSafe($_REQUEST['submit']);
$aClean['iAppId'] = makeSafe($_REQUEST['iAppId']);
$aClean['sSubmit'] = makeSafe($_REQUEST['sSubmit']);
if(!is_numeric($aClean['appId']))
if(!is_numeric($aClean['iAppId']))
{
util_show_error_page("Wrong ID");
exit;
}
if(!($_SESSION['current']->hasPriv("admin") || $_SESSION['current']->isSuperMaintainer($aClean['appId'])))
if(!($_SESSION['current']->hasPriv("admin") || $_SESSION['current']->isSuperMaintainer($aClean['iAppId'])))
{
util_show_error_page("Insufficient Privileges!");
exit;
}
if(!empty($aClean['submit']))
if(!empty($aClean['sSubmit']))
{
process_app_version_changes(false);
redirect(apidb_fullurl("appview.php?appId={$aClean['appId']}"));
redirect(apidb_fullurl("appview.php?iAppId={$aClean['iAppId']}"));
}
else
// Show the form for editing the Application Family
@@ -38,7 +38,7 @@ else
$family = new TableVE("edit");
$oApp = new Application($aClean['appId']);
$oApp = new Application($aClean['iAppId']);
if(!$oApp)
{
@@ -54,7 +54,7 @@ else
$oApp->OutputEditor("");
echo '<table border=0 cellpadding=6 cellspacing=0 width="100%">', "\n";
echo '<tr><td colspan=2 align=center><input type="submit" name=submit value="Update Database"></td></tr>',"\n";
echo '<tr><td colspan=2 align=center><input type="submit" name=sSubmit value="Update Database"></td></tr>',"\n";
echo '</table>', "\n";
echo "</form>";
@@ -62,7 +62,7 @@ else
// url edit form
echo '<form enctype="multipart/form-data" action="editAppFamily.php" method="post">',"\n";
echo '<input type=hidden name="appId" value='.$oApp->iAppId.'>';
echo '<input type=hidden name="iAppId" value='.$oApp->iAppId.'>';
echo html_frame_start("Edit URL","90%","",0);
echo '<table border=0 cellpadding=6 cellspacing=0 width="100%">',"\n";
@@ -95,18 +95,18 @@ else
echo '<td class=color1><b>URL</b></td></tr>',"\n";
}
echo "</td></tr>\n";
echo "<input type=hidden name='rows' value='$i'>";
echo "<input type=hidden name='iRows' value='$i'>";
echo '<tr><td class=color1>New</td><td class=color1><input size=45% type="text" name="url_desc"></td>',"\n";
echo '<td class=color1><input size=45% name="url" type="text"></td></tr>',"\n";
echo '<tr><td class=color1>New</td><td class=color1><input size=45% type="text" name="sUrlDesc"></td>',"\n";
echo '<td class=color1><input size=45% name="sUrl" type="text"></td></tr>',"\n";
echo '<tr><td colspan=3 align=center class=color3><input type="submit" name=submit value="Update URL"></td></tr>',"\n";
echo '<tr><td colspan=3 align=center class=color3><input type="submit" name=sSubmit value="Update URL"></td></tr>',"\n";
echo '</table>',"\n";
echo html_frame_end();
echo "</form>";
echo html_back_link(1,BASE."appview.php?appId=$oApp->iAppId");
echo html_back_link(1,BASE."appview.php?iAppId=$oApp->iAppId");
}
apidb_footer();

View File

@@ -43,7 +43,7 @@ if(!empty($aClean['sSub']))
{
$oNote->update();
}
redirect(apidb_fullurl("appview.php?versionId={$oNote->iVersionId}"));
redirect(apidb_fullurl("appview.php?iVersionId={$oNote->iVersionId}"));
} else /* display note */
{
// show form
@@ -67,7 +67,7 @@ if(!empty($aClean['sSub']))
echo '<input type="submit" name=sSub value="Delete"></td></tr>',"\n";
echo '</center>';
echo html_back_link(1,BASE."appview.php?versionId=".$oNote->iVersionId);
echo html_back_link(1,BASE."appview.php?iVersionId=".$oNote->iVersionId);
}
apidb_footer();

View File

@@ -7,32 +7,32 @@ require(BASE."include/mail.php");
$aClean = array(); //array of filtered user input
$aClean['appId'] = makeSafe($_REQUEST['appId']);
$aClean['versionId'] = makeSafe($_REQUEST['versionId']);
$aClean['submit'] = makeSafe($_REQUEST['submit']);
$aClean['iAppId'] = makeSafe($_REQUEST['iAppId']);
$aClean['iVersionId'] = makeSafe($_REQUEST['iVersionId']);
$aClean['sSubmit'] = makeSafe($_REQUEST['sSubmit']);
if(!is_numeric($aClean['appId']) OR !is_numeric($aClean['versionId']))
if(!is_numeric($aClean['iAppId']) OR !is_numeric($aClean['iVersionId']))
{
util_show_error_page("Wrong ID");
exit;
}
/* Check for admin privs */
if(!$_SESSION['current']->hasPriv("admin") && !$_SESSION['current']->isMaintainer($aClean['versionId']) && !$_SESSION['current']->isSuperMaintainer($aClean['appId']))
if(!$_SESSION['current']->hasPriv("admin") && !$_SESSION['current']->isMaintainer($aClean['iVersionId']) && !$_SESSION['current']->isSuperMaintainer($aClean['iAppId']))
{
util_show_error_page("Insufficient Privileges!");
exit;
}
/* process the changes the user entered into the web form */
if(!empty($aClean['submit']))
if(!empty($aClean['sSubmit']))
{
process_app_version_changes(true);
redirect(apidb_fullurl("appview.php?versionId=".$aClean['versionId']));
redirect(apidb_fullurl("appview.php?iVersionId=".$aClean['iVersionId']));
} else /* or display the webform for making changes */
{
$oVersion = new Version($aClean['versionId']);
$oVersion = new Version($aClean['iVersionId']);
apidb_header("Edit Application Version");
@@ -44,7 +44,7 @@ if(!empty($aClean['submit']))
$oVersion->OutputEditor(false, true); /* false = not allowing the user to modify the parent application */
echo '<table border=0 cellpadding=2 cellspacing=0 width="100%">',"\n";
echo '<tr><td colspan=2 align=center class=color2><input type="submit" name="submit" value="Update Database" /></td></tr>',"\n";
echo '<tr><td colspan=2 align=center class=color2><input type="submit" name="sSubmit" value="Update Database" /></td></tr>',"\n";
echo html_table_end();
echo "</form>";
@@ -53,8 +53,8 @@ if(!empty($aClean['submit']))
// url edit form
echo '<form enctype="multipart/form-data" action="editAppVersion.php" method="post">',"\n";
echo '<input type=hidden name="appId" value='.$oVersion->iAppId.'>';
echo '<input type=hidden name="versionId" value='.$oVersion->iVersionId.'>';
echo '<input type=hidden name="iAppId" value='.$oVersion->iAppId.'>';
echo '<input type=hidden name="iVersionId" value='.$oVersion->iVersionId.'>';
echo html_frame_start("Edit URL","90%","",0);
echo '<table border=0 cellpadding=6 cellspacing=0 width="100%">',"\n";
@@ -87,11 +87,11 @@ if(!empty($aClean['submit']))
echo '<td class=color1><b>URL</b></td></tr>',"\n";
}
echo "</td></tr>\n";
echo "<input type=hidden name='rows' value='$i'>";
echo '<tr><td class=color1>New</td><td class=color1><input size="45" type="text" name="url_desc"></td>',"\n";
echo '<td class=color1><input size=45% name="url" type="text"></td></tr>',"\n";
echo "<input type=hidden name='iRows' value='$i'>";
echo '<tr><td class=color1>New</td><td class=color1><input size="45" type="text" name="sUrlDesc"></td>',"\n";
echo '<td class=color1><input size=45% name="sUrl" type="text"></td></tr>',"\n";
echo '<tr><td colspan=3 align=center class="color3"><input type="submit" name="submit" value="Update URL"></td></tr>',"\n";
echo '<tr><td colspan=3 align=center class="color3"><input type="submit" name="sSubmit" value="Update URL"></td></tr>',"\n";
echo '</table>',"\n";
echo html_frame_end();
@@ -102,14 +102,14 @@ if(!empty($aClean['submit']))
{
// move version form
echo '<form enctype="multipart/form-data" action="moveAppVersion.php" method="post">',"\n";
echo '<input type=hidden name="appId" value='.$oVersion->iAppId.'>';
echo '<input type=hidden name="versionId" value='.$oVersion->iVersionId.'>';
echo '<input type=hidden name="iAppId" value='.$oVersion->iAppId.'>';
echo '<input type=hidden name="iVersionId" value='.$oVersion->iVersionId.'>';
echo html_frame_start("Move version to another application","90%","",0);
echo '<center><input type="submit" name="view" value="Move this version"></center>',"\n";
echo '<center><input type="submit" name="sView" value="Move this version"></center>',"\n";
echo html_frame_end();
}
echo html_back_link(1,BASE."appview.php?versionId=".$oVersion->iVersionId);
echo html_back_link(1,BASE."appview.php?iVersionId=".$oVersion->iVersionId);
apidb_footer();
}
?>

View File

@@ -13,7 +13,7 @@ function build_app_list()
{
$hResult = query_parameters("SELECT appId, appName FROM appFamily ORDER BY appName");
echo "<select name=appId size=5 onChange='this.form.submit()'>\n";
echo "<select name=iAppId size=5 onChange='this.form.submit()'>\n";
while($oRow = mysql_fetch_object($hResult))
{
echo "<option value=$oRow->appId>$oRow->appName</option>\n";
@@ -21,25 +21,25 @@ function build_app_list()
echo "</select>\n";
}
if($_REQUEST['cmd'])
if($_REQUEST['sCmd'])
{
if($_REQUEST['cmd'] == "delete")
if($_REQUEST['sCmd'] == "delete")
{
$hResult = query_parameters("DELETE FROM appBundle WHERE appId ='?' AND bundleId = '?'",
$_REQUEST['appId'], $_REQUEST['bundleId']);
$_REQUEST['iAppId'], $_REQUEST['iBundleId']);
if($hResult)
addmsg("App deleted from bundle", "green");
else
addmsg("Failed to delete app from bundle!", "red");
}
if($_REQUEST['cmd'] == "add")
if($_REQUEST['sCmd'] == "add")
{
$hResult = query_parameters("INSERT INTO appBundle (bundleId, appId) VALUES".
"('?', '?')",
$_REQUEST['bundleId'],
$_REQUEST['appId']);
$_REQUEST['iBundleId'],
$_REQUEST['iAppId']);
if($hResult)
addmsg("App $appId added to Bundle".$_REQUEST['bundleId'], "green");
addmsg("App $appId added to Bundle".$_REQUEST['iBundleId'], "green");
}
}
@@ -48,7 +48,7 @@ apidb_header("Edit Application Bundle");
$hResult = query_parameters("SELECT bundleId, appBundle.appId, appName FROM appBundle, appFamily ".
"WHERE bundleId = '?' AND appFamily.appId = appBundle.appId",
$_REQUEST['bundleId']);
$_REQUEST['iBundleId']);
echo html_frame_start("Apps in this Bundle","300",'',0);
echo "<table width='100%' border=0 cellpadding=3 cellspacing=0>\n\n";
@@ -66,7 +66,7 @@ if($hResult && mysql_num_rows($hResult))
//set row color
if ($c % 2 == 1) { $bgcolor = 'color0'; } else { $bgcolor = 'color1'; }
$delete_link = "[<a href='editBundle.php?cmd=delete&bundleId=".$_REQUEST['bundleId']."&appId=$oRow->appId'>delete</a>]";
$delete_link = "[<a href='editBundle.php?sCmd=delete&iBundleId=".$_REQUEST['iBundleId']."&iAppId=$oRow->appId'>delete</a>]";
echo "<tr class=$bgcolor>\n";
echo " <td>$oRow->appName &nbsp;</td>\n";
@@ -92,8 +92,8 @@ echo html_frame_start("Application List (double click to add)","",'',2);
build_app_list();
echo html_frame_end();
echo "<input type=\"hidden\" name=\"bundleId\" value=\"".$_REQUEST['bundleId']."\">\n";
echo "<input type=\"hidden\" name=\"cmd\" value=\"add\">\n";
echo "<input type=\"hidden\" name=\"iBundleId\" value=\"".$_REQUEST['iBundleId']."\">\n";
echo "<input type=\"hidden\" name=\"sCmd\" value=\"add\">\n";
echo "</form>\n";
apidb_footer();

View File

@@ -6,7 +6,7 @@ require(BASE."include/distributions.php");
$aClean = array(); //array of filtered user input
$aClean['iDistributionId'] = makeSafe($_REQUEST['iDistributionId']);
$aClean['Submit'] = makeSafe($_REQUEST['Submit']);
$aClean['sSubmit'] = makeSafe($_REQUEST['sSubmit']);
if(!$_SESSION['current']->hasPriv("admin"))
{
@@ -16,7 +16,7 @@ if(!$_SESSION['current']->hasPriv("admin"))
$oDistribution = new distribution($aClean['iDistributionId']);
if($aClean['Submit'])
if($aClean['sSubmit'])
{
$oDistribution->GetOutputEditorValues();
@@ -37,12 +37,12 @@ else
else
apidb_header("Add Distribution");
echo '<form name="qform" action="'.$_SERVER['PHP_SELF'].'" method="post" enctype="multipart/form-data">',"\n";
echo '<form name="sQform" action="'.$_SERVER['PHP_SELF'].'" method="post" enctype="multipart/form-data">',"\n";
$oDistribution->OutputEditor();
echo '<tr valign=top><td class=color3 align=center colspan=2>',"\n";
echo '<input name="Submit" type="submit" value="Submit" class="button" >&nbsp',"\n";
echo '<input name="sSubmit" type="submit" value="Submit" class="button" >&nbsp',"\n";
echo '</td></tr>',"\n";
echo "</form>";

View File

@@ -5,7 +5,7 @@ require_once(BASE."include/vendor.php");
$aClean = array(); //array of filtered user input
$aClean['iVendorId'] = makeSafe($_REQUEST['iVendorId']);
$aClean['Submit'] = makeSafe($_REQUEST['Submit']);
$aClean['sSubmit'] = makeSafe($_REQUEST['sSubmit']);
$aClean['sName'] = makeSafe($_REQUEST['sName']);
$aClean['sWebpage'] = makeSafe($_REQUEST['sWebpage']);
@@ -16,7 +16,7 @@ if(!$_SESSION['current']->hasPriv("admin"))
}
$oVendor = new Vendor($aClean['iVendorId']);
if($aClean['Submit'])
if($aClean['sSubmit'])
{
$oVendor->update($aClean['sName'],$aClean['sWebpage']);
redirect(apidb_fullurl("vendorview.php"));
@@ -29,12 +29,12 @@ else
apidb_header("Add Vendor");
// Show the form
echo '<form name="qform" action="'.$_SERVER['PHP_SELF'].'" method="post" enctype="multipart/form-data">',"\n";
echo '<form name="sQform" action="'.$_SERVER['PHP_SELF'].'" method="post" enctype="multipart/form-data">',"\n";
$oVendor->OutputEditor();
echo '<tr valign=top><td class=color3 align=center colspan=2>',"\n";
echo '<input name="Submit" type="submit" value="Submit" class="button" >&nbsp',"\n";
echo '<input name="sSubmit" type="submit" value="Submit" class="button" >&nbsp',"\n";
echo '</td></tr>',"\n";
echo "</form>";

View File

@@ -7,11 +7,11 @@ require(BASE."include/mail.php");
$aClean = array(); //array of filtered user input
$aClean['appId'] = makeSafe($_REQUEST['appId']);
$aClean['versionId'] = makeSafe($_REQUEST['versionId']);
$aClean['action'] = makeSafe($_REQUEST['action']);
$aClean['iAppId'] = makeSafe($_REQUEST['iAppId']);
$aClean['iVersionId'] = makeSafe($_REQUEST['iVersionId']);
$aClean['sAction'] = makeSafe($_REQUEST['sAction']);
if(!is_numeric($aClean['appId']) OR !is_numeric($aClean['versionId']))
if(!is_numeric($aClean['iAppId']) OR !is_numeric($aClean['iVersionId']))
{
util_show_error_page("Wrong ID");
exit;
@@ -24,28 +24,28 @@ if(!$_SESSION['current']->hasPriv("admin"))
exit;
}
if(!empty($aClean['action']))
if(!empty($aClean['sAction']))
{
/* move this version to the given application */
$oVersion = new Version($aClean['versionId']);
$oVersion->update(null, null, null, null, $aClean['appId']);
$oVersion = new Version($aClean['iVersionId']);
$oVersion->update(null, null, null, null, $aClean['iAppId']);
/* redirect to the application we just moved this version to */
redirect(apidb_fullurl("appview.php?appId=".$aClean['appId']));
redirect(apidb_fullurl("appview.php?iAppId=".$aClean['iAppId']));
} else /* or display the webform for making changes */
{
?>
<link rel="stylesheet" href="./application.css" type="text/css">
<?php
$oVersion = new Version($aClean['versionId']);
$oVersion = new Version($aClean['iVersionId']);
$oApp = new Application($oVersion->iAppId);
apidb_header("Choose application to move this version under");
echo "<form method=post action='moveAppVersion.php'>\n";
echo html_frame_start("Move ".$oApp->sName." ".$oVersion->sName, "90%","",0);
echo '<input type="hidden" name="appId" value='.$oVersion->iAppId.' />';
echo '<input type="hidden" name="versionId" value='.$oVersion->iVersionId.' />';
echo '<input type="hidden" name="iAppId" value='.$oVersion->iAppId.' />';
echo '<input type="hidden" name="iVersionId" value='.$oVersion->iVersionId.' />';
/* build a table of applications and their versions */
@@ -65,9 +65,9 @@ if(!empty($aClean['action']))
{
$currentAppId = $oRow->appId;
echo '<tr style="background: #CCDDFF; border: thin solid; font-weight:bold;"><td align="left" style="padding-left:20px;">';
$url = BASE."appview.php?appId=".$oRow->appId;
$url = BASE."appview.php?iAppId=".$oRow->appId;
echo '<a href="'.$url.'">'.substr($oRow->appName, 0, 30).'</a></td><td> - '.$oRow->appId.'</td>';
echo "<td style='padding-left:20px;'><a href='moveAppVersion.php?action=move&versionId=$oVersion->iVersionId&appId=$oRow->appId'>Move here</a></td></tr>";
echo "<td style='padding-left:20px;'><a href='moveAppVersion.php?sAction=move&iVersionId=$oVersion->iVersionId&iAppId=$oRow->appId'>Move here</a></td></tr>";
echo '<tr style="border-left: thin solid; border-right:thin solid; background: #FAFBE2;"><td style="padding-left:40px;" colspan="3" align="left">'.$oRow->versionName.'</td></tr>';
} else /* just add another version */
{
@@ -79,7 +79,7 @@ if(!empty($aClean['action']))
echo html_table_end();
echo html_frame_end();
echo "</form>";
echo html_back_link(1, BASE."appview.php?versionId=".$oVersion->iVersionId);
echo html_back_link(1, BASE."appview.php?iVersionId=".$oVersion->iVersionId);
apidb_footer();
}
?>

View File

@@ -10,39 +10,39 @@ require(BASE."include/"."category.php");
$aClean = array(); //array of filtered user input
$aClean['catId'] = makeSafe($_REQUEST['catId']);
$aClean['iCatId'] = makeSafe($_REQUEST['iCatId']);
function admin_menu()
{
if(isset($_REQUEST['catId'])) $iCatId=$_REQUEST['catId'];
if(isset($_REQUEST['iCatId'])) $iCatId=$_REQUEST['iCatId'];
else $iCatId="";
$m = new htmlmenu("Admin");
$m->add("Edit this Category", BASE."admin/addCategory.php?catId=$iCatId");
$url = BASE."admin/deleteAny.php?what=category&catId=$iCatId&confirmed=yes";
$m->add("Edit this Category", BASE."admin/addCategory.php?iCatId=$iCatId");
$url = BASE."admin/deleteAny.php?sWhat=category&iCatId=$iCatId&confirmed=yes";
$m->add("Delete this Category", "javascript:deleteURL(\"Are you sure?\", \"".$url."\")");
$m->done();
}
if( empty( $aClean['catId'] ) )
if( empty( $aClean['iCatId'] ) )
{
$aClean['catId'] = 0; // ROOT
$aClean['iCatId'] = 0; // ROOT
}
if( !is_numeric($aClean['catId']) )
if( !is_numeric($aClean['iCatId']) )
{
util_show_error_page("Something went wrong with the category ID");
exit;
}
// list sub categories
$cat = new Category($aClean['catId']);
$cat = new Category($aClean['iCatId']);
$catFullPath = make_cat_path($cat->getCategoryPath());
$subs = $cat->aSubcatsIds;
//display admin box
if($_SESSION['current']->hasPriv("admin") && $aClean['catId'] != 0)
if($_SESSION['current']->hasPriv("admin") && $aClean['iCatId'] != 0)
apidb_sidebar_add("admin_menu");
//output header
@@ -78,7 +78,7 @@ if($subs)
//display row
echo "<tr class=$bgcolor>\n";
echo " <td><a href='appbrowse.php?catId=$iSubcatId'>".$oSubCat->sName."</a></td>\n";
echo " <td><a href='appbrowse.php?iCatId=$iSubcatId'>".$oSubCat->sName."</a></td>\n";
echo " <td>$desc &nbsp;</td>\n";
echo " <td>$appcount &nbsp;</td>\n";
echo "</tr>\n\n";
@@ -119,7 +119,7 @@ if($apps)
//display row
echo "<tr class=$bgcolor>\n";
echo " <td><a href='appview.php?appId=$iAppId'>".$oApp->sName."</a></td>\n";
echo " <td><a href='appview.php?iAppId=$iAppId'>".$oApp->sName."</a></td>\n";
echo " <td>$desc &nbsp;</td>\n";
echo " <td>".sizeof($oApp->aVersionsIds)."</td>\n";
echo "</tr>\n\n";
@@ -130,7 +130,7 @@ if($apps)
}
// Disabled for now
//if ($aClean['catId'] != 0)
//if ($aClean['iCatId'] != 0)
//{
// log_category_visit($cat->id);
//}

View File

@@ -9,9 +9,9 @@ require_once(BASE."include/"."screenshot.php");
$aClean = array(); //array of filtered user input
$aClean['id'] = makeSafe($_REQUEST['id']);
$aClean['REQUEST_METHOD'] = makeSafe($_REQUEST['REQUEST_METHOD']);
$aClean['thumbnail'] = makeSafe($_REQUEST['thumbnail']);
$aClean['iId'] = makeSafe($_REQUEST['iId']);
$aClean['sREQUEST_METHOD'] = makeSafe($_REQUEST['sREQUEST_METHOD']);
$aClean['bThumbnail'] = makeSafe($_REQUEST['bThumbnail']);
/* an image doesn't have a link, so a cookie makes no sense */
header("Set-Cookie: ");
@@ -19,16 +19,16 @@ header("Pragma: ");
/* if the user isn't supposed to be viewing this image */
/* display an error message and exit */
if(!$_SESSION['current']->canViewImage($aClean['id']))
if(!$_SESSION['current']->canViewImage($aClean['iId']))
{
util_show_error_page("Insufficient privileges.");
exit;
}
if ($aClean['REQUEST_METHOD']='HEAD')
if ($aClean['sREQUEST_METHOD']='HEAD')
{
/* WARNING! optimization of logic in include/screenshots.php */
if (sscanf($aClean['id'],"%d", &$iId) < 1)
if (sscanf($aClean['iId'],"%d", &$iId) < 1)
{
util_show_error_page("Bad parameter");
exit;
@@ -72,12 +72,12 @@ if ($aClean['REQUEST_METHOD']='HEAD')
header("Expires: ");
header("Last-Modified: ".fHttpDate($iModTime));
}
$oScreenshot = new Screenshot($aClean['id']);
$oScreenshot = new Screenshot($aClean['iId']);
/* at this point, we know that .../screenshots/$id and
* .../screenshots/thumbnails/$id both exist as normally
* they would both be created at the same time. */
$fstat_val = stat(appdb_fullpath("data/screenshots/".$aClean['id']));
$fstat_val = stat(appdb_fullpath("data/screenshots/".$aClean['iId']));
$iModTime = $fstat_val['mtime'];
header("Cache-Control: public");
@@ -95,7 +95,7 @@ if (isset($_SERVER['HTTP_IF_MODIFIED_SINCE']) &&
header("Last-Modified: ".fHttpDate($iModTime));
if(!$aClean['thumbnail'])
if(!$aClean['bThumbnail'])
$oScreenshot->oScreenshotImage->output_to_browser(1);
else
$oScreenshot->oThumbnailImage->output_to_browser(1);

View File

@@ -12,15 +12,15 @@ require_once(BASE."include/testResults.php");
$aClean = array(); //array of filtered user input
$aClean['apptype'] = makeSafe($_REQUEST['apptype']);
$aClean['sub'] = makeSafe($_REQUEST['sub']);
$aClean['appId'] = makeSafe($_REQUEST['appId']);
$aClean['versionId'] = makeSafe($_REQUEST['versionId']);
$aClean['sAppType'] = makeSafe($_REQUEST['sAppType']);
$aClean['sSub'] = makeSafe($_REQUEST['sSub']);
$aClean['iAppId'] = makeSafe($_REQUEST['iAppId']);
$aClean['iVersionId'] = makeSafe($_REQUEST['iVersionId']);
$aClean['iTestingId'] = makeSafe($_REQUEST['iTestingId']);
$aClean['appVendorName'] = makeSafe($_REQUEST['appVendorName']);
$aClean['vendorId'] = makeSafe($_REQUEST['vendorId']);
$aClean['appWebpage'] = makeSafe($_REQUEST['appWebpage']);
$aClean['appKeywords'] = makeSafe($_REQUEST['appKeywords']);
$aClean['sAppVendorName'] = makeSafe($_REQUEST['sAppVendorName']);
$aClean['iVendorId'] = makeSafe($_REQUEST['iVendorId']);
$aClean['sAppWebpage'] = makeSafe($_REQUEST['sAppWebpage']);
$aClean['sAppKeywords'] = makeSafe($_REQUEST['sAppKeywords']);
$aClean['iDistributionId'] = makeSafe($_REQUEST['iDistributionId']);
$aClean['sDistribution'] = makeSafe($_REQUEST['sDistribution']);
@@ -33,6 +33,7 @@ function get_vendor_from_keywords($sKeywords)
function newSubmition($errors)
{
global $aClean;
// show add to queue form
echo '<form name="newApp" action="appsubmit.php" method="post">'."\n";
echo "<p>This page is for submitting new applications to be added to the\n";
@@ -40,7 +41,7 @@ function newSubmition($errors)
echo "and you will be notified via e-mail if it is added to the database or rejected.</p>\n";
echo "<p><h2>Before continuing, please ensure that you have</h2>\n";
echo "<ul>\n";
if ($aClean['apptype'] == 1)
if ($aClean['sAppType'] == "application")
{
echo " <li>Searched for this application in the database. Duplicate submissions will be rejected</li>\n";
echo " <li>Really want to submit an application instead of a new version of an application\n";
@@ -71,11 +72,11 @@ if(!$_SESSION['current']->isLoggedIn())
}
if ($aClean['sub'])
if ($aClean['sSub'])
{
if($aClean['apptype'] == 'application')
if($aClean['sAppType'] == 'application')
{
$oApp = new Application( $aClean['appId']);
$oApp = new Application( $aClean['iAppId']);
if($oApp->iAppId)
{
// if we are processing a queued application there MUST be an implicitly queued
@@ -83,7 +84,7 @@ if ($aClean['sub'])
// during application processing so the admin can make a better choice about
// whether to accept or reject the overall application
$hResult = query_parameters("Select versionId from appVersion where appId='?'",
$aClean['appId']);
$aClean['iAppId']);
$oRow = mysql_fetch_object($hResult);
// make sure the user has permission to view this version
@@ -102,9 +103,9 @@ if ($aClean['sub'])
}
}
else if($aClean['apptype'] == 'version')
else if($aClean['sAppType'] == 'version')
{
$oVersion = new Version($aClean['versionId']);
$oVersion = new Version($aClean['iVersionId']);
// make sure the user has permission to view this version
if(!$_SESSION['current']->hasAppVersionModifyPermission($oVersion) &&
@@ -136,35 +137,35 @@ if ($aClean['sub'])
}
//process according to sub flag
if ($aClean['sub'] == 'Submit')
if ($aClean['sSub'] == 'Submit')
{
$errors = "";
$oVersion = new Version($aClean['versionId']);
$oVersion = new Version($aClean['iVersionId']);
$oTest = new testData($aClean['iTestingId']);
$errors .= $oVersion->CheckOutputEditorInput();
$errors .= $oTest->CheckOutputEditorInput();
$oVersion->GetOutputEditorValues();
$oTest->GetOutputEditorValues();
if ($aClean['apptype'] == "application") // application
if ($aClean['sAppType'] == "application") // application
{
$oApp = new Application($aClean['appId']);
$oApp = new Application($aClean['iAppId']);
$errors .= $oApp->CheckOutputEditorInput();
$oApp->GetOutputEditorValues(); // load the values from $_REQUEST
if(empty($errors))
{
if($aClean['appVendorName'])
if($aClean['sAppVendorName'])
{
$aClean['vendorId']="";
$aClean['iVendorId']="";
//FIXME: fix this when we fix vendor submission
if($_SESSION['current']->hasPriv("admin"))
{
$oVendor = new Vendor();
$oVendor->create($aClean['appVendorName'],$aClean['appWebpage']);
$oVendor->create($aClean['sAppVendorName'],$aClean['sAppWebpage']);
}
}
//FIXME: remove this when we fix vendor submission
$oApp->sKeywords = $aClean['appKeywords']." *** ".$aClean['appVendorName'];
$oApp->sKeywords = $aClean['sAppKeywords']." *** ".$aClean['sAppVendorName'];
if(is_numeric($oApp->iAppId))
{
$oApp->update();
@@ -180,7 +181,7 @@ if ($aClean['sub'])
/* if we have errors go back to 'view' mode */
if(!empty($errors))
{
$aClean['sub'] = 'view';
$aClean['sSub'] = 'view';
}
else
{
@@ -216,14 +217,14 @@ if ($aClean['sub'])
redirect($_SERVER['PHP_SELF']);
}
}
if ($aClean['sub'] == 'Delete')
if ($aClean['sSub'] == 'Delete')
{
if (($aClean['apptype'] == "application") && is_numeric($aClean['appId'])) // application
if (($aClean['sAppType'] == "application") && is_numeric($aClean['iAppId'])) // application
{
// get the queued versions that refers to the application entry we just removed
// and delete them as we implicitly added a version entry when adding a new application
$hResult = query_parameters("SELECT versionId FROM appVersion WHERE appVersion.appId = '?'
AND appVersion.queued = 'rejected';", $aClean['appId']);
AND appVersion.queued = 'rejected';", $aClean['iAppId']);
if($hResult)
{
while($oRow = mysql_fetch_object($hResult))
@@ -234,27 +235,27 @@ if ($aClean['sub'])
}
// delete the application entry
$oApp = new Application($aClean['appId']);
$oApp = new Application($aClean['iAppId']);
$oApp->delete();
} else if(($aClean['apptype'] == "version") && is_numeric($aClean['versionId'])) // version
} else if(($aClean['sAppType'] == "version") && is_numeric($aClean['iVersionId'])) // version
{
$oVersion = new Version($aClean['versionId']);
$oVersion = new Version($aClean['iVersionId']);
$oVersion->delete();
}
redirect($_SERVER['PHP_SELF']);
}
if ($aClean['sub'] == 'view')
if ($aClean['sSub'] == 'view')
{
$x = new TableVE("view");
apidb_header("Application Queue");
echo '<form name="qform" action="'.$_SERVER['PHP_SELF'].'" method="post" enctype="multipart/form-data">',"\n";
echo '<input type="hidden" name="sub" value="Submit">',"\n";
echo '<input type="hidden" name="sSub" value="Submit">',"\n";
echo html_back_link(1,$_SERVER['PHP_SELF']);
if($aClean['apptype'] == 'application') // application
if($aClean['sAppType'] == 'application') // application
{
if ($oApp->sName != "")
{
@@ -288,7 +289,7 @@ if ($aClean['sub'])
if(!$iVendorId)
{
$sVendor = get_vendor_from_keywords($oApp->sKeywords);
$sQuery = "SELECT vendorId FROM vendor WHERE vendorname = '".$aClean['appVendorName']."';";
$sQuery = "SELECT vendorId FROM vendor WHERE vendorname = '".$aClean['sAppVendorName']."';";
$hResult = query_appdb($sQuery);
if($hResult)
{
@@ -301,7 +302,7 @@ if ($aClean['sub'])
if(!$iVendorId)
{
$hResult = query_parameters("select * from vendor where vendorname like '%?%'",
$aClean['appVendorName']);
$aClean['sAppVendorName']);
if($hResult)
{
$oRow = mysql_fetch_object($hResult);
@@ -310,7 +311,7 @@ if ($aClean['sub'])
}
//vendor field
if($iVendorId)
$aClean['appVendorName'] = "";
$aClean['sAppVendorName'] = "";
} else //app version
{
if(is_numeric($oVersion->iVersionId))
@@ -343,9 +344,9 @@ if ($aClean['sub'])
if(!($oTest->sTestedDate))
$oTest->sTestedDate = date('Y-m-d H:i:s');
if($aClean['apptype'] == 'application')
if($aClean['sAppType'] == 'application')
{
$oApp->OutputEditor($aClean['appVendorName']);
$oApp->OutputEditor($aClean['sAppVendorName']);
$oVersion->OutputEditor(false, false);
} else
{
@@ -356,14 +357,14 @@ if ($aClean['sub'])
echo "<table width='100%' border=0 cellpadding=2 cellspacing=2>\n";
if($aClean['apptype'] == 'application') // application
if($aClean['sAppType'] == 'application') // application
{
echo '<input type="hidden" name="apptype" value="application" />';
echo '<input type="hidden" name="sAppType" value="application" />';
if(is_numeric($oApp->iAppId))
{
echo '<tr valign=top><td class=color3 align=center colspan=2>' ,"\n";
echo '<input type=submit value=" Re-Submit App Into Database " class=button>&nbsp',"\n";
echo '<input name="sub" type="submit" value="Delete" class="button" />',"\n";
echo '<input name="sSub" type="submit" value="Delete" class="button" />',"\n";
} else
{
echo '<tr valign=top><td class=color3 align=center colspan=2>',"\n";
@@ -371,13 +372,13 @@ if ($aClean['sub'])
}
} else // version
{
echo '<input type="hidden" name="apptype" value="version" />';
echo '<input type="hidden" name="appId" value="'.$aClean['appId'].'" />';
echo '<input type="hidden" name="sAppType" value="version" />';
echo '<input type="hidden" name="iAppId" value="'.$aClean['iAppId'].'" />';
if(is_numeric($oVersion->iVersionId))
{
echo '<tr valign=top><td class=color3 align=center colspan=2>' ,"\n";
echo '<input type="submit" value="Re-Submit Version Into Database " class="button">&nbsp',"\n";
echo '<input name="sub" type=submit value="Delete" class="button"></td></tr>',"\n";
echo '<input name="sSub" type=submit value="Delete" class="button"></td></tr>',"\n";
}
else
{
@@ -397,7 +398,7 @@ if ($aClean['sub'])
redirect($_SERVER['PHP_SELF']);
}
}
else // if ($aClean['sub']) is not defined, display the main app queue page
else // if ($aClean['sSub']) is not defined, display the main app queue page
{
apidb_header("Resubmit application");

View File

@@ -19,13 +19,13 @@ require_once(BASE."include/testResults.php");
$aClean = array(); //array of filtered user input
$aClean['appId'] = makeSafe($_REQUEST['appId']);
$aClean['versionId'] = makeSafe($_REQUEST['versionId']);
$aClean['sub'] = makeSafe($_REQUEST['sub']);
$aClean['buglinkId'] = makeSafe($_REQUEST['buglinkId']);
$aClean['iAppId'] = makeSafe($_REQUEST['iAppId']);
$aClean['iVersionId'] = makeSafe($_REQUEST['iVersionId']);
$aClean['sSub'] = makeSafe($_REQUEST['sSub']);
$aClean['iBuglinkId'] = makeSafe($_REQUEST['iBuglinkId']);
$oApp = new Application($aClean['appId']);
$oVersion = new Version($aClean['versionId']);
$oApp = new Application($aClean['iAppId']);
$oVersion = new Version($aClean['iVersionId']);
/**
* display the full path of the Category we are looking at
@@ -71,7 +71,7 @@ function display_bundle($iAppId)
//display row
echo "<tr class=\"$bgcolor\">\n";
echo " <td><a href=\"appview.php?appId=$ob->appId\">".stripslashes($ob->appName)."</a></td>\n";
echo " <td><a href=\"appview.php?iAppId=$ob->appId\">".stripslashes($ob->appName)."</a></td>\n";
echo " <td>".util_trim_description($oApp->sDescription)."</td>\n";
echo "</tr>\n\n";
@@ -82,63 +82,63 @@ function display_bundle($iAppId)
echo html_frame_end();
}
if(!is_numeric($aClean['appId']) && !is_numeric($aClean['versionId']))
if(!is_numeric($aClean['iAppId']) && !is_numeric($aClean['iVersionId']))
{
util_show_error_page("Something went wrong with the application or version id");
exit;
}
if ($aClean['sub'])
if ($aClean['sSub'])
{
if(($aClean['sub'] == 'delete' ) && ($aClean['buglinkId']))
if(($aClean['sSub'] == 'delete' ) && ($aClean['iBuglinkId']))
{
if(($_SESSION['current']->hasPriv("admin") ||
$_SESSION['current']->isMaintainer($oVersion->iVersionId) ||
$_SESSION['current']->isSuperMaintainer($oVersion->iAppId)))
{
$oBuglink = new bug($aClean['buglinkId']);
$oBuglink = new bug($aClean['iBuglinkId']);
$oBuglink->delete();
redirect(apidb_fullurl("appview.php?versionId=".$aClean['versionId']));
redirect(apidb_fullurl("appview.php?iVersionId=".$aClean['iVersionId']));
exit;
}
}
if(($aClean['sub'] == 'unqueue' ) && ($aClean['buglinkId']))
if(($aClean['sSub'] == 'unqueue' ) && ($aClean['iBuglinkId']))
{
if(($_SESSION['current']->hasPriv("admin") ||
$_SESSION['current']->isMaintainer($oVersion->iVersionId) ||
$_SESSION['current']->isSuperMaintainer($oVersion->iAppId)))
{
$oBuglink = new bug($aClean['buglinkId']);
$oBuglink = new bug($aClean['iBuglinkId']);
$oBuglink->unqueue();
redirect(apidb_fullurl("appview.php?versionId=".$aClean['versionId']));
redirect(apidb_fullurl("appview.php?iVersionId=".$aClean['iVersionId']));
exit;
}
}
if(($aClean['sub'] == 'Submit a new bug link.' ) && ($aClean['buglinkId']))
if(($aClean['sSub'] == 'Submit a new bug link.' ) && ($aClean['iBuglinkId']))
{
$oBuglink = new bug();
$oBuglink->create($aClean['versionId'],$aClean['buglinkId']);
redirect(apidb_fullurl("appview.php?versionId=".$aClean['versionId']));
$oBuglink->create($aClean['iVersionId'],$aClean['iBuglinkId']);
redirect(apidb_fullurl("appview.php?iVersionId=".$aClean['iVersionId']));
exit;
}
if($aClean['sub'] == 'StartMonitoring')
if($aClean['sSub'] == 'StartMonitoring')
{
$oMonitor = new Monitor();
$oMonitor->create($_SESSION['current']->iUserId,$aClean['appId'],$aClean['versionId']);
redirect(apidb_fullurl("appview.php?versionId=".$aClean['versionId']));
$oMonitor->create($_SESSION['current']->iUserId,$aClean['iAppId'],$aClean['iVersionId']);
redirect(apidb_fullurl("appview.php?iVersionId=".$aClean['iVersionId']));
exit;
}
if($aClean['sub'] == 'StopMonitoring')
if($aClean['sSub'] == 'StopMonitoring')
{
$oMonitor = new Monitor();
$oMonitor->find($_SESSION['current']->iUserId,$aClean['appId'],$aClean['versionId']);
$oMonitor->find($_SESSION['current']->iUserId,$aClean['iAppId'],$aClean['iVersionId']);
if($oMonitor->iMonitorId)
{
$oMonitor->delete();
}
redirect(apidb_fullurl("appview.php?versionId=".$aClean['versionId']));
redirect(apidb_fullurl("appview.php?iVersionId=".$aClean['iVersionId']));
exit;
}
@@ -147,13 +147,13 @@ if ($aClean['sub'])
/**
* We want to see an application family (=no version).
*/
if($aClean['appId'])
if($aClean['iAppId'])
{
$oApp = new Application($aClean['appId']);
$oApp = new Application($aClean['iAppId']);
$oApp->display();
} else if($aClean['versionId']) // We want to see a particular version.
} else if($aClean['iVersionId']) // We want to see a particular version.
{
$oVersion = new Version($aClean['versionId']);
$oVersion = new Version($aClean['iVersionId']);
$oVersion->display();
} else
{

View File

@@ -14,20 +14,20 @@ require_once(BASE."include/comment.php");
$aClean = array(); //array of filtered user input
$aClean['appId'] = makeSafe($_REQUEST['appId']);
$aClean['versionId'] = makeSafe($_REQUEST['versionId']);
$aClean['threadId'] = makeSafe($_REQUEST['threadId']);
$aClean['iAppId'] = makeSafe($_REQUEST['iAppId']);
$aClean['iVersionId'] = makeSafe($_REQUEST['iVersionId']);
$aClean['iThreadId'] = makeSafe($_REQUEST['iThreadId']);
apidb_header("Comments");
if(!is_numeric($aClean['appId']) OR !is_numeric($aClean['versionId']) OR (!empty($aClean['threadId']) AND !is_numeric($aClean['threadId'])))
if(!is_numeric($aClean['iAppId']) OR !is_numeric($aClean['iVersionId']) OR (!empty($aClean['iThreadId']) AND !is_numeric($aClean['iThreadId'])))
{
util_show_error_page("Wrong IDs");
exit;
}
view_app_comments($aClean['versionId'], $aClean['threadId']);
view_app_comments($aClean['iVersionId'], $aClean['iThreadId']);
apidb_footer();
?>

View File

@@ -13,11 +13,11 @@ require(BASE."include/mail.php");
$aClean = array(); //array of filtered user input
$aClean['str_why'] = makeSafe($_REQUEST['str_why']);
$aClean['commentId'] = makeSafe($_REQUEST['commentId']);
$aClean['int_delete_it'] = makeSafe($_REQUEST['int_delete_it']);
$aClean['sWhy'] = makeSafe($_REQUEST['sWhy']);
$aClean['iCommentId'] = makeSafe($_REQUEST['iCommentId']);
$aClean['iDeleteIt'] = makeSafe($_REQUEST['iDeleteIt']);
$oComment = new Comment($aClean['commentId']);
$oComment = new Comment($aClean['iCommentId']);
/* if we aren't an admin or the maintainer of this app we shouldn't be */
/* allowed to delete any comments */
@@ -29,7 +29,7 @@ if (!$_SESSION['current']->hasPriv("admin")
exit;
}
if($_SESSION['current']->getPref("confirm_comment_deletion") != "no" && !isset($aClean['int_delete_it']))
if($_SESSION['current']->getPref("confirm_comment_deletion") != "no" && !isset($aClean['iDeleteIt']))
{
apidb_header("Delete Comment");
$mesTitle = "<b>Please state why you are deleting the following comment</b>";
@@ -40,20 +40,20 @@ if($_SESSION['current']->getPref("confirm_comment_deletion") != "no" && !isset($
echo htmlify_urls($oComment->sBody), "<br /><br />\n";
echo html_frame_end();
echo '<table width="100%" border=0 cellpadding=0 cellspacing=1>',"\n";
echo "<tr class=color1><td colspan=2><textarea name=\"str_why\" cols=\"70\" rows=\"15\" wrap=\"virtual\"></textarea></td></tr>\n";
echo "<tr class=color1><td colspan=2><textarea name=\"sWhy\" cols=\"70\" rows=\"15\" wrap=\"virtual\"></textarea></td></tr>\n";
echo "<tr class=color1><td colspan=2 align=center>\n";
echo " <input type=\"submit\" value=\"Delete Comment\" class=\"button\" />\n";
echo "</td></tr>\n";
echo "</table>\n";
echo html_frame_end();
echo "<input type=\"hidden\" name=\"int_delete_it\" value=\"1\" />\n";
echo "<input type=\"hidden\" name=\"commentId\" value=\"".$oComment->iCommentId."\" />";
echo "<input type=\"hidden\" name=\"iDeleteIt\" value=\"1\" />\n";
echo "<input type=\"hidden\" name=\"iCommentId\" value=\"".$oComment->iCommentId."\" />";
echo "</form>";
apidb_footer();
} else
{
$oComment->delete($aClean['str_why']);
redirect(apidb_fullurl("appview.php?versionId=".$oComment->iVersionId));
$oComment->delete($aClean['sWhy']);
redirect(apidb_fullurl("appview.php?iVersionId=".$oComment->iVersionId));
}
?>

View File

@@ -13,11 +13,11 @@ require(BASE."include/testResults.php");
$aClean = array(); //array of filtered user input
$aClean['sub'] = makeSafe($_REQUEST['sub']);
$aClean['sSub'] = makeSafe($_REQUEST['sSub']);
$aClean['iDistributionId'] = makeSafe( $_REQUEST['iDistributionId']);
if ($aClean['sub'])
if ($aClean['sSub'])
{
if(!$_SESSION['current']->hasPriv("admin"))
{
@@ -25,7 +25,7 @@ if ($aClean['sub'])
exit;
}
if($aClean['sub'] == 'delete')
if($aClean['sSub'] == 'delete')
{
$oDistribution = new distribution($aClean['iDistributionId']);
$oDistribution->delete();
@@ -69,7 +69,7 @@ if(!$oDistribution->iDistributionId)
echo " <td align=\"center\">";
echo "[<a href='".BASE."admin/editDistribution.php?iDistributionId=".$oDistribution->iDistributionId."'>edit</a>]";
if(!sizeof($oDistribution->aTestingIds))
echo " &nbsp; [<a href='".$_SERVER['PHP_SELF']."?sub=delete&iDistributionId=".$oDistribution->iDistributionId."'>delete</a>]";
echo " &nbsp; [<a href='".$_SERVER['PHP_SELF']."?sSub=delete&iDistributionId=".$oDistribution->iDistributionId."'>delete</a>]";
echo " </td>\n";
}
echo "</tr>\n";
@@ -133,7 +133,7 @@ else
continue;
echo '<tr class='.$bgcolor.'>',"\n";
echo '<td><a href="'.BASE.'appview.php?versionId='.$oTest->iVersionId.'&iTestingId='.$oTest->iTestingId.'">',"\n";
echo '<td><a href="'.BASE.'appview.php?iVersionId='.$oTest->iVersionId.'&iTestingId='.$oTest->iTestingId.'">',"\n";
echo $oApp->sName.' '.$oVersion->sName.'</a></td>',"\n";
echo '<td>',"\n";
if($_SESSION['current']->isLoggedIn())
@@ -152,7 +152,7 @@ else
echo '<td>'.$oTest->sTestedRating.'&nbsp</td>',"\n";
if ($_SESSION['current']->hasAppVersionModifyPermission($oVersion))
{
echo '<td><a href="'.BASE.'admin/adminTestResults.php?sub=view&iTestingId='.$oTest->iTestingId.'">',"\n";
echo '<td><a href="'.BASE.'admin/adminTestResults.php?sSub=view&iTestingId='.$oTest->iTestingId.'">',"\n";
echo 'Edit</a></td>',"\n";
}
echo '</tr>',"\n";

View File

@@ -12,7 +12,7 @@ Application Database.</p>
<p><b>A:</b> The Application Database is a repository for
Windows application compatibility information with Wine.
In particular it provides the following information:<br>
(see the <a href="/appview.php?appId=296">Visual FoxPro</a> entry for an
(see the <a href="/appview.php?iAppId=296">Visual FoxPro</a> entry for an
example)<p>
<ul>
<li>Whether a given application works at all with Wine.</li>

View File

@@ -8,9 +8,9 @@ include(BASE."include/"."incl.php");
$help_path = BASE."/help";
if($_GET['topic'])
if($_GET['sTopic'])
{
display_help($_GET['topic']);
display_help($_GET['sTopic']);
} else {
display_index();
}
@@ -46,7 +46,7 @@ function display_index ()
$id = $arr[1];
$title = get_help_title("$help_path/$file");
echo " <li> <a href=\"".BASE."help?topic=$id\" style=\"cursor: help\"> $title </a><p /></li>\n";
echo " <li> <a href=\"".BASE."help?sTopic=$id\" style=\"cursor: help\"> $title </a><p /></li>\n";
}
echo "</ul><hr noshade>\n";

View File

@@ -3,7 +3,7 @@
<h3>Maintainers Guidelines</h3>
<p>
This page gives informations on how to maintain an application once being an application maintainer. If you are looking on informations on how to become an application maintainer, this topic is covered in the <a href="./?topic=appdb_faq" style="cursor: help">FAQ</a>.
This page gives informations on how to maintain an application once being an application maintainer. If you are looking on informations on how to become an application maintainer, this topic is covered in the <a href="./?sTopic=appdb_faq" style="cursor: help">FAQ</a>.
</p>
<p>
@@ -41,7 +41,7 @@ Application vendor should be set correctly. If the vendor is missing, please con
Keywords are used by the search engine, you don't need to repeat the application's name but you are encouraged to provide some keywords in this field.
</li>
<li>
Description should describe the application in a general manner (what it does). Wine and version specific considerations goes in version-specific pages (described below). If you want to add more than a short sentence, please add a cariage return after the first sentence as it will be used when showing application summary in the search engine, top-25 page and so on. <br />You are encouraged to make use of the template provided for application description; you can copy/paste this template from the "<a href="../appsubmit.php?apptype=1">Submit application page</a>".
Description should describe the application in a general manner (what it does). Wine and version specific considerations goes in version-specific pages (described below). If you want to add more than a short sentence, please add a cariage return after the first sentence as it will be used when showing application summary in the search engine, top-25 page and so on. <br />You are encouraged to make use of the template provided for application description; you can copy/paste this template from the "<a href="../appsubmit.php?iAppType=application">Submit application page</a>".
</li>
<li>
Webpage should contain the home page for this application. Please remember that an URL starts with http://.
@@ -57,11 +57,11 @@ You can edit a version page by clicking on the "Edit Version" button in any vers
Version name should be checked against official version name. However if you feel that two minor revision of an application will share the same problems or success, you are encouraged to use wildcards in the version number to don't fill the database with hundreds of versions. For example if you know that Adobe Acrobat 6.0, 6.01 and 6.1 are about the same application, just choose 6.x as a version name. You can however use the full version name in an history table in the description field (see below).
</li>
<li>
Description should describe the application version and not be a repetition of the application description. Please use a short sentence as the first line of your description to describe what this version is and then add a cariage return after this first sentence as it will be used when showing version summary in the application page for example. <br />You are encouraged to make use of the template provided for version description; you can copy/paste this template from the "<a href="../appsubmit.php?apptype=2">Submit version page</a>".<br />
As you'll see in this template usefull informations to place in this field are the specification of what works and what doesn't in wine and you can also add what is called an history table to keep track of improvemetns and regression. Using the html editor described later in this document and the provided template it is easy to produce such a table which will contains columns like version number, wine version, installs, runs, rating. You can then use the styles drop down list of the editor to set the color of the row according to the rating (gold, silver, bronze or garbage). You can see an example <a href="../appview.php?versionId=2602">here</a>.
Description should describe the application version and not be a repetition of the application description. Please use a short sentence as the first line of your description to describe what this version is and then add a cariage return after this first sentence as it will be used when showing version summary in the application page for example. <br />You are encouraged to make use of the template provided for version description; you can copy/paste this template from the "<a href="../appsubmit.php?sAppType=version">Submit version page</a>".<br />
As you'll see in this template usefull informations to place in this field are the specification of what works and what doesn't in wine and you can also add what is called an history table to keep track of improvemetns and regression. Using the html editor described later in this document and the provided template it is easy to produce such a table which will contains columns like version number, wine version, installs, runs, rating. You can then use the styles drop down list of the editor to set the color of the row according to the rating (gold, silver, bronze or garbage). You can see an example <a href="../appview.php?iVersionId=2602">here</a>.
</li>
<li>
Rating let's you rate how this version ran with the latest Wine version you tested it with. For rating definitions, please see this <a href="index.php?topic=maintainer_ratings">page</a>.
Rating let's you rate how this version ran with the latest Wine version you tested it with. For rating definitions, please see this <a href="index.php?sTopic=maintainer_ratings">page</a>.
</li>
<li>
Release is the latest release of Wine you tested this version with.

View File

@@ -352,7 +352,7 @@ class Application {
if($this->sQueued == 'false') // Has been accepted.
{
$sSubject = $this->sName." has been added by ".$_SESSION['current']->sRealname;
$sMsg = APPDB_ROOT."appview.php?appId=".$this->iAppId."\n";
$sMsg = APPDB_ROOT."appview.php?iAppId=".$this->iAppId."\n";
if($this->iSubmitterId)
{
$oSubmitter = new User($this->iSubmitterId);
@@ -376,7 +376,7 @@ class Application {
break;
case "edit":
$sSubject = $this->sName." has been modified by ".$_SESSION['current']->sRealname;
$sMsg .= APPDB_ROOT."appview.php?appId=".$this->iAppId."\n";
$sMsg .= APPDB_ROOT."appview.php?iAppId=".$this->iAppId."\n";
addmsg("Application modified.", "green");
break;
case "delete":
@@ -393,7 +393,7 @@ class Application {
break;
case "reject":
$sSubject = $this->sName." has been rejected by ".$_SESSION['current']->sRealname;
$sMsg .= APPDB_ROOT."appsubmit.php?apptype=application&sub=view&appId=".$this->iAppId."\n";
$sMsg .= APPDB_ROOT."appsubmit.php?sAppType=application&sSub=view&iAppId=".$this->iAppId."\n";
// if replyText is set we should report the reason the application was rejected
if($aClean['replyText'])
@@ -416,38 +416,38 @@ class Application {
{
HtmlAreaLoaderScript(array("app_editor"));
echo '<input type="hidden" name="appId" value="'.$this->iAppId.'">';
echo '<input type="hidden" name="iAppId" value="'.$this->iAppId.'">';
echo html_frame_start("Application Form", "90%", "", 0);
echo "<table width='100%' border=0 cellpadding=2 cellspacing=0>\n";
echo '<tr valign=top><td class="color0"><b>Application name</b></td>',"\n";
echo '<td><input size="20" type="text" name="appName" value="'.$this->sName.'"></td></tr>',"\n";
echo '<td><input size="20" type="text" name="sAppName" value="'.$this->sName.'"></td></tr>',"\n";
// app Category
$w = new TableVE("view");
echo '<tr valign=top><td class="color0"><b>Category</b></td><td>',"\n";
$w->make_option_list("appCatId", $this->iCatId,"appCategory","catId","catName");
$w->make_option_list("iAppCatId", $this->iCatId,"appCategory","catId","catName");
echo '</td></tr>',"\n";
// vendor name
echo '<tr valign=top><td class="color0"><b>Vendor</b></td>',"\n";
echo '<td><input size="20" type=text name="appVendorName" value="'.$sVendorName.'"></td></tr>',"\n";
echo '<td><input size="20" type=text name="sAppVendorName" value="'.$sVendorName.'"></td></tr>',"\n";
// alt vendor
$x = new TableVE("view");
echo '<tr valign=top><td class="color0">&nbsp;</td><td>',"\n";
$x->make_option_list("appVendorId", $this->iVendorId,"vendor","vendorId","vendorName");
$x->make_option_list("iAppVendorId", $this->iVendorId,"vendor","vendorId","vendorName");
echo '</td></tr>',"\n";
// url
echo '<tr valign=top><td class="color0"><b>URL</b></td>',"\n";
echo '<td><input size="20" type=text name="appWebpage" value="'.$this->sWebpage.'"></td></tr>',"\n";
echo '<td><input size="20" type=text name="sAppWebpage" value="'.$this->sWebpage.'"></td></tr>',"\n";
echo '<tr valign=top><td class="color0"><b>Keywords</b></td>',"\n";
echo '<td><input size="90%" type="text" name="appKeywords" value="'.$this->sKeywords.'"></td></tr>',"\n";
echo '<td><input size="90%" type="text" name="sAppKeywords" value="'.$this->sKeywords.'"></td></tr>',"\n";
echo '<tr valign=top><td class="color0"><b>Application description</b></td>',"\n";
echo '<td><p><textarea cols="80" rows="20" id="app_editor" name="appDescription">';
echo '<td><p><textarea cols="80" rows="20" id="app_editor" name="shAppDescription">';
echo $this->sDescription.'</textarea></p></td></tr>',"\n";
@@ -461,28 +461,28 @@ class Application {
$aClean = array(); //array of filtered user input
$aClean['appCatId'] = makeSafe($_REQUEST['appCatId']);
$aClean['appName'] = makeSafe($_REQUEST['appName']);
$aClean['appVendorName'] = makeSafe($_REQUEST['appVendorName']);
$aClean['appVendorId'] = makeSafe($_REQUEST['appVendorId']);
$aClean['appDescription'] = makeSafe($_REQUEST['appDescription']);
$aClean['iAppCatId'] = makeSafe($_REQUEST['iAppCatId']);
$aClean['sAppName'] = makeSafe($_REQUEST['sAppName']);
$aClean['sAppVendorName'] = makeSafe($_REQUEST['sAppVendorName']);
$aClean['iAppVendorId'] = makeSafe($_REQUEST['iAppVendorId']);
$aClean['shAppDescription'] = makeSafe($_REQUEST['shAppDescription']);
$errors = "";
if (empty($aClean['appCatId']))
if (empty($aClean['iAppCatId']))
$errors .= "<li>Please enter a category for your application.</li>\n";
if (strlen($aClean['appName']) > 200 )
if (strlen($aClean['sAppName']) > 200 )
$errors .= "<li>Your application name is too long.</li>\n";
if (empty($aClean['appName']))
if (empty($aClean['sAppName']))
$errors .= "<li>Please enter an application name.</li>\n";
// No vendor entered, and nothing in the list is selected
if (empty($aClean['appVendorName']) && !$aClean['appVendorId'])
if (empty($aClean['sAppVendorName']) && !$aClean['iAppVendorId'])
$errors .= "<li>Please enter a vendor.</li>\n";
if (empty($aClean['appDescription']))
if (empty($aClean['shAppDescription']))
$errors .= "<li>Please enter a description of your application.</li>\n";
return $errors;
@@ -493,21 +493,21 @@ class Application {
{
$aClean = array(); //array of filtered user input
$aClean['appId'] = makeSafe($_REQUEST['appId']);
$aClean['appVendorId'] = makeSafe($_REQUEST['appVendorId']);
$aClean['appName'] = makeSafe($_REQUEST['appName']);
$aClean['appDescription'] = makeSafe($_REQUEST['appDescription']);
$aClean['appCatId'] = makeSafe($_REQUEST['appCatId']);
$aClean['appWebpage'] = makeSafe($_REQUEST['appWebpage']);
$aClean['appKeywords'] = makeSafe($_REQUEST['appKeywords']);
$aClean['iAppId'] = makeSafe($_REQUEST['iAppId']);
$aClean['iAppVendorId'] = makeSafe($_REQUEST['iAppVendorId']);
$aClean['sAppName'] = makeSafe($_REQUEST['sAppName']);
$aClean['shAppDescription'] = makeSafe($_REQUEST['shAppDescription']);
$aClean['iAppCatId'] = makeSafe($_REQUEST['iAppCatId']);
$aClean['sAppWebpage'] = makeSafe($_REQUEST['sAppWebpage']);
$aClean['sAppKeywords'] = makeSafe($_REQUEST['sAppKeywords']);
$this->iAppId = $aClean['appId'];
$this->sName = $aClean['appName'];
$this->sDescription = $aClean['appDescription'];
$this->iCatId = $aClean['appCatId'];
$this->iVendorId = $aClean['appVendorId'];
$this->sWebpage = $aClean['appWebpage'];
$this->sKeywords = $aClean['appKeywords'];
$this->iAppId = $aClean['iAppId'];
$this->sName = $aClean['sAppName'];
$this->sDescription = $aClean['shAppDescription'];
$this->iCatId = $aClean['iAppCatId'];
$this->iVendorId = $aClean['iAppVendorId'];
$this->sWebpage = $aClean['sAppWebpage'];
$this->sKeywords = $aClean['sAppKeywords'];
}
/* display this application */
@@ -515,7 +515,7 @@ class Application {
{
$aClean = array(); //array of filtered user input
$aClean['appId'] = makeSafe($_REQUEST['appId']);
$aClean['iAppId'] = makeSafe($_REQUEST['iAppId']);
/* is this user supposed to view this version? */
if(!$_SESSION['current']->canViewApplication($this))
@@ -549,7 +549,7 @@ class Application {
echo ' <table width="250" border="0" cellpadding="3" cellspacing="1">',"\n";
echo " <tr class=color0 valign=top><td width=\"100\"><b>Name</b></td><td width='100%'> ".$this->sName." </td>\n";
echo " <tr class=\"color1\"><td><b>Vendor</b></td><td> ".
" <a href='vendorview.php?vendorId=$oVendor->iVendorId'> ".$oVendor->sName." </a> &nbsp;\n";
" <a href='vendorview.php?iVendorId=$oVendor->iVendorId'> ".$oVendor->sName." </a> &nbsp;\n";
echo " <tr class=\"color0\"><td><b>Votes</b></td><td> ";
echo vote_count_app_total($this->iAppId);
echo " </td></tr>\n";
@@ -559,7 +559,7 @@ class Application {
// optional links
$result = query_parameters("SELECT * FROM appData WHERE appId = '?' AND versionID = 0 AND type = 'url'",
$aClean['appId']);
$aClean['iAppId']);
if($result && mysql_num_rows($result) > 0)
{
echo " <tr class=\"color1\"><td> <b>Links</b></td><td>\n";
@@ -604,35 +604,35 @@ class Application {
/* are we already a maintainer? */
if($_SESSION['current']->isSuperMaintainer($this->iAppId)) /* yep */
{
echo ' <form method="post" name="message" action="maintainerdelete.php"><input type=submit value="Remove yourself as a super maintainer" class="button">';
echo ' <form method="post" name="sMessage" action="maintainerdelete.php"><input type=submit value="Remove yourself as a super maintainer" class="button">';
} else /* nope */
{
echo ' <form method="post" name="message" action="maintainersubmit.php"><input type="submit" value="Be a super maintainer of this app" class="button" title="Click here to know more about super maintainers.">';
echo ' <form method="post" name="sMessage" action="maintainersubmit.php"><input type="submit" value="Be a super maintainer of this app" class="button" title="Click here to know more about super maintainers.">';
}
echo " <input type=\"hidden\" name=\"appId\" value=\"".$this->iAppId."\">";
echo " <input type=\"hidden\" name=\"superMaintainer\" value=\"1\">"; /* set superMaintainer to 1 because we are at the appFamily level */
echo " <input type=\"hidden\" name=\"iAppId\" value=\"".$this->iAppId."\">";
echo " <input type=\"hidden\" name=\"iSuperMaintainer\" value=\"1\">"; /* set superMaintainer to 1 because we are at the appFamily level */
echo " </form>";
if($_SESSION['current']->isSuperMaintainer($this->iAppId) || $_SESSION['current']->hasPriv("admin"))
{
echo ' <form method="post" name="edit" action="admin/editAppFamily.php"><input type="hidden" name="appId" value="'.$aClean['appId'].'"><input type="submit" value="Edit Application" class="button"></form>';
echo ' <form method="post" name="sEdit" action="admin/editAppFamily.php"><input type="hidden" name="iAppId" value="'.$aClean['iAppId'].'"><input type="submit" value="Edit Application" class="button"></form>';
}
if($_SESSION['current']->isLoggedIn())
{
echo '<form method="post" name="message" action="appsubmit.php?appId='.$this->iAppId.'&amp;apptype=version&amp;sub=view">';
echo '<form method="post" name="sMessage" action="appsubmit.php?iAppId='.$this->iAppId.'&amp;sAppType=version&amp;sub=view">';
echo '<input type=submit value="Submit new version" class="button">';
echo '</form>';
}
if($_SESSION['current']->hasPriv("admin"))
{
$url = BASE."admin/deleteAny.php?what=appFamily&amp;appId=".$this->iAppId."&amp;confirmed=yes";
echo " <form method=\"post\" name=\"edit\" action=\"javascript:deleteURL('Are you sure?', '".$url."')\"><input type=\"submit\" value=\"Delete App\" class=\"button\"></form>";
echo ' <form method="post" name="edit" action="admin/editBundle.php"><input type="hidden" name="bundleId" value="'.$this->iAppId.'"><input type="submit" value="Edit Bundle" class="button"></form>';
$url = BASE."admin/deleteAny.php?sWhat=appFamily&amp;iAppId=".$this->iAppId."&amp;sConfirmed=yes";
echo " <form method=\"post\" name=\"sEdit\" action=\"javascript:deleteURL('Are you sure?', '".$url."')\"><input type=\"submit\" value=\"Delete App\" class=\"button\"></form>";
echo ' <form method="post" name="sEdit" action="admin/editBundle.php"><input type="hidden" name="iBundleId" value="'.$this->iAppId.'"><input type="submit" value="Edit Bundle" class="button"></form>';
}
} else
{
echo '<form method="post" action="account.php?cmd=login"><input type="submit" value="Log in to become a super maintainer" class="button"></form>';
echo '<form method="post" action="account.php?sCmd=login"><input type="submit" value="Log in to become a super maintainer" class="button"></form>';
}
echo " </td></tr>\n";
echo " </table>\n"; /* close of super maintainers table */
@@ -700,7 +700,7 @@ class Application {
echo " </td>\n";
echo " <td>".$sVendor."</td>\n";
echo " <td>".$oApp->sName."</td>\n";
echo " <td align=\"center\">[<a href=".$_SERVER['PHP_SELF']."?apptype=application&sub=view&appId=".$oApp->iAppId.">process</a>]</td>\n";
echo " <td align=\"center\">[<a href=".$_SERVER['PHP_SELF']."?sAppType=application&sSub=view&iAppId=".$oApp->iAppId.">process</a>]</td>\n";
echo "</tr>\n\n";
$c++;
}

View File

@@ -223,7 +223,7 @@ class Bug {
if(!$this->bQueued)
{
$sSubject = "Link between Bug ".$this->iBug_id." and ".$sAppName." added by ".$_SESSION['current']->sRealname;
$sMsg = APPDB_ROOT."appview.php?versionId=".$this->iVersionId."\n";
$sMsg = APPDB_ROOT."appview.php?iVersionId=".$this->iVersionId."\n";
if($this->iSubmitterId)
{
$oSubmitter = new User($this->iSubmitterId);
@@ -234,7 +234,7 @@ class Bug {
} else // Bug Link queued.
{
$sSubject = "Link between Bug ".$this->iBug_id." and ".$sAppName." submitted by ".$_SESSION['current']->sRealname;
$sMsg = APPDB_ROOT."appview.php?versionId=".$this->iVersionId."\n";
$sMsg = APPDB_ROOT."appview.php?iVersionId=".$this->iVersionId."\n";
$sMsg .= "This Bug Link has been queued.";
$sMsg .= "\n";
addmsg("The Bug Link you submitted will be added to the database after being reviewed.", "green");
@@ -242,7 +242,7 @@ class Bug {
} else // Bug Link deleted.
{
$sSubject = "Link between Bug ".$this->iBug_id." and ".$sAppName." deleted by ".$_SESSION['current']->sRealname;
$sMsg = APPDB_ROOT."appview.php?versionId=".$this->iVersionId."\n";
$sMsg = APPDB_ROOT."appview.php?iVersionId=".$this->iVersionId."\n";
addmsg("Bug Link deleted.", "green");
}
@@ -279,7 +279,7 @@ function view_version_bugs($iVersionId = null, $aBuglinkIds)
//start format table
if($_SESSION['current']->isLoggedIn())
{
echo "<form method=post action='appview.php?versionId=".$iVersionId."'>\n";
echo "<form method=post action='appview.php?iVersionId=".$iVersionId."'>\n";
}
echo html_frame_start("Known bugs","98%",'',0);
echo "<table width=\"100%\" border=\"0\" cellpadding=\"3\" cellspacing=\"1\">\n\n";
@@ -316,10 +316,10 @@ function view_version_bugs($iVersionId = null, $aBuglinkIds)
if($bCanEdit == true)
{
echo "<td align=center>[<a href='appview.php?sub=delete&buglinkId=".$oBuglink->iLinkId."&versionId=".$oBuglink->iVersionId."'>delete</a>]</td>\n";
echo "<td align=center>[<a href='appview.php?sSub=delete&iBuglinkId=".$oBuglink->iLinkId."&iVersionId=".$oBuglink->iVersionId."'>delete</a>]</td>\n";
if ($oBuglink->bQueued)
{
echo "<td align=center>[<a href='appview.php?sub=unqueue&buglinkId=".$oBuglink->iLinkId."&versionId=".$oBuglink->iVersionId."'>OK</a>]</td>\n";
echo "<td align=center>[<a href='appview.php?sSub=unqueue&iBuglinkId=".$oBuglink->iLinkId."&iVersionId=".$oBuglink->iVersionId."'>OK</a>]</td>\n";
} else
{
echo "<td align=center>Yes</td>\n";
@@ -333,10 +333,10 @@ function view_version_bugs($iVersionId = null, $aBuglinkIds)
}
if($_SESSION['current']->isLoggedIn())
{
echo '<input type="hidden" name="versionId" value="'.$iVersionId.'">',"\n";
echo '<input type="hidden" name="iVersionId" value="'.$iVersionId.'">',"\n";
echo '<tr class=color3><td align=center>',"\n";
echo '<input type="text" name="buglinkId" value="'.$aClean['buglinkId'].'" size="8"></td>',"\n";
echo '<td><input type="submit" name="sub" value="Submit a new bug link."></td>',"\n";
echo '<input type="text" name="iBuglinkId" value="'.$aClean['buglinkId'].'" size="8"></td>',"\n";
echo '<td><input type="submit" name="sSub" value="Submit a new bug link."></td>',"\n";
echo '<td colspan=6></td></tr></form>',"\n";
}
echo '</table>',"\n";

View File

@@ -239,7 +239,7 @@ function make_cat_path($path, $appId = '', $versionId = '')
if(!empty($versionId))
{
$oVersion = new Version($versionId);
$str .= " &gt; ".html_ahref($oApp->sName,"appview.php?appId=$appId");
$str .= " &gt; ".html_ahref($oApp->sName,"appview.php?iAppId=$appId");
$str .= " &gt; ".$oVersion->sName;
} else
{

View File

@@ -87,7 +87,7 @@ class Comment {
$sSubject = "Comment for '".Application::lookup_name($this->iAppId)." ".Version::lookup_name($this->iVersionId)."' added by ".$_SESSION['current']->sRealname;
$sMsg = "To reply to this email please use the link provided below.\n";
$sMsg .= "DO NOT reply via your email client as it will not reach the person who wrote the comment\n";
$sMsg .= APPDB_ROOT."appview.php?versionId=".$this->iVersionId."&mode=nested#Comment-".$this->iCommentId."\n";
$sMsg .= APPDB_ROOT."appview.php?iVersionId=".$this->iVersionId."&mode=nested#Comment-".$this->iCommentId."\n";
$sMsg .= "\n";
$sMsg .= "Subject: ".$this->sSubject."\r\n";
$sMsg .= "\n";
@@ -166,7 +166,7 @@ class Comment {
if($sEmail)
{
$sSubject = "Comment for '".Application::lookup_name($this->iAppId)." ".Version::lookup_name($this->iVersionId)."' deleted by ".$_SESSION['current']->sRealname;
$sMsg = APPDB_ROOT."appview.php?versionId=".$this->iVersionId."\n";
$sMsg = APPDB_ROOT."appview.php?iVersionId=".$this->iVersionId."\n";
$sMsg .= "\n";
$sMsg .= "This comment was made on ".substr($this->sDateCreated,0,10)." by ".$this->oOwner->sRealname."\n";
$sMsg .= "\n";
@@ -236,8 +236,8 @@ function view_app_comment($oRow)
$subject = "RE: ".$oRow->subject;
// reply post buttons
echo " [<a href=\"addcomment.php?appId=$oRow->appId&amp;versionId=$oRow->versionId\"><small>post new</small></a>] \n";
echo " [<a href=\"addcomment.php?appId=$oRow->appId&amp;versionId=$oRow->versionId&amp;subject=".
echo " [<a href=\"addcomment.php?iAppId=$oRow->appId&amp;iVersionId=$oRow->versionId\"><small>post new</small></a>] \n";
echo " [<a href=\"addcomment.php?iAppId=$oRow->appId&amp;iVersionId=$oRow->versionId&amp;sSubject=".
urlencode("$subject")."&amp;thread=$oRow->commentId\"><small>reply to this</small></a>] \n";
echo "</td></tr>\n";
@@ -329,7 +329,7 @@ function do_display_comments_threaded($hResult, $is_main)
view_app_comment($oRow);
} else
{
echo '<li><a href="commentview.php?appId='.$oRow->appId.'&amp;versionId='.$oRow->versionId.'&threadId='.$oRow->parentId.'"> '.
echo '<li><a href="commentview.php?iAppId='.$oRow->appId.'&amp;iVersionId='.$oRow->versionId.'&threadId='.$oRow->parentId.'"> '.
$oRow->subject.' </a> by '.forum_lookup_user($oRow->userId).' on '.$oRow->time.' </li>'."\n";
}
@@ -376,8 +376,8 @@ function view_app_comments($versionId, $threadId = 0)
$aClean = array(); //array of filtered user input
$aClean['cmode'] = makeSafe($_REQUEST['cmode']);
$aClean['mode'] = makeSafe($_REQUEST['mode']);
$aClean['sCmode'] = makeSafe($_REQUEST['sCmode']);
$aClean['sMode'] = makeSafe($_REQUEST['sMode']);
// count posts
$hResult = query_parameters("SELECT commentId FROM appComments WHERE versionId = '?'", $versionId);
@@ -393,27 +393,27 @@ function view_app_comments($versionId, $threadId = 0)
if ($_SESSION['current']->isLoggedIn())
{
// FIXME we need to change this so not logged in users can change current view as well
if (!empty($aClean['cmode']))
$_SESSION['current']->setPref("comments:mode", $aClean['cmode']);
if (!empty($aClean['sCmode']))
$_SESSION['current']->setPref("comments:mode", $aClean['sCmode']);
$sel[$_SESSION['current']->getPref("comments:mode", "threaded")] = 'selected';
echo '<td><form method="post" name="smode" action="appview.php">',"\n";
echo '<td><form method="post" name="sMode" action="appview.php">',"\n";
echo "<b>Application Comments</b> $messageCount total comments ";
echo '<b>Mode</b> <select name="cmode" onchange="document.smode.submit();">',"\n";
echo '<b>Mode</b> <select name="sCmode" onchange="document.smode.submit();">',"\n";
echo ' <option value="flat" '.$sel['flat'].'>Flat</option>',"\n";
echo ' <option value="threaded" '.$sel['threaded'].'>Threaded</option>',"\n";
echo ' <option value="nested" '.$sel['nested'].'>Nested</option>',"\n";
echo ' <option value="off" '.$sel['off'].'>No Comments</option>',"\n";
echo '</select>',"\n";
echo '<input type="hidden" name="versionId" value="'.$versionId.'"></form></td>',"\n";
echo '<input type="hidden" name="iVersionId" value="'.$versionId.'"></form></td>',"\n";
}
// blank space
echo '<td> &nbsp; </td>',"\n";
// post new message button
echo '<td><form method="post" name="message" action="addcomment.php"><input type="submit" value="post new comment" class="button"> ',"\n";
echo '<input type="hidden" name="versionId" value="'.$versionId.'"></form></td>',"\n";
echo '<td><form method="post" name="sMessage" action="addcomment.php"><input type="submit" value="post new comment" class="button"> ',"\n";
echo '<input type="hidden" name="iVersionId" value="'.$versionId.'"></form></td>',"\n";
//end comment format table
echo '</tr></table></td></tr>',"\n";
@@ -434,7 +434,7 @@ function view_app_comments($versionId, $threadId = 0)
else
$mode = "threaded"; /* default non-logged in users to threaded comment display mode */
if ($aClean['mode']=="nested")
if ($aClean['sMode']=="nested")
$mode = "nested";
switch ($mode)

View File

@@ -272,7 +272,7 @@ class distribution{
{
$sSubject = "Distribution rejected";
$sMsg = "The Distribution you submitted (".$this->sName.") has been rejected.";
$sMsg .= APPDB_ROOT."testingData.php?sub=view&versionId=".$this->iVersionId."\n";
$sMsg .= APPDB_ROOT."testingData.php?sSub=view&iVersionId=".$this->iVersionId."\n";
$sMsg .= "Reason given:\n";
$sMsg .= $aClean['replyText']."\n"; // append the reply text, if there is any
}

View File

@@ -8,7 +8,7 @@ $aClean['sUserEmail'] = makeSafe($_POST['sUserEmail']);
/**************/
/* Login Form */
/**************/
echo '<form method="post" name="flogin" action="account.php">',"\n";
echo '<form method="post" name="sFlogin" action="account.php">',"\n";
echo html_frame_start("Login to Application DB","400","",0)
?>
@@ -16,8 +16,8 @@ echo html_frame_start("Login to Application DB","400","",0)
<script type="text/javascript">
<!--
function cmd_send_passwd() {
document.flogin.cmd.value = "send_passwd";
document.flogin.submit();
document.sFlogin.sCmd.value = "send_passwd";
document.sFlogin.submit();
}
//-->
</script>
@@ -43,14 +43,14 @@ function cmd_send_passwd() {
<?php
echo html_frame_end("&nbsp;");
echo '<input type="hidden" name="cmd" value="do_login">',"\n";
echo '<input type="hidden" name="ext_referer" value="'.$_SERVER['HTTP_REFERER'].'">',"\n";
echo '<input type="hidden" name="sCmd" value="do_login">',"\n";
echo '<input type="hidden" name="sExtReferer" value="'.$_SERVER['HTTP_REFERER'].'">',"\n";
echo '</form>',"\n";
?>
<p align=center>Don't have an account yet?<br>
[<a href="account.php?cmd=new" onMouseOver="document.status='';return true;">Create a New Account</a>]</p>
[<a href="account.php?sCmd=new" onMouseOver="document.status='';return true;">Create a New Account</a>]</p>
<p align=center>Lost your password?<br>
[<a href="javascript:cmd_send_passwd();" onMouseOver="document.status='';return true;">Email a New Password</a>]</p>

View File

@@ -106,12 +106,12 @@ class Monitor {
{
$sSubject = "Monitor for ".$sAppName;
$sSubject .= " added: ".$_SESSION['current']->sRealname;
$sMsg .= APPDB_ROOT."appview.php?versionId=".$this->iVersionId."\n";
$sMsg .= APPDB_ROOT."appview.php?iVersionId=".$this->iVersionId."\n";
addmsg("You will now recieve an email whenever changes are made to this Application version.", "green");
} else
{
$sSubject = "Monitor for ".$sAppName." added: ".$_SESSION['current']->sRealname;
$sMsg .= APPDB_ROOT."appview.php?appId=".$this->iAppid."\n";
$sMsg .= APPDB_ROOT."appview.php?iAppId=".$this->iAppid."\n";
addmsg("You will now recieve an email whenever changes are made to this Application.", "green");
}
break;
@@ -120,12 +120,12 @@ class Monitor {
{
$sSubject = "Monitor for ".$sAppName;
$sSubject .= " removed: ".$_SESSION['current']->sRealname;
$sMsg .= APPDB_ROOT."appview.php?versionId=".$this->iVersionId."\n";
$sMsg .= APPDB_ROOT."appview.php?iVersionId=".$this->iVersionId."\n";
addmsg("You will no longer recieve an email whenever changes are made to this Application version.", "green");
} else
{
$sSubject = "Monitor for ".$sAppName." removed: ".$_SESSION['current']->sRealname;
$sMsg .= APPDB_ROOT."appview.php?appId=".$this->iAppid."\n";
$sMsg .= APPDB_ROOT."appview.php?iAppId=".$this->iAppid."\n";
addmsg("You will no longer recieve an email whenever changes are made to this Application.", "green");
}
break;

View File

@@ -137,7 +137,7 @@ class Note {
{
case "add":
$sSubject = "Note ".$this->sTitle." for ".$sAppName." added by ".$_SESSION['current']->sRealname;
$sMsg .= APPDB_ROOT."appview.php?versionId=".$this->iVersionId."\n";
$sMsg .= APPDB_ROOT."appview.php?iVersionId=".$this->iVersionId."\n";
addmsg("The note was successfully added into the database.", "green");
break;
case "edit":

View File

@@ -267,7 +267,7 @@ class Screenshot {
if(!$this->bQueued)
{
$sSubject = "Screenshot for ".$sAppName." added by ".$_SESSION['current']->sRealname;
$sMsg = APPDB_ROOT."appview.php?versionId=".$this->iVersionId."\n";
$sMsg = APPDB_ROOT."appview.php?iVersionId=".$this->iVersionId."\n";
if($this->iSubmitterId)
{
$oSubmitter = new User($this->iSubmitterId);
@@ -278,7 +278,7 @@ class Screenshot {
} else // Screenshot queued.
{
$sSubject = "Screenshot for ".$sAppName." submitted by ".$_SESSION['current']->sRealname;
$sMsg = APPDB_ROOT."appview.php?versionId=".$this->iVersionId."\n";
$sMsg = APPDB_ROOT."appview.php?iVersionId=".$this->iVersionId."\n";
$sMsg .= "This screenshot has been queued.";
$sMsg .= "\n";
addmsg("The screenshot you submitted will be added to the database database after being reviewed.", "green");
@@ -286,7 +286,7 @@ class Screenshot {
} else // Screenshot deleted.
{
$sSubject = "Screenshot for ".$sAppName." deleted by ".$_SESSION['current']->sRealname;
$sMsg = APPDB_ROOT."appview.php?versionId=".$this->iVersionId."\n";
$sMsg = APPDB_ROOT."appview.php?iVersionId=".$this->iVersionId."\n";
addmsg("Screenshot deleted.", "green");
}
@@ -338,7 +338,7 @@ function get_screenshot_img($iAppId = null, $iVersionId = null, $bFormatting = t
} else
{
$oRow = mysql_fetch_object($hResult);
$sImgFile = '<img src="appimage.php?thumbnail=true&amp;id='.$oRow->id.'" alt="'.$oRow->description.'" />';
$sImgFile = '<img src="appimage.php?bThumbnail=true&amp;iId='.$oRow->id.'" alt="'.$oRow->description.'" />';
}
if($bFormatting)
@@ -351,12 +351,12 @@ function get_screenshot_img($iAppId = null, $iVersionId = null, $bFormatting = t
if(mysql_num_rows($hResult))
{
if($iVersionId)
$sImg .= "<a href='screenshots.php?appId=$iAppId&amp;versionId=$iVersionId'>$sImgFile<center>View/Submit&nbsp;Screenshot</center></a>";
$sImg .= "<a href='screenshots.php?iAppId=$iAppId&amp;iVersionId=$iVersionId'>$sImgFile<center>View/Submit&nbsp;Screenshot</center></a>";
else
$sImg .= "<a href='screenshots.php?appId=$iAppId&amp;versionId=$iVersionId'>$sImgFile<center>View&nbsp;Screenshot</center></a>";
$sImg .= "<a href='screenshots.php?iAppId=$iAppId&amp;iVersionId=$iVersionId'>$sImgFile<center>View&nbsp;Screenshot</center></a>";
} else if($iVersionId) /* we are asking for a specific app version but it has no screenshots */
{
$sImg .= "<a href='screenshots.php?appId=$iAppId&amp;versionId=$iVersionId'>$sImgFile<center>Submit&nbsp;Screenshot</center></a>";
$sImg .= "<a href='screenshots.php?iAppId=$iAppId&amp;iVersionId=$iVersionId'>$sImgFile<center>Submit&nbsp;Screenshot</center></a>";
} else /* we have no screenshots and we aren't a specific version, we don't allow adding screenshots for an app */
{
$sImg .= $sImgFile;
@@ -409,11 +409,11 @@ function get_thumbnail($id)
$randName = User::generate_passwd(5);
// set img tag
$imgSRC = '<img src="'.apidb_fullurl("appimage.php").
'?thumbnail=true&id='.$id.'" alt="'.$oScreenshot->sDescription.
'?bThumbnail=true&iId='.$id.'" alt="'.$oScreenshot->sDescription.
'" width="'.$oScreenshot->oThumbnailImage->get_width().
'" height="'.$oScreenshot->oThumbnailImage->get_height().'">';
$img = '<a href="'.apidb_fullurl("appimage.php").
'?id='.$id.
'?iId='.$id.
'" onclick="javascript:openWin(\''.apidb_fullurl("appimage.php").
'?id='.$id.'\',\''.$randName.'\','.
($oScreenshot->oScreenshotImage->get_width() + 20).','.
@@ -426,7 +426,7 @@ function get_thumbnail($id)
if ($_SESSION['current']->getpref("window:screenshot") == "no")
{
$img = '<a href="'.apidb_fullurl("appimage.php").
'?imageId='.$id.'">'.$imgSRC.'</a>';
'?iImageId='.$id.'">'.$imgSRC.'</a>';
}
}
return $img;

View File

@@ -10,7 +10,7 @@ function global_sidebar_menu() {
$aClean = array(); //array of filtered user input
$aClean['q'] = makeSafe($_REQUEST['q']);
$aClean['sSearchQuery'] = makeSafe($_REQUEST['sSearchQuery']);
$g = new htmlmenu(APPDB_OWNER." Menu");
$g->add(APPDB_OWNER, APPDB_OWNER_URL);
@@ -24,7 +24,7 @@ function global_sidebar_menu() {
$g->add("Screenshots", BASE."viewScreenshots.php");
$g->add("Browse Apps", BASE."appbrowse.php");
$g->add("Top 25", BASE."votestats.php");
$g->add("Submit Application", BASE."appsubmit.php?sub=view&apptype=application");
$g->add("Submit Application", BASE."appsubmit.php?sSub=view&sAppType=application");
$g->add("Help &amp; Documentation", BASE."help/");
$g->add("AppDB Stats", BASE."appdbStats.php");
$g->add("View Distributions (".getNumberOfDistributions().")", BASE."distributionView.php");
@@ -34,7 +34,7 @@ function global_sidebar_menu() {
$g->done();
$g = new htmlmenu("Search");
$g->addmisc(app_search_box(!empty($aClean['q']) ? $aClean['q'] : ''));
$g->addmisc(app_search_box(!empty($aClean['sSearchQuery']) ? $aClean['sSearchQuery'] : ''));
$g->done();
}
@@ -43,7 +43,7 @@ function global_sidebar_menu() {
function app_search_box($q = '')
{
$str = "</span><form method=\"get\" action=\"".BASE."search.php\">\n";
$str .= "<input type=text name=q value='$q' size=11 class=searchfield>";
$str .= "<input type=text name=sSearchQuery value='$q' size=11 class=searchfield>";
$str .= "<input type=submit value='Search' class=searchbutton>\n";
$str .= "</form>\n<span>";
return $str;

View File

@@ -14,7 +14,7 @@ function global_sidebar_login() {
if($_SESSION['current']->isLoggedIn())
{
$g->add("Logout", BASE."account.php?cmd=logout");
$g->add("Logout", BASE."account.php?sCmd=logout");
$g->add("Preferences", BASE."preferences.php");
/* if this user maintains any applications list them */
@@ -27,9 +27,9 @@ function global_sidebar_login() {
while(list($index, list($appId, $versionId, $superMaintainer)) = each($apps_user_maintains))
{
if($superMaintainer)
$g->addmisc("<a href='".BASE."appview.php?appId=$appId'>".Application::lookup_name($appId)."*</a>", "center");
$g->addmisc("<a href='".BASE."appview.php?iAppId=$appId'>".Application::lookup_name($appId)."*</a>", "center");
else
$g->addmisc("<a href='".BASE."appview.php?versionId=$versionId'>".Application::lookup_name($appId)." ".Version::lookup_name($versionId)."</a>", "center");
$g->addmisc("<a href='".BASE."appview.php?iVersionId=$versionId'>".Application::lookup_name($appId)." ".Version::lookup_name($versionId)."</a>", "center");
}
}
$appsRejected = $_SESSION['current']->getAllRejectedApps();
@@ -39,7 +39,7 @@ function global_sidebar_login() {
}
else
{
$g->add("Login", BASE."account.php?cmd=login");
$g->add("Login", BASE."account.php?sCmd=login");
}
$g->done();

View File

@@ -254,13 +254,13 @@ class testData{
case "add":
$sSubject = "Submitted testing data accepted";
$sMsg = "The testing data you submitted (".$oApp->sName." ".$this->sName.") has been accepted.";
$sMsg .= APPDB_ROOT."appview.php?versionId=".$this->iVersionId."&iTestingId=".$this->iTestingId."\n";
$sMsg .= APPDB_ROOT."appview.php?iVersionId=".$this->iVersionId."&iTestingId=".$this->iTestingId."\n";
$sMsg .= "Administrators Responce:\n";
break;
case "reject":
$sSubject = "Submitted testing data rejected";
$sMsg = "The testing data you submitted (".$oApp->sName." ".$this->sName.") has been rejected.";
$sMsg .= APPDB_ROOT."testResults.php?sub=view&iTestingId=".$this->iTestingId."\n";
$sMsg .= APPDB_ROOT."testResults.php?sSub=view&iTestingId=".$this->iTestingId."\n";
$sMsg .= "Reason given:\n";
break;
case "delete":
@@ -285,7 +285,7 @@ class testData{
$oVersion = new Version($this->iVersionId);
$oApp = new Application($oVersion->iAppId);
$sBacklink = APPDB_ROOT."appview.php?versionId=".$this->iVersionId."&iTestingId=".$this->iTestingId."\n";
$sBacklink = APPDB_ROOT."appview.php?iVersionId=".$this->iVersionId."&iTestingId=".$this->iTestingId."\n";
switch($sAction)
{
@@ -465,7 +465,7 @@ class testData{
echo ' <td>'.$sStatus.'&nbsp</td>',"\n";
if ($_SESSION['current']->hasAppVersionModifyPermission($oVersion))
{
echo '<td><a href="'.BASE.'admin/adminTestResults.php?sub=view&iTestingId='.$oTest->iTestingId.'">',"\n";
echo '<td><a href="'.BASE.'admin/adminTestResults.php?sSub=view&iTestingId='.$oTest->iTestingId.'">',"\n";
echo 'Edit</a></td>',"\n";
}
echo '</tr>',"\n";
@@ -474,7 +474,7 @@ class testData{
echo '</table>',"\n";
echo '<form method=get action="'.$PHP_SELF.'">';
echo '<input name="versionId" type=hidden value="',$iVersionId,'" />';
echo '<input name="iVersionId" type=hidden value="',$iVersionId,'" />';
if($rowsUsed >= $iDisplayLimit && !is_string($showAll))
echo '<input class="button" name="showAll" type=submit value="Show All Tests" />';
@@ -534,7 +534,7 @@ class testData{
// Rating
echo '<tr><td class="color0"><b>Rating</b></td><td class="color0">',"\n";
make_maintainer_rating_list("sTestedRating", $this->sTestedRating);
echo '<a href="'.BASE.'/help/?topic=maintainer_ratings" target="_blank">Rating definitions</a></td></tr>',"\n";
echo '<a href="'.BASE.'/help/?sTopic=maintainer_ratings" target="_blank">Rating definitions</a></td></tr>',"\n";
// extra comments
echo '<tr valign=top><td class="color1"><b>Extra comments</b></td>',"\n";
echo '<td class="color0"><textarea name="sComments" rows=10 cols=35>';
@@ -685,7 +685,7 @@ class testData{
echo " <td>".$oApp->sName."</td>\n";
echo " <td>".$oVersion->sName."</td>\n";
echo " <td>".$oTest->sTestedRelease."</td>\n";
echo " <td align=\"center\">[<a href=".$_SERVER['PHP_SELF']."?sub=view&iTestingId=".$oTest->iTestingId.">process</a>]</td>\n";
echo " <td align=\"center\">[<a href=".$_SERVER['PHP_SELF']."?sSub=view&iTestingId=".$oTest->iTestingId.">process</a>]</td>\n";
echo "</tr>\n\n";
$c++;
}

View File

@@ -53,11 +53,11 @@ class Url {
{
$aClean = array(); //array of filtered user input
$aClean['versionId'] = makeSafe($_REQUEST['versionId']);
$aClean['appId'] = makeSafe($_REQUEST['appId']);
$aClean['iVersionId'] = makeSafe($_REQUEST['iVersionId']);
$aClean['iAppId'] = makeSafe($_REQUEST['iAppId']);
// Security, if we are not an administrator or a maintainer, the url must be queued.
if(!($_SESSION['current']->hasPriv("admin") || $_SESSION['current']->isMaintainer($aClean['versionId']) || $_SESSION['current']->isSupermaintainer($aClean['appId'])))
if(!($_SESSION['current']->hasPriv("admin") || $_SESSION['current']->isMaintainer($aClean['iVersionId']) || $_SESSION['current']->isSupermaintainer($aClean['iAppId'])))
{
$this->bQueued = true;
}
@@ -212,7 +212,7 @@ class Url {
if(!$this->bQueued)
{
$sSubject = "Url for ".$sAppName." added by ".$_SESSION['current']->sRealname;
$sMsg = APPDB_ROOT."appview.php?versionId=".$this->iVersionId."\n";
$sMsg = APPDB_ROOT."appview.php?iVersionId=".$this->iVersionId."\n";
if($this->iSubmitterId)
{
$oSubmitter = new User($this->iSubmitterId);
@@ -223,7 +223,7 @@ class Url {
} else // Url queued.
{
$sSubject = "Url for ".$sAppName." submitted by ".$_SESSION['current']->sRealname;
$sMsg = APPDB_ROOT."appview.php?versionId=".$this->iVersionId."\n";
$sMsg = APPDB_ROOT."appview.php?iVersionId=".$this->iVersionId."\n";
$sMsg .= "This url has been queued.";
$sMsg .= "\n";
addmsg("The url you submitted will be added to the database database after being reviewed.", "green");
@@ -231,7 +231,7 @@ class Url {
} else // Url deleted.
{
$sSubject = "Url for ".$sAppName." deleted by ".$_SESSION['current']->sRealname;
$sMsg = APPDB_ROOT."appview.php?versionId=".$this->iVersionId."\n";
$sMsg = APPDB_ROOT."appview.php?iVersionId=".$this->iVersionId."\n";
addmsg("Url deleted.", "green");
}

View File

@@ -727,7 +727,7 @@ class User {
$sMsg = "You didn't log in in the past six months to the AppDB.\r\n";
$sMsg .= "Please log in or your account will automatically be deleted in one month.\r\n";
}
$sMsg .= APPDB_ROOT."account.php?cmd=login\r\n";
$sMsg .= APPDB_ROOT."account.php?sCmd=login\r\n";
mail_appdb($this->sEmail, $sSubject, $sMsg);

View File

@@ -284,7 +284,7 @@ function outputTopXRow($oRow)
$img = get_screenshot_img(null, $oRow->versionId, false); // image, disable extra formatting
echo '
<tr class="white">
<td class="app_name"><a href="appview.php?versionId='.$oRow->versionId.'">'.$oApp->sName.' '.$oVersion->sName.'</a></td>
<td class="app_name"><a href="appview.php?iVersionId='.$oRow->versionId.'">'.$oApp->sName.' '.$oVersion->sName.'</a></td>
<td>'.util_trim_description($oApp->sDescription).'</td>
<td><center>'.$img.'</center></td>
</tr>';
@@ -555,7 +555,7 @@ function outputSearchTableForhResult($search_words, $hResult)
//display row
echo "<tr class=$bgcolor>\n";
echo " <td>".html_ahref($oRow->appName,BASE."appview.php?appId=$oRow->appId")."</td>\n";
echo " <td>".html_ahref($oRow->appName,BASE."appview.php?iAppId=$oRow->appId")."</td>\n";
echo " <td>".util_trim_description($oRow->description)."</td>\n";
echo " <td>$y->versions &nbsp;</td>\n";
echo "</tr>\n\n";
@@ -575,55 +575,55 @@ function process_app_version_changes($isVersion)
{
/* load up the version or application depending on which values are set */
if($isVersion)
$oVersion = new Version($_REQUEST['versionId']);
$oVersion = new Version($_REQUEST['iVersionId']);
else
$oApp = new Application($_REQUEST['appId']);
$oApp = new Application($_REQUEST['iAppId']);
// commit changes of form to database
if(($_REQUEST['submit'] == "Update Database") && $isVersion) /* is a version */
if(($_REQUEST['sSubmit'] == "Update Database") && $isVersion) /* is a version */
{
$oVersion->GetOutputEditorValues();
$oVersion->update();
} else if(($_REQUEST['submit'] == "Update Database") && !$isVersion) /* is an application */
} else if(($_REQUEST['sSubmit'] == "Update Database") && !$isVersion) /* is an application */
{
$oApp->GetOutputEditorValues();
$oApp->update();
} else if($_REQUEST['submit'] == "Update URL")
} else if($_REQUEST['sSubmit'] == "Update URL")
{
$sWhatChanged = "";
$bAppChanged = false;
if (!empty($_REQUEST['url_desc']) && !empty($_REQUEST['url']) )
if (!empty($_REQUEST['sUrlDesc']) && !empty($_REQUEST['sUrl']) )
{
// process added URL
if($_SESSION['current']->showDebuggingInfos()) { echo "<p align=center><b>{$_REQUEST['url']}:</b> {$_REQUEST['url_desc']} </p>"; }
if($_SESSION['current']->showDebuggingInfos()) { echo "<p align=center><b>{$_REQUEST['sUrl']}:</b> {$_REQUEST['sUrlDesc']} </p>"; }
if($isVersion)
{
$hResult = query_parameters("INSERT INTO appData (versionId, type, description, url) ".
"VALUES ('?', '?', '?', '?')",
$_REQUEST['versionId'], "url", $_REQUEST['url_desc'],
$_REQUEST['url']);
$_REQUEST['iVersionId'], "url", $_REQUEST['sUrlDesc'],
$_REQUEST['sUrl']);
} else
{
$hResult = query_parameters("INSERT INTO appData (appId, type, description, url) ".
"VALUES ('?', '?', '?', '?')",
$_REQUEST['appId'], "url", $_REQUEST['url_desc'],
$_REQUEST['url']);
$_REQUEST['iAppId'], "url", $_REQUEST['sUrlDesc'],
$_REQUEST['sUrl']);
}
if ($hResult)
{
addmsg("The URL was successfully added into the database", "green");
$sWhatChanged .= " Added Url: Description: ".stripslashes($_REQUEST['url_desc'])."\n";
$sWhatChanged .= " Url: ".stripslashes($_REQUEST['url'])."\n";
$sWhatChanged .= " Added Url: Description: ".stripslashes($_REQUEST['sUrlDesc'])."\n";
$sWhatChanged .= " Url: ".stripslashes($_REQUEST['sUrl'])."\n";
$bAppChanged = true;
}
}
// Process changed URLs
for($i = 0; $i < $_REQUEST['rows']; $i++)
for($i = 0; $i < $_REQUEST['iRows']; $i++)
{
if($_SESSION['current']->showDebuggingInfos()) { echo "<p align=center><b>{$_REQUEST['adescription'][$i]}:</b> {$_REQUEST['aURL'][$i]}: {$_REQUEST['adelete'][$i]} : {$_REQUEST['aId'][$i]} : .{$_REQUEST['aOldDesc'][$i]}. : {$_REQUEST['aOldURL'][$i]}</p>"; }
@@ -663,8 +663,8 @@ function process_app_version_changes($isVersion)
}
if ($bAppChanged)
{
$sEmail = User::get_notify_email_address_list($_REQUEST['appId']);
$oApp = new Application($_REQUEST['appId']);
$sEmail = User::get_notify_email_address_list($_REQUEST['iAppId']);
$oApp = new Application($_REQUEST['iAppId']);
if($sEmail)
{
if($isVersion)
@@ -672,7 +672,7 @@ function process_app_version_changes($isVersion)
else
$sSubject = "Links for ".$oApp->sName." have been updated by ".$_SESSION['current']->sRealname;
$sMsg = APPDB_ROOT."appview.php?appId=".$_REQUEST['appId']."\n";
$sMsg = APPDB_ROOT."appview.php?iAppId=".$_REQUEST['iAppId']."\n";
$sMsg .= "\n";
$sMsg .= "The following changes have been made:";
$sMsg .= "\n";

View File

@@ -432,7 +432,7 @@ class Version {
$sMsg = "The version you submitted (".$oApp->sName." ".$this->sName.") has been rejected. ";
$sMsg .= "Clicking on the link in this email will allow you to modify and resubmit the version. ";
$sMsg .= "A link to your queue of applications and versions will also show up on the left hand side of the Appdb site once you have logged in. ";
$sMsg .= APPDB_ROOT."appsubmit.php?sub=view&apptype=version&versionId=".$this->iVersionId."\n";
$sMsg .= APPDB_ROOT."appsubmit.php?sSub=view&sAppType=version&iVersionId=".$this->iVersionId."\n";
$sMsg .= "Reason given:\n";
break;
case "delete":
@@ -461,7 +461,7 @@ class Version {
if($this->sQueued == "false")
{
$sSubject = "Version ".$this->sName." of ".$oApp->sName." added by ".$_SESSION['current']->sRealname;
$sMsg = APPDB_ROOT."appview.php?versionId=".$this->iVersionId."\n";
$sMsg = APPDB_ROOT."appview.php?iVersionId=".$this->iVersionId."\n";
if($this->iSubmitterId)
{
$oSubmitter = new User($this->iSubmitterId);
@@ -485,7 +485,7 @@ class Version {
break;
case "edit":
$sSubject = "'".$oApp->sName." ".$this->sName."' has been modified by ".$_SESSION['current']->sRealname;
$sMsg .= APPDB_ROOT."appview.php?versionId=".$this->iVersionId."\n";
$sMsg .= APPDB_ROOT."appview.php?iVersionId=".$this->iVersionId."\n";
addmsg("Version modified.", "green");
break;
case "delete":
@@ -502,7 +502,7 @@ class Version {
break;
case "reject":
$sSubject = "Version '".$this->sName."' of '".$oApp->sName."' has been rejected by ".$_SESSION['current']->sRealname;
$sMsg .= APPDB_ROOT."appsubmit.php?apptype=application&sub=view&versionId=".$this->iVersionId."\n";
$sMsg .= APPDB_ROOT."appsubmit.php?sAppType=application&sSub=view&iVersionId=".$this->iVersionId."\n";
// if replyText is set we should report the reason the version was rejected
if($aClean['replyText'])
@@ -529,7 +529,7 @@ class Version {
echo html_frame_start("Version Form", "90%", "", 0);
echo "<table width='100%' border=0 cellpadding=2 cellspacing=0>\n";
echo '<input type="hidden" name="versionId" value='.$this->iVersionId.' />';
echo '<input type="hidden" name="iVersionId" value='.$this->iVersionId.' />';
if($editParentApplication)
{
@@ -537,20 +537,20 @@ class Version {
$x = new TableVE("view");
echo '<tr valign=top><td class=color0><b>Application</b></td>', "\n";
echo '<td>',"\n";
$x->make_option_list("appId",$this->iAppId,"appFamily","appId","appName");
$x->make_option_list("iAppId",$this->iAppId,"appFamily","appId","appName");
echo '</td></tr>',"\n";
} else
{
echo '<input type="hidden" name="appId" value='.$this->iAppId.' />';
echo '<input type="hidden" name="iAppId" value='.$this->iAppId.' />';
}
// version name
echo '<tr valign=top><td class="color0"><b>Version name</b></td>',"\n";
echo '<td><input size="20" type="text" name="versionName" value="'.$this->sName.'"></td></tr>',"\n";
echo '<td><input size="20" type="text" name="sVersionName" value="'.$this->sName.'"></td></tr>',"\n";
// version description
echo '<tr valign=top><td class=color0><b>Version description</b></td>',"\n";
echo '<td><p><textarea cols="80" rows="20" id="version_editor" name="versionDescription">',"\n";
echo '<td><p><textarea cols="80" rows="20" id="version_editor" name="shVersionDescription">',"\n";
echo $this->sDescription.'</textarea></p></td></tr>',"\n";
@@ -563,17 +563,17 @@ class Version {
echo html_frame_start("Info", "90%", "", 0);
echo "<table border=0 cellpadding=2 cellspacing=0>\n";
echo '<tr><td class="color4">Rating</td><td class="color0">',"\n";
make_maintainer_rating_list("maintainer_rating", $this->sTestedRating);
make_maintainer_rating_list("sMaintainerRating", $this->sTestedRating);
echo '</td></tr>',"\n";
echo '<tr><td class=color1>Release</td><td class=color0>',"\n";
make_bugzilla_version_list("maintainer_release", $this->sTestedRelease);
make_bugzilla_version_list("sMaintainerRelease", $this->sTestedRelease);
echo '</td></tr>',"\n";
echo html_table_end();
echo html_frame_end();
} else
{
echo '<input type="hidden" name="maintainer_rating" value='.$this->sTestedRating.' />';
echo '<input type="hidden" name="maintainer_release" value='.$this->sTestedRelease.' />';
echo '<input type="hidden" name="sMaintainerRating" value='.$this->sTestedRating.' />';
echo '<input type="hidden" name="sMaintainerRelease" value='.$this->sTestedRelease.' />';
}
}
@@ -581,15 +581,15 @@ class Version {
{
$aClean = array(); //array of filtered user input
$aClean['versionName'] = makeSafe($_REQUEST['versionName']);
$aClean['versionDescription'] = makeSafe($_REQUEST['versionDescription']);
$aClean['sVersionName'] = makeSafe($_REQUEST['sVersionName']);
$aClean['shVersionDescription'] = makeSafe($_REQUEST['shVersionDescription']);
$errors = "";
if (empty($aClean['versionName']))
if (empty($aClean['sVersionName']))
$errors .= "<li>Please enter an application version.</li>\n";
if (empty($aClean['versionDescription']))
if (empty($aClean['shVersionDescription']))
$errors .= "<li>Please enter a version description.</li>\n";
return $errors;
@@ -599,19 +599,19 @@ class Version {
function GetOutputEditorValues()
{
$aClean = array(); //array of filtered user input
$aClean['appId'] = makeSafe($_REQUEST['appId']);
$aClean['versionId'] = makeSafe($_REQUEST['versionId']);
$aClean['versionName'] = makeSafe($_REQUEST['versionName']);
$aClean['versionDescription'] = makeSafe($_REQUEST['versionDescription']);
$aClean['maintainer_rating'] = makeSafe($_REQUEST['maintainer_rating']);
$aClean['maintainer_release'] = makeSafe($_REQUEST['maintainer_release']);
$aClean['iAppId'] = makeSafe($_REQUEST['iAppId']);
$aClean['iVersionId'] = makeSafe($_REQUEST['iVersionId']);
$aClean['sVersionName'] = makeSafe($_REQUEST['sVersionName']);
$aClean['shVersionDescription'] = makeSafe($_REQUEST['shVersionDescription']);
$aClean['sMaintainerRating'] = makeSafe($_REQUEST['sMaintainerRating']);
$aClean['sMaintainerRelease'] = makeSafe($_REQUEST['sMaintainerRelease']);
$this->iAppId = $aClean['appId'];
$this->iVersionId = $aClean['versionId'];
$this->sName = $aClean['versionName'];
$this->sDescription = $aClean['versionDescription'];
$this->sTestedRating = $aClean['maintainer_rating'];
$this->sTestedRelease = $aClean['maintainer_release'];
$this->iAppId = $aClean['iAppId'];
$this->iVersionId = $aClean['iVersionId'];
$this->sName = $aClean['sVersionName'];
$this->sDescription = $aClean['shVersionDescription'];
$this->sTestedRating = $aClean['sMaintainerRating'];
$this->sTestedRelease = $aClean['sMaintainerRelease'];
}
function display()
@@ -713,37 +713,37 @@ class Version {
/* of this app family? */
if($_SESSION['current']->isSuperMaintainer($oApp->iAppId))
{
echo '<form method="post" name="message" action="maintainerdelete.php">';
echo '<form method="post" name="sMessage" action="maintainerdelete.php">';
echo '<input type="submit" value="Remove yourself as a super maintainer" class="button">';
echo '<input type="hidden" name="superMaintainer" value="1">';
echo "<input type=hidden name=\"appId\" value=\"".$oApp->iAppId."\">";
echo "<input type=hidden name=\"versionId\" value=\"".$this->iVersionId."\">";
echo '<input type="hidden" name="iSuperMaintainer" value="1">';
echo "<input type=hidden name=\"iAppId\" value=\"".$oApp->iAppId."\">";
echo "<input type=hidden name=\"iVersionId\" value=\"".$this->iVersionId."\">";
echo "</form>";
} else
{
/* are we already a maintainer? */
if($_SESSION['current']->isMaintainer($this->iVersionId)) /* yep */
{
echo '<form method="post" name="message" action="maintainerdelete.php">';
echo '<form method="post" name="sMessage" action="maintainerdelete.php">';
echo '<input type="submit" value="Remove yourself as a maintainer" class=button>';
echo '<input type="hidden" name="superMaintainer" value="0">';
echo "<input type=hidden name=\"appId\" value=\"".$oApp->iAppId."\">";
echo "<input type=hidden name=\"versionId\" value=\"".$this->iVersionId."\">";
echo '<input type="hidden" name="iSuperMaintainer" value="0">';
echo "<input type=hidden name=\"iAppId\" value=\"".$oApp->iAppId."\">";
echo "<input type=hidden name=\"iVersionId\" value=\"".$this->iVersionId."\">";
echo "</form>";
} else /* nope */
{
echo '<form method="post" name="message" action="maintainersubmit.php">';
echo '<form method="post" name="sMessage" action="maintainersubmit.php">';
echo '<input type="submit" value="Be a maintainer for this app" class="button" title="Click here to know more about maintainers.">';
echo "<input type=hidden name=\"appId\" value=\"".$oApp->iAppId."\">";
echo "<input type=hidden name=\"versionId\" value=\"".$this->iVersionId."\">";
echo "<input type=hidden name=\"iAppId\" value=\"".$oApp->iAppId."\">";
echo "<input type=hidden name=\"iVersionId\" value=\"".$this->iVersionId."\">";
echo "</form>";
$oMonitor = new Monitor();
$oMonitor->find($_SESSION['current']->iUserId,
$oApp->iAppId,$this->iVersionId);
if(!$oMonitor->iMonitorId)
{
echo '<form method=post name=message action=appview.php?versionId='.$this->iVersionId.'&appId='.$oApp->iAppId.'>';
echo '<input type=hidden name="sub" value="StartMonitoring" />';
echo '<form method=post name=sMessage action=appview.php?iVersionId='.$this->iVersionId.'&iAppId='.$oApp->iAppId.'>';
echo '<input type=hidden name="sSub" value="StartMonitoring" />';
echo '<input type=submit value="Monitor Version" class="button" />';
echo "</form>";
}
@@ -752,8 +752,8 @@ class Version {
} else
{
echo '<form method="post" name="message" action="account.php">';
echo '<input type="hidden" name="cmd" value="login">';
echo '<form method="post" name="sMessage" action="account.php">';
echo '<input type="hidden" name="sCmd" value="login">';
echo '<input type=submit value="Log in to become an app maintainer" class="button">';
echo '</form>';
}
@@ -763,13 +763,13 @@ class Version {
if ($_SESSION['current']->hasPriv("admin") || $_SESSION['current']->isMaintainer($this->iVersionId) || $_SESSION['current']->isSuperMaintainer($this->iAppId))
{
echo '<tr><td colspan="2" align="center">';
echo '<form method="post" name="message" action="admin/editAppVersion.php">';
echo '<input type="hidden" name="appId" value="'.$oApp->iAppId.'" />';
echo '<input type="hidden" name="versionId" value="'.$this->iVersionId.'" />';
echo '<form method="post" name="sMessage" action="admin/editAppVersion.php">';
echo '<input type="hidden" name="iAppId" value="'.$oApp->iAppId.'" />';
echo '<input type="hidden" name="iVersionId" value="'.$this->iVersionId.'" />';
echo '<input type=submit value="Edit Version" class="button" />';
echo '</form>';
$url = BASE."admin/deleteAny.php?what=appVersion&amp;appId=".$oApp->iAppId."&amp;versionId=".$this->iVersionId."&amp;confirmed=yes";
echo "<form method=\"post\" name=\"delete\" action=\"javascript:deleteURL('Are you sure?', '".$url."')\">";
$url = BASE."admin/deleteAny.php?sWhat=appVersion&amp;iAppId=".$oApp->iAppId."&amp;iVersionId=".$this->iVersionId."&amp;sConfirmed=yes";
echo "<form method=\"post\" name=\"sDelete\" action=\"javascript:deleteURL('Are you sure?', '".$url."')\">";
echo '<input type=submit value="Delete Version" class="button" />';
echo '</form>';
echo '<form method="post" name="message" action="admin/addAppNote.php">';
@@ -792,8 +792,8 @@ class Version {
{
echo '<tr><td colspan="2" align="center">';
echo '</form>';
echo '<form method=post name=message action=appview.php?versionId='.$this->iVersionId.'>';
echo '<input type=hidden name="sub" value="StopMonitoring" />';
echo '<form method=post name=sMessage action=appview.php?iVersionId='.$this->iVersionId.'>';
echo '<input type=hidden name="sSub" value="StopMonitoring" />';
echo '<input type=submit value="Stop Monitoring Version" class="button" />';
echo '</form>';
echo "</td></tr>";
@@ -811,10 +811,10 @@ class Version {
{
$oTest->ShowVersionsTestingTable($this->iVersionId,
$iCurrentTest,
$_SERVER['PHP_SELF']."?versionId=".$this->iVersionId."&iTestingId=",
$_SERVER['PHP_SELF']."?iVersionId=".$this->iVersionId."&iTestingId=",
5);
}
echo '<form method=post name=message action=testResults.php?sub=view&iVersionId='.$this->iVersionId.'>';
echo '<form method=post name=sMessage action=testResults.php?sSub=view&iVersionId='.$this->iVersionId.'>';
echo '<input type=submit value="Add Testing Data" class="button" />';
echo '</form>';
@@ -885,7 +885,7 @@ class Version {
echo " <td>".$sVendor."</td>\n";
echo " <td>".$oApp->sName."</td>\n";
echo " <td>".$oVersion->sName."</td>\n";
echo " <td align=\"center\">[<a href=".$_SERVER['PHP_SELF']."?apptype=version&sub=view&versionId=".$oVersion->iVersionId.">process</a>]</td>\n";
echo " <td align=\"center\">[<a href=".$_SERVER['PHP_SELF']."?sAppType=version&sSub=view&iVersionId=".$oVersion->iVersionId.">process</a>]</td>\n";
echo "</tr>\n\n";
$c++;
}
@@ -920,7 +920,7 @@ class Version {
//display row
echo "<tr class=$bgcolor>\n";
echo " <td><a href=\"".BASE."appview.php?versionId=".$iVersionId."\">".$oVersion->sName."</a></td>\n";
echo " <td><a href=\"".BASE."appview.php?iVersionId=".$iVersionId."\">".$oVersion->sName."</a></td>\n";
echo " <td>".util_trim_description($oVersion->sDescription)."</td>\n";
echo " <td align=center>".$oVersion->sTestedRating."</td>\n";
echo " <td align=center>".$oVersion->sTestedRelease."</td>\n";

View File

@@ -116,7 +116,7 @@ function vote_menu()
{
$aClean = array(); //array of filtered user input
$aClean['appId'] = makeSafe($_REQUEST['appId']);
$aClean['iAppId'] = makeSafe($_REQUEST['iAppId']);
$m = new htmlmenu("Votes","updatevote.php");
@@ -127,22 +127,22 @@ function vote_menu()
if(isset($votes[$i]))
{
$sAppName = Application::lookup_name($votes[$i]->appId);
$str = "<a href='appview.php?appId=".$votes[$i]->appId."'> $sAppName</a>";
$str = "<a href='appview.php?iAppId=".$votes[$i]->appId."'> $sAppName</a>";
$m->add("<input type=radio name=slot value='$i'> ".$str);
}
else
$m->add("<input type=radio name=slot value='$i'> No App Selected");
$m->add("<input type=radio name=iSlot value='$i'> No App Selected");
}
$m->addmisc("&nbsp;");
$m->add("<input type=submit name=clear value=' Clear Vote ' class=votebutton>");
$m->add("<input type=submit name=vote value='Vote for App' class=votebutton>");
$m->add("<input type=submit name=sClear value=' Clear Vote ' class=votebutton>");
$m->add("<input type=submit name=sVote value='Vote for App' class=votebutton>");
$m->addmisc("<input type=hidden name=appId value={$aClean['appId']}>");
$m->addmisc("<input type=hidden name=iAppId value={$aClean['iAppId']}>");
$m->add("View Results", BASE."votestats.php");
$m->add("Voting Help", BASE."help/?topic=voting");
$m->add("Voting Help", BASE."help/?sTopic=voting");
$m->done(1);
}
@@ -156,32 +156,32 @@ function vote_update($vars)
return;
}
if( !is_numeric($vars['appId']) OR !is_numeric($vars['slot']))
if( !is_numeric($vars['iAppId']) OR !is_numeric($vars['iSlot']))
{
if(is_numeric($vars['appId']))
redirect(apidb_fullurl("appview.php?appId=".$vars["appId"]));
if(is_numeric($vars['iAppId']))
redirect(apidb_fullurl("appview.php?iAppId=".$vars["iAppId"]));
else
redirect(apidb_fullurl("index.php"));
return;
}
if($vars["vote"])
if($vars["sVote"])
{
addmsg("Registered vote for App #".$vars["appId"], "green");
vote_add($vars["appId"], $vars["slot"]);
} else if($vars["clear"])
addmsg("Registered vote for App #".$vars["iAppId"], "green");
vote_add($vars["iAppId"], $vars["slot"]);
} else if($vars["sClear"])
{
/* see if we have a vote in this slot, if we don't there is */
/* little reason to remove it or even mention that we did anything */
if(is_vote_in_slot($vars["slot"]))
{
vote_remove($vars["slot"]);
addmsg("Removed vote for App #".$vars["appId"], "green");
addmsg("Removed vote for App #".$vars["iAppId"], "green");
}
}
redirect(apidb_fullurl("appview.php?appId=".$vars["appId"]));
redirect(apidb_fullurl("appview.php?iAppId=".$vars["iAppId"]));
}
// tell us if there is a vote in a given slot so we don't

View File

@@ -22,10 +22,10 @@ compatibility with Wine.</p>
<?php
$str_benefits="
<ul>
<li>Ability to <a href=\"".BASE."help/?topic=voting\" title=\"help on voting\" style=\"cursor: help\">vote</a> on Favorite Applications</li>
<li>Ability to <a href=\"".BASE."help/?sTopic=voting\" title=\"help on voting\" style=\"cursor: help\">vote</a> on Favorite Applications</li>
<li>Ability to customize the layout and behaviour of the AppDB and comments system</li>
<li>Take credit for your witty posts</li>
<li>Ability to sign up to be an <a href=\"".BASE."help/?topic=maintainer_guidelines\" title=\"informations about application maintainers\" style=\"cursor: help\">application maintainer</a>.</li>
<li>Ability to sign up to be an <a href=\"".BASE."help/?sTopic=maintainer_guidelines\" title=\"informations about application maintainers\" style=\"cursor: help\">application maintainer</a>.</li>
<li>Submit new applications and versions.</li>
<li>Submit new screenshots.</li>
</ul>
@@ -38,7 +38,7 @@ if(!$_SESSION['current']->isLoggedIn())
$str_benefits
<p>So what are you waiting for, [<a href=\"account.php?cmd=login\">login now</a>]. Your help in
<p>So what are you waiting for, [<a href=\"account.php?sCmd=login\">login now</a>]. Your help in
stomping out Wine issues will be greatly appreciated.</p>";
} else
{
@@ -73,12 +73,12 @@ If you have screenshots or links to contribute, please browse the database and u
if($voteAppId != "")
{
echo "There are <b>$numApps</b> applications currently in the database with\n";
echo "<a href='appview.php?appId=$voteAppId'>$voteAppName</a> being the\n";
echo "<a href='appview.php?iAppId=$voteAppId'>$voteAppName</a> being the\n";
echo "top <a href='votestats.php'>voted</a> application.\n";
} else
{
echo "There are <b>$numApps</b> applications currently in the database, please\n";
echo "<a href=\"".BASE."help/?topic=voting\" title=\"help on voting\" style=\"cursor: help\">vote</a> for your favorite application.\n";
echo "<a href=\"".BASE."help/?sTopic=voting\" title=\"help on voting\" style=\"cursor: help\">vote</a> for your favorite application.\n";
}
?>
@@ -130,12 +130,6 @@ If you have screenshots or links to contribute, please browse the database and u
<a href="http://frankscorner.org"><b>Frank's Corner</b></a>: Frank has a fantastic Wine
application site. The site contains tips and howtos on getting listed apps to run.
</p>
<p>
<a href="http://sidenet.ddo.jp/winetips/config.html"><b>Sidenet Wine configuration utility</b></a>: Installs Internet Explorer 6 and Windows Media Player 7 automatically (works also with MSN Messenger and RealPlayer).
</p>
<p>
<a href="http://www.von-thadden.de/Joachim/WineTools/"><b>WineTools</b></a>: WineTools is an menu driven installer for installing Windows programs under Wine (DCOM98, IE6, Windows Core Fonts, Windows System Software, Office & Office Viewer, Adobe Photoshop 7, Illustrator 9, Acrobat Reader 5.1, ...).
</p>
<?php
apidb_footer();
?>

View File

@@ -13,10 +13,10 @@ require(BASE."include/application.php");
$aClean = array(); //array of filtered user input
$aClean['appId'] = makeSafe($_POST['appId']);
$aClean['versionId'] = makeSafe($_POST['versionId']);
$aClean['confirmed'] = makeSafe($_POST['confirmed']);
$aClean['superMaintainer'] = makeSafe($_POST['superMaintainer']);
$aClean['iAppId'] = makeSafe($_POST['iAppId']);
$aClean['iVersionId'] = makeSafe($_POST['iVersionId']);
$aClean['iConfirmed'] = makeSafe($_POST['iConfirmed']);
$aClean['iSuperMaintainer'] = makeSafe($_POST['iSuperMaintainer']);
if(!$_SESSION['current']->isLoggedIn())
{
@@ -25,16 +25,16 @@ if(!$_SESSION['current']->isLoggedIn())
}
if($aClean['confirmed'])
if($aClean['iConfirmed'])
{
$oApp = new Application($aClean['appId']);
if($aClean['superMaintainer'])
$oApp = new Application($aClean['iAppId']);
if($aClean['iSuperMaintainer'])
{
apidb_header("You have resigned as super maintainer of ".$oApp->sName);
$result = $_SESSION['current']->deleteMaintainer($oApp->iAppId, null);
} else
{
$oVersion = new Version($aClean['versionId']);
$oVersion = new Version($aClean['iVersionId']);
apidb_header("You have resigned as maintainer of ".$oApp->sName." ".$oVersion->sName);
$result = $_SESSION['current']->deleteMaintainer($oApp->iAppId, $oVersion->iVersionId);
}
@@ -42,29 +42,29 @@ if($aClean['confirmed'])
*/
if($result)
{
if($aClean['superMaintainer'])
if($aClean['iSuperMaintainer'])
echo "You were removed as a super maintainer of ".$oApp->sName;
else
echo "You were removed as a maintainer of ".$oApp->sName." ".$oVersion->sName;
}
} else
{
if($aClean['superMaintainer'])
if($aClean['iSuperMaintainer'])
apidb_header("Confirm super maintainer resignation of ".$oApp->sName);
else
apidb_header("Confirm maintainer resignation of ".$oApp->sName." ".$oVersion->sName);
echo '<form name="deleteMaintainer" action="maintainerdelete.php" method="post" enctype="multipart/form-data">',"\n";
echo '<form name="sDeleteMaintainer" action="maintainerdelete.php" method="post" enctype="multipart/form-data">',"\n";
echo html_frame_start("Confirm",400,"",0);
echo "<table width='100%' border=0 cellpadding=2 cellspacing=0>\n";
echo "<input type=hidden name='appId' value={$aClean['appId']}>";
echo "<input type=hidden name='versionId' value={$aClean['versionId']}>";
echo "<input type=hidden name='superMaintainer' value={$aClean['superMaintainer']}>";
echo "<input type=hidden name='confirmed' value=1>";
echo "<input type=hidden name='iAppId' value={$aClean['iAppId']}>";
echo "<input type=hidden name='iVersionId' value={$aClean['iVersionId']}>";
echo "<input type=hidden name='iSuperMaintainer' value={$aClean['iSuperMaintainer']}>";
echo "<input type=hidden name='iConfirmed' value=1>";
if($aClean['superMaintainer'])
if($aClean['iSuperMaintainer'])
{
echo "<tr><td>Are you sure that you want to be removed as a super maintainer of this application?</tr></td>\n";
echo '<tr><td align=center><input type=submit value=" Confirm resignation as supermaintainer " class=button>', "\n";

View File

@@ -13,10 +13,10 @@ require(BASE."include/application.php");
$aClean = array(); //array of filtered user input
$aClean['maintainReason'] = makeSafe($_REQUEST['maintainReason']);
$aClean['appId'] = makeSafe($_POST['appId']);
$aClean['versionId'] = makeSafe(strip_tags($_POST['versionId']));
$aClean['superMaintainer'] = makeSafe($_POST['superMaintainer']);
$aClean['sMaintainReason'] = makeSafe($_REQUEST['sMaintainReason']);
$aClean['iAppId'] = makeSafe($_POST['iAppId']);
$aClean['iVersionId'] = makeSafe(strip_tags($_POST['iVersionId']));
$aClean['iSuperMaintainer'] = makeSafe($_POST['iSuperMaintainer']);
/**
@@ -52,23 +52,23 @@ if(!$_SESSION['current']->isLoggedIn())
/* if we have a versionId to check against see if */
/* the user is already a maintainer */
if(!$aClean['superMaintainer'] && $_SESSION['current']->isMaintainer($aClean['versionId']))
if(!$aClean['iSuperMaintainer'] && $_SESSION['current']->isMaintainer($aClean['iVersionId']))
{
echo "You are already a maintainer of this app!";
exit;
}
/* if this user is a super maintainer they maintain all of the versionIds of this appId */
if($_SESSION['current']->isSuperMaintainer($aClean['appId']))
if($_SESSION['current']->isSuperMaintainer($aClean['iAppId']))
{
echo "You are already a supermaintainer of the whole application family!";
exit;
}
if( $aClean['maintainReason'] )
if( $aClean['sMaintainReason'] )
{
// check the input for empty/invalid fields
$errors = checkAppMaintainerInput($aClean['maintainReason']);
$errors = checkAppMaintainerInput($aClean['sMaintainReason']);
if(!empty($errors))
{
util_show_error_page("We found the following errors:","<ul>$errors</ul><br />Please go back and correct them.");
@@ -76,7 +76,7 @@ if( $aClean['maintainReason'] )
}
// header
if($aClean['superMaintainer'])
if($aClean['iSuperMaintainer'])
apidb_header("Submit SuperMaintainer Request");
else
apidb_header("Submit Maintainer Request");
@@ -85,9 +85,9 @@ if( $aClean['maintainReason'] )
$hResult = query_parameters("INSERT INTO appMaintainerQueue (queueId, appId, versionId, ".
"userId, maintainReason, superMaintainer, submitTime) ".
"VALUES (?, '?', '?', '?', '?', '?', ?)",
"null", $aClean['appId'], $aClean['versionId'],
$_SESSION['current']->iUserId, $aClean['maintainReason'],
$aClean['superMaintainer'], "NOW()");
"null", $aClean['iAppId'], $aClean['iVersionId'],
$_SESSION['current']->iUserId, $aClean['sMaintainReason'],
$aClean['iSuperMaintainer'], "NOW()");
if ($hResult)
{
@@ -97,15 +97,15 @@ if( $aClean['maintainReason'] )
} else
{
// header
if($aClean['versionId'])
if($aClean['iVersionId'])
{
$oVersion = new Version($aClean['versionId']);
$oVersion = new Version($aClean['iVersionId']);
$oApp = new Application($oVersion->iAppId);
apidb_header("Request to become an application maintainer of ".$oApp->sName." ".$oVersion->sName);
}
else
{
$oApp = new Application($aClean['appId']);
$oApp = new Application($aClean['iAppId']);
apidb_header("Request to become an application super maintainer of ".$oApp->sName);
}
@@ -117,7 +117,7 @@ if( $aClean['maintainReason'] )
echo "An application maintainer is someone who runs the application \n";
echo "regularly and who is willing to be active in reporting regressions with newer \n";
echo "versions of Wine and to help other users run this application under Wine.</p>";
echo "<p>Being an application maintainer comes with new rights and new responsibilities; please be sure to read the <a href=\"".BASE."/help/?topic=maintainer_guidelines\">maintainer's guidelines</a> before to proceed.</p> ";
echo "<p>Being an application maintainer comes with new rights and new responsibilities; please be sure to read the <a href=\"".BASE."/help/?sTopic=maintainer_guidelines\">maintainer's guidelines</a> before to proceed.</p> ";
echo "<p>We ask that all maintainers explain why they want to be an application maintainer,\n";
echo "why they think they will do a good job and a little about their experience\n";
echo "with Wine. This is both to give you time to\n";
@@ -127,7 +127,7 @@ if( $aClean['maintainReason'] )
echo "don't have the experience with Wine that is necessary to help other users out.</p>\n";
/* Special message for super maintainer applications */
if($aClean['superMaintainer'])
if($aClean['iSuperMaintainer'])
{
echo "<p>Super maintainers are just like normal maintainers but they can modify EVERY version of\n";
echo "this application (and the application itself). We don't expect you to run every version but at least to help keep\n";
@@ -135,7 +135,7 @@ if( $aClean['maintainReason'] )
}
echo "<br /><br />";
if($aClean['superMaintainer'])
if($aClean['iSuperMaintainer'])
echo html_frame_start("New Super Maintainer Form",400,"",0);
else
echo html_frame_start("New Maintainer Form",400,"",0);
@@ -144,20 +144,20 @@ if( $aClean['maintainReason'] )
echo "<tr valign=top><td class=color0>";
echo '<b>Application</b></td><td>'.$oApp->sName;
echo '</td></tr>',"\n";
if($aClean['versionId'])
if($aClean['iVersionId'])
{
echo "<tr valign=top><td class=color0>";
echo '<b>Version</b></td><td>'.$oVersion->sName;
echo '</td></tr>',"\n";
}
echo "<input type=hidden name='appId' value={$aClean['appId']}>";
echo "<input type=hidden name='versionId' value={$aClean['versionId']}>";
echo "<input type=hidden name='superMaintainer' value={$aClean['superMaintainer']}>";
echo "<input type=hidden name='iAppId' value={$aClean['iAppId']}>";
echo "<input type=hidden name='iVersionId' value={$aClean['iVersionId']}>";
echo "<input type=hidden name='iSuperMaintainer' value={$aClean['iSuperMaintainer']}>";
if($aClean['superMaintainer'])
echo '<tr valign=top><td class=color0><b>Why you want to and should be an application super maintainer</b></td><td><textarea name="maintainReason" rows=15 cols=70></textarea></td></tr>',"\n";
if($aClean['iSuperMaintainer'])
echo '<tr valign=top><td class=color0><b>Why you want to and should be an application super maintainer</b></td><td><textarea name="sMaintainReason" rows=15 cols=70></textarea></td></tr>',"\n";
else
echo '<tr valign=top><td class=color0><b>Why you want to and should be an application maintainer</b></td><td><textarea name="maintainReason" rows=15 cols=70></textarea></td></tr>',"\n";
echo '<tr valign=top><td class=color0><b>Why you want to and should be an application maintainer</b></td><td><textarea name="sMaintainReason" rows=15 cols=70></textarea></td></tr>',"\n";
echo '<tr valign=top><td class=color3 align=center colspan=2> <input type=submit value=" Submit Maintainer Request " class=button> </td></tr>',"\n";
echo '</table>',"\n";

View File

@@ -11,7 +11,7 @@ include(BASE."include/"."incl.php");
$aClean = array(); //array of filtered user input
$aClean['userId'] = makeSafe($_REQUEST['userId']);
$aClean['iUserId'] = makeSafe($_REQUEST['iUserId']);
$aClean['iLimit'] = makeSafe($_REQUEST['iLimit']);
$aClean['sOrderBy'] = makeSafe($_REQUEST['sOrderBy']);
$aClean['sUserPassword'] = makeSafe($_REQUEST['sUserPassword']);
@@ -39,12 +39,12 @@ if(!$_SESSION['current']->isLoggedIn())
// we come from the administration to edit an user
if($_SESSION['current']->hasPriv("admin") &&
is_numeric($aClean['userId']) &&
is_numeric($aClean['iUserId']) &&
is_numeric($aClean['iLimit']) &&
in_array($aClean['sOrderBy'],array("email","realname","created"))
)
{
$oUser = new User($aClean['userId']);
$oUser = new User($aClean['iUserId']);
} else
{
$oUser = &$_SESSION['current'];
@@ -137,13 +137,13 @@ if($_POST)
{
addmsg("Preferences Updated", "green");
// we were managing an user, let's go back to the admin after updating tha admin status
if($oUser->iUserId == $aClean['userId'] && $_SESSION['current']->hasPriv("admin"))
if($oUser->iUserId == $aClean['iUserId'] && $_SESSION['current']->hasPriv("admin"))
{
if($aClean['sHasAdmin']=="on")
$oUser->addPriv("admin");
else
$oUser->delPriv("admin");
redirect(BASE."admin/adminUsers.php?userId=".$oUser->iUserId."&sSearch=".$aClean['sSearch']."&iLimit=".$aClean['iLimit']."&sOrderBy=".$aClean['sOrderBy']."&sSubmit=true");
redirect(BASE."admin/adminUsers.php?iUserId=".$oUser->iUserId."&sSearch=".$aClean['sSearch']."&iLimit=".$aClean['iLimit']."&sOrderBy=".$aClean['sOrderBy']."&sSubmit=true");
}
}
else
@@ -157,12 +157,12 @@ apidb_header("User Preferences");
echo "<form method=\"post\" action=\"preferences.php\">\n";
// if we manage another user we give the parameters to go back to the admin
if($oUser->iUserId == $aClean['userId'])
if($oUser->iUserId == $aClean['iUserId'])
{
echo "<input type=\"hidden\" name=\"iLimit\" value=\"".$aClean['iLimit']."\">\n";
echo "<input type=\"hidden\" name=\"sOrderBy\" value=\"".$aClean['sOrderBy']."\">\n";
echo "<input type=\"hidden\" name=\"sSearch\" value=\"".$aClean['sSearch']."\">\n";
echo "<input type=\"hidden\" name=\"userId\" value=\"".$aClean['userId']."\">\n";
echo "<input type=\"hidden\" name=\"iUserId\" value=\"".$aClean['iUserId']."\">\n";
}
echo html_frame_start("Preferences for ".$oUser->sRealname, "80%");
@@ -171,7 +171,7 @@ echo html_table_begin("width='100%' border=0 align=left cellspacing=0 class='box
show_user_fields();
// if we don't manage another user
if($oUser->iUserId != $aClean['userId']) build_prefs_list();
if($oUser->iUserId != $aClean['iUserId']) build_prefs_list();
echo html_table_end();
echo html_frame_end();

View File

@@ -16,46 +16,46 @@ require(BASE."include/mail.php");
$aClean = array(); //array of filtered user input
$aClean['cmd'] = makeSafe($_REQUEST['cmd']);
$aClean['versionId'] = makeSafe($_REQUEST['versionId']);
$aClean['screenshot_desc'] = makeSafe($_REQUEST['screenshot_desc']);
$aClean['imageId'] = makeSafe($_REQUEST['imageId']);
$aClean['appId'] = makeSafe($_REQUEST['appId']);
$aClean['sCmd'] = makeSafe($_REQUEST['sCmd']);
$aClean['iVersionId'] = makeSafe($_REQUEST['iVersionId']);
$aClean['sScreenshotDesc'] = makeSafe($_REQUEST['sScreenshotDesc']);
$aClean['iImageId'] = makeSafe($_REQUEST['iImageId']);
$aClean['iAppId'] = makeSafe($_REQUEST['iAppId']);
/*
* We issued a command.
*/
if($aClean['cmd'])
if($aClean['sCmd'])
{
// process screenshot upload
if($aClean['cmd'] == "screenshot_upload")
if($aClean['sCmd'] == "screenshot_upload")
{
if($_FILES['imagefile']['size']>600000)
if($_FILES['sImageFile']['size']>600000)
{
addmsg("Your screenshot was not accepted because it is too big. Please try to keep your screenshots under 600KB by saving games/video screenshots to jpeg and normal applications to png you might be able to achieve very good results with less bytes", "red");
} else
{
$oScreenshot = new Screenshot();
$oScreenshot->create($aClean['versionId'], $aClean['screenshot_desc'], $_FILES['imagefile']);
$oScreenshot->create($aClean['iVersionId'], $aClean['sScreenshotDesc'], $_FILES['sImageFile']);
$oScreenshot->free();
}
} elseif($aClean['cmd'] == "delete" && is_numeric($aClean['imageId'])) // process screenshot deletion
} elseif($aClean['sCmd'] == "delete" && is_numeric($aClean['iImageId'])) // process screenshot deletion
{
$oScreenshot = new Screenshot($aClean['imageId']);
$oScreenshot = new Screenshot($aClean['iImageId']);
$oScreenshot->delete();
$oScreenshot->free();
}
redirect(apidb_fullurl("screenshots.php?appId=".$aClean['appId']."&versionId=".$aClean['versionId']));
redirect(apidb_fullurl("screenshots.php?iAppId=".$aClean['iAppId']."&iVersionId=".$aClean['iVersionId']));
}
/*
* We didn't issued any command.
*/
$hResult = get_screenshots($aClean['appId'], $aClean['versionId']);
$hResult = get_screenshots($aClean['iAppId'], $aClean['iVersionId']);
apidb_header("Screenshots");
$oApp = new Application($aClean['appId']);
$oVersion = new Version($aClean['versionId']);
$oApp = new Application($aClean['iAppId']);
$oVersion = new Version($aClean['iVersionId']);
if($hResult && mysql_num_rows($hResult))
{
@@ -66,7 +66,7 @@ if($hResult && mysql_num_rows($hResult))
echo "<div align=center><table><tr>\n";
while($oRow = mysql_fetch_object($hResult))
{
if(!$aClean['versionId'] && $oRow->versionId != $currentVersionId)
if(!$aClean['iVersionId'] && $oRow->versionId != $currentVersionId)
{
if($currentVersionId)
{
@@ -86,9 +86,9 @@ if($hResult && mysql_num_rows($hResult))
//show admin delete link
if($_SESSION['current']->isLoggedIn() && ($_SESSION['current']->hasPriv("admin") ||
$_SESSION['current']->isMaintainer($aClean['versionId'])))
$_SESSION['current']->isMaintainer($aClean['iVersionId'])))
{
echo "<br />[<a href='screenshots.php?cmd=delete&imageId=$oRow->id&appId=".$aClean['appId']."&versionId=".$aClean['versionId']."'>Delete Image</a>]";
echo "<br />[<a href='screenshots.php?sCmd=delete&iImageId=$oRow->id&iAppId=".$aClean['iAppId']."&iVersionId=".$aClean['iVersionId']."'>Delete Image</a>]";
}
echo "</div></td>\n";
@@ -106,22 +106,22 @@ if($hResult && mysql_num_rows($hResult))
echo "<br />Please consider submitting a screenshot for the selected version yourself.</p>";
}
if($aClean['versionId'])
if($aClean['iVersionId'])
{
//image upload box
echo '<form enctype="multipart/form-data" action="screenshots.php" name="imageForm" method="post">',"\n";
echo '<form enctype="multipart/form-data" action="screenshots.php" name="sImageForm" method="post">',"\n";
echo html_frame_start("Upload Screenshot","400","",0);
echo '<table border=0 cellpadding=6 cellspacing=0 width="100%">',"\n";
echo '<tr><td class=color1>Image</td><td class=color0><input name="imagefile" type="file" size="24"></td></tr>',"\n";
echo '<tr><td class="color1">Description</td><td class="color0"><input type="text" name="screenshot_desc" maxlength="20" size="24"></td></tr>',"\n";
echo '<tr><td class=color1>Image</td><td class=color0><input name="sImageFile" type="file" size="24"></td></tr>',"\n";
echo '<tr><td class="color1">Description</td><td class="color0"><input type="text" name="sScreenshotDesc" maxlength="20" size="24"></td></tr>',"\n";
echo '<tr><td colspan=2 align=center class=color3><input type="submit" value="Send File"></td></tr>',"\n";
echo '</table>',"\n";
echo html_frame_end();
echo '<input type="hidden" name="MAX_FILE_SIZE" value="4000000" />',"\n";
echo '<input type="hidden" name="cmd" value="screenshot_upload" />',"\n";
echo '<input type="hidden" name="versionId" value="'.$aClean['versionId'].'"></form />',"\n";
echo '<input type="hidden" name="sCmd" value="screenshot_upload" />',"\n";
echo '<input type="hidden" name="iVersionId" value="'.$aClean['iVersionId'].'"></form />',"\n";
}
echo html_back_link(1);
apidb_footer();

View File

@@ -12,9 +12,9 @@ require(BASE."include/application.php");
$aClean = array(); //array of filtered user input
$aClean['q'] = makeSafe($_REQUEST['q']);
$aClean['sSearchQuery'] = makeSafe($_REQUEST['sSearchQuery']);
apidb_header("Search Results");
perform_search_and_output_results($aClean['q']);
perform_search_and_output_results($aClean['sSearchQuery']);
apidb_footer();
?>

View File

@@ -13,7 +13,7 @@ require_once(BASE."include/distributions.php");
$aClean = array(); //array of filtered user input
$aClean['sub'] = makeSafe($_REQUEST['sub']);
$aClean['sSub'] = makeSafe($_REQUEST['sSub']);
$aClean['iTestingId'] = makeSafe($_REQUEST['iTestingId']);
$aClean['iVersionId'] = makeSafe($_REQUEST['iVersionId']);
$aClean['iDistributionId'] = makeSafe($_REQUEST['iDistributionId']);
@@ -21,7 +21,7 @@ $aClean['sDistribution'] = makeSafe($_REQUEST['sDistribution']);
if ($aClean['sub'])
if ($aClean['sSub'])
{
$oTest = new testData($aClean['iTestingId']);
if($aClean['iVersionId'])
@@ -29,7 +29,7 @@ if ($aClean['sub'])
$errors = "";
// Submit or Resubmit the new testing results
if (($aClean['sub'] == 'Submit') || ($aClean['sub'] == 'Resubmit'))
if (($aClean['sSub'] == 'Submit') || ($aClean['sSub'] == 'Resubmit'))
{
$errors = $oTest->CheckOutputEditorInput();
$oTest->GetOutputEditorValues(); // retrieve the values from the current $_REQUEST
@@ -45,10 +45,10 @@ if ($aClean['sub'])
$oTest->iDistributionId = $oDistribution->iDistributionId;
}
}
if($aClean['sub'] == 'Submit')
if($aClean['sSub'] == 'Submit')
{
$oTest->create();
} else if($aClean['sub'] == 'Resubmit')
} else if($aClean['sSub'] == 'Resubmit')
{
$oTest->update(true);
$oTest->ReQueue();
@@ -56,12 +56,12 @@ if ($aClean['sub'])
redirect($_SERVER['PHP_SELF']);
} else
{
$aClean['sub'] = 'view';
$aClean['sSub'] = 'view';
}
}
// Delete testing results
if ($aClean['sub'] == 'Delete')
if ($aClean['sSub'] == 'Delete')
{
if(is_numeric($aClean['iTestingId']))
{
@@ -91,7 +91,7 @@ if ($aClean['sub'])
$oVersion = new version($aClean['iVersionId']);
$oTest->sQueued = "new";
}
if ($aClean['sub'] == 'view')
if ($aClean['sSub'] == 'view')
{
$oApp = new application($oVersion->iAppId);
$sVersionInfo = $oApp->sName." ".$oVersion->sName;
@@ -114,7 +114,7 @@ if ($aClean['sub'])
default:
apidb_header("Edit testing results for ");
}
echo '<form name="qform" action="'.$_SERVER['PHP_SELF'].'" method="post" enctype="multipart/form-data">',"\n";
echo '<form name="sQform" action="'.$_SERVER['PHP_SELF'].'" method="post" enctype="multipart/form-data">',"\n";
//help
@@ -135,7 +135,7 @@ if ($aClean['sub'])
// View Testing Details
$oTest->OutputEditor($aClean['sDistribution'],true);
echo '<a href="'.BASE."appview.php?versionId=".$oTest->iVersionId.'">Back to Version</a>';
echo '<a href="'.BASE."appview.php?iVersionId=".$oTest->iVersionId.'">Back to Version</a>';
echo '<tr valign=top><td class=color3 align=center colspan=2>',"\n";
@@ -144,13 +144,13 @@ if ($aClean['sub'])
switch($oTest->sQueued)
{
case "new":
echo '<input name="sub" type="submit" value="Submit" class="button" >&nbsp',"\n";
echo '<input name="sSub" type="submit" value="Submit" class="button" >&nbsp',"\n";
break;
case "true":
case "rejected":
case "False":
echo '<input name="sub" type="submit" value="Resubmit" class="button" >&nbsp',"\n";
echo '<input name="sub" type="submit" value="Delete" class="button" >',"\n";
echo '<input name="sSub" type="submit" value="Resubmit" class="button" >&nbsp',"\n";
echo '<input name="sSub" type="submit" value="Delete" class="button" >',"\n";
break;
}
echo '</td></tr>',"\n";
@@ -165,7 +165,7 @@ if ($aClean['sub'])
redirect($_SERVER['PHP_SELF']);
}
}
else // if ($aClean['sub']) is not defined, display the Testing results queue page
else // if ($aClean['sSub']) is not defined, display the Testing results queue page
{
apidb_header("Testing Results");

View File

@@ -12,12 +12,12 @@ require_once(BASE."include/application.php");
require_once(BASE."include/vendor.php");
$aClean = array(); //array of filtered user input
$aClean['vendorId'] = makeSafe($_REQUEST['vendorId']);
$aClean['sub'] = makeSafe($_REQUEST['sub']);
$aClean['iVendorId'] = makeSafe($_REQUEST['iVendorId']);
$aClean['sSub'] = makeSafe($_REQUEST['sSub']);
$oVendor = new Vendor($aClean['vendorId']);
$oVendor = new Vendor($aClean['iVendorId']);
if ($aClean['sub'])
if ($aClean['sSub'])
{
if(!$_SESSION['current']->hasPriv("admin"))
{
@@ -25,7 +25,7 @@ if ($aClean['sub'])
exit;
}
if($aClean['sub'] == 'delete')
if($aClean['sSub'] == 'delete')
{
$oVendor->delete();
redirect($_SERVER['PHP_SELF']);
@@ -57,7 +57,7 @@ if($oVendor->iVendorId)
foreach($oVendor->aApplicationsIds as $iAppId)
{
$oApp = new application($iAppId);
echo '<li> <a href="appview.php?appId='.$oApp->iAppId.'">'.$oApp->sName.'</a> </li>',"\n";
echo '<li> <a href="appview.php?iAppId='.$oApp->iAppId.'">'.$oApp->sName.'</a> </li>',"\n";
}
echo '</ol>',"\n";
}
@@ -94,7 +94,7 @@ else
if ($c % 2 == 1) { $bgcolor = 'color0'; } else { $bgcolor = 'color1'; }
$oVendor = new Vendor($oRow->vendorId);
echo '<tr class="'.$bgcolor.'">',"\n";
echo '<td><a href="'.BASE.'vendorview.php?vendorId='.$oVendor->iVendorId.'">'.$oVendor->sName.'</a></td>',"\n";
echo '<td><a href="'.BASE.'vendorview.php?iVendorId='.$oVendor->iVendorId.'">'.$oVendor->sName.'</a></td>',"\n";
echo '<td><a href="'.$oVendor->sWebpage.'">'.substr($oVendor->sWebpage,0,30).'</a></td>',"\n";
echo '<td align="right">'.sizeof($oVendor->aApplicationsIds).'</td>',"\n";
if ($_SESSION['current']->hasPriv("admin"))
@@ -102,7 +102,7 @@ else
echo '<td align="center">',"\n";
echo '[<a href="'.BASE.'admin/editVendor.php?iVendorId='.$oVendor->iVendorId.'">edit</a>]',"\n";
if(!sizeof($oVendor->aApplicationsIds))
echo '&nbsp[<a href="'.$_SERVER['PHP_SELF'].'?sub=delete&vendorId='.$oVendor->iVendorId.'">delete</a>]',"\n";
echo '&nbsp[<a href="'.$_SERVER['PHP_SELF'].'?sSub=delete&iVendorId='.$oVendor->iVendorId.'">delete</a>]',"\n";
echo '</td>',"\n";
}
echo '</tr>',"\n";

View File

@@ -12,8 +12,8 @@ require(BASE."include/mail.php");
$aClean = array(); //array of filtered user input
$aClean['ItemsPerPage'] = makeSafe($_REQUEST['ItemsPerPage']);
$aClean['page'] = makeSafe($_REQUEST['page']);
$aClean['iItemsPerPage'] = makeSafe($_REQUEST['iItemsPerPage']);
$aClean['iPage'] = makeSafe($_REQUEST['iPage']);
apidb_header("View Screenshots");
@@ -23,10 +23,10 @@ $pageRange = 10;
$ItemsPerPage = 6;
$currentPage = 1;
if($aClean['ItemsPerPage'])
$ItemsPerPage = $aClean['ItemsPerPage'];
if($aClean['page'])
$currentPage = $aClean['page'];
if($aClean['iItemsPerPage'])
$ItemsPerPage = $aClean['iItemsPerPage'];
if($aClean['iPage'])
$currentPage = $aClean['iPage'];
$ItemsPerPage = min($ItemsPerPage,100);
$totalPages = ceil(getNumberOfImages()/$ItemsPerPage);
@@ -38,14 +38,14 @@ $offset = (($currentPage-1) * $ItemsPerPage);
echo "<center>";
echo "<b>Page $currentPage of $totalPages</b><br />";
display_page_range($currentPage, $pageRange, $totalPages,
$_SERVER['PHP_SELF']."?ItemsPerPage=".$ItemsPerPage);
$_SERVER['PHP_SELF']."?iItemsPerPage=".$ItemsPerPage);
echo "<br />";
echo "<br />";
/* display the option to choose how many screenshots per-page to display */
echo '<form method="get" name="message" action="'.$_SERVER['PHP_SELF'].'">';
echo '<b>Number of Screenshots per page:</b>';
echo "&nbsp<select name='ItemsPerPage'>";
echo "&nbsp<select name='iItemsPerPage'>";
$ItemsPerPageArray = array(6, 9, 12, 15, 18, 21, 24);
foreach($ItemsPerPageArray as $i => $value)
@@ -57,7 +57,7 @@ foreach($ItemsPerPageArray as $i => $value)
}
echo "</select>";
echo "<input type=hidden name=page value=$currentPage>";
echo "<input type=hidden name=iPage value=$currentPage>";
echo "&nbsp<input type=submit value='Refresh'>";
echo "</form>";
@@ -81,11 +81,11 @@ while ($oRow = mysql_fetch_object($Ids))
echo "<div align=center>". substr($oRow->description,0,20). "\n";
echo "<br />[<a href='".apidb_fullurl("appview.php");
echo "?appId=".$oApp->iAppId."'>";
echo "?iAppId=".$oApp->iAppId."'>";
echo $oApp->sName."</a>]";
echo "<br />[<a href='".apidb_fullurl("appview.php");
echo "?versionId=".$oVersion->iVersionId."'>";
echo "?iVersionId=".$oVersion->iVersionId."'>";
echo "Version: ".$oVersion->sName."</a>]";
echo "</div></td>\n";
@@ -99,7 +99,7 @@ echo "</tr></table></div><br />\n";
/* display page selection links */
echo "<center>";
display_page_range($currentPage, $pageRange, $totalPages,
$_SERVER['PHP_SELF']."?ItemsPerPage=".$ItemsPerPage);
$_SERVER['PHP_SELF']."?iItemsPerPage=".$ItemsPerPage);
echo "</center>";
apidb_footer();

View File

@@ -8,18 +8,18 @@ require(BASE."include/incl.php");
$aClean = array(); //array of filtered user input
$aClean['bug_id'] = makeSafe($_REQUEST['bug_id']);
$aClean['iBugId'] = makeSafe($_REQUEST['iBugId']);
/* code to View versions affected by a Bug */
if( !is_numeric($aClean['bug_id']))
if( !is_numeric($aClean['iBugId']))
{
util_show_error_page("Something went wrong with the bug ID");
exit;
}
{
apidb_header("Applications affected by Bug #".$aClean['bug_id']);
echo '<form method=post action="viewbugs.php?bug_id='.$aClean['bug_id'].'">',"\n";
apidb_header("Applications affected by Bug #".$aClean['iBugId']);
echo '<form method=post action="viewbugs.php?iBugId='.$aClean['iBugId'].'">',"\n";
echo '<table width=100% border=0 cellpadding=3 cellspacing=1>',"\n";
echo '<tr class=color4>',"\n";
@@ -36,7 +36,7 @@ if( !is_numeric($aClean['bug_id']))
WHERE appFamily.appId = appVersion.appId
and buglinks.versionId = appVersion.versionId
AND buglinks.bug_id = '?'
ORDER BY versionName", $aClean['bug_id']);
ORDER BY versionName", $aClean['iBugId']);
$c = 0;
if($hResult)
@@ -47,11 +47,11 @@ if( !is_numeric($aClean['bug_id']))
$bgcolor = ($c % 2 == 0) ? "color0" : "color1";
echo '<tr class='.$bgcolor.'>',"\n";
echo ' <td>',"\n";
echo ' <a href="appview.php?appId='.$oRow->appId.'">'.$oRow->appName.'</a>',"\n";
echo ' <a href="appview.php?iAppId='.$oRow->appId.'">'.$oRow->appName.'</a>',"\n";
echo ' </td>',"\n";
echo ' <td>'.$oRow->appDescription.'</td>',"\n";
echo ' <td>',"\n";
echo ' <a href="appview.php?versionId='.$oRow->versionId.'">'.$oRow->versionName.'</a>',"\n";
echo ' <a href="appview.php?iVersionId='.$oRow->versionId.'">'.$oRow->versionName.'</a>',"\n";
echo ' </td>',"\n";
echo '</tr>',"\n";
}
@@ -69,8 +69,8 @@ if( !is_numeric($aClean['bug_id']))
echo '<tr class=color3>',"\n";
echo ' <td align=center>',"\n";
echo ' <input type="text" name="bug_id" value="'.$aClean['bug_id'].'" size="8"></td>',"\n";
echo ' <td colspan=2><input type="submit" name="sub" value="Search"></td>',"\n";
echo ' <input type="text" name="iBugId" value="'.$aClean['iBugId'].'" size="8"></td>',"\n";
echo ' <td colspan=2><input type="submit" name="sSub" value="Search"></td>',"\n";
echo '</tr>',"\n";
echo '</table>',"\n";

View File

@@ -12,8 +12,8 @@ require(BASE."include/category.php");
$aClean = array(); //array of filtered user input
$aClean['topNumber'] = makeSafe($_REQUEST['topNumber']);
$aClean['categoryId'] = makeSafe($_REQUEST['categoryId']);
$aClean['iTopNumber'] = makeSafe($_REQUEST['iTopNumber']);
$aClean['iCategoryId'] = makeSafe($_REQUEST['iCategoryId']);
/* default to 25 apps, main categories */
@@ -21,10 +21,10 @@ $topNumber = 25;
$categoryId = "any"; /* default to all categories */
/* process the post variables to override the default settings */
if( !empty($aClean['topNumber']) AND is_numeric($aClean['topNumber']))
$topNumber = $aClean['topNumber'];
if( !empty($aClean['categoryId']) AND is_numeric($aClean['categoryId']))
$categoryId = $aClean['categoryId'];
if( !empty($aClean['iTopNumber']) AND is_numeric($aClean['iTopNumber']))
$topNumber = $aClean['iTopNumber'];
if( !empty($aClean['iCategoryId']) AND is_numeric($aClean['iCategoryId']))
$categoryId = $aClean['iCategoryId'];
/* Check if the value makes sense */
if($topNumber > 200 || $topNumber < 1)
@@ -33,9 +33,9 @@ if($topNumber > 200 || $topNumber < 1)
apidb_header("Vote Stats - Top $topNumber Applications");
/* display the selection for the top number of apps to view */
echo "<form method=\"post\" name=\"message\" action=\"".$_SERVER['PHP_SELF']."\">";
echo "<form method=\"post\" name=\"sMessage\" action=\"".$_SERVER['PHP_SELF']."\">";
echo "<b>Number of top apps to display:</b>";
echo "<select name='topNumber'>";
echo "<select name='iTopNumber'>";
$topNumberArray = array(25, 50, 100, 200);
foreach ($topNumberArray as $i => $value)
@@ -85,7 +85,7 @@ if($catId != 0)
/*******************************************************************/
/* add options for all of the categories that we are recursed into */
echo "<b>Section:</b>";
echo '<select name="categoryId">';
echo '<select name="iCategoryId">';
if($catId == 0)
echo '<option value="any" SELECTED>Any</option>';
@@ -179,7 +179,7 @@ if($hResult)
while($row = mysql_fetch_object($hResult))
{
$bgcolor = ($c % 2) ? "color0" : "color1";
$link = "<a href='appview.php?appId=$row->appId'>$row->appName</a>";
$link = "<a href='appview.php?iAppId=$row->appId'>$row->appName</a>";
echo "<tr class=$bgcolor><td width='90%'>$c. $link </td> <td> $row->count </td></tr>\n";
$c++;
}
@@ -194,7 +194,7 @@ if($hResult)
echo '<h2 align="center">No apps found in this category, please vote for your favorite apps!</h2>';
}
echo '<p align="center"><a href="help/?topic=voting">What does this screen mean?</a></p>';
echo '<p align="center"><a href="help/?sTopic=voting">What does this screen mean?</a></p>';
}
apidb_footer();