added a config file (not under VC)
authorarun <arun@nubati.net>
Tue, 12 Dec 2006 11:34:09 +0000 (11:34 +0000)
committerarun <arun>
Tue, 12 Dec 2006 11:34:09 +0000 (11:34 +0000)
db.php
functions.php
index.php

diff --git a/db.php b/db.php
index bf82544266ab092ce4b7a36b58d7fc6992c8e0ee..7f4435002fde194ce008ed41d22a3448ce19086b 100644 (file)
--- a/db.php
+++ b/db.php
@@ -6,9 +6,9 @@
 
 function DB_open()
 {
 
 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());
   
   else
     die (mysql_error());
   
index 0168ce3922b3769198ed166ef16bc9ec59d53c4b..abf2b829ac22d6bdac5e917e488387a04d7e9db8 100644 (file)
@@ -1,21 +1,5 @@
 <?php
 
 <?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;
 function mymail($To,$Subject,$message)
 {  
   global $debug;
index f23f4cd1550c20e38c7707239d3e2dac1f433689..6208038dce9bfb09ddb3fef18139418394938b40 100644 (file)
--- a/index.php
+++ b/index.php
@@ -38,7 +38,8 @@
 
 <?php
 error_reporting(E_ALL);
 
 <?php
 error_reporting(E_ALL);
-     
+
+include_once("config.php");     
 include_once("functions.php");
 include_once("db.php");
 
 include_once("functions.php");
 include_once("db.php");