From cf4af138b16da878404cf3319d5d988dacee198a Mon Sep 17 00:00:00 2001 From: raylu Date: Sat, 5 Nov 2011 03:04:49 -0700 Subject: new layout --- css/maps.css | 390 +++++++++++++++++++++++++++++++++++++++++++++++++ css/mapstyle.css | 397 -------------------------------------------------- css/page.css | 119 +++++++++++++++ css/pagestyle.css | 62 -------- css/stats.css | 32 ++++ css/statsstyle.css | 25 ---- errors.php | 8 +- globe.php | 2 +- includes/datas.php | 53 ++++++- includes/db.inc.php | 11 +- includes/header.php | 62 ++++---- includes/maps.php | 2 +- js/mapspecs.js | 48 +----- pages/about.php | 41 +++--- pages/admin.php | 8 +- pages/faq.php | 31 ++-- pages/home.php | 179 ++++++++--------------- pages/howtoplay.php | 165 ++++++++++++--------- pages/leaderboard.php | 39 ++--- 19 files changed, 845 insertions(+), 829 deletions(-) create mode 100644 css/maps.css delete mode 100644 css/mapstyle.css create mode 100644 css/page.css delete mode 100644 css/pagestyle.css create mode 100644 css/stats.css delete mode 100644 css/statsstyle.css diff --git a/css/maps.css b/css/maps.css new file mode 100644 index 0000000..035672a --- /dev/null +++ b/css/maps.css @@ -0,0 +1,390 @@ +.grid_dsp_data { + padding:1px; + font-weight:bold; +} + +.grid_outer { + position:relative; + padding: 2px 0 1px; + margin: 0 auto; + background-color: #334; + border-radius: 2px; + box-shadow: 0 0 2px #777; +} +.grid_outer a +{ + color: #FFFF33; +} + + + +.dsp_60 { + width:60%; +} +.dsp_49 { + width:49%; +} +.dsp_33 { + width:32%; +} +.dsp_24 { + width:23%; +} +.dsp_16 { + width:16%; +} + +.grid_dsp_left, +.grid_dsp_mid, +.grid_dsp_right { + overflow: hidden; + white-space: nowrap; + position: relative; + float: left; + padding:2px; + color: #FFFFFF; +} +.grid_dsp_left { + text-align:left; +} +.grid_dsp_mid { + text-align:center; +} +.grid_dsp_right { + text-align:right; +} + +.grid_img { + padding: 0px; + margin: 0px; + border: 0px; + border-spacing: 0px; + width: 36px; + height: 35px; +} + + +.grid_table +{ + position:relative; + padding: 0px; + margin-top:1px; + margin-bottom:1px; + margin-left:auto; + margin-right:auto; + border-top: 0px solid #000; + border-left: 0px solid #000; + border: 1px solid #000; + border-spacing: 0px; +} +.grid_table td, .grid_table th { + padding: 0px; + margin: 0px; +} +.grid_td, +.grid_td_rocks, .grid_td_gray, .grid_td_path, .grid_td_blanks, .grid_td_walls, +.grid_td_start, .grid_td_finish, +.grid_td_cpa, .grid_td_cpb, .grid_td_cpc, +.grid_td_cpd, .grid_td_cpe, +.grid_td_animate, .grid_td_animate_pre, +.grid_td_tp1_in, .grid_td_tp2_in, .grid_td_tp3_in, .grid_td_tp4_in, .grid_td_tp5_in, +.grid_td_tp1_out, .grid_td_tp2_out, .grid_td_tp3_out, .grid_td_tp4_out,.grid_td_tp5_out, +.grid_td_path1 , .grid_td_path2, .grid_td_path3, .grid_td_path4 +{ + padding: 0px; + margin: 0px; + border: 0px; + border-right: 0px solid #000; + border-bottom: 0px solid #000; + + overflow: hidden; + font-size: 4px; + line-height:9px; + width: 35px; + /* width: 22px; */ + height: 35px; + min-height: 1px; + background: url(../images/OverlayTileFaceted50b.png); + background-size: 100%; + transition:background-color 0s; + -webkit-transition:background-color 0s; + -o-transition:background-color 0s; + -moz-transition:background-color 0s; +} +.grid_td +{ + background: #F5FBFE url(../images/OverlayTile10.png); +} +.grid_td:hover +{ + background: #CCCCCC url(../images/OverlayTileFaceted10.png); +} +.grid_td_pressed { + background: #111122; +} + +.grid_td_rocks { + background: #b85555 url(../images/OverlayTileFaceted50b.png); +} +.grid_td_gray { + background: #CCCCCC url(../images/OverlayTileFaceted50b.png); +} +.grid_td_path { + background: #FFFFEE url(../images/OverlayTeleport.png); +} + +.grid_td_blanks { + background: inherit; +} +.grid_td_walls { + background-color: #666666; + background: url(../images/OverlayTileFaceted50b.png); + transition:background-color 1.6s ease-out; + -webkit-transition:background-color 1.6s ease-out; + -o-transition:background-color 1.6s ease-out; + -moz-transition:background-color 1.6s ease-out; +} +.grid_td_walls:hover { + background: #CCCCCC url(../images/OverlayTileFaceted30.png); + background-color: #999; +} + +.grid_td_start { + background: url(../images/OverlayStart50b.png); + background-color: #FFF; +} +.grid_td_finish { + background: url(../images/OverlayFinish50c.png); + background-color: #666666; + color: #fff; +} + + +.grid_td_tp1_in, .grid_td_tp2_in, .grid_td_tp3_in, .grid_td_tp4_in, .grid_td_tp5_in, +.grid_td_tp1_out, .grid_td_tp2_out,.grid_td_tp3_out, .grid_td_tp4_out,.grid_td_tp5_out, +.grid_td_cpa, .grid_td_cpb, .grid_td_cpc, .grid_td_cpd, .grid_td_cpe +{ + transition:background-color 2s; + -webkit-transition:background-color2s; + -o-transition:background-color 2s; + -moz-transition:background-color 2s; +} + +.no_transition { + transition:background-color 0s; + -webkit-transition:background-color 0s; + -o-transition:background-color 0s; + -moz-transition:background-color 0s; +} + + + +.grid_td_tp1_in { + /* background: url(../images/OverlayTeleport.png),url(../images/TeleportInAni.gif); */ + background: url(../images/TeleportInW.png); + background-color: #3377AA; +} +.grid_td_tp1_out { + /* background: url(../images/OverlayTeleport.png),url(../images/TeleportInAni.gif); */ + background: url(../images/TeleportOutW.png); + background-color: #3377AA; +} +.grid_td_tp2_in { + /* background: url(../images/OverlayTeleport.png),url(../images/TeleportInAni.gif); */ + background: url(../images/TeleportIn.png); + background-color: #44EE66; +} +.grid_td_tp2_out { + /* background: url(../images/OverlayTeleport.png),url(../images/TeleportOutAni.gif); */ + background: url(../images/TeleportOut.png); + background-color: #44EE66; +} +.grid_td_tp3_in { + /* background: url(../images/OverlayTeleport.png),url(../images/TeleportInAni.gif); */ + background: url(../images/TeleportInW.png); + background-color: #992200; +} +.grid_td_tp3_out { + /* background: url(../images/OverlayTeleport.png),url(../images/TeleportOutAni.gif); */ + background: url(../images/TeleportOutW.png); + background-color: #992200; +} +.grid_td_tp4_in { + /* background: url(../images/OverlayTeleport.png),url(../images/TeleportInAni.gif); */ + background: url(../images/TeleportIn.png); + background-color: #55CCFF; +} +.grid_td_tp4_out { + /* background: url(../images/OverlayTeleport.png),url(../images/TeleportOutAni.gif); */ + background: url(../images/TeleportOut.png); + background-color: #55CCFF; +} +.grid_td_tp5_in { + /* background: url(../images/OverlayTeleport.png),url(../images/TeleportInAni.gif); */ + background: url(../images/TeleportInW.png); + background-color: #005533; +} +.grid_td_tp5_out { + /* background: url(../images/OverlayTeleport.png),url(../images/TeleportOutAni.gif); */ + background: url(../images/TeleportOutW.png); + background-color: #005533; +} + + + + +.grid_td_cpa { + background: url(../images/OverlayA50.png); + /* For non-fancy letters...*/ + /* background: url(../images/OverlayA50ss.png); */ + background-color: #F777FF; + color: #fff; +} +.grid_td_cpb { + background: url(../images/OverlayB50.png); + /* background: url(../images/OverlayB50ss.png); */ + background-color: #FFFF11; + color: #000; +} +.grid_td_cpc { + background: url(../images/OverlayC50.png); + /* background: url(../images/OverlayC50ss.png); */ + background-color: #FF4466; + color: #fff; +} +.grid_td_cpd{ + background: url(../images/OverlayD50.png); + /* background: url(../images/OverlayC50ss.png); */ + background-color: #ff9911; + color: #fff; +} +.grid_td_cpe { + background: url(../images/OverlayE50.png); + /* background: url(../images/OverlayC50ss.png); */ + background-color: #00FFFF; + color: #fff; +} +.grid_td_animate { + /* background: url(../images/OverlayStart50i.png); */ + background: url(../images/OverlayTile50.png); + background-color: #000055; + color: #0000ff; + transition:background-color 2s ease-out; + -webkit-transition:background-color 2s ease-out; + -o-transition:background-color 2s ease-out; + -moz-transition:background-color 2s ease-out; + +} +.grid_td_animate_pre { + /* background: url(../images/OverlayTile50.png); */ + background: url(../images/Path1.png); + background-color: #77ccff; + color: #00ccff; + transition:background-color 0s; + -webkit-transition:background-color 0s; + -o-transition:background-color 0s; + -moz-transition:background-color 0s; +} +.grid_td_path1 , .grid_td_path2, .grid_td_path3, .grid_td_path4 { + transition:background-color .5s ease-out; + -webkit-transition:background-color .5s ease-out; + -o-transition:background-color .5s ease-out; + -moz-transition:background-color .5s ease-out; +} +.grid_td_path1 { + background: url(../images/Path1.png); +} +.grid_td_path2 { + background: url(../images/Path2.png); +} +.grid_td_path3 { + background: url(../images/Path3.png); +} +.grid_td_path4 { + background: url(../images/Path4.png); +} + + +.mapdisplay, .mapdisplay_up +{ + position:absolute; + width:auto; + height:auto; + box-shadow: 10px 10px 5px #000055; /* Opera */ + -webkit-box-shadow: 10px 10px 5px #000055; /* Safari and Chrome */ + + -webkit-transform: + skew(10deg,10deg) + scale(.3, .3) + translate(-390px, -230px) + rotate(1deg) + rotateX(0deg) + ; + -moz-transform: + skew(10deg,10deg) + scale(.3, .3) + translate(-390px, -230px) + rotate(1deg) + rotateX(0deg) + ; + /* Remember, we need to duplicate all of this with prefix -o- and w/o prefix for opera, ff, netscape. */ + -webkit-transition:-webkit-transform 2s; + -webkit-transition-delay: 0s; + -moz-transition:-webkit-transform 2s; + -moz-transition-delay: 0s; + z-index:1; +} +.mapdisplay_up +{ + + -webkit-transform: + skew(0deg,0deg) + scale(1, 1) + translate(0px, 0px) + rotate(0deg) + rotateX(0deg) + ; + -moz-transform: + skew(0deg,0deg) + scale(1, 1) + translate(0px, 0px) + rotate(0deg) + rotateX(0deg) + ; + -webkit-transition:-webkit-transform 1s; + -moz-transition:-webkit-transform 1s; + z-index:2; +} +.mapdisplay_up:hover { + background:#10e; +} +.mapdisplay:hover { + z-index:3; + background:#10e; +} + +.mapgallery +{ + position:relative; + float: left; + width:auto; + height:700px; + background: #110088; + color: #FFF; +} +.mapgallery a +{ + color: #FFFF33; +} + + +.mapcontainer +{ + border:1px solid #000; + position:relative; + float: left; + width:300px; + height:200px; + background: #220099; +} +.clear { clear: both;} diff --git a/css/mapstyle.css b/css/mapstyle.css deleted file mode 100644 index cfaea48..0000000 --- a/css/mapstyle.css +++ /dev/null @@ -1,397 +0,0 @@ -.grid_dsp_data { - padding:1px; - font-style:italic; - font-weight:bold; -} - -.grid_outer -{ - position:relative; - padding: 0px; - margin-top: 10px; - margin-bottom: 1px; - padding-top:2px; - padding-bottom:1px; - margin-left:auto; - margin-right:auto; - border-top: 1px solid #000; - border-left: 1px solid #000; - border: 0px solid #000; - background-color: #333399; -} -.grid_outer a -{ - color: #FFFF33; -} - - - -.dsp_60 { - width:60%; -} -.dsp_49 { - width:49%; -} -.dsp_33 { - width:32%; -} -.dsp_24 { - width:23%; -} -.dsp_16 { - width:16%; -} - -.grid_dsp_left, -.grid_dsp_mid, -.grid_dsp_right { - overflow: hidden; - position:relative; - float: left; - padding:2px; - color: #FFFFFF; -} -.grid_dsp_left { - text-align:left; -} -.grid_dsp_mid { - text-align:center; -} -.grid_dsp_right { - text-align:right; -} - -.grid_img { - padding: 0px; - margin: 0px; - border: 0px; - border-spacing: 0px; - width: 36px; - height: 35px; -} - - -.grid_table -{ - position:relative; - padding: 0px; - margin-top:1px; - margin-bottom:1px; - margin-left:auto; - margin-right:auto; - border-top: 0px solid #000; - border-left: 0px solid #000; - border: 1px solid #000; - border-spacing: 0px; -} -.grid_table td, .grid_table th { - padding: 0px; - margin: 0px; -} -.grid_td, -.grid_td_rocks, .grid_td_gray, .grid_td_path, .grid_td_blanks, .grid_td_walls, -.grid_td_start, .grid_td_finish, -.grid_td_cpa, .grid_td_cpb, .grid_td_cpc, -.grid_td_cpd, .grid_td_cpe, -.grid_td_animate, .grid_td_animate_pre, -.grid_td_tp1_in, .grid_td_tp2_in, .grid_td_tp3_in, .grid_td_tp4_in, .grid_td_tp5_in, -.grid_td_tp1_out, .grid_td_tp2_out, .grid_td_tp3_out, .grid_td_tp4_out,.grid_td_tp5_out, -.grid_td_path1 , .grid_td_path2, .grid_td_path3, .grid_td_path4 -{ - padding: 0px; - margin: 0px; - border: 0px; - border-right: 0px solid #000; - border-bottom: 0px solid #000; - - overflow: hidden; - font-size: 4px; - line-height:9px; - width: 35px; - /* width: 22px; */ - height: 35px; - min-height: 1px; - background: url(../images/OverlayTileFaceted50b.png); - background-size: 100%; - transition:background-color 0s; - -webkit-transition:background-color 0s; - -o-transition:background-color 0s; - -moz-transition:background-color 0s; -} -.grid_td -{ - background: #F5FBFE url(../images/OverlayTile10.png); -} -.grid_td:hover -{ - background: #CCCCCC url(../images/OverlayTileFaceted10.png); -} -.grid_td_pressed { - background: #111122; -} - -.grid_td_rocks { - background: #b85555 url(../images/OverlayTileFaceted50b.png); -} -.grid_td_gray { - background: #CCCCCC url(../images/OverlayTileFaceted50b.png); -} -.grid_td_path { - background: #FFFFEE url(../images/OverlayTeleport.png); -} - -.grid_td_blanks { - background: inherit; -} -.grid_td_walls { - background-color: #666666; - background: url(../images/OverlayTileFaceted50b.png); - transition:background-color 1.6s ease-out; - -webkit-transition:background-color 1.6s ease-out; - -o-transition:background-color 1.6s ease-out; - -moz-transition:background-color 1.6s ease-out; -} -.grid_td_walls:hover { - background: #CCCCCC url(../images/OverlayTileFaceted30.png); - background-color: #999; -} - -.grid_td_start { - background: url(../images/OverlayStart50b.png); - background-color: #FFF; -} -.grid_td_finish { - background: url(../images/OverlayFinish50c.png); - background-color: #666666; - color: #fff; -} - - -.grid_td_tp1_in, .grid_td_tp2_in, .grid_td_tp3_in, .grid_td_tp4_in, .grid_td_tp5_in, -.grid_td_tp1_out, .grid_td_tp2_out,.grid_td_tp3_out, .grid_td_tp4_out,.grid_td_tp5_out, -.grid_td_cpa, .grid_td_cpb, .grid_td_cpc, .grid_td_cpd, .grid_td_cpe -{ - transition:background-color 2s; - -webkit-transition:background-color2s; - -o-transition:background-color 2s; - -moz-transition:background-color 2s; -} - -.no_transition { - transition:background-color 0s; - -webkit-transition:background-color 0s; - -o-transition:background-color 0s; - -moz-transition:background-color 0s; -} - - - -.grid_td_tp1_in { - /* background: url(../images/OverlayTeleport.png),url(../images/TeleportInAni.gif); */ - background: url(../images/TeleportInW.png); - background-color: #3377AA; -} -.grid_td_tp1_out { - /* background: url(../images/OverlayTeleport.png),url(../images/TeleportInAni.gif); */ - background: url(../images/TeleportOutW.png); - background-color: #3377AA; -} -.grid_td_tp2_in { - /* background: url(../images/OverlayTeleport.png),url(../images/TeleportInAni.gif); */ - background: url(../images/TeleportIn.png); - background-color: #44EE66; -} -.grid_td_tp2_out { - /* background: url(../images/OverlayTeleport.png),url(../images/TeleportOutAni.gif); */ - background: url(../images/TeleportOut.png); - background-color: #44EE66; -} -.grid_td_tp3_in { - /* background: url(../images/OverlayTeleport.png),url(../images/TeleportInAni.gif); */ - background: url(../images/TeleportInW.png); - background-color: #992200; -} -.grid_td_tp3_out { - /* background: url(../images/OverlayTeleport.png),url(../images/TeleportOutAni.gif); */ - background: url(../images/TeleportOutW.png); - background-color: #992200; -} -.grid_td_tp4_in { - /* background: url(../images/OverlayTeleport.png),url(../images/TeleportInAni.gif); */ - background: url(../images/TeleportIn.png); - background-color: #55CCFF; -} -.grid_td_tp4_out { - /* background: url(../images/OverlayTeleport.png),url(../images/TeleportOutAni.gif); */ - background: url(../images/TeleportOut.png); - background-color: #55CCFF; -} -.grid_td_tp5_in { - /* background: url(../images/OverlayTeleport.png),url(../images/TeleportInAni.gif); */ - background: url(../images/TeleportInW.png); - background-color: #005533; -} -.grid_td_tp5_out { - /* background: url(../images/OverlayTeleport.png),url(../images/TeleportOutAni.gif); */ - background: url(../images/TeleportOutW.png); - background-color: #005533; -} - - - - -.grid_td_cpa { - background: url(../images/OverlayA50.png); - /* For non-fancy letters...*/ - /* background: url(../images/OverlayA50ss.png); */ - background-color: #F777FF; - color: #fff; -} -.grid_td_cpb { - background: url(../images/OverlayB50.png); - /* background: url(../images/OverlayB50ss.png); */ - background-color: #FFFF11; - color: #000; -} -.grid_td_cpc { - background: url(../images/OverlayC50.png); - /* background: url(../images/OverlayC50ss.png); */ - background-color: #FF4466; - color: #fff; -} -.grid_td_cpd{ - background: url(../images/OverlayD50.png); - /* background: url(../images/OverlayC50ss.png); */ - background-color: #ff9911; - color: #fff; -} -.grid_td_cpe { - background: url(../images/OverlayE50.png); - /* background: url(../images/OverlayC50ss.png); */ - background-color: #00FFFF; - color: #fff; -} -.grid_td_animate { - /* background: url(../images/OverlayStart50i.png); */ - background: url(../images/OverlayTile50.png); - background-color: #000055; - color: #0000ff; - transition:background-color 2s ease-out; - -webkit-transition:background-color 2s ease-out; - -o-transition:background-color 2s ease-out; - -moz-transition:background-color 2s ease-out; - -} -.grid_td_animate_pre { - /* background: url(../images/OverlayTile50.png); */ - background: url(../images/Path1.png); - background-color: #77ccff; - color: #00ccff; - transition:background-color 0s; - -webkit-transition:background-color 0s; - -o-transition:background-color 0s; - -moz-transition:background-color 0s; -} -.grid_td_path1 , .grid_td_path2, .grid_td_path3, .grid_td_path4 { - transition:background-color .5s ease-out; - -webkit-transition:background-color .5s ease-out; - -o-transition:background-color .5s ease-out; - -moz-transition:background-color .5s ease-out; -} -.grid_td_path1 { - background: url(../images/Path1.png); -} -.grid_td_path2 { - background: url(../images/Path2.png); -} -.grid_td_path3 { - background: url(../images/Path3.png); -} -.grid_td_path4 { - background: url(../images/Path4.png); -} - - -.mapdisplay, .mapdisplay_up -{ - position:absolute; - width:auto; - height:auto; - box-shadow: 10px 10px 5px #000055; /* Opera */ - -webkit-box-shadow: 10px 10px 5px #000055; /* Safari and Chrome */ - - -webkit-transform: - skew(10deg,10deg) - scale(.3, .3) - translate(-390px, -230px) - rotate(1deg) - rotateX(0deg) - ; - -moz-transform: - skew(10deg,10deg) - scale(.3, .3) - translate(-390px, -230px) - rotate(1deg) - rotateX(0deg) - ; - /* Remember, we need to duplicate all of this with prefix -o- and w/o prefix for opera, ff, netscape. */ - -webkit-transition:-webkit-transform 2s; - -webkit-transition-delay: 0s; - -moz-transition:-webkit-transform 2s; - -moz-transition-delay: 0s; - z-index:1; -} -.mapdisplay_up -{ - - -webkit-transform: - skew(0deg,0deg) - scale(1, 1) - translate(0px, 0px) - rotate(0deg) - rotateX(0deg) - ; - -moz-transform: - skew(0deg,0deg) - scale(1, 1) - translate(0px, 0px) - rotate(0deg) - rotateX(0deg) - ; - -webkit-transition:-webkit-transform 1s; - -moz-transition:-webkit-transform 1s; - z-index:2; -} -.mapdisplay_up:hover { - background:#10e; -} -.mapdisplay:hover { - z-index:3; - background:#10e; -} - -.mapgallery -{ - position:relative; - float: left; - width:auto; - height:700px; - background: #110088; - color: #FFF; -} -.mapgallery a -{ - color: #FFFF33; -} - - -.mapcontainer -{ - border:1px solid #000; - position:relative; - float: left; - width:300px; - height:200px; - background: #220099; -} -.clear { clear: both;} diff --git a/css/page.css b/css/page.css new file mode 100644 index 0000000..2689aec --- /dev/null +++ b/css/page.css @@ -0,0 +1,119 @@ +body { + font-size: 16px; + font-family: helvetica, sans-serif; + text-shadow: rgba(0,0,0,.01) 0 0 1px; /* this is definitely not a webkit-specific hack to fix font aliasing */ + background-color: #121212; + color: #ddd; + margin: 0; +} + +p { + margin-top: 0; +} + +form { + display: inline; +} + +a:link, a:visited, a:active { + text-decoration: underline; + color: #FFFFCC; + transition:color .4s ease-out; + -webkit-transition:color .4s ease-out; + -o-transition:color .4s ease-out; + -moz-transition:color .4s ease-out; +} +a:hover { + color: #EEDDBB; + text-decoration: none; + transition:color 0s ease-out; + -webkit-transition:color 0s ease-out; + -o-transition:color 0s ease-out; + -moz-transition:color 0s ease-out; +} + +.wrapper { + width: 900px; + margin: 0 auto; +} + +.float { + float:left; +} +.lfloat { + float:right; +} + +#topbar { + padding: 15px 15px; + margin: 0 auto 40px; + text-align: center; + position: relative; /* for #user */ + min-width: 900px; + background: -moz-linear-gradient(top, #252525, #121212); + background: -webkit-linear-gradient(top, #252525, #121212); +} +#topbar a.nav { + background-color: #222; + margin-right: 15px; + padding: 7px 10px; + border-radius: 5px; + text-decoration: none; + border: 1px solid #333; + box-shadow: 0 0 1px #444; +} +#topbar a.nav.selected, #topbar a.nav:hover { + border: 1px solid #222; + background-color: #2c2c2c; +} +#topbar #user { + position: absolute; + right: 25px; + top: 5px; + text-align: right; +} + +#difficulties { + width: 100%; + text-align: center; + margin-bottom: 25px; +} +#difficulties a { + margin: 0 10px; + color: #ddd; + background-color: #334; + padding: 3px 10px; + border-radius: 5px; + text-decoration: none; + border: 1px solid #446; + box-shadow: 0 0 1px #445; +} +#difficulties a.selected, #difficulties a:hover { + background-color: #446; + border: 1px solid #223; +} + +table.score { + border: 1px solid #777; + background-color: #252530; + color: #ccc; + margin: 40px auto 0; +} +table.score th, table.score td { + padding: 5px; +} +table.score th { + border: 1px solid #777; +} + +#copy { + text-align: center; + margin: 40px auto 0; +} +#copy iframe { + border: none; + width: 95px; + height: 21px; + vertical-align: text-bottom; + overflow: hidden; +} diff --git a/css/pagestyle.css b/css/pagestyle.css deleted file mode 100644 index b882bfe..0000000 --- a/css/pagestyle.css +++ /dev/null @@ -1,62 +0,0 @@ -body { - font-size: 16px; - font-family: cantarell, helvetica, sans-serif; - text-shadow: rgba(0,0,0,.01) 0 0 1px; /* this is definitely not a webkit-specific hack to fix font aliasing */ - background-color: #121212; - color: #ffffff; - - min-width: 800px; - margin: 0; - padding: 6px; -} - -form { - display: inline; -} - -a:link, a:visited, a:active { - text-decoration: underline; - color: #FFFFCC; - transition:color .4s ease-out; - -webkit-transition:color .4s ease-out; - -o-transition:color .4s ease-out; - -moz-transition:color .4s ease-out; -} -a:hover { - color: #EEDDBB; - text-decoration: none; - transition:color 0s ease-out; - -webkit-transition:color 0s ease-out; - -o-transition:color 0s ease-out; - -moz-transition:color 0s ease-out; -} - -.col1 { - float: left; - width: 25%; - min-width: 300px; - padding: 0 25px; -} -.col2 { - float: left; - width: 50%; - margin: 0 auto; -} - -.float { - float:left; -} -.lfloat { - float:right; -} - -.topbar { - background: #002266; - /* - background: #000044 url(../images/OverlayStart50i.png); - height:35px; - */ - width: 95%; - padding: 5px 15px; - margin: 0 auto; -} diff --git a/css/stats.css b/css/stats.css new file mode 100644 index 0000000..c36c1d0 --- /dev/null +++ b/css/stats.css @@ -0,0 +1,32 @@ +.col1 { + float: left; + margin-right: 30px; +} +.col2 { + float: left; + width: 450px; +} +table { + border-collapse: collapse; +} +td, th { + padding: 3px; +} +.lbrow { + background: #000; + transition:background .5s; + -webkit-transition:background .5s; + -o-transition:color .5s; + -moz-transition:color .5s; + cursor: default; +} +.lbrow:hover { + background: #356; + transition:background 0s; + -webkit-transition:background 0s; + -o-transition:color 0s; + -moz-transition:color 0s; +} +.hidden-stats { + display: none; +} diff --git a/css/statsstyle.css b/css/statsstyle.css deleted file mode 100644 index a15636f..0000000 --- a/css/statsstyle.css +++ /dev/null @@ -1,25 +0,0 @@ -table { - border-collapse: collapse; -} -td, th { - padding: 3px; -} -.lbrow { - background: #000000; - transition:background .5s; - -webkit-transition:background .5s; - -o-transition:color .5s; - -moz-transition:color .5s; - cursor: default; -} -.lbrow:hover { - background: #338899; - transition:background 0s; - -webkit-transition:background 0s; - -o-transition:color 0s; - -moz-transition:color 0s; -} -.hidden-stats { - display: none; -} - diff --git a/errors.php b/errors.php index be8a890..1ac48db 100644 --- a/errors.php +++ b/errors.php @@ -1,15 +1,9 @@ $_SERVER[HTTP_REFERER]"; Echo "
Go back to Home"; - - -?> \ No newline at end of file +?> diff --git a/globe.php b/globe.php index 8fb1994..811dbf6 100644 --- a/globe.php +++ b/globe.php @@ -6,7 +6,7 @@ session_start(); //include_once 'db.inc.php'; -$mydomain = "http://www.mazetd.4xg.net"; +$mydomain = "http://pathery.raylu.net"; //https://www.google.com/accounts/o8/id?id=AItOawl4GX29ka40T4ZeuXnR2FVsP4LZWaED_T8 //https%3A%2F%2Fwww.google.com%2Faccounts%2Fo8%2Fid%3Fid%3DAItOawl diff --git a/includes/datas.php b/includes/datas.php index 0d3d0c5..912eea8 100644 --- a/includes/datas.php +++ b/includes/datas.php @@ -1 +1,52 @@ - 0) { $output .= ""; $output .= ""; $output .= ""; $output .= ""; $output .= ""; $output .= ""; $output .= ""; while (list($diff, $display, $moves, $userID) = mysql_fetch_row($result)) { $i++; if ($_SESSION['userID'] == $userID) $output .= ""; else $output .= ""; $output .= ""; $output .= ""; $output .= ""; $output .= ""; //$output .= "$i. $display with $moves moves. In $diff
"; $output .= ""; } $output .= "
RankNameMovesTime taken
$i$display$moves$diff
"; } return $output; } ?> \ No newline at end of file + 0) { + $output .= ""; + $output .= ""; + $output .= ""; + $output .= ""; + $output .= ""; + $output .= ""; + $output .= ""; + while (list($diff, $display, $moves, $userID) = mysql_fetch_row($result)) { + $i++; + if ($_SESSION['userID'] == $userID) + $output .= ""; + else + $output .= ""; + + $output .= ""; + $output .= ""; + $output .= ""; + $output .= ""; + //$output .= "$i. $display with $moves moves. In $diff
"; + $output .= ""; + } + $output .= "
RankNameMovesTime taken
$i$display$moves$diff
"; + } + return $output; +} + +?> diff --git a/includes/db.inc.php b/includes/db.inc.php index 9287ed2..198cf40 100644 --- a/includes/db.inc.php +++ b/includes/db.inc.php @@ -1,12 +1,11 @@ \ No newline at end of file +?> diff --git a/includes/header.php b/includes/header.php index b402025..1e24e8c 100644 --- a/includes/header.php +++ b/includes/header.php @@ -1,6 +1,6 @@ @@ -8,13 +8,22 @@ function htmlHeader() { pathery.com - - - - - + + + "; + } + ?> + + + + +function htmlFooter() { +?> + - - + + +'; + echo '
'; $page = $_GET[page]; if ($page == '') $page = 'home'; - $first = true; foreach ($links as $key => $value) { - if ($first) - $first = false; - else - echo ' | '; if ($page == $key) - echo "$value"; - else - echo "$value"; + $selected = " selected"; + else + $selected = ""; + echo "$value"; } - echo "\t
"; + echo "
"; if ($_SESSION['accepted'] == 1) { - echo "Logged in as $_SESSION[displayName].\n"; - echo "Logout"; + echo "Logged in as $_SESSION[displayName]
"; if ($_SESSION['displayName'] == 'noname') - echo "Update your name"; + echo "Update your name | "; + echo "Logout"; } else - echo "Sign in using Google"; + echo "Sign in with Google"; + echo "
"; - echo "\t
"; echo "
"; } diff --git a/includes/maps.php b/includes/maps.php index a1bbc95..901a946 100644 --- a/includes/maps.php +++ b/includes/maps.php @@ -146,7 +146,7 @@ function DisplayMap($mapMatrix, $idprefix = 1, $style = 'normal', $speed = NULL) $output .= ""; $output .= "
- + diff --git a/js/mapspecs.js b/js/mapspecs.js index 2494800..79e93aa 100644 --- a/js/mapspecs.js +++ b/js/mapspecs.js @@ -23,8 +23,6 @@ var mapjson = new Array(); var htmlscores = ''; function loadSol(sol) { - //alert("Temporary debug"); - //document.getElementById('debug').innerHTML = "
Exe1..."; if (sol == null) if (document.getElementById('mapsol') != undefined) sol = document.getElementById('mapsol').innerHTML; @@ -37,15 +35,12 @@ function loadSol(sol) { clearwalls(mapid); - //document.getElementById('debug').innerHTML += "
"+mapid+','+position[1]; for(var i in position) { - //document.getElementById('debug').innerHTML += "
"+mapid+','+position[i]; if (document.getElementById(mapid+','+position[i]) != undefined) { object = document.getElementById(mapid+','+position[i]); grid_click(object); } - //alert(soldata[i]); } } } @@ -62,7 +57,6 @@ function grid_click(obj) { if (solution[mapid] == undefined) { getmapdata(mapid); } - //alert(obj.cv); //Is this placing a wall, or removing one? if (obj.cv) { @@ -74,14 +68,11 @@ function grid_click(obj) { //IE 7 obj.style.backgroundColor = ''; blocks[mapid]++; - //alert(obj.id); //Remove wall solution[mapid] = solution[mapid].replace('.'+y+','+x+'.', '.'); - //alert(y+','+x+'.'); } else { //Placing a wall if (blocks[mapid] < 1) { - //alert("Outa blocks!"); updateDsp(mapid, 'dspWalls', "OUT!"); //document.getElementById(mapid+',dspWalls').innerHTML = "OUT!"; return; @@ -116,14 +107,11 @@ function updateDsp(mapid, element, data) { } function getmapdata(mapid) { - //alert(typeof(JSON)); if (typeof(JSON) == 'undefined') { - //alert("We're using EVAL instead"); text = document.getElementById(mapid+',mapdata').innerHTML; mapdata[mapid] = !(/[^,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t]/.test(text.replace(/"(\\.|[^"\\])*"/g, ''))) && eval('(' + text + ')'); //mapdata[mapid] = eval(document.getElementById(mapid+',mapdata').innerHTML); } else { - //alert("We're using JSON"); mapdata[mapid] = JSON.parse(document.getElementById(mapid+',mapdata').innerHTML); } @@ -144,35 +132,28 @@ function doSend(mapid) { reqstr = ""; reqstr += "&mapcode="+mapdata[mapid].code; reqstr += "&mapid="+mapid; - //alert (mapdata[mapid].code); reqstr += "&solution="+solution[mapid]; - //alert(reqstr); //document.getElementById('dispdo').innerHTML = "http://mazetd.4xg.net/do.php?r=getpath"+reqstr - //alert("request string:"+reqstr); ajax.requestFile = "do.php?r=getpath"+reqstr; //prepare strdata ajax.onCompletion = request_path_done; // Specify function to be executed on response. ajax.runAJAX();// Do it! } function requestSol(solid) { - //alert("requesting solution id:" + solid); ajax.requestFile = "do.php?r=getsol&solutionid="+solid; //prepare strdata ajax.onCompletion = requestSolDone; // Specify function to be executed on response. ajax.runAJAX();// Do it! } function requestSolDone() { - //alert("request complete"); if (typeof(JSON) == 'undefined') { - //alert("We're using EVAL instead AGAIN."); text = ajax.response; var JO = !(/[^,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t]/.test(text.replace(/"(\\.|[^"\\])*"/g, ''))) && eval('(' + text + ')'); //mapdata[mapid] = eval(document.getElementById(mapid+',mapdata').innerHTML); } else { - //alert("We're using JSON again"); var JO = JSON.parse(ajax.response); } @@ -184,16 +165,13 @@ function clearwalls(mapid) { if (solution[mapid] == undefined) return; walls = solution[mapid].split('.'); for(var i in walls) { - //alert(walls[i]); tmp = walls[i].split(','); eid = mapid+','+tmp[0]+','+tmp[1]; - //alert('eid:'+eid); if (document.getElementById(eid) != undefined) { obj = document.getElementById(eid); obj.setAttribute("class", "grid_td"); obj.style.backgroundColor = ''; obj.cv = false; - //alert("exe"); } } solution[mapid] = undefined; @@ -209,22 +187,18 @@ function resetwalls(mapid) { function request_path_done() { //document.getElementById('mapdisplay').innerHTML = ajax.response; - //alert ("resp: "+ajax.response); //if (ajax.response == undefined) return; if (typeof(JSON) == 'undefined') { - //alert("We're using EVAL instead AGAIN."); text = ajax.response; var JO = !(/[^,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t]/.test(text.replace(/"(\\.|[^"\\])*"/g, ''))) && eval('(' + text + ')'); //mapdata[mapid] = eval(document.getElementById(mapid+',mapdata').innerHTML); } else { - //alert("We're using JSON again"); var JO = JSON.parse(ajax.response); } mapjson[JO.mapid] = JO; - //alert ("resp: "+ajax.response); // if (typeof(JSON) == undefined) { // var JO = eval(ajax.response); // } else { @@ -235,18 +209,16 @@ function request_path_done() { } for(var i in JO.error) { - alert('\n JO error ' + JO.error[i]); + console.error('\n JO error ' + JO.error[i]); } //document.getElementById('disp').innerHTML = JO.map; if (JO.blocked) { - alert("Path is blocked make sure there is a way for it to go!"); + alert("The path is blocked!"); return; } //document.write(JO.map); - //alert ("moves: "+JO.moves); - //alert ("path: "+JO.start); //document.getElementById('disppath').innerHTML = JO.path; //document.getElementById('disptotalmoves').innerHTML = JO.moves; var disptext = "Record: "+JO.best+" by "+JO.bestby; @@ -268,7 +240,6 @@ function animatePath(path, mapid, start) { x = tmp[1]; p = path; - //alert("Begin"); //t = p.length; t = ''; //count[mapid] = 0; @@ -279,9 +250,7 @@ function animatePath(path, mapid, start) { function animatePathDone(mapid) { document.getElementById(mapid+',btn').disabled = false; - //alert("animate done..." + htmlscores); if (htmlscores) { - //alert("showing scores..."); updateDsp(mapid, 'dspScore', htmlscores); htmlscores = ''; } @@ -292,18 +261,14 @@ function animatePathDone(mapid) { function request_scores_done() { - //alert("score request complete"); //Get scores. if (typeof(JSON) == 'undefined') { - //alert("We're using EVAL instead AGAIN."); text = ajax.response; var JO = !(/[^,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t]/.test(text.replace(/"(\\.|[^"\\])*"/g, ''))) && eval('(' + text + ')'); //mapdata[mapid] = eval(document.getElementById(mapid+',mapdata').innerHTML); } else { - //alert("We're using JSON again"); var JO = JSON.parse(ajax.response); } - //alert("scores saveing " + JO.scores); htmlscores = JO.scores; } @@ -332,7 +297,6 @@ function doanimate(x, y, p, c, mapid) { if (count[mapid] == undefined) { count[mapid] = 0; } - //alert("test"); if (snake[mapid] == undefined) { snake[mapid] = new Array(); snake[mapid]['color'] = '#4444bb'; @@ -346,7 +310,7 @@ function doanimate(x, y, p, c, mapid) { eid = mapid+','+x+','+y; //Verify. if (document.getElementById(eid) == undefined) { - alert("Path exited field..?"); + console.error("Path exited field...?"); animatePathDone(mapid); return; } @@ -361,7 +325,6 @@ function doanimate(x, y, p, c, mapid) { // if (origclass == 'grid_td_animate' || origclass == 'grid_td_animate_pre' ) { origclass = handle.classOrigName; //setTimeout(handle.setAttribute('class', origclass), 850); - //alert('ex ' + origclass); } //handle.style.backgroundColor = snake[mapid]['color']; handle.classOrigName = origclass; @@ -391,7 +354,6 @@ function doanimate(x, y, p, c, mapid) { if (checkSound(mapid)) { soundManager.play('charm'); } - //alert("count-hit: "+count[mapid]); //Flash flashelement(mapid+',dspCount', 4); break; @@ -410,7 +372,6 @@ function doanimate(x, y, p, c, mapid) { string = "if (document.getElementById('"+eid+"').className == 'grid_td_path"+c+"') "; string += "document.getElementById('"+eid+"').className = '"+origclass+"';"; - //alert (string); setTimeout(string, 855); //And incase that didn't work... //setTimeout("document.getElementById('"+eid+"').className = '"+origclass+"'", 7500); @@ -419,7 +380,6 @@ function doanimate(x, y, p, c, mapid) { if (handle.pressed == true) { setTimeout("document.getElementById('"+eid+"').style.backgroundColor = '#dddddd';", 865); } else { - //alert(eid); setTimeout("document.getElementById('"+eid+"').style.backgroundColor = '';", 865); } @@ -616,7 +576,6 @@ function doanimate(x, y, p, c, mapid) { //soundManager.play('002'); //soundManager.play('003'); } - //alert(tpEid); document.getElementById(eid).style.backgroundColor='#CCCCCC'; document.getElementById(tpEid).style.backgroundColor='#CCCCCC'; //flashelement(eid, 7); @@ -639,7 +598,6 @@ function doanimate(x, y, p, c, mapid) { } function flashelement(eid, times, color, speed) { - //alert("exe"+eid); if (document.getElementById(eid) == undefined) return; if (!color) { color = "#FFFF44"; diff --git a/pages/about.php b/pages/about.php index eb1ada8..4328014 100644 --- a/pages/about.php +++ b/pages/about.php @@ -5,28 +5,25 @@ htmlHeader(); "; -echo "
"; - ?> -
-
Email us: snapems@gmail.com -
-

Created by:

Patrick Davison and Rex Ounekeo -
-

Special thanks:

-

Programmers:

-raylu -

Testers:

-Steven Gosling -
Patrick's Family -
Josh -
Rory Matthias Quentin Maison -
Matt -
-
+
+ Email us: snapems@gmail.com +
+

Created by:

+ Patrick Davison (Snap) and Rex Ounekeo + +

Special thanks:

+

Programmers:

+ raylu +

Testers:

+ Steven Gosling +
Patrick's Family +
Josh +
Rory Matthias Quentin Maison +
Matt +
- - + diff --git a/pages/admin.php b/pages/admin.php index b4e53be..d825ebc 100644 --- a/pages/admin.php +++ b/pages/admin.php @@ -1,4 +1,4 @@ - @@ -225,9 +225,5 @@ function createThumbnail($mapMatrix, $idprefix, $width, $height) { return $output; } - - - +htmlFooter(); ?> - - diff --git a/pages/faq.php b/pages/faq.php index 9bac845..302a7f8 100644 --- a/pages/faq.php +++ b/pages/faq.php @@ -1,43 +1,32 @@ - +

Questions and Answers


Can you explain how the pathing works?

-The pathing trys to find the best route possible. +The pathing tries to find the best route possible. In open areas there's lots of identical paths for it to take; To choose which path it will go it follows these priorities: UP, RIGHT, DOWN, LEFT. -This means that the path will go UP as far as it can first- then, right, down, left. +This means that the path will go UP as far as it can first – then right, down, left.
If the path is going to the TOP RIGHT from the BOTTOM LEFT, the path will go UP all the way to the top, then RIGHT.
If the path is going to the BOTTOM LEFT, from the TOP RIGHT, the path will go all the way DOWN and then LEFT.
TOP LEFT, from BOTTOM RIGHT, UP, then LEFT.
So, BOTTOM LEFT, from TOP RIGHT? If you answer "DOWN then LEFT" you are correct! -
If you answered "uhhmm.. What's up with the directions in caps." then you get a bonus point! -
Remember, teleports are Traps, and does not effect the path choice. -
-
-

Why use Google to sign in?

-'OpenID' allows websites to use 3rd party servers to identify you. -
We ask Google for your E-mail address, which you have to approve. -
Basically, we send you to Google, and ask who you are, (You're not a robot, right?) -
Google responds saying they know you, and gives me a code to identify you with, if you login again. -
Many sites have started adopting this method of registration/login due to the safety it provides, -not just for me, but for YOU. -
There's no chance I can leak a password, because I never recieve one. - Plus you don't have to make up/remember another password. - - +
If you answered "uhhmm.. what's up with the directions in caps?" then you get a bonus point! +
Remember, teleports are traps and do not effect the path choice. +
- - - \ No newline at end of file + diff --git a/pages/home.php b/pages/home.php index 8bd7d11..044fc5f 100644 --- a/pages/home.php +++ b/pages/home.php @@ -1,10 +1,8 @@ - - Simple'; +$normal = 'Normal'; +$hard = 'Complex'; -$today = date('l'); -//if ($today == 'Sunday' OR $today == 'Saturday') - //$today = 'Weekend Map'; -//else - $today .= "'s"; -$special = "$today $mapstyle"; +$today = date('l') . "'s"; +$special = "$today $mapstyle"; switch ($_GET['maptype']) { + case "easy": + case "1": + default: + $maptype = 1; + $easy = 'Simple'; + break; case "normal": case "2": - $maptype = 2; - $normal = 'Normal'; - break; - + $maptype = 2; + $normal = 'Normal'; + break; case "hard": case "3": - $maptype = 3; - $hard = 'Complex'; - break; - + $maptype = 3; + $hard = 'Complex'; + break; case "day": case "4": - $maptype = 4; - $special = "$special"; - break; - - case "easy": - case "1": - default: - $maptype = 1; - $easy = 'Simple'; + $maptype = 4; + $special = "$today $mapstyle"; + break; } //$motd = getMapOfTheDay(); @@ -83,7 +75,6 @@ topbar($Links); $mapID = $motd['id']; $map = $motd['map']; $userID = $_SESSION['userID']; -$date = date("m-d-y"); //$mergesolution = mergeMapSolution($map, $mysolution); $topscores = topScores($motd['id'], 30); $topscorediv = "
\n$topscores\n
"; @@ -91,89 +82,39 @@ $mergesolution = $map; ?> -
- - -
-

- News:
- We've moved to pathery.com (look up, you're already there)! You'll need to re-login with Google. -
Don't worry – we've saved all your solutions and history (soon you'll even be able to see them! hehe). -

-

Maps for : -
-
-
-
-

-

- New maps are generated daily at 9:00 PM Pacific Time. -
-

- - -
- -
- - New? Check out How to Play -
- The object of the game is to make the longest maze. -
Sign in using Google to have your best solution saved. +
"; - + echo "
"; + echo "$easy"; + echo "$normal"; + echo "$hard"; + echo "$special"; + echo "
"; - -echo "
$date
$easy | "; -echo "$normal | "; -echo "$hard | "; -echo "$special"; + echo DisplayMap($mergesolution, $mapID); + $mysolution = getSolution($userID, $mapID); + $solutiondiv .= "'; -echo DisplayMap($mergesolution, $mapID); - -$mysolution = getSolution($userID, $mapID); -$solutiondiv .= " - +
+ + Copyright © 2011 pathery.com +
+ + - - + diff --git a/pages/howtoplay.php b/pages/howtoplay.php index 294e89f..bfad879 100644 --- a/pages/howtoplay.php +++ b/pages/howtoplay.php @@ -1,5 +1,5 @@ - @@ -29,74 +29,99 @@ $tpmap = displaymap(GenerateMapByCode($tpcode), 3, 'example'); ?> -

Tutorial

-

-
The object of the game is to make the longest maze. -
The "Snake" (name pending) must go to all the checkpoints. -
It starts from the red arrows: -
-and goes to the blue arrows: -
-
Build a maze by clicking to place blocks. You can remove a block by clicking it again. -
It must be able to make it through your maze, so no walling completely! -
Try it: -

- +
+ + -

-

Checkpoints:

- - - - - - - - -
-

-The path must reach all these (if they exist) before going to finish. Try it: - -

- + + -
-
-
Tip: - Try to combine odd-letters with each other; -
I.E. If A, B, C exist, try to make a box around A and C, then maze the entrance to the box. -
This way, the path enters the box for A, leaves for B, returns for C, and leaves for the exit. -This would make the path go through your maze 4 times! -

-

Teleports:

- - - - - - - - - - - -
Teleport 1:
Teleport 2:
-

-
Teleport tiles are traps. When the path goes across the "IN" tile, it gets thrown to the "OUT" tile. -
The path will not avoid teleports. Check this example out: -

- + + -
-
-Implementing a teleport into your maze can have a big impact. -

- -

That should be enough information to get you started. -
Now go try it out! -

-
-
-
- - - + +
+ + + + diff --git a/pages/leaderboard.php b/pages/leaderboard.php index c8f03b8..290f23b 100644 --- a/pages/leaderboard.php +++ b/pages/leaderboard.php @@ -1,11 +1,10 @@ -
'; - - $tStats = getStat(1); $yStats = getStat(2); @@ -78,18 +74,18 @@ function getStat ($type) { return displayStats($result, $statname); } +?> +
-?> -
-Overall | -Simple | -Normal | -Complex | -Special | -Week/Month + -
@@ -100,7 +96,6 @@ function getStat ($type) {
-
+
+ + -- cgit v1.2.3