Clean up HTML and PHP, remove extranious checks for loggedin()

This commit is contained in:
Eric Blade
2004-12-29 20:21:31 +00:00
committed by WineHQ
parent 9fac8bc853
commit ffeeaef807
35 changed files with 86 additions and 107 deletions

View File

@@ -128,12 +128,12 @@ else if(loggedin())
echo html_frame_start($mesTitle,500,"",0); echo html_frame_start($mesTitle,500,"",0);
echo '<table width="100%" border=0 cellpadding=0 cellspacing=1>',"\n"; echo '<table width="100%" border=0 cellpadding=0 cellspacing=1>',"\n";
echo "<tr bgcolor=#E0E0E0><td align=right><b>From:</b>&nbsp;</td>\n"; echo "<tr class=\"color0\"><td align=right><b>From:</b>&nbsp;</td>\n";
echo " <td>&nbsp;".$_SESSION['current']->username."</td></tr>\n"; echo " <td>&nbsp;".$_SESSION['current']->username."</td></tr>\n";
echo "<tr bgcolor=#E0E0E0><td align=right><b>Subject:</b>&nbsp;</td>\n"; echo "<tr class=\"color0\"><td align=right><b>Subject:</b>&nbsp;</td>\n";
echo " <td>&nbsp;<input type=\"text\" size=\"35\" name=\"subject\" value=\"".$_REQUEST['subject']."\" /> </td></tr>\n"; echo " <td>&nbsp;<input type=\"text\" size=\"35\" name=\"subject\" value=\"".$_REQUEST['subject']."\" /> </td></tr>\n";
echo "<tr bgcolor=#C0C0C0><td colspan=2><textarea name=\"body\" cols=\"70\" rows=\"15\" wrap=\"virtual\">".$_REQUEST['body']."</textarea></td></tr>\n"; echo "<tr class=\"color1\"><td colspan=2><textarea name=\"body\" cols=\"70\" rows=\"15\" wrap=\"virtual\">".$_REQUEST['body']."</textarea></td></tr>\n";
echo "<tr bgcolor=#C0C0C0><td colspan=2 align=center>\n"; echo "<tr class=\"color1\"><td colspan=2 align=center>\n";
echo " <input type=\"SUBMIT\" value=\"Post Comment\" class=\"button\" />\n"; echo " <input type=\"SUBMIT\" value=\"Post Comment\" class=\"button\" />\n";
echo " <input type=\"RESET\" value=\"Reset\" class=\"button\" />\n"; echo " <input type=\"RESET\" value=\"Reset\" class=\"button\" />\n";
echo "</td></tr>\n"; echo "</td></tr>\n";

View File

@@ -6,7 +6,7 @@ include(BASE."include/"."tableve.php");
include(BASE."include/"."qclass.php"); include(BASE."include/"."qclass.php");
//check for admin privs //check for admin privs
if(!loggedin() || (!havepriv("admin")) ) if(!havepriv("admin"))
{ {
errorpage("Insufficient Privileges!"); errorpage("Insufficient Privileges!");
exit; exit;

View File

@@ -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=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 '<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 '<tr><td colspan=2 align=center class=color3>',"\n";
echo '<input type="submit" name=sub value="Preview">&nbsp',"\n"; echo '<input type="submit" name=sub value="Preview">&nbsp',"\n";

View File

@@ -5,10 +5,9 @@ include(BASE."include/"."incl.php");
include(BASE."include/"."tableve.php"); include(BASE."include/"."tableve.php");
include(BASE."include/"."qclass.php"); include(BASE."include/"."qclass.php");
//FIXME: need to check for admin privs if(!havepriv("admin"))
if(!loggedin())
{ {
errorpage(); errorpage("Insufficient Privileges!");
exit; exit;
} }
else else
@@ -36,7 +35,7 @@ else
mysql_query("DELETE FROM $table WHERE versionName = 'NONAME'"); mysql_query("DELETE FROM $table WHERE versionName = 'NONAME'");
if(debugging()) if(debugging())
echo "$query <br><br>\n"; echo "$query <br /><br />\n";
$t->create($query, $table, "versionId"); $t->create($query, $table, "versionId");
} }

View File

@@ -5,7 +5,7 @@ include(BASE."include/"."incl.php");
include(BASE."include/"."tableve.php"); include(BASE."include/"."tableve.php");
include(BASE."include/"."qclass.php"); include(BASE."include/"."qclass.php");
if(!loggedin() || !havepriv("admin")) if(!havepriv("admin"))
{ {
errorpage(); errorpage();
exit; exit;
@@ -32,7 +32,7 @@ else
mysql_query("DELETE FROM $table WHERE catName = 'NONAME'"); mysql_query("DELETE FROM $table WHERE catName = 'NONAME'");
if(debugging()) if(debugging())
echo "$query <br><br>\n"; echo "$query <br /><br />\n";
$t->create($query, $table, "catId"); $t->create($query, $table, "catId");
} }

View File

@@ -1,13 +1,11 @@
<?php <?php
include("path.php"); include("path.php");
include(BASE."include/"."incl.php"); include(BASE."include/"."incl.php");
include(BASE."include/"."tableve.php"); include(BASE."include/"."tableve.php");
include(BASE."include/"."qclass.php"); include(BASE."include/"."qclass.php");
if(!havepriv("admin"))
if(!loggedin() || !havepriv("admin"))
{ {
errorpage(); errorpage();
exit; exit;
@@ -34,7 +32,7 @@ else
mysql_query("DELETE FROM $table WHERE vendorName = 'NONAME'"); mysql_query("DELETE FROM $table WHERE vendorName = 'NONAME'");
if(debugging()) if(debugging())
echo "$query <br><br>\n"; echo "$query <br /><br />\n";
$t->create($query, $table, "vendorId"); $t->create($query, $table, "vendorId");
} }

View File

@@ -10,10 +10,10 @@ require(BASE."include/"."category.php");
apidb_header("Admin Application Data Queue"); apidb_header("Admin Application Data Queue");
// deny access if not logged in // deny access if not admin
if(!loggedin()) if(!havepriv("admin"))
{ {
errorpage("You need to be logged in to use this page."); errorpage("Insufficient privileges.");
exit; exit;
} }

View File

@@ -9,17 +9,11 @@ require(BASE."include/"."tableve.php");
require(BASE."include/"."application.php"); require(BASE."include/"."application.php");
//deny access if not logged in //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; exit;
} }
else if (!havepriv("admin"))
{
errorpage("You must be an administrator to use this page.");
exit;
}
if ($_REQUEST['sub']) if ($_REQUEST['sub'])
{ {

View File

@@ -9,14 +9,9 @@ require(BASE."include/"."tableve.php");
require(BASE."include/"."category.php"); require(BASE."include/"."category.php");
require_once(BASE."include/"."maintainer.php"); require_once(BASE."include/"."maintainer.php");
//deny access if not logged in if(!havepriv("admin"))
if(!loggedin())
{ {
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; exit;
} }

View File

@@ -10,13 +10,9 @@ include("path.php");
require(BASE."include/incl.php"); require(BASE."include/incl.php");
// deny access if not logged in // 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; exit;
} }

View File

@@ -9,14 +9,9 @@
include("path.php"); include("path.php");
require(BASE."include/incl.php"); require(BASE."include/incl.php");
//deny access if not logged in if(!havepriv("admin"))
if(!loggedin())
{ {
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; exit;
} }

View File

@@ -11,8 +11,7 @@ include(BASE."include/incl.php");
include(BASE."include/category.php"); include(BASE."include/category.php");
include(BASE."include/application.php"); include(BASE."include/application.php");
if(!havepriv("admin"))
if(!loggedin() || !havepriv("admin"))
{ {
errorpage(); errorpage();
exit; exit;

View File

@@ -147,7 +147,7 @@ if($_POST)
echo '</td></tr>',"\n"; 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=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 '<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=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>'; echo '<tr><td class=color4>Category</td><td class=color0>';
$family->make_option_list("catId", $catId, "appCategory", "catId", "catName"); $family->make_option_list("catId", $catId, "appCategory", "catId", "catName");

View File

@@ -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=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 '<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 '<tr><td colspan=2 align=center class=color3>',"\n";
echo '<input type="submit" name=preview value="Preview">&nbsp',"\n"; echo '<input type="submit" name=preview value="Preview">&nbsp',"\n";
echo '<input type="submit" name=sub value="Update">&nbsp',"\n"; echo '<input type="submit" name=sub value="Update">&nbsp',"\n";

View File

@@ -4,7 +4,7 @@
include("path.php"); include("path.php");
include(BASE."include/"."incl.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"); errorpage("Insufficient Privileges","You do not have access to this section of the website");
exit; exit;

View File

@@ -3,7 +3,7 @@
include("path.php"); include("path.php");
include(BASE."include/"."incl.php"); include(BASE."include/"."incl.php");
if(!loggedin() || !havepriv("admin")) if(!havepriv("admin"))
{ {
errorpage(); errorpage();
exit; exit;

View File

@@ -5,7 +5,7 @@ include(BASE."include/"."incl.php");
include(BASE."include/"."tableve.php"); include(BASE."include/"."tableve.php");
include(BASE."include/"."qclass.php"); include(BASE."include/"."qclass.php");
if(!loggedin() || !havepriv("admin")) if(!havepriv("admin"))
{ {
errorpage(); errorpage();
exit; exit;

View File

@@ -5,7 +5,7 @@ include(BASE."include/"."incl.php");
include(BASE."include/"."tableve.php"); include(BASE."include/"."tableve.php");
include(BASE."include/"."qclass.php"); include(BASE."include/"."qclass.php");
if(!loggedin() || !havepriv("admin")) if(!havepriv("admin"))
{ {
errorpage(); errorpage();
exit; exit;

View File

@@ -7,7 +7,7 @@ include("path.php");
include(BASE."include/"."incl.php"); include(BASE."include/"."incl.php");
include(BASE."include/"."tableve.php"); include(BASE."include/"."tableve.php");
if(!loggedin() || !havepriv("admin")) if(!havepriv("admin"))
{ {
errorpage(); errorpage();
exit; exit;

View File

@@ -4,6 +4,11 @@
/************************************************/ /************************************************/
include("path.php"); include("path.php");
if(!havepriv("admin"))
{
errorpage("Insufficient privileges.");
exit;
}
if($info=getimagesize("../data/queued/screenshots/".$_REQUEST['queueId'])) if($info=getimagesize("../data/queued/screenshots/".$_REQUEST['queueId']))
{ {
header('Content-type: '.$info['mime']); header('Content-type: '.$info['mime']);

View File

@@ -46,7 +46,7 @@ apidb_header("Browse Applications");
if($subs) if($subs)
{ {
echo html_frame_start("",'98%','',2); echo html_frame_start("",'98%','',2);
echo "<p><b>Category: ". $catFullPath ."</b><br>\n"; echo "<p><b>Category: ". $catFullPath ."</b><br />\n";
echo html_frame_end(); echo html_frame_end();
echo html_frame_start("","98%","",0); echo html_frame_start("","98%","",0);
@@ -61,8 +61,8 @@ if($subs)
$c = 0; $c = 0;
while(list($id, list($name, $desc)) = each($subs)) while(list($id, list($name, $desc)) = each($subs))
{ {
//set row color //set row color
$bgcolor = ($c % 2 == 0) ? "color0" : "color1"; $bgcolor = ($c % 2) ? "color0" : "color1";
//get number of apps //get number of apps
$appcount = $cat->getAppCount($id); $appcount = $cat->getAppCount($id);
@@ -91,7 +91,7 @@ $apps = $cat->getAppList($catId);
if($apps) if($apps)
{ {
echo html_frame_start("",'98%','',2); echo html_frame_start("",'98%','',2);
echo "<p><b>Category: ". $catFullPath ."</b><br>\n"; echo "<p><b>Category: ". $catFullPath ."</b><br />\n";
echo html_frame_end(); echo html_frame_end();
echo html_frame_start("","98%","",0); echo html_frame_start("","98%","",0);
@@ -107,7 +107,7 @@ if($apps)
while(list($id, list($name, $desc)) = each($apps)) while(list($id, list($name, $desc)) = each($apps))
{ {
//set row color //set row color
$bgcolor = ($c % 2 == 0) ? "color0" : "color1"; $bgcolor = ($c % 2) ? "color0" : "color1";
//get number of versions //get number of versions
$query = mysql_query("SELECT count(*) as versions FROM appVersion WHERE appId = $id AND versionName != 'NONAME'"); $query = mysql_query("SELECT count(*) as versions FROM appVersion WHERE appId = $id AND versionName != 'NONAME'");

View File

@@ -61,7 +61,7 @@ if (isset($_REQUEST['queueName']))
$errors = checkInput($_REQUEST); $errors = checkInput($_REQUEST);
if( !empty($errors) ) if( !empty($errors) )
{ {
errorpage("We found the following errors:","<ul>$errors</ul><br>Please go back and correct them."); errorpage("We found the following errors:","<ul>$errors</ul><br />Please go back and correct them.");
echo html_back_link(1); echo html_back_link(1);
exit; exit;
} }

View File

@@ -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 = '') function display_catpath($catId, $appId, $versionId = '')
{ {
@@ -63,7 +63,7 @@ function display_catpath($catId, $appId, $versionId = '')
$catFullPath = make_cat_path($cat->getCategoryPath(), $appId, $versionId); $catFullPath = make_cat_path($cat->getCategoryPath(), $appId, $versionId);
echo html_frame_start("",'98%','',2); echo html_frame_start("",'98%','',2);
echo "<p><b>Category: ". $catFullPath ."</b><br>\n"; echo "<p><b>Category: ". $catFullPath ."</b><br />\n";
echo html_frame_end(); echo html_frame_end();
} }
@@ -290,7 +290,7 @@ if($appId && !$versionId)
echo " <tr class=color1><td valign=top align=right> <b>Links</b></td><td>\n"; echo " <tr class=color1><td valign=top align=right> <b>Links</b></td><td>\n";
while($ob = mysql_fetch_object($result)) while($ob = mysql_fetch_object($result))
{ {
echo " <a href='$ob->url'>".substr(stripslashes($ob->description),0,30)."</a> <br>\n"; echo " <a href='$ob->url'>".substr(stripslashes($ob->description),0,30)."</a> <br />\n";
} }
echo " </td></tr>\n"; echo " </td></tr>\n";
} }
@@ -311,7 +311,7 @@ if($appId && !$versionId)
if ($inResult && mysql_num_rows($inResult) > 0) if ($inResult && mysql_num_rows($inResult) > 0)
{ {
$foo = mysql_fetch_object($inResult); $foo = mysql_fetch_object($inResult);
echo " <a href='mailto:$foo->email'>".substr(stripslashes($foo->username),0,30)."</a> <br>\n"; echo " <a href='mailto:$foo->email'>".substr(stripslashes($foo->username),0,30)."</a> <br />\n";
} }
} }
echo " </td></tr>\n"; echo " </td></tr>\n";
@@ -373,7 +373,7 @@ if($appId && !$versionId)
// description // description
echo " <td class=color2 valign=top width='100%'>\n"; echo " <td class=color2 valign=top width='100%'>\n";
echo " <table width='100%' border=0><tr><td width='100%' valign=top><b>Description</b><br>\n"; echo " <table width='100%' border=0><tr><td width='100%' valign=top><b>Description</b><br />\n";
echo add_br(stripslashes($data->description)); echo add_br(stripslashes($data->description));
echo " </td></tr></table>\n"; echo " </td></tr></table>\n";
@@ -447,7 +447,7 @@ else if($appId && $versionId)
$r_fake = rating_stars_for_version($versionId, "fake"); $r_fake = rating_stars_for_version($versionId, "fake");
echo "<tr class=color1 valign=top><td> <b>Rating</b></td><td> $r_win \n"; echo "<tr class=color1 valign=top><td> <b>Rating</b></td><td> $r_win \n";
echo "<br> $r_fake </td></tr>\n"; echo "<br /> $r_fake </td></tr>\n";
// image // image
$img = get_screenshot_img($appId, $versionId); $img = get_screenshot_img($appId, $versionId);
@@ -531,7 +531,7 @@ else if($appId && $versionId)
echo "</table><td class=color2 valign=top width='100%'>\n"; echo "</table><td class=color2 valign=top width='100%'>\n";
//Desc Image //Desc Image
echo "<table width='100%' border=0><tr><td width='100%' valign=top> <b>Description</b><br>\n"; echo "<table width='100%' border=0><tr><td width='100%' valign=top> <b>Description</b><br />\n";
echo add_br(stripslashes($ver->description)); echo add_br(stripslashes($ver->description));
echo "</td></tr>"; echo "</td></tr>";

View File

@@ -22,7 +22,7 @@ function display_catpath($catId, $appId, $versionId = '')
$catFullPath = make_cat_path($cat->getCategoryPath(),$appId, $versionId); $catFullPath = make_cat_path($cat->getCategoryPath(),$appId, $versionId);
echo html_frame_start("",'98%','',2); echo html_frame_start("",'98%','',2);
echo "<p><b>Category: ". $catFullPath ."</b><br>\n"; echo "<p><b>Category: $catFullPath</b><br />\n";
echo html_frame_end(); echo html_frame_end();
} }
@@ -49,7 +49,7 @@ function display_bundle($appId)
while($ob = mysql_fetch_object($result)) while($ob = mysql_fetch_object($result))
{ {
//set row color //set row color
$bgcolor = ($c % 2 == 0) ? "color0" : "color1"; $bgcolor = (($c % 2) ? "color0" : "color1");
//format desc //format desc
$desc = substr(stripslashes($ob->description),0,50); $desc = substr(stripslashes($ob->description),0,50);
@@ -92,7 +92,7 @@ function display_versions($appId, $versions)
while(list($idx, $ver) = each($versions)) while(list($idx, $ver) = each($versions))
{ {
//set row color //set row color
$bgcolor = ($c % 2 == 0) ? "color0" : "color1"; $bgcolor = (($c % 2) ? "color0" : "color1");
//format desc //format desc
$desc = substr(stripslashes($ver->description),0,75); $desc = substr(stripslashes($ver->description),0,75);
@@ -182,7 +182,7 @@ if($appId)
echo "</table></td><td class=color2 valign=top width='100%'>\n"; echo "</table></td><td class=color2 valign=top width='100%'>\n";
//Notes //Notes
echo "<table width='100%' border=0><tr><td width='100%' valign=top><big><b>Welcome</b></big><br>\n"; echo "<table width='100%' border=0><tr><td width='100%' valign=top><big><b>Welcome</b></big><br />\n";
?> ?>
<p>This is the link between the Wine Application Database and Wine's Buzilla. From here you <p>This is the link between the Wine Application Database and Wine's Buzilla. From here you
get search for bugs entered against this application. You can also enter new bugs if you log get search for bugs entered against this application. You can also enter new bugs if you log

View File

@@ -65,8 +65,8 @@ if($_SESSION['current']->getpref("confirm_comment_deletion") != "no" &&
echo htmlify_urls($ob->body), "<br /><br />\n"; echo htmlify_urls($ob->body), "<br /><br />\n";
echo html_frame_end(); echo html_frame_end();
echo '<table width="100%" border=0 cellpadding=0 cellspacing=1>',"\n"; echo '<table width="100%" border=0 cellpadding=0 cellspacing=1>',"\n";
echo "<tr bgcolor=#C0C0C0><td colspan=2><textarea name=\"str_why\" cols=\"70\" rows=\"15\" wrap=\"virtual\"></textarea></td></tr>\n"; echo "<tr class=color1><td colspan=2><textarea name=\"str_why\" cols=\"70\" rows=\"15\" wrap=\"virtual\"></textarea></td></tr>\n";
echo "<tr bgcolor=#C0C0C0><td colspan=2 align=center>\n"; echo "<tr class=color1><td colspan=2 align=center>\n";
echo " <input type=\"SUBMIT\" value=\"Delete Comment\" class=\"button\" />\n"; echo " <input type=\"SUBMIT\" value=\"Delete Comment\" class=\"button\" />\n";
echo "</td></tr>\n"; echo "</td></tr>\n";
echo "</table>\n"; echo "</table>\n";

View File

@@ -115,7 +115,7 @@ if($_POST)
echo html_table_end(); echo html_table_end();
echo html_frame_end(); echo html_frame_end();
echo "<br> <div align=center> <input type=submit value='Update'> </div> <br>\n"; echo "<br /> <div align=center> <input type=submit value='Update'> </div> <br />\n";
echo "</form>\n"; echo "</form>\n";
} }

View File

@@ -50,7 +50,7 @@ if($confirmed)
} else } else
{ {
//error //error
echo "<p><b>Database Error!<br>".mysql_error()."</b></p>\n"; echo "<p><b>Database Error!<br />".mysql_error()."</b></p>\n";
} }
} else } else

View File

@@ -67,7 +67,7 @@ if($_REQUEST['maintainReason'])
$errors = checkAppMaintainerInput($_REQUEST); $errors = checkAppMaintainerInput($_REQUEST);
if(!empty($errors)) if(!empty($errors))
{ {
errorpage("We found the following errors:","<ul>$errors</ul><br>Please go back and correct them."); errorpage("We found the following errors:","<ul>$errors</ul><br />Please go back and correct them.");
exit; exit;
} }
@@ -112,7 +112,7 @@ if($_REQUEST['maintainReason'])
echo "regularly and who is willing to be active in reporting regressions with newer \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 "versions of wine and to help other users run this application under wine.";
echo "<p>Being an application maintainer comes with responsibilities. "; echo "<p>Being an application maintainer comes with responsibilities. ";
echo "<br><br><b>You are expected to:</b>"; echo "<br /><br /><b>You are expected to:</b>";
echo "<li>You are expected to keep the application comments clean, all stale data should be removed</li>"; echo "<li>You are expected to keep the application comments clean, all stale data should be removed</li>";
echo "<li>Be an active user of that application and version</li>"; echo "<li>Be an active user of that application and version</li>";
echo "<li>Keep up-to-date with all wine releases, if there are regressions these should be reported to wine-devel</li>"; echo "<li>Keep up-to-date with all wine releases, if there are regressions these should be reported to wine-devel</li>";
@@ -126,7 +126,7 @@ if($_REQUEST['maintainReason'])
echo "appdb admins to identify people that are best suited for the job. Your request\n"; echo "appdb admins to identify people that are best suited for the job. Your request\n";
echo "may be denied if there are already a handful of maintainers for this app or if you\n"; echo "may be denied if there are already a handful of maintainers for this app or if you\n";
echo "don't have the experience with wine that is necessary to help other users out.\n"; echo "don't have the experience with wine that is necessary to help other users out.\n";
echo "<br>"; echo "<br />";
/* Special message for super maintainer applications */ /* Special message for super maintainer applications */
if($superMaintainer) if($superMaintainer)
@@ -135,7 +135,7 @@ if($_REQUEST['maintainReason'])
echo "this application. We don't expect you to run every version but at least to help keep\n"; echo "this application. We don't expect you to run every version but at least to help keep\n";
echo "the forums clean of stale or out-of-date information\n"; echo "the forums clean of stale or out-of-date information\n";
} }
echo "<br><br>"; echo "<br /><br />";
if($superMaintainer) if($superMaintainer)
echo html_frame_start("New Super Maintainer Form",400,"",0); echo html_frame_start("New Super Maintainer Form",400,"",0);

View File

@@ -67,7 +67,7 @@ if($_REQUEST['cmd'])
else else
{ {
//error //error
$statusMessage = "<p><b>Database Error!<br>".mysql_error()."</b></p>\n"; $statusMessage = "<p><b>Database Error!<br />".mysql_error()."</b></p>\n";
addmsg($statusMessage, "red"); addmsg($statusMessage, "red");
} }
} }
@@ -121,7 +121,7 @@ if($_REQUEST['cmd'])
else else
{ {
//error //error
$statusMessage = "<p><b>Database Error!<br>".mysql_error()."</b></p>\n"; $statusMessage = "<p><b>Database Error!<br />".mysql_error()."</b></p>\n";
addmsg($statusMessage, "red"); addmsg($statusMessage, "red");
} }
} }
@@ -233,7 +233,7 @@ if($result && mysql_num_rows($result))
$c++; $c++;
} }
echo "</tr></table></div><br>\n"; echo "</tr></table></div><br />\n";
echo html_frame_end("Click thumbnail to view image in new window."); echo html_frame_end("Click thumbnail to view image in new window.");
} else { } else {

View File

@@ -31,7 +31,7 @@ else
echo html_frame_start("","98%","",0); echo html_frame_start("","98%","",0);
echo "<table width='100%' border=0 cellpadding=3 cellspacing=1>\n\n"; echo "<table width='100%' border=0 cellpadding=3 cellspacing=1>\n\n";
echo "<tr bgcolor=#999999>\n"; echo "<tr class=color4>\n";
echo " <td><font color=white>Application Name</font></td>\n"; echo " <td><font color=white>Application Name</font></td>\n";
echo " <td><font color=white>Description</font></td>\n"; echo " <td><font color=white>Description</font></td>\n";
echo " <td><font color=white>No. Versions</font></td>\n"; echo " <td><font color=white>No. Versions</font></td>\n";
@@ -44,7 +44,7 @@ else
if ($ob->appName == "NONAME") { continue; } if ($ob->appName == "NONAME") { continue; }
//set row color //set row color
if ($c % 2 == 1) { $bgcolor = '#E0E0E0'; } else { $bgcolor = '#EFEFEF'; } $bgcolor = ($c % 2) ? 'color0' : 'color1';
//count versions //count versions
$query = mysql_query("SELECT count(*) as versions FROM appVersion WHERE appId = $ob->appId AND versionName != 'NONAME'"); $query = mysql_query("SELECT count(*) as versions FROM appVersion WHERE appId = $ob->appId AND versionName != 'NONAME'");
@@ -54,7 +54,7 @@ else
$desc = substr(stripslashes($ob->description),0,75); $desc = substr(stripslashes($ob->description),0,75);
//display row //display row
echo "<tr bgcolor=$bgcolor>\n"; echo "<tr class=$bgcolor>\n";
echo " <td>".html_ahref($ob->appName,"appview.php?appId=$ob->appId")."</td>\n"; echo " <td>".html_ahref($ob->appName,"appview.php?appId=$ob->appId")."</td>\n";
echo " <td>$desc &nbsp;</td>\n"; echo " <td>$desc &nbsp;</td>\n";
echo " <td>$y->versions &nbsp;</td>\n"; echo " <td>$y->versions &nbsp;</td>\n";
@@ -63,7 +63,7 @@ else
$c++; $c++;
} }
echo "<tr><td colspan=3 bgcolor=#999999><font color=white>$c match(es) found</font></td></tr>\n"; echo "<tr><td colspan=3 class=color4><font color=white>$c match(es) found</font></td></tr>\n";
echo "</table>\n\n"; echo "</table>\n\n";
} }

View File

@@ -59,7 +59,7 @@ if($totalCount == 0)
$tempResult = mysql_query($query); $tempResult = mysql_query($query);
if(!$tempResult) if(!$tempResult)
{ {
echo "$query <br>\n"; echo "$query <br />\n";
echo "An error occurred: ".mysql_error()."<p>"; echo "An error occurred: ".mysql_error()."<p>";
exit; exit;
} }
@@ -74,7 +74,7 @@ if($totalCount == 0)
if(debugging()) if(debugging())
{ {
echo $query; echo $query;
echo "<br><br>"; echo "<br /><br />";
} }
echo "Your query returned no data.</body></html>\n"; echo "Your query returned no data.</body></html>\n";
@@ -100,10 +100,10 @@ if($verbose)
$query .= " LIMIT $curPos,$endPos"; $query .= " LIMIT $curPos,$endPos";
if(debugging()) if(debugging())
echo "$query <br><br>\n"; echo "$query <br /><br />\n";
add_pn_buttons($vars, $endPos); add_pn_buttons($vars, $endPos);
echo "<br> curPos: $curPos <br> linesPerPage: $linesPerPage <br> totalCount: $totalCount <br>"; echo "<br /> curPos: $curPos <br /> linesPerPage: $linesPerPage <br /> totalCount: $totalCount <br />";
if($mode == "edit") if($mode == "edit")
$t->edit($query); $t->edit($query);

View File

@@ -21,7 +21,7 @@ us at <a href="mailto:appdb@winehq.org">appdb@winehq.org</a>.
<p> <p>
If you notice something that seems to be wrong, or busticated, there is a way you can If you notice something that seems to be wrong, or busticated, there is a way you can
help us out.<br> help us out.<br />
We also have a <a href="http://bugs.winehq.org/">Bug Tracking Database</a> We also have a <a href="http://bugs.winehq.org/">Bug Tracking Database</a>
where you can register bugs. This is the best way to get problems fixed. You can go directly where you can register bugs. This is the best way to get problems fixed. You can go directly
to the App DB Bug Database by following this to the App DB Bug Database by following this

View File

@@ -38,16 +38,16 @@ $vendor = mysql_fetch_object($result);
apidb_header("View Vendor"); apidb_header("View Vendor");
echo html_frame_start("Vendor Information",500); echo html_frame_start("Vendor Information",500);
echo "Vendor Name: $vendor->vendorName <br>\n"; echo "Vendor Name: $vendor->vendorName <br />\n";
if ($vendor->vendorURL) { if ($vendor->vendorURL) {
echo "Vendor URL: <a href='$vendor->vendorURL'>$vendor->vendorURL</a> <br>\n"; echo "Vendor URL: <a href='$vendor->vendorURL'>$vendor->vendorURL</a> <br />\n";
} }
$result = mysql_query("SELECT * FROM appFamily WHERE vendorId = $vendorId ORDER BY appName"); $result = mysql_query("SELECT * FROM appFamily WHERE vendorId = $vendorId ORDER BY appName");
if($result) if($result)
{ {
echo "<br>Applications by $vendor->vendorName<br><ol>\n"; echo "<br />Applications by $vendor->vendorName<br /><ol>\n";
while($app = mysql_fetch_object($result)) while($app = mysql_fetch_object($result))
{ {
echo "<li> <a href='appview.php?appId=$app->appId'> $app->appName </a> </li>\n"; echo "<li> <a href='appview.php?appId=$app->appId'> $app->appName </a> </li>\n";

View File

@@ -121,13 +121,11 @@ if($subs)
echo stripslashes($name); echo stripslashes($name);
} }
} }
echo "</select>"; echo '</select>';
echo '<input type="submit" value="Refresh">';
echo "<input type=\"submit\" value=\"Refresh\" />"; echo '</form>';
echo "</form>"; echo '<br />';
echo '<br />';
echo "<br />";
echo "<br />";
/***************************************************/ /***************************************************/
/* build a list of the apps in the chosen category */ /* build a list of the apps in the chosen category */
@@ -160,9 +158,9 @@ if($result)
$c = 1; $c = 1;
while($row = mysql_fetch_object($result)) while($row = mysql_fetch_object($result))
{ {
if ($c % 2 == 1) { $bgcolor = "color0"; } else { $bgcolor = "color1"; } $bgcolor = ($c % 2) ? "color0" : "color1";
$link = "<a href='appview.php?appId=$row->appId'>$row->appName</a>"; $link = "<a href='appview.php?appId=$row->appId'>$row->appName</a>";
echo "<tr class='".$bgcolor."'><td width='90%'>$c. $link </td> <td> $row->count </td></tr>\n"; echo "<tr class=$bgcolor><td width='90%'>$c. $link </td> <td> $row->count </td></tr>\n";
$c++; $c++;
} }
@@ -173,7 +171,7 @@ if($result)
/* think that something went wrong with the server */ /* think that something went wrong with the server */
if($c == 1) if($c == 1)
{ {
echo "<h2 align=\"center\">No apps found in this category</h2>"; echo '<h2 align="center">No apps found in this category</h2>';
} }
echo "<center><a href='help/?topic=voting'>What does this screen mean?</a></center>\n"; echo "<center><a href='help/?topic=voting'>What does this screen mean?</a></center>\n";