Changeset 682 for trunk/phpbms/modules
- Timestamp:
- 12/16/09 14:18:55 (2 years ago)
- Location:
- trunk/phpbms/modules
- Files:
-
- 2 added
- 7 modified
-
api/push_records_addedit.php (modified) (1 diff)
-
bms/include/clients.php (modified) (1 diff)
-
bms/install/tableoptions.sql (modified) (1 diff)
-
bms/install/updatev0.98.sql (modified) (1 diff)
-
mailchimp/include/list_sync.php (modified) (6 diffs)
-
mailchimp/install/install.php (modified) (1 diff)
-
mailchimp/install/tableoptions.sql (added)
-
mailchimp/javascript/manual_list_sync.js (modified) (4 diffs)
-
mailchimp/manual_list_sync.php (added)
Legend:
- Unmodified
- Added
- Removed
-
trunk/phpbms/modules/api/push_records_addedit.php
r651 r682 38 38 */ 39 39 40 //CREATE TABLE `pushrecords`(41 // `id` int(11) NOT NULL auto_increment,42 // `uuid` varchar(64) NOT NULL,43 // `originuuid` varchar(64) NOT NULL default '',44 // `destuuid` varchar(64) NOT NULL default '',45 // `command` varchar(128) NOT NULL default 'insert',46 // `whereclause` varchar(256) NOT NULL default '',47 // `name` varchar(128) NOT NULL default '',48 // `server` varchar(256) NOT NULL DEFAULT ''49 // `destscript` varchar(256) NOT NULL default '',50 // `port` int(11) DEFAULT NULL,51 // `apiusername` varchar(128) NOT NULL default '',52 // `apipassword` varchar(128) NOT NULL default '',53 // `ssl` tinyint(4) NOT NULL DEFAULT '0',54 // `httpformat` varchar(64) NOT NULL default 'POST',55 // `dataformat` varchar(64) NOT NULL default 'json',56 // createdby int(11) NOT NULL default '0',57 // creationdate datetime NOT NULL default '0000-00-00 00:00:00',58 // modifiedby int(11) default '0',59 // modifieddate timestamp NOT NULL,60 // PRIMARY KEY (id),61 // UNIQUE KEY (`uuid`)62 //) ENGINE=INNODB;63 40 include("../../include/session.php"); 64 41 include("include/fields.php"); -
trunk/phpbms/modules/bms/include/clients.php
r657 r682 686 686 if(DEMO_ENABLED != "true"){ 687 687 $_SESSION["emailids"]= $this->idsArray; 688 goURL("modules/ bms/clients_email.php");688 goURL("modules/mailchimp/manual_list_sync.php"); 689 689 } else { 690 690 return "mass e-mail feature disabled in demo"; -
trunk/phpbms/modules/bms/install/tableoptions.sql
r628 r682 52 52 INSERT INTO `tableoptions` (`tabledefid`, `name`, `option`, `needselect`, `othercommand`, `roleid`, `displayorder`) VALUES ('tbld:6d290174-8b73-e199-fe6c-bcf3d4b61083', 'edit', '1', '1', '0', '', '0'); 53 53 INSERT INTO `tableoptions` (`tabledefid`, `name`, `option`, `needselect`, `othercommand`, `roleid`, `displayorder`) VALUES ('tbld:6d290174-8b73-e199-fe6c-bcf3d4b61083', 'select', '1', '1', '0', '', '0'); 54 INSERT INTO `tableoptions` (`tabledefid`, `name`, `option`, `needselect`, `othercommand`, `roleid`, `displayorder`) VALUES ('tbld:6d290174-8b73-e199-fe6c-bcf3d4b61083', 'massEmail', 'send mass e-mail', '0', '1', '', '100');55 54 INSERT INTO `tableoptions` (`tabledefid`, `name`, `option`, `needselect`, `othercommand`, `roleid`, `displayorder`) VALUES ('tbld:6d290174-8b73-e199-fe6c-bcf3d4b61083', 'mark_asclient', 'convert to client', '1', '1', '', '50'); 56 55 INSERT INTO `tableoptions` (`tabledefid`, `name`, `option`, `needselect`, `othercommand`, `roleid`, `displayorder`) VALUES ('tbld:6d290174-8b73-e199-fe6c-bcf3d4b61083', 'stamp_infosent', 'info packet sent', '1', '1', '', '0'); -
trunk/phpbms/modules/bms/install/updatev0.98.sql
r677 r682 599 599 UPDATE `tablegroupings` SET `name` = 'concat(invoices.type ,\"s\",IF(`invoices`.`iscreditmemo`, \" - Credit Memo\", \"\"))' WHERE `name` = 'concat(invoices.type,"s")'; 600 600 --end tablegroupings UPDATE-- 601 --tableoptions DELETE-- 602 DELETE FROM `tableoptions WHERE `name`='massEmail'; 603 --end tableoptions DELETe 601 604 --tableoptions INSERT-- 602 605 INSERT INTO `tableoptions` (`tabledefid`, `name`, `option`, `needselect`, `othercommand`, `roleid`, `displayorder`) VALUES ('tbld:157b7707-5503-4161-4dcf-6811f8b0322f', 'import', '0', '0', '0', 'Admin', '0'); -
trunk/phpbms/modules/mailchimp/include/list_sync.php
r681 r682 109 109 * @param string $message Text of error message 110 110 * @param int $errorCode Error number 111 * @param bool $stopScript Whether or not to stop the process function 112 */ 113 114 function _addError($message, $errorCode = NULL, $stopScript = false){ 111 * @param bool $fatal Whether or not the error is fatal, and if the process 112 * function needs to be stopped. 113 */ 114 115 function _addError($message, $errorCode = NULL, $fatal = false){ 115 116 116 117 $tempArray["message"] = $message; 117 118 $tempArray["code"] = $errorCode; 118 119 120 if($stopScript){ 121 $this->stopScript = true; 122 $tempArray["errorType"] = "error"; 123 }else{ 124 $tempArray["errorType"] = "warning"; 125 }//end if 126 119 127 $this->errors[] = $tempArray; 120 121 if($stopScript)122 $this->stopScript = true;123 128 124 129 }//end function … … 142 147 if(count($this->errors)){ 143 148 144 $return["type"] = "error"; 149 if($this->stopScript) 150 $return["type"] = "error"; 151 else 152 $return["type"] = "warning"; 153 145 154 $return["details"] = $this->errors; 146 155 … … 171 180 */ 172 181 $unsubscribed = array(); 182 $start = 0; 173 183 do{ 174 184 175 $members = $this->api->listMembers($this->listId, 'unsubscribed', $this->lastSyncDate, 0, $this->batchLimit);185 $members = $this->api->listMembers($this->listId, 'unsubscribed', $this->lastSyncDate, $start, $this->batchLimit); 176 186 if($this->api->errorCode){ 177 187 $this->_addError("Unable to load listMembers(): ".$this->api->errorMessage, $this->api->errorCode, true); … … 191 201 }//end foreach 192 202 203 $start++; 193 204 }while(count($members) == $this->batchLimit); 194 205 … … 196 207 * pull all the cleaned 197 208 */ 209 $start = 0; 198 210 do{ 199 211 200 $members = $this->api->listMembers($this->listId, 'cleaned', $this->lastSyncDate, 0, $this->batchLimit);212 $members = $this->api->listMembers($this->listId, 'cleaned', $this->lastSyncDate, $start, $this->batchLimit); 201 213 if($this->api->errorCode){ 202 214 $this->_addError("Unable to load listMembers(): ".$this->api->errorMessage, $this->api->errorCode, true); … … 215 227 }//end foreach 216 228 229 $start++; 217 230 }while(count($members) == $this->batchLimit); 218 231 -
trunk/phpbms/modules/mailchimp/install/install.php
r679 r682 41 41 "modules", 42 42 "settings", 43 "tableoptions" 43 44 ); -
trunk/phpbms/modules/mailchimp/javascript/manual_list_sync.js
r681 r682 18 18 resultPic.className = "success"; 19 19 resultPic.innerHTML = "Success"; 20 }else if(JSONresponse.type == "warning"){ 21 resultPic.className = "warning"; 22 resultPic.innerHTML = "Minor Errors (see results)"; 20 23 }else{ 21 resultPic.className = "error";22 resultPic.innerHTML = " Error (see debug)";23 }//endif24 resultPic.className = "fail"; 25 resultPic.innerHTML = "Fatal Error"; 26 }//endif 24 27 25 28 list.reportResult(JSONresponse); … … 30 33 31 34 var resultText = getObjectFromID("resultText"); 32 console.log(response); 35 33 36 if(response.type && response.details){ 34 37 … … 36 39 resultText.innerHTML = "Success"; 37 40 }else{ 38 resultText.innerHTML = " Errror:";41 resultText.innerHTML = "The following errors were found:"; 39 42 for(var error in response.details){ 40 43 41 44 result.innerHTML += "\n"; 42 result.innerHTML += error.message+"( "+error.code+" )"45 result.innerHTML += capitalize(error.type)+": "+error.message+"( "+error.code+" )" 43 46 44 47 }//end for … … 52 55 }//end if 53 56 54 }//end function 57 },//end function 58 59 loadOptionAccordion:function(){ 60 61 var optionsDivs = new Array(); 62 optionsDivs[optionsDivs.length]=getObjectFromID("resultDiv"); 63 64 var optionsLinks = new Array(); 65 optionsLinks[optionsLinks.length]=getObjectFromID("showResults"); 66 67 var optionsAccordion = new fx.Accordion(optionsLinks, optionsDivs, {opacity: true, duration:250, onComplete:function(){list.expandResultText()}}); 68 69 },//end function 70 71 expandResultText:function(){ 72 73 var switchButton=getObjectFromID("showResults"); 74 75 if(switchButton.className=="graphicButtons buttonDown"){ 76 switchButton.className="graphicButtons buttonUp" 77 switchButton.firstChild.innerHTML="hide results"; 78 } else { 79 switchButton.className="graphicButtons buttonDown" 80 switchButton.firstChild.innerHTML="show results"; 81 }//end if 82 83 },//end function 84 85 goToSearchPage:function(){ 86 document.location = "../../search.php?id=tbld%3A6d290174-8b73-e199-fe6c-bcf3d4b61083" 87 }//end function 55 88 56 89 } 90 function capitalize(string){ 91 92 var theReturn = string.substring(0,1).toUpperCase(); 93 theReturn += string.substring(1, string.length); 94 return theReturn; 95 96 }//end function 57 97 58 98 connect(window, "onload", function(){ 59 99 60 var sync = getObjectFromID("sync") 100 list.loadOptionAccordion(); 101 102 var sync = getObjectFromID("sync"); 61 103 connect(sync, "onclick", list.sync); 62 104 105 var cancelButton = getObjectFromID("cancelButton"); 106 connect(cancelButton, "onclick", list.goToSearchPage); 63 107 64 108 });