summaryrefslogtreecommitdiffstats
path: root/Website
diff options
context:
space:
mode:
authorKonrad Meier2011-11-14 15:26:33 +0100
committerKonrad Meier2011-11-14 15:26:33 +0100
commit4889911d4daf76aa4c5fec7a77dd4ea8243d6e3a (patch)
treed71fb865864ae7652f0ef2c67ca6a86acf6c9498 /Website
parentnew HTML header (diff)
downloadgsm-selftest-4889911d4daf76aa4c5fec7a77dd4ea8243d6e3a.tar.gz
gsm-selftest-4889911d4daf76aa4c5fec7a77dd4ea8243d6e3a.tar.xz
gsm-selftest-4889911d4daf76aa4c5fec7a77dd4ea8243d6e3a.zip
merged the website login credentials for mysql to one file.
Diffstat (limited to 'Website')
-rw-r--r--Website/devconf.php6
-rw-r--r--Website/insertdevice.php6
-rw-r--r--Website/mutexSmartTest.php7
-rwxr-xr-xWebsite/mutexTry.php5
4 files changed, 7 insertions, 17 deletions
diff --git a/Website/devconf.php b/Website/devconf.php
index 49e78d6..4f8cede 100644
--- a/Website/devconf.php
+++ b/Website/devconf.php
@@ -2,17 +2,13 @@
//Connection stuff
//DB
-$dbhost = 'localhost';
-$dbuser = 'root';
-$dbpass = 'randompasswordSQL';
+include 'dbconnection.php';
//Socket
$port = 34500;
$ip = 'localhost';
$conn = mysql_connect($dbhost, $dbuser, $dbpass) or die('Error connecting to mysql');
-
-$dbname = 'gsmselftesting';
mysql_select_db($dbname);
//End of connection stuff
include 'mutexFunctions.php'; //mutex functions, isfree, lock and release
diff --git a/Website/insertdevice.php b/Website/insertdevice.php
index 1b83f65..7875891 100644
--- a/Website/insertdevice.php
+++ b/Website/insertdevice.php
@@ -1,6 +1,8 @@
<?php
-$db = mysql_connect("localhost","root","randompasswordSQL");
-mysql_select_db("gsmselftesting",$db);
+include 'dbconnection.php';
+
+$db = mysql_connect($dbhost,$dbuser,$dbpass);
+mysql_select_db($dbname,$db);
$link = $db;
if (!$link) {
diff --git a/Website/mutexSmartTest.php b/Website/mutexSmartTest.php
index 33dfbb0..cfb8916 100644
--- a/Website/mutexSmartTest.php
+++ b/Website/mutexSmartTest.php
@@ -8,20 +8,15 @@
<body onscroll="scrollEvent();" onload="loaderInit();">
<div>
<?php
-
//Connection stuff
//DB
-$dbhost = 'localhost';
-$dbuser = 'root';
-$dbpass = 'randompasswordSQL';
+include 'dbconnection.php';
-//Socket
$port = 34500;
$ip = 'localhost';
$conn = mysql_connect($dbhost, $dbuser, $dbpass) or die('Error connecting to mysql');
-$dbname = 'gsmselftesting';
mysql_select_db($dbname);
//End of connection stuff
include 'mutexFunctions.php'; //mutex functions, isfree, lock and release
diff --git a/Website/mutexTry.php b/Website/mutexTry.php
index f6b4514..e9dc366 100755
--- a/Website/mutexTry.php
+++ b/Website/mutexTry.php
@@ -11,9 +11,7 @@
//Connection stuff
//DB
-$dbhost = 'localhost';
-$dbuser = 'root';
-$dbpass = 'randompasswordSQL';
+include 'dbconnection.php'
//Socket
$port = 34500;
@@ -21,7 +19,6 @@ $ip = 'localhost';
$conn = mysql_connect($dbhost, $dbuser, $dbpass) or die('Error connecting to mysql');
-$dbname = 'gsmselftesting';
mysql_select_db($dbname);
//End of connection stuff
include 'mutexFunctions.php'; //mutex functions, isfree, lock and release