diff --git a/account.php b/account.php index ff8ebc6..f9f25f7 100644 --- a/account.php +++ b/account.php @@ -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")); } /** diff --git a/addcomment.php b/addcomment.php index e037a0c..4e91235 100644 --- a/addcomment.php +++ b/addcomment.php @@ -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 login now or create a new account.","\n"; + echo "To submit a comment for an application you must be logged in. Please login now or create a new account.","\n"; exit; } -if( !is_numeric($aClean['versionId']) ) +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 = "Post New Comment"; - 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 "From: \n"; echo "  ".$_SESSION['current']->sRealname."\n"; echo "Subject: \n"; - echo "   \n"; - echo "\n"; + echo "   \n"; + echo "\n"; echo "\n"; echo " \n"; echo " \n"; @@ -89,12 +89,12 @@ else echo html_frame_end(); - echo "\n"; - echo "\n"; - echo "\n"; - if (!empty($aClean['thread'])) + echo "\n"; + echo "\n"; + echo "\n"; + if (!empty($aClean['iThread'])) { - echo "\n"; + echo "\n"; } echo ""; } diff --git a/admin/addAppNote.php b/admin/addAppNote.php index 88cb03f..7e540ba 100644 --- a/admin/addAppNote.php +++ b/admin/addAppNote.php @@ -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; diff --git a/admin/addCategory.php b/admin/addCategory.php index 77f4eb0..3193c5e 100644 --- a/admin/addCategory.php +++ b/admin/addCategory.php @@ -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 "
- iCatId."\" /> + iCatId."\" /> @@ -55,7 +55,7 @@ else
Category name - sName."\" /> + sName."\" />
Description - sDescription."\" /> + sDescription."\" />
- +
diff --git a/admin/adminAppDataQueue.php b/admin/adminAppDataQueue.php index 37570ce..af187dc 100644 --- a/admin/adminAppDataQueue.php +++ b/admin/adminAppDataQueue.php @@ -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 "".Application::lookup_name($oRow->appId)."\n"; echo "".Version::lookup_name($oRow->versionId)."\n"; echo "".$oRow->type."\n"; - echo "[process]\n"; + echo "[process]\n"; echo "\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 '',"\n"; + echo '',"\n"; // help echo "
',"\n"; - echo '',"\n"; + echo '',"\n"; //data if($obj_row->type == "image") @@ -121,16 +121,16 @@ if (!$aClean['id']) $oScreenshot = new Screenshot($obj_row->id); echo '',"\n"; echo '',"\n"; - echo '',"\n"; + echo '',"\n"; } //email response echo '',"\n"; - echo "\n"; + echo "\n"; /* Add button */ echo '',"\n"; + echo '',"\n"; /* Reject button */ echo '',"\n"; + echo '',"\n"; echo '
\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 '
Description
Submited image'; - $imgSRC = ''; + $imgSRC = ''; // generate random tag for popup window $randName = User::generate_passwd(5); // set image link based on user pref - $img = ''.$imgSRC.''; + $img = ''.$imgSRC.''; if ($_SESSION['current']->isLoggedIn()) { if ($_SESSION['current']->getpref("window:screenshot") == "no") { - $img = ''.$imgSRC.''; + $img = ''.$imgSRC.''; } } echo $img; @@ -138,26 +138,26 @@ if (!$aClean['id']) } elseif($obj_row->type == "url") { echo '
Submitted link
Email reply
' ,"\n"; - echo '
' ,"\n"; - echo '
',"\n"; - echo '',"\n"; - echo '',"\n"; + echo '',"\n"; + echo '',"\n"; echo ''; - } 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 = "

The application data was successfully added into the database

\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); } diff --git a/admin/adminAppQueue.php b/admin/adminAppQueue.php index 53c40be..3641a0e 100644 --- a/admin/adminAppQueue.php +++ b/admin/adminAppQueue.php @@ -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 "\n"; /* map the merging of the current app to the app we are displaying in the table */ - echo " ".html_ahref($oRow->appName,"adminAppQueue.php?sub=duplicate&apptype=application&appId=".$currentAppId."&appIdMergeTo=".$oRow->appId)."\n"; + echo " ".html_ahref($oRow->appName,"adminAppQueue.php?sSub=duplicate&sAppType=application&iAppId=".$currentAppId."&appIdMergeTo=".$oRow->appId)."\n"; echo " $oVersionCount->versions versions  \n"; echo "\n\n"; @@ -113,7 +113,7 @@ function display_move_test_to_versions_table($aVersionsIds,$icurrentVersionId) //display row echo "\n"; - echo " ".html_ahref($oVersion->sName,"adminAppQueue.php?sub=movetest&apptype=version&versionId=".$icurrentVersionId."&versionIdMergeTo=".$oVersion->iVersionId)."\n"; + echo " ".html_ahref($oVersion->sName,"adminAppQueue.php?sSub=movetest&sAppType=version&iVersionId=".$icurrentVersionId."&iVersionIdMergeTo=".$oVersion->iVersionId)."\n"; echo " ".util_trim_description($oVersion->sDescription)."\n"; echo " ".$oVersion->sTestedRating."\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 '
',"\n"; - echo '',"\n"; + echo '',"\n"; + echo '',"\n"; echo html_back_link(1,'adminAppQueue.php'); @@ -404,21 +404,21 @@ if ($aClean['sub']) echo html_frame_start("Reply text", "90%", "", 0); echo "\n"; echo '',"\n"; - echo '',"\n"; + echo '',"\n"; echo '',"\n"; echo '
email Text
' ,"\n"; if ($oApp) //application { - echo ''; + echo ''; echo ' ',"\n"; } else // app version { - echo ''; + echo ''; echo ' ',"\n"; } - echo '',"\n"; - echo '',"\n"; + echo '',"\n"; + echo '',"\n"; echo '
',"\n"; echo '
',"\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"); diff --git a/admin/adminBugs.php b/admin/adminBugs.php index c1abc34..78855a4 100644 --- a/admin/adminBugs.php +++ b/admin/adminBugs.php @@ -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 '
',"\n"; + echo '',"\n"; echo '
',"\n"; echo 'Page '.$currentPage.' of '.$totalPages.'
',"\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 '
',"\n"; echo '
',"\n"; /* display the option to choose how many comments per-page to display */ - echo ''; + echo ''; echo 'Number of Bug Links per page: '; - echo ''; $ItemsPerPageArray = array(2 ,10, 20, 50, 100); foreach($ItemsPerPageArray as $i => $value) @@ -87,7 +87,7 @@ if ($aClean['sub']) echo '',"\n"; echo '
',"\n"; - echo 'View queued links only: ',"\n"; + echo 'View queued links only: ',"\n"; echo '
',"\n"; echo '',"\n"; @@ -144,26 +144,26 @@ if ($aClean['sub']) echo ' '.$oRow->bug_status.'',"\n"; echo ' '.$oRow->short_desc.'',"\n"; echo ' ',"\n"; - echo ' '.$oRow->appName.'',"\n"; + echo ' '.$oRow->appName.'',"\n"; echo ' ',"\n"; echo ' '.$oRow->appDescription.'',"\n"; echo ' ',"\n"; - echo ' '.$oRow->versionName.'',"\n"; + echo ' '.$oRow->versionName.'',"\n"; echo ' ',"\n"; - echo ' [[delete]',"\n"; $bQueued = ($oRow->queued=="true")?true:false; if ($bQueued) { - echo '[[OK]',"\n"; } else { @@ -176,7 +176,7 @@ if ($aClean['sub']) echo "","\n"; echo "
","\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 "
","\n"; apidb_footer(); diff --git a/admin/adminCommentView.php b/admin/adminCommentView.php index 32b077e..88dfb16 100644 --- a/admin/adminCommentView.php +++ b/admin/adminCommentView.php @@ -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 "
"; echo "Page $currentPage of $totalPages
"; -display_page_range($currentPage, $pageRange, $totalPages, $_SERVER['PHP_SELF']."?ItemsPerPage=".$ItemsPerPage); +display_page_range($currentPage, $pageRange, $totalPages, $_SERVER['PHP_SELF']."?iItemsPerPage=".$ItemsPerPage); echo "
"; echo "
"; /* display the option to choose how many comments per-page to display */ -echo ""; +echo ""; echo "Number of comments per page:"; -echo " "; $ItemsPerPageArray = array(10, 20, 50, 100, 500); foreach($ItemsPerPageArray as $i => $value) @@ -52,7 +52,7 @@ foreach($ItemsPerPageArray as $i => $value) } echo ""; -echo ""; +echo ""; echo " "; echo ""; @@ -76,7 +76,7 @@ while ($oRow = mysql_fetch_object($commentIds)) /* display page selection links */ echo "
"; -display_page_range($currentPage, $pageRange, $totalPages, $_SERVER['PHP_SELF']."?ItemsPerPage=".$ItemsPerPage); +display_page_range($currentPage, $pageRange, $totalPages, $_SERVER['PHP_SELF']."?iItemsPerPage=".$ItemsPerPage); echo "
"; apidb_footer(); diff --git a/admin/adminMaintainerQueue.php b/admin/adminMaintainerQueue.php index bc59a1c..ca2088c 100644 --- a/admin/adminMaintainerQueue.php +++ b/admin/adminMaintainerQueue.php @@ -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 '
',"\n"; + echo '',"\n"; $x = new TableVE("view"); @@ -155,23 +155,23 @@ if ($aClean['sub']) //maintainReason echo 'Maintainer request reason',"\n"; - echo '',"\n"; + echo '',"\n"; //email response echo 'Email reply',"\n"; - echo "\n"; + echo "\n"; /* Add button */ echo '' ,"\n"; - echo ' ',"\n"; + echo ' ',"\n"; /* Reject button */ echo '' ,"\n"; - echo '',"\n"; + echo '',"\n"; echo '',"\n"; - echo '',"\n"; - echo '',"\n"; + echo '',"\n"; + echo '',"\n"; echo html_frame_end(" "); 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("

$statusMessage

", '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 '',"\n"; + echo '',"\n"; //get available maintainers $sQuery = "SELECT queueId, appId, versionId,". @@ -291,7 +291,7 @@ if ($aClean['sub']) } echo " sEmail."\">".$oUser->sRealname."\n"; - echo " [queueId\">answer]\n"; + echo " [queueId\">answer]\n"; echo "\n\n"; $c++; } diff --git a/admin/adminMaintainers.php b/admin/adminMaintainers.php index b58737b..309946a 100644 --- a/admin/adminMaintainers.php +++ b/admin/adminMaintainers.php @@ -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 '',"\n"; +echo '',"\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 " sEmail."\">".$oUser->sRealname."\n"; if($oRow->superMaintainer) { - echo " ".Application::lookup_name($oRow->appId)."\n"; + echo " ".Application::lookup_name($oRow->appId)."\n"; echo " *\n"; } else { - echo " ".Application::lookup_name($oRow->appId)."\n"; - echo " ".Version::lookup_name($oRow->versionId)." \n"; + echo " ".Application::lookup_name($oRow->appId)."\n"; + echo " ".Version::lookup_name($oRow->versionId)." \n"; } - echo " [delete]\n"; + echo " [delete]\n"; echo "\n\n"; $c++; } diff --git a/admin/adminScreenshots.php b/admin/adminScreenshots.php index a784b2e..b4e19ad 100644 --- a/admin/adminScreenshots.php +++ b/admin/adminScreenshots.php @@ -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 "
"; echo "Regenerate all screenshots ! ". + "?bRegenerate=true\">Regenerate all screenshots ! ". "(use only if you know what you are doing)
"; echo "
"; @@ -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 "
"; echo "Page $currentPage of $totalPages
"; display_page_range($currentPage, $pageRange, $totalPages, - $_SERVER['PHP_SELF']."?ItemsPerPage=".$ItemsPerPage); + $_SERVER['PHP_SELF']."?iItemsPerPage=".$ItemsPerPage); echo "
"; echo "
"; /* display the option to choose how many screenshots per-page to display */ echo ''; echo 'Number of Screenshots per page:'; -echo " "; $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 "
". substr($oRow->description,0,20). "\n"; echo "
["; + echo "?iAppId=".$oApp->iAppId."'>"; echo $oApp->sName."]"; echo "
["; + echo "?iVersionId=".$oVersion->iVersionId."'>"; echo "Version: ".$oVersion->sName."]"; //show admin delete link if($_SESSION['current']->isLoggedIn() && ($_SESSION['current']->hasPriv("admin") || - $_SESSION['current']->isMaintainer($aClean['versionId']))) + $_SESSION['current']->isMaintainer($aClean['iVersionId']))) { echo "
[id"; - echo "&page=".$currentPage."&ItemsPerPage=".$ItemsPerPage."'>"; + echo "?sCmd=delete&iImageId=$oRow->id"; + echo "&iPage=".$currentPage."&iItemsPerPage=".$ItemsPerPage."'>"; echo "Delete Image]"; } echo "
\n"; @@ -157,7 +157,7 @@ echo "

\n"; /* display page selection links */ echo "
"; display_page_range($currentPage, $pageRange, $totalPages, - $_SERVER['PHP_SELF']."?ItemsPerPage=".$ItemsPerPage); + $_SERVER['PHP_SELF']."?iItemsPerPage=".$ItemsPerPage); echo "
"; apidb_footer(); diff --git a/admin/adminTestResults.php b/admin/adminTestResults.php index b89de3a..1c627e2 100644 --- a/admin/adminTestResults.php +++ b/admin/adminTestResults.php @@ -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 '',"\n"; + echo '',"\n"; // View Testing Details echo "\n"; @@ -107,7 +107,7 @@ if ($aClean['sub']) echo html_frame_start("Reply text", "90%", "", 0); echo "
\n"; echo '',"\n"; - echo '',"\n"; + echo '',"\n"; echo '',"\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"); diff --git a/admin/adminUsers.php b/admin/adminUsers.php index 5ffe40b..6db3d0c 100644 --- a/admin/adminUsers.php +++ b/admin/adminUsers.php @@ -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 " \n"; - echo " \n"; + echo " \n"; echo "\n\n"; } } diff --git a/admin/deleteAny.php b/admin/deleteAny.php index 49bf029..fb38a67 100644 --- a/admin/deleteAny.php +++ b/admin/deleteAny.php @@ -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; } } diff --git a/admin/editAppFamily.php b/admin/editAppFamily.php index 02cd7b6..e7e75a5 100644 --- a/admin/editAppFamily.php +++ b/admin/editAppFamily.php @@ -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 '
email Text
' ,"\n"; @@ -115,18 +115,18 @@ if ($aClean['sub']) switch($oTest->sQueued) { case "false": - echo ' ',"\n"; - echo '',"\n"; + echo ' ',"\n"; + echo '',"\n"; break; case "true": - echo ' ',"\n"; - echo ' ',"\n"; - echo '',"\n"; + echo ' ',"\n"; + echo ' ',"\n"; + echo '',"\n"; break; case "rejected": - echo ' ',"\n"; - echo ' ',"\n"; - echo '',"\n"; + echo ' ',"\n"; + echo ' ',"\n"; + echo '',"\n"; break; } echo '
[userid."&sSearch=".$sSearch."&iLimit=".$aClean['iLimit']."&sOrderBy=".$aClean['sOrderBy']."\">edit] [userid."&sSearch=".$sSearch."&iLimit=".$aClean['iLimit']."&sOrderBy=".$aClean['sOrderBy']."&sSubmit=true\">delete][userid."&sSearch=".$sSearch."&iLimit=".$aClean['iLimit']."&sOrderBy=".$aClean['sOrderBy']."\">edit] [userid."&sSearch=".$sSearch."&iLimit=".$aClean['iLimit']."&sOrderBy=".$aClean['sOrderBy']."&sSubmit=true\">delete]
', "\n"; - echo '',"\n"; + echo '',"\n"; echo '
', "\n"; echo ""; @@ -62,7 +62,7 @@ else // url edit form echo '
',"\n"; - echo ''; + echo ''; echo html_frame_start("Edit URL","90%","",0); echo '',"\n"; @@ -95,18 +95,18 @@ else echo '',"\n"; } echo "\n"; - echo ""; + echo ""; - echo '',"\n"; - echo '',"\n"; + echo '',"\n"; + echo '',"\n"; - echo '',"\n"; + echo '',"\n"; echo '
URL
New
New
',"\n"; echo html_frame_end(); echo "
"; - echo html_back_link(1,BASE."appview.php?appId=$oApp->iAppId"); + echo html_back_link(1,BASE."appview.php?iAppId=$oApp->iAppId"); } apidb_footer(); diff --git a/admin/editAppNote.php b/admin/editAppNote.php index 13ab4e6..711038c 100644 --- a/admin/editAppNote.php +++ b/admin/editAppNote.php @@ -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 '',"\n"; echo ''; - echo html_back_link(1,BASE."appview.php?versionId=".$oNote->iVersionId); + echo html_back_link(1,BASE."appview.php?iVersionId=".$oNote->iVersionId); } apidb_footer(); diff --git a/admin/editAppVersion.php b/admin/editAppVersion.php index b2e54a8..7417d3f 100644 --- a/admin/editAppVersion.php +++ b/admin/editAppVersion.php @@ -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 '',"\n"; - echo '',"\n"; + echo '',"\n"; echo html_table_end(); echo ""; @@ -53,8 +53,8 @@ if(!empty($aClean['submit'])) // url edit form echo '',"\n"; - echo ''; - echo ''; + echo ''; + echo ''; echo html_frame_start("Edit URL","90%","",0); echo '
',"\n"; @@ -87,11 +87,11 @@ if(!empty($aClean['submit'])) echo '',"\n"; } echo "\n"; - echo ""; - echo '',"\n"; - echo '',"\n"; + echo ""; + echo '',"\n"; + echo '',"\n"; - echo '',"\n"; + echo '',"\n"; echo '
URL
New
New
',"\n"; echo html_frame_end(); @@ -102,14 +102,14 @@ if(!empty($aClean['submit'])) { // move version form echo '',"\n"; - echo ''; - echo ''; + echo ''; + echo ''; echo html_frame_start("Move version to another application","90%","",0); - echo '
',"\n"; + echo '
',"\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(); } ?> diff --git a/admin/editBundle.php b/admin/editBundle.php index 0e9db7f..00ca9de 100644 --- a/admin/editBundle.php +++ b/admin/editBundle.php @@ -13,7 +13,7 @@ function build_app_list() { $hResult = query_parameters("SELECT appId, appName FROM appFamily ORDER BY appName"); - echo "\n"; while($oRow = mysql_fetch_object($hResult)) { echo "\n"; @@ -21,25 +21,25 @@ function build_app_list() echo "\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 "\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 = "[appId'>delete]"; + $delete_link = "[appId'>delete]"; echo "\n"; echo " \n"; @@ -92,8 +92,8 @@ echo html_frame_start("Application List (double click to add)","",'',2); build_app_list(); echo html_frame_end(); -echo "\n"; -echo "\n"; +echo "\n"; +echo "\n"; echo "\n"; apidb_footer(); diff --git a/admin/editDistribution.php b/admin/editDistribution.php index 0b5308c..c433639 100644 --- a/admin/editDistribution.php +++ b/admin/editDistribution.php @@ -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 '',"\n"; + echo '',"\n"; $oDistribution->OutputEditor(); echo '',"\n"; echo ""; diff --git a/admin/editVendor.php b/admin/editVendor.php index c251fff..ef377ff 100644 --- a/admin/editVendor.php +++ b/admin/editVendor.php @@ -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 '',"\n"; + echo '',"\n"; $oVendor->OutputEditor(); echo '',"\n"; echo ""; diff --git a/admin/moveAppVersion.php b/admin/moveAppVersion.php index 976b9f3..e1b0f4f 100644 --- a/admin/moveAppVersion.php +++ b/admin/moveAppVersion.php @@ -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 */ { ?> iAppId); apidb_header("Choose application to move this version under"); echo "\n"; echo html_frame_start("Move ".$oApp->sName." ".$oVersion->sName, "90%","",0); - echo ''; - echo ''; + echo ''; + echo ''; /* build a table of applications and their versions */ @@ -65,9 +65,9 @@ if(!empty($aClean['action'])) { $currentAppId = $oRow->appId; echo ''; - echo ""; + echo ""; echo ''; } else /* just add another version */ { @@ -79,7 +79,7 @@ if(!empty($aClean['action'])) echo html_table_end(); echo html_frame_end(); echo ""; - echo html_back_link(1, BASE."appview.php?versionId=".$oVersion->iVersionId); + echo html_back_link(1, BASE."appview.php?iVersionId=".$oVersion->iVersionId); apidb_footer(); } ?> diff --git a/appbrowse.php b/appbrowse.php index 7734987..05e11e6 100644 --- a/appbrowse.php +++ b/appbrowse.php @@ -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 "\n"; - echo " \n"; + echo " \n"; echo " \n"; echo " \n"; echo "\n\n"; @@ -119,7 +119,7 @@ if($apps) //display row echo "\n"; - echo " \n"; + echo " \n"; echo " \n"; echo " \n"; echo "\n\n"; @@ -130,7 +130,7 @@ if($apps) } // Disabled for now -//if ($aClean['catId'] != 0) +//if ($aClean['iCatId'] != 0) //{ // log_category_visit($cat->id); //} diff --git a/appimage.php b/appimage.php index 285b572..e8eaada 100644 --- a/appimage.php +++ b/appimage.php @@ -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); diff --git a/appsubmit.php b/appsubmit.php index 4c9f424..be2daf3 100644 --- a/appsubmit.php +++ b/appsubmit.php @@ -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 ''."\n"; echo "

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.

\n"; echo "

Before continuing, please ensure that you have

\n"; echo "
$oRow->appName  
',"\n"; - echo ' ',"\n"; + echo ' ',"\n"; echo '
',"\n"; - echo ' ',"\n"; + echo ' ',"\n"; echo '
'; - $url = BASE."appview.php?appId=".$oRow->appId; + $url = BASE."appview.php?iAppId=".$oRow->appId; echo ''.substr($oRow->appName, 0, 30).' - '.$oRow->appId.'Move here
Move here
'.$oRow->versionName.'
".$oSubCat->sName."".$oSubCat->sName."$desc  $appcount  
".$oApp->sName."".$oApp->sName."$desc  ".sizeof($oApp->aVersionsIds)."
\n"; - if($aClean['apptype'] == 'application') // application + if($aClean['sAppType'] == 'application') // application { - echo ''; + echo ''; if(is_numeric($oApp->iAppId)) { echo '',"\n"; + echo '',"\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"); diff --git a/appview.php b/appview.php index 9767217..36ec57e 100644 --- a/appview.php +++ b/appview.php @@ -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 "\n"; - echo " \n"; + echo " \n"; echo " \n"; echo "\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 { diff --git a/commentview.php b/commentview.php index 37e426f..37f0ed8 100644 --- a/commentview.php +++ b/commentview.php @@ -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(); ?> diff --git a/deletecomment.php b/deletecomment.php index 24246eb..12b6398 100644 --- a/deletecomment.php +++ b/deletecomment.php @@ -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 = "Please state why you are deleting the following comment"; @@ -40,20 +40,20 @@ if($_SESSION['current']->getPref("confirm_comment_deletion") != "no" && !isset($ echo htmlify_urls($oComment->sBody), "

\n"; echo html_frame_end(); echo '
' ,"\n"; echo ' ',"\n"; - echo '',"\n"; + echo '',"\n"; } else { echo '
',"\n"; @@ -371,13 +372,13 @@ if ($aClean['sub']) } } else // version { - echo ''; - echo ''; + echo ''; + echo ''; if(is_numeric($oVersion->iVersionId)) { echo '
' ,"\n"; echo ' ',"\n"; - echo '
appId\">".stripslashes($ob->appName)."appId\">".stripslashes($ob->appName)."".util_trim_description($oApp->sDescription)."
',"\n"; - echo "\n"; + echo "\n"; echo "\n"; echo "
\n"; echo " \n"; echo "
\n"; echo html_frame_end(); - echo "\n"; - echo "iCommentId."\" />"; + echo "\n"; + echo "iCommentId."\" />"; echo ""; 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)); } ?> diff --git a/distributionView.php b/distributionView.php index 963a896..47908b0 100644 --- a/distributionView.php +++ b/distributionView.php @@ -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 " "; echo "[edit]"; if(!sizeof($oDistribution->aTestingIds)) - echo "   [iDistributionId."'>delete]"; + echo "   [iDistributionId."'>delete]"; echo " \n"; } echo "\n"; @@ -133,7 +133,7 @@ else continue; echo '',"\n"; - echo '',"\n"; + echo '',"\n"; echo $oApp->sName.' '.$oVersion->sName.'',"\n"; echo '',"\n"; if($_SESSION['current']->isLoggedIn()) @@ -152,7 +152,7 @@ else echo ''.$oTest->sTestedRating.' ',"\n"; if ($_SESSION['current']->hasAppVersionModifyPermission($oVersion)) { - echo '',"\n"; + echo '',"\n"; echo 'Edit',"\n"; } echo '',"\n"; diff --git a/help/appdb_faq.help b/help/appdb_faq.help index c1e72e0..f9974e9 100644 --- a/help/appdb_faq.help +++ b/help/appdb_faq.help @@ -12,7 +12,7 @@ Application Database.

A: The Application Database is a repository for Windows application compatibility information with Wine. In particular it provides the following information:
-(see the Visual FoxPro entry for an +(see the Visual FoxPro entry for an example)


\n"; diff --git a/help/maintainer_guidelines.help b/help/maintainer_guidelines.help index e8c2117..797733d 100644 --- a/help/maintainer_guidelines.help +++ b/help/maintainer_guidelines.help @@ -3,7 +3,7 @@

Maintainers Guidelines

-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 FAQ. +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 FAQ.

@@ -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.

  • -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.
    You are encouraged to make use of the template provided for application description; you can copy/paste this template from the "Submit application page". +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.
    You are encouraged to make use of the template provided for application description; you can copy/paste this template from the "Submit application page".
  • 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).
  • -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.
    You are encouraged to make use of the template provided for version description; you can copy/paste this template from the "Submit version page".
    -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 here. +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.
    You are encouraged to make use of the template provided for version description; you can copy/paste this template from the "Submit version page".
    +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 here.
  • -Rating let's you rate how this version ran with the latest Wine version you tested it with. For rating definitions, please see this page. +Rating let's you rate how this version ran with the latest Wine version you tested it with. For rating definitions, please see this page.
  • Release is the latest release of Wine you tested this version with. diff --git a/include/application.php b/include/application.php index e032084..52d5cab 100644 --- a/include/application.php +++ b/include/application.php @@ -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 ''; + echo ''; echo html_frame_start("Application Form", "90%", "", 0); echo "\n"; echo '',"\n"; - echo '',"\n"; + echo '',"\n"; // app Category $w = new TableVE("view"); echo '',"\n"; // vendor name echo '',"\n"; - echo '',"\n"; + echo '',"\n"; // alt vendor $x = new TableVE("view"); echo '',"\n"; // url echo '',"\n"; - echo '',"\n"; + echo '',"\n"; echo '',"\n"; - echo '',"\n"; + echo '',"\n"; echo '',"\n"; - echo '',"\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 .= "
  • Please enter a category for your application.
  • \n"; - if (strlen($aClean['appName']) > 200 ) + if (strlen($aClean['sAppName']) > 200 ) $errors .= "
  • Your application name is too long.
  • \n"; - if (empty($aClean['appName'])) + if (empty($aClean['sAppName'])) $errors .= "
  • Please enter an application name.
  • \n"; // No vendor entered, and nothing in the list is selected - if (empty($aClean['appVendorName']) && !$aClean['appVendorId']) + if (empty($aClean['sAppVendorName']) && !$aClean['iAppVendorId']) $errors .= "
  • Please enter a vendor.
  • \n"; - if (empty($aClean['appDescription'])) + if (empty($aClean['shAppDescription'])) $errors .= "
  • Please enter a description of your application.
  • \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 '
    Application name
    Category',"\n"; - $w->make_option_list("appCatId", $this->iCatId,"appCategory","catId","catName"); + $w->make_option_list("iAppCatId", $this->iCatId,"appCategory","catId","catName"); echo '
    Vendor
     ',"\n"; - $x->make_option_list("appVendorId", $this->iVendorId,"vendor","vendorId","vendorName"); + $x->make_option_list("iAppVendorId", $this->iVendorId,"vendor","vendorId","vendorName"); echo '
    URL
    Keywords
    Application description

    ',"\n"; echo " \n"; echo " \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 " \n"; echo "
    Name ".$this->sName."
    Vendor ". - " ".$oVendor->sName."  \n"; + " ".$oVendor->sName."  \n"; echo "
    Votes "; echo vote_count_app_total($this->iAppId); echo "
    Links\n"; @@ -604,35 +604,35 @@ class Application { /* are we already a maintainer? */ if($_SESSION['current']->isSuperMaintainer($this->iAppId)) /* yep */ { - echo '
    '; + echo ' '; } else /* nope */ { - echo ' '; + echo ' '; } - echo " iAppId."\">"; - echo " "; /* set superMaintainer to 1 because we are at the appFamily level */ + echo " iAppId."\">"; + echo " "; /* set superMaintainer to 1 because we are at the appFamily level */ echo "
    "; if($_SESSION['current']->isSuperMaintainer($this->iAppId) || $_SESSION['current']->hasPriv("admin")) { - echo '
    '; + echo '
    '; } if($_SESSION['current']->isLoggedIn()) { - echo '
    '; + echo ''; echo ''; echo '
    '; } if($_SESSION['current']->hasPriv("admin")) { - $url = BASE."admin/deleteAny.php?what=appFamily&appId=".$this->iAppId."&confirmed=yes"; - echo "
    "; - echo '
    '; + $url = BASE."admin/deleteAny.php?sWhat=appFamily&iAppId=".$this->iAppId."&sConfirmed=yes"; + echo "
    "; + echo '
    '; } } else { - echo '
    '; + echo '
    '; } echo "
    \n"; /* close of super maintainers table */ @@ -700,7 +700,7 @@ class Application { echo " \n"; echo " ".$sVendor."\n"; echo " ".$oApp->sName."\n"; - echo " [iAppId.">process]\n"; + echo " [iAppId.">process]\n"; echo "\n\n"; $c++; } diff --git a/include/bugs.php b/include/bugs.php index 120464a..731ee65 100644 --- a/include/bugs.php +++ b/include/bugs.php @@ -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 "
    \n"; + echo "\n"; } echo html_frame_start("Known bugs","98%",'',0); echo "\n\n"; @@ -316,10 +316,10 @@ function view_version_bugs($iVersionId = null, $aBuglinkIds) if($bCanEdit == true) { - echo "\n"; + echo "\n"; if ($oBuglink->bQueued) { - echo "\n"; + echo "\n"; } else { echo "\n"; @@ -333,10 +333,10 @@ function view_version_bugs($iVersionId = null, $aBuglinkIds) } if($_SESSION['current']->isLoggedIn()) { - echo '',"\n"; + echo '',"\n"; echo '',"\n"; - echo '',"\n"; + echo '',"\n"; + echo '',"\n"; echo '',"\n"; } echo '
    [delete][delete][OK][OK]Yes
    ',"\n"; - echo '
    ',"\n"; diff --git a/include/category.php b/include/category.php index dd04515..e53625f 100644 --- a/include/category.php +++ b/include/category.php @@ -239,7 +239,7 @@ function make_cat_path($path, $appId = '', $versionId = '') if(!empty($versionId)) { $oVersion = new Version($versionId); - $str .= " > ".html_ahref($oApp->sName,"appview.php?appId=$appId"); + $str .= " > ".html_ahref($oApp->sName,"appview.php?iAppId=$appId"); $str .= " > ".$oVersion->sName; } else { diff --git a/include/comment.php b/include/comment.php index 3c8b30a..ef2655f 100644 --- a/include/comment.php +++ b/include/comment.php @@ -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 " [appId&versionId=$oRow->versionId\">post new] \n"; - echo " [appId&versionId=$oRow->versionId&subject=". + echo " [appId&iVersionId=$oRow->versionId\">post new] \n"; + echo " [appId&iVersionId=$oRow->versionId&sSubject=". urlencode("$subject")."&thread=$oRow->commentId\">reply to this] \n"; echo "\n"; @@ -329,7 +329,7 @@ function do_display_comments_threaded($hResult, $is_main) view_app_comment($oRow); } else { - echo '
  • '. + echo '
  • '. $oRow->subject.' by '.forum_lookup_user($oRow->userId).' on '.$oRow->time.'
  • '."\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 '
    ',"\n"; + echo '',"\n"; echo "Application Comments $messageCount total comments "; - echo 'Mode ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo '',"\n"; - echo '
    ',"\n"; + echo '',"\n"; } // blank space echo '   ',"\n"; // post new message button - echo '
    ',"\n"; - echo '
    ',"\n"; + echo '
    ',"\n"; + echo '
    ',"\n"; //end comment format table echo '',"\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) diff --git a/include/distributions.php b/include/distributions.php index 159f9bf..d65e200 100644 --- a/include/distributions.php +++ b/include/distributions.php @@ -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 } diff --git a/include/form_login.php b/include/form_login.php index 50f031b..a63c7d1 100644 --- a/include/form_login.php +++ b/include/form_login.php @@ -8,7 +8,7 @@ $aClean['sUserEmail'] = makeSafe($_POST['sUserEmail']); /**************/ /* Login Form */ /**************/ -echo '
    ',"\n"; +echo '',"\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) @@ -43,14 +43,14 @@ function cmd_send_passwd() { ',"\n"; -echo '',"\n"; +echo '',"\n"; +echo '',"\n"; echo '
    ',"\n"; ?>

    Don't have an account yet?
    - [Create a New Account]

    + [Create a New Account]

    Lost your password?
    [Email a New Password]

    diff --git a/include/monitor.php b/include/monitor.php index 4d6e569..438279a 100644 --- a/include/monitor.php +++ b/include/monitor.php @@ -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; diff --git a/include/note.php b/include/note.php index 4e2769c..37f5ee4 100644 --- a/include/note.php +++ b/include/note.php @@ -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": diff --git a/include/screenshot.php b/include/screenshot.php index 78a1ef9..e9d0ee1 100644 --- a/include/screenshot.php +++ b/include/screenshot.php @@ -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 = ''.$oRow->description.''; + $sImgFile = ''.$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 .= "$sImgFile
    View/Submit Screenshot
    "; + $sImg .= "$sImgFile
    View/Submit Screenshot
    "; else - $sImg .= "$sImgFile
    View Screenshot
    "; + $sImg .= "$sImgFile
    View Screenshot
    "; } else if($iVersionId) /* we are asking for a specific app version but it has no screenshots */ { - $sImg .= "$sImgFile
    Submit Screenshot
    "; + $sImg .= "$sImgFile
    Submit Screenshot
    "; } 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 = ''.$oScreenshot->sDescription.
+               '?bThumbnail=true&iId='.$id.''; $img = 'oScreenshotImage->get_width() + 20).','. @@ -426,7 +426,7 @@ function get_thumbnail($id) if ($_SESSION['current']->getpref("window:screenshot") == "no") { $img = ''.$imgSRC.''; + '?iImageId='.$id.'">'.$imgSRC.''; } } return $img; diff --git a/include/sidebar.php b/include/sidebar.php index 69a1fd8..9f65c77 100644 --- a/include/sidebar.php +++ b/include/sidebar.php @@ -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 & 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 = "
    \n"; - $str .= ""; + $str .= ""; $str .= "\n"; $str .= "
    \n"; return $str; diff --git a/include/sidebar_login.php b/include/sidebar_login.php index d62dbb0..0987a23 100644 --- a/include/sidebar_login.php +++ b/include/sidebar_login.php @@ -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("".Application::lookup_name($appId)."*", "center"); + $g->addmisc("".Application::lookup_name($appId)."*", "center"); else - $g->addmisc("".Application::lookup_name($appId)." ".Version::lookup_name($versionId)."", "center"); + $g->addmisc("".Application::lookup_name($appId)." ".Version::lookup_name($versionId)."", "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(); diff --git a/include/testResults.php b/include/testResults.php index d40362b..f142c75 100644 --- a/include/testResults.php +++ b/include/testResults.php @@ -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 ' '.$sStatus.' ',"\n"; if ($_SESSION['current']->hasAppVersionModifyPermission($oVersion)) { - echo '',"\n"; + echo '',"\n"; echo 'Edit',"\n"; } echo '',"\n"; @@ -474,7 +474,7 @@ class testData{ echo '',"\n"; echo '
    '; - echo ''; + echo ''; if($rowsUsed >= $iDisplayLimit && !is_string($showAll)) echo ''; @@ -534,7 +534,7 @@ class testData{ // Rating echo 'Rating',"\n"; make_maintainer_rating_list("sTestedRating", $this->sTestedRating); - echo 'Rating definitions',"\n"; + echo 'Rating definitions',"\n"; // extra comments echo 'Extra comments',"\n"; echo '

    ',"\n"; @@ -563,17 +563,17 @@ class Version { echo html_frame_start("Info", "90%", "", 0); echo "\n"; echo '',"\n"; echo '',"\n"; echo html_table_end(); echo html_frame_end(); } else { - echo ''; - echo ''; + echo ''; + echo ''; } } @@ -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 .= "
  • Please enter an application version.
  • \n"; - if (empty($aClean['versionDescription'])) + if (empty($aClean['shVersionDescription'])) $errors .= "
  • Please enter a version description.
  • \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 ''; + echo ''; echo ''; - echo ''; - echo "iAppId."\">"; - echo "iVersionId."\">"; + echo ''; + echo "iAppId."\">"; + echo "iVersionId."\">"; echo ""; } else { /* are we already a maintainer? */ if($_SESSION['current']->isMaintainer($this->iVersionId)) /* yep */ { - echo ''; + echo ''; echo ''; - echo ''; - echo "iAppId."\">"; - echo "iVersionId."\">"; + echo ''; + echo "iAppId."\">"; + echo "iVersionId."\">"; echo ""; } else /* nope */ { - echo ''; + echo ''; echo ''; - echo "iAppId."\">"; - echo "iVersionId."\">"; + echo "iAppId."\">"; + echo "iVersionId."\">"; echo ""; $oMonitor = new Monitor(); $oMonitor->find($_SESSION['current']->iUserId, $oApp->iAppId,$this->iVersionId); if(!$oMonitor->iMonitorId) { - echo 'iVersionId.'&appId='.$oApp->iAppId.'>'; - echo ''; + echo 'iVersionId.'&iAppId='.$oApp->iAppId.'>'; + echo ''; echo ''; echo ""; } @@ -752,8 +752,8 @@ class Version { } else { - echo ''; - echo ''; + echo ''; + echo ''; echo ''; echo ''; } @@ -763,13 +763,13 @@ class Version { if ($_SESSION['current']->hasPriv("admin") || $_SESSION['current']->isMaintainer($this->iVersionId) || $_SESSION['current']->isSuperMaintainer($this->iAppId)) { echo '"; @@ -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 'iVersionId.'>'; + echo 'iVersionId.'>'; echo ''; echo ''; @@ -885,7 +885,7 @@ class Version { echo " \n"; echo " \n"; echo " \n"; - echo " \n"; + echo " \n"; echo "\n\n"; $c++; } @@ -920,7 +920,7 @@ class Version { //display row echo "\n"; - echo " \n"; + echo " \n"; echo " \n"; echo " \n"; echo " \n"; diff --git a/include/vote.php b/include/vote.php index 226e500..1a15272 100644 --- a/include/vote.php +++ b/include/vote.php @@ -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 = " $sAppName"; + $str = " $sAppName"; $m->add(" ".$str); } else - $m->add(" No App Selected"); + $m->add(" No App Selected"); } $m->addmisc(" "); - $m->add(""); - $m->add(""); + $m->add(""); + $m->add(""); - $m->addmisc(""); + $m->addmisc(""); $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 diff --git a/index.php b/index.php index c998421..e9605c5 100644 --- a/index.php +++ b/index.php @@ -22,10 +22,10 @@ compatibility with Wine.

    -
  • Ability to vote on Favorite Applications
  • +
  • Ability to vote on Favorite Applications
  • Ability to customize the layout and behaviour of the AppDB and comments system
  • Take credit for your witty posts
  • -
  • Ability to sign up to be an application maintainer.
  • +
  • Ability to sign up to be an application maintainer.
  • Submit new applications and versions.
  • Submit new screenshots.
  • @@ -38,7 +38,7 @@ if(!$_SESSION['current']->isLoggedIn()) $str_benefits -

    So what are you waiting for, [login now]. Your help in +

    So what are you waiting for, [login now]. Your help in stomping out Wine issues will be greatly appreciated.

    "; } else { @@ -73,12 +73,12 @@ If you have screenshots or links to contribute, please browse the database and u if($voteAppId != "") { echo "There are $numApps applications currently in the database with\n"; - echo "$voteAppName being the\n"; + echo "$voteAppName being the\n"; echo "top voted application.\n"; } else { echo "There are $numApps applications currently in the database, please\n"; - echo "vote for your favorite application.\n"; + echo "vote for your favorite application.\n"; } ?> @@ -130,12 +130,6 @@ If you have screenshots or links to contribute, please browse the database and u Frank's Corner: Frank has a fantastic Wine application site. The site contains tips and howtos on getting listed apps to run.

    -

    -Sidenet Wine configuration utility: Installs Internet Explorer 6 and Windows Media Player 7 automatically (works also with MSN Messenger and RealPlayer). -

    -

    -WineTools: 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, ...). -

    diff --git a/maintainerdelete.php b/maintainerdelete.php index 4506119..9a18cb8 100644 --- a/maintainerdelete.php +++ b/maintainerdelete.php @@ -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 '',"\n"; + echo '',"\n"; echo html_frame_start("Confirm",400,"",0); echo "
    Rating',"\n"; - make_maintainer_rating_list("maintainer_rating", $this->sTestedRating); + make_maintainer_rating_list("sMaintainerRating", $this->sTestedRating); echo '
    Release',"\n"; - make_bugzilla_version_list("maintainer_release", $this->sTestedRelease); + make_bugzilla_version_list("sMaintainerRelease", $this->sTestedRelease); echo '
    '; - echo '
    '; - echo ''; - echo ''; + echo ''; + echo ''; + echo ''; echo ''; echo '
    '; - $url = BASE."admin/deleteAny.php?what=appVersion&appId=".$oApp->iAppId."&versionId=".$this->iVersionId."&confirmed=yes"; - echo "
    "; + $url = BASE."admin/deleteAny.php?sWhat=appVersion&iAppId=".$oApp->iAppId."&iVersionId=".$this->iVersionId."&sConfirmed=yes"; + echo ""; echo ''; echo '
    '; echo '
    '; @@ -792,8 +792,8 @@ class Version { { echo '
    '; echo ''; - echo '
    iVersionId.'>'; - echo ''; + echo 'iVersionId.'>'; + echo ''; echo ''; echo '
    '; echo "
    ".$sVendor."".$oApp->sName."".$oVersion->sName."[iVersionId.">process][iVersionId.">process]
    ".$oVersion->sName."".$oVersion->sName."".util_trim_description($oVersion->sDescription)."".$oVersion->sTestedRating."".$oVersion->sTestedRelease."
    \n"; - echo ""; - echo ""; - echo ""; - echo ""; + echo ""; + echo ""; + echo ""; + echo ""; - if($aClean['superMaintainer']) + if($aClean['iSuperMaintainer']) { echo "\n"; echo '',"\n"; - if($aClean['versionId']) + if($aClean['iVersionId']) { echo "',"\n"; } - echo ""; - echo ""; - echo ""; + echo ""; + echo ""; + echo ""; - if($aClean['superMaintainer']) - echo '',"\n"; + if($aClean['iSuperMaintainer']) + echo '',"\n"; else - echo '',"\n"; + echo '',"\n"; echo '',"\n"; echo '
    Are you sure that you want to be removed as a super maintainer of this application?
    ', "\n"; diff --git a/maintainersubmit.php b/maintainersubmit.php index 2f3856a..7dd6373 100644 --- a/maintainersubmit.php +++ b/maintainersubmit.php @@ -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:","
      $errors

    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.

    "; - echo "

    Being an application maintainer comes with new rights and new responsibilities; please be sure to read the maintainer's guidelines before to proceed.

    "; + echo "

    Being an application maintainer comes with new rights and new responsibilities; please be sure to read the maintainer's guidelines before to proceed.

    "; echo "

    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.

    \n"; /* Special message for super maintainer applications */ - if($aClean['superMaintainer']) + if($aClean['iSuperMaintainer']) { echo "

    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 "

    "; - 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 "

    "; echo 'Application'.$oApp->sName; echo '
    "; echo 'Version'.$oVersion->sName; echo '
    Why you want to and should be an application super maintainer
    Why you want to and should be an application super maintainer
    Why you want to and should be an application maintainer
    Why you want to and should be an application maintainer
    ',"\n"; diff --git a/preferences.php b/preferences.php index ee5d6e1..075c0ad 100644 --- a/preferences.php +++ b/preferences.php @@ -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 "\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 "\n"; echo "\n"; echo "\n"; - echo "\n"; + echo "\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(); diff --git a/screenshots.php b/screenshots.php index 0910938..cce7f7d 100644 --- a/screenshots.php +++ b/screenshots.php @@ -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 "
    \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 "
    [Delete Image]"; + echo "
    [Delete Image]"; } echo "\n"; @@ -106,22 +106,22 @@ if($hResult && mysql_num_rows($hResult)) echo "
    Please consider submitting a screenshot for the selected version yourself.

    "; } -if($aClean['versionId']) +if($aClean['iVersionId']) { //image upload box - echo '',"\n"; + echo '',"\n"; echo html_frame_start("Upload Screenshot","400","",0); echo '
    ',"\n"; - echo '',"\n"; - echo '',"\n"; + echo '',"\n"; + echo '',"\n"; echo '',"\n"; echo '
    Image
    Description
    Image
    Description
    ',"\n"; echo html_frame_end(); echo '',"\n"; - echo '',"\n"; - echo '',"\n"; + echo '',"\n"; + echo '',"\n"; } echo html_back_link(1); apidb_footer(); diff --git a/search.php b/search.php index 1e758a8..6240a4d 100644 --- a/search.php +++ b/search.php @@ -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(); ?> diff --git a/testResults.php b/testResults.php index d5d3108..4cf6115 100644 --- a/testResults.php +++ b/testResults.php @@ -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 '
    ',"\n"; + echo '',"\n"; //help @@ -135,7 +135,7 @@ if ($aClean['sub']) // View Testing Details $oTest->OutputEditor($aClean['sDistribution'],true); - echo 'Back to Version'; + echo 'Back to Version'; echo '',"\n"; @@ -144,13 +144,13 @@ if ($aClean['sub']) switch($oTest->sQueued) { case "new": - echo ' ',"\n"; + echo ' ',"\n"; break; case "true": case "rejected": case "False": - echo ' ',"\n"; - echo '',"\n"; + echo ' ',"\n"; + echo '',"\n"; break; } echo '',"\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"); diff --git a/vendorview.php b/vendorview.php index 0e329a4..811335f 100644 --- a/vendorview.php +++ b/vendorview.php @@ -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 '
  • '.$oApp->sName.'
  • ',"\n"; + echo '
  • '.$oApp->sName.'
  • ',"\n"; } echo '',"\n"; } @@ -94,7 +94,7 @@ else if ($c % 2 == 1) { $bgcolor = 'color0'; } else { $bgcolor = 'color1'; } $oVendor = new Vendor($oRow->vendorId); echo '',"\n"; - echo ''.$oVendor->sName.'',"\n"; + echo ''.$oVendor->sName.'',"\n"; echo ''.substr($oVendor->sWebpage,0,30).'',"\n"; echo ''.sizeof($oVendor->aApplicationsIds).'',"\n"; if ($_SESSION['current']->hasPriv("admin")) @@ -102,7 +102,7 @@ else echo '',"\n"; echo '[edit]',"\n"; if(!sizeof($oVendor->aApplicationsIds)) - echo ' [delete]',"\n"; + echo ' [delete]',"\n"; echo '',"\n"; } echo '',"\n"; diff --git a/viewScreenshots.php b/viewScreenshots.php index 0cdd4c2..c6b4b67 100644 --- a/viewScreenshots.php +++ b/viewScreenshots.php @@ -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 "
    "; echo "Page $currentPage of $totalPages
    "; display_page_range($currentPage, $pageRange, $totalPages, - $_SERVER['PHP_SELF']."?ItemsPerPage=".$ItemsPerPage); + $_SERVER['PHP_SELF']."?iItemsPerPage=".$ItemsPerPage); echo "
    "; echo "
    "; /* display the option to choose how many screenshots per-page to display */ echo ''; echo 'Number of Screenshots per page:'; -echo " "; $ItemsPerPageArray = array(6, 9, 12, 15, 18, 21, 24); foreach($ItemsPerPageArray as $i => $value) @@ -57,7 +57,7 @@ foreach($ItemsPerPageArray as $i => $value) } echo ""; -echo ""; +echo ""; echo " "; echo ""; @@ -81,11 +81,11 @@ while ($oRow = mysql_fetch_object($Ids)) echo "\n"; @@ -99,7 +99,7 @@ echo "

    \n"; /* display page selection links */ echo "
    "; display_page_range($currentPage, $pageRange, $totalPages, - $_SERVER['PHP_SELF']."?ItemsPerPage=".$ItemsPerPage); + $_SERVER['PHP_SELF']."?iItemsPerPage=".$ItemsPerPage); echo "
    "; apidb_footer(); diff --git a/viewbugs.php b/viewbugs.php index c8b5cec..fd0f13d 100644 --- a/viewbugs.php +++ b/viewbugs.php @@ -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 '
    ',"\n"; + apidb_header("Applications affected by Bug #".$aClean['iBugId']); + echo '',"\n"; echo '',"\n"; echo '',"\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 '',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo '',"\n"; } @@ -69,8 +69,8 @@ if( !is_numeric($aClean['bug_id'])) echo '',"\n"; echo ' ',"\n"; - echo ' ',"\n"; + echo ' ',"\n"; + echo ' ',"\n"; echo '',"\n"; echo '
    ',"\n"; - echo ' '.$oRow->appName.'',"\n"; + echo ' '.$oRow->appName.'',"\n"; echo ' '.$oRow->appDescription.'',"\n"; - echo ' '.$oRow->versionName.'',"\n"; + echo ' '.$oRow->versionName.'',"\n"; echo '
    ',"\n"; - echo '
    ',"\n"; diff --git a/votestats.php b/votestats.php index 406f44b..4ecd874 100644 --- a/votestats.php +++ b/votestats.php @@ -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 ""; +echo ""; echo "Number of top apps to display:"; -echo ""; $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 "Section:"; -echo ''; if($catId == 0) echo ''; @@ -179,7 +179,7 @@ if($hResult) while($row = mysql_fetch_object($hResult)) { $bgcolor = ($c % 2) ? "color0" : "color1"; - $link = "$row->appName"; + $link = "$row->appName"; echo "$c. $link $row->count \n"; $c++; } @@ -194,7 +194,7 @@ if($hResult) echo '

    No apps found in this category, please vote for your favorite apps!

    '; } - echo '

    What does this screen mean?

    '; + echo '

    What does this screen mean?

    '; } apidb_footer();