Removed file update_db.php (obsolete). Finetuning en_US-demo.sql
authorJoe Hunt <joe.hunt.consulting@gmail.com>
Tue, 27 Jan 2009 09:58:13 +0000 (09:58 +0000)
committerJoe Hunt <joe.hunt.consulting@gmail.com>
Tue, 27 Jan 2009 09:58:13 +0000 (09:58 +0000)
CHANGELOG.txt
sql/en_US-demo.sql
update_db.php [deleted file]

index 96a839ecd65e6e423f982e63583421328bf2ccb2..4c5c8272dab79698e98aa5b278d63ea4f5504dc8 100644 (file)
@@ -19,6 +19,11 @@ Legend:
 ! -> Note
 $ -> Affected files
 
+27-Jan-2009 Joe Hunt
+- Removed file update_db.php (obsolete). Finetuning en_US-demo.sql
+$ update_db.php
+  /sql/en_US-demo.sql
+  
 26-Jan-2009 Joe Hunt
 + Added one Post option to Post options in Quick Entry Lines (amount without decrease or increase). Minor bug fixes.
 $ /gl/manage/gl_quick_entries.php
index 2a2a0a6ce4bd04658cc3d335e042958c9584e0da..ce47462cef9c55edd6440df02112838d02bac549 100644 (file)
@@ -106,21 +106,6 @@ CREATE TABLE `0_bank_trans` (
 
 ### Data of table `0_bank_trans` ###
 
-INSERT INTO `0_bank_trans` VALUES ('1', '12', '2', '1', '111', '2006-01-18', '1', '5000', '0', '0', '2', '1', '');
-INSERT INTO `0_bank_trans` VALUES ('2', '12', '3', '1', '112', '2006-01-18', '1', '240', '0', '0', '2', '2', '');
-INSERT INTO `0_bank_trans` VALUES ('3', '12', '4', '1', '113', '2006-01-18', '1', '360', '0', '0', '2', '2', '');
-INSERT INTO `0_bank_trans` VALUES ('4', '12', '5', '1', '114', '2006-01-18', '1', '500', '0', '0', '2', '1', '');
-INSERT INTO `0_bank_trans` VALUES ('8', '4', '2', '1', '4', '2006-01-18', '1', '-300', '0', '0', '0', '', '');
-INSERT INTO `0_bank_trans` VALUES ('9', '4', '2', '3', '4', '2006-01-18', '1', '250', '0', '0', '0', '', '');
-INSERT INTO `0_bank_trans` VALUES ('10', '22', '2', '1', '1', '2006-01-18', '1', '-5000', '0', '0', '3', '1', '');
-INSERT INTO `0_bank_trans` VALUES ('11', '22', '3', '3', '2', '2006-01-18', '1', '-3300', '0', '0', '3', '2', '');
-INSERT INTO `0_bank_trans` VALUES ('12', '2', '2', '1', '11', '2006-01-20', '1', '1050', '0', '0', '0', '', '');
-INSERT INTO `0_bank_trans` VALUES ('13', '12', '6', '1', '115', '2007-01-30', '1', '200', '0', '0', '2', '1', '');
-INSERT INTO `0_bank_trans` VALUES ('15', '2', '3', '1', '12', '2007-01-30', '3', '70', '0', '0', '4', '2', '');
-INSERT INTO `0_bank_trans` VALUES ('16', '4', '3', '1', '5', '2007-03-09', '1', '-222', '0', '0', '0', '', '');
-INSERT INTO `0_bank_trans` VALUES ('17', '4', '3', '2', '5', '2007-03-09', '1', '222', '0', '0', '0', '', '');
-INSERT INTO `0_bank_trans` VALUES ('18', '2', '4', '1', '13', '2007-03-09', '3', '200', '0', '0', '2', '1', '');
-INSERT INTO `0_bank_trans` VALUES ('20', '1', '7', '1', '6', '2007-03-22', '1', '-125', '0', '0', '0', 'Gas Transport', '');
 INSERT INTO `0_bank_trans` VALUES ('21', '12', '7', '1', '6', '2008-03-06', '1', '100', '0', '0', '2', '1', '');
 INSERT INTO `0_bank_trans` VALUES ('22', '12', '8', '1', '7', '2008-03-06', '1', '100', '0', '0', '2', '4', '');
 INSERT INTO `0_bank_trans` VALUES ('23', '12', '9', '1', '8', '2008-03-07', '1', '2000', '0', '0', '2', '1', '');
@@ -454,8 +439,6 @@ CREATE TABLE `0_cust_allocations` (
 
 ### Data of table `0_cust_allocations` ###
 
-INSERT INTO `0_cust_allocations` VALUES ('1', '200', '2007-01-30', '6', '12', '6', '10');
-INSERT INTO `0_cust_allocations` VALUES ('4', '133', '2007-03-09', '4', '2', '6', '10');
 INSERT INTO `0_cust_allocations` VALUES ('5', '135', '2008-03-06', '1', '11', '5', '10');
 INSERT INTO `0_cust_allocations` VALUES ('6', '135', '2008-03-06', '2', '11', '6', '10');
 INSERT INTO `0_cust_allocations` VALUES ('7', '135', '2008-03-06', '3', '11', '4', '10');
@@ -1941,9 +1924,6 @@ CREATE TABLE `0_supp_allocations` (
 
 ### Data of table `0_supp_allocations` ###
 
-INSERT INTO `0_supp_allocations` VALUES ('7', '1529', '2007-01-30', '2', '22', '4', '20');
-INSERT INTO `0_supp_allocations` VALUES ('8', '3445', '2007-01-30', '2', '22', '2', '20');
-INSERT INTO `0_supp_allocations` VALUES ('9', '26', '2007-01-30', '2', '22', '3', '20');
 INSERT INTO `0_supp_allocations` VALUES ('10', '200', '2009-01-10', '4', '22', '7', '20');
 
 
@@ -1970,13 +1950,8 @@ CREATE TABLE `0_supp_invoice_items` (
 
 ### Data of table `0_supp_invoice_items` ###
 
-INSERT INTO `0_supp_invoice_items` VALUES ('1', '2', '20', '0', '1', '1', '102', '17 inch VGA Monitor', '5', '3020', '0', '');
-INSERT INTO `0_supp_invoice_items` VALUES ('2', '2', '20', '0', '2', '2', '103', '32MB VGA Card', '25', '90', '0', '');
-INSERT INTO `0_supp_invoice_items` VALUES ('3', '3', '20', '0', '3', '3', '104', '52x CD Drive', '1', '26', '0', '');
 INSERT INTO `0_supp_invoice_items` VALUES ('4', '4', '20', '0', '1', '1', '102', '17 inch VGA Monitor', '5', '3020', '0', '');
 INSERT INTO `0_supp_invoice_items` VALUES ('5', '4', '20', '0', '2', '2', '103', '32MB VGA Card', '25', '90', '0', '');
-INSERT INTO `0_supp_invoice_items` VALUES ('6', '5', '20', '0', '4', '6', '104', '52x CD Drive (upgraded)', '302', '22', '0', '');
-INSERT INTO `0_supp_invoice_items` VALUES ('7', '6', '20', '6730', '0', '0', '', '', '0', '200', '0', 'yes');
 INSERT INTO `0_supp_invoice_items` VALUES ('8', '7', '20', '0', '5', '7', '102', '17 inch VGA Monitor', '10', '25', '0', '');
 INSERT INTO `0_supp_invoice_items` VALUES ('9', '7', '20', '0', '6', '8', '103', '32MB VGA Card', '10', '30', '0', '');
 INSERT INTO `0_supp_invoice_items` VALUES ('12', '8', '20', '0', '11', '13', '102', '17 inch VGA Monitor', '5', '0', '0', '');
@@ -2006,8 +1981,6 @@ CREATE TABLE `0_supp_invoice_tax_items` (
 
 ### Data of table `0_supp_invoice_tax_items` ###
 
-INSERT INTO `0_supp_invoice_tax_items` VALUES ('1', '2', '20', '1', '', '5', '0', '162.5');
-INSERT INTO `0_supp_invoice_tax_items` VALUES ('2', '2', '20', '2', '', '1', '0', '32.5');
 INSERT INTO `0_supp_invoice_tax_items` VALUES ('3', '10', '20', '3', '', '25', '0', '5.2');
 INSERT INTO `0_supp_invoice_tax_items` VALUES ('4', '11', '20', '3', '', '25', '0', '331.5');
 INSERT INTO `0_supp_invoice_tax_items` VALUES ('5', '12', '20', '1', '', '5', '0', '25');
@@ -2040,15 +2013,7 @@ CREATE TABLE `0_supp_trans` (
 
 ### Data of table `0_supp_trans` ###
 
-INSERT INTO `0_supp_trans` VALUES ('2', '20', '1', '22', '22', '2006-01-18', '2006-02-22', '3250', '0', '195', '1', '3445');
-INSERT INTO `0_supp_trans` VALUES ('2', '22', '1', '1', '', '2006-01-18', '2006-01-18', '-5000', '0', '0', '1', '5000');
-INSERT INTO `0_supp_trans` VALUES ('3', '20', '1', '23', 'asdf', '2006-01-18', '2006-02-22', '26', '0', '0', '1', '26');
-INSERT INTO `0_supp_trans` VALUES ('3', '22', '2', '2', '', '2006-01-18', '2006-01-18', '-3300', '0', '0', '1.2', '0');
-INSERT INTO `0_supp_trans` VALUES ('4', '20', '1', '24', 'Himself', '2007-01-30', '2007-02-22', '17350', '0', '0', '1', '1529');
 INSERT INTO `0_supp_trans` VALUES ('4', '22', '1', '3', '', '2009-01-10', '2009-01-10', '-200', '0', '0', '1', '200');
-INSERT INTO `0_supp_trans` VALUES ('5', '20', '1', '25', '6789', '2007-02-03', '2007-03-22', '6644', '0', '0', '1', '0');
-INSERT INTO `0_supp_trans` VALUES ('6', '1', '1', '5', '', '2007-03-22', '0000-00-00', '0', '0', '0', '1', '0');
-INSERT INTO `0_supp_trans` VALUES ('6', '20', '3', '26', '333333', '2007-03-05', '2007-03-12', '200', '0', '0', '0.2', '0');
 INSERT INTO `0_supp_trans` VALUES ('7', '20', '1', '27', 'eee', '2008-03-06', '2008-04-17', '550', '0', '0', '1', '200');
 INSERT INTO `0_supp_trans` VALUES ('8', '20', '2', '28', '213', '2008-03-20', '2008-04-17', '0', '0', '0', '1.2', '0');
 INSERT INTO `0_supp_trans` VALUES ('9', '20', '2', '29', 'aaa', '2008-03-25', '2008-04-17', '10', '0', '0', '1.9816266221251', '0');
diff --git a/update_db.php b/update_db.php
deleted file mode 100644 (file)
index 6041e00..0000000
+++ /dev/null
@@ -1,174 +0,0 @@
-<?php
-ini_set("display_errors", "on");
-$path_to_root = ".";
-include_once($path_to_root. "/admin/db/maintenance_db.inc");
-include_once($path_to_root. "/includes/db/connect_db.inc");
-
-$js = get_js_png_fix();
-$js .= get_js_set_focus("user");
-$image = $path_to_root."/themes/default/images/logo_frontaccounting.png";
-$title = "Update All Company Databases";
-
-$comp_subdirs = array('images', 'pdf_files', 'backup', 'js_cache', 'attachments');
-
-function get_js_png_fix()
-{
-       $js = "<script type=\"text/javascript\">\n"
-               . "function fixPNG(myImage)\n"
-               . "{\n"
-               . " var arVersion = navigator.appVersion.split(\"MSIE\")\n"
-               . " var version = parseFloat(arVersion[1])\n"
-       . " if ((version >= 5.5) && (version < 7) && (document.body.filters))\n"
-       . " {\n"
-               . "  var imgID = (myImage.id) ? \"id='\" + myImage.id + \"' \" : \"\"\n"
-               . "  var imgClass = (myImage.className) ? \"class='\" + myImage.className + \"' \" : \"\"\n"
-               . "  var imgTitle = (myImage.title) ?\n"
-               . "    \"title='\" + myImage.title  + \"' \" : \"title='\" + myImage.alt + \"' \"\n"
-               . "  var imgStyle = \"display:inline-block;\" + myImage.style.cssText\n"
-               . "  var strNewHTML = \"<span \" + imgID + imgClass + imgTitle\n"
-        . "    + \" style=\\\"\" + \"width:\" + myImage.width\n"
-        . "    + \"px; height:\" + myImage.height\n"
-        . "    + \"px;\" + imgStyle + \";\"\n"
-        . "    + \"filter:progid:DXImageTransform.Microsoft.AlphaImageLoader\"\n"
-        . "    + \"(src=\'\" + myImage.src + \"\', sizingMethod='scale');\\\"></span>\"\n"
-               . "  myImage.outerHTML = strNewHTML\n"
-       . " }\n"
-               . "}\n"
-               . "</script>\n";
-       return $js;
-}
-
-function get_js_set_focus($name)
-{
-       $js = "\n<script type=\"text/javascript\">\n"
-               . "<!--\n"
-               . "function setFocus()\n"
-               . "{\n"
-               . "     document.forms[0].$name.focus();\n"
-               . "}\n"
-               . "-->\n"
-               . "</script>\n";
-       return $js;
-}
-
-function display_error($msg, $center=true)
-{
-    echo "<center><table border='1' cellpadding='3' cellspacing='0' style='border-collapse: collapse' bordercolor='#CC3300' width='50%'>
-      <tr>
-        <td  " . ($center?"align='center' ":"") . " width='100%' bgcolor='#ffcccc'><font color='#dd2200'>$msg</font></td>
-      </tr>
-    </table></center><br>\n";
-}
-
-function display_notification($msg, $center=true)
-{
-    echo "<center><table border='1' cellpadding='3' cellspacing='0' style='border-collapse: collapse' bordercolor='#33cc00' width='50%'>
-      <tr>
-        <td " . ($center?"align='center' ":"") . " width='100%' bgcolor='#ccffcc'><font color='#007700'>$msg</font></td>
-      </tr>
-    </table></center><br>\n";
-}
-
-
-function db_open($conn)
-{
-       $db = mysql_connect($conn["host"] ,$conn["dbuser"], $conn["dbpassword"]);
-       if (!$db)
-               return false;
-       if (!mysql_select_db($conn["dbname"], $db))
-               return false;
-       return $db;
-}
-
-echo "<html dir='ltr' >\n";
-echo "<head><title>$title</title>\n";
-echo "<meta http-equiv='Content-type' content='text/html'; charset='iso-8859-1'>\n";
-echo "<link href='$path_to_root/themes/default/default.css' rel='stylesheet' type='text/css' />\n";
-echo $js;
-echo "</head> \n";
-echo "<body style='background-color:#f9f9f9;' onload='setFocus();'>";
-
-echo "<br><br><br><br>";
-echo "<table align='center' width='50%' cellpadding=3 border=1 bordercolor='#cccccc' style='border-collapse: collapse'>\n";
-echo "<tr><td align='center' valign='bottom'><img src='$image' alt='FrontAccounting' width='250' height='50' onload='fixPNG(this)' border='0' /></td></tr>\n";
-echo "</table>\n";
-
-echo "<br><br>";
-echo "<center><span class='headingtext'>$title</span></center>\n";
-echo "<br>";
-
-if (isset($_POST["submit"]))
-{
-       $perms_ok = is_writable($path_to_root.'/company') && is_writable($path_to_root.'/company/0');
-       $checkdirs = $comp_subdirs;
-       foreach ($checkdirs as $dir) {
-               $perms_ok &= is_writable($path_to_root.'/company/0/'.$dir);
-       }
-
-       if (!$perms_ok) {
-               display_error("'System 'company' directory or any of its subdirectories 
-                       is not writable.<br> Change webserver access permissions to those 
-                       directories.");
-       } elseif (!isset($_FILES['uploadfile']['tmp_name']) || !is_uploaded_file($_FILES['uploadfile']['tmp_name']))
-       {
-               display_error("You must select an SQL script for update");;
-       }
-       else
-       {
-               include_once($path_to_root."/config_db.php");
-               if (!isset($_POST['user']) || !isset($_POST['passwd']) || $_POST['user'] == "")
-               {
-                       display_error("You must select a user name and an optional password");
-               }
-               else
-               {
-                       foreach($db_connections as $id => $conn)
-                       {
-                               $conn['dbuser'] = $_POST['user'];
-                               $conn['dbpassword'] = $_POST['passwd'];
-                               if (!($db = db_open($conn)))
-                               {
-                                       display_error("Wrong user name or password - ".mysql_error());
-                               }
-                               else
-                               {
-                                       if (!db_import($_FILES['uploadfile']['tmp_name'], $conn))
-                                               display_error("Bad SQL file or you have already updated the company: "
-                                                       . $id . " " . $conn['name']." - ".mysql_error());
-                                       else
-                                               display_notification("Database has been updated for company: "
-                                                       . $id . " " .  $conn['name']);
-                               }
-                               $cdir = "$path_to_root/company/$id";
-                               if (!file_exists($cdir))
-                               {
-                                       create_comp_dirs($cdir, $comp_subdirs);
-                               }
-                       }
-               }
-       }
-}
-if (!isset($_POST['passwd']))
-       $_POST['passwd'] = "";
-if (!isset($_POST['user']))
-       $_POST['user'] = "";
-       
-echo "<form enctype='multipart/form-data' method='post' action='".$_SERVER['PHP_SELF']."'>\n";
-
-echo "<table align='center' width='50%' cellpadding=3 border=1 bordercolor='#cccccc' style='border-collapse: collapse'>\n";
-
-echo "<tr><td>Database User</td><td><input type='text' name='user' value='".$_POST['user']."' size='20' /></td></tr>";
-echo "<tr><td>Password</td><td><input name='passwd' type='password' value='".$_POST['passwd']."' /></td></tr>";
-echo "<tr><td>Upload Script</td><td><input name='uploadfile' type='file' /></td></tr>";
-echo "<tr><td>&nbsp;</td><td><input type='submit' class='inputsubmit' name='submit' value='Update' /></td></tr>";
-
-echo "</table>\n";;
-
-echo "<br><br>";
-echo "<center><span>Choose from Database update scripts in SQL folder. No Datase is updated without a script.</span></center>\n";
-echo "<br>";
-
-echo "</form>\n";
-
-echo "</body></html>\n";
-?>
\ No newline at end of file