[Firebug-cvs] firebug/web db_create.php,1.15,1.16 db_drop.php,1.2,1.3 db_dropdb.php,1.2,1.3 db_list_
Brought to you by:
doolin
From: John-Michael W. <jm...@us...> - 2004-08-31 23:36:44
|
Update of /cvsroot/firebug/firebug/web In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12364 Modified Files: db_create.php db_drop.php db_dropdb.php db_list_component.php db_list_databases.php db_select.php db_table_buttons.php db_table_select.php db_write_file.php Log Message: Modified MySQL connection to use included configuration. Index: db_create.php =================================================================== RCS file: /cvsroot/firebug/firebug/web/db_create.php,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** db_create.php 7 Jul 2004 19:24:54 -0000 1.15 --- db_create.php 31 Aug 2004 23:36:30 -0000 1.16 *************** *** 27,33 **** */ ! $statement = "create database if not exists $dbname;"; ! mysql_connect("localhost","root","") or die("Error: ".mysql_error()." in mysql_connect."); mysql_query($statement) or die("Error: ".mysql_error()." in creating database"); --- 27,34 ---- */ ! $statement = "create database if not exists $dbname;"; ! include("mysql_config.php"); ! $dblink = mysql_connect($host,$user,$passwd) or die("Error: ".mysql_error()." in mysql_connect."); mysql_query($statement) or die("Error: ".mysql_error()." in creating database"); *************** *** 49,54 **** uint8_t Long_deg; float Long_dec_min; ! uint8_t NSEWind; ! uint8_t num_sats; } GGAMsg; */ --- 50,55 ---- uint8_t Long_deg; float Long_dec_min; ! uint8_t NSEWind; ! uint8_t num_sats; } GGAMsg; */ *************** *** 93,97 **** print "<br />"; print $statement; ! mysql_query($statement) or die("Error: ".mysql_error()." in inserting current atable"); } ?> --- 94,98 ---- print "<br />"; print $statement; ! mysql_query($statement) or die("Error: ".mysql_error()." in inserting current atable"); } ?> Index: db_table_buttons.php =================================================================== RCS file: /cvsroot/firebug/firebug/web/db_table_buttons.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** db_table_buttons.php 30 Mar 2004 23:27:14 -0000 1.1 --- db_table_buttons.php 31 Aug 2004 23:36:31 -0000 1.2 *************** *** 7,11 **** print("Choose different table: "); ! mysql_connect("localhost","root","") or die("Error: ".mysql_error()." in mysql_connect."); $dblink=mysql_select_db("$dbname") or die("Error: ".mysql_error()." in mysql_select_db."); --- 7,12 ---- print("Choose different table: "); ! include("mysql_config.php"); ! mysql_connect($host,$user,$passwd) or die("Error: ".mysql_error()." in mysql_connect."); $dblink=mysql_select_db("$dbname") or die("Error: ".mysql_error()." in mysql_select_db."); Index: db_write_file.php =================================================================== RCS file: /cvsroot/firebug/firebug/web/db_write_file.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** db_write_file.php 11 Feb 2004 00:05:24 -0000 1.1 --- db_write_file.php 31 Aug 2004 23:36:31 -0000 1.2 *************** *** 8,12 **** <head> <title>FireBug Client</title> ! <META HTTP-EQUIV="Refresh" CONTENT="30;URL=http://localhost/firebug/db_write_file.php"> <link rel="SHORTCUT ICON" href="./images/favicon.ico"> --- 8,12 ---- <head> <title>FireBug Client</title> ! <META HTTP-EQUIV="Refresh" CONTENT="30;URL=http://localhost/firebug/db_write_file.php"> <link rel="SHORTCUT ICON" href="./images/favicon.ico"> *************** *** 35,39 **** if ($HTTP_POST_VARS["tbl1"]!=Null){ $HTTP_SESSION_VARS["tblname"] = $HTTP_POST_VARS["tbl1"]; ! $HTTP_SESSION_VARS["dbname"] = $HTTP_POST_VARS["db1"]; } --- 35,39 ---- if ($HTTP_POST_VARS["tbl1"]!=Null){ $HTTP_SESSION_VARS["tblname"] = $HTTP_POST_VARS["tbl1"]; ! $HTTP_SESSION_VARS["dbname"] = $HTTP_POST_VARS["db1"]; } *************** *** 74,78 **** ! mysql_connect("localhost","root","") or die("Error: ".mysql_error()." in mysql_connect."); mysql_select_db("$dbname") or die("Error: ".mysql_error()." in mysql_select_db."); --- 74,79 ---- ! include("mysql_config.php"); ! mysql_connect($host,$user,$passwd) or die("Error: ".mysql_error()." in mysql_connect."); mysql_select_db("$dbname") or die("Error: ".mysql_error()." in mysql_select_db."); *************** *** 152,156 **** ! do { fputs($inside_fp,$row["mote_id"]." "); --- 153,157 ---- ! do { fputs($inside_fp,$row["mote_id"]." "); *************** *** 177,181 **** // System call ! `"C:/gp373w32/pgnuplot.exe < ./test.gnu"`; echo "<img src=\"test.png\">"; --- 178,182 ---- // System call ! `"C:/gp373w32/pgnuplot.exe < ./test.gnu"`; echo "<img src=\"test.png\">"; *************** *** 203,207 **** ! do { print ("<tr>"); --- 204,208 ---- ! do { print ("<tr>"); Index: db_select.php =================================================================== RCS file: /cvsroot/firebug/firebug/web/db_select.php,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** db_select.php 14 Jul 2004 22:46:48 -0000 1.7 --- db_select.php 31 Aug 2004 23:36:31 -0000 1.8 *************** *** 26,30 **** ! mysql_connect("localhost","root","") or die("Error: ".mysql_error()." in mysql_connect."); $dblink=mysql_select_db("$dbname") or die("Error: ".mysql_error()." in mysql_select_db."); --- 26,31 ---- ! include("mysql_config.php"); ! mysql_connect($host,$user,$passwd) or die("Error: ".mysql_error()." in mysql_connect."); $dblink=mysql_select_db("$dbname") or die("Error: ".mysql_error()." in mysql_select_db."); *************** *** 47,51 **** print ("</td>"); ! print ("<td>"); print ("<input type=radio name=tbl1 value=\"" . htmlspecialchars($row[0]) . "\">"); print ("</td>"); --- 48,52 ---- print ("</td>"); ! print ("<td>"); print ("<input type=radio name=tbl1 value=\"" . htmlspecialchars($row[0]) . "\">"); print ("</td>"); *************** *** 65,71 **** <br /> ! <!-- ! Add links to go back to the firebug home page running on the ! current server, and to the database admin page running on the current server. --> --- 66,72 ---- <br /> ! <!-- ! Add links to go back to the firebug home page running on the ! current server, and to the database admin page running on the current server. --> Index: db_dropdb.php =================================================================== RCS file: /cvsroot/firebug/firebug/web/db_dropdb.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** db_dropdb.php 15 May 2003 00:02:58 -0000 1.2 --- db_dropdb.php 31 Aug 2004 23:36:31 -0000 1.3 *************** *** 20,25 **** <hr /> <?php ! $statement = "drop database if exists $dbname"; ! mysql_connect("localhost","root","") or die("Error: ".mysql_error()." in mysql_connect."); mysql_query($statement) or die("Error: ".mysql_error()." in dropping database"); ?> --- 20,26 ---- <hr /> <?php ! $statement = "drop database if exists $dbname"; ! include("mysql_config.php"); ! $dblink = mysql_connect($host,$user,$passwd) or die("Error: ".mysql_error()." in mysql_connect."); mysql_query($statement) or die("Error: ".mysql_error()." in dropping database"); ?> Index: db_list_databases.php =================================================================== RCS file: /cvsroot/firebug/firebug/web/db_list_databases.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** db_list_databases.php 11 May 2004 23:24:09 -0000 1.1 --- db_list_databases.php 31 Aug 2004 23:36:31 -0000 1.2 *************** *** 6,11 **** <?php ! $dblink=mysql_connect("localhost","root","") or die("Error: ".mysql_error()." in mysql_connect."); ! $arr = array(1 => "mysql", 2 => "test"); --- 6,12 ---- <?php ! include("mysql_config.php"); ! $dblink = mysql_connect($host,$user,$passwd) or die("Error: ".mysql_error()." in mysql_connect."); ! $arr = array(1 => "mysql", 2 => "test"); *************** *** 13,17 **** while ($row = mysql_fetch_object($db_list)) { ! $var=$row->Database; $flag=false; --- 14,18 ---- while ($row = mysql_fetch_object($db_list)) { ! $var=$row->Database; $flag=false; *************** *** 21,30 **** } ! if($flag==false){ print ("<tr><td>"); print $var; print ("</td>"); ! print ("<td>"); print ("<input type=radio name=db1 value=\"$var\">"); print ("</td>"); --- 22,31 ---- } ! if($flag==false){ print ("<tr><td>"); print $var; print ("</td>"); ! print ("<td>"); print ("<input type=radio name=db1 value=\"$var\">"); print ("</td>"); Index: db_drop.php =================================================================== RCS file: /cvsroot/firebug/firebug/web/db_drop.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** db_drop.php 22 May 2003 19:07:27 -0000 1.2 --- db_drop.php 31 Aug 2004 23:36:31 -0000 1.3 *************** *** 23,27 **** <?php ! $dblink=mysql_connect("localhost","root","") or die("Error: ".mysql_error()." in mysql_connect."); /* Add the names of other databases here. */ --- 23,28 ---- <?php ! include("mysql_config.php"); ! $dblink = mysql_connect($host,$user,$passwd) or die("Error: ".mysql_error()." in mysql_connect."); /* Add the names of other databases here. */ *************** *** 36,40 **** print $dbname; print ("</td>"); ! print ("<td>"); print ("<input type=radio name=db1 value=\"$dbname\">"); print ("</td>"); --- 37,41 ---- print $dbname; print ("</td>"); ! print ("<td>"); print ("<input type=radio name=db1 value=\"$dbname\">"); print ("</td>"); *************** *** 48,52 **** while ($row = mysql_fetch_object($db_list)) { ! $dbname=$row->Database; if (in_array($dbname,$system_dbs)) { --- 49,53 ---- while ($row = mysql_fetch_object($db_list)) { ! $dbname=$row->Database; if (in_array($dbname,$system_dbs)) { Index: db_list_component.php =================================================================== RCS file: /cvsroot/firebug/firebug/web/db_list_component.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** db_list_component.php 1 Apr 2004 14:58:10 -0000 1.1 --- db_list_component.php 31 Aug 2004 23:36:31 -0000 1.2 *************** *** 12,17 **** <?php ! $dblink=mysql_connect("localhost","root","") or die("Error: ".mysql_error()." in mysql_connect."); ! $arr = array(1 => "mysql", 2 => "test"); --- 12,18 ---- <?php ! include("mysql_config.php"); ! $dblink = mysql_connect($host,$user,$passwd) or die("Error: ".mysql_error()." in mysql_connect."); ! $arr = array(1 => "mysql", 2 => "test"); *************** *** 19,23 **** while ($row = mysql_fetch_object($db_list)) { ! $var=$row->Database; $flag=false; --- 20,24 ---- while ($row = mysql_fetch_object($db_list)) { ! $var=$row->Database; $flag=false; *************** *** 27,36 **** } ! if($flag==false){ print ("<tr><td>"); print $var; print ("</td>"); ! print ("<td>"); print ("<input type=radio name=db1 value=\"$var\">"); print ("</td>"); --- 28,37 ---- } ! if($flag==false){ print ("<tr><td>"); print $var; print ("</td>"); ! print ("<td>"); print ("<input type=radio name=db1 value=\"$var\">"); print ("</td>"); Index: db_table_select.php =================================================================== RCS file: /cvsroot/firebug/firebug/web/db_table_select.php,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** db_table_select.php 14 Jul 2004 22:46:48 -0000 1.10 --- db_table_select.php 31 Aug 2004 23:36:31 -0000 1.11 *************** *** 10,14 **** <title>FireBug Client</title> <!-- ! <META HTTP-EQUIV="Refresh" CONTENT="30;URL=http://localhost/firebug/db_table_select.php"> --> --- 10,14 ---- <title>FireBug Client</title> <!-- ! <META HTTP-EQUIV="Refresh" CONTENT="30;URL=http://localhost/firebug/db_table_select.php"> --> *************** *** 37,41 **** if ($HTTP_POST_VARS["tbl1"]!=Null){ $HTTP_SESSION_VARS["tblname"] = $HTTP_POST_VARS["tbl1"]; ! $HTTP_SESSION_VARS["dbname"] = $HTTP_POST_VARS["db1"]; } --- 37,41 ---- if ($HTTP_POST_VARS["tbl1"]!=Null){ $HTTP_SESSION_VARS["tblname"] = $HTTP_POST_VARS["tbl1"]; ! $HTTP_SESSION_VARS["dbname"] = $HTTP_POST_VARS["db1"]; } *************** *** 58,66 **** <?php ! mysql_connect("localhost","root","") or die("Error: ".mysql_error()." in mysql_connect."); mysql_select_db("$dbname") or die("Error: ".mysql_error()." in mysql_select_db."); ! $statement = "show columns from $tblname;"; $columns = mysql_query($statement) or die("Error: ".mysql_error()." getting columns"); --- 58,67 ---- <?php ! include("mysql_config.php"); ! mysql_connect($host,$user,$passwd) or die("Error: ".mysql_error()." in mysql_connect."); mysql_select_db("$dbname") or die("Error: ".mysql_error()." in mysql_select_db."); ! $statement = "show columns from $tblname;"; $columns = mysql_query($statement) or die("Error: ".mysql_error()." getting columns"); *************** *** 83,87 **** ! $statement = "select * from $tblname"; $result = mysql_query($statement); --- 84,88 ---- ! $statement = "select * from $tblname"; $result = mysql_query($statement); *************** *** 95,103 **** } ! // Print every row. if ($row = mysql_fetch_row($result)) { // for each row ! do { // For each column... print ("<tr>"); --- 96,104 ---- } ! // Print every row. if ($row = mysql_fetch_row($result)) { // for each row ! do { // For each column... print ("<tr>"); |