From 468e9a700736166f175b974e185d24d0d2a4f33e Mon Sep 17 00:00:00 2001 From: BlueRaja Date: Sun, 13 Jan 2013 00:48:07 -0600 Subject: db.inc.php now only contains the database login info; the actual connection to the DB has been moved to includes/sqlEmbedded. This was done so we don't need to have the db info in two separate files (one of which is in the repo, derp) --- app.php | 2 +- do.php | 4 ++-- globe.php | 4 ++-- includes/datas.php | 4 ++-- includes/mapoftheday.php | 2 +- includes/maps.php | 6 +++--- includes/sqlEmbedded.php | 7 +++++++ includes/sqli.php | 10 +--------- index.php | 2 +- pages/achievements.php | 2 +- pages/admin.php | 2 +- pages/challenge.php | 2 +- pages/challengelist.php | 2 +- pages/cp.php | 2 +- pages/feedback.php | 2 +- pages/gallery.php | 2 +- pages/home.php | 2 +- pages/leaderboard.php | 2 +- pages/login.php | 2 +- pages/massemail.php | 4 ++-- pages/memberlist.php | 2 +- pages/tutorial.php | 2 +- 22 files changed, 34 insertions(+), 35 deletions(-) create mode 100644 includes/sqlEmbedded.php diff --git a/app.php b/app.php index d799a97..7f0ab30 100644 --- a/app.php +++ b/app.php @@ -1,7 +1,7 @@ \ No newline at end of file + \ No newline at end of file diff --git a/includes/maps.php b/includes/maps.php index 6a831c8..03bcd81 100644 --- a/includes/maps.php +++ b/includes/maps.php @@ -769,7 +769,7 @@ function formSolution($solution) { //Returns the best solution. function getSolution($userID, $mapID) { - include_once('db.inc.php'); + include_once('sqlEmbedded.php'); $sql = "SELECT `solution`, `moves` FROM `solutions` WHERE `userID` = '$userID' AND @@ -782,7 +782,7 @@ function getSolution($userID, $mapID) { } function getChallengeSolution($userID, $challengeID) { - include_once('db.inc.php'); + include_once('sqlEmbedded.php'); $sql = "SELECT `solution`, `moves` FROM `challengeSolutions` WHERE `userID` = '$userID' AND @@ -795,7 +795,7 @@ function getChallengeSolution($userID, $challengeID) { } function getMapCode($mapID) { - include_once('db.inc.php'); + include_once('sqlEmbedded.php'); $sql = "SELECT `code` FROM `maps` WHERE `ID` = '$mapID' diff --git a/includes/sqlEmbedded.php b/includes/sqlEmbedded.php new file mode 100644 index 0000000..b7a32b5 --- /dev/null +++ b/includes/sqlEmbedded.php @@ -0,0 +1,7 @@ + diff --git a/includes/sqli.php b/includes/sqli.php index 0974380..d19069b 100644 --- a/includes/sqli.php +++ b/includes/sqli.php @@ -1,12 +1,4 @@ \ No newline at end of file diff --git a/index.php b/index.php index 4a69a4e..88172e3 100644 --- a/index.php +++ b/index.php @@ -27,7 +27,7 @@ if (isset($_SESSION['accepted']) AND $_SESSION['accepted'] == 1) //TODO: We could store this data in the session if ($accepted) { $userID = $_SESSION['userID']; - include_once ('./includes/db.inc.php'); + include_once ('./includes/sqlEmbedded.php'); $sql = " SELECT userData.wallColor, diff --git a/pages/achievements.php b/pages/achievements.php index ac7aded..1bb2195 100644 --- a/pages/achievements.php +++ b/pages/achievements.php @@ -7,7 +7,7 @@ htmlHeader(array('profile'), 'Pathery Achievements'); __get('identity'); //I know just where to put this stuff! - require './includes/db.inc.php'; + require './includes/sqlEmbedded.php'; //Unless I already have this information... //* Modify this to WHERE `email` //$sql = "SELECT `ID`, `isAdmin`, `openID`, `displayName` FROM `users` WHERE `email` = '$email'"; diff --git a/pages/massemail.php b/pages/massemail.php index a861500..d45588b 100644 --- a/pages/massemail.php +++ b/pages/massemail.php @@ -6,7 +6,7 @@ htmlHeader(); topbar($Links); include('./includes/datas.php'); -include('./includes/db.inc.php'); +include('./includes/sqlEmbedded.php'); if (isset($_POST['massemail']) AND isset($_SESSION['accepted'])) { @@ -22,7 +22,7 @@ if (isset($_POST['massemail']) AND isset($_SESSION['accepted'])) { if (!is_int($userID)) return; - include_once "includes/db.inc.php"; + include_once "includes/sqlEmbedded.php"; $sql = "SELECT `email` FROM `users` WHERE `ID` = '$userID'"; $result = mysql_query($sql); diff --git a/pages/memberlist.php b/pages/memberlist.php index 22d88b4..3baf456 100644 --- a/pages/memberlist.php +++ b/pages/memberlist.php @@ -13,7 +13,7 @@ htmlHeader( topbar($Links); -include_once ('./includes/db.inc.php'); +include_once ('./includes/sqlEmbedded.php'); include_once ('./includes/datas.php'); diff --git a/pages/tutorial.php b/pages/tutorial.php index 4d2446f..5208a57 100644 --- a/pages/tutorial.php +++ b/pages/tutorial.php @@ -13,7 +13,7 @@ topbar($Links); //TODO: Turn this into a function? if ($accepted) { - include_once ('./includes/db.inc.php'); + include_once ('./includes/sqlEmbedded.php'); $userID = $_SESSION['userID']; $sql = " -- cgit v1.2.3