├── .gitignore ├── Print-PDF-Button ├── README.md ├── bb-examples └── login-to-clients-area.html ├── bb-library ├── Hook │ ├── Activation.php │ ├── Custom.php │ ├── Disableregistration.php │ ├── Fields.php │ └── MaxMind.php ├── Payment │ └── Adapter │ │ ├── AliPay.php │ │ ├── AmazonSimplePay.php │ │ ├── BluePay.php │ │ ├── Ccavenue.php │ │ ├── Coinbase.php │ │ ├── Coinify.php │ │ ├── GoogleCheckout.php │ │ ├── Ideal.php │ │ ├── LibertyReserve.php │ │ ├── Mellat.php │ │ ├── Moneybookers.php │ │ ├── Onebip.php │ │ ├── Skrill.php │ │ ├── TwoCheckout.php │ │ ├── ca-coinbase.crt │ │ └── tpay.php ├── Registrar │ └── Adapter │ │ ├── Dottk.php │ │ ├── Enom.php │ │ ├── Gandi.php │ │ ├── Hexonet.php │ │ └── Namesilo.php └── Server │ └── Manager │ ├── Directadmin.php │ ├── Ispconfig3.php │ ├── Kloxo.php │ ├── MOFH.php │ ├── Plesk.php │ ├── Vesta.php │ ├── Virtualmin.php │ └── Whm.php ├── bb-locale ├── de_DE │ ├── LC_MESSAGES │ │ ├── admin.mo │ │ ├── admin.po │ │ ├── index.html │ │ ├── messages.mo │ │ └── messages.po │ └── index.html ├── es_ES │ ├── LC_MESSAGES │ │ ├── admin.mo │ │ ├── admin.po │ │ ├── index.html │ │ ├── messages.mo │ │ └── messages.po │ └── index.html ├── fr_FR │ ├── LC_MESSAGES │ │ ├── admin.mo │ │ ├── admin.po │ │ ├── index.html │ │ ├── messages.mo │ │ └── messages.po │ └── index.html ├── messages.pot ├── nl_NL │ ├── LC_MESSAGES │ │ ├── admin.mo │ │ ├── admin.po │ │ ├── index.html │ │ ├── messages.mo │ │ └── messages.po │ └── index.html ├── pl_PL │ ├── LC_MESSAGES │ │ ├── admin.mo │ │ ├── admin.po │ │ ├── index.html │ │ ├── messages.mo │ │ └── messages.po │ └── index.html ├── pt_BR │ ├── LC_MESSAGES │ │ ├── admin.mo │ │ ├── admin.po │ │ ├── index.html │ │ ├── messages.mo │ │ └── messages.po │ └── index.html └── zh_CN │ ├── LC_MESSAGES │ ├── admin.mo │ ├── admin.po │ ├── index.html │ ├── messages.mo │ └── messages.po │ └── index.html ├── bb-modules ├── mod_affiliate │ ├── Api_Admin.php │ ├── Api_Client.php │ ├── Controller_Admin.php │ ├── Controller_Client.php │ ├── Service.php │ ├── html_admin │ │ ├── mod_affiliate_index.phtml │ │ └── mod_affiliate_profile.phtml │ ├── html_client │ │ ├── mod_affiliate_index.phtml │ │ └── mod_affiliate_stats.phtml │ ├── html_email │ │ └── mod_affiliate_signup.phtml │ └── manifest.json ├── mod_bbdemo │ ├── Api_Admin.php │ ├── Service.php │ └── manifest.json ├── mod_braunstein │ ├── Api_Guest.php │ ├── Service.php │ ├── html_admin │ │ └── mod_braunstein_settings.phtml │ └── manifest.json ├── mod_clickatell │ ├── Api_Admin.php │ ├── html_admin │ │ └── mod_clickatell_settings.phtml │ ├── icon.png │ └── manifest.json ├── mod_comment │ ├── Api_Guest.php │ ├── html_admin │ │ └── mod_comment_settings.phtml │ ├── html_client │ │ └── mod_comment_block.phtml │ └── manifest.json ├── mod_debug │ ├── Api_Admin.php │ ├── Controller_Admin.php │ ├── html_admin │ │ ├── mod_debug_index.phtml │ │ └── mod_debug_raw.phtml │ └── manifest.json ├── mod_disableregistration │ ├── Service.php │ └── manifest.json ├── mod_droidtweak │ ├── Api_Admin.php │ ├── Api_Guest.php │ ├── Controller_Admin.php │ ├── Service.php │ ├── classXmlRpc.php │ ├── html_admin │ │ ├── mod_droidtweak_index.phtml │ │ ├── mod_droidtweak_review.phtml │ │ └── mod_droidtweak_settings.phtml │ ├── html_client │ │ └── mod_droidtweak_order.phtml │ ├── html_email │ │ └── mod_droidtweak_client_signup.phtml │ └── manifest.json ├── mod_embed │ ├── Controller_Admin.php │ ├── Controller_Client.php │ ├── README.md │ ├── html_admin │ │ └── mod_embed_index.phtml │ ├── html_client │ │ ├── mod_embed_contact.phtml │ │ ├── mod_embed_domainchecker.phtml │ │ └── mod_embed_loginform.phtml │ └── manifest.json ├── mod_example │ ├── Api_Admin.php │ ├── Api_Guest.php │ ├── Controller_Admin.php │ ├── Controller_Client.php │ ├── README.md │ ├── html_admin │ │ └── mod_example_index.phtml │ ├── html_client │ │ └── mod_example_index.phtml │ └── manifest.json ├── mod_host2post │ └── p2h.php ├── mod_importwhmcs │ ├── Api_Admin.php │ ├── Controller_Admin.php │ ├── html_admin │ │ └── mod_importwhmcs_index.phtml │ └── manifest.json ├── mod_invite │ ├── Api_Admin.php │ ├── Api_Client.php │ ├── Api_Guest.php │ ├── Controller_Client.php │ ├── Service.php │ ├── html_admin │ │ └── mod_invite_settings.phtml │ ├── html_client │ │ └── mod_invite_invitations.phtml │ ├── html_email │ │ └── mod_invite_confirm.phtml │ ├── icon.png │ └── manifest.json ├── mod_invoiceoptions │ ├── Service.php │ └── manifest.json ├── mod_mailchimp │ ├── Api_Admin.php │ ├── MCAPI.class.php │ ├── Service.php │ ├── html_admin │ │ └── mod_mailchimp_settings.phtml │ └── manifest.json ├── mod_massmailer │ ├── Api_Admin.php │ ├── Controller_Admin.php │ ├── Service.php │ ├── html_admin │ │ ├── mod_massmailer_index.phtml │ │ └── mod_massmailer_message.phtml │ └── manifest.json ├── mod_partner │ ├── Api_Admin.php │ ├── Api_Client.php │ ├── Api_Guest.php │ ├── Controller_Admin.php │ ├── Controller_Client.php │ ├── Service.php │ ├── html_admin │ │ ├── mod_partner_details.phtml │ │ └── mod_partner_index.phtml │ ├── html_client │ │ └── mod_partner_index.phtml │ ├── html_email │ │ ├── mod_partner_purchase.phtml │ │ └── mod_partner_signup.phtml │ └── manifest.json ├── mod_phoneconfirmation │ ├── Api_Client.php │ ├── Service.php │ ├── html_admin │ │ └── mod_phoneconfirmation_settings.phtml │ └── manifest.json ├── mod_phpminiadmin │ ├── Controller_Admin.php │ ├── html_admin │ │ └── mod_phpminiadmin_index.phtml │ ├── manifest.json │ └── phpminiadmin.php ├── mod_redirect │ ├── Api_Admin.php │ ├── Controller_Client.php │ └── manifest.json ├── mod_rivile │ ├── Api_Admin.php │ ├── manifest.json │ └── php-excel.class.php ├── mod_servicecentovacast │ ├── Api_Admin.php │ ├── Api_Client.php │ ├── Service.php │ ├── ccapiclient │ │ ├── ccapiclient.php │ │ └── class_HTTPRetriever.php │ ├── html_admin │ │ ├── mod_servicecentovacast_config.phtml │ │ ├── mod_servicecentovacast_manage.phtml │ │ ├── mod_servicecentovacast_order.phtml │ │ └── mod_servicecentovacast_settings.phtml │ ├── html_client │ │ └── mod_servicecentovacast_manage.phtml │ ├── html_email │ │ ├── mod_servicecentovacast_activated.phtml │ │ ├── mod_servicecentovacast_canceled.phtml │ │ ├── mod_servicecentovacast_renewed.phtml │ │ ├── mod_servicecentovacast_suspended.phtml │ │ └── mod_servicecentovacast_unsuspended.phtml │ └── manifest.json ├── mod_servicegps │ ├── Api_Admin.php │ ├── Api_Client.php │ ├── Service.php │ ├── html_admin │ │ ├── mod_servicegps_manage.phtml │ │ ├── mod_servicegps_order.phtml │ │ └── mod_servicegps_settings.phtml │ ├── html_client │ │ ├── mod_servicegps_manage.phtml │ │ └── mod_servicegps_order.phtml │ └── manifest.json ├── mod_servicemulticraft │ ├── Api_Admin.php │ ├── MulticraftAPI.php │ ├── Service.php │ ├── html_admin │ │ ├── mod_servicemulticraft_config.phtml │ │ ├── mod_servicemulticraft_manage.phtml │ │ ├── mod_servicemulticraft_order.phtml │ │ └── mod_servicemulticraft_settings.phtml │ └── manifest.json └── mod_servicevpsnet │ ├── Api_Admin.php │ ├── README.md │ ├── Service.php │ ├── html_admin │ ├── mod_servicevpsnet_config.phtml │ ├── mod_servicevpsnet_order.phtml │ └── mod_servicevpsnet_settings.phtml │ ├── manifest.json │ └── vpsnetapi │ ├── VPSNET.php │ ├── assets │ └── fonts │ │ ├── GeosansLight.ttf │ │ ├── MankSans.ttf │ │ ├── Silkscreen.ttf │ │ ├── pf_arma_five.ttf │ │ └── tahoma.ttf │ ├── pChart.class.php │ └── pData.class.php └── bb-themes ├── bootstrap ├── LICENSE.txt ├── assets │ ├── LICENSE │ ├── css │ │ ├── bootstrap-markdown.min.css │ │ ├── bootstrap.css │ │ ├── bootstrap.min.css │ │ ├── modern-business.css │ │ └── themes │ │ │ ├── theme-cerulean.min.css │ │ │ ├── theme-cosmo.min.css │ │ │ ├── theme-cyborg.min.css │ │ │ ├── theme-darkly.min.css │ │ │ ├── theme-flatly.min.css │ │ │ ├── theme-journal.min.css │ │ │ ├── theme-lumen.min.css │ │ │ ├── theme-paper.min.css │ │ │ ├── theme-readable.min.css │ │ │ ├── theme-sandstone.min.css │ │ │ ├── theme-simplex.min.css │ │ │ ├── theme-slate.min.css │ │ │ ├── theme-spacelab.min.css │ │ │ ├── theme-superhero.min.css │ │ │ ├── theme-united.min.css │ │ │ └── theme-yeti.min.css │ ├── font-awesome │ │ ├── css │ │ │ ├── font-awesome.css │ │ │ └── font-awesome.min.css │ │ ├── fonts │ │ │ ├── FontAwesome.otf │ │ │ ├── fontawesome-webfont.eot │ │ │ ├── fontawesome-webfont.svg │ │ │ ├── fontawesome-webfont.ttf │ │ │ ├── fontawesome-webfont.woff │ │ │ └── fontawesome-webfont.woff2 │ │ ├── less │ │ │ ├── animated.less │ │ │ ├── bordered-pulled.less │ │ │ ├── core.less │ │ │ ├── fixed-width.less │ │ │ ├── font-awesome.less │ │ │ ├── icons.less │ │ │ ├── larger.less │ │ │ ├── list.less │ │ │ ├── mixins.less │ │ │ ├── path.less │ │ │ ├── rotated-flipped.less │ │ │ ├── stacked.less │ │ │ └── variables.less │ │ └── scss │ │ │ ├── _animated.scss │ │ │ ├── _bordered-pulled.scss │ │ │ ├── _core.scss │ │ │ ├── _fixed-width.scss │ │ │ ├── _icons.scss │ │ │ ├── _larger.scss │ │ │ ├── _list.scss │ │ │ ├── _mixins.scss │ │ │ ├── _path.scss │ │ │ ├── _rotated-flipped.scss │ │ │ ├── _stacked.scss │ │ │ ├── _variables.scss │ │ │ └── font-awesome.scss │ ├── images │ │ └── logo.png │ └── js │ │ ├── bb-jquery.js │ │ ├── bootbox.min.js │ │ ├── bootstrap-markdown.js │ │ ├── bootstrap.js │ │ ├── bootstrap.min.js │ │ ├── contact_me.js │ │ ├── jqBootstrapValidation.js │ │ ├── jquery.js │ │ ├── markdown.js │ │ └── to-markdown.js ├── config │ ├── settings.html │ └── settings_data.json ├── html │ ├── 404.phtml │ ├── index.html │ ├── layout_blank.phtml │ ├── layout_default.phtml │ ├── macro_functions.phtml │ ├── mod_cart_index.phtml │ ├── mod_client_balance.phtml │ ├── mod_client_profile.phtml │ ├── mod_email_email.phtml │ ├── mod_email_index.phtml │ ├── mod_formbuilder_build.phtml │ ├── mod_forum_forum.phtml │ ├── mod_forum_index.phtml │ ├── mod_forum_topic.phtml │ ├── mod_index_dashboard.phtml │ ├── mod_invoice_banklink.phtml │ ├── mod_invoice_index.phtml │ ├── mod_invoice_invoice.phtml │ ├── mod_invoice_thankyou.phtml │ ├── mod_kb_article.phtml │ ├── mod_kb_category.phtml │ ├── mod_kb_index.phtml │ ├── mod_news_index.phtml │ ├── mod_news_post.phtml │ ├── mod_order_index.phtml │ ├── mod_order_list.phtml │ ├── mod_order_manage.phtml │ ├── mod_order_product.phtml │ ├── mod_page_about-us.phtml │ ├── mod_page_login.phtml │ ├── mod_page_privacy-policy.phtml │ ├── mod_page_reset-password.phtml │ ├── mod_page_sitemap.xml │ ├── mod_page_tos.phtml │ ├── mod_servicedomain_manage.phtml │ ├── mod_servicedomain_order.phtml │ ├── mod_servicedownloadable_manage.phtml │ ├── mod_servicehosting_order.phtml │ ├── mod_servicelicense_manage.phtml │ ├── mod_support_contact_us.phtml │ ├── mod_support_contact_us_conversation.phtml │ ├── mod_support_ticket.phtml │ ├── mod_support_tickets.phtml │ ├── partial_addons.phtml │ ├── partial_currency.phtml │ ├── partial_menu.phtml │ ├── partial_message.phtml │ ├── partial_pagination.phtml │ ├── partial_pending_messages.phtml │ ├── partial_pricing.phtml │ └── partial_steps.phtml ├── index.html ├── manifest.json └── screenshot.jpg ├── custom_order ├── README.md ├── html │ ├── mod_servicecustom_manage.phtml │ └── mod_servicecustom_order.phtml └── manifest.json ├── dummy ├── README.md ├── html │ └── mod_invoice_invoice.phtml ├── manifest.json └── screenshot.jpg ├── myboxbilling ├── html │ ├── README.txt │ ├── mod_cart_index.phtml │ ├── mod_client_login.phtml │ ├── mod_index_dashboard.phtml │ └── mod_page_sla.phtml └── manifest.json └── nobranding ├── html ├── layout_default.phtml └── mod_index_dashboard.phtml └── manifest.json /.gitignore: -------------------------------------------------------------------------------- 1 | # Created by .ignore support plugin (hsz.mobi) 2 | ### OSX template 3 | .DS_Store 4 | .AppleDouble 5 | .LSOverride 6 | 7 | # Icon must end with two \r 8 | Icon 9 | 10 | # Thumbnails 11 | ._* 12 | 13 | # Files that might appear on external disk 14 | .Spotlight-V100 15 | .Trashes 16 | 17 | # Directories potentially created on remote AFP share 18 | .AppleDB 19 | .AppleDesktop 20 | Network Trash Folder 21 | Temporary Items 22 | .apdisk 23 | 24 | 25 | 26 | ### JetBrains template 27 | # Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm 28 | 29 | *.iml 30 | 31 | ## Directory-based project format: 32 | .idea/ 33 | # if you remove the above rule, at least ignore the following: 34 | 35 | # User-specific stuff: 36 | # .idea/workspace.xml 37 | # .idea/tasks.xml 38 | # .idea/dictionaries 39 | 40 | # Sensitive or high-churn files: 41 | # .idea/dataSources.ids 42 | # .idea/dataSources.xml 43 | # .idea/sqlDataSources.xml 44 | # .idea/dynamic.xml 45 | # .idea/uiDesigner.xml 46 | 47 | # Gradle: 48 | # .idea/gradle.xml 49 | # .idea/libraries 50 | 51 | # Mongo Explorer plugin: 52 | # .idea/mongoSettings.xml 53 | 54 | ## File-based project format: 55 | *.ipr 56 | *.iws 57 | 58 | ## Plugin-specific files: 59 | 60 | # IntelliJ 61 | out/ 62 | 63 | # mpeltonen/sbt-idea plugin 64 | .idea_modules/ 65 | 66 | # JIRA plugin 67 | atlassian-ide-plugin.xml 68 | 69 | # Crashlytics plugin (for Android Studio and IntelliJ) 70 | com_crashlytics_export_strings.xml 71 | crashlytics.properties 72 | crashlytics-build.properties 73 | 74 | 75 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | Extensions examples 2 | ------------ 3 | 4 | Extensions on this repository are for **development, learning and testing** 5 | purposes only. 6 | 7 | Usually they are developed to solve specific problem for client request. 8 | 9 | Repository contains code examples for other developers to get started. 10 | 11 | Important note 12 | ------------ 13 | 14 | **Do not download** and upload all extensions from this repository to your installation **without 15 | consulting** with BoxBilling support staff. 16 | It may break your BoxBilling installation and lead to unexpected results. 17 | 18 | -------------------------------------------------------------------------------- /bb-examples/login-to-clients-area.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | BoxBilling Login Example 5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 |
13 | Login to client area 14 |

15 | 16 | 17 |

18 |

19 | 20 | 21 |

22 | 23 |
24 |
25 | 26 | 27 | 46 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /bb-library/Hook/Activation.php: -------------------------------------------------------------------------------- 1 | getSubject(); 30 | $repo = Box_Db::getTable('Model_Invoice'); 31 | try { 32 | $repo->activate($invoice); 33 | } catch(Exception $e) { 34 | error_log($e->getMessage()); 35 | } 36 | } 37 | } -------------------------------------------------------------------------------- /bb-library/Hook/Custom.php: -------------------------------------------------------------------------------- 1 | getSubject(); 26 | $plugin = $order->Product->plugin; 27 | if($plugin == 'MyPlugin') { 28 | // init plugin class 29 | // do something with plugin on order activation action 30 | } 31 | } 32 | 33 | public static function onAfterOrderRenew(Box_Event $event) 34 | { 35 | 36 | } 37 | 38 | public static function onAfterOrderSuspend(Box_Event $event) 39 | { 40 | 41 | } 42 | 43 | public static function onAfterOrderUnsuspend(Box_Event $event) 44 | { 45 | 46 | } 47 | 48 | public static function onAfterOrderCancel(Box_Event $event) 49 | { 50 | 51 | } 52 | 53 | public static function onAfterOrderUncancel(Box_Event $event) 54 | { 55 | 56 | } 57 | 58 | public static function onAfterOrderDelete(Box_Event $event) 59 | { 60 | 61 | } 62 | } -------------------------------------------------------------------------------- /bb-library/Hook/Disableregistration.php: -------------------------------------------------------------------------------- 1 | getSubject(); 26 | if(!isset($data['country']) || empty($data['country'])) { 27 | throw new Box_Exception('Please select your country'); 28 | } 29 | } 30 | } -------------------------------------------------------------------------------- /bb-locale/de_DE/LC_MESSAGES/admin.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boxbilling/extensions/a9c62dd8e6f91de24cd170e6ce95f018a9367d41/bb-locale/de_DE/LC_MESSAGES/admin.mo -------------------------------------------------------------------------------- /bb-locale/de_DE/LC_MESSAGES/admin.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "Project-Id-Version: BoxBilling\n" 4 | "Report-Msgid-Bugs-To: \n" 5 | "POT-Creation-Date: YEAR-MO-DA HO:MI+ZONE\n" 6 | "PO-Revision-Date: 2012-01-27 18:58+0300\n" 7 | "Last-Translator: BoxBilling \n" 8 | "Language-Team: BoxBilling \n" 9 | "Language: English\n" 10 | "MIME-Version: 1.0\n" 11 | "Content-Type: text/plain; charset=UTF-8\n" 12 | "Content-Transfer-Encoding: 8bit\n" 13 | "X-Poedit-KeywordsList: _;gettext;gettext_noop\n" 14 | "X-Poedit-Basepath: .\n" 15 | "X-Poedit-Language: English\n" 16 | "X-Poedit-Country: UNITED STATES\n" 17 | "X-Poedit-SourceCharset: utf-8\n" 18 | 19 | msgid "Latest orders" 20 | msgstr "Latest orders" 21 | 22 | -------------------------------------------------------------------------------- /bb-locale/de_DE/LC_MESSAGES/index.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boxbilling/extensions/a9c62dd8e6f91de24cd170e6ce95f018a9367d41/bb-locale/de_DE/LC_MESSAGES/index.html -------------------------------------------------------------------------------- /bb-locale/de_DE/LC_MESSAGES/messages.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boxbilling/extensions/a9c62dd8e6f91de24cd170e6ce95f018a9367d41/bb-locale/de_DE/LC_MESSAGES/messages.mo -------------------------------------------------------------------------------- /bb-locale/de_DE/index.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boxbilling/extensions/a9c62dd8e6f91de24cd170e6ce95f018a9367d41/bb-locale/de_DE/index.html -------------------------------------------------------------------------------- /bb-locale/es_ES/LC_MESSAGES/admin.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boxbilling/extensions/a9c62dd8e6f91de24cd170e6ce95f018a9367d41/bb-locale/es_ES/LC_MESSAGES/admin.mo -------------------------------------------------------------------------------- /bb-locale/es_ES/LC_MESSAGES/admin.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "Project-Id-Version: BoxBilling\n" 4 | "Report-Msgid-Bugs-To: \n" 5 | "POT-Creation-Date: YEAR-MO-DA HO:MI+ZONE\n" 6 | "PO-Revision-Date: 2012-02-01 20:43+0100\n" 7 | "Last-Translator: \n" 8 | "Language-Team: Ricardo Reina \n" 9 | "Language: English\n" 10 | "MIME-Version: 1.0\n" 11 | "Content-Type: text/plain; charset=UTF-8\n" 12 | "Content-Transfer-Encoding: 8bit\n" 13 | "X-Poedit-KeywordsList: _;gettext;gettext_noop\n" 14 | "X-Poedit-Basepath: .\n" 15 | "X-Poedit-Language: Spanish\n" 16 | "X-Poedit-Country: SPAIN\n" 17 | "X-Poedit-SourceCharset: utf-8\n" 18 | 19 | msgid "Latest orders" 20 | msgstr "Últimos pedidos" 21 | 22 | -------------------------------------------------------------------------------- /bb-locale/es_ES/LC_MESSAGES/index.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boxbilling/extensions/a9c62dd8e6f91de24cd170e6ce95f018a9367d41/bb-locale/es_ES/LC_MESSAGES/index.html -------------------------------------------------------------------------------- /bb-locale/es_ES/LC_MESSAGES/messages.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boxbilling/extensions/a9c62dd8e6f91de24cd170e6ce95f018a9367d41/bb-locale/es_ES/LC_MESSAGES/messages.mo -------------------------------------------------------------------------------- /bb-locale/es_ES/index.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boxbilling/extensions/a9c62dd8e6f91de24cd170e6ce95f018a9367d41/bb-locale/es_ES/index.html -------------------------------------------------------------------------------- /bb-locale/fr_FR/LC_MESSAGES/admin.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boxbilling/extensions/a9c62dd8e6f91de24cd170e6ce95f018a9367d41/bb-locale/fr_FR/LC_MESSAGES/admin.mo -------------------------------------------------------------------------------- /bb-locale/fr_FR/LC_MESSAGES/index.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boxbilling/extensions/a9c62dd8e6f91de24cd170e6ce95f018a9367d41/bb-locale/fr_FR/LC_MESSAGES/index.html -------------------------------------------------------------------------------- /bb-locale/fr_FR/LC_MESSAGES/messages.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boxbilling/extensions/a9c62dd8e6f91de24cd170e6ce95f018a9367d41/bb-locale/fr_FR/LC_MESSAGES/messages.mo -------------------------------------------------------------------------------- /bb-locale/fr_FR/index.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boxbilling/extensions/a9c62dd8e6f91de24cd170e6ce95f018a9367d41/bb-locale/fr_FR/index.html -------------------------------------------------------------------------------- /bb-locale/nl_NL/LC_MESSAGES/admin.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boxbilling/extensions/a9c62dd8e6f91de24cd170e6ce95f018a9367d41/bb-locale/nl_NL/LC_MESSAGES/admin.mo -------------------------------------------------------------------------------- /bb-locale/nl_NL/LC_MESSAGES/admin.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "Project-Id-Version: BoxBilling\n" 4 | "Report-Msgid-Bugs-To: \n" 5 | "POT-Creation-Date: YEAR-MO-DA HO:MI+ZONE\n" 6 | "PO-Revision-Date: 2012-06-16 20:26+0100\n" 7 | "Last-Translator: Victor \n" 8 | "Language-Team: BoxBilling \n" 9 | "Language: English\n" 10 | "MIME-Version: 1.0\n" 11 | "Content-Type: text/plain; charset=UTF-8\n" 12 | "Content-Transfer-Encoding: 8bit\n" 13 | "X-Poedit-KeywordsList: _;gettext;gettext_noop\n" 14 | "X-Poedit-Basepath: .\n" 15 | "X-Poedit-Language: English\n" 16 | "X-Poedit-Country: UNITED STATES\n" 17 | "X-Poedit-SourceCharset: utf-8\n" 18 | 19 | msgid "Latest orders" 20 | msgstr "Laatste bestellingen" 21 | 22 | -------------------------------------------------------------------------------- /bb-locale/nl_NL/LC_MESSAGES/index.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boxbilling/extensions/a9c62dd8e6f91de24cd170e6ce95f018a9367d41/bb-locale/nl_NL/LC_MESSAGES/index.html -------------------------------------------------------------------------------- /bb-locale/nl_NL/LC_MESSAGES/messages.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boxbilling/extensions/a9c62dd8e6f91de24cd170e6ce95f018a9367d41/bb-locale/nl_NL/LC_MESSAGES/messages.mo -------------------------------------------------------------------------------- /bb-locale/nl_NL/index.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boxbilling/extensions/a9c62dd8e6f91de24cd170e6ce95f018a9367d41/bb-locale/nl_NL/index.html -------------------------------------------------------------------------------- /bb-locale/pl_PL/LC_MESSAGES/admin.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boxbilling/extensions/a9c62dd8e6f91de24cd170e6ce95f018a9367d41/bb-locale/pl_PL/LC_MESSAGES/admin.mo -------------------------------------------------------------------------------- /bb-locale/pl_PL/LC_MESSAGES/index.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boxbilling/extensions/a9c62dd8e6f91de24cd170e6ce95f018a9367d41/bb-locale/pl_PL/LC_MESSAGES/index.html -------------------------------------------------------------------------------- /bb-locale/pl_PL/LC_MESSAGES/messages.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boxbilling/extensions/a9c62dd8e6f91de24cd170e6ce95f018a9367d41/bb-locale/pl_PL/LC_MESSAGES/messages.mo -------------------------------------------------------------------------------- /bb-locale/pl_PL/index.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boxbilling/extensions/a9c62dd8e6f91de24cd170e6ce95f018a9367d41/bb-locale/pl_PL/index.html -------------------------------------------------------------------------------- /bb-locale/pt_BR/LC_MESSAGES/admin.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boxbilling/extensions/a9c62dd8e6f91de24cd170e6ce95f018a9367d41/bb-locale/pt_BR/LC_MESSAGES/admin.mo -------------------------------------------------------------------------------- /bb-locale/pt_BR/LC_MESSAGES/index.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boxbilling/extensions/a9c62dd8e6f91de24cd170e6ce95f018a9367d41/bb-locale/pt_BR/LC_MESSAGES/index.html -------------------------------------------------------------------------------- /bb-locale/pt_BR/LC_MESSAGES/messages.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boxbilling/extensions/a9c62dd8e6f91de24cd170e6ce95f018a9367d41/bb-locale/pt_BR/LC_MESSAGES/messages.mo -------------------------------------------------------------------------------- /bb-locale/pt_BR/index.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boxbilling/extensions/a9c62dd8e6f91de24cd170e6ce95f018a9367d41/bb-locale/pt_BR/index.html -------------------------------------------------------------------------------- /bb-locale/zh_CN/LC_MESSAGES/admin.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boxbilling/extensions/a9c62dd8e6f91de24cd170e6ce95f018a9367d41/bb-locale/zh_CN/LC_MESSAGES/admin.mo -------------------------------------------------------------------------------- /bb-locale/zh_CN/LC_MESSAGES/admin.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "Project-Id-Version: BoxBilling\n" 4 | "Report-Msgid-Bugs-To: \n" 5 | "POT-Creation-Date: YEAR-MO-DA HO:MI+ZONE\n" 6 | "PO-Revision-Date: 2012-03-23 11:35+0800\n" 7 | "Last-Translator: 龙少 \n" 8 | "Language-Team: Ricardo Reina \n" 9 | "Language: Chinese\n" 10 | "MIME-Version: 1.0\n" 11 | "Content-Type: text/plain; charset=UTF-8\n" 12 | "Content-Transfer-Encoding: 8bit\n" 13 | "X-Poedit-KeywordsList: _;gettext;gettext_noop\n" 14 | "X-Poedit-Basepath: .\n" 15 | "X-Poedit-Language: Chinese\n" 16 | "X-Poedit-Country: SPAIN\n" 17 | "X-Poedit-SourceCharset: utf-8\n" 18 | 19 | msgid "Latest orders" 20 | msgstr "最新订单" 21 | 22 | -------------------------------------------------------------------------------- /bb-locale/zh_CN/LC_MESSAGES/index.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boxbilling/extensions/a9c62dd8e6f91de24cd170e6ce95f018a9367d41/bb-locale/zh_CN/LC_MESSAGES/index.html -------------------------------------------------------------------------------- /bb-locale/zh_CN/LC_MESSAGES/messages.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boxbilling/extensions/a9c62dd8e6f91de24cd170e6ce95f018a9367d41/bb-locale/zh_CN/LC_MESSAGES/messages.mo -------------------------------------------------------------------------------- /bb-locale/zh_CN/index.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boxbilling/extensions/a9c62dd8e6f91de24cd170e6ce95f018a9367d41/bb-locale/zh_CN/index.html -------------------------------------------------------------------------------- /bb-modules/mod_affiliate/Controller_Admin.php: -------------------------------------------------------------------------------- 1 | array( 9 | array( 10 | 'location' => 'order', 11 | 'label' => 'Affiliates', 12 | 'uri' => 'affiliate', 13 | 'index' => 1000, 14 | 'class' => '', 15 | ), 16 | ), 17 | ); 18 | } 19 | 20 | public function register(Box_App &$app) 21 | { 22 | $app->get('/affiliate', 'get_index', array(), get_class($this)); 23 | $app->get('/affiliate/:id', 'get_aff', array('id' => '[0-9]+'), get_class($this)); 24 | } 25 | 26 | public function get_index(Box_App $app) 27 | { 28 | $api = $app->getApiAdmin(); 29 | return $app->render('mod_affiliate_index'); 30 | } 31 | 32 | public function get_aff(Box_App $app, $id) 33 | { 34 | $api = $app->getApiAdmin(); 35 | $aff = $api->affiliate_get(array('id'=>$id)); 36 | return $app->render('mod_affiliate_profile', array('aff'=>$aff)); 37 | } 38 | } -------------------------------------------------------------------------------- /bb-modules/mod_affiliate/Controller_Client.php: -------------------------------------------------------------------------------- 1 | get('/affiliate', 'get_index', array(), get_class($this)); 8 | $app->get('/affiliate/stats', 'get_stats', array(), get_class($this)); 9 | $app->get('/r/:id', 'get_ref', array('id' => '[0-9]+'), get_class($this)); 10 | } 11 | 12 | public function get_index(Box_App $app) 13 | { 14 | return $app->render('mod_affiliate_index'); 15 | } 16 | 17 | public function get_stats(Box_App $app) 18 | { 19 | $api = $app->getApiClient(); 20 | if(!$api->affiliate_is_registered()) { 21 | throw new Box_Exception('You have to be affiliate to access this section.'); 22 | } 23 | return $app->render('mod_affiliate_stats'); 24 | } 25 | 26 | public function get_ref(Box_App $app, $id) 27 | { 28 | setcookie('bbr', $id, time() + 31556926, '/'); 29 | 30 | $mod = new Box_Mod('affiliate'); 31 | $config = $mod->getConfig(); 32 | 33 | // track visit 34 | $service = $mod->getService(); 35 | $service->track($id, Box_Tools::getIpv4()); 36 | 37 | $url = (isset($config['redirect_to']) && !empty($config['redirect_to'])) ? $config['redirect_to'] : Box_Tools::url('/'); 38 | header('HTTP/1.1 301 Moved Permanently'); 39 | header('Location: '.$url); 40 | exit; 41 | } 42 | } -------------------------------------------------------------------------------- /bb-modules/mod_affiliate/html_email/mod_affiliate_signup.phtml: -------------------------------------------------------------------------------- 1 | {% block subject %}You have joined affiliate program{% endblock %} 2 | {% block content %} 3 | {% filter markdown %} 4 | Hi {{ c.first_name }}, 5 | 6 | Thank you for joining affiliate program. 7 | 8 | Your refferal link is: {{ referral_link }} 9 | 10 | Online reports detailing traffic, sales and commission earned can be accessed 11 | at {{ 'affiliate/stats'|link }} 12 | 13 | Banners, text links and other creative materials are also available there. 14 | All links contain a unique code to track visitors and credit your account. 15 | 16 | We'll pay you commission for every new order referred from your 17 | website, blog, email or any other compaign. 18 | 19 | {{ guest.system_company.name }} affiliate marketing program is a great opportunity 20 | to increase your online revenue. Place a banner or text link to {{ referral_link }} 21 | on your website, blog or within your email campaign and earn commission every 22 | time a visitor clicks on that link and successfully enrolls in the {{ guest.system_company.name }} 23 | 24 | {{ guest.system_company.signature }} 25 | 26 | {% endfilter %} 27 | {% endblock %} 28 | -------------------------------------------------------------------------------- /bb-modules/mod_affiliate/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "affiliate", 3 | "type": "mod", 4 | "name": "Affiliates", 5 | "description": "Simple Affiliate module", 6 | "version": "1.0.0" 7 | } -------------------------------------------------------------------------------- /bb-modules/mod_bbdemo/Api_Admin.php: -------------------------------------------------------------------------------- 1 | getApiAdmin(); 15 | $api->extension_activate(array('id'=>'servicesolusvm', 'type'=>'mod')); 16 | $api->extension_activate(array('id'=>'serviceboxbillinglicense', 'type'=>'mod')); 17 | $api->extension_activate(array('id'=>'notification', 'type'=>'mod')); 18 | 19 | $api->email_batch_template_generate(); 20 | 21 | $client_1 = array( 22 | 'email'=> "client@boxbilling.com", 23 | 'password'=> "demo", 24 | 'first_name'=> "Demo", 25 | 'last_name'=> "Client", 26 | 'phone_cc'=> "214", 27 | 'phone'=> "15551212", 28 | 'birthday'=> "1985-02-25", 29 | 'company'=> "BoxBilling", 30 | 'address_1'=> "Holywood", 31 | 'address_2'=> "Stairway to heaven", 32 | 'city'=> "Holywood", 33 | 'state'=> "LA", 34 | 'postcode'=> "95012", 35 | 'country'=> "US", 36 | 'currency'=> "USD", 37 | 'notes'=> "BoxBilling demo client", 38 | 'api_token'=> "client_api_token", 39 | 'created_at'=> date('c'), 40 | 'updated_at'=> date('c'), 41 | ); 42 | 43 | $client_2 = array( 44 | 'email'=> "john.smith@boxbilling.com", 45 | 'password'=> "demo", 46 | 'first_name'=> "John", 47 | 'last_name'=> "Smith", 48 | 'company'=> "John's Company Inc.", 49 | 'phone_cc'=> "261", 50 | 'phone'=> "4106851180", 51 | 'birthday'=> "1985-02-25", 52 | 'company'=> "BoxBilling", 53 | 'address_1'=> "1734 Maryland Avenue", 54 | 'address_2'=> "Stairway to heaven", 55 | 'city'=> "Baltimore", 56 | 'state'=> "MD", 57 | 'postcode'=> "21201", 58 | 'country'=> "US", 59 | 'currency'=> "USD", 60 | 'notes'=> "BoxBilling demo client", 61 | 'created_at'=> date('c'), 62 | 'updated_at'=> date('c'), 63 | ); 64 | $api->client_create($client_1); 65 | $api->client_create($client_2); 66 | 67 | $api->cron_run(); 68 | 69 | $this->_log('Demo reset initiated'); 70 | return true; 71 | } 72 | } -------------------------------------------------------------------------------- /bb-modules/mod_bbdemo/Service.php: -------------------------------------------------------------------------------- 1 | getParameters(); 65 | if($data['id'] == 1 && $data['email'] != 'client@boxbilling.com') { 66 | throw new Exception(self::MSG, 403); 67 | } 68 | } 69 | 70 | public static function onBeforeAdminClientPasswordChange(Box_Event $event) 71 | { 72 | throw new Exception(self::MSG, 403); 73 | } 74 | 75 | public static function onBeforeAdminSettingsUpdate(Box_Event $event) 76 | { 77 | throw new Exception(self::MSG, 403); 78 | } 79 | 80 | public static function onBeforeAdminDeleteCurrency(Box_Event $event) 81 | { 82 | throw new Exception(self::MSG, 403); 83 | } 84 | 85 | } -------------------------------------------------------------------------------- /bb-modules/mod_bbdemo/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "bbdemo", 3 | "type": "mod", 4 | "name": "demo.boxbilling.com module ", 5 | "description": "Disables sections in BoxBilling", 6 | "version": "1.0.0" 7 | } -------------------------------------------------------------------------------- /bb-modules/mod_braunstein/Api_Guest.php: -------------------------------------------------------------------------------- 1 | getConfig(); 16 | return $config['required']; 17 | } 18 | } -------------------------------------------------------------------------------- /bb-modules/mod_braunstein/Service.php: -------------------------------------------------------------------------------- 1 | getConfig(); 9 | $required_params = $config['required']; 10 | 11 | $params = $event->getParameters(); 12 | 13 | foreach($required_params as $p=>$required) { 14 | if($required) { 15 | if(!isset($params[$p]) || empty($params[$p])) { 16 | throw new Box_Exception('It is required that you provide details for field ":field"', array(':field'=>$p)); 17 | } 18 | } 19 | } 20 | } 21 | } -------------------------------------------------------------------------------- /bb-modules/mod_braunstein/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "braunstein", 3 | "type": "mod", 4 | "name": "J. Csárdi-Braunstein module", 5 | "description": "Exclusive module for J. Csárdi-Braunstein", 6 | "homepage_url": "http://www.boxbilling.com/", 7 | "author": "BoxBilling", 8 | "author_url": "http://www.boxbilling.com/", 9 | "version": "1.0.0" 10 | } -------------------------------------------------------------------------------- /bb-modules/mod_clickatell/Api_Admin.php: -------------------------------------------------------------------------------- 1 | getConfig(); 45 | 46 | $params = array( 47 | 'user' => $config['user'], 48 | 'password' => $config['password'], 49 | 'api_id' => $config['api_id'], 50 | 'to' => $data['to'], 51 | 'text' => $data['text'], 52 | ); 53 | $url = 'http://api.clickatell.com/http/sendmsg?'.http_build_query($params); 54 | 55 | $ret = file_get_contents($url); 56 | if(BB_DEBUG) error_log('Clickatell response: '.$ret); 57 | 58 | $sess = explode(":",$ret); 59 | if ($sess[0] != "ID") { 60 | throw new Box_Exception("Clickatell: :error", array(':error' => $ret)); 61 | } 62 | 63 | $this->_log('Clickatell SMS %s to %s with text: %s', $ret, $data['to'], $data['text']); 64 | 65 | return true; 66 | } 67 | } -------------------------------------------------------------------------------- /bb-modules/mod_clickatell/html_admin/mod_clickatell_settings.phtml: -------------------------------------------------------------------------------- 1 | {% extends request.ajax ? "layout_blank.phtml" : "layout_default.phtml" %} 2 | {% import "macro_functions.phtml" as mf %} 3 | {% block meta_title %}Clickatell settings{% endblock %} 4 | {% set active_menu = 'system' %} 5 | 6 | {% block content %} 7 | 8 |
9 |
10 |
{% trans 'Clickatell settings' %}
11 |
12 | 13 | {% set params = admin.extension_config_get({"ext":"mod_clickatell"}) %} 14 | 15 |
16 | 17 |
18 |
19 | 20 |
21 | 22 |
23 |
24 |
25 | 26 |
27 | 28 |
29 | 30 |
31 |
32 |
33 | 34 |
35 | 36 |
37 | 38 |
39 |
40 |
41 | 42 | 43 | 44 |
45 |
46 | 47 |
48 | 49 |
50 | Send test message 51 |
52 | 53 |
54 | 55 |
56 |
57 |
58 | 59 |
60 | 61 |
62 | 63 |
64 |
65 |
66 | 67 | 68 |
69 |
70 | 71 | 74 | 75 |
76 | {% endblock %} -------------------------------------------------------------------------------- /bb-modules/mod_clickatell/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boxbilling/extensions/a9c62dd8e6f91de24cd170e6ce95f018a9367d41/bb-modules/mod_clickatell/icon.png -------------------------------------------------------------------------------- /bb-modules/mod_clickatell/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "clickatell", 3 | "type": "mod", 4 | "name": "Clickatell", 5 | "description": "Send SMS via Clickatell service", 6 | "icon_url": "icon.png", 7 | "version": "1.0.0" 8 | } -------------------------------------------------------------------------------- /bb-modules/mod_comment/Api_Guest.php: -------------------------------------------------------------------------------- 1 | getConfig(); 16 | 17 | return array( 18 | 'facebook_enabled' => $config['facebook_enabled'], 19 | 'facebook_num_posts' => $config['facebook_num_posts'], 20 | 'facebook_width' => $config['facebook_width'], 21 | 22 | 'disqus_enabled' => $config['disqus_enabled'], 23 | 'disqus_shortname' => $config['disqus_shortname'], 24 | 25 | 'custom_enabled' => $config['custom_enabled'], 26 | 'custom_script' => $config['custom_script'], 27 | ); 28 | } 29 | } -------------------------------------------------------------------------------- /bb-modules/mod_comment/html_client/mod_comment_block.phtml: -------------------------------------------------------------------------------- 1 | {% set cp = guest.comment_params %} 2 | 3 | {% if cp.facebook_enabled %} 4 | 5 | 6 | {% endif %} 7 | 8 | 9 | {% if cp.disqus_enabled %} 10 |
11 | 18 | {% endif %} 19 | 20 | {% if cp.custom_enabled %} 21 | {{ cp.custom_script|raw }} 22 | {% endif %} -------------------------------------------------------------------------------- /bb-modules/mod_comment/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "comment", 3 | "type": "mod", 4 | "name": "Comments", 5 | "description": "Comments", 6 | "homepage_url": "http://github.com/boxbilling/", 7 | "author": "BoxBilling", 8 | "author_url": "http://extensions.boxbilling.com/", 9 | "license": "http://www.boxbilling.com/license.txt", 10 | "version": "1.0.0" 11 | } -------------------------------------------------------------------------------- /bb-modules/mod_debug/Api_Admin.php: -------------------------------------------------------------------------------- 1 | array( 9 | array( 10 | 'location' => 'extensions', 11 | 'index' => 1800, 12 | 'label' => 'Debug', 13 | 'uri' => '/debug', 14 | 'class' => '', 15 | ), 16 | ), 17 | ); 18 | } 19 | 20 | public function register(Box_App &$app) 21 | { 22 | $app->get('/debug', 'get_index', array(), get_class($this)); 23 | $app->get('/debug/errors', 'get_errors', array(), get_class($this)); 24 | $app->get('/debug/phpinfo', 'get_phpinfo', array(), get_class($this)); 25 | $app->get('/debug/changelog', 'get_changelog', array(), get_class($this)); 26 | } 27 | 28 | public function get_index(Box_App $app) 29 | { 30 | $api = $app->getApiAdmin(); 31 | return $app->render('mod_debug_index'); 32 | } 33 | 34 | public function get_phpinfo(Box_App $app) 35 | { 36 | $api = $app->getApiAdmin(); 37 | 38 | ob_start(); 39 | phpinfo(); 40 | $p=ob_get_contents(); 41 | ob_end_clean(); 42 | 43 | return $app->render('mod_debug_raw', array('html'=>$p)); 44 | } 45 | 46 | public function get_changelog(Box_App $app) 47 | { 48 | $api = $app->getApiAdmin(); 49 | 50 | $e = BB_PATH_ROOT . '/CHANGELOG.txt'; 51 | if(file_exists($e)) { 52 | $p = file_get_contents($e); 53 | } else { 54 | $p = 'CHANGELOG.txt file not found'; 55 | } 56 | 57 | return $app->render('mod_debug_raw', array('pre'=>$p)); 58 | } 59 | 60 | public function get_errors(Box_App $app) 61 | { 62 | $api = $app->getApiAdmin(); 63 | 64 | $e = BB_PATH_DATA . '/log/php_error.log'; 65 | if(file_exists($e)) { 66 | $p = file_get_contents($e); 67 | if(empty($p)) { 68 | $p = 'Error log file is empty'; 69 | } 70 | } else { 71 | $p = '[404] Error log does not exist'; 72 | } 73 | 74 | return $app->render('mod_debug_raw', array('pre'=>$p)); 75 | } 76 | } -------------------------------------------------------------------------------- /bb-modules/mod_debug/html_admin/mod_debug_index.phtml: -------------------------------------------------------------------------------- 1 | {% extends request.ajax ? "layout_blank.phtml" : "layout_default.phtml" %} 2 | {% set active_menu = 'extensions' %} 3 | {% block meta_title %}Debug information{% endblock %} 4 | 5 | {% block content %} 6 |
7 | 8 | 14 | 15 |
16 |
17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | {% for k,var in admin.system_env %} 29 | {% if var|keys|length > 0 %} 30 | {% for subkey,subvalue in var %} 31 | 32 | 33 | 34 | 35 | 36 | {% endfor %} 37 | {% else %} 38 | 39 | 40 | 41 | 42 | {% endif %} 43 | 44 | {% else %} 45 | 46 | 47 | 48 | {% endfor %} 49 | 50 |
{% trans 'Variable' %}{% trans 'Value' %}
{{ k }}.{{subkey}}{{ subvalue }}
{{ k }}{{ var }}
{% trans 'This template does not receive any parameters' %}
51 |
52 | 53 |
54 | 55 | 58 |
59 | 60 |
61 | 62 |
63 | 64 |
65 | 66 |
67 |
68 |
69 | {% endblock %} -------------------------------------------------------------------------------- /bb-modules/mod_debug/html_admin/mod_debug_raw.phtml: -------------------------------------------------------------------------------- 1 | {% if html %}{{ html|raw }}{% endif %} 2 | {% if pre %}
{{ pre|raw }}
{% endif %} -------------------------------------------------------------------------------- /bb-modules/mod_debug/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "debug", 3 | "type": "mod", 4 | "name": "Debug BoxBilling", 5 | "description": "Administrator tools for BoxBilling", 6 | "version": "1.0.0" 7 | } -------------------------------------------------------------------------------- /bb-modules/mod_disableregistration/Service.php: -------------------------------------------------------------------------------- 1 | array( 9 | array( 10 | 'location' => 'order', 11 | 'label' => 'DroidTweak', 12 | 'uri' => 'droidtweak', 13 | 'index' => 10, 14 | 'class' => '', 15 | ), 16 | ), 17 | ); 18 | } 19 | 20 | public function register(Box_App &$app) 21 | { 22 | $app->get('/droidtweak', 'get_index', array(), get_class($this)); 23 | $app->get('/droidtweak/review/:id','get_review', array('id'=>'[0-9]+'), get_class($this)); 24 | } 25 | 26 | public function get_index(Box_App $app) 27 | { 28 | $app->getApiAdmin(); 29 | return $app->render('mod_droidtweak_index'); 30 | } 31 | 32 | public function get_review(Box_App $app, $id) 33 | { 34 | $api = $app->getApiAdmin(); 35 | $review = $api->droidtweak_review_get(array('id'=>$id)); 36 | return $app->render('mod_droidtweak_review', array('review'=>$review)); 37 | } 38 | } -------------------------------------------------------------------------------- /bb-modules/mod_droidtweak/html_admin/mod_droidtweak_index.phtml: -------------------------------------------------------------------------------- 1 | {% extends request.ajax ? "layout_blank.phtml" : "layout_default.phtml" %} 2 | {% import "macro_functions.phtml" as mf %} 3 | {% block meta_title %}DroidTweak{% endblock %} 4 | {% set active_menu = 'order' %} 5 | 6 | {% block content %} 7 | 8 |
9 |
10 |
{% trans 'Droid Tweak' %}
11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | {% set orders = admin.droidtweak_get_list(request) %} 26 | {% for order in orders.list %} 27 | 28 | 29 | 30 | 31 | 32 | 33 | 36 | 37 | {% else %} 38 | 39 | 42 | 43 | {% endfor %} 44 | 45 | 46 | {% if orders.pages > 1 %} 47 | 48 | 49 | 52 | 53 | 54 | {% endif %} 55 |
{% trans 'Client' %}{% trans 'Service' %}{% trans 'Status' %}{% trans 'Date' %} 
{{ order.client.id }}{{ order.client.first_name|truncate('10') }} {{ order.client.last_name|truncate(15) }}{{ order.product.title }}{{ order.status }}{{ order.created_at|date }} 34 | 35 |
40 | {% trans 'The list is empty' %} 41 |
50 | {% include "partial_pagination.phtml" with {'list': orders, 'url':'droidtweak'} %} 51 |
56 |
57 | 58 | {% endblock %} -------------------------------------------------------------------------------- /bb-modules/mod_droidtweak/html_email/mod_droidtweak_client_signup.phtml: -------------------------------------------------------------------------------- 1 | {% block subject %}[{{ guest.system_company.name }}] Welcome {{ c.first_name }}{% endblock %} 2 | {% block content %} 3 | {% filter markdown %} 4 | Hello {{ c.first_name }} {{ c.last_name }}, 5 | 6 | Thank you for signing up with us. Your new account has been setup and you can now login to our client area using the details below. 7 | 8 | 9 | Email: {{c.email}} 10 | Password: {{password}} 11 | 12 | 13 | To login, visit {{ 'login'|link }}?email={{c.email}} 14 | Edit your profile at {{'me'|link}} 15 | 16 | {{ guest.system_company.signature }} 17 | 18 | {% endfilter %} 19 | {% endblock %} -------------------------------------------------------------------------------- /bb-modules/mod_droidtweak/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "droidtweak", 3 | "type": "mod", 4 | "name": "DroidTweak", 5 | "description": "Special", 6 | "homepage_url": "http://home.droidtweak.com/", 7 | "author": "BoxBilling", 8 | "author_url": "http://www.boxbilling.com/", 9 | "version": "1.2.0" 10 | } -------------------------------------------------------------------------------- /bb-modules/mod_embed/Controller_Admin.php: -------------------------------------------------------------------------------- 1 | array( 25 | array( 26 | 'location' => 'extensions', 27 | 'label' => 'Embed and integrate', 28 | 'index' => 1500, 29 | 'uri' => 'embed', 30 | 'class' => '', 31 | ), 32 | ), 33 | ); 34 | } 35 | 36 | public function register(Box_App &$app) 37 | { 38 | $app->get('/embed', 'get_index', array(), get_class($this)); 39 | } 40 | 41 | public function get_index(Box_App $app) 42 | { 43 | $api = $app->getApiAdmin(); 44 | return $app->render('mod_embed_index'); 45 | } 46 | } -------------------------------------------------------------------------------- /bb-modules/mod_embed/Controller_Client.php: -------------------------------------------------------------------------------- 1 | get('/embed/:what', 'get_object', array('what' => '[a-z0-9-]+'), get_class($this)); 31 | } 32 | 33 | public function get_object(Box_App $app, $what) 34 | { 35 | $api = $app->getApiGuest(); 36 | $tpl = 'mod_embed_'.$what; 37 | return $app->render($tpl); 38 | } 39 | } -------------------------------------------------------------------------------- /bb-modules/mod_embed/README.md: -------------------------------------------------------------------------------- 1 | # Embed and integrate parts of BoxBilling to your website 2 | 3 | Module purpose is to give ability for users to include parts of BoxBilling 4 | to other websites. -------------------------------------------------------------------------------- /bb-modules/mod_embed/html_admin/mod_embed_index.phtml: -------------------------------------------------------------------------------- 1 | {% extends request.ajax ? "layout_blank.phtml" : "layout_default.phtml" %} 2 | {% block meta_title %}Embed parts of BoxBilling{% endblock %} 3 | {% set active_menu = 'extensions' %} 4 | 5 | {% block content %} 6 | 7 |
8 |
Select which part of BoxBilling you would like to integrate
9 |
10 | 11 |
12 |
Client area login form
13 | 17 | 18 |
Domain checker form
19 | 23 | 24 |
Contact us form
25 | 29 |
30 |
31 | 32 | {% endblock %} 33 | 34 | 35 | {% block js %} 36 | {% autoescape true js %} 37 | 51 | {% endautoescape %} 52 | {% endblock %} -------------------------------------------------------------------------------- /bb-modules/mod_embed/html_client/mod_embed_loginform.phtml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Login 5 | 6 | 29 | 30 | 31 | 32 |
33 |
34 | Login to client area 35 |

36 | 37 |

38 |

39 | 40 |

41 | 42 |
43 |
44 | 45 | 46 | 62 | 63 | -------------------------------------------------------------------------------- /bb-modules/mod_embed/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "embed", 3 | "type": "mod", 4 | "name": "Embed module", 5 | "description": "Provides ability to embed parts of BoxBilling to other websites", 6 | "homepage_url": "http://github.com/boxbilling/", 7 | "author": "BoxBilling", 8 | "author_url": "http://extensions.boxbilling.com/", 9 | "license": "GPL version 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html", 10 | "version": "1.0.1", 11 | "minimum_boxbilling_version": "2.3" 12 | } -------------------------------------------------------------------------------- /bb-modules/mod_example/Api_Admin.php: -------------------------------------------------------------------------------- 1 | _convertXmlObjToArr($xml, $array); 46 | return $array; 47 | } 48 | 49 | private function _convertXmlObjToArr($obj, &$arr) 50 | { 51 | $children = $obj->children(); 52 | foreach ($children as $elementName => $node) 53 | { 54 | $nextIdx = count($arr); 55 | $arr[$nextIdx] = array(); 56 | $arr[$nextIdx]['_name'] = strtolower((string)$elementName); 57 | $arr[$nextIdx]['_attributes'] = array(); 58 | $attributes = $node->attributes(); 59 | foreach ($attributes as $attributeName => $attributeValue) 60 | { 61 | $attribName = strtolower(trim((string)$attributeName)); 62 | $attribVal = trim((string)$attributeValue); 63 | $arr[$nextIdx]['_attributes'][$attribName] = $attribVal; 64 | } 65 | $text = (string)$node; 66 | $text = trim($text); 67 | if (strlen($text) > 0) 68 | { 69 | $arr[$nextIdx]['_text'] = $text; 70 | } 71 | $arr[$nextIdx]['_children'] = array(); 72 | $this->_convertXmlObjToArr($node, $arr[$nextIdx]['_children']); 73 | } 74 | return; 75 | } 76 | } -------------------------------------------------------------------------------- /bb-modules/mod_example/Controller_Client.php: -------------------------------------------------------------------------------- 1 | get('/example', 'get_index', array(), get_class($this)); 35 | $app->get('/example/protected', 'get_protected', array(), get_class($this)); 36 | } 37 | 38 | public function get_index(Box_App $app) 39 | { 40 | $api = $app->getApiGuest(); 41 | return $app->render('mod_example_index'); 42 | } 43 | 44 | public function get_protected(Box_App $app) 45 | { 46 | // call $app->getApiClient() method to validate if client is logged in 47 | $api = $app->getApiClient(); 48 | return $app->render('mod_example_index', array('show_protected'=>true)); 49 | } 50 | } -------------------------------------------------------------------------------- /bb-modules/mod_example/README.md: -------------------------------------------------------------------------------- 1 | # Example extension readme file 2 | 3 | Module purpose is to provide a starting point for developer to get started 4 | creating his own BoxBilling module. 5 | 6 | Explore the files and comments in the code to better understand the structure 7 | of module. Contact Development helpdesk at www.boxbilling.com if you need more 8 | information. 9 | 10 | In general modules are used to extend BoxBilling basic functionality. 11 | 12 | All modules can access other modules via API or database 13 | 14 | ## BoxBilling module requirements 15 | 16 | ### Required 17 | 18 | * Directory name must start with **mod_** 19 | * Folder must contain **manifest.json** file to describe itself 20 | 21 | ### Optional 22 | 23 | * **README.md** - file for installation and getting started instructions 24 | * **Controller_Admin.php** - if module has install/uninstall instructions or 25 | admin area interface 26 | * **Controller_Client.php** - if module has client area interface 27 | * Api_Admin.php - file for admin API 28 | * Api_Client.php - file for client API 29 | * Api_Guest.php - file for Guest API 30 | * Folder html_admin - for admin area templates, to store custom *.phtml files 31 | * Folder html_client - for client area templates, to store custom *.phtml files 32 | 33 | ## Tips 34 | 35 | We recommend to host your extensions on public [github.com](http://github.com) repository -------------------------------------------------------------------------------- /bb-modules/mod_example/html_admin/mod_example_index.phtml: -------------------------------------------------------------------------------- 1 | {% extends request.ajax ? "layout_blank.phtml" : "layout_default.phtml" %} 2 | 3 | {% block meta_title %}{% trans 'Example module' %}{% endblock %} 4 | 5 | {% set active_menu = 'extension' %} 6 | 7 | {% block content %} 8 | 9 |
10 |
11 |
{% trans 'Example module title' %}
12 |
13 | 14 |
15 |

{% trans 'This is an example extension content' %}

16 |
17 | 25 | 26 | {# Check if example parameters passed to template file #} 27 | {% if youparamname %} 28 |
29 |

{% trans 'Parameters from Controller' %}

30 |
31 |
32 |

You have passed parameter youparamname: {{ youparamname }}

33 |
34 | {% endif %} 35 | 36 | 37 | 38 | {# Check if example parameters passed to template file #} 39 | {% if userid %} 40 |
41 |

{% trans 'Parameters from URL' %}

42 |
43 |
44 |

You have passed parameter userid: {{ userid }}

45 |
46 | {% endif %} 47 | 48 | {% if api_example %} 49 | {# API example #} 50 |
51 |

{% trans 'API example' %}

52 |
53 |
54 |
Data from API and passed to template from controller
55 |
{% debug list_from_controller %}
56 | 57 |
Data from API accessed directly from template file
58 | {% set list = admin.example_get_something({"microsoft":1}) %} 59 |
{% debug list %}
60 |
61 | {% endif %} 62 |
63 | 64 | {% endblock %} -------------------------------------------------------------------------------- /bb-modules/mod_example/html_client/mod_example_index.phtml: -------------------------------------------------------------------------------- 1 | {% extends request.ajax ? "layout_blank.phtml" : "layout_default.phtml" %} 2 | 3 | {% block meta_title %}{% trans 'Example module' %}{% endblock %} 4 | 5 | {% block content %} 6 | 7 |
8 |
9 |

{% trans 'Example module title' %}

10 |
11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 28 | 29 | 30 |
This is an example content
22 | {% if client %} 23 | {% trans 'See protected content' %} 24 | {% else %} 25 | {% trans 'Login to client area' %} 26 | {% endif %} 27 |
31 |
32 | 33 | {% if show_protected %} 34 |
35 |
36 |

{% trans 'This content can be seen only if client is logged in' %}

37 |
38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 50 | 51 | 52 |
{% trans 'Your protected content' %}
48 | {% trans 'Manage profile' %} 49 |
53 |
54 | {% endif %} 55 | {% endblock %} -------------------------------------------------------------------------------- /bb-modules/mod_example/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "example", 3 | "type": "mod", 4 | "name": "Example module", 5 | "description": "Module for BoxBilling developer to get started", 6 | "homepage_url": "http://github.com/boxbilling/", 7 | "author": "BoxBilling", 8 | "author_url": "http://extensions.boxbilling.com/", 9 | "license": "GPL version 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html", 10 | "version": "1.0.0", 11 | "minimum_boxbilling_version": "0.0.1" 12 | } -------------------------------------------------------------------------------- /bb-modules/mod_importwhmcs/Api_Admin.php: -------------------------------------------------------------------------------- 1 | '', 16 | ); 17 | } 18 | } -------------------------------------------------------------------------------- /bb-modules/mod_importwhmcs/Controller_Admin.php: -------------------------------------------------------------------------------- 1 | array( 9 | array( 10 | 'location' => 'extensions', 11 | 'index' => 1900, 12 | 'label' => 'Whmcs Importer', 13 | 'uri' => '/importwhmcs', 14 | 'class' => '', 15 | ), 16 | ), 17 | ); 18 | } 19 | 20 | public function register(Box_App &$app) 21 | { 22 | $app->get('/importwhmcs', 'get_index', array(), get_class($this)); 23 | } 24 | 25 | public function get_index(Box_App $app) 26 | { 27 | $api = $app->getApiAdmin(); 28 | return $app->render('mod_importwhmcs_index'); 29 | } 30 | } -------------------------------------------------------------------------------- /bb-modules/mod_importwhmcs/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "importwhmcs", 3 | "type": "mod", 4 | "name": "Import Whmcs database", 5 | "description": "Tool to import data from whmcs database", 6 | "version": "1.0.0" 7 | } -------------------------------------------------------------------------------- /bb-modules/mod_invite/Api_Admin.php: -------------------------------------------------------------------------------- 1 | $data['client_id'])); 18 | if(!$invited) { 19 | return false; 20 | } 21 | 22 | return array( 23 | 'id' => $invited->id, 24 | 'first_name' => $invited->inviter_first_name, 25 | 'last_name' => $invited->inviter_last_name, 26 | ); 27 | } 28 | 29 | public function issue($data) 30 | { 31 | if(!isset($data['client_id'])) { 32 | throw new Box_Exception('Client id is required to check invitation status'); 33 | } 34 | 35 | $this->getApiAdmin()->client_get(array('id'=>$data['client_id'])); 36 | 37 | $amount = isset($data['amount']) ? (int)$data['amount'] : 1; 38 | $service = new Box_Mod_Invite_Service; 39 | $service->issueInvites($data['client_id'], $amount); 40 | 41 | $this->_log('Issued %s invites for client #%s', $data['amount'], $data['client_id']); 42 | return true; 43 | } 44 | 45 | } -------------------------------------------------------------------------------- /bb-modules/mod_invite/Api_Guest.php: -------------------------------------------------------------------------------- 1 | $data['hash'])); 18 | if(!$invite) { 19 | throw new Box_Exception('Invitation was not found'); 20 | } 21 | 22 | $invite->ip_confirm = $this->_ip; 23 | $invite->confirmed_at = date('c'); 24 | $invite->updated_at = date('c'); 25 | R::store($invite); 26 | 27 | $this->_log($invite->email . ' confirmed invitation from client #'.$invite->client_id); 28 | 29 | return true; 30 | } 31 | } -------------------------------------------------------------------------------- /bb-modules/mod_invite/Controller_Client.php: -------------------------------------------------------------------------------- 1 | get('/invite/confirm/:hash', 'get_confirm', array('hash'=>'[a-z0-9]+'), get_class($this)); 24 | } 25 | 26 | public function get_confirm(Box_App $app, $hash) 27 | { 28 | $app->getApiGuest()->invite_confirm(array('hash'=>$hash)); 29 | $app->redirect('/login?register=1'); 30 | } 31 | } -------------------------------------------------------------------------------- /bb-modules/mod_invite/html_client/mod_invite_invitations.phtml: -------------------------------------------------------------------------------- 1 | {% if client %} 2 | 3 | {% set invite = client.invite_info %} 4 | 5 | {% if invite.inviter %} 6 | You were invited by {{invite.inviter}} 7 | {% endif %} 8 | 9 | {{invite.invitations}} invitations left 10 | 11 | {% if invite.invitations %} 12 |
13 | 14 | 15 | 16 |
17 | {% endif %} 18 | 19 | {% endif %} -------------------------------------------------------------------------------- /bb-modules/mod_invite/html_email/mod_invite_confirm.phtml: -------------------------------------------------------------------------------- 1 | {% block subject %}{{c.first_name}} {{c.last_name}} invites you to join {{ guest.system_company.name }}{% endblock %} 2 | {% block content %} 3 | {% filter markdown %} 4 | 5 | {{c.first_name}} {{c.last_name}} invited you to {{ guest.system_company.name }} 6 | 7 | If you do not know this person, please ignore this email. 8 | 9 | Message: 10 | 11 | --- 12 | 13 | {{message}} 14 | 15 | --- 16 | 17 | 18 | To confirm your invitation you must visit the link below: 19 | 20 | {{'invite/confirm'|link}}/{{invite.hash}} 21 | 22 | {% endfilter %} 23 | 24 | {% endblock %} 25 | -------------------------------------------------------------------------------- /bb-modules/mod_invite/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boxbilling/extensions/a9c62dd8e6f91de24cd170e6ce95f018a9367d41/bb-modules/mod_invite/icon.png -------------------------------------------------------------------------------- /bb-modules/mod_invite/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "invite", 3 | "type": "mod", 4 | "name": "Invitations", 5 | "description": "Ability to give invites for clients", 6 | "icon_url": "icon.png", 7 | "version": "1.1.0" 8 | } -------------------------------------------------------------------------------- /bb-modules/mod_invoiceoptions/Service.php: -------------------------------------------------------------------------------- 1 | service = $mod->getService(); 26 | } 27 | 28 | /** 29 | * Sync clients with mailchimp list 30 | * 31 | * @return string - sync log 32 | */ 33 | public function sync() 34 | { 35 | $sql="SELECT id, email FROM client WHERE 1"; 36 | $res = R::getAll($sql); 37 | 38 | $log = ''; 39 | foreach($res as $c) { 40 | try { 41 | $this->service->mailchimpSubscribe($c['id']); 42 | $log .= sprintf('Client #%s %s synced', $c['id'], $c['email']) . PHP_EOL; 43 | } catch (Exception $exc) { 44 | error_log($exc->getMessage()); 45 | $log .= $exc->getMessage() . PHP_EOL; 46 | } 47 | } 48 | 49 | return $log; 50 | } 51 | 52 | /** 53 | * Test API connection 54 | * 55 | * @param int $client_id - client id to be subscibed 56 | * @return bool 57 | */ 58 | public function subscribe($data) 59 | { 60 | if(!isset($data['client_id'])) { 61 | throw new Box_Exception('Client id is missing'); 62 | } 63 | return $this->service->mailchimpSubscribe($data['client_id']); 64 | } 65 | 66 | /** 67 | * Test API connection 68 | * 69 | * @return bool - true if can connect to mailchimp 70 | */ 71 | public function ping() 72 | { 73 | $this->service->mailchimpPing(); 74 | return true; 75 | } 76 | 77 | /** 78 | * Get lists pairs 79 | * 80 | * @return array 81 | */ 82 | public function lists() 83 | { 84 | $lists = $this->service->mailchimpLists(); 85 | if($lists['total'] == 0) { 86 | return array(); 87 | } 88 | 89 | $res = array(); 90 | foreach($lists['data'] as $list) { 91 | $res[$list['id']] = $list['name']; 92 | } 93 | 94 | return $res; 95 | } 96 | } -------------------------------------------------------------------------------- /bb-modules/mod_mailchimp/Service.php: -------------------------------------------------------------------------------- 1 | isPro()) { 25 | throw new Exception('This extension can only be enabled by PRO license owners', 509); 26 | } 27 | } 28 | 29 | public function mailchimpPing() 30 | { 31 | $api = $this->_mailchimpApi(); 32 | $res = $api->ping(); 33 | if ($api->errorCode){ 34 | throw new Exception($api->errorMessage); 35 | } 36 | return $res; 37 | } 38 | 39 | public function mailchimpLists() 40 | { 41 | return $this->_mailchimpApi()->lists(); 42 | } 43 | 44 | public function mailchimpSubscribe($client_id) 45 | { 46 | $mod = new Box_Mod('mailchimp'); 47 | $config = $mod->getConfig(); 48 | 49 | $mod = new Box_Mod('api'); 50 | $api = $mod->getService()->getApiAdmin(); 51 | $client = $api->client_get(array('id'=>$client_id)); 52 | $merge_vars = array('FNAME'=>$client['first_name'], 'LNAME'=>$client['last_name']); 53 | 54 | $listId = $config['list_id'] ; 55 | $email = $client['email']; 56 | $api = $this->_mailchimpApi(); 57 | $retval = $api->listSubscribe($listId, $email, $merge_vars, 'html', false); 58 | if ($api->errorCode){ 59 | throw new Exception($api->errorMessage); 60 | } 61 | return $retval; 62 | } 63 | 64 | private function _mailchimpApi() 65 | { 66 | $mod = new Box_Mod('mailchimp'); 67 | $config = $mod->getConfig(); 68 | require_once dirname(__FILE__).'/MCAPI.class.php'; 69 | return new MCAPI($config['api_key']); 70 | } 71 | 72 | public static function onAfterClientSignUp(Box_Event $event) 73 | { 74 | $params = $event->getParameters(); 75 | try { 76 | $event->getApiAdmin()->mailchimp_subscribe(array('client_id'=>$params['id'])); 77 | } catch(Exception $exc) { 78 | error_log($exc->getMessage()); 79 | if($event->getApiGuest()->extension_is_on(array('mod'=>'notification'))) { 80 | $msg = "Error subscribing client to mailchimp: ".$exc->getMessage(); 81 | $event->getApiAdmin()->notification_add(array('message'=>$msg)); 82 | } 83 | } 84 | return true; 85 | } 86 | } -------------------------------------------------------------------------------- /bb-modules/mod_mailchimp/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "mailchimp", 3 | "type": "mod", 4 | "name": "MailChimp.com", 5 | "description": "Keeps clients synced with MailChimp", 6 | "version": "1.0.0" 7 | } -------------------------------------------------------------------------------- /bb-modules/mod_massmailer/Controller_Admin.php: -------------------------------------------------------------------------------- 1 | array( 9 | array( 10 | 'location' => 'extensions', 11 | 'index' => 4000, 12 | 'label' => 'Mass Mailer', 13 | 'uri' => 'massmailer', 14 | 'class' => '', 15 | ), 16 | ), 17 | ); 18 | } 19 | 20 | public function register(Box_App &$app) 21 | { 22 | $app->get('/massmailer', 'get_index', array(), get_class($this)); 23 | $app->get('/massmailer/message/:id', 'get_edit', array('id'=>'[0-9]+'), get_class($this)); 24 | } 25 | 26 | public function get_index(Box_App $app) 27 | { 28 | $api = $app->getApiAdmin(); 29 | return $app->render('mod_massmailer_index'); 30 | } 31 | 32 | public function get_edit(Box_App $app, $id) 33 | { 34 | $api = $app->getApiAdmin(); 35 | $model = $api->massmailer_get(array('id'=>$id)); 36 | return $app->render('mod_massmailer_message', array('msg'=>$model)); 37 | } 38 | } -------------------------------------------------------------------------------- /bb-modules/mod_massmailer/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "massmailer", 3 | "type": "mod", 4 | "name": "Mass mail tool", 5 | "description": "Send batch email to filtered clients", 6 | "version": "1.0.0" 7 | } -------------------------------------------------------------------------------- /bb-modules/mod_partner/Api_Guest.php: -------------------------------------------------------------------------------- 1 | _role); 18 | } 19 | } -------------------------------------------------------------------------------- /bb-modules/mod_partner/Controller_Admin.php: -------------------------------------------------------------------------------- 1 | array( 9 | array( 10 | 'location' => 'system', 11 | 'index' => 800, 12 | 'label' => 'Partners', 13 | 'uri' => '/partner', 14 | 'class' => '', 15 | ), 16 | ), 17 | ); 18 | } 19 | 20 | public function install() 21 | { 22 | Box_Db::getRb(); 23 | $sql=" 24 | CREATE TABLE IF NOT EXISTS `mod_partner` ( 25 | `id` bigint(20) NOT NULL AUTO_INCREMENT, 26 | `client_id` bigint(20) DEFAULT NULL, 27 | `website` varchar(255) DEFAULT NULL, 28 | `logo` varchar(255) DEFAULT NULL, 29 | `product_id` bigint(20) DEFAULT NULL, 30 | `price` decimal(18,2) DEFAULT NULL, 31 | `public` tinyint DEFAULT 0, 32 | `status` varchar(255) DEFAULT 'active', 33 | `created_at` varchar(35) DEFAULT NULL, 34 | `updated_at` varchar(35) DEFAULT NULL, 35 | PRIMARY KEY (`id`), 36 | KEY `client_id_idx` (`client_id`) 37 | ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;"; 38 | R::exec($sql); 39 | } 40 | 41 | public function register(Box_App &$app) 42 | { 43 | $app->get('/partner', 'get_index', array(), get_class($this)); 44 | $app->get('/partner/:id', 'get_partner', array('id'=>'[0-9]+'), get_class($this)); 45 | } 46 | 47 | public function get_index(Box_App $app) 48 | { 49 | $api = $app->getApiAdmin(); 50 | return $app->render('mod_partner_index'); 51 | } 52 | 53 | public function get_partner(Box_App $app, $id) 54 | { 55 | $api = $app->getApiAdmin(); 56 | $partner = $api->partner_get(array('client_id'=>$id)); 57 | return $app->render('mod_partner_details', array('partner'=>$partner)); 58 | } 59 | } -------------------------------------------------------------------------------- /bb-modules/mod_partner/Controller_Client.php: -------------------------------------------------------------------------------- 1 | get('/partner', 'get_index', array(), get_class($this)); 8 | } 9 | 10 | public function get_index(Box_App $app) 11 | { 12 | return $app->render('mod_partner_index'); 13 | } 14 | } -------------------------------------------------------------------------------- /bb-modules/mod_partner/html_email/mod_partner_purchase.phtml: -------------------------------------------------------------------------------- 1 | {% block subject %}[{{ guest.system_company.name }}] Partners license issued{% endblock %} 2 | {% block content %} 3 | {% filter markdown %} 4 | Hi {{ c.first_name }}, 5 | 6 | New **{{ order.title }}** was created. 7 | 8 | Invoice for this license will be issued on {{ partner.next_invoice_date|date }} 9 | 10 | Login to members area: {{ 'login'|link }}?email={{ c.email }} 11 | Manage order: {{ 'service/manage'|link }}/{{ order.id }} 12 | 13 | Reference order #{{ order.id }} 14 | 15 | {{ guest.system_company.signature }} 16 | 17 | {% endfilter %} 18 | {% endblock %} 19 | -------------------------------------------------------------------------------- /bb-modules/mod_partner/html_email/mod_partner_signup.phtml: -------------------------------------------------------------------------------- 1 | {% block subject %}[{{ guest.system_company.name }}] Partners program{% endblock %} 2 | {% block content %} 3 | {% filter markdown %} 4 | Hi {{ c.first_name }} {{ c.last_name }}, 5 | 6 | **Congratulations** on becoming BoxBilling **partner**. 7 | 8 | Login details are the same as your client profile details: 9 | 10 | Email: **{{ c.email }}** 11 | Password: ******** 12 | 13 | Login to members area at: {{ 'login'|link }} 14 | Manage partners profile at: {{ 'partner'|link }} 15 | 16 | *Provide your Logo and Website details in partners management page if you want 17 | to get listed on official partners list.* 18 | 19 | **Benefits you receive** 20 | 21 | * Purchase new licenses in seconds 22 | * API to link with your billing system 23 | * Manage Licenses even without billing software - from partners page 24 | * Use same BoxBilling client area which you are used to 25 | * Auto Renewals of licenses 26 | * Every Partner also gets listed in public Partners list 27 | * No payment in advance. To start selling for free. 28 | * You collect money from clients before we charge you 29 | 30 | **Does it mean I can now resell your system by becoming partner?** 31 | 32 | Yes. Now you can resell BoxBilling PRO licenses. Your clients will love using 33 | BoxBilling and you will earn money. The more licenses you sell the lower the 34 | price becomes. 35 | 36 | **What is my role? What is your role?** 37 | 38 | Your role is sell BoxBilling PRO licenses. Our role is to provide best quality 39 | software and manage issued licenses. 40 | 41 | **What is the pricing for partners?** 42 | 43 | Prices depends on how many license you have sold. 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 |
Less than or equal to 5 license$5.95/month
Above 5 license$4.95/month
Above 10 license$3.95/month
Above 50 license$2.95/month
Above 100 license$1.95/month
69 | 70 | **How do i promote myself ?** 71 | 72 | * Post a review about BoxBilling on your blog 73 | * Post on Twitter and Facebook 74 | * Refer your Friends 75 | * Write a complete review of BoxBilling.com and post it on all forums 76 | * Tell EVERYONE you know! 77 | 78 | {{ guest.system_company.signature }} 79 | 80 | {% endfilter %} 81 | {% endblock %} 82 | -------------------------------------------------------------------------------- /bb-modules/mod_partner/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "partner", 3 | "type": "mod", 4 | "name": "Partners program", 5 | "description": "Make clients partners and sell boxbilling licenses", 6 | "homepage_url": "http://github.com/boxbilling/", 7 | "author": "BoxBilling", 8 | "author_url": "http://extensions.boxbilling.com/", 9 | "license": "http://www.boxbilling.com/license.txt", 10 | "version": "2.0.0" 11 | } -------------------------------------------------------------------------------- /bb-modules/mod_phoneconfirmation/html_admin/mod_phoneconfirmation_settings.phtml: -------------------------------------------------------------------------------- 1 | {% extends request.ajax ? "layout_blank.phtml" : "layout_default.phtml" %} 2 | {% import "macro_functions.phtml" as mf %} 3 | {% block meta_title %}Phone verification settings{% endblock %} 4 | {% set active_menu = 'system' %} 5 | 6 | {% block content %} 7 | 8 |
9 |
10 |
{% trans 'Phone verification settings' %}
11 |
12 | 13 | {% set params = admin.extension_config_get({"ext":"mod_phoneconfirmation"}) %} 14 | 15 |
16 |
17 |
18 | 19 |
20 | 21 |
22 |
23 |
24 | 25 | 26 | 27 |
28 |
29 | 30 | 33 | 34 |
35 | {% endblock %} -------------------------------------------------------------------------------- /bb-modules/mod_phoneconfirmation/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "phoneconfirmation", 3 | "type": "mod", 4 | "name": "Phone confirmation for clients", 5 | "description": "Enables option to validate clients phone number", 6 | "version": "1.0.0" 7 | } -------------------------------------------------------------------------------- /bb-modules/mod_phpminiadmin/Controller_Admin.php: -------------------------------------------------------------------------------- 1 | array( 9 | array( 10 | 'location' => 'system', 11 | 'index' => 1800, 12 | 'label' => 'PHP Mini MySQL Admin', 13 | 'uri' => '/phpminiadmin', 14 | 'class' => '', 15 | ), 16 | ), 17 | ); 18 | } 19 | 20 | public function register(Box_App &$app) 21 | { 22 | $app->get('/phpminiadmin', 'get_index', array(), get_class($this)); 23 | } 24 | 25 | public function get_index(Box_App $app) 26 | { 27 | $api = $app->getApiAdmin(); 28 | return $app->render('mod_phpminiadmin_index'); 29 | } 30 | } -------------------------------------------------------------------------------- /bb-modules/mod_phpminiadmin/html_admin/mod_phpminiadmin_index.phtml: -------------------------------------------------------------------------------- 1 | {% extends request.ajax ? "layout_blank.phtml" : "layout_default.phtml" %} 2 | {% set active_menu = 'system' %} 3 | {% block meta_title %}PHP Mini MySQL Admin{% endblock %} 4 | {% block content %} 5 |