Changeset 1611096
- Timestamp:
- 03/09/2017 08:20:35 AM (9 years ago)
- Location:
- optinpoint-lite
- Files:
-
- 217 added
- 9 edited
-
tags/1.0.1 (added)
-
tags/1.0.1/LICENSE.txt (added)
-
tags/1.0.1/README.txt (added)
-
tags/1.0.1/admin (added)
-
tags/1.0.1/admin/assets (added)
-
tags/1.0.1/admin/assets/css (added)
-
tags/1.0.1/admin/assets/css/Thumbs.db (added)
-
tags/1.0.1/admin/assets/css/admin.css (added)
-
tags/1.0.1/admin/assets/css/index.php (added)
-
tags/1.0.1/admin/assets/css/multi-select.png (added)
-
tags/1.0.1/admin/assets/js (added)
-
tags/1.0.1/admin/assets/js/admin.js (added)
-
tags/1.0.1/admin/assets/js/index.php (added)
-
tags/1.0.1/admin/class-optinpoint-admin.php (added)
-
tags/1.0.1/admin/includes (added)
-
tags/1.0.1/admin/includes/addon0.php (added)
-
tags/1.0.1/admin/includes/addon1.php (added)
-
tags/1.0.1/admin/includes/addon8.php (added)
-
tags/1.0.1/admin/includes/addon9.php (added)
-
tags/1.0.1/admin/includes/lightbox0.php (added)
-
tags/1.0.1/admin/includes/lightbox1.php (added)
-
tags/1.0.1/admin/includes/lightbox8.php (added)
-
tags/1.0.1/admin/includes/lightbox9.php (added)
-
tags/1.0.1/admin/includes/slider0.php (added)
-
tags/1.0.1/admin/includes/slider1.php (added)
-
tags/1.0.1/admin/includes/slider8.php (added)
-
tags/1.0.1/admin/includes/slider9.php (added)
-
tags/1.0.1/admin/includes/widget0.php (added)
-
tags/1.0.1/admin/includes/widget1.php (added)
-
tags/1.0.1/admin/includes/widget8.php (added)
-
tags/1.0.1/admin/includes/widget9.php (added)
-
tags/1.0.1/admin/views (added)
-
tags/1.0.1/admin/views/admin.php (added)
-
tags/1.0.1/admin/views/admin_addon.php (added)
-
tags/1.0.1/admin/views/admin_advanced.php (added)
-
tags/1.0.1/admin/views/admin_general.php (added)
-
tags/1.0.1/admin/views/admin_lightbox.php (added)
-
tags/1.0.1/admin/views/admin_slider.php (added)
-
tags/1.0.1/admin/views/admin_theme.php (added)
-
tags/1.0.1/admin/views/admin_theme_opt.php (added)
-
tags/1.0.1/admin/views/admin_widget.php (added)
-
tags/1.0.1/admin/views/index.php (added)
-
tags/1.0.1/assets (added)
-
tags/1.0.1/assets/Thumbs.db (added)
-
tags/1.0.1/assets/index.php (added)
-
tags/1.0.1/assets/ms-oauth.php (added)
-
tags/1.0.1/assets/pat1.png (added)
-
tags/1.0.1/assets/pat2.png (added)
-
tags/1.0.1/assets/pat3.png (added)
-
tags/1.0.1/assets/pat4.png (added)
-
tags/1.0.1/assets/pat5.png (added)
-
tags/1.0.1/assets/pt1.png (added)
-
tags/1.0.1/assets/pt2.png (added)
-
tags/1.0.1/assets/pt3.png (added)
-
tags/1.0.1/assets/pt4.png (added)
-
tags/1.0.1/assets/pt5.png (added)
-
tags/1.0.1/assets/unlockpat.png (added)
-
tags/1.0.1/index.php (added)
-
tags/1.0.1/languages (added)
-
tags/1.0.1/languages/index.php (added)
-
tags/1.0.1/languages/optinpoint.pot (added)
-
tags/1.0.1/optinpoint.php (added)
-
tags/1.0.1/public (added)
-
tags/1.0.1/public/assets (added)
-
tags/1.0.1/public/assets/css (added)
-
tags/1.0.1/public/assets/css/index.php (added)
-
tags/1.0.1/public/assets/index.php (added)
-
tags/1.0.1/public/assets/js (added)
-
tags/1.0.1/public/assets/js/index.php (added)
-
tags/1.0.1/public/assets/js/public.js (added)
-
tags/1.0.1/public/class-optinpoint.php (added)
-
tags/1.0.1/public/includes (added)
-
tags/1.0.1/public/includes/addon0.php (added)
-
tags/1.0.1/public/includes/addon1.php (added)
-
tags/1.0.1/public/includes/addon8.php (added)
-
tags/1.0.1/public/includes/addon9.php (added)
-
tags/1.0.1/public/includes/bottom_content.php (added)
-
tags/1.0.1/public/includes/flipbox0.php (added)
-
tags/1.0.1/public/includes/flipbox1.php (added)
-
tags/1.0.1/public/includes/flipbox8.php (added)
-
tags/1.0.1/public/includes/flipbox9.php (added)
-
tags/1.0.1/public/includes/flipbox_content.php (added)
-
tags/1.0.1/public/includes/index.php (added)
-
tags/1.0.1/public/includes/litebox0.php (added)
-
tags/1.0.1/public/includes/litebox1.php (added)
-
tags/1.0.1/public/includes/litebox8.php (added)
-
tags/1.0.1/public/includes/litebox9.php (added)
-
tags/1.0.1/public/includes/litebox_content.php (added)
-
tags/1.0.1/public/includes/slide0.php (added)
-
tags/1.0.1/public/includes/slide1.php (added)
-
tags/1.0.1/public/includes/slide8.php (added)
-
tags/1.0.1/public/includes/slide9.php (added)
-
tags/1.0.1/public/includes/slide_content.php (added)
-
tags/1.0.1/public/includes/topbar0.php (added)
-
tags/1.0.1/public/includes/topbar1.php (added)
-
tags/1.0.1/public/includes/topbar8.php (added)
-
tags/1.0.1/public/includes/topbar9.php (added)
-
tags/1.0.1/public/includes/topbar_content.php (added)
-
tags/1.0.1/public/views (added)
-
tags/1.0.1/public/views/index.php (added)
-
tags/1.0.1/service (added)
-
tags/1.0.1/service/ac (added)
-
tags/1.0.1/service/ac/Account.class.php (added)
-
tags/1.0.1/service/ac/ActiveCampaign.class.php (added)
-
tags/1.0.1/service/ac/Auth.class.php (added)
-
tags/1.0.1/service/ac/Automation.class.php (added)
-
tags/1.0.1/service/ac/Campaign.class.php (added)
-
tags/1.0.1/service/ac/Connector.class.php (added)
-
tags/1.0.1/service/ac/Contact.class.php (added)
-
tags/1.0.1/service/ac/Deal.class.php (added)
-
tags/1.0.1/service/ac/Design.class.php (added)
-
tags/1.0.1/service/ac/Form.class.php (added)
-
tags/1.0.1/service/ac/Group.class.php (added)
-
tags/1.0.1/service/ac/List.class.php (added)
-
tags/1.0.1/service/ac/Message.class.php (added)
-
tags/1.0.1/service/ac/Segment.class.php (added)
-
tags/1.0.1/service/ac/Settings.class.php (added)
-
tags/1.0.1/service/ac/Subscriber.class.php (added)
-
tags/1.0.1/service/ac/Tag.class.php (added)
-
tags/1.0.1/service/ac/Tracking.class.php (added)
-
tags/1.0.1/service/ac/User.class.php (added)
-
tags/1.0.1/service/ac/Webhook.class.php (added)
-
tags/1.0.1/service/ac/config.php (added)
-
tags/1.0.1/service/ac/exceptions (added)
-
tags/1.0.1/service/ac/exceptions/RequestException.php (added)
-
tags/1.0.1/service/aw (added)
-
tags/1.0.1/service/aw/aweber.php (added)
-
tags/1.0.1/service/aw/aweber_api.php (added)
-
tags/1.0.1/service/aw/aweber_collection.php (added)
-
tags/1.0.1/service/aw/aweber_entry.php (added)
-
tags/1.0.1/service/aw/aweber_entry_data_array.php (added)
-
tags/1.0.1/service/aw/aweber_response.php (added)
-
tags/1.0.1/service/aw/curl_object.php (added)
-
tags/1.0.1/service/aw/curl_response.php (added)
-
tags/1.0.1/service/aw/exceptions.php (added)
-
tags/1.0.1/service/aw/oauth_adapter.php (added)
-
tags/1.0.1/service/aw/oauth_application.php (added)
-
tags/1.0.1/service/be (added)
-
tags/1.0.1/service/be/BenchmarkEmail.php (added)
-
tags/1.0.1/service/be/cacert.pem (added)
-
tags/1.0.1/service/cc (added)
-
tags/1.0.1/service/cc/ConstantContact.class.php (added)
-
tags/1.0.1/service/cc/cacert.pem (added)
-
tags/1.0.1/service/cc/redirect.php (added)
-
tags/1.0.1/service/cm (added)
-
tags/1.0.1/service/cm/.gitignore (added)
-
tags/1.0.1/service/cm/.travis.yml (added)
-
tags/1.0.1/service/cm/CONTRIBUTING.md (added)
-
tags/1.0.1/service/cm/HISTORY.md (added)
-
tags/1.0.1/service/cm/LICENSE (added)
-
tags/1.0.1/service/cm/README.md (added)
-
tags/1.0.1/service/cm/RELEASE.md (added)
-
tags/1.0.1/service/cm/class (added)
-
tags/1.0.1/service/cm/class/base_classes.php (added)
-
tags/1.0.1/service/cm/class/cacert.pem (added)
-
tags/1.0.1/service/cm/class/exceptions.php (added)
-
tags/1.0.1/service/cm/class/log.php (added)
-
tags/1.0.1/service/cm/class/serialisation.php (added)
-
tags/1.0.1/service/cm/class/services_json.php (added)
-
tags/1.0.1/service/cm/class/transport.php (added)
-
tags/1.0.1/service/cm/composer.json (added)
-
tags/1.0.1/service/cm/composer.lock (added)
-
tags/1.0.1/service/cm/csrest_administrators.php (added)
-
tags/1.0.1/service/cm/csrest_campaigns.php (added)
-
tags/1.0.1/service/cm/csrest_clients.php (added)
-
tags/1.0.1/service/cm/csrest_general.php (added)
-
tags/1.0.1/service/cm/csrest_lists.php (added)
-
tags/1.0.1/service/cm/csrest_people.php (added)
-
tags/1.0.1/service/cm/csrest_segments.php (added)
-
tags/1.0.1/service/cm/csrest_subscribers.php (added)
-
tags/1.0.1/service/cm/csrest_templates.php (added)
-
tags/1.0.1/service/cm/csrest_transactional_classicemail.php (added)
-
tags/1.0.1/service/cm/csrest_transactional_smartemail.php (added)
-
tags/1.0.1/service/cm/csrest_transactional_timeline.php (added)
-
tags/1.0.1/service/gr (added)
-
tags/1.0.1/service/gr/GetResponseAPI3.class.php (added)
-
tags/1.0.1/service/gr/cacert.pem (added)
-
tags/1.0.1/service/hs (added)
-
tags/1.0.1/service/hs/Hubspot.php (added)
-
tags/1.0.1/service/hs/cacert.pem (added)
-
tags/1.0.1/service/ic (added)
-
tags/1.0.1/service/ic/iContactApi.php (added)
-
tags/1.0.1/service/mm (added)
-
tags/1.0.1/service/mm/MadMimi.class.php (added)
-
tags/1.0.1/service/mm/cacert.pem (added)
-
tags/1.0.1/service/optinpoint-service.php (added)
-
tags/1.0.1/service/sg (added)
-
tags/1.0.1/service/sg/SendGrid.php (added)
-
tags/1.0.1/service/sg/cacert.pem (added)
-
tags/1.0.1/service/vr (added)
-
tags/1.0.1/service/vr/VerticalResponse.class.php (added)
-
tags/1.0.1/service/vr/cacert.pem (added)
-
tags/1.0.1/service/vr/redirect.php (added)
-
tags/1.0.1/src (added)
-
tags/1.0.1/src/default.json (added)
-
tags/1.0.1/src/google_fonts.json (added)
-
tags/1.0.1/uninstall.php (added)
-
tags/1.0.1/widget (added)
-
tags/1.0.1/widget/class-optinpoint-widget.php (added)
-
tags/1.0.1/widget/lang (added)
-
tags/1.0.1/widget/lang/plugin.po (added)
-
tags/1.0.1/widget/views (added)
-
tags/1.0.1/widget/views/admin.php (added)
-
tags/1.0.1/widget/views/widget.php (added)
-
tags/1.0.1/widget/views/widget0.php (added)
-
tags/1.0.1/widget/views/widget1.php (added)
-
tags/1.0.1/widget/views/widget8.php (added)
-
tags/1.0.1/widget/views/widget9.php (added)
-
trunk/README.txt (modified) (5 diffs)
-
trunk/admin/assets/js/admin.js (modified) (14 diffs)
-
trunk/admin/views/admin_advanced.php (modified) (2 diffs)
-
trunk/admin/views/admin_general.php (modified) (2 diffs)
-
trunk/optinpoint.php (modified) (2 diffs)
-
trunk/public/assets/js/public.js (modified) (1 diff)
-
trunk/public/class-optinpoint.php (modified) (8 diffs)
-
trunk/public/includes/litebox8.php (modified) (4 diffs)
-
trunk/service/be (added)
-
trunk/service/be/BenchmarkEmail.php (added)
-
trunk/service/be/cacert.pem (added)
-
trunk/service/hs (added)
-
trunk/service/hs/Hubspot.php (added)
-
trunk/service/hs/cacert.pem (added)
-
trunk/service/optinpoint-service.php (modified) (13 diffs)
-
trunk/service/sg (added)
-
trunk/service/sg/SendGrid.php (added)
-
trunk/service/sg/cacert.pem (added)
Legend:
- Unmodified
- Added
- Removed
-
optinpoint-lite/trunk/README.txt
r1606367 r1611096 1 === OptinPoint Lite - A dvanced PopupPlugin ===1 === OptinPoint Lite - All in One Subscription Plugin === 2 2 Contributors: Voltroid 3 3 Author URI: http://voltroid.com/ 4 4 Plugin URL: http://voltroid.com/optinpoint 5 5 Donate link: http://voltroid.com/optinpoint#donate 6 Tags: newsletter, newsletter signup, checkbox, newsletter, optin, opt-in, registration form, shortcode, sign-up form, subscribe, subscriptions, widget, analytics, automatic, collect email, double optin, email, exit popup, exit-intent, growth, hellobar, lightbox, links, mail, newsletters, optin forms, popover, popup, pop-up, popup domination, popupdomination, posts, subscribe, subscribers, subscription, referrer, search engine, social sharing, cookie, customizable, responsive, aweber, getresponse, icontact, campaign monitor, constant contact, vertical response, active campaign, mad mimi, campaign, form, wordpress6 Tags: plugin, newsletter, newsletter signup, checkbox, newsletter, optin, opt-in, registration form, shortcode, sign-up form, subscribe, subscriptions, widget, analytics, automatic, collect email, double optin, email, exit popup, exit-intent, growth, hellobar, lightbox, links, mail, newsletters, optin forms, popover, popup, pop-up, popup domination, popupdomination, post, posts, subscribe, subscribers, subscription, referrer, search engine, social sharing, cookie, customizable, responsive, aweber, getresponse, icontact, campaign monitor, constant contact, vertical response, active campaign, mad mimi, campaign, form, wordpress, sendgrid, hubspot, benchmark email, woocommerce 7 7 Requires at least: 3.8 8 8 Tested up to: 4.7 9 Stable tag: 1.0. 09 Stable tag: 1.0.1 10 10 License: GPLv2 or later 11 11 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 30 30 * Active Campaign 31 31 * Mad Mimi 32 * SendGrid 33 * HubSpot 34 * Benchmark Email 32 35 33 36 = OptinPoint Lite Features = … … 68 71 > * Depart Intent Tecnology 69 72 > * Open on Click 73 > * WooCommerce Integration 74 > * Hidden Predefined Fields 70 75 > * Cookie Based Lightbox day Customization 71 76 > * Scroll Toggle % Custamization … … 75 80 > * Targeting URL Shorteners 76 81 > * Targeting Specific URLs 82 > * Scrollable Lightbox for long forms 77 83 > * Custom CSS editor 78 84 > * Premium Support 24x7 … … 121 127 122 128 = 1.0.0 = 129 * Added Support for SendGrid 130 * Added Support for HubSpot 131 * Added Support for Benchmark Email 132 * Fixed Minor bugs 133 * Excluded AMP Pages 134 135 = 1.0.0 = 123 136 * Initial release 124 137 -
optinpoint-lite/trunk/admin/assets/js/admin.js
r1606342 r1611096 209 209 } 210 210 $scope.remote.lock(); 211 $http.post(optinpint_script.ajaxurl+'?action=optinpoint_ lite_mailserv_connect&step=0&optinpont_lite_service=1',$scope.mailserv.config)211 $http.post(optinpint_script.ajaxurl+'?action=optinpoint_mailserv_connect&step=0&optinpont_lite_service=1',$scope.mailserv.config) 212 212 .then(function (a) { 213 213 if(a.status == 200 && typeof a.data != "string"){ … … 226 226 } 227 227 ], 228 ltype:0 228 ltype:0, 229 extfill:1 229 230 }, 230 231 cc: {name:'Constant Contact', … … 242 243 var interval = window.setInterval(function() { 243 244 try { 245 console.log(popup); 244 246 if (popup == null || popup.closed) { 245 247 window.clearInterval(interval); … … 273 275 } 274 276 ], 275 ltype:1 277 ltype:1, 278 extfill:1 276 279 }, 277 280 vr: {name:'Vertical Response', … … 325 328 } 326 329 ], 327 ltype:1 330 ltype:1, 331 extfill:1 328 332 }, 329 333 cm:{name:'CampaignMonitor', … … 336 340 } 337 341 $scope.remote.lock(); 338 $http.post(optinpint_script.ajaxurl+'?action=optinpoint_ lite_mailserv_connect&step=0&optinpont_lite_service=1',$scope.mailserv.config)342 $http.post(optinpint_script.ajaxurl+'?action=optinpoint_mailserv_connect&step=0&optinpont_lite_service=1',$scope.mailserv.config) 339 343 .then(function (a) { 340 344 if(a.status == 200 && a.data.http_status_code == 200){ … … 362 366 } 363 367 ], 364 ltype:0 368 ltype:0, 369 extfill:0 365 370 }, 366 371 gr: {name:'GetResponse', … … 373 378 } 374 379 $scope.remote.lock(); 375 $http.post(optinpint_script.ajaxurl+'?action=optinpoint_ lite_mailserv_connect&step=0&optinpont_lite_service=1',$scope.mailserv.config)380 $http.post(optinpint_script.ajaxurl+'?action=optinpoint_mailserv_connect&step=0&optinpont_lite_service=1',$scope.mailserv.config) 376 381 .then(function (a) { 377 382 if(a.status == 200 && !(isset(a.data.code))){ … … 391 396 } 392 397 ], 393 ltype:1 398 ltype:1, 399 extfill:0 400 }, 401 sg: {name:'SendGrid', 402 func:[ 403 function(){ 404 if($scope.remote.chk())return; 405 if(!isset($scope.mailserv.config.key) || !isset($scope.mailserv.config.key[0]) || $scope.mailserv.config.key[0].length == 0){ 406 $scope.addErr('Enter API Key'); 407 return; 408 } 409 $scope.remote.lock(); 410 $http.post(optinpint_script.ajaxurl+'?action=optinpoint_mailserv_connect&step=0&optinpont_lite_service=1',$scope.mailserv.config) 411 .then(function (a) { 412 if(a.status == 200 && !(isset(a.data.errors))){ 413 $scope.mailserv.isConfig = 3; 414 $scope.remote.unlock(2); 415 } 416 else{ 417 $scope.addErr('Incorrect API Key'); 418 $scope.remote.unlock(3); 419 } 420 },function (a) { 421 $scope.remote.unlock(3); 422 $scope.addErr('Error'); 423 }); 424 } 425 ], 426 ltype:1, 427 extfill:1 428 }, 429 hs: {name:'Hubspot', 430 func:[ 431 function(){ 432 if($scope.remote.chk())return; 433 if(!isset($scope.mailserv.config.key) || !isset($scope.mailserv.config.key[0]) || $scope.mailserv.config.key[0].length == 0){ 434 $scope.addErr('Enter API Key'); 435 return; 436 } 437 $scope.remote.lock(); 438 $http.post(optinpint_script.ajaxurl+'?action=optinpoint_mailserv_connect&step=0&optinpont_lite_service=1',$scope.mailserv.config) 439 .then(function (a) { 440 if(a.status == 200 && a.data.status == 200){ 441 $scope.mailserv.isConfig = 3; 442 $scope.remote.unlock(2); 443 } 444 else{ 445 $scope.addErr('Incorrect API Key'); 446 $scope.remote.unlock(3); 447 } 448 },function (a) { 449 $scope.remote.unlock(3); 450 $scope.addErr('Error'); 451 }); 452 } 453 ], 454 ltype:1, 455 extfill:0 456 }, 457 be: {name:'Benchmark Email', 458 func:[ 459 function(){ 460 if($scope.remote.chk())return; 461 if(!isset($scope.mailserv.config.key) || !isset($scope.mailserv.config.key[0]) || $scope.mailserv.config.key[0].length == 0){ 462 $scope.addErr('Enter API Key'); 463 return; 464 } 465 $scope.remote.lock(); 466 $http.post(optinpint_script.ajaxurl+'?action=optinpoint_mailserv_connect&step=0&optinpont_lite_service=1',$scope.mailserv.config) 467 .then(function (a) { 468 if(a.status == 200 && !isset(a.data.faultCode)){ 469 $scope.mailserv.isConfig = 3; 470 $scope.remote.unlock(2); 471 } 472 else{ 473 $scope.addErr('Incorrect API Key'); 474 $scope.remote.unlock(3); 475 } 476 },function (a) { 477 $scope.remote.unlock(3); 478 $scope.addErr('Error'); 479 }); 480 } 481 ], 482 ltype:1, 483 extfill:0 394 484 }, 395 485 ac: {name:'Active Campaign', … … 419 509 } 420 510 ], 421 ltype:1 511 ltype:1, 512 extfill:0 422 513 }, 423 514 ic: {name:'iContact', … … 430 521 } 431 522 $scope.remote.lock(); 432 $http.post(optinpint_script.ajaxurl+'?action=optinpoint_ lite_mailserv_connect&step=0&optinpont_lite_service=1',$scope.mailserv.config)523 $http.post(optinpint_script.ajaxurl+'?action=optinpoint_mailserv_connect&step=0&optinpont_lite_service=1',$scope.mailserv.config) 433 524 .then(function (a) { 434 525 if(a.status == 200 && !(isset(a.data.errors))){ … … 460 551 } 461 552 ], 462 ltype:1 553 ltype:1, 554 extfill:1 463 555 }, 464 556 mm: {name:'Mad Mimi', … … 487 579 } 488 580 ], 489 ltype:1 581 ltype:1, 582 extfill:1 490 583 } 491 584 }, … … 687 780 }, 688 781 extra:{ 782 fill:function(){ 783 return ($scope.mailserv.list[$scope.data.mailserv.id].extfill); 784 }, 689 785 add:function(i){ 690 786 if(!isset($scope.form.tform.fields[i].extras))$scope.form.tform.fields[i].extras = []; -
optinpoint-lite/trunk/admin/views/admin_advanced.php
r1606342 r1611096 204 204 </div> 205 205 <div class="fl_row"> 206 <div class="feat">WooCommerce Integration</div> 207 <div class="featbox pro grey"></div> 208 <div class="featbox avail blue"></div> 209 </div> 210 <div class="fl_row"> 206 211 <div class="feat">A/B Testing</div> 207 212 <div class="featbox pro grey"></div> … … 230 235 <div class="fl_row"> 231 236 <div class="feat">Advanced Addon Behaviour Customizations</div> 237 <div class="featbox pro grey"></div> 238 <div class="featbox avail blue"></div> 239 </div> 240 <div class="fl_row"> 241 <div class="feat">Hidden Predefined Fields</div> 242 <div class="featbox pro grey"></div> 243 <div class="featbox avail blue"></div> 244 </div> 245 <div class="fl_row"> 246 <div class="feat">Scrollable Lightbox</div> 232 247 <div class="featbox pro grey"></div> 233 248 <div class="featbox avail blue"></div> -
optinpoint-lite/trunk/admin/views/admin_general.php
r1606342 r1611096 36 36 </div> 37 37 <div ng-switch-when="gr"> 38 <div ng-switch="mailserv.step"> 39 <div ng-switch-when="0"> 40 <opttext ng-model="mailserv.config.key[0]" optlab="API Key"></opttext> 41 </div> 42 </div> 43 </div> 44 <div ng-switch-when="sg"> 45 <div ng-switch="mailserv.step"> 46 <div ng-switch-when="0"> 47 <opttext ng-model="mailserv.config.key[0]" optlab="API Key"></opttext> 48 </div> 49 </div> 50 </div> 51 <div ng-switch-when="hs"> 52 <div ng-switch="mailserv.step"> 53 <div ng-switch-when="0"> 54 <opttext ng-model="mailserv.config.key[0]" optlab="API Key"></opttext> 55 </div> 56 </div> 57 </div> 58 <div ng-switch-when="be"> 38 59 <div ng-switch="mailserv.step"> 39 60 <div ng-switch-when="0"> … … 275 296 </div> 276 297 </div> 277 <div class="optpoint_tablefed_row" ng-if=" ['aw','ic','cc','vr'].indexOf(data.mailserv.id) >= 0&& ['checkbox','radio','select','multiselect'].indexOf(cfield.type) >= 0">298 <div class="optpoint_tablefed_row" ng-if="field.extra.fill() && ['checkbox','radio','select','multiselect'].indexOf(cfield.type) >= 0"> 278 299 <label>Options</label> 279 300 <div class="optpoint_tablefed_col"> 280 301 <div class="optpoint_tablefed_opt" ng-repeat="(k,v) in cfield.extras track by k"> 281 <input type="text" class="optpoint_tabtext" required ng-model="cfield.extras[k].name"> 282 <div class="bar"></div> 283 <div class="fed_ico mul_del" ng-click="field.extra.del($parent.$index, $index)"></div> 302 <div ng-if="field.extra.fill()"> 303 <input type="text" class="optpoint_tabtext" required ng-model="cfield.extras[k].label" ng-if="cfield.extras[k].label"> 304 <input type="text" class="optpoint_tabtext" required ng-model="cfield.extras[k].name" ng-if="!cfield.extras[k].label"> 305 <div class="bar"></div> 306 <div class="fed_ico mul_del" ng-click="field.extra.del($parent.$index, $index)"></div> 307 </div> 308 <div ng-if="!field.extra.fill()"> 309 {{cfield.extras[k].label || cfield.extras[k].name}} 310 </div> 284 311 </div> 285 <div class="optpoint_tablefed_optadd" ng-click="field.extra.add($parent.$index)" ></div>312 <div class="optpoint_tablefed_optadd" ng-click="field.extra.add($parent.$index)" ng-if="field.extra.fill()"></div> 286 313 <div ng-if="!cfield.extras || cfield.extras.length == 0" class="optpoint_tablefed_optemp">Empty</div> 287 314 </div> -
optinpoint-lite/trunk/optinpoint.php
r1606342 r1611096 11 11 * Plugin Name: OptinPoint Lite - Advanced Subscription Hub For Wordpress 12 12 * Plugin URI: http://voltroid.com/optinpoint 13 * Description: Easy to Use Optin Plugin14 * Version: 1.0. 013 * Description: All-in-one Subscription Plugin 14 * Version: 1.0.1 15 15 * Author: Voltroid 16 16 * Author URI: http://voltroid.com … … 27 27 28 28 require_once( plugin_dir_path( __FILE__ ) . 'public/class-optinpoint.php' ); 29 require_once( plugin_dir_path( __FILE__ ) . 'service/optinpoint-service.php' ); 29 30 if(isset($_GET['optinpont_lite_service'])) 31 require_once( plugin_dir_path( __FILE__ ) . 'service/optinpoint-service.php' ); 32 30 33 31 34 register_activation_hook( __FILE__, array( 'OptinPoint_Lite_Assistant', 'activate' ) ); 32 if(isset($_GET['optinpont_lite_service'])) 33 register_deactivation_hook( __FILE__, array( 'OptinPoint_Lite_Assistant', 'deactivate' ) ); 35 register_deactivation_hook( __FILE__, array( 'OptinPoint_Lite_Assistant', 'deactivate' ) ); 34 36 35 37 -
optinpoint-lite/trunk/public/assets/js/public.js
r1606342 r1611096 596 596 case 'date':a=new RegExp(/^[0-9]{1,2}\/[0-9]{1,2}\/[0-9]{4}?$/gm),e=a.test(w); 597 597 break; 598 default:e=true; 599 break; 598 600 } 599 601 return e?!0:!1; -
optinpoint-lite/trunk/public/class-optinpoint.php
r1606342 r1611096 21 21 * @var string 22 22 */ 23 const VERSION = '1.0. 0';23 const VERSION = '1.0.1'; 24 24 25 25 /** … … 90 90 } 91 91 public function loader(){ 92 global $post; 93 $values = get_post_custom( $post->ID ); 94 $cmeta = isset( $values['optinpoint_meta'] ) ? json_decode($values['optinpoint_meta'][0],true) : array(); 95 $this->cmeta = $cmeta; 96 $cat = get_the_category(); 97 $option_name = 'optinpoint_meta_cat_' . (isset($cat[0])?$cat[0]->term_id:''); 98 $option_name_r = get_option( $option_name ); 99 $cmeta_cat = ($option_name_r ? json_decode($option_name_r,true) : array()); 100 $this->cmeta_cat = $cmeta_cat; 101 $this->isload = array(); 102 if(((isset($cmeta['Lightbox']['status']) && $cmeta['Lightbox']['status'] == '1') || (!isset($cmeta['Lightbox']['status']) && isset($cmeta_cat['Lightbox']['status']) && $cmeta_cat['Lightbox']['status'] == '1') || ( !isset($cmeta_cat['Lightbox']['status']) && !isset($cmeta['Lightbox']['status']) && isset($this->settings["litebox"]))) && $this->user_status() && $this->referral() && $this->pagetype('l')) 92 if(!is_single() && !is_page() && !is_404()){ 93 $cmeta = array(); 94 $cmeta_cat = array(); 95 } 96 else{ 97 global $post; 98 $values = get_post_custom( $post->ID ); 99 $cmeta = isset( $values['optinpoint_meta'] ) ? json_decode($values['optinpoint_meta'][0],true) : array(); 100 $cat = get_the_category(); 101 $option_name = 'optinpoint_meta_cat_' . (isset($cat[0])?$cat[0]->term_id:''); 102 $option_name_r = get_option( $option_name ); 103 $cmeta_cat = ($option_name_r ? json_decode($option_name_r,true) : array()); 104 } 105 $this->cmeta = $cmeta; 106 $this->cmeta_cat = $cmeta_cat; 107 $this->isload = array(); 108 109 if(((isset($cmeta['Lightbox']['status'])&& $cmeta['Lightbox']['status'] == '1' ) || (!isset($cmeta['Lightbox']['status']) && isset($cmeta_cat['Lightbox']['status']) && $cmeta_cat['Lightbox']['status'] == '1') || ( !isset($cmeta_cat['Lightbox']['status']) && !isset($cmeta['Lightbox']['status']) && isset($this->settings["litebox"])&& $this->pagetype('l'))) && $this->user_status() && $this->referral() ) 103 110 $this->isload['l']=true; 104 if(((isset($cmeta['Slider']['status']) && $cmeta['Slider']['status'] == '1') || (!isset($cmeta['Slider']['status']) && isset($cmeta_cat['Slider']['status']) && $cmeta_cat['Slider']['status'] == '1') || ( !isset($cmeta_cat['Slider']['status']) && !isset($cmeta['Slider']['status']) && isset($this->settings["slider"]))) && $this->pagetype('s') && $this->user_status() && $this->referral())111 if(((isset($cmeta['Slider']['status'])&& $cmeta['Slider']['status'] == '1' ) || (!isset($cmeta['Slider']['status']) && isset($cmeta_cat['Slider']['status']) && $cmeta_cat['Slider']['status'] == '1') || ( !isset($cmeta_cat['Slider']['status']) && !isset($cmeta['Slider']['status']) && isset($this->settings["slider"])&& $this->pagetype('s'))) && $this->user_status() && $this->referral() ) 105 112 $this->isload['s']=true; 106 if(((isset($cmeta['Addon']['status']) && $cmeta['Addon']['status'] == '1') || (!isset($cmeta['Addon']['status']) && isset($cmeta_cat['Addon']['status']) && $cmeta_cat['Addon']['status'] == '1') || ( !isset($cmeta_cat['Addon']['status']) && !isset($cmeta['Addon']['status']) && isset($this->settings["addon"]))) && $this->user_status() && $this->referral() && $this->pagetype('a'))113 if(((isset($cmeta['Addon']['status'])&& $cmeta['Addon']['status'] == '1') || (!isset($cmeta['Addon']['status']) && isset($cmeta_cat['Addon']['status']) && $cmeta_cat['Addon']['status'] == '1') || ( !isset($cmeta_cat['Addon']['status']) && !isset($cmeta['Addon']['status']) && isset($this->settings["addon"])&& $this->pagetype('a'))) && $this->user_status() && $this->referral() ) 107 114 $this->isload['a']=true; 108 if(((isset($cmeta['Flipbox']['status']) && $cmeta['Flipbox']['status'] == '1') || (!isset($cmeta['Flipbox']['status']) && isset($cmeta_cat['Flipbox']['status']) && $cmeta_cat['Flipbox']['status'] == '1') || ( !isset($cmeta_cat['Flipbox']['status']) && !isset($cmeta['Flipbox']['status']) && isset($this->settings["flipbox"]))) && $this->pagetype('f'))115 if(((isset($cmeta['Flipbox']['status'])&& $cmeta['Flipbox']['status'] == '1') || (!isset($cmeta['Flipbox']['status']) && isset($cmeta_cat['Flipbox']['status']) && $cmeta_cat['Flipbox']['status'] == '1') || ( !isset($cmeta_cat['Flipbox']['status']) && !isset($cmeta['Flipbox']['status']) && isset($this->settings["flipbox"])&& $this->pagetype('f'))) && $this->user_status() && $this->referral() ) 109 116 $this->isload['f']=true; 110 if(((isset($cmeta['Topbar']['status']) && $cmeta['Topbar']['status'] == '1') || (!isset($cmeta['Topbar']['status']) && isset($cmeta_cat['Topbar']['status']) && $cmeta_cat['Topbar']['status'] == '1') || ( !isset($cmeta_cat['Topbar']['status']) && !isset($cmeta['Topbar']['status']) && isset($this->settings["topbar"]))) && $this->pagetype('t'))117 if(((isset($cmeta['Topbar']['status'])&& $cmeta['Topbar']['status'] == '1') || (!isset($cmeta['Topbar']['status']) && isset($cmeta_cat['Topbar']['status']) && $cmeta_cat['Topbar']['status'] == '1') || ( !isset($cmeta_cat['Topbar']['status']) && !isset($cmeta['Topbar']['status']) && isset($this->settings["topbar"])&& $this->pagetype('t'))) && $this->user_status() && $this->referral() ) 111 118 $this->isload['t']=true; 112 if(( (isset($cmeta['Widget']['status']) && $cmeta['Widget']['status'] == '1') || (!isset($cmeta['Widget']['status']) && isset($cmeta_cat['Widget']['status']) && $cmeta_cat['Widget']['status'] == '1') || ( !isset($cmeta_cat['Widget']['status']) && !isset($cmeta['Widget']['status']) && isset($this->settings["widget"]))))119 if((isset($cmeta['Widget']['status'])&& $cmeta['Widget']['status'] == '1') || (!isset($cmeta['Widget']['status']) && isset($cmeta_cat['Widget']['status']) && $cmeta_cat['Widget']['status'] == '1') || ( !isset($cmeta_cat['Widget']['status']) && !isset($cmeta['Widget']['status']) && isset($this->settings["widget"]))) 113 120 $this->isload['w']=true; 114 121 global $oppo_font; … … 235 242 .' opporeq="'.(((isset($f['req']) && $f['req']) || (isset($f['foreq']) && $f['foreq']))?'true':'false').'"' 236 243 .'>' 237 .'<span>'. $v['name'].'</span>'244 .'<span>'.(isset($v['label'])?$v['label']:$v['name']).'</span>' 238 245 .'</label>'; 239 246 } … … 255 262 .' opporeq="'.(((isset($f['req']) && $f['req']) || (isset($f['foreq']) && $f['foreq']))?'true':'false').'"' 256 263 .'>' 257 .'<span>'. $v['name'].'</span>'264 .'<span>'.(isset($v['label'])?$v['label']:$v['name']).'</span>' 258 265 .'</label>'; 259 266 } … … 269 276 $t = '<option value="">'.$f['label'].'</option>'; 270 277 foreach ($f['extras'] as $v) { 271 $t.= '<option value="'.$v['name'].'">'. $v['name'].'</option>';278 $t.= '<option value="'.$v['name'].'">'.(isset($v['label'])?$v['label']:$v['name']).'</option>'; 272 279 } 273 280 … … 284 291 $t = '<option value="" disabled>'.$f['label'].'</option>'; 285 292 foreach ($f['extras'] as $v) { 286 $t.= '<option value="'.$v['name'].'">'. $v['name'].'</option>';293 $t.= '<option value="'.$v['name'].'">'.(isset($v['label'])?$v['label']:$v['name']).'</option>'; 287 294 } 288 295 … … 965 972 */ 966 973 public function addon_adder($content){ 974 if(function_exists(is_amp_endpoint)) 975 if(is_amp_endpoint()) 976 return $content; 967 977 968 978 if(isset($this->isload['a'])){ … … 1021 1031 */ 1022 1032 function addon_scode($atts, $content = null) { 1033 if(function_exists(is_amp_endpoint)) 1034 if(is_amp_endpoint()) 1035 return $content; 1023 1036 $this->loadscripts(); 1024 1037 ob_start(); -
optinpoint-lite/trunk/public/includes/litebox8.php
r1606342 r1611096 529 529 #optinpoint-main .optinpoint-social{ 530 530 display: inline-block; 531 margin: 12px auto 0;531 margin: 0 auto; 532 532 height: 90px; 533 533 width: 100%; … … 656 656 #optinpoint-main.wosoc .optinpoint-social { 657 657 display: none; 658 } 659 #optinpoint-main.wosoc .optinpoint { 660 height: 100%; 658 661 } 659 662 … … 699 702 </div> 700 703 704 </form> 705 <div class="optinpoint-feedback" oppoerr="gen"></div> 706 </div> 701 707 <div class="optinpoint-social"> 702 708 <div class="optinpoint-soc optinpoint-fb"></div> … … 705 711 </div> 706 712 707 </form>708 <div class="optinpoint-feedback" oppoerr="gen"></div>709 </div>710 713 </div> 711 714 <div class="optinpoint-close-button"></div> -
optinpoint-lite/trunk/service/optinpoint-service.php
r1606342 r1611096 26 26 require_once('vr/VerticalResponse.class.php'); 27 27 require_once('ac/ActiveCampaign.class.php'); 28 require_once('sg/SendGrid.php'); 29 require_once('hs/Hubspot.php'); 30 require_once('be/BenchmarkEmail.php'); 28 31 class OptinPoint_Lite_Service { 29 32 … … 49 52 $this->wrap = new GetResponse($key[0]); 50 53 break; 54 case 'sg': 55 $this->wrap = new SendGrid($key[0]); 56 break; 57 case 'hs': 58 $this->wrap = new Hubspot($key[0]); 59 break; 60 case 'be': 61 $this->wrap = new benchmarkemail_api($key[0]); 62 break; 51 63 case 'ic': 52 64 iContactApi::getInstance()->setConfig(array( … … 90 102 echo json_encode($this->wrap->accounts()); 91 103 break; 104 case 'sg': 105 echo json_encode($this->wrap->test()); 106 break; 107 case 'hs': 108 echo json_encode($this->wrap->test()); 109 break; 110 case 'be': 111 echo json_encode($this->wrap->lists()); 112 break; 92 113 case 'ic': 93 114 echo json_encode($this->wrap->getCampaigns()); … … 180 201 echo json_encode($l); 181 202 break; 203 case 'sg': 204 $t = $this->wrap->getLists()['lists']; 205 $l = array(); 206 if(count($t) > 0){ 207 foreach ($t as $v) { 208 array_push($l, array( 209 'id' => $v['id'], 210 'name' => $v['name'] 211 )); 212 } 213 } 214 echo json_encode($l); 215 break; 216 case 'hs': 217 $t = $this->wrap->getLists()['data']['lists']; 218 $l = array(); 219 if(count($t) > 0){ 220 foreach ($t as $v) { 221 if($v['dynamic'])continue; 222 array_push($l, array( 223 'id' => $v['listId'], 224 'name' => $v['name'] 225 )); 226 } 227 } 228 echo json_encode($l); 229 break; 230 case 'be': 231 $t = $this->wrap->lists(); 232 $l = array(); 233 if(count($t) > 0){ 234 foreach ($t as $v) { 235 array_push($l, array( 236 'id' => $v['id'], 237 'name' => $v['listname'] 238 )); 239 } 240 } 241 echo json_encode($l); 242 break; 182 243 case 'cc': 183 244 $t = (array) $this->wrap->getLists()->data; … … 206 267 echo json_encode($l); 207 268 break; 208 case 'mm':269 case 'mm': 209 270 $t = (array) $this->wrap->getLists()->data; 210 271 $l = array(); … … 351 412 echo json_encode($l); 352 413 break; 414 case 'sg': 415 $t = $this->wrap->getCustomFields()['custom_fields']; 416 $l = array( 417 array( 418 'id'=>'email', 419 'name'=>'email', 420 'label'=>'Email Address', 421 'type'=>'text', 422 'format'=>'email', 423 'req'=>1, 424 'icon'=>'idef' 425 ), 426 array( 427 'id'=>'fname', 428 'name'=>'first name', 429 'label'=>'First Name', 430 'type'=>'text', 431 'format'=>'text', 432 'icon'=>'idef' 433 ), 434 array( 435 'id'=>'lname', 436 'name'=>'last name', 437 'label'=>'Last Name', 438 'type'=>'text', 439 'format'=>'text', 440 'icon'=>'idef' 441 ) 442 ); 443 if(!empty($t)){ 444 foreach ($t as $v) { 445 array_push($l, array( 446 'id' => $v['id'], 447 'name' => $v['name'], 448 'label' => $v['name'], 449 'type' => 'text', 450 'typesel'=>'single', 451 'format' => $v['type'], 452 'icon'=>'idef', 453 'nof'=>1 454 )); 455 } 456 } 457 echo json_encode($l); 458 break; 459 case 'hs': 460 $t = $this->wrap->getCustomFields(); 461 $l = array( 462 array( 463 'id'=>'email', 464 'name'=>'email', 465 'label'=>'Email Address', 466 'type'=>'text', 467 'format'=>'email', 468 'req'=>1, 469 'icon'=>'idef' 470 ), 471 array( 472 'id'=>'fname', 473 'name'=>'first name', 474 'label'=>'First Name', 475 'type'=>'text', 476 'format'=>'text', 477 'icon'=>'idef' 478 ), 479 array( 480 'id'=>'lname', 481 'name'=>'last name', 482 'label'=>'Last Name', 483 'type'=>'text', 484 'format'=>'text', 485 'icon'=>'idef' 486 ) 487 ); 488 if(!empty($t['data'])){ 489 foreach ($t['data'] as $v) { 490 if(!$v['formField'] || in_array($v['name'], array('email','firstname','lastname')))continue; 491 array_push($l, array( 492 'id' => $v['name'], 493 'name' => $v['label'], 494 'label' => $v['label'], 495 'type' => $v['fieldType'], 496 'format' => $this->formatsel('hs',$v['type']), 497 'extras' => $this->extsel('hs',$v['options']), 498 'icon'=>'idef', 499 'nof'=>1, 500 )); 501 } 502 } 503 echo json_encode($l); 504 break; 353 505 case 'ic': 354 506 $t = $this->wrap->getFields(); … … 768 920 'typesel'=>'single', 769 921 'noid'=>1, 922 'nof'=>1 923 ) 924 ); 925 echo json_encode($l); 926 break; 927 case 'be': 928 $l = array( 929 array( 930 'id'=>'email', 931 'name'=>'email', 932 'label'=>'Email Address', 933 'type'=>'text', 934 'format'=>'email', 935 'req'=>1, 936 'icon'=>'idef' 937 ), 938 array( 939 'id'=>'fname', 940 'name'=>'first name', 941 'label'=>'First Name', 942 'type'=>'text', 943 'format'=>'text', 944 'icon'=>'idef' 945 ), 946 array( 947 'id'=>'lname', 948 'name'=>'last name', 949 'label'=>'Last Name', 950 'type'=>'text', 951 'format'=>'text', 952 'icon'=>'idef' 953 ), 954 array( 955 'id'=>'middlename', 956 'name'=>'middle name', 957 'label'=>'Middle Name', 958 'type'=>'text', 959 'format'=>'text', 960 'icon'=>'idef' 961 ), 962 array( 963 'id'=>'field1', 964 'name'=>'address', 965 'label'=>'Address', 966 'type'=>'text', 967 'format'=>'text', 968 'icon'=>'idef', 969 'typesel'=>'single', 970 'nof'=>1 971 ), 972 array( 973 'id'=>'field2', 974 'name'=>'city', 975 'label'=>'City', 976 'type'=>'text', 977 'format'=>'text', 978 'icon'=>'idef', 979 'typesel'=>'single', 980 'nof'=>1 981 ), 982 array( 983 'id'=>'field3', 984 'name'=>'state', 985 'label'=>'State', 986 'type'=>'text', 987 'format'=>'text', 988 'icon'=>'idef', 989 'typesel'=>'single', 990 'nof'=>1 991 ), 992 array( 993 'id'=>'field4', 994 'name'=>'zip', 995 'label'=>'Zip', 996 'type'=>'text', 997 'format'=>'text', 998 'icon'=>'idef', 999 'typesel'=>'single', 1000 'nof'=>1 1001 ), 1002 array( 1003 'id'=>'field5', 1004 'name'=>'country', 1005 'label'=>'Country', 1006 'type'=>'text', 1007 'format'=>'text', 1008 'icon'=>'idef', 1009 'typesel'=>'single', 1010 'nof'=>1 1011 ), 1012 array( 1013 'id'=>'field6', 1014 'name'=>'phone', 1015 'label'=>'Phone', 1016 'type'=>'text', 1017 'format'=>'text', 1018 'icon'=>'idef', 1019 'typesel'=>'single', 1020 'nof'=>1 1021 ), 1022 array( 1023 'id'=>'field7', 1024 'name'=>'fax', 1025 'label'=>'Fax', 1026 'type'=>'text', 1027 'format'=>'text', 1028 'icon'=>'idef', 1029 'typesel'=>'single', 1030 'nof'=>1 1031 ), 1032 array( 1033 'id'=>'field8', 1034 'name'=>'cell phone', 1035 'label'=>'Cell Phone', 1036 'type'=>'text', 1037 'format'=>'text', 1038 'icon'=>'idef', 1039 'typesel'=>'single', 1040 'nof'=>1 1041 ), 1042 array( 1043 'id'=>'field9', 1044 'name'=>'company name', 1045 'label'=>'Company Name', 1046 'type'=>'text', 1047 'format'=>'text', 1048 'icon'=>'idef', 1049 'typesel'=>'single', 1050 'nof'=>1 1051 ), 1052 array( 1053 'id'=>'field10', 1054 'name'=>'job title', 1055 'label'=>'Job Title', 1056 'type'=>'text', 1057 'format'=>'text', 1058 'icon'=>'idef', 1059 'typesel'=>'single', 1060 'nof'=>1 1061 ), 1062 array( 1063 'id'=>'field11', 1064 'name'=>'business phone', 1065 'label'=>'Business Phone', 1066 'type'=>'text', 1067 'format'=>'text', 1068 'icon'=>'idef', 1069 'typesel'=>'single', 1070 'nof'=>1 1071 ), 1072 array( 1073 'id'=>'field12', 1074 'name'=>'business fax', 1075 'label'=>'Business Fax', 1076 'type'=>'text', 1077 'format'=>'text', 1078 'icon'=>'idef', 1079 'typesel'=>'single', 1080 'nof'=>1 1081 ), 1082 array( 1083 'id'=>'field13', 1084 'name'=>'business address', 1085 'label'=>'Business Address', 1086 'type'=>'text', 1087 'format'=>'text', 1088 'icon'=>'idef', 1089 'typesel'=>'single', 1090 'nof'=>1 1091 ), 1092 array( 1093 'id'=>'field14', 1094 'name'=>'business city', 1095 'label'=>'Business City', 1096 'type'=>'text', 1097 'format'=>'text', 1098 'icon'=>'idef', 1099 'typesel'=>'single', 1100 'nof'=>1 1101 ), 1102 array( 1103 'id'=>'field15', 1104 'name'=>'business state', 1105 'label'=>'Business State', 1106 'type'=>'text', 1107 'format'=>'text', 1108 'icon'=>'idef', 1109 'typesel'=>'single', 1110 'nof'=>1 1111 ), 1112 array( 1113 'id'=>'field16', 1114 'name'=>'business zip', 1115 'label'=>'Business Zip', 1116 'type'=>'text', 1117 'format'=>'text', 1118 'icon'=>'idef', 1119 'typesel'=>'single', 1120 'nof'=>1 1121 ), 1122 array( 1123 'id'=>'field17', 1124 'name'=>'business country', 1125 'label'=>'Business Country', 1126 'type'=>'text', 1127 'format'=>'text', 1128 'icon'=>'idef', 1129 'typesel'=>'single', 1130 'nof'=>1 1131 ), 1132 array( 1133 'id'=>'field18', 1134 'name'=>'notes', 1135 'label'=>'Notes', 1136 'type'=>'text', 1137 'format'=>'text', 1138 'icon'=>'idef', 1139 'typesel'=>'single', 1140 'nof'=>1 1141 ), 1142 array( 1143 'id'=>'field19', 1144 'name'=>'date 1', 1145 'label'=>'Date 1', 1146 'type'=>'text', 1147 'format'=>'text', 1148 'icon'=>'idef', 1149 'typesel'=>'single', 1150 'nof'=>1 1151 ), 1152 array( 1153 'id'=>'field20', 1154 'name'=>'date 2', 1155 'label'=>'Date 2', 1156 'type'=>'text', 1157 'format'=>'text', 1158 'icon'=>'idef', 1159 'typesel'=>'single', 1160 'nof'=>1 1161 ), 1162 array( 1163 'id'=>'field21', 1164 'name'=>'extra 3', 1165 'label'=>'Extra 3', 1166 'type'=>'text', 1167 'format'=>'text', 1168 'icon'=>'idef', 1169 'typesel'=>'single', 1170 'nof'=>1 1171 ), 1172 array( 1173 'id'=>'field22', 1174 'name'=>'extra 4', 1175 'label'=>'Extra 4', 1176 'type'=>'text', 1177 'format'=>'text', 1178 'icon'=>'idef', 1179 'typesel'=>'single', 1180 'nof'=>1 1181 ), 1182 array( 1183 'id'=>'field23', 1184 'name'=>'extra 5', 1185 'label'=>'Extra 5', 1186 'type'=>'text', 1187 'format'=>'text', 1188 'icon'=>'idef', 1189 'typesel'=>'single', 1190 'nof'=>1 1191 ), 1192 array( 1193 'id'=>'field24', 1194 'name'=>'extra 6', 1195 'label'=>'Extra 6', 1196 'type'=>'text', 1197 'format'=>'text', 1198 'icon'=>'idef', 1199 'typesel'=>'single', 770 1200 'nof'=>1 771 1201 ) … … 904 1334 } 905 1335 break; 1336 case 'hs': 1337 switch ($t) { 1338 case 'enumeration':return 'text'; 1339 break; 1340 default:return $t; 1341 break; 1342 } 1343 break; 906 1344 default: 907 1345 break; … … 922 1360 } 923 1361 break; 1362 case 'hs': 1363 foreach ($t as $k => $v) { 1364 array_push($a, array('name' => $v['value'],'label' => $v['label'])); 1365 } 1366 break; 924 1367 } 925 1368 return $a; 926 1369 } 927 1370 function subscribe($form,$data){ 1371 foreach ($form['fields'] as $v) { 1372 if(isset($v['hidden']) && $v['hidden']){ 1373 switch ($v['type']) { 1374 case 'radio': 1375 case 'checkbox': 1376 case 'select': 1377 case 'multiselect': 1378 $a=array(); 1379 foreach ($v['extras'] as $g) { 1380 if(isset($g['hid']) && $g['hid']) 1381 array_push($a, $g['name']); 1382 } 1383 break; 1384 case 'text': 1385 case 'textarea': 1386 $a=(isset($v['value'])? $v['value']: ''); 1387 break; 1388 default: 1389 # code... 1390 break; 1391 } 1392 $data[$v['id']] = $a; 1393 } 1394 } 928 1395 switch ($this->config['id']) { 929 1396 case 'aw': … … 1024 1491 return '1';//subscribed 1025 1492 } 1493 break; 1494 case 'sg': 1495 $user = $data; 1496 if(isset($user['fname'])){ 1497 $user['first_name'] = $user['fname']; 1498 unset($user['fname']); 1499 } 1500 if(isset($user['lname'])){ 1501 $user['last_name'] = $user['lname']; 1502 unset($user['lname']); 1503 } 1504 $e = $this->wrap->addContact(array($user)); 1505 if($e['error_count']) 1506 return '0';//error 1507 $t = $this->wrap->addToList($e['persisted_recipients'][0],$form['list']['id']); 1508 if($e['new_count']) 1509 return '1';//subscribed 1510 return '2';//already 1511 break; 1512 case 'be': 1513 $user = $data; 1514 if(isset($user['fname'])){ 1515 $user['firstname'] = $user['fname']; 1516 unset($user['fname']); 1517 } 1518 if(isset($user['lname'])){ 1519 $user['lastname'] = $user['lname']; 1520 unset($user['lname']); 1521 } 1522 $t = $this->wrap->find($user['email'],$form['list']['id']); 1523 if(!empty($t))return '2';//already 1524 $e = $this->wrap->addContact($user,$form['list']['id']); 1525 if($e == '1')return '1';//subscribed 1526 return '0';//error 1527 break; 1528 case 'hs': 1529 if(isset($data['fname'])){ 1530 $data['firstname'] = $data['fname']; 1531 unset($data['fname']); 1532 } 1533 if(isset($data['lname'])){ 1534 $data['lastname'] = $data['lname']; 1535 unset($data['lname']); 1536 } 1537 $user = array(); 1538 foreach ($data as $key => $value) { 1539 array_push($user, array( 1540 "property" => $key, 1541 "value" => $value 1542 )); 1543 } 1544 $e = $this->wrap->addContact(array( "properties" => $user)); 1545 if($e['status']==400) 1546 return '0';//error 1547 $atl = array("emails" => array($data['email'])); 1548 $t = $this->wrap->addToList($atl,$form['list']['id']); 1549 if($e['status']==409) 1550 return '2';//already 1551 if($e['status']==200) 1552 return '1';//subscribed 1026 1553 break; 1027 1554 case 'cc': … … 1162 1689 } 1163 1690 else 1164 return '0';//error1691 return 0;//error 1165 1692 break; 1166 1693 case 'gr': … … 1196 1723 return 0; 1197 1724 break; 1725 case 'sg': 1726 $user = base64_encode($data['email']); 1727 $e = $this->wrap->getContact($user); 1728 if(isset($e['email']))return 1; 1729 return 0; 1730 break; 1731 case 'hs': 1732 $user = $data['email']; 1733 $e = $this->wrap->getContact($user); 1734 if($e['status']==200)return 1; 1735 return 0; 1736 break; 1737 case 'be': 1738 $user = $data['email']; 1739 $t = $this->wrap->find($user,$form['list']['id']); 1740 if(!empty($t))return 1; 1741 return 0; 1742 break; 1198 1743 case 'vr': 1199 1744 $user = array( … … 1215 1760 break; 1216 1761 case 'ac': 1217 $e = $this->wrap->api("contact/view?email= [email protected]");1762 $e = $this->wrap->api("contact/view?email=".$data['email']); 1218 1763 if($e->result_code) 1219 1764 return 1;
Note: See TracChangeset
for help on using the changeset viewer.