Changeset 206
- Timestamp:
- 03/27/07 11:44:14 (5 years ago)
- Location:
- trunk/phpbms
- Files:
-
- 5 modified
-
include/session.php (modified) (1 diff)
-
install/createtables.sql (modified) (2 diffs)
-
install/tableoptions.sql (modified) (1 diff)
-
install/updatev0.7.sql (modified) (1 diff)
-
modules/bms/include/invoices_search_functions.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/phpbms/include/session.php
r204 r206 112 112 113 113 if($log && function_exists("sendLog")){ 114 global $dbli k;114 global $dblink; 115 115 if(!isset($_SESSION["userinfo"]["id"])) 116 116 $_SESSION["userinfo"]["id"]="NULL"; 117 sendLog($dblink,"ERROR",$id.": ".$extras,$_SESSION["userinfo"]["id"]);117 sendLog($dblink,"ERROR",$id.": ".$_SERVER["REQUEST_URI"]." -- ".$extras,$_SESSION["userinfo"]["id"]); 118 118 } 119 119 if($die) die(); -
trunk/phpbms/install/createtables.sql
r200 r206 276 276 277 277 CREATE TABLE `scheduler` ( 278 `id` int(10) unsigned NOT NULL,278 `id` INTEGER UNSIGNED NOT NULL AUTO_INCREMENT, 279 279 `name` varchar(45) default NULL, 280 280 `job` varchar(128) default NULL, … … 288 288 `creationdate` datetime default NULL, 289 289 `modifiedby` int(10) unsigned default NULL, 290 `modifieddate` timestamp NOT NULL default CURRENT_TIMESTAMP,290 `modifieddate` TIMESTAMP, 291 291 PRIMARY KEY (`id`), 292 292 KEY `inactivated` (`inactive`), -
trunk/phpbms/install/tableoptions.sql
r200 r206 48 48 INSERT INTO `tableoptions` (`tabledefid`, `name`, `option`, `othercommand`, `roleid`) VALUES (201,'inactivate','inactivate',1,0); 49 49 INSERT INTO `tableoptions` (`tabledefid`, `name`, `option`, `othercommand`, `roleid`) VALUES (201,'runSelected','run job(s)',1,0); 50 INSERT INTO `tablecolumns` (`tabledefid`, `name`, `column`, `align`, `footerquery`, `displayorder`, `sortorder`, `wrap`, `size`, `format`) VALUES (201,'name','scheduler.name','left','',0,'',0,'95%',NULL);51 INSERT INTO `tablecolumns` (`tabledefid`, `name`, `column`, `align`, `footerquery`, `displayorder`, `sortorder`, `wrap`, `size`, `format`) VALUES (201,'cron interval','scheduler.crontab','left','',1,'',0,'',NULL);52 INSERT INTO `tablecolumns` (`tabledefid`, `name`, `column`, `align`, `footerquery`, `displayorder`, `sortorder`, `wrap`, `size`, `format`) VALUES (201,'inactive','scheduler.inactive','center','',2,'',0,'','boolean');53 50 INSERT INTO `tableoptions` (`tabledefid`, `name`, `option`, `othercommand`, `roleid`) VALUES (202,'new','0',0,0); 54 51 INSERT INTO `tableoptions` (`tabledefid`, `name`, `option`, `othercommand`, `roleid`) VALUES (202,'select','1',0,0); -
trunk/phpbms/install/updatev0.7.sql
r204 r206 66 66 INSERT INTO `settings` (`name`, `value`) VALUES ('thousands_separator',','); 67 67 INSERT INTO `settings` (`name`, `value`) VALUES ('demo_enabled','false'); 68 CREATE TABLE `scheduler` (`id` int(10) unsigned NOT NULL, `name` varchar(45) default NULL, `job` varchar(128) default NULL, `crontab` varchar(64) default NULL, `lastrun` datetime default NULL, `startdatetime` datetime NOT NULL, `enddatetime` datetime default NULL, `description` text, `inactive` tinyint(3) unsigned NOT NULL default '0', `createdby` int(10) unsigned default NULL, `creationdate` datetime default NULL, `modifiedby` int(10) unsigned default NULL, `modifieddate` timestamp NOT NULL default CURRENT_TIMESTAMP, PRIMARY KEY (`id`), KEY `inactivated` (`inactive`), KEY `startdate` (`startdatetime`), KEY `enddate` (`enddatetime`));68 CREATE TABLE `scheduler` (`id` INTEGER UNSIGNED NOT NULL AUTO_INCREMENT, `name` varchar(45) default NULL, `job` varchar(128) default NULL, `crontab` varchar(64) default NULL, `lastrun` datetime default NULL, `startdatetime` datetime NOT NULL, `enddatetime` datetime default NULL, `description` text, `inactive` tinyint(3) unsigned NOT NULL default '0', `createdby` int(10) unsigned default NULL, `creationdate` datetime default NULL, `modifiedby` int(10) unsigned default NULL, `modifieddate` timestamp NOT NULL, PRIMARY KEY (`id`), KEY `inactivated` (`inactive`), KEY `startdate` (`startdatetime`), KEY `enddate` (`enddatetime`)); 69 69 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 (201,'Scheduler','system',1,'scheduler','scheduler','modules/base/scheduler_addedit.php',-100,'modules/base/scheduler_addedit.php',-100,-100,-100,-100,'delete','scheduler.id!=0','scheduler.name','','','',1,NOW(),1,NOW()); 70 70 INSERT INTO `tablefindoptions` (`tabledefid`, `name`, `search`, `displayorder`, `roleid`) VALUES (201,'all records','scheduler.id!=0',0,0); -
trunk/phpbms/modules/bms/include/invoices_search_functions.php
r204 r206 110 110 111 111 $whereclause=buildWhereClause($theids,"invoices.id"); 112 $whereclause="(".$whereclause.") AND (invoices.type!=\"Invoice\" OR invoices.type!=\"VOID\") AND invoices.amountpaid=invoices.totalti ;";112 $whereclause="(".$whereclause.") AND (invoices.type!=\"Invoice\" OR invoices.type!=\"VOID\") AND invoices.amountpaid=invoices.totalti"; 113 113 114 114 //Look up default assignedto … … 121 121 $assignedtoid=$therecord["defaultassignedtoid"]; 122 122 123 $querystatement = "UPDATE invoices SET invoices.type=\"Invoice\" invoices.invoicedate=ifnull(invoices.invoicedate,Now()),modifiedby=\"".$_SESSION["userinfo"]["id"]."\" WHERE".$whereclause;123 $querystatement = "UPDATE invoices SET invoices.type=\"Invoice\", invoices.invoicedate=ifnull(invoices.invoicedate,Now()),modifiedby=\"".$_SESSION["userinfo"]["id"]."\" WHERE".$whereclause; 124 124 $queryresult = mysql_query($querystatement,$dblink); 125 125 if (!$queryresult) reportError(300,"Could not mark as invoice: ".mysql_error($dblink)." -- ".$querystatement); … … 131 131 $querystatement="SELECT id FROM invoices WHERE (".$whereclause.") AND statusid!=4"; 132 132 $queryresult = mysql_query($querystatement,$dblink); 133 if (!$queryresult) reportError(300,"Could not retrieve history for history cleaning: ".mysql_error($dblink)." -- ".$querystatement); 133 134 134 135 while($therecord=mysql_fetch_array($queryresult)){ 135 $querystatement = "UPDATE invoices SET invoices.statusid=4,invoices.statusdate=Now(), invoices.assignedtoid=".$assignedtoid." , WHEREid=".$therecord["id"];136 $querystatement = "UPDATE invoices SET invoices.statusid=4,invoices.statusdate=Now(), invoices.assignedtoid=".$assignedtoid." WHERE invoices.id=".$therecord["id"]; 136 137 $queryresult = mysql_query($querystatement,$dblink); 137 138 if (!$queryresult) reportError(300,"Could not mark as invoice: ".mysql_error($dblink)." -- ".$querystatement);