phpBMS

Changeset 718 for trunk/phpbms

Show
Ignore:
Timestamp:
01/05/10 17:06:44 (2 years ago)
Author:
brieb
Message:
  • Completely removed client email projects from the system. It was partially broken in v0.96 and fully broken in the new system. Also, sending out thousands of e-mails can get messy and requires a lot of coding to do correctly. Instead, we have opted to leave it to others who have done it right (mailchimp.com). This is a big reason we have implemented the MailChimp? module
Location:
trunk/phpbms/modules/bms
Files:
5 removed
8 modified

Legend:

Unmodified
Added
Removed
  • trunk/phpbms/modules/bms/install/createtables.sql

    r677 r718  
    1 CREATE TABLE `clientemailprojects` ( 
    2   id int(11) NOT NULL auto_increment, 
    3   `uuid` varchar(64) NOT NULL, 
    4   name varchar(64) default '', 
    5   userid varchar(64) NOT NULL, 
    6   emailto varchar(9) NOT NULL default '', 
    7   emailfrom varchar(128) default '', 
    8   subject varchar(128) default '', 
    9   body text, 
    10   lastrun timestamp(14) NOT NULL, 
    11   PRIMARY KEY  (id), 
    12   UNIQUE KEY (`uuid`) 
    13 ) ENGINE=INNODB; 
    14  
    151CREATE TABLE `clients` ( 
    162  `id` int(11) NOT NULL auto_increment, 
  • trunk/phpbms/modules/bms/install/tablecolumns.sql

    r678 r718  
    1 INSERT INTO `tablecolumns` (`tabledefid`, `name`, `column`, `align`, `footerquery`, `displayorder`, `sortorder`, `wrap`, `size`, `format`, `roleid`) VALUES ('tbld:157b7707-5503-4161-4dcf-6811f8b0322f', 'name', 'clientemailprojects.name', 'left', '', '0', '', '0', '100%', NULL, ''); 
    2 INSERT INTO `tablecolumns` (`tabledefid`, `name`, `column`, `align`, `footerquery`, `displayorder`, `sortorder`, `wrap`, `size`, `format`, `roleid`) VALUES ('tbld:157b7707-5503-4161-4dcf-6811f8b0322f', 'last run', 'clientemailprojects.lastrun', 'right', '', '1', '', '0', '', 'datetime', ''); 
    31INSERT INTO `tablecolumns` (`tabledefid`, `name`, `column`, `align`, `footerquery`, `displayorder`, `sortorder`, `wrap`, `size`, `format`, `roleid`) VALUES ('tbld:27b99bda-7bec-b152-8397-a3b09c74cb23', 'id', 'addresses.id', 'left', '', '0', '', '0', '', NULL, ''); 
    42INSERT INTO `tablecolumns` (`tabledefid`, `name`, `column`, `align`, `footerquery`, `displayorder`, `sortorder`, `wrap`, `size`, `format`, `roleid`) VALUES ('tbld:31423480-a9b0-f0ff-749e-b3b5e18ca93c', 'id', 'lineitems.id', 'left', '', '0', '', '0', '', NULL, ''); 
  • trunk/phpbms/modules/bms/install/tabledefs.sql

    r620 r718  
    77INSERT INTO `tabledefs` (`uuid`, `displayname`, `prefix`, `type`, `moduleid`, `maintable`, `querytable`, `editfile`, `editroleid`, `addfile`, `addroleid`, `importfile`, `importroleid`, `searchroleid`, `advsearchroleid`, `viewsqlroleid`, `deletebutton`, `canpost`, `hascustomfields`, `defaultwhereclause`, `defaultsortorder`, `defaultsearchtype`, `defaultcriteriafindoptions`, `defaultcriteriaselection`, `createdby`, `creationdate`, `modifiedby`, `modifieddate`) VALUES ('tbld:8179e105-5487-5173-d835-d9d510cc7f1b', 'Prerequisites', NULL, 'table', 'mod:0aa9cca0-7388-0eae-81b9-9935f9d127cc', 'prerequisites', '(prerequisites LEFT JOIN `products` ON prerequisites.parentid=products.uuid) LEFT JOiN products AS childproducts on prerequisites.childid=childproducts.uuid', 'N/A', '', 'N/A', '', NULL, 'Admin', '', 'Admin', 'Admin', 'NA', '0', '0', 'prerequisites.id =-1', 'products.id', '', '', '', 1, NOW(), 1, NOW()); 
    88INSERT INTO `tabledefs` (`uuid`, `displayname`, `prefix`, `type`, `moduleid`, `maintable`, `querytable`, `editfile`, `editroleid`, `addfile`, `addroleid`, `importfile`, `importroleid`, `searchroleid`, `advsearchroleid`, `viewsqlroleid`, `deletebutton`, `canpost`, `hascustomfields`, `defaultwhereclause`, `defaultsortorder`, `defaultsearchtype`, `defaultcriteriafindoptions`, `defaultcriteriaselection`, `createdby`, `creationdate`, `modifiedby`, `modifieddate`) VALUES ('tbld:f993cf23-ad4a-047b-e920-d45fee1dc08e', 'Client Duplicates', NULL, 'view', 'mod:0aa9cca0-7388-0eae-81b9-9935f9d127cc', 'clients', '((clients INNER JOIN addresstorecord on clients.uuid = addresstorecord.recordid AND addresstorecord.tabledefid=\'tbld:6d290174-8b73-e199-fe6c-bcf3d4b61083\' AND addresstorecord.primary=1) INNER JOIN addresses ON addresstorecord.addressid = addresses.uuid),((clients AS dclients INNER JOIN addresstorecord as daddresstorecord on dclients.uuid = daddresstorecord.recordid AND daddresstorecord.tabledefid=\'tbld:6d290174-8b73-e199-fe6c-bcf3d4b61083\' AND daddresstorecord.primary=1) INNER JOIN addresses AS daddresses ON daddresstorecord.addressid = daddresses.uuid)', 'N/A', '', 'N/A', '', NULL, 'Admin', '', 'Admin', 'Admin', 'NA', '0', '0', 'clients.id = -100', 'clients.company, clients.lastname, clients.firstname', NULL, NULL, NULL, 1, NOW(), 1, NOW()); 
    9 INSERT INTO `tabledefs` (`uuid`, `displayname`, `prefix`, `type`, `moduleid`, `maintable`, `querytable`, `editfile`, `editroleid`, `addfile`, `addroleid`, `importfile`, `importroleid`, `searchroleid`, `advsearchroleid`, `viewsqlroleid`, `deletebutton`, `canpost`, `hascustomfields`, `defaultwhereclause`, `defaultsortorder`, `defaultsearchtype`, `defaultcriteriafindoptions`, `defaultcriteriaselection`, `createdby`, `creationdate`, `modifiedby`, `modifieddate`) VALUES ('tbld:157b7707-5503-4161-4dcf-6811f8b0322f', 'Client E-mail Projects', NULL, 'system', 'mod:0aa9cca0-7388-0eae-81b9-9935f9d127cc', 'clientemailprojects', '`clientemailprojects` LEFT JOIN `users` ON `clientemailprojects`.`userid`=`users`.`uuid`', 'modules/bms/clientemailprojects_edit.php', '', 'NA', '', NULL, 'Admin', '', 'Admin', 'Admin', 'delete', '0', '0', 'clientemailprojects.id !=-1', 'clientemailprojects.name', 'search', '', '', 1, NOW(), 1, NOW()); 
    109INSERT INTO `tabledefs` (`uuid`, `displayname`, `prefix`, `type`, `moduleid`, `maintable`, `querytable`, `editfile`, `editroleid`, `addfile`, `addroleid`, `importfile`, `importroleid`, `searchroleid`, `advsearchroleid`, `viewsqlroleid`, `deletebutton`, `canpost`, `hascustomfields`, `defaultwhereclause`, `defaultsortorder`, `defaultsearchtype`, `defaultcriteriafindoptions`, `defaultcriteriaselection`, `createdby`, `creationdate`, `modifiedby`, `modifieddate`) VALUES ('tbld:455b8839-162b-3fcb-64b6-eeb946f873e1', 'Discounts', 'dsct', 'table', 'mod:0aa9cca0-7388-0eae-81b9-9935f9d127cc', 'discounts', 'discounts', 'modules/bms/discounts_addedit.php', '', 'modules/bms/discounts_addedit.php', '', NULL, 'Admin', '', 'Admin', 'Admin', 'inactivate', '0', '1', 'discounts.id!=0', 'discounts.id', 'search', 'Active Records', 'name', 1, NOW(), 1, NOW()); 
    1110INSERT INTO `tabledefs` (`uuid`, `displayname`, `prefix`, `type`, `moduleid`, `maintable`, `querytable`, `editfile`, `editroleid`, `addfile`, `addroleid`, `importfile`, `importroleid`, `searchroleid`, `advsearchroleid`, `viewsqlroleid`, `deletebutton`, `canpost`, `hascustomfields`, `defaultwhereclause`, `defaultsortorder`, `defaultsearchtype`, `defaultcriteriafindoptions`, `defaultcriteriaselection`, `createdby`, `creationdate`, `modifiedby`, `modifieddate`) VALUES ('tbld:fa8a0ddc-87d3-a9e9-60b0-1bab374b2993', 'Shipping Methods', 'smtd', 'table', 'mod:0aa9cca0-7388-0eae-81b9-9935f9d127cc', 'shippingmethods', 'shippingmethods', 'modules/bms/shippingmethods_addedit.php', 'role:259ead9f-100b-55b5-508a-27e33a6216bf', 'modules/bms/shippingmethods_addedit.php', 'role:259ead9f-100b-55b5-508a-27e33a6216bf', NULL, 'Admin', 'role:259ead9f-100b-55b5-508a-27e33a6216bf', 'role:259ead9f-100b-55b5-508a-27e33a6216bf', 'Admin', 'inactivate', '0', '1', 'shippingmethods.inactive!=0', 'shippingmethods.priority, shippingmethods.name', '', '', '', 1, NOW(), 1, NOW()); 
  • trunk/phpbms/modules/bms/install/tablefindoptions.sql

    r628 r718  
    1 INSERT INTO `tablefindoptions` (`tabledefid`, `name`, `search`, `displayorder`, `roleid`) VALUES ('tbld:157b7707-5503-4161-4dcf-6811f8b0322f', 'all records', 'clientemailprojects.id!=-1', '0', ''); 
    2 INSERT INTO `tablefindoptions` (`tabledefid`, `name`, `search`, `displayorder`, `roleid`) VALUES ('tbld:157b7707-5503-4161-4dcf-6811f8b0322f', 'global projects', 'clientemailprojects.userid=0', '1', ''); 
    31INSERT INTO `tablefindoptions` (`tabledefid`, `name`, `search`, `displayorder`, `roleid`) VALUES ('tbld:27b99bda-7bec-b152-8397-a3b09c74cb23', 'All Records', 'addresses.id!=-1', '0', ''); 
    42INSERT INTO `tablefindoptions` (`tabledefid`, `name`, `search`, `displayorder`, `roleid`) VALUES ('tbld:31423480-a9b0-f0ff-749e-b3b5e18ca93c', 'All Records', 'lineitems.id!=0', '0', 'role:259ead9f-100b-55b5-508a-27e33a6216bf'); 
  • trunk/phpbms/modules/bms/install/tablegroupings.sql

    r628 r718  
    1 INSERT INTO `tablegroupings` (`tabledefid`, `field`, `displayorder`, `ascending`, `name`, `roleid`) VALUES ('tbld:157b7707-5503-4161-4dcf-6811f8b0322f', 'if(clientemailprojects.userid=0, \"global\", concat( users.firstname,\" \", users.lastname))', '1', '1', '', ''); 
    21INSERT INTO `tablegroupings` (`tabledefid`, `field`, `displayorder`, `ascending`, `name`, `roleid`) VALUES ('tbld:43678406-be25-909b-c715-7e2afc7db601', 'if(clients.lastname!=\"\",concat(clients.lastname,\", \",clients.firstname,if(clients.company!=\"\",concat(\" (\",clients.company,\")\"),\"\")),clients.company)', '1', '1', '', ''); 
    32INSERT INTO `tablegroupings` (`tabledefid`, `field`, `displayorder`, `ascending`, `name`, `roleid`) VALUES ('tbld:62fe599d-c18f-3674-9e54-b62c2d6b1883', 'concat(invoices.type ,\"s\",IF(`invoices`.`iscreditmemo`, \" - Credit Memo\", \"\"))', '1', '1', '', ''); 
  • trunk/phpbms/modules/bms/install/tableoptions.sql

    r709 r718  
    1 INSERT INTO `tableoptions` (`tabledefid`, `name`, `option`, `needselect`, `othercommand`, `roleid`, `displayorder`) VALUES ('tbld:157b7707-5503-4161-4dcf-6811f8b0322f', 'edit', '1', '1', '0', '', '0'); 
    2 INSERT INTO `tableoptions` (`tabledefid`, `name`, `option`, `needselect`, `othercommand`, `roleid`, `displayorder`) VALUES ('tbld:157b7707-5503-4161-4dcf-6811f8b0322f', 'select', '1', '1', '0', '', '0'); 
    3 INSERT INTO `tableoptions` (`tabledefid`, `name`, `option`, `needselect`, `othercommand`, `roleid`, `displayorder`) VALUES ('tbld:157b7707-5503-4161-4dcf-6811f8b0322f', 'new', '0', '1', '0', '', '0'); 
    4 INSERT INTO `tableoptions` (`tabledefid`, `name`, `option`, `needselect`, `othercommand`, `roleid`, `displayorder`) VALUES ('tbld:157b7707-5503-4161-4dcf-6811f8b0322f', 'printex', '1', '1', '0', '', '0'); 
    5 INSERT INTO `tableoptions` (`tabledefid`, `name`, `option`, `needselect`, `othercommand`, `roleid`, `displayorder`) VALUES ('tbld:157b7707-5503-4161-4dcf-6811f8b0322f', 'import', '0', '0', '0', 'Admin', '0'); 
    61INSERT INTO `tableoptions` (`tabledefid`, `name`, `option`, `needselect`, `othercommand`, `roleid`, `displayorder`) VALUES ('tbld:27b99bda-7bec-b152-8397-a3b09c74cb23', 'new', '1', '1', '0', '', '0'); 
    72INSERT INTO `tableoptions` (`tabledefid`, `name`, `option`, `needselect`, `othercommand`, `roleid`, `displayorder`) VALUES ('tbld:27b99bda-7bec-b152-8397-a3b09c74cb23', 'edit', '1', '1', '0', '', '0'); 
  • trunk/phpbms/modules/bms/install/tablesearchablefields.sql

    r613 r718  
    1 INSERT INTO `tablesearchablefields` (`tabledefid`, `field`, `name`, `displayorder`, `type`) VALUES ('tbld:157b7707-5503-4161-4dcf-6811f8b0322f', 'clientemailprojects.name', 'name', '0', 'field'); 
    2 INSERT INTO `tablesearchablefields` (`tabledefid`, `field`, `name`, `displayorder`, `type`) VALUES ('tbld:157b7707-5503-4161-4dcf-6811f8b0322f', 'users.firstname like \"{{value}}%\" or users.lastname like \"{{value}}%\"', 'user', '1', 'whereclause'); 
    31INSERT INTO `tablesearchablefields` (`tabledefid`, `field`, `name`, `displayorder`, `type`) VALUES ('tbld:27b99bda-7bec-b152-8397-a3b09c74cb23', 'addresses.id', 'id', '1', 'field'); 
    42INSERT INTO `tablesearchablefields` (`tabledefid`, `field`, `name`, `displayorder`, `type`) VALUES ('tbld:31423480-a9b0-f0ff-749e-b3b5e18ca93c', 'products.partnumber', 'part number', '0', 'field'); 
  • trunk/phpbms/modules/bms/install/updatev0.98.sql

    r709 r718  
    4848ALTER TABLE `attachments` ENGINE=INNODB; 
    4949--end attachements ALTER-- 
    50 --clientemailprojects ALTER-- 
    51 ALTER TABLE `clientemailprojects` ENGINE=INNODB; 
    52 ALTER TABLE `clientemailprojects` 
    53     ADD COLUMN `uuid` varchar(64) NOT NULL AFTER `id`, 
    54     MODIFY `userid` VARCHAR(64) NOT NULL; 
    55 --end clientemailprojects ALTER-- 
     50--clientemailprojects DROP-- 
     51DROP TABLE `clientemailprojects` 
     52--end clientemailprojects DROP-- 
    5653--clients ALTER-- 
    5754ALTER TABLE `clients` ENGINE=INNODB; 
     
    663660WHERE 
    664661    `id`='18'; 
     662 
     663DELETE FROM `tabledefs` WHERE `id` = 22; 
     664DELETE FROM `tableoptions` WHERE `tabledefid` = 22; 
     665DELETE FROM `tablecolumns` WHERE `tabledefid` = 22; 
     666DELETE FROM `tableoptions` WHERE `tabledefid` = 22; 
     667DELETE FROM `tablegroupings` WHERE `tabledefid` = 22; 
     668DELETE FROM `tablefindoptions` WHERE `tabledefid` = 22; 
     669DELETE FROM `tablesearchablefields` WHERE `tabledefid` = 22; 
     670DELETE FROM `menu` WHERE `name` = 'Email Projects'; 
     671 
    665672UPDATE `tabledefs` SET 
    666673    `uuid`='tbld:157b7707-5503-4161-4dcf-6811f8b0322f', 
phpBMS vulnerability assesment provided by Orvant Inc. Copyright © 2010 Kreotek, LLC. All Rights reserved.