summaryrefslogtreecommitdiffstats
path: root/pages
diff options
context:
space:
mode:
authorPatrick Davison <snapwilliam@gmail.com>2013-05-13 01:00:15 -0700
committerPatrick Davison <snapwilliam@gmail.com>2013-05-13 01:00:15 -0700
commit0761f76cc24350c4391efc981e49a9ad9828a94d (patch)
tree587532e8dbdb4f400c8ac74d3dd8049def23f3cc /pages
parent136ce85b66802c663264d5d10ccc6e58efec7059 (diff)
downloadpathery-0761f76cc24350c4391efc981e49a9ad9828a94d.tar.xz
Many PHP warnings/notices fixes.
Diffstat (limited to 'pages')
-rw-r--r--pages/achievements.php44
-rw-r--r--pages/mapeditor.php5
-rw-r--r--pages/massemail.php10
3 files changed, 39 insertions, 20 deletions
diff --git a/pages/achievements.php b/pages/achievements.php
index bef9adb..2434823 100644
--- a/pages/achievements.php
+++ b/pages/achievements.php
@@ -10,6 +10,12 @@ topbar($Links);
include_once('./includes/sqlEmbedded.php');
include_once('./includes/datas.php');
+
+//TODO: Redo crappy code?
+//Reduce complaining -- until i can fix this
+error_reporting(E_ERROR | E_WARNING | E_PARSE);
+
+
//Get UserID
if (is_int($_GET['id'] * 1) AND isset($_GET['id']))
$userID = $_GET['id'] * 1;
@@ -407,9 +413,9 @@ function unlockItemAsTD($uType, $item) {
$by = $aTypeNames[$item['aType']];
$on = relative_date(strtotime($aCompleted));
- $unlockTitle = "$item[name]. From $by $on";
+ $unlockTitle = "{$item['name']}. From $by $on";
if ($item['aType'] == -1) {
- $unlockTitle = "$item[name]";
+ $unlockTitle = $item['name'];
}
//$border = 'border: 1px solid #000; border-width: 2px 0px 2px 0px;';
@@ -417,14 +423,16 @@ function unlockItemAsTD($uType, $item) {
$class = 'grid_td_walls';
$class = 'displayWallUnlock';
+ $r = '';
+ $border = ''; //depreciate
switch ($uType) {
case UNLOCK_WALL_COLOR:
if ($GLOBALS['wallColor'] == $item[value]) {
$class .= ' active';
} else $class .= ' inactive';
- $r .= "<td class='$class' id='color_$item[id]' title='$unlockTitle' ";
- $r .= "onClick='colorclick(this,\"$item[value]\", \"$item[id]\")' ";
- $r .= "style='background-color:$item[value];'><div></div></td>";
+ $r .= "<td class='$class' id='color_{$item['id']}' title='$unlockTitle' ";
+ $r .= "onClick='colorclick(this,\"{$item['value']}\", \"{$item['id']}\")' ";
+ $r .= "style='background-color:{$item['value']};'><div></div></td>";
// USE THIS? $style = "background-color:$item[value];";
break;
@@ -432,30 +440,30 @@ function unlockItemAsTD($uType, $item) {
if ($GLOBALS['wallEmblem'] == $item[value]) {
$class .= ' active';
} else $class .= ' inactive';
- $r .= "<td class='$class' title='$unlockTitle' id='' onClick='emblemclick(this,\"$item[value]\", \"$item[id]\")' style='background-image: url(../images/marks/$item[value]);' >
+ $r .= "<td class='$class' title='$unlockTitle' id='' onClick='emblemclick(this,\"{$item['value']}\", \"{$item['id']}\")' style='background-image: url(../images/marks/{$item['value']});' >
<div></div></td>";
- // USE THIS ? $style = "background-image: url(../images/marks/$item[value]);";
+ // USE THIS ? $style = "background-image: url(../images/marks/{$item['value']});";
break;
case UNLOCK_DISPLAY_COLOR:
if ($GLOBALS['nameColor'] == $item[value])
$border = 'border: 1px solid #26b;';
- $r .= "<td class='name_color_select'><span title='$unlockTitle' onClick='namecolorclick(this,\"$item[value]\", \"$item[id]\")' style='color:$item[value]; margin-right:15px;$border'>";
- $r .= "&nbsp;$item[name]&nbsp;";
+ $r .= "<td class='name_color_select'><span title='$unlockTitle' onClick='namecolorclick(this,\"{$item['value']}\", \"{$item['id']}\")' style='color:{$item['value']}; margin-right:15px;$border'>";
+ $r .= "&nbsp;{$item['name']}&nbsp;";
$r .= "</span></td>";
break;
case UNLOCK_WALL_ORIENTATION:
$checked = '';
- if (intval($GLOBALS['wallOrientation']) == intval($item[value])) $checked = 'checked';
+ if (intval($GLOBALS['wallOrientation']) == intval($item['value'])) $checked = 'checked';
//$r .= "<td class='name_color_select'>";
$r .= "<td class='name_color_select'>";
- $r .= "<input onClick='wallOrientationClick(this,\"$item[value]\", \"$item[id]\")' type='radio' name='wallOrientation' value='male' $checked>$item[name] ";
+ $r .= "<input onClick='wallOrientationClick(this,\"{$item['value']}\", \"{$item['id']}\")' type='radio' name='wallOrientation' value='male' $checked>{$item['name']} ";
$r .= "</td>";
break;
case UNLOCK_EXTRAS:
- $r .= "<td style='border: 1px solid gray;' class='name_color_select' title='$unlockTitle'>$item[name]</td>";
+ $r .= "<td style='border: 1px solid gray;' class='name_color_select' title='$unlockTitle'>{$item['name']}</td>";
break;
}
return $r;
@@ -478,6 +486,14 @@ if (isset($unlocks)) {
$uSubtypeNames[UNLOCK_WALL_EMBLEM][0] = "Simple";
$uSubtypeNames[UNLOCK_WALL_EMBLEM][1] = "Complicated";
+ $uSubtypeNames[UNLOCK_DISPLAY_COLOR][0] = "";
+
+ $uSubtypeNames[UNLOCK_WALL_ORIENTATION][0] = "";
+
+ $uSubtypeNames[UNLOCK_EXTRAS][0] = "";
+
+
+
//For every unlock type that the user has.
foreach ($unlocks as $uType => $unlock) {
$subtype = array();
@@ -492,9 +508,9 @@ if (isset($unlocks)) {
echo "<table>";
foreach($subtype as $key => $content) {
$content = implode($content);
+ echo "<b>:$uType:$key:</b>";
$tmpName = $uSubtypeNames[$uType][$key];
- if (count($subtype) > 1)
- echo "</table><strong>$tmpName</strong><table>";
+ if (count($subtype) > 1) echo "</table><strong>$tmpName</strong><table>";
echo "<tr>$content</tr>";
}
echo "</table>";
diff --git a/pages/mapeditor.php b/pages/mapeditor.php
index 4d395c4..e93ac17 100644
--- a/pages/mapeditor.php
+++ b/pages/mapeditor.php
@@ -348,9 +348,12 @@ function constructTiles(width, height, baseMap) {
<?PHP
$tilesArray = array(
+ //: q?
's', 's2', 'f', 'p',
'space',
- 'r', 'r2', 'o', 'q', 'x', 'x2',
+ 'x', 'x2',
+ 'space',
+ 'r', 'r2', 'r3', 'o',
'space',
'c', 'c2', 'c3', 'c4', 'c5',
'space',
diff --git a/pages/massemail.php b/pages/massemail.php
index 74c8fdc..a85451b 100644
--- a/pages/massemail.php
+++ b/pages/massemail.php
@@ -9,9 +9,9 @@ htmlHeader(
<?php
topbar($Links);
-include('./includes/datas.php');
-include('./includes/sqlEmbedded.php');
-include('./includes/emails.php');
+include_once('./includes/datas.php');
+include_once('./includes/sqlEmbedded.php');
+include_once('./includes/emails.php');
if (!$accepted) exit;
@@ -21,7 +21,7 @@ To unsubscribe: %mydomaincp
Questions? Email us! snap@pathery.com";
-if ($_POST['queueMassEmail'] == 'true') {
+if (isset($_POST['queueMassEmail']) AND $_POST['queueMassEmail'] == 'true') {
echo "Action started...<br/>";
if ($_SESSION['isAdmin'] !== true)
return;
@@ -97,7 +97,7 @@ $count = $row['count'];
//echo "<br>Script execution: $time seconds XX\n <br>";
$where = '';
-if ($_POST['selectResultSet'] == 'true') {
+if (isset($_POST['selectResultSet']) AND $_POST['selectResultSet'] == 'true') {
// CLAUSES:
$clause1 = $_POST['clause1'];
$clauseOptions = array('ID', 'displayName', 'dateJoined', 'dateLogin', 'email', 'isAdmin');