summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorraylu <raylu@cmu.edu>2011-04-07 00:31:46 -0400
committerraylu <raylu@cmu.edu>2011-04-07 00:31:46 -0400
commita8e48c969b5b56f76a37121fe157b75398461e84 (patch)
treeef32cd90ef2274807c57114e1447d53fb0c3066a
parentf8c9eb5220afaf2f9a62f9a176a45913240f4081 (diff)
downloadpathery-a8e48c969b5b56f76a37121fe157b75398461e84.tar.xz
Import mazetest from Dropbox
Excluded stray /db.inc.php file
-rw-r--r--changelog/changelog.txt18
-rw-r--r--css/mapstyle.css11
-rw-r--r--globe.php42
-rw-r--r--includes/db.inc.php9
-rw-r--r--pages/gallery.php47
5 files changed, 94 insertions, 33 deletions
diff --git a/changelog/changelog.txt b/changelog/changelog.txt
index 4489604..5aca7cf 100644
--- a/changelog/changelog.txt
+++ b/changelog/changelog.txt
@@ -1,24 +1,6 @@
=================
== NamePending ==
=================
-04-04-11
- Setup the leaderboard to show every solution from yesterday. - Snap
- Modified loadSol() JS function to support other calls. - Snap
- Added col1 and col2 classes for the columns. They're now used on the homepage and leaderboard page. - raylu
- The leaderboard specific CSS is in statsstyle.css. It's currently included on all pages, unfortunately. - raylu
- Cleaned up the leaderboard.php code duplication. - raylu
- Added some Javascript to only show one stats section at a time on the leaderboard page. - raylu
-
-04-03-11
- Fixed a database related issue, solution size was insuffecient. - Snap
- Preferences for mute/speed is now saved - Snap
- Facebook page semi-started (awaiting name?) - Snap
-
-03-28-11 - 03-31-11
- Added maps-per-day. - Snap
- A few map-types designed and added. - Snap
- Added deny all .htaccess to /pages. - Snap
-
03-27-11
Added yesterdays best solution to leaderboard. - Snap
diff --git a/css/mapstyle.css b/css/mapstyle.css
index 77a8089..3dbf8c1 100644
--- a/css/mapstyle.css
+++ b/css/mapstyle.css
@@ -24,7 +24,6 @@
color: #FFFF33;
}
-
.dsp_33 {
width:32%;
}
@@ -118,21 +117,22 @@
.grid_td
{
background: #F5FBFE url(../images/OverlayTile10.png);
+ background-color: #F5FBFE;
}
.grid_td:hover
{
background: #CCCCCC url(../images/OverlayTileFaceted10.png);
+ background-color: #CCC;
}
.grid_td_pressed {
background: #111122;
}
.grid_td_rocks {
- background: #b85555 url(../images/OverlayTileFaceted50.png);
+ background-color: #b76666;
}
.grid_td_walls {
background-color: #777;
- background: url(../images/OverlayTileFaceted50.png);
transition:background-color 1.6s ease-out;
-webkit-transition:background-color 1.6s ease-out;
-o-transition:background-color 1.6s ease-out;
@@ -145,11 +145,12 @@
.grid_td_start {
background: url(../images/OverlayStart50i.png);
- background-color: #F75555;
+ background-color: #E44;
+ color: #fff;
}
.grid_td_finish {
background: url(../images/OverlayStart50.png);
- background-color: #6666FF;
+ background-color: #55e;
color: #fff;
}
diff --git a/globe.php b/globe.php
index 72795c8..8fb1994 100644
--- a/globe.php
+++ b/globe.php
@@ -6,15 +6,12 @@ session_start();
//include_once 'db.inc.php';
-
-
-$mydomain = "http://www.snapems.com/";
+$mydomain = "http://www.mazetd.4xg.net";
//https://www.google.com/accounts/o8/id?id=AItOawl4GX29ka40T4ZeuXnR2FVsP4LZWaED_T8
//https%3A%2F%2Fwww.google.com%2Faccounts%2Fo8%2Fid%3Fid%3DAItOawl
-
include_once("./includes/header.php");
@@ -63,6 +60,37 @@ function CookieLogin() {
}
+//error_reporting(0);
+//$old_error_handler = set_error_handler("userErrorHandler");
+function userErrorHandler ($errno, $errmsg, $filename, $linenum, $vars) {
+ $time=date("d M Y H:i:s");
+ // Get the error type from the error number
+ $errortype = array (1 => "Error",
+ 2 => "Warning",
+ 4 => "Parsing Error",
+ 8 => "Notice",
+ 16 => "Core Error",
+ 32 => "Core Warning",
+ 64 => "Compile Error",
+ 128 => "Compile Warning",
+ 256 => "User Error",
+ 512 => "User Warning",
+ 1024 => "User Notice");
+ $errlevel=$errortype[$errno];
+
+ //Write error to log file (CSV format)
+ $errfile=fopen("errors.csv","a");
+ fputs($errfile,"\"$time\",\"$filename:
+ $linenum\",\"($errlevel) $errmsg\"\r\n");
+ fclose($errfile);
+
+ //if($errno!=2 && $errno!=8) {
+ //Terminate script if fatal error
+ //die("A fatal error has occurred. Script execution has been aborted");
+ //}
+}
+
+
@@ -122,8 +150,8 @@ Function CheckAuth($page) {
}
//!! Contains domain !!
-Function DoRedirect($message = "Thanks", $to = "http://www.snapems.com/", $duration = "3") {
- $to=(is_null($to)?'http://www.snapems.com/':$to);
+Function DoRedirect($message = "Thanks", $to = "http://www.mazetd.4xg.net/", $duration = "3") {
+ $to=(is_null($to)?'http://www.mazetd.4xg.net/':$to);
if ($duration == 0) {
header("Location: $to");
@@ -154,4 +182,6 @@ Function DoRedirect($message = "Thanks", $to = "http://www.snapems.com/", $durat
}
+
+
?>
diff --git a/includes/db.inc.php b/includes/db.inc.php
index 8e9bdfb..9287ed2 100644
--- a/includes/db.inc.php
+++ b/includes/db.inc.php
@@ -1,10 +1,11 @@
<?php
+
global $mysqlid;
-$db_host = "db2838.perfora.net";
-$db_user = "dbo358894438";
-$db_name = "db358894438";
-$db_pass = "MAZE4US";
+$db_host = "db2894.perfora.net";
+$db_user = "dbo362854667";
+$db_name = "db362854667";
+$db_pass = "mazes4me";
$mysqlid = @mysql_connect($db_host,$db_user, $db_pass) or die("Cannot connect to database.");
@mysql_select_db($db_name, $mysqlid) or die("Invalid database.");
diff --git a/pages/gallery.php b/pages/gallery.php
index 68c17ae..259ac2a 100644
--- a/pages/gallery.php
+++ b/pages/gallery.php
@@ -79,7 +79,54 @@ $map = GenerateMap(
weight(3,3,3,4) //Teleports
);
+//ABC's
+$map = GenerateMap(
+ 19, 11, 12 , //width, height, rocks
+ weight(20,21,22,22,23) , //Walls
+ weight(3) , //Checkpoints
+ weight(0) //Teleports
+);
+
+//Ultra Complex
+$map = GenerateMap(
+ 18, 16, 12 , //width, height, rocks
+ weight(16,17,18,18) , //Walls
+ weight(5) , //Checkpoints
+ weight(5) //Teleports
+);
+//Tall tall map
+$map = GenerateMap(
+ 18, 14, 20 , //width, height, rocks
+ weight(30) , //Walls
+ weight(1) , //Checkpoints
+ weight(1) //Teleports
+);
+//Thirty
+$map = GenerateMap(
+ 18, 14, 20 , //width, height, rocks
+ weight(30) , //Walls
+ weight(1) , //Checkpoints
+ weight(1) //Teleports
+);
+//Simple
+$map = GenerateMap(
+ 18, 9, 7 , //width, height, rocks
+ weight(15,16,17) , //Walls
+ weight(0) , //Checkpoints
+ weight(0) //Teleports
+);
+//huge
+$map = GenerateMap(
+ 75, 20, 7 , //width, height, rocks
+ weight(100) , //Walls
+ weight(5) , //Checkpoints
+ weight(4) //Teleports
+);
+$a[0] = 't';
+$a[1] = 't';
+$a['1'] = 'hi';
+echo $a[1];
$mapdisplay = DisplayMap($map);
$code = GenerateMapCode($map);