|
From: <le...@us...> - 2002-08-10 11:42:44
|
Update of /cvsroot/meshdb/www/db2
In directory usw-pr-cvs1:/tmp/cvs-serv29203
Modified Files:
config-local.php-dist gawd.php index.php info.php
lookup.inc.php map2b.php map2d.php map3b.php map4b.php
select.php submit.php touch.php vrml3b.php
Log Message:
factor out the database name to the config file
Index: config-local.php-dist
===================================================================
RCS file: /cvsroot/meshdb/www/db2/config-local.php-dist,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- config-local.php-dist 10 Aug 2002 10:42:56 -0000 1.2
+++ config-local.php-dist 10 Aug 2002 11:42:39 -0000 1.3
@@ -8,12 +8,14 @@
* ========README=====README=====README======README======
*/
- global $MYSQLHOST, $MYSQLUSER, $MYSQLPASS, $READONLY, $OURPROXY;
+ global $MYSQLHOST, $MYSQLUSER, $MYSQLPASS, $MYSQLDB;
+ global $READONLY, $OURPROXY;
global $ZONE, $SHIFTFILE, $ALTFILE;
$MYSQLHOST = "host"; /* MySQL hostname */
$MYSQLUSER = "user"; /* MySQL username */
$MYSQLPASS = "pass"; /* MySQL password */
+ $MYSQLDB = "mesh"; /* Database name */
$READONLY = 0; /* Set to 1 for db maintennance */
$OURPROXY = "proxy"; /* an HTTP proxy host available to us */
Index: gawd.php
===================================================================
RCS file: /cvsroot/meshdb/www/db2/gawd.php,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- gawd.php 10 Aug 2002 10:42:56 -0000 1.2
+++ gawd.php 10 Aug 2002 11:42:39 -0000 1.3
@@ -10,7 +10,7 @@
include("util.php");
$db = mysql_connect($MYSQLHOST, $MYSQLUSER, $MYSQLPASS);
-mysql_select_db("mesh", $db)
+mysql_select_db($MYSQLDB, $db)
or die(mysql_error($db));
/* Generated the Last-modified header */
Index: index.php
===================================================================
RCS file: /cvsroot/meshdb/www/db2/index.php,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- index.php 10 Aug 2002 10:42:56 -0000 1.2
+++ index.php 10 Aug 2002 11:42:39 -0000 1.3
@@ -10,7 +10,7 @@
if ($len < 50) $len = $DEFAULTLEN;
$db = mysql_connect($MYSQLHOST, $MYSQLUSER, $MYSQLPASS);
- mysql_select_db("mesh", $db)
+ mysql_select_db($MYSQLDB, $db)
or die(mysql_error($db));
$result = mysql_query("SELECT max(unix_timestamp(updated)) from admin", $db)
or die(mysql_error($db));
Index: info.php
===================================================================
RCS file: /cvsroot/meshdb/www/db2/info.php,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- info.php 10 Aug 2002 10:42:56 -0000 1.2
+++ info.php 10 Aug 2002 11:42:39 -0000 1.3
@@ -3,7 +3,7 @@
<?
include("config.php");
$db = mysql_connect($MYSQLHOST, $MYSQLUSER, $MYSQLPASS);
- mysql_select_db("mesh", $db)
+ mysql_select_db($MYSQLDB, $db)
or die(mysql_error($db));
function q1($query) {
Index: lookup.inc.php
===================================================================
RCS file: /cvsroot/meshdb/www/db2/lookup.inc.php,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- lookup.inc.php 10 Aug 2002 10:42:56 -0000 1.2
+++ lookup.inc.php 10 Aug 2002 11:42:39 -0000 1.3
@@ -6,7 +6,7 @@
global $PREF;
$db = mysql_connect($MYSQLHOST, $MYSQLUSER, $MYSQLPASS);
- mysql_select_db("mesh", $db)
+ mysql_select_db($MYSQLDB, $db)
or die(mysql_error($db));
$nodeid = intval($nodeid);
Index: map2b.php
===================================================================
RCS file: /cvsroot/meshdb/www/db2/map2b.php,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- map2b.php 10 Aug 2002 10:42:56 -0000 1.2
+++ map2b.php 10 Aug 2002 11:42:39 -0000 1.3
@@ -26,7 +26,7 @@
if (!$im) die("image load failed");
$db = mysql_connect($MYSQLHOST, $MYSQLUSER, $MYSQLPASS);
-mysql_select_db("mesh", $db)
+mysql_select_db($MYSQLDB, $db)
or die(mysql_error($db));
/* Generated the Last-modified header */
Index: map2d.php
===================================================================
RCS file: /cvsroot/meshdb/www/db2/map2d.php,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- map2d.php 10 Aug 2002 10:42:56 -0000 1.2
+++ map2d.php 10 Aug 2002 11:42:39 -0000 1.3
@@ -39,7 +39,7 @@
header("X-source: $mburl");
$db = mysql_connect($MYSQLHOST, $MYSQLUSER, $MYSQLPASS);
-mysql_select_db("mesh", $db)
+mysql_select_db($MYSQLDB, $db)
or die(mysql_error($db));
/* If the image is in the cache, use it */
Index: map3b.php
===================================================================
RCS file: /cvsroot/meshdb/www/db2/map3b.php,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- map3b.php 10 Aug 2002 10:42:56 -0000 1.2
+++ map3b.php 10 Aug 2002 11:42:39 -0000 1.3
@@ -20,7 +20,7 @@
$vrml = intval($vrml);
$db = mysql_connect($MYSQLHOST, $MYSQLUSER, $MYSQLPASS);
-mysql_select_db("mesh", $db)
+mysql_select_db($MYSQLDB, $db)
or die(mysql_error($db));
/* Generated the Last-modified header */
Index: map4b.php
===================================================================
RCS file: /cvsroot/meshdb/www/db2/map4b.php,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- map4b.php 10 Aug 2002 10:42:56 -0000 1.2
+++ map4b.php 10 Aug 2002 11:42:39 -0000 1.3
@@ -16,7 +16,7 @@
$s = doubleval($_GET["s"]);
$db = mysql_connect($MYSQLHOST, $MYSQLUSER, $MYSQLPASS);
-mysql_select_db("mesh", $db)
+mysql_select_db($MYSQLDB, $db)
or die(mysql_error($db));
/* Generated the Last-modified header */
Index: select.php
===================================================================
RCS file: /cvsroot/meshdb/www/db2/select.php,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- select.php 10 Aug 2002 10:42:56 -0000 1.2
+++ select.php 10 Aug 2002 11:42:39 -0000 1.3
@@ -25,7 +25,7 @@
include("config.php");
/* Connect */ $db = mysql_connect($MYSQLHOST, $MYSQLUSER, $MYSQLPASS);
- mysql_select_db("mesh", $db)
+ mysql_select_db($MYSQLDB, $db)
or die(mysql_error($db));
$result = mysql_query("SELECT max(unix_timestamp(updated)) from admin", $db)
or die(mysql_error($db));
Index: submit.php
===================================================================
RCS file: /cvsroot/meshdb/www/db2/submit.php,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- submit.php 10 Aug 2002 10:42:56 -0000 1.2
+++ submit.php 10 Aug 2002 11:42:39 -0000 1.3
@@ -108,7 +108,7 @@
$db = mysql_connect($MYSQLHOST, $MYSQLUSER, $MYSQLPASS);
- mysql_select_db("mesh", $db)
+ mysql_select_db($MYSQLDB, $db)
or die(mysql_error($db));
if (isset($VAR["redirect"]))
Index: touch.php
===================================================================
RCS file: /cvsroot/meshdb/www/db2/touch.php,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- touch.php 10 Aug 2002 10:42:56 -0000 1.2
+++ touch.php 10 Aug 2002 11:42:39 -0000 1.3
@@ -14,7 +14,7 @@
die("invalid nodeid - change the '12345' in the URL to your node's ID!");
$db = mysql_connect($MYSQLHOST, $MYSQLUSER, $MYSQLPASS);
- mysql_select_db("mesh", $db)
+ mysql_select_db($MYSQLDB, $db)
or die(mysql_error($db));
$result = mysql_query("UPDATE admin SET updated = NOW()"
Index: vrml3b.php
===================================================================
RCS file: /cvsroot/meshdb/www/db2/vrml3b.php,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- vrml3b.php 10 Aug 2002 10:42:56 -0000 1.2
+++ vrml3b.php 10 Aug 2002 11:42:39 -0000 1.3
@@ -19,7 +19,7 @@
$s = doubleval($s);
$db = mysql_connect($MYSQLHOST, $MYSQLUSER, $MYSQLPASS);
-mysql_select_db("mesh", $db)
+mysql_select_db($MYSQLDB, $db)
or die(mysql_error($db));
/* Generated the Last-modified header */
|