summaryrefslogtreecommitdiffstats
path: root/includes
diff options
context:
space:
mode:
Diffstat (limited to 'includes')
-rw-r--r--includes/chats.php2
-rw-r--r--includes/datas.php16
-rw-r--r--includes/emails.php2
-rw-r--r--includes/header.php4
-rw-r--r--includes/sqlEmbedded.php3
-rw-r--r--includes/sqli.php4
6 files changed, 23 insertions, 8 deletions
diff --git a/includes/chats.php b/includes/chats.php
index dcd46c9..18d0810 100644
--- a/includes/chats.php
+++ b/includes/chats.php
@@ -2,7 +2,7 @@
/*
* addChat, getChat functions
*/
-include_once('sqli.php');
+include_once('sqlEmbedded.php');
define('CHAT_ROWS_TO_KEEP', 75);
diff --git a/includes/datas.php b/includes/datas.php
index c64edd6..b029375 100644
--- a/includes/datas.php
+++ b/includes/datas.php
@@ -978,4 +978,20 @@ function loadChallengeMapCode($mapIdUnsanitized)
}
return NULL;
}
+
+
+function isCurrentMap($mapID) {
+ include_once('./includes/sqlEmbedded.php');
+ $sql = "SELECT mapID
+ FROM `mapOfTheDay`
+ WHERE `mapID` = '$mapID'
+ AND mapExpireTime > NOW()
+ LIMIT 1
+ ";
+
+ $result = mysql_query($sql) or die(mysql_error());
+ return (mysql_num_rows($result) != 0);
+}
+
+
?>
diff --git a/includes/emails.php b/includes/emails.php
index 182749c..74658ad 100644
--- a/includes/emails.php
+++ b/includes/emails.php
@@ -2,7 +2,7 @@
/*
* Email methods; QueueEmail and SendQueuedEmail
*/
-include_once('sqli.php');
+include_once('sqlEmbedded.php');
//Email sending lock
define('FILE_EMAIL_LOCK', './emailLockFile');
diff --git a/includes/header.php b/includes/header.php
index c18ae2e..7d9c02d 100644
--- a/includes/header.php
+++ b/includes/header.php
@@ -155,7 +155,7 @@ function htmlFooter() {
function topbar($links) {
global $accepted, $wallColor, $wallEmblem, $request;
- echo '<div id="topbar">';
+ echo '<div id="topbar"><div id="topbarContent">';
foreach ($links as $key => $value) {
if ($request == $key) {
@@ -199,7 +199,7 @@ function topbar($links) {
<?
}
echo " </div>";
- echo "</div><div class='topbarSpacer'></div>"; //div id='user'
+ echo "</div></div><div class='topbarSpacer'></div>"; //div id='user'
}
function userDataToJS() {
diff --git a/includes/sqlEmbedded.php b/includes/sqlEmbedded.php
index b7a32b5..64fa5c5 100644
--- a/includes/sqlEmbedded.php
+++ b/includes/sqlEmbedded.php
@@ -1,6 +1,9 @@
<?php
include_once('db.inc.php');
+global $mysqli;
+$mysqli = @mysqli_connect($db_host, $db_user, $db_pass, $db_name) or die("SQLI Failed to connect to database");
+
global $mysqlid;
$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/includes/sqli.php b/includes/sqli.php
deleted file mode 100644
index d19069b..0000000
--- a/includes/sqli.php
+++ /dev/null
@@ -1,4 +0,0 @@
-<?php
-include_once('db.inc.php');
-$mysqli = mysqli_connect($db_host, $db_user, $db_pass, $db_name) or die("Failed to connect to database");
-?> \ No newline at end of file