summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorarun <arun@nubati.net>2006-12-12 11:34:09 +0000
committerarun <arun>2006-12-12 11:34:09 +0000
commit320ebe96e21e08d5fad1a4ccbef241d5defd92bc (patch)
tree3a6424b165811b0c823f1b8b1dff6c5de608bfba
parent6af8e19b862bc37a5a34239d53953d9dc5786d7c (diff)
downloade-DoKo-320ebe96e21e08d5fad1a4ccbef241d5defd92bc.tar.gz
e-DoKo-320ebe96e21e08d5fad1a4ccbef241d5defd92bc.tar.bz2
e-DoKo-320ebe96e21e08d5fad1a4ccbef241d5defd92bc.zip
added a config file (not under VC)
-rw-r--r--db.php6
-rw-r--r--functions.php16
-rw-r--r--index.php3
3 files changed, 5 insertions, 20 deletions
diff --git a/db.php b/db.php
index bf82544..7f44350 100644
--- a/db.php
+++ b/db.php
@@ -6,9 +6,9 @@
function DB_open()
{
- global $DB;
- if ( $DB = mysql_connect('mysql.nubati.net','doko', '$DoKo#.') )
- mysql_select_db('dokodb') or die('Could not select database');
+ global $DB,$DB_user,$DB_host,$DB_database,$DB_password;
+ if ( $DB = mysql_connect($DB_host,$DB_user, $DB_password) )
+ mysql_select_db($DB_database) or die('Could not select database');
else
die (mysql_error());
diff --git a/functions.php b/functions.php
index 0168ce3..abf2b82 100644
--- a/functions.php
+++ b/functions.php
@@ -1,21 +1,5 @@
<?php
-/*
- * config
- */
-
-$host = "http://doko.nubati.net/database/index.php";
-$wiki = "http://wiki.nubati.net/index.php?title=EmailDoko";
-$debug = 0;
-
-$last=-2;
-
-/*
- * end config
- */
-
-
-/* helper function */
function mymail($To,$Subject,$message)
{
global $debug;
diff --git a/index.php b/index.php
index f23f4cd..6208038 100644
--- a/index.php
+++ b/index.php
@@ -38,7 +38,8 @@
<?php
error_reporting(E_ALL);
-
+
+include_once("config.php");
include_once("functions.php");
include_once("db.php");