Changeset 203
- Timestamp:
- 03/23/07 18:47:37 (5 years ago)
- Location:
- trunk/phpbms
- Files:
-
- 4 modified
-
include/session.php (modified) (2 diffs)
-
install/install.php (modified) (1 diff)
-
modules/bms/install/updatev0.70.sql (modified) (3 diffs)
-
modules/bms/invoices_addedit.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/phpbms/include/session.php
r200 r203 141 141 // Start Code 142 142 //================================================================================================================= 143 144 //php <4.3.0 compatibility 145 if(!function_exists("mysql_real_escape_string")){ 146 function mysql_real_escape_string($string){ 147 return mysql_escape_string($string); 148 } 149 150 function utf8_replaceEntity($result){ 151 $value = (int)$result[1]; 152 $string = ''; 153 154 $len = round(pow($value,1/8)); 155 156 for($i=$len;$i>0;$i--){ 157 $part = ($value & (255>>2)) | pow(2,7); 158 if ( $i == 1 ) $part |= 255<<(8-$len); 159 160 $string = chr($part) . $string; 161 162 $value >>= 6; 163 } 164 165 return $string; 166 } 167 168 function html_entity_decode($string){ 169 return preg_replace_callback( 170 '/&#([0-9]+);/u', 171 'utf8_replaceEntity', 172 $string 173 ); 174 } 175 } 176 143 177 if(!isset($_SERVER['REQUEST_URI'])) { 144 178 // This following code is for windows boxen, because they lack some server varables as well … … 157 191 session_start(); 158 192 error_reporting(E_ALL); 159 160 193 161 194 if (!isset($_SESSION["app_path"])) -
trunk/phpbms/install/install.php
r201 r203 108 108 <ul> 109 109 <li>MySQL 3.23.58 or higher</li> 110 <li>PHP 4. 1.2or higher</li>110 <li>PHP 4.3.0 or higher</li> 111 111 <li>Web Server (Tested using Apache and IIS.)</li> 112 112 </ul> -
trunk/phpbms/modules/bms/install/updatev0.70.sql
r202 r203 1 CREATE TABLE `shippingmethods` (`id` int(11) NOT NULL AUTO_INCREMENT, `name` VARCHAR(128) NOT NULL, `inactive` tinyint(4) DEFAULT 0, `priority` int(11) DEFAULT 0, `canestimate` tinyint(4) DEFAULT 0, `estimationscript` VARCHAR(128), `createdby` INTEGER UNSIGNED, `creationdate` DATETIME, `modifiedby` INTEGER UNSIGNED, `modifieddate` TIMESTAMP, PRIMARY KEY(`id`)) ENGINE = MYISAM;1 CREATE TABLE `shippingmethods` (`id` int(11) NOT NULL AUTO_INCREMENT, `name` VARCHAR(128) NOT NULL, `inactive` tinyint(4) DEFAULT 0, `priority` int(11) DEFAULT 0, `canestimate` tinyint(4) DEFAULT 0, `estimationscript` VARCHAR(128), `createdby` INTEGER UNSIGNED, `creationdate` DATETIME, `modifiedby` INTEGER UNSIGNED, `modifieddate` TIMESTAMP, PRIMARY KEY(`id`)); 2 2 ALTER TABLE `invoices` ADD COLUMN `shippingmethodid` INTEGER UNSIGNED AFTER `shippingmethod`; 3 3 UPDATE `invoices` SET shippingmethodid=0; … … 20 20 INSERT INTO `tablecolumns` (`tabledefid`, `name`, `column`, `align`, `footerquery`, `displayorder`, `sortorder`,`wrap`, `size`, `format`) VALUES (300,'estimate','shippingmethods.canestimate','center','',2,'',0,'','boolean'); 21 21 INSERT INTO `tablecolumns` (`tabledefid`, `name`, `column`, `align`, `footerquery`, `displayorder`, `sortorder`,`wrap`, `size`, `format`) VALUES (300,'priority','shippingmethods.priority','right','',0,'',0,'',NULL); 22 CREATE TABLE `paymentmethods` (`id` int(11) NOT NULL AUTO_INCREMENT, `name` varchar(128) NOT NULL default '', `type` enum('draft','charge','receivable') default NULL, `priority` int(8) NOT NULL default '0', `inactive` tinyint(1) NOT NULL default '0', `onlineprocess` tinyint(1) NOT NULL default '0', `processscript` varchar(128) default '', `createdby` int(11) default NULL, `creationdate` datetime default NULL, `modifiedby` int(11) default NULL, `modifieddate` TIMESTAMP, PRIMARY KEY (`id`)) TYPE=MyISAM PACK_KEYS=0;22 CREATE TABLE `paymentmethods` (`id` int(11) NOT NULL AUTO_INCREMENT, `name` varchar(128) NOT NULL default '', `type` enum('draft','charge','receivable') default NULL, `priority` int(8) NOT NULL default '0', `inactive` tinyint(1) NOT NULL default '0', `onlineprocess` tinyint(1) NOT NULL default '0', `processscript` varchar(128) default '', `createdby` int(11) default NULL, `creationdate` datetime default NULL, `modifiedby` int(11) default NULL, `modifieddate` TIMESTAMP, PRIMARY KEY (`id`)); 23 23 INSERT INTO `tabledefs` (`id`, `displayname`, `type`, `moduleid`, `maintable`, `querytable`, `editfile`, `editroleid`, `addfile`, `addroleid`, `searchroleid`, `advsearchroleid`, `viewsqlroleid`, `deletebutton`, `defaultwhereclause`, `defaultsortorder`, `defaultsearchtype`, `defaultcriteriafindoptions`, `defaultcriteriaselection`, `createdby`, `creationdate`, `modifiedby`, `modifieddate`) VALUES (301,'Payment Methods','table',2,'paymentmethods','paymentmethods','modules/bms/paymentmethods_addedit.php',30,'modules/bms/paymentmethods_addedit.php',30,30,30,-100,'inactivate','paymentmethods.inactive=0','paymentmethods.priority,paymentmethods.name','','','',1,NOW(),1,NOW()); 24 24 INSERT INTO `tablefindoptions` (`tabledefid`, `name`, `search`, `displayorder`, `roleid`) VALUES (301,'All Records','paymentmethods.id!=-1',2,0); … … 46 46 ALTER TABLE `clients` CHANGE COLUMN `shiptostate` `shiptostate` varchar(5) default NULL; 47 47 ALTER TABLE `invoices` CHANGE COLUMN `state` `state` varchar(5) default NULL; 48 CREATE TABLE `invoicestatuses` (`id` INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,`name` VARCHAR(128), `invoicedefault` TINYINT UNSIGNED NOT NULL DEFAULT 0,`defaultassignedtoid` INTEGER UNSIGNED,`inactive` TINYINT UNSIGNED NOT NULL DEFAULT 0, `priority` INTEGER UNSIGNED NOT NULL DEFAULT 0, `createdby` INTEGER UNSIGNED, `creationdate` DATETIME, `modifiedby` INTEGER UNSIGNED, `modifieddate` TIMESTAMP, PRIMARY KEY(`id`)) ENGINE = MYISAM;49 CREATE TABLE `invoicestatushistory` (`id` INTEGER UNSIGNED NOT NULL AUTO_INCREMENT, `invoiceid` INTEGER UNSIGNED, `invoicestatusid` INTEGER UNSIGNED, `statusdate` DATE, `assignedtoid` INTEGER UNSIGNED, PRIMARY KEY(`id`)) ENGINE = MYISAM;48 CREATE TABLE `invoicestatuses` (`id` INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,`name` VARCHAR(128), `invoicedefault` TINYINT UNSIGNED NOT NULL DEFAULT 0,`defaultassignedtoid` INTEGER UNSIGNED,`inactive` TINYINT UNSIGNED NOT NULL DEFAULT 0, `priority` INTEGER UNSIGNED NOT NULL DEFAULT 0, `createdby` INTEGER UNSIGNED, `creationdate` DATETIME, `modifiedby` INTEGER UNSIGNED, `modifieddate` TIMESTAMP, PRIMARY KEY(`id`)); 49 CREATE TABLE `invoicestatushistory` (`id` INTEGER UNSIGNED NOT NULL AUTO_INCREMENT, `invoiceid` INTEGER UNSIGNED, `invoicestatusid` INTEGER UNSIGNED, `statusdate` DATE, `assignedtoid` INTEGER UNSIGNED, PRIMARY KEY(`id`)); 50 50 INSERT INTO `invoicestatuses` (`id`, `name`, `invoicedefault`, `defaultassignedtoid`, `inactive`, `priority`, `createdby`, `creationdate`, `modifiedby`, `modifieddate`) VALUES (1,'Open',1,NULL,0,0,1,NOW(),1,NOW()); 51 51 INSERT INTO `invoicestatuses` (`id`, `name`, `invoicedefault`, `defaultassignedtoid`, `inactive`, `priority`, `createdby`, `creationdate`, `modifiedby`, `modifieddate`) VALUES (2,'Committed',0,NULL,0,10,1,NOW(),1,NOW()); -
trunk/phpbms/modules/bms/invoices_addedit.php
r202 r203 432 432 <input class="uneditable fieldCurrency important fieldTotal" name="totalti" id="totalti" type="text" value="<?php echo numberToCurrency($therecord["totalti"])?>" size="12" maxlength="15" onchange="calculateTotal();" readonly="true" /> 433 433 <input id="totalcost" name="totalcost" type="hidden" value="<?php echo $therecord["totalcost"] ?>" /> 434 <input id="totaltaxable" name="totaltaxable" type=" text" value="<?php echo $therecord["totaltaxable"] ?>" />434 <input id="totaltaxable" name="totaltaxable" type="hidden" value="<?php echo $therecord["totaltaxable"] ?>" /> 435 435 </td> 436 436 <td class="totalItems"> </td>