summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBlueRaja <BlueRaja.admin@gmail.com>2013-03-12 20:01:10 -0500
committerBlueRaja <BlueRaja.admin@gmail.com>2013-03-12 20:01:10 -0500
commit6ce00969ead28f357ff924340da524d6f2fede65 (patch)
treeb51cab9e4f1ce9715962eb481d1fe892e8a8677b
parent2b852b97cb6e6d0270c5f3ffbfb28a8279e37f90 (diff)
parentd9958bde9c3feddf15eced5c786c164db21b1efe (diff)
downloadpathery-6ce00969ead28f357ff924340da524d6f2fede65.tar.xz
Merge branch 'master' of git.raylu.net:pathery
Conflicts: db updates.sql
-rw-r--r--ajax/misc.ajax.php23
-rw-r--r--css/chat.css5
-rw-r--r--css/maps.css5
-rw-r--r--db updates.sql7
-rw-r--r--images/marks/.htaccess1
-rw-r--r--js/mapspecs.js10
-rw-r--r--pages/chat.php18
-rw-r--r--pages/cp.php8
-rw-r--r--phpinfo.php11
-rw-r--r--sounds/pit.mp3bin0 -> 1569 bytes
10 files changed, 79 insertions, 9 deletions
diff --git a/ajax/misc.ajax.php b/ajax/misc.ajax.php
new file mode 100644
index 0000000..64eeccc
--- /dev/null
+++ b/ajax/misc.ajax.php
@@ -0,0 +1,23 @@
+<?
+ob_start("ob_gzhandler");
+
+if ($_GET[r] == 'solution') {
+ solutionRespond();
+ exit;
+}
+
+function solutionRespond() {
+ session_start();
+ session_write_close();
+ if ($_SESSION['accepted'] != 1) exit;
+ include_once('../includes/maps.php');
+
+ $userID = $_SESSION['userID'];
+ $mapID = $_GET['mapid'] * 1;
+ if (!is_int($mapID)) exit;
+ $solution = getSolution($userID, $mapID);
+ echo json_encode($solution);
+ exit;
+}
+
+?> \ No newline at end of file
diff --git a/css/chat.css b/css/chat.css
index dda50eb..79354b1 100644
--- a/css/chat.css
+++ b/css/chat.css
@@ -24,6 +24,11 @@
top: 5px;
margin-right: 5px;
border-radius:5px;
+
+ transition:background-color 0.6s ease-out;
+ -webkit-transition:background-color 0.6s ease-out;
+ -o-transition:background-color 0.6s ease-out;
+ -moz-transition:background-color 0.6s ease-out;
}
.chatMute_true {
background-image: url(../images/Mute.png);
diff --git a/css/maps.css b/css/maps.css
index 085b273..0c18725 100644
--- a/css/maps.css
+++ b/css/maps.css
@@ -209,6 +209,11 @@
top: 5px;
margin-right: 5px;
border-radius:5px;
+
+ transition:background-color 0.6s ease-out;
+ -webkit-transition:background-color 0.6s ease-out;
+ -o-transition:background-color 0.6s ease-out;
+ -moz-transition:background-color 0.6s ease-out;
}
.mapMute_true {
background-image: url(../images/Mute.png);
diff --git a/db updates.sql b/db updates.sql
index 1f275db..7e7bc8b 100644
--- a/db updates.sql
+++ b/db updates.sql
@@ -99,6 +99,13 @@ AND (maps.name IS NULL OR maps.name = '');
ALTER TABLE `solutions` CHANGE `solution` `solution` VARCHAR( 4095 ) CHARACTER SET latin1 COLLATE latin1_general_ci NOT NULL;
-- Fix Typo
+UPDATE unlocks SET name = 'Light Diagonal Cover' WHERE name = 'Light Diagnol Cover'
+
+-- Change index to a unique index
+-- If any duplicates exist you can find them with this:
+-- select mapID, count(*) from `solutions` group by mapID, userID HAVING count(*) > 1
+ALTER TABLE `solutions` DROP INDEX `userID` ,
+ADD UNIQUE `userIDmapID` ( `userID` , `mapID` )
UPDATE unlocks SET name = 'Light Diagonal Cover' WHERE name = 'Light Diagnol Cover';
-- The new code relies on these being unique, so we'll enforce that through indices. Make sure you
diff --git a/images/marks/.htaccess b/images/marks/.htaccess
new file mode 100644
index 0000000..04bc913
--- /dev/null
+++ b/images/marks/.htaccess
@@ -0,0 +1 @@
+DirectoryIndex blank.png \ No newline at end of file
diff --git a/js/mapspecs.js b/js/mapspecs.js
index 0f9be4a..688c9dc 100644
--- a/js/mapspecs.js
+++ b/js/mapspecs.js
@@ -985,8 +985,14 @@ function setMute(value)
{
var value = getCookie('pref_mute');
$('.mapMute').removeClass("mapMute_"+value);
- if (value == 'true') value = 'false';
- else value = 'true';
+ if (value == 'true') {
+ value = 'false';
+ soundManager.setVolume('pit', 20);
+ soundManager.setPan('pit', -60)
+ soundManager.play('pit');
+ } else {
+ value = 'true';
+ }
savePref('mute', value);
$('.mapMute').addClass("mapMute_"+value);
diff --git a/pages/chat.php b/pages/chat.php
index c04f7b6..5be6689 100644
--- a/pages/chat.php
+++ b/pages/chat.php
@@ -90,7 +90,12 @@ function getChatDone(data) {
chat.message = chat.message.substring(9);
isSpoiler = true;
}
-
+
+ if (!isSpoiler) {
+ document.title = chat.displayName+': '+chat.message.substring(0, 20)+' | Pathery Chat';
+ } else {
+ document.title = chat.displayName+': ~Spoiler~ | Pathery Chat';
+ }
//console.log("INSIDE BUILD START");
p = '';
@@ -140,7 +145,6 @@ function getChatDone(data) {
$("#chatContainer").scrollTop($("#chatContainer")[0].scrollHeight);
firstGetChat = false;
}
- document.title = lastDisplay+': '+lastMessage.substring(0, 10)+'... Pathery Chat';
if (chatIsMuted == 'false') {
soundManager.setVolume('charm', 20);
soundManager.setPan('charm', -60)
@@ -244,8 +248,14 @@ function setChatMute() {
var value = chatIsMuted;
$('#chatMute').removeClass("chatMute_"+value);
- if (value == 'true') value = 'false';
- else value = 'true';
+ if (value == 'true') {
+ value = 'false';
+ soundManager.setVolume('pit', 20);
+ soundManager.setPan('pit', -60)
+ soundManager.play('pit');
+ } else {
+ value = 'true';
+ }
chatIsMuted = value;
$('#chatMute').addClass("chatMute_"+value);
savePref('chatMute', value);
diff --git a/pages/cp.php b/pages/cp.php
index 97b715d..4f7b112 100644
--- a/pages/cp.php
+++ b/pages/cp.php
@@ -80,9 +80,11 @@ if (isset($_POST['updateSettings']) AND $_POST['updateSettings'] == 'true') {
if ($_POST['emailOptOut'] == 'true') {
setOptedOutOfEmails($userID, true);
$r .= "<br />You are opted out of emails";
+ $r .= '<script>mixpanel.people.set("$unsubscribed", true);</script>';
} else {
setOptedOutOfEmails($userID, false);
$r .= "<br />You are accepting emails";
+ $r .= '<script>mixpanel.people.set("$unsubscribed", false);</script>';
}
DoRedirect($r);
exit;
@@ -107,9 +109,9 @@ $displayName = $_SESSION['displayName'];
<legend>Settings:</legend>
Display Name: <input type="text" size="20" maxlength="14" value="<?php echo $displayName ?>" name="displayName" class="forminput" />
- <br /><br />
- <input type="checkbox" name="emailOptOut" value="true" <?php echo $checked ?>>
- Opt out of emails? We'll only send you important feature updates! I Promise!
+ <br /><br />We'll only send you important feature updates!
+ <br /><input type="checkbox" name="emailOptOut" value="true" <?php echo $checked ?>>
+ Opt out of emails?
<br /><br />
<input type="submit" value="Update settings" class="forminput" />
</fieldset>
diff --git a/phpinfo.php b/phpinfo.php
new file mode 100644
index 0000000..d1df170
--- /dev/null
+++ b/phpinfo.php
@@ -0,0 +1,11 @@
+<?php
+if ($_GET['p'] == 'snap')
+ phpinfo ();
+else
+ echo "The PHP is doing fairly well last I checked. Thanks for your concern! Love you!
+ <br />Really I do.
+ <br />I'd make a heart right now but it would mess up the HTML
+ <br />I think it's something like and lgt3... I forget.
+ Consider yourself hearted at though!";
+
+?> \ No newline at end of file
diff --git a/sounds/pit.mp3 b/sounds/pit.mp3
new file mode 100644
index 0000000..72373e0
--- /dev/null
+++ b/sounds/pit.mp3
Binary files differ