diff --git a/addcomment.php b/addcomment.php index 87a3fc9..4e9b379 100644 --- a/addcomment.php +++ b/addcomment.php @@ -128,12 +128,12 @@ else if(loggedin()) echo html_frame_start($mesTitle,500,"",0); echo '
| From: | \n"; + echo "||||||||||||||||||||||||
| From: | \n"; echo "".$_SESSION['current']->username." | |||||||||||||||||||||||
| Subject: | \n"; + echo "||||||||||||||||||||||||
| Subject: | \n"; echo "||||||||||||||||||||||||
| \n"; + echo " | ||||||||||||||||||||||||
| \n"; echo " \n"; echo " \n"; echo " | ||||||||||||||||||||||||
| Title | ||||||||||||||||||||||||
| Description | ', "\n"; - echo ' | |||||||||||||||||||||||
| ',"\n";
echo ' ',"\n";
diff --git a/admin/addAppVersion.php b/admin/addAppVersion.php
index 7bf964c..c4384a7 100644
--- a/admin/addAppVersion.php
+++ b/admin/addAppVersion.php
@@ -5,10 +5,9 @@ include(BASE."include/"."incl.php");
include(BASE."include/"."tableve.php");
include(BASE."include/"."qclass.php");
-//FIXME: need to check for admin privs
-if(!loggedin())
+if(!havepriv("admin"))
{
- errorpage();
+ errorpage("Insufficient Privileges!");
exit;
}
else
@@ -36,7 +35,7 @@ else
mysql_query("DELETE FROM $table WHERE versionName = 'NONAME'");
if(debugging())
- echo "$query \n"; + echo "$query \n"; $t->create($query, $table, "versionId"); } diff --git a/admin/addCategory.php b/admin/addCategory.php index d735e0d..25d3932 100644 --- a/admin/addCategory.php +++ b/admin/addCategory.php @@ -5,7 +5,7 @@ include(BASE."include/"."incl.php"); include(BASE."include/"."tableve.php"); include(BASE."include/"."qclass.php"); -if(!loggedin() || !havepriv("admin")) +if(!havepriv("admin")) { errorpage(); exit; @@ -32,7 +32,7 @@ else mysql_query("DELETE FROM $table WHERE catName = 'NONAME'"); if(debugging()) - echo "$query \n"; + echo "$query \n"; $t->create($query, $table, "catId"); } diff --git a/admin/addVendor.php b/admin/addVendor.php index fdd77ac..42b6a71 100644 --- a/admin/addVendor.php +++ b/admin/addVendor.php @@ -1,13 +1,11 @@ \n"; + echo "$query \n"; $t->create($query, $table, "vendorId"); } diff --git a/admin/adminAppDataQueue.php b/admin/adminAppDataQueue.php index 22adc0a..139d756 100644 --- a/admin/adminAppDataQueue.php +++ b/admin/adminAppDataQueue.php @@ -10,10 +10,10 @@ require(BASE."include/"."category.php"); apidb_header("Admin Application Data Queue"); -// deny access if not logged in -if(!loggedin()) +// deny access if not admin +if(!havepriv("admin")) { - errorpage("You need to be logged in to use this page."); + errorpage("Insufficient privileges."); exit; } diff --git a/admin/adminAppQueue.php b/admin/adminAppQueue.php index 55ff48f..38e9712 100644 --- a/admin/adminAppQueue.php +++ b/admin/adminAppQueue.php @@ -9,17 +9,11 @@ require(BASE."include/"."tableve.php"); require(BASE."include/"."application.php"); //deny access if not logged in -if(!loggedin()) +if(!havepriv("admin")) { - errorpage("You need to be logged in to use this page."); + errorpage("Insufficient privileges."); exit; } -else if (!havepriv("admin")) -{ - errorpage("You must be an administrator to use this page."); - exit; -} - if ($_REQUEST['sub']) { diff --git a/admin/adminMaintainerQueue.php b/admin/adminMaintainerQueue.php index 5441f35..8ff8b48 100644 --- a/admin/adminMaintainerQueue.php +++ b/admin/adminMaintainerQueue.php @@ -9,14 +9,9 @@ require(BASE."include/"."tableve.php"); require(BASE."include/"."category.php"); require_once(BASE."include/"."maintainer.php"); -//deny access if not logged in -if(!loggedin()) +if(!havepriv("admin")) { - errorpage("You need to be logged in to use this page."); - exit; -} else if (!havepriv("admin")) -{ - errorpage("You must be an administrator to use this page."); + errorpage("Insufficient privileges."); exit; } diff --git a/admin/adminMaintainers.php b/admin/adminMaintainers.php index 38ba504..b8b7d36 100644 --- a/admin/adminMaintainers.php +++ b/admin/adminMaintainers.php @@ -10,13 +10,9 @@ include("path.php"); require(BASE."include/incl.php"); // deny access if not logged in -if(!loggedin()) +if(!havepriv("admin")) { - errorpage("You need to be logged in to use this page."); - exit; -} else if (!havepriv("admin")) -{ - errorpage("You must be an administrator to use this page."); + errorpage("Insufficient privileges."); exit; } diff --git a/admin/adminVendors.php b/admin/adminVendors.php index 39b6682..750ba3b 100644 --- a/admin/adminVendors.php +++ b/admin/adminVendors.php @@ -9,14 +9,9 @@ include("path.php"); require(BASE."include/incl.php"); -//deny access if not logged in -if(!loggedin()) +if(!havepriv("admin")) { - errorpage("You need to be logged in to use this page."); - exit; -} else if(!havepriv("admin")) -{ - errorpage("You must be an administrator to use this page."); + errorpage("Insufficient privileges."); exit; } diff --git a/admin/deleteAny.php b/admin/deleteAny.php index 392b726..9f2e516 100644 --- a/admin/deleteAny.php +++ b/admin/deleteAny.php @@ -11,8 +11,7 @@ include(BASE."include/incl.php"); include(BASE."include/category.php"); include(BASE."include/application.php"); - -if(!loggedin() || !havepriv("admin")) +if(!havepriv("admin")) { errorpage(); exit; diff --git a/admin/editAppFamily.php b/admin/editAppFamily.php index bca28b2..5ec46ab 100644 --- a/admin/editAppFamily.php +++ b/admin/editAppFamily.php @@ -147,7 +147,7 @@ if($_POST) echo ' | ||||||||||||||||||||||||
| Keywords | ||||||||||||||||||||||||
| Description | ', "\n"; - echo ' | |||||||||||||||||||||||
| Web Page | ||||||||||||||||||||||||
| Category | '; $family->make_option_list("catId", $catId, "appCategory", "catId", "catName"); diff --git a/admin/editAppNote.php b/admin/editAppNote.php index 37646ad..265b748 100644 --- a/admin/editAppNote.php +++ b/admin/editAppNote.php @@ -130,7 +130,7 @@ else echo ' | |||||||||||||||||||||||
| Title | ||||||||||||||||||||||||
| Description | ', "\n"; - echo ' | |||||||||||||||||||||||
| ',"\n";
echo ' ',"\n";
echo ' ',"\n";
diff --git a/admin/editAppOwners.php b/admin/editAppOwners.php
index 2440728..e1892f8 100644
--- a/admin/editAppOwners.php
+++ b/admin/editAppOwners.php
@@ -4,7 +4,7 @@
include("path.php");
include(BASE."include/"."incl.php");
-if(!loggedin() || !havepriv("admin"))
+if(!havepriv("admin"))
{
errorpage("Insufficient Privileges","You do not have access to this section of the website");
exit;
diff --git a/admin/editBundle.php b/admin/editBundle.php
index be42cf1..fa0ace9 100644
--- a/admin/editBundle.php
+++ b/admin/editBundle.php
@@ -3,7 +3,7 @@
include("path.php");
include(BASE."include/"."incl.php");
-if(!loggedin() || !havepriv("admin"))
+if(!havepriv("admin"))
{
errorpage();
exit;
diff --git a/admin/editCategory.php b/admin/editCategory.php
index ade6c7d..69382e2 100644
--- a/admin/editCategory.php
+++ b/admin/editCategory.php
@@ -5,7 +5,7 @@ include(BASE."include/"."incl.php");
include(BASE."include/"."tableve.php");
include(BASE."include/"."qclass.php");
-if(!loggedin() || !havepriv("admin"))
+if(!havepriv("admin"))
{
errorpage();
exit;
diff --git a/admin/editVendor.php b/admin/editVendor.php
index 376d97a..291a53c 100644
--- a/admin/editVendor.php
+++ b/admin/editVendor.php
@@ -5,7 +5,7 @@ include(BASE."include/"."incl.php");
include(BASE."include/"."tableve.php");
include(BASE."include/"."qclass.php");
-if(!loggedin() || !havepriv("admin"))
+if(!havepriv("admin"))
{
errorpage();
exit;
diff --git a/admin/index.php b/admin/index.php
index 8879c6b..3f34b12 100644
--- a/admin/index.php
+++ b/admin/index.php
@@ -7,7 +7,7 @@ include("path.php");
include(BASE."include/"."incl.php");
include(BASE."include/"."tableve.php");
-if(!loggedin() || !havepriv("admin"))
+if(!havepriv("admin"))
{
errorpage();
exit;
diff --git a/admin/screenshotQueue.php b/admin/screenshotQueue.php
index 00dc7b8..16525f0 100644
--- a/admin/screenshotQueue.php
+++ b/admin/screenshotQueue.php
@@ -4,6 +4,11 @@
/************************************************/
include("path.php");
+if(!havepriv("admin"))
+{
+ errorpage("Insufficient privileges.");
+ exit;
+}
if($info=getimagesize("../data/queued/screenshots/".$_REQUEST['queueId']))
{
header('Content-type: '.$info['mime']);
diff --git a/apidb.css b/apidb.css
index 24ea4ca..bbae317 100644
--- a/apidb.css
+++ b/apidb.css
@@ -223,4 +223,4 @@ TD.stub { color: #0000B1; font-style: italic; text-align: center }
#mainTable { padding-left: 7px; }
/* Banner div */
-#banner { border: 1px solid black; }
\ No newline at end of file
+#banner { border: 1px solid black; }
diff --git a/appbrowse.php b/appbrowse.php
index 5db0148..4345b24 100644
--- a/appbrowse.php
+++ b/appbrowse.php
@@ -46,7 +46,7 @@ apidb_header("Browse Applications");
if($subs)
{
echo html_frame_start("",'98%','',2);
- echo " Category: ". $catFullPath ." Category: ". $catFullPath ." Category: ". $catFullPath ." Category: ". $catFullPath ."
Please go back and correct them."); + errorpage("We found the following errors:","
Please go back and correct them."); echo html_back_link(1); exit; } diff --git a/appview.php b/appview.php index f133d39..7b54110 100644 --- a/appview.php +++ b/appview.php @@ -55,7 +55,7 @@ function admin_menu() /** - * TODO: what does it do ? + * display the full path of the Category we are looking at */ function display_catpath($catId, $appId, $versionId = '') { @@ -63,7 +63,7 @@ function display_catpath($catId, $appId, $versionId = '') $catFullPath = make_cat_path($cat->getCategoryPath(), $appId, $versionId); echo html_frame_start("",'98%','',2); - echo " Category: ". $catFullPath ." Category: ". $catFullPath ." | ||||||||||||||||||||||||
| Links | \n";
while($ob = mysql_fetch_object($result))
{
- echo " ".substr(stripslashes($ob->description),0,30)." \n"; + echo " ".substr(stripslashes($ob->description),0,30)." \n"; } echo " | \n";
- echo "
| \n";
//Desc Image
- echo "
| |||||||||||||||||||||