Clean up HTML and PHP, remove extranious checks for loggedin()
This commit is contained in:
@@ -6,7 +6,7 @@ include(BASE."include/"."tableve.php");
|
||||
include(BASE."include/"."qclass.php");
|
||||
|
||||
//check for admin privs
|
||||
if(!loggedin() || (!havepriv("admin")) )
|
||||
if(!havepriv("admin"))
|
||||
{
|
||||
errorpage("Insufficient Privileges!");
|
||||
exit;
|
||||
|
||||
@@ -99,7 +99,7 @@ else if($_REQUEST['sub'] == 'Preview' OR empty($_REQUEST['submit']))
|
||||
echo "<tr><td class=color1>Title</td><td class=color0><input size='80%' type='text' name='noteTitle' type='text' value='{$_REQUEST['noteTitle']}'></td></tr>\n";
|
||||
}
|
||||
echo '<tr><td class=color4>Description</td><td class=color0>', "\n";
|
||||
echo '<textarea cols=$50 rows=10 name="noteDesc">'.stripslashes($_REQUEST['noteDesc']).'</textarea></td></tr>',"\n";
|
||||
echo '<textarea cols=50 rows=10 name="noteDesc">'.stripslashes($_REQUEST['noteDesc']).'</textarea></td></tr>',"\n";
|
||||
|
||||
echo '<tr><td colspan=2 align=center class=color3>',"\n";
|
||||
echo '<input type="submit" name=sub value="Preview"> ',"\n";
|
||||
|
||||
@@ -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 <br><br>\n";
|
||||
echo "$query <br /><br />\n";
|
||||
|
||||
$t->create($query, $table, "versionId");
|
||||
}
|
||||
|
||||
@@ -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 <br><br>\n";
|
||||
echo "$query <br /><br />\n";
|
||||
|
||||
$t->create($query, $table, "catId");
|
||||
}
|
||||
|
||||
@@ -1,13 +1,11 @@
|
||||
<?php
|
||||
|
||||
|
||||
include("path.php");
|
||||
include(BASE."include/"."incl.php");
|
||||
include(BASE."include/"."tableve.php");
|
||||
include(BASE."include/"."qclass.php");
|
||||
|
||||
|
||||
if(!loggedin() || !havepriv("admin"))
|
||||
if(!havepriv("admin"))
|
||||
{
|
||||
errorpage();
|
||||
exit;
|
||||
@@ -34,7 +32,7 @@ else
|
||||
mysql_query("DELETE FROM $table WHERE vendorName = 'NONAME'");
|
||||
|
||||
if(debugging())
|
||||
echo "$query <br><br>\n";
|
||||
echo "$query <br /><br />\n";
|
||||
|
||||
$t->create($query, $table, "vendorId");
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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'])
|
||||
{
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -147,7 +147,7 @@ if($_POST)
|
||||
echo '</td></tr>',"\n";
|
||||
echo '<tr><td class=color1>Keywords</td><td class=color0><input size=80% type="text" name="keywords" value="'.$keywords.'"></td></tr>',"\n";
|
||||
echo '<tr><td class=color4>Description</td><td class=color0>', "\n";
|
||||
echo '<textarea cols=$50 rows=10 name="description">'.stripslashes($description).'</textarea></td></tr>',"\n";
|
||||
echo '<textarea cols=50 rows=10 name="description">'.stripslashes($description).'</textarea></td></tr>',"\n";
|
||||
echo '<tr><td class=color1>Web Page</td><td class=color0><input size=80% type="text" name="webPage" value="'.$webPage.'"></td></tr>',"\n";
|
||||
echo '<tr><td class=color4>Category</td><td class=color0>';
|
||||
$family->make_option_list("catId", $catId, "appCategory", "catId", "catName");
|
||||
|
||||
@@ -130,7 +130,7 @@ else
|
||||
echo '<tr><td class=color1>Title</td><td class=color0><input size=80% type="text" name="noteTitle" type="text" value="'.$_REQUEST['noteTitle'].'"></td></tr>',"\n";
|
||||
}
|
||||
echo '<tr><td class=color4>Description</td><td class=color0>', "\n";
|
||||
echo '<textarea cols=$50 rows=10 name="noteDesc">'.stripslashes($_REQUEST['noteDesc']).'</textarea></td></tr>',"\n";
|
||||
echo '<textarea cols=50 rows=10 name="noteDesc">'.stripslashes($_REQUEST['noteDesc']).'</textarea></td></tr>',"\n";
|
||||
echo '<tr><td colspan=2 align=center class=color3>',"\n";
|
||||
echo '<input type="submit" name=preview value="Preview"> ',"\n";
|
||||
echo '<input type="submit" name=sub value="Update"> ',"\n";
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
include("path.php");
|
||||
include(BASE."include/"."incl.php");
|
||||
|
||||
if(!loggedin() || !havepriv("admin"))
|
||||
if(!havepriv("admin"))
|
||||
{
|
||||
errorpage();
|
||||
exit;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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']);
|
||||
|
||||
Reference in New Issue
Block a user