├── .github
├── ISSUE_TEMPLATE
│ ├── bug-report.md
│ └── feature_request.md
└── stale.yml
├── .gitignore
├── CHANGELOG.md
├── LICENSE
├── README.md
├── addons
└── vultr
│ ├── Addon.php
│ ├── Configuration.php
│ ├── Loader.php
│ ├── controllers
│ └── addon
│ │ ├── admin
│ │ ├── Dns.php
│ │ ├── Home.php
│ │ ├── ISO.php
│ │ ├── Location.php
│ │ ├── Products.php
│ │ ├── ProductsCreator.php
│ │ └── Snapshots.php
│ │ └── clientarea
│ │ └── Home.php
│ ├── cron
│ └── cron.php
│ ├── helpers
│ ├── ApiHelper.php
│ ├── PathHelper.php
│ └── ProductsHelper.php
│ ├── hooks.php
│ ├── langs
│ └── english.php
│ ├── mgLibs
│ ├── Lang.php
│ ├── MySQL
│ │ ├── Exception.php
│ │ ├── Query.php
│ │ └── Result.php
│ ├── Smarty.php
│ ├── error
│ │ └── Register.php
│ ├── exceptions
│ │ ├── Base.php
│ │ ├── Codes.php
│ │ ├── System.php
│ │ ├── Validation.php
│ │ └── WhmcsAPI.php
│ ├── forms
│ │ ├── AbstractField.php
│ │ ├── ButtonField.php
│ │ ├── CheckboxField.php
│ │ ├── Creator.php
│ │ ├── DateField.php
│ │ ├── HiddenField.php
│ │ ├── LegendField.php
│ │ ├── NumberField.php
│ │ ├── OnOffField.php
│ │ ├── PasswordField.php
│ │ ├── RadioField.php
│ │ ├── SelectField.php
│ │ ├── SubmitField.php
│ │ ├── TextField.php
│ │ └── TextareaField.php
│ ├── models
│ │ ├── Base.php
│ │ ├── Orm.php
│ │ └── Repository.php
│ ├── process
│ │ ├── AbstractConfiguration.php
│ │ ├── AbstractController.php
│ │ ├── AbstractMainDriver.php
│ │ └── MainInstance.php
│ └── whmcsAPI
│ │ └── WhmcsAPI.php
│ ├── models
│ ├── addonConfiguration
│ │ └── Repository.php
│ ├── customWHMCS
│ │ └── product
│ │ │ ├── Configuration.php
│ │ │ ├── Product.php
│ │ │ └── Repository.php
│ ├── dns
│ │ └── Repository.php
│ ├── iso
│ │ └── Repository.php
│ ├── location
│ │ └── Repository.php
│ ├── products
│ │ └── Repository.php
│ ├── snapshots
│ │ └── Repository.php
│ └── whmcs
│ │ ├── addons
│ │ ├── Addon.php
│ │ └── Repository.php
│ │ ├── admins
│ │ ├── Admin.php
│ │ ├── Admins.php
│ │ ├── Role.php
│ │ └── Roles.php
│ │ ├── clients
│ │ ├── Client.php
│ │ ├── Clients.php
│ │ ├── Group.php
│ │ ├── Groups.php
│ │ └── customFields
│ │ │ ├── CustomField.php
│ │ │ └── Repository.php
│ │ ├── currencies
│ │ ├── Currency.php
│ │ └── Repository.php
│ │ ├── customFields
│ │ ├── CustomField.php
│ │ └── Repository.php
│ │ ├── domains
│ │ ├── DomainTld.php
│ │ └── Repository.php
│ │ ├── emails
│ │ ├── Template.php
│ │ └── Templates.php
│ │ ├── errors
│ │ └── Register.php
│ │ ├── invoices
│ │ ├── Invoice.php
│ │ ├── Item.php
│ │ └── RepositoryItem.php
│ │ ├── orders
│ │ └── Order.php
│ │ ├── pricing
│ │ ├── BillingCycle.php
│ │ ├── Price.php
│ │ └── Repository.php
│ │ ├── product
│ │ ├── Configuration.php
│ │ ├── Product.php
│ │ ├── ProductGroup.php
│ │ ├── ProductGroups.php
│ │ ├── Products.php
│ │ └── configOptions
│ │ │ ├── ConfigOption.php
│ │ │ ├── Group.php
│ │ │ └── Repository.php
│ │ ├── servers
│ │ └── Server.php
│ │ └── service
│ │ ├── Repository.php
│ │ ├── Service.php
│ │ ├── configOptions
│ │ ├── ConfigOption.php
│ │ └── Repository.php
│ │ └── customFields
│ │ ├── CustomField.php
│ │ └── Repository.php
│ ├── templates
│ ├── admin
│ │ ├── assets
│ │ │ ├── css
│ │ │ │ ├── bootstrap.css
│ │ │ │ ├── components-rounded.css
│ │ │ │ ├── font-awesome.css
│ │ │ │ ├── jquery-ui.min.css
│ │ │ │ ├── jquery.dataTables.css
│ │ │ │ ├── mg-style.css
│ │ │ │ ├── onoffswitch.css
│ │ │ │ ├── select2.min.css
│ │ │ │ ├── simple-line-icons.css
│ │ │ │ └── uniform.default.css
│ │ │ ├── fonts
│ │ │ │ ├── FontAwesome.otf
│ │ │ │ ├── Simple-Line-Icons.dev.svg
│ │ │ │ ├── Simple-Line-Icons.eot
│ │ │ │ ├── Simple-Line-Icons.svg
│ │ │ │ ├── Simple-Line-Icons.ttf
│ │ │ │ ├── Simple-Line-Icons.woff
│ │ │ │ ├── fontawesome-webfont.eot
│ │ │ │ ├── fontawesome-webfont.svg
│ │ │ │ ├── fontawesome-webfont.ttf
│ │ │ │ ├── fontawesome-webfont.woff
│ │ │ │ ├── fontawesome-webfont.woff2
│ │ │ │ ├── glyphicons-halflings-regular.eot
│ │ │ │ ├── glyphicons-halflings-regular.svg
│ │ │ │ ├── glyphicons-halflings-regular.ttf
│ │ │ │ ├── glyphicons-halflings-regular.woff
│ │ │ │ └── glyphicons-halflings-regular.woff2
│ │ │ ├── img
│ │ │ │ ├── ajax-loader.gif
│ │ │ │ ├── favicon.png
│ │ │ │ ├── jqueryui
│ │ │ │ │ ├── ui-bg_diagonals-thick_18_b81900_40x40.png
│ │ │ │ │ ├── ui-bg_diagonals-thick_20_666666_40x40.png
│ │ │ │ │ ├── ui-bg_flat_10_000000_40x100.png
│ │ │ │ │ ├── ui-bg_glass_100_f6f6f6_1x400.png
│ │ │ │ │ ├── ui-bg_glass_100_fdf5ce_1x400.png
│ │ │ │ │ ├── ui-bg_glass_65_ffffff_1x400.png
│ │ │ │ │ ├── ui-bg_gloss-wave_35_f6a828_500x100.png
│ │ │ │ │ ├── ui-bg_highlight-soft_100_eeeeee_1x100.png
│ │ │ │ │ ├── ui-bg_highlight-soft_75_ffe45c_1x100.png
│ │ │ │ │ ├── ui-icons_222222_256x240.png
│ │ │ │ │ ├── ui-icons_228ef1_256x240.png
│ │ │ │ │ ├── ui-icons_ef8c08_256x240.png
│ │ │ │ │ ├── ui-icons_ffd27a_256x240.png
│ │ │ │ │ └── ui-icons_ffffff_256x240.png
│ │ │ │ ├── logo_vultr.png
│ │ │ │ ├── logo_vultrondark.svg
│ │ │ │ ├── mg-loader.gif
│ │ │ │ ├── mg-logo-cog.png
│ │ │ │ ├── mg-logo.png
│ │ │ │ ├── select2-spinner.gif
│ │ │ │ ├── sort_asc.png
│ │ │ │ ├── sort_asc_disabled.png
│ │ │ │ ├── sort_both.png
│ │ │ │ ├── sort_desc.png
│ │ │ │ └── sort_desc_disabled.png
│ │ │ └── js
│ │ │ │ ├── bootstrap-hover-dropdown.min.js
│ │ │ │ ├── bootstrap.js
│ │ │ │ ├── dataTables.bootstrap.js
│ │ │ │ ├── jquery-ui.min.js
│ │ │ │ ├── jquery.dataTables.js
│ │ │ │ ├── locationController.js
│ │ │ │ ├── mgLibs.js
│ │ │ │ ├── select2.full.min.js
│ │ │ │ ├── tableIso.js
│ │ │ │ ├── tableProducts.js
│ │ │ │ ├── tableSnapshots.js
│ │ │ │ ├── validator.js
│ │ │ │ └── whmcsProdConfSupp.js
│ │ ├── fatal.tpl
│ │ ├── formFields
│ │ │ ├── button.tpl
│ │ │ ├── checkbox.tpl
│ │ │ ├── containers
│ │ │ │ ├── clean.tpl
│ │ │ │ ├── default.tpl
│ │ │ │ └── modal.tpl
│ │ │ ├── date.tpl
│ │ │ ├── hidden.tpl
│ │ │ ├── legend.tpl
│ │ │ ├── number.tpl
│ │ │ ├── onoff.tpl
│ │ │ ├── password.tpl
│ │ │ ├── radio.tpl
│ │ │ ├── select.tpl
│ │ │ ├── select2.tpl
│ │ │ ├── submit.tpl
│ │ │ ├── text.tpl
│ │ │ └── textarea.tpl
│ │ ├── main.tpl
│ │ └── pages
│ │ │ ├── dns
│ │ │ └── dns.tpl
│ │ │ ├── home
│ │ │ └── home.tpl
│ │ │ ├── iSO
│ │ │ └── iso.tpl
│ │ │ ├── location
│ │ │ └── location.tpl
│ │ │ ├── products
│ │ │ ├── edit_product.tpl
│ │ │ ├── products.tpl
│ │ │ └── row.tpl
│ │ │ ├── productsCreator
│ │ │ └── products_creator.tpl
│ │ │ └── snapshots
│ │ │ └── snapshots.tpl
│ └── clientarea
│ │ └── default
│ │ ├── assets
│ │ ├── css
│ │ │ ├── bootstrap.css
│ │ │ ├── font-awesome.css
│ │ │ ├── jquery-ui.min.css
│ │ │ ├── jquery.dataTables.css
│ │ │ ├── mg-style.css
│ │ │ ├── onoffswitch.css
│ │ │ ├── select2.css
│ │ │ ├── simple-line-icons.css
│ │ │ └── uniform.default.css
│ │ ├── fonts
│ │ │ ├── FontAwesome.otf
│ │ │ ├── Simple-Line-Icons.dev.svg
│ │ │ ├── Simple-Line-Icons.eot
│ │ │ ├── Simple-Line-Icons.svg
│ │ │ ├── Simple-Line-Icons.ttf
│ │ │ ├── Simple-Line-Icons.woff
│ │ │ ├── fontawesome-webfont.eot
│ │ │ ├── fontawesome-webfont.svg
│ │ │ ├── fontawesome-webfont.ttf
│ │ │ ├── fontawesome-webfont.woff
│ │ │ ├── fontawesome-webfont.woff2
│ │ │ ├── glyphicons-halflings-regular.eot
│ │ │ ├── glyphicons-halflings-regular.svg
│ │ │ ├── glyphicons-halflings-regular.ttf
│ │ │ ├── glyphicons-halflings-regular.woff
│ │ │ └── glyphicons-halflings-regular.woff2
│ │ ├── img
│ │ │ ├── ajax-loader.gif
│ │ │ ├── favicon.png
│ │ │ ├── jqueryui
│ │ │ │ ├── ui-bg_diagonals-thick_18_b81900_40x40.png
│ │ │ │ ├── ui-bg_diagonals-thick_20_666666_40x40.png
│ │ │ │ ├── ui-bg_flat_10_000000_40x100.png
│ │ │ │ ├── ui-bg_glass_100_f6f6f6_1x400.png
│ │ │ │ ├── ui-bg_glass_100_fdf5ce_1x400.png
│ │ │ │ ├── ui-bg_glass_65_ffffff_1x400.png
│ │ │ │ ├── ui-bg_gloss-wave_35_f6a828_500x100.png
│ │ │ │ ├── ui-bg_highlight-soft_100_eeeeee_1x100.png
│ │ │ │ ├── ui-bg_highlight-soft_75_ffe45c_1x100.png
│ │ │ │ ├── ui-icons_222222_256x240.png
│ │ │ │ ├── ui-icons_228ef1_256x240.png
│ │ │ │ ├── ui-icons_ef8c08_256x240.png
│ │ │ │ ├── ui-icons_ffd27a_256x240.png
│ │ │ │ └── ui-icons_ffffff_256x240.png
│ │ │ ├── mg-loader.gif
│ │ │ ├── mg-logo-cog.png
│ │ │ ├── mg-logo.png
│ │ │ ├── select2-spinner.gif
│ │ │ ├── sort_asc.png
│ │ │ ├── sort_asc_disabled.png
│ │ │ ├── sort_both.png
│ │ │ ├── sort_desc.png
│ │ │ └── sort_desc_disabled.png
│ │ └── js
│ │ │ ├── bootstrap-hover-dropdown.min.js
│ │ │ ├── bootstrap.js
│ │ │ ├── dataTables.bootstrap.js
│ │ │ ├── jquery-ui.min.js
│ │ │ ├── jquery.dataTables.js
│ │ │ ├── mgLibs.js
│ │ │ ├── select2.min.js
│ │ │ └── validator.js
│ │ ├── formFields
│ │ ├── button.tpl
│ │ ├── checkbox.tpl
│ │ ├── containers
│ │ │ ├── clean.tpl
│ │ │ ├── default.tpl
│ │ │ └── modal.tpl
│ │ ├── date.tpl
│ │ ├── hidden.tpl
│ │ ├── number.tpl
│ │ ├── onoff.tpl
│ │ ├── password.tpl
│ │ ├── radio.tpl
│ │ ├── select.tpl
│ │ ├── select2.tpl
│ │ ├── submit.tpl
│ │ ├── text.tpl
│ │ └── textarea.tpl
│ │ ├── main.tpl
│ │ └── pages
│ │ ├── categories
│ │ ├── categories.tpl
│ │ └── rowAction.tpl
│ │ ├── home
│ │ ├── home.tpl
│ │ ├── rowAction.tpl
│ │ └── rowPassword.tpl
│ │ ├── product
│ │ ├── product.tpl
│ │ └── rowPassword.tpl
│ │ └── shared
│ │ ├── rowAction.tpl
│ │ ├── rowPassword.tpl
│ │ └── shared.tpl
│ └── vultr.php
├── docs
└── index.md
└── servers
└── vultr
├── assets
├── css
│ ├── morris.css
│ └── vultr.css
├── images
│ ├── ajax-loader.gif
│ ├── console.png
│ ├── graphs.png
│ ├── loader.gif
│ ├── package.png
│ ├── reboot.png
│ ├── rebuild.png
│ ├── refresh.gif
│ ├── refresh.png
│ ├── repeat.png
│ ├── reset.png
│ ├── shutdown.png
│ └── stop.png
└── js
│ ├── configproducts.js
│ ├── morris.min.js
│ └── raphael-min.js
├── class
├── vultr.class.php
└── vultrender.class.php
├── controller
├── backups.controller.php
├── console.controller.php
├── dns.controller.php
├── graphs.controller.php
├── isochange.controller.php
├── main.controller.php
├── oschange.controller.php
├── scripts.controller.php
├── snapshots.controller.php
├── sshkeys.controller.php
└── vultr.controller.php
├── helper
├── lang.helper.php
├── session.helper.php
└── vultr.helper.php
├── hooks.php
├── lang
└── english.php
├── loader.php
├── template
├── controller
│ ├── backups
│ │ └── index.tpl
│ ├── console
│ │ └── index.tpl
│ ├── dns
│ │ ├── create.tpl
│ │ ├── index.tpl
│ │ └── manage.tpl
│ ├── graphs
│ │ └── index.tpl
│ ├── isochange
│ │ └── index.tpl
│ ├── main
│ │ ├── create.tpl
│ │ └── index.tpl
│ ├── oschange
│ │ └── index.tpl
│ ├── scripts
│ │ ├── add.tpl
│ │ └── index.tpl
│ ├── snapshots
│ │ ├── add.tpl
│ │ └── index.tpl
│ └── sshkeys
│ │ ├── add.tpl
│ │ └── index.tpl
└── element
│ ├── flashMessages.tpl
│ ├── mainButtons.tpl
│ └── moduleError.tpl
├── vendor
├── PDOWrapper.php
└── VultrAPI.php
└── vultr.php
/.github/ISSUE_TEMPLATE/bug-report.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Bug Report
3 | about: Create a bug report to help us improve
4 | title: "[BUG] - Enter a descriptive title"
5 | labels: bug
6 | assignees: ddymko
7 |
8 | ---
9 | **IMPORTANT: WHMCS errors are difficult to reproduce and troubleshoot unless we have a very detailed problem report. Please note that incomplete reports may be REJECTED as incomplete**
10 |
11 | In order to help community members to reproduce your error, your bug must occur on a newly installed instance as described in our public documentation - https://www.vultr.com/docs/vultr-whmcs-module#Installation - no other plugins or configurations should be present.
12 |
13 |
14 | **Describe the bug**
15 | A clear and concise summary of what the bug is, and the fixes you’ve attempted.
16 |
17 | **Your Environment:**
18 | - Server PHP Version [e.g. PHP7, Go 1.12]
19 | - Server Operating System and Version
20 | - WHMCS Version [e.g. 22]
21 | - Your desktop OS: [e.g. iOS] + Browser version [e.g. stock browser, safari]
22 |
23 | **Detailed steps to reproduce error on fresh install**
24 | For example:
25 | 1. Login to '...'
26 | 2. Configure ‘...’
27 | 3. Click on menu option '....'
28 | 3. Scroll down to '....'
29 | 4. See error (Add screenshots and logs that may help explain your problem)
30 |
31 | **Logs**
32 | Provide error logs from WHMCS - go to Utilities>Logs>Module Log
33 |
34 | **Additional Logs and Extra Information**
35 |
36 | Add any other context about the problem here.
37 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/feature_request.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Feature request
3 | about: Suggest an idea for this project
4 | title: "[Feature] - Enter a descriptive title"
5 | labels: enhancement
6 | assignees: ddymko
7 |
8 | ---
9 |
10 | **Is your feature request related to a problem? Please describe.**
11 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12 |
13 | **Describe the solution you'd like**
14 | A clear and concise description of what you want to happen.
15 |
16 | **Describe alternatives you've considered**
17 | A clear and concise description of any alternative solutions or features you've considered.
18 |
19 | **Additional context**
20 | Add any other context or screenshots about the feature request here.
21 |
--------------------------------------------------------------------------------
/.github/stale.yml:
--------------------------------------------------------------------------------
1 | daysUntilStale: 5
2 | daysUntilClose: 1
3 |
4 | staleLabel: wontfix
5 | markComment: >
6 | This issue has been automatically marked as stale because it has not had
7 | recent activity. It will be closed if no further activity occurs. Thank you
8 | for your contributions.
9 | # Comment to post when closing a stale issue. Set to `false` to disable
10 | closeComment: true
11 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # General
2 | .DS_Store
3 | .AppleDouble
4 | .LSOverride
5 |
6 | # PHPSTORM
7 | .idea
8 |
9 |
10 | ### VisualStudioCode ###
11 | .vscode/*
12 | !.vscode/settings.json
13 | !.vscode/tasks.json
14 | !.vscode/launch.json
15 | !.vscode/extensions.json
16 | .history
17 |
18 |
--------------------------------------------------------------------------------
/CHANGELOG.md:
--------------------------------------------------------------------------------
1 | # Change Log
2 |
3 | ## v2.0.4 (2019-09-19)
4 | ### Bug
5 | * Fixes UI Issue where OS would reset upon save [#36](https://github.com/vultr/whmcs-vultr/pull/36)
6 |
7 | ## v2.0.3 (2019-09-10)
8 | ### Enhancement
9 | * Add lang support for update & change buttons [#33](https://github.com/vultr/whmcs-vultr/pull/33)
10 |
11 | ## v2.0.2 (2019-08-09)
12 | ### Fixes
13 | * Fixes broken server icon in addon toolbar [#27](https://github.com/vultr/whmcs-vultr/issues/27)
14 | * Fixes duplicate icons in addon toolbar
15 |
16 | ## v2.0.1 (2019-07-23)
17 | ### Fixes
18 | * Version Mismatch issue
19 |
20 |
21 | ## v2.0.0 (2019-06-25)
22 | ### Features
23 | * Various bug fixes
24 | * Quality of life improvements
25 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # WHMCS Module
2 |
3 | **Note:** This module is archived for historical purposes. It no longer maintained and should not be used. Please use the [Vultr VPS for WHMCS module at modulesgarden.com](https://www.modulesgarden.com/products/whmcs/vultr-vps).
4 |
--------------------------------------------------------------------------------
/addons/vultr/controllers/addon/admin/Dns.php:
--------------------------------------------------------------------------------
1 | saveChanges($input, $vars);
16 | $vars['success'] = main\mgLibs\Lang::T('messages', 'NameServersChange');
17 | }
18 | $vars['nameServer'] = $this->getNameServers();
19 | return array(
20 | 'tpl' => 'dns',
21 | 'vars' => $vars,
22 | 'input' => $input
23 | );
24 | }
25 |
26 | public function saveChanges($input = [], $vars = [])
27 | {
28 | $arrayToSave = [
29 | 'ns1' => $input['ns1'],
30 | 'ns2' => $input['ns2'],
31 | ];
32 | $nameServerModel = new \MGModule\vultr\models\dns\Repository();
33 | $nsChange = $nameServerModel->updateNameServers($arrayToSave);
34 |
35 | if ($nsChange)
36 | {
37 | return [
38 | 'success' => main\mgLibs\Lang::T('messages', '')
39 | ];
40 | }
41 | return [
42 | 'error' => main\mgLibs\Lang::T('messages', '')
43 | ];
44 | }
45 |
46 | public function getNameServers()
47 | {
48 | $nameServerModel = new \MGModule\vultr\models\dns\Repository();
49 |
50 | return $nameServerModel->getNameServers();
51 | }
52 |
53 | }
54 |
--------------------------------------------------------------------------------
/addons/vultr/controllers/addon/admin/Home.php:
--------------------------------------------------------------------------------
1 |
17 | */
18 | function indexHTML($input = array(), $vars = array())
19 | {
20 | return array(
21 | 'tpl' => 'home',
22 | 'vars' => $vars,
23 | 'input' => $input
24 | );
25 | }
26 |
27 | }
28 |
--------------------------------------------------------------------------------
/addons/vultr/controllers/addon/admin/ISO.php:
--------------------------------------------------------------------------------
1 | getISOList();
21 |
22 |
23 | $vars['isoSettings'] = $this->getIsoSettings();
24 | return array(
25 | 'tpl' => 'iso',
26 | 'vars' => $vars,
27 | );
28 | }
29 |
30 | public function getISOList()
31 | {
32 | $isoModel = new \MGModule\vultr\models\iso\Repository();
33 | return $isoModel->getIsoList();
34 | }
35 |
36 | public function getIsoSettings()
37 | {
38 | $isoModel = new \MGModule\vultr\models\iso\Repository();
39 | return $isoModel->getISOSettings();
40 | }
41 |
42 | public function changeIsoSettingsJSON($input)
43 | {
44 | $isoModel = new \MGModule\vultr\models\iso\Repository();
45 | $isoModel->changeISOSettings($input['isoId']);
46 | }
47 |
48 | }
49 |
--------------------------------------------------------------------------------
/addons/vultr/controllers/addon/admin/Location.php:
--------------------------------------------------------------------------------
1 | getLocationList();
13 | $vars['locationSettings'] = $this->getLocationSetings();
14 |
15 | return array(
16 | 'tpl' => 'location',
17 | 'vars' => $vars,
18 | 'input' => $input
19 | );
20 | }
21 |
22 | public function getLocationList()
23 | {
24 | $locationModel = new \MGModule\vultr\models\location\Repository();
25 | return $locationModel->getLocationList();
26 | }
27 |
28 | public function getLocationSetings()
29 | {
30 | $locationModel = new \MGModule\vultr\models\location\Repository();
31 | return $locationModel->getLocationSettings();
32 | }
33 |
34 | public function changeLocationSettingsJSON($input, $vars = [])
35 | {
36 | $locationModel = new \MGModule\vultr\models\location\Repository();
37 | $locationModel->changeLocationSettings($input['locationId']);
38 | return array
39 | (
40 | 'success' => 'Location settings has been changed'
41 | );
42 | }
43 |
44 | }
45 |
--------------------------------------------------------------------------------
/addons/vultr/controllers/addon/admin/Products.php:
--------------------------------------------------------------------------------
1 | 'products',
19 | 'vars' => $vars
20 | );
21 | }
22 |
23 | public function getProductListJSON($input = [], $vars = [])
24 | {
25 |
26 | $products = new \MGModule\vultr\models\products\Repository();
27 | $vars['recordsFiltered'] = $vars['recordsTotal'] = $products->countProducts();
28 | $columnOrder = array(
29 | 'name',
30 | 'groupName',
31 | 'configoption2',
32 | 'paytype'
33 | );
34 | $products->orderByProducts($columnOrder[$input['order']['column']], $input['order']['dir']);
35 | $products->limitProducts($input['limit']);
36 | $products->offset($input['offset']);
37 | $vars['data'] = [];
38 | foreach ($products->getProducts() as $item)
39 | {
40 |
41 | $vars['data'][] = $this->formatProductsRow($item);
42 | }
43 | return $vars;
44 | }
45 |
46 | private function formatProductsRow($item)
47 | {
48 |
49 | $data = get_object_vars($item); //Convert to Array
50 | $rows = $this->dataTablesParseRow('row', $data);
51 |
52 | return $rows;
53 | }
54 |
55 | public function removeProductJSON($input = [], $vars = [])
56 | {
57 | $products = new \MGModule\vultr\models\products\Repository();
58 | $removeInfo = $products->removeProduct($input['productId']);
59 | if ($removeInfo == 'success')
60 | {
61 | return array
62 | (
63 | 'success' => 'Product has been removed.'
64 | );
65 | }
66 | else
67 | {
68 | return array
69 | (
70 | 'error' => 'Action Failed.'
71 | );
72 | }
73 | }
74 |
75 | }
76 |
--------------------------------------------------------------------------------
/addons/vultr/controllers/addon/admin/Snapshots.php:
--------------------------------------------------------------------------------
1 | getSnapshotsList();
13 | $vars['allowSnapshots'] = $this->getAllowSnapshots();
14 |
15 | return array(
16 | 'tpl' => 'snapshots',
17 | 'vars' => $vars,
18 | 'input' => $input
19 | );
20 | }
21 |
22 | private function getSnapshotsList()
23 | {
24 | $snapModel = new \MGModule\vultr\models\snapshots\Repository();
25 | return $snapModel->getSnapshotsList();
26 | }
27 |
28 | private function getAllowSnapshots()
29 | {
30 | $snapModel = new \MGModule\vultr\models\snapshots\Repository();
31 | return $snapModel->getAllowSnapshots();
32 | }
33 |
34 | public function changeSnapshotsSettingsJSON($input = [], $vars = [])
35 | {
36 | $snapModel = new \MGModule\vultr\models\snapshots\Repository();
37 | $snapModel->changeSnapshotsSettings($input['snapId']);
38 | return array
39 | (
40 | 'success' => 'Snapshot ' . $input['snapId'] . ' settings has been changed'
41 | );
42 | }
43 |
44 | }
45 |
--------------------------------------------------------------------------------
/addons/vultr/cron/cron.php:
--------------------------------------------------------------------------------
1 | select('value')->where([
34 | ['module', '=', 'vultr'],
35 | ['setting', '=', 'apiToken'],
36 | ])->first();
37 |
38 | return $token->value;
39 | }
40 |
41 | }
42 |
--------------------------------------------------------------------------------
/addons/vultr/helpers/PathHelper.php:
--------------------------------------------------------------------------------
1 | _query = $query;
17 | $code = (int)$code;
18 | parent::__construct($message, $code, $previous);
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/addons/vultr/mgLibs/MySQL/Result.php:
--------------------------------------------------------------------------------
1 | result = $result;
25 | $this->id = $id;
26 | }
27 |
28 | /**
29 | * Fetch All Records
30 | *
31 | * @return array
32 | */
33 | function fetchAll()
34 | {
35 | return $this->result->fetchAll(\PDO::FETCH_ASSOC);
36 | }
37 |
38 | /**
39 | * Fetch one record
40 | *
41 | * @return array
42 | */
43 | function fetch()
44 | {
45 | return $this->result->fetch(\PDO::FETCH_ASSOC);
46 | }
47 |
48 | /**
49 | * Fetch One Column From First Record
50 | *
51 | * @param string $name
52 | * @return array
53 | */
54 | function fetchColumn($name = null)
55 | {
56 | $data = $this->result->fetch(\PDO::FETCH_BOTH);
57 |
58 | if ($name)
59 | {
60 | return $data[$name];
61 | }
62 | else
63 | {
64 | return $data[0];
65 | }
66 | }
67 |
68 | /**
69 | * Get ID Last Inserted Record
70 | *
71 | * @return int
72 | */
73 | function getID()
74 | {
75 | return $this->id;
76 | }
77 | }
--------------------------------------------------------------------------------
/addons/vultr/mgLibs/error/Register.php:
--------------------------------------------------------------------------------
1 | getMainNamespace() . '\models\whmcs\errors\Register'))
28 | {
29 | call_user_func(array(main\mgLibs\process\MainInstance::I()->getMainNamespace() . '\models\whmcs\errors\Register', 'register'), $ex);
30 | }
31 | else
32 | {
33 | $token = 'Unknown Token';
34 |
35 | if (method_exists($ex, 'getToken'))
36 | {
37 | $token = $ex->getToken();
38 | }
39 |
40 | $debug = print_r($ex, true);
41 |
42 | \logModuleCall("MGError", __NAMESPACE__, array(
43 | 'message' => $ex->getMessage()
44 | , 'code' => $ex->getCode()
45 | , 'token' => $token
46 | ), $debug, 0, 0);
47 | }
48 | }
49 | }
--------------------------------------------------------------------------------
/addons/vultr/mgLibs/exceptions/Base.php:
--------------------------------------------------------------------------------
1 | _token = md5(microtime());
18 | }
19 |
20 | public function getToken()
21 | {
22 | return $this->_token;
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/addons/vultr/mgLibs/exceptions/Codes.php:
--------------------------------------------------------------------------------
1 | fields = $fields;
15 | parent::__construct($message);
16 | }
17 |
18 | function getFields()
19 | {
20 | return $this->fields;
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/addons/vultr/mgLibs/exceptions/WhmcsAPI.php:
--------------------------------------------------------------------------------
1 | $value)
41 | {
42 | if (property_exists($this, $name))
43 | {
44 | $this->{$name} = $value;
45 | }
46 | }
47 | }
48 |
49 | function generate()
50 | {
51 | $this->prepare();
52 |
53 | if ($this->addFormNameToFields && empty($this->nameAttr))
54 | {
55 | $this->nameAttr = $this->formName . '_' . $this->name;
56 | }
57 |
58 | if (empty($this->nameAttr))
59 | {
60 | $this->nameAttr = $this->name;
61 | }
62 |
63 | if (empty($this->value) && !empty($this->default))
64 | {
65 | $this->value = $this->default;
66 | }
67 |
68 | if ($this->opentag == false)
69 | {
70 | $this->enableLabel = false;
71 | }
72 |
73 | main\mgLibs\Lang::stagCurrentContext('generateField');
74 |
75 | if ($this->type == 'submit')
76 | {
77 | main\mgLibs\Lang::addToContext($this->value);
78 | }
79 | else
80 | {
81 | main\mgLibs\Lang::addToContext($this->name);
82 | }
83 |
84 | $this->html = main\mgLibs\Smarty::I()->view($this->type, (array)$this, main\mgLibs\process\MainInstance::getModuleTemplatesDir() . DS . 'formFields');
85 |
86 | main\mgLibs\Lang::unstagContext('generateField');
87 | }
88 |
89 | function prepare()
90 | {
91 | ;
92 | }
93 | }
--------------------------------------------------------------------------------
/addons/vultr/mgLibs/forms/ButtonField.php:
--------------------------------------------------------------------------------
1 | prepared)
24 | {
25 | return;
26 | }
27 |
28 | $this->prepared = true;
29 | if (array_keys($this->options) == range(0, count($this->options) - 1))
30 | {
31 | $options = array();
32 | foreach ($this->options as $value)
33 | {
34 | $options[$value] = $value;
35 | }
36 | $this->options = $options;
37 | }
38 | else
39 | {
40 | $this->translateOptions = false;
41 | }
42 |
43 | if ($this->translateOptions)
44 | {
45 | $options = array();
46 | foreach ($this->options as $key => $value)
47 | {
48 | $options[$value] = main\mgLibs\Lang::T($this->name, 'options', $value);
49 | }
50 | $this->options = $options;
51 | }
52 | }
53 | }
--------------------------------------------------------------------------------
/addons/vultr/mgLibs/forms/DateField.php:
--------------------------------------------------------------------------------
1 | showPassword)
16 | {
17 | self::asteriskVar($this->value);
18 | }
19 | }
20 |
21 | static function asteriskVar($input)
22 | {
23 | $num = strlen($input);
24 | $input = '';
25 |
26 | for ($i = 0; $i < $num; $i++)
27 | {
28 | $input .= '*';
29 | }
30 |
31 | return $input;
32 | }
33 | }
--------------------------------------------------------------------------------
/addons/vultr/mgLibs/forms/RadioField.php:
--------------------------------------------------------------------------------
1 | options) == range(0, count($this->options) - 1))
23 | {
24 | $options = array();
25 | foreach ($this->options as $value)
26 | {
27 | $options[$value] = $value;
28 | }
29 | $this->options = $options;
30 | }
31 | else
32 | {
33 | $this->translateOptions = false;
34 | }
35 |
36 | if ($this->addValueIfNotExits)
37 | {
38 | if ($this->value && !isset($this->options[$this->value]))
39 | {
40 | $this->options[$this->value] = $this->value;
41 | }
42 | }
43 |
44 | if ($this->translateOptions)
45 | {
46 | $options = array();
47 | foreach ($this->options as $value)
48 | {
49 | $options[$value] = main\mgLibs\Lang::T($this->formName, $this->name, 'options', $value);
50 | }
51 | $this->options = $options;
52 | }
53 |
54 | if (empty($this->value))
55 | {
56 | foreach ($this->options as $value => $lbl)
57 | {
58 | break;
59 | }
60 | $this->value = $value;
61 | }
62 | }
63 | }
--------------------------------------------------------------------------------
/addons/vultr/mgLibs/forms/SelectField.php:
--------------------------------------------------------------------------------
1 | select2)
23 | {
24 | $this->type = 'select2';
25 | if (empty($this->addIDs))
26 | {
27 | $this->addIDs = 'RandID' . rand(0, 100);
28 | }
29 | }
30 | else
31 | {
32 | $this->type = 'select';
33 | }
34 |
35 | if ($this->translateOptions && array_keys($this->options) == range(0, count($this->options) - 1))
36 | {
37 | $options = array();
38 | foreach ($this->options as $value)
39 | {
40 | $options[$value] = $value;
41 | }
42 | $this->options = $options;
43 | }
44 | else
45 | {
46 | $this->translateOptions = false;
47 | }
48 |
49 | if ($this->addValueIfNotExits)
50 | {
51 | if ($this->value && !isset($this->options[$this->value]))
52 | {
53 | $this->options[$this->value] = $this->value;
54 | }
55 | }
56 |
57 | if ($this->translateOptions)
58 | {
59 | if (!is_array($this->options))
60 | {
61 | throw new main\mgLibs\exceptions\System('Invalid Fields Options');
62 | }
63 | $options = array();
64 | foreach ($this->options as $value)
65 | {
66 | $options[$value] = main\mgLibs\Lang::T($this->formName, $this->name, 'options', $value);
67 | }
68 | $this->options = $options;
69 | }
70 | }
71 | }
--------------------------------------------------------------------------------
/addons/vultr/mgLibs/forms/SubmitField.php:
--------------------------------------------------------------------------------
1 | Vultr';
22 |
23 | public $tablePrefix = false;
24 |
25 | public $modelRegister = array();
26 |
27 | private $_customConfigs = array();
28 |
29 | public function __isset($name)
30 | {
31 | return isset($this->_customConfigs[$name]);
32 | }
33 |
34 | public function __get($name)
35 | {
36 | if (isset($this->_customConfigs[$name]))
37 | {
38 | return $this->_customConfigs[$name];
39 | }
40 | }
41 |
42 | public function __set($name, $value)
43 | {
44 | $this->_customConfigs[$name] = $value;
45 | }
46 |
47 | public function getAddonMenu()
48 | {
49 | return array();
50 | }
51 |
52 | public function getAddonWHMCSConfig()
53 | {
54 | return array();
55 | }
56 |
57 | public function getServerConfigController()
58 | {
59 | return 'configuration';
60 | }
61 |
62 | public function getServerActionsController()
63 | {
64 | return 'actions';
65 | }
66 |
67 | public function getServerCAController()
68 | {
69 | return 'home';
70 | }
71 |
72 | public function getAddonAdminController()
73 | {
74 | return 'actions';
75 | }
76 |
77 | public function getAddonCAController()
78 | {
79 | return 'home';
80 | }
81 | }
--------------------------------------------------------------------------------
/addons/vultr/mgLibs/process/AbstractController.php:
--------------------------------------------------------------------------------
1 | mgToken = $input['mg-token'];
22 | }
23 | }
24 |
25 | /**
26 | * Generate Token For Form
27 | *
28 | * @return string
29 | */
30 | function genToken()
31 | {
32 | return md5(time());
33 | }
34 |
35 | /**
36 | * Validate Token With previous checked
37 | *
38 | * @param string $token
39 | * @return boolean
40 | */
41 | function checkToken($token = null)
42 | {
43 | if ($token === null)
44 | {
45 | $token = $this->mgToken;
46 | }
47 |
48 | if ($_SESSION['mg-token'] === $token)
49 | {
50 | return false;
51 | }
52 |
53 | $_SESSION['mg-token'] = $token;
54 |
55 | return true;
56 | }
57 |
58 | function dataTablesParseRow($template, $data)
59 | {
60 | $row = main\mgLibs\Smarty::I()->view($template, $data);
61 |
62 | $output = array();
63 |
64 | if (preg_match_all('/\
(?P.*?)\<\/td\>/s', $row, $result))
65 | {
66 | foreach ($result['col'] as $col)
67 | {
68 | $output[] = $col;
69 | }
70 | }
71 |
72 | return $output;
73 | }
74 |
75 | function registerErrors($errors)
76 | {
77 | $this->registredValidationErros = $errors;
78 | }
79 |
80 | function getFieldError($field, $langspace = 'validationErrors')
81 | {
82 | if (!isset($this->registredValidationErros[$field]))
83 | {
84 | return false;
85 | }
86 |
87 | $message = array();
88 | foreach ($this->registredValidationErros[$field] as $type)
89 | {
90 | $message[] = main\mgLibs\Lang::absoluteT($langspace, $type);
91 | }
92 |
93 | return implode(',', $message);
94 | }
95 |
96 | public function isActive()
97 | {
98 | return true;
99 | }
100 | }
--------------------------------------------------------------------------------
/addons/vultr/mgLibs/process/MainInstance.php:
--------------------------------------------------------------------------------
1 | fetch();
29 | $username = $data['username'];
30 | }
31 |
32 | return $username;
33 | }
34 |
35 | static function getAdminDetails($adminId)
36 | {
37 |
38 | $data = main\mgLibs\MySQL\Query::select(array('username'), 'tbladmins', array("id" => $adminId), array(), 1)->fetch();
39 | $username = $data['username'];
40 |
41 | $result = localAPI("getadmindetails", array(), $username);
42 | if ($result['result'] == 'error')
43 | {
44 | throw new main\mgLibs\exceptions\WhmcsAPI($result['message']);
45 | }
46 |
47 | $result['allowedpermissions'] = explode(",", $result['allowedpermissions']);
48 | return $result;
49 | }
50 | }
--------------------------------------------------------------------------------
/addons/vultr/models/customWHMCS/product/Configuration.php:
--------------------------------------------------------------------------------
1 | id);
15 | }
16 |
17 | }
--------------------------------------------------------------------------------
/addons/vultr/models/customWHMCS/product/Repository.php:
--------------------------------------------------------------------------------
1 | insertGetId($data);
21 | }
22 |
23 | public function insertPricing($data)
24 | {
25 | return DB::table('tblpricing')->insertGetId($data);
26 | }
27 |
28 | public function createProductConfigurableOptions($productId)
29 | {
30 | return ProductsHelper::configurableOptions($productId);
31 | }
32 |
33 |
34 | }
35 |
--------------------------------------------------------------------------------
/addons/vultr/models/dns/Repository.php:
--------------------------------------------------------------------------------
1 | select('value')->where([
18 | ['module', '=', 'vultr'],
19 | ['setting', '=', 'nameServers'],
20 | ])->first();
21 |
22 | if (!empty($nameServers))
23 | {
24 | return unserialize($nameServers->value);
25 | }
26 | return;
27 | }
28 |
29 | public function updateNameServers($params = [])
30 | {
31 | return DB::table('tbladdonmodules')->where([
32 | ['module', '=', 'vultr'],
33 | ['setting', '=', 'nameServers'],
34 | ])->update([
35 | 'value' => serialize($params),
36 | ]);
37 | }
38 |
39 | }
40 |
--------------------------------------------------------------------------------
/addons/vultr/models/iso/Repository.php:
--------------------------------------------------------------------------------
1 | iso_list();
21 | }
22 |
23 | public function changeISOSettings($input)
24 | {
25 | $settingArray = $this->getISOSettings();
26 |
27 | if (array_key_exists((int)$input, $settingArray))
28 | {
29 | unset($settingArray[$input]);
30 | }
31 | else
32 | {
33 | $settingArray[$input] = "disable";
34 | }
35 | $this->saveIsoSettings($settingArray);
36 | }
37 |
38 | public function getISOSettings()
39 | {
40 | $isoSettings = \WHMCS\Database\Capsule::table("tbladdonmodules")
41 | ->select("tbladdonmodules.value")
42 | ->where("tbladdonmodules.module", "=", "vultr")
43 | ->where("tbladdonmodules.setting", "=", "isoSettings")
44 | ->first();
45 |
46 | return unserialize($isoSettings->value);
47 | }
48 |
49 | public function saveIsoSettings($isoSettings)
50 | {
51 | \WHMCS\Database\Capsule::table("tbladdonmodules")
52 | ->where("tbladdonmodules.module", "=", "vultr")
53 | ->where("tbladdonmodules.setting", "=", "isoSettings")
54 | ->update(["tbladdonmodules.value" => serialize($isoSettings)]);
55 | }
56 | }
57 |
58 |
--------------------------------------------------------------------------------
/addons/vultr/models/location/Repository.php:
--------------------------------------------------------------------------------
1 | regions_list();
19 | }
20 |
21 | public function changeLocationSettings($input)
22 | {
23 | $settingArray = $this->getLocationSettings();
24 |
25 | if (array_key_exists((int)$input, $settingArray))
26 | {
27 | unset($settingArray[$input]);
28 | }
29 | else
30 | {
31 | $settingArray[$input] = "disable";
32 | }
33 |
34 | $this->saveLocationSettings($settingArray);
35 | }
36 |
37 | public function getLocationSettings()
38 | {
39 | $locationSettings = DB::table('tbladdonmodules')->select('value')->where([
40 | ['module', '=', 'vultr'],
41 | ['setting', '=', 'locationSettings'],
42 | ])->first();
43 | return unserialize($locationSettings->value);
44 | }
45 |
46 | private function saveLocationSettings($lcoationArray = [])
47 | {
48 | DB::table('tbladdonmodules')->where([
49 | ['module', '=', 'vultr'],
50 | ['setting', '=', 'locationSettings'],
51 | ])->update([
52 | 'value' => serialize($lcoationArray),
53 | ]);
54 | }
55 |
56 | }
57 |
--------------------------------------------------------------------------------
/addons/vultr/models/products/Repository.php:
--------------------------------------------------------------------------------
1 | getProductsArray();
16 | }
17 |
18 | private function getProductsArray()
19 | {
20 | $this->productsObject = DB::table("tblproducts")
21 | ->join("tblproductgroups", "tblproducts.gid", "=", "tblproductgroups.id")
22 | ->leftJoin("tblproductconfiglinks", "tblproducts.id", "=", "tblproductconfiglinks.pid")
23 | ->select("tblproducts.id as id", "tblproductgroups.id as groupId", "tblproductgroups.name as groupName", "tblproducts.name as name", "tblproducts.paytype as paytype", "tblproducts.configoption2 as configoption2", "tblproductconfiglinks.gid as configurableID")
24 | ->where("tblproducts.servertype", "=", "vultr");
25 | }
26 |
27 | public function getModelClass()
28 | {
29 | return __NAMESPACE__ . '\products';
30 | }
31 |
32 | public function getProducts()
33 | {
34 | return $this->productsObject->get();
35 | }
36 |
37 | public function countProducts()
38 | {
39 | return $this->productsObject->count();
40 | }
41 |
42 | public function orderByProducts($column, $dir)
43 | {
44 | $this->productsObject->orderBy($column, $dir);
45 | }
46 |
47 | public function limitProducts($limit)
48 | {
49 | $this->productsObject->limit($limit);
50 | }
51 |
52 | public function offset($limit)
53 | {
54 | $this->productsObject->offset($limit);
55 | }
56 |
57 | public function removeProduct($productId)
58 | {
59 | $this->deletePrice($productId);
60 | $deleteInfo = $this->deleteProduct($productId);
61 | if ($deleteInfo == 1)
62 | {
63 | return 'success';
64 | }
65 | else
66 | {
67 | return $deleteInfo;
68 | }
69 | }
70 |
71 | private function deletePrice($productId)
72 | {
73 | return DB::table("tblpricing")->where([
74 | ['type', '=', 'product'],
75 | ['relid', '=', $productId],
76 | ])->delete();
77 | }
78 |
79 | private function deleteProduct($productId)
80 | {
81 | return DB::table("tblproducts")->where('id', '=', $productId)->delete();
82 | }
83 | }
84 |
--------------------------------------------------------------------------------
/addons/vultr/models/snapshots/Repository.php:
--------------------------------------------------------------------------------
1 | snapshot_list();
17 | foreach ($this->getUsersSnapshots() as $value)
18 | {
19 | if (array_key_exists($value->snapshotid, $snapshotList))
20 | {
21 | $snapshotList[$value->snapshotid]['client'] = array(
22 | 'clientid' => $value->clientid,
23 | 'clientname' => $value->firstname . " " . $value->lastname,
24 | );
25 | }
26 | }
27 | return $snapshotList;
28 | }
29 |
30 | public function getUsersSnapshots()
31 | {
32 | return DB::table('vultr_snapshots as snapshots')
33 | ->select('client.id as clientid', 'client.firstname as firstname', 'client.lastname as lastname', 'snapshots.SNAPSHOTID as snapshotid', 'snapshots.SUBID as subid')
34 | ->join('tblclients as client', 'snapshots.client_id', '=', 'client.id')
35 | ->get();
36 | }
37 |
38 | public function changeSnapshotsSettings($id)
39 | {
40 | $settingArray = $this->getAllowSnapshots();
41 | if (array_key_exists($id, $settingArray))
42 | {
43 | unset($settingArray[$id]);
44 | }
45 | else
46 | {
47 | $settingArray[$id] = "enable";
48 | }
49 |
50 | $this->saveSnapshotsSettings($settingArray);
51 | }
52 |
53 | public function getAllowSnapshots()
54 | {
55 | $snapshotsSettings = DB::table('tbladdonmodules')
56 | ->select('value')
57 | ->where([
58 | ['module', '=', 'vultr'],
59 | ['setting', '=', 'snapshotsSettings'],
60 | ])->first();
61 | return unserialize($snapshotsSettings->value);
62 | }
63 |
64 | private function saveSnapshotsSettings($settingArray = [])
65 | {
66 | DB::table('tbladdonmodules')->where([
67 | ['module', '=', 'vultr'],
68 | ['setting', '=', 'snapshotsSettings'],
69 | ])->update([
70 | 'value' => serialize($settingArray),
71 | ]);
72 | }
73 |
74 | }
75 |
--------------------------------------------------------------------------------
/addons/vultr/models/whmcs/addons/Repository.php:
--------------------------------------------------------------------------------
1 | id;
56 | }
57 |
58 | function getRoleId()
59 | {
60 | return $this->roleId;
61 | }
62 |
63 | function getUsername()
64 | {
65 | return $this->username;
66 | }
67 |
68 | function getFirstName()
69 | {
70 | return $this->firstName;
71 | }
72 |
73 | function getLastName()
74 | {
75 | return $this->lastName;
76 | }
77 |
78 | function getEmail()
79 | {
80 | return $this->email;
81 | }
82 | }
83 |
--------------------------------------------------------------------------------
/addons/vultr/models/whmcs/admins/Admins.php:
--------------------------------------------------------------------------------
1 | id;
27 | }
28 |
29 | function getName()
30 | {
31 | return $this->name;
32 | }
33 |
34 | }
35 |
--------------------------------------------------------------------------------
/addons/vultr/models/whmcs/admins/Roles.php:
--------------------------------------------------------------------------------
1 | id;
52 | }
53 |
54 | public function getName()
55 | {
56 | return $this->name;
57 | }
58 |
59 | public function getColour()
60 | {
61 | return $this->colour;
62 | }
63 |
64 | public function getDiscountPercent()
65 | {
66 | return $this->discountPercent;
67 | }
68 |
69 | public function getExemptFromSuspendTerminate()
70 | {
71 | return $this->exemptFromSuspendTerminate;
72 | }
73 |
74 | public function getSeparateInvoices()
75 | {
76 | return $this->separateInvoices;
77 | }
78 | }
79 |
--------------------------------------------------------------------------------
/addons/vultr/models/whmcs/clients/Groups.php:
--------------------------------------------------------------------------------
1 | serviceID = $serviceID;
21 |
22 | if ($data)
23 | {
24 | foreach ($data as $name => $value)
25 | {
26 | $field = new customField();
27 | $field->name = $name;
28 | $field->value = $value;
29 | $this->_customFields[$field->name] = $field;
30 | }
31 | }
32 | else
33 | {
34 | $this->load();
35 | }
36 | }
37 |
38 | function load()
39 | {
40 | $query = '
41 | SELECT C.fieldname as name, V.fieldid as fieldid, V.value as value
42 | FROM tblcustomfieldsvalues V
43 | JOIN tblcustomfields C
44 | ON V.fieldid = C.id
45 | AND C.type = \'client\'
46 | WHERE V.relid = :account_id:';
47 |
48 | $result = \MGModule\vultr\mgLibs\MySQL\Query::query($query, array('account_id' => $this->serviceID));
49 | while ($row = $result->fetch())
50 | {
51 | $name = explode('|', $row['name']);
52 | if (isset($this->_customFields[$name[0]]))
53 | {
54 | $this->_customFields[$name[0]]->id = $row['fieldid'];
55 | }
56 | else
57 | {
58 | $field = new customField();
59 | $field->id = $row['fieldid'];
60 | $field->name = $name[0];
61 | $field->value = $row['value'];
62 |
63 | $this->_customFields[$field->name] = $field;
64 | }
65 | }
66 | }
67 |
68 | function __isset($name)
69 | {
70 | return $this->_customFields[$name];
71 | }
72 |
73 | function __get($name)
74 | {
75 | if (isset($this->_customFields[$name]))
76 | {
77 | return $this->_customFields[$name]->value;
78 | }
79 | }
80 |
81 | function __set($name, $value)
82 | {
83 | if (isset($this->_customFields[$name]))
84 | {
85 | $this->_customFields[$name]->value = $value;
86 | }
87 | }
88 |
89 | /**
90 | * Update Custom Fields
91 | */
92 | function update()
93 | {
94 | $this->load();
95 |
96 | foreach ($this->_customFields as $field)
97 | {
98 | main\mgLibs\MySQL\Query::update('tblcustomfieldsvalues', array('value' => $field->value), array('fieldid' => $field->id, 'relid' => $this->serviceID));
99 | }
100 | }
101 | }
102 |
--------------------------------------------------------------------------------
/addons/vultr/models/whmcs/currencies/Currency.php:
--------------------------------------------------------------------------------
1 | "1"))->fetch();
60 | $id = $row['id'];
61 | }
62 |
63 | parent::__construct($id, $data);
64 | }
65 |
66 | public function getId()
67 | {
68 | return $this->id;
69 | }
70 |
71 | public function getCode()
72 | {
73 | return $this->code;
74 | }
75 |
76 | public function getPrefix()
77 | {
78 | return $this->prefix;
79 | }
80 |
81 | public function getSuffix()
82 | {
83 | return $this->suffix;
84 | }
85 |
86 | public function getFormat()
87 | {
88 | return $this->format;
89 | }
90 |
91 | public function getRate()
92 | {
93 | return $this->rate;
94 | }
95 |
96 | public function getDefault()
97 | {
98 | return $this->default;
99 | }
100 | }
101 |
--------------------------------------------------------------------------------
/addons/vultr/models/whmcs/currencies/Repository.php:
--------------------------------------------------------------------------------
1 | _filters['type'] = "general";
37 |
38 | return $this;
39 | }
40 |
41 | /**
42 | * @return \MGModule\vultr\models\whmcs\emails\Templates
43 | */
44 | public function onlyAdmin()
45 | {
46 | $this->_filters['type'] = "admin";
47 |
48 | return $this;
49 | }
50 |
51 | /**
52 | * @param string $name
53 | * @return \MGModule\vultr\models\whmcs\emails\Templates
54 | */
55 | public function onlyName($name)
56 | {
57 | $this->_filters['name'] = mysql_real_escape_string($name);
58 |
59 | return $this;
60 | }
61 | }
62 |
--------------------------------------------------------------------------------
/addons/vultr/models/whmcs/errors/Register.php:
--------------------------------------------------------------------------------
1 | getToken();
24 | }
25 |
26 | $debug = print_r($ex, true);
27 |
28 | \logModuleCall("MGError", __NAMESPACE__, array('message' => $ex->getMessage(), 'code' => $ex->getCode(), 'token' => $token), $debug, 0, 0);
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/addons/vultr/models/whmcs/invoices/RepositoryItem.php:
--------------------------------------------------------------------------------
1 | _filters['invoiceid'] = (int)$id;
29 |
30 | return $this;
31 | }
32 |
33 | /**
34 | * @return \MGModule\vultr\models\whmcs\pricing\RepositoryItem
35 | */
36 | public function onlyAddon()
37 | {
38 | $this->_filters['type'] = 'Addon';
39 |
40 | return $this;
41 | }
42 |
43 | /**
44 | * @return \MGModule\vultr\models\whmcs\pricing\RepositoryItem
45 | */
46 | public function onlyHosting()
47 | {
48 | $this->_filters['type'] = 'Hosting';
49 |
50 | return $this;
51 | }
52 |
53 | /**
54 | * @return \MGModule\vultr\models\whmcs\pricing\RepositoryItem
55 | */
56 | public function onlyDomainRegister()
57 | {
58 | $this->_filters['type'] = 'DomainRegister';
59 |
60 | return $this;
61 | }
62 |
63 | /**
64 | * @return \MGModule\vultr\models\whmcs\invoices\RepositoryItem
65 | */
66 | public function onlyHostingAndAddonAndDomainRegister()
67 | {
68 | $this->_filters['type'] = array('DomainRegister', 'Addon', 'DomainRegister');
69 |
70 | return $this;
71 | }
72 | }
73 |
--------------------------------------------------------------------------------
/addons/vultr/models/whmcs/orders/Order.php:
--------------------------------------------------------------------------------
1 | _client))
65 | {
66 | $this->_client = new main\models\whmcs\clients\client($this->userid);
67 | }
68 |
69 | return $this->_client;
70 | }
71 |
72 | function getOrderUrl()
73 | {
74 | return 'orders.php?action=view&id=' . $this->id;
75 | }
76 | }
77 |
--------------------------------------------------------------------------------
/addons/vultr/models/whmcs/pricing/BillingCycle.php:
--------------------------------------------------------------------------------
1 | 1 && $period <= 10)
39 | {
40 | return 'YEARS_' . $period;
41 | }
42 |
43 | throw new \MGModule\vultr\mgLibs\exceptions\System('Inalid period: ' . $period);
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/addons/vultr/models/whmcs/pricing/Repository.php:
--------------------------------------------------------------------------------
1 | _filters['type'] = 'product';
27 | }
28 |
29 | public function onlyAddon()
30 | {
31 | $this->_filters['type'] = 'addon';
32 | }
33 |
34 | public function onlyDomainRegister()
35 | {
36 | $this->_filters['type'] = 'domainregister';
37 | }
38 |
39 | public function withRelation($relationId)
40 | {
41 | $this->_filters['relid'] = (int)$relationId;
42 | }
43 |
44 | public function onlyCurrency($currencyId)
45 | {
46 | $this->_filters['currency'] = (int)$currencyId;
47 | }
48 |
49 | public function withBillingCycle()
50 | {
51 | $filters = ' ( monthly > 0.00 OR quarterly > 0.00 OR semiannually > 0.00 OR annually > 0.00 OR biennially > 0.00 OR triennially > 0.00 )';
52 |
53 | $this->_filters[] = $filters;
54 | }
55 |
56 | public function withDomainCycle()
57 | {
58 | $filters = ' ( msetupfee > 0.00 OR qsetupfee > 0.00 OR ssetupfee > 0.00 OR asetupfee > 0.00 OR bsetupfee > 0.00 OR tsetupfee > 0.00 ';
59 | $filters .= ' OR monthly > 0.00 OR quarterly > 0.00 OR semiannually > 0.00 OR annually > 0.00 OR biennially > 0.00 OR triennially > 0.00 )';
60 |
61 | $this->_filters[] = $filters;
62 | }
63 | }
64 |
--------------------------------------------------------------------------------
/addons/vultr/models/whmcs/product/ProductGroup.php:
--------------------------------------------------------------------------------
1 | id;
76 | }
77 |
78 | public function getName()
79 | {
80 | return $this->name;
81 | }
82 |
83 | public function getHeadLine()
84 | {
85 | return $this->headLine;
86 | }
87 |
88 | public function getTagLine()
89 | {
90 | return $this->tagLine;
91 | }
92 |
93 | public function getOrderForm()
94 | {
95 | return $this->orderForm;
96 | }
97 |
98 | public function getDisabledGateways()
99 | {
100 | return $this->disabledGateways;
101 | }
102 |
103 | public function getHidden()
104 | {
105 | return $this->hidden;
106 | }
107 |
108 | public function getOrder()
109 | {
110 | return $this->order;
111 | }
112 |
113 | public function getCreatedAt()
114 | {
115 | return $this->createdAt;
116 | }
117 |
118 | public function getUpdatedAt()
119 | {
120 | return $this->updatedAt;
121 | }
122 |
123 | }
124 |
125 |
126 |
127 |
--------------------------------------------------------------------------------
/addons/vultr/models/whmcs/product/ProductGroups.php:
--------------------------------------------------------------------------------
1 | _relatedPID[] = $pid;
36 | }
37 |
38 | function getRelatedPIDs()
39 | {
40 | if (empty($this->_relatedPID))
41 | {
42 | $result = main\mgLibs\MySQL\Query::select(array('pid'), 'tblproductconfiglinks', array('gid' => $this->id));
43 | while ($row = $result->fetch())
44 | {
45 | $this->_relatedPID[] = $row['pid'];
46 | }
47 | }
48 |
49 | return $this->_relatedPID;
50 | }
51 |
52 | function save()
53 | {
54 | parent::save();
55 | if ($this->_relatedPID)
56 | {
57 | $result = main\mgLibs\MySQL\Query::select(array('pid'), 'tblproductconfiglinks', array('gid' => $this->id));
58 | $exists = array();
59 | while ($row = $result->fetch())
60 | {
61 | $exists[$row['pid']] = $row['pid'];
62 | }
63 |
64 | foreach ($this->_relatedPID as $pid)
65 | {
66 | if (!isset($exists[$pid]))
67 | {
68 | main\mgLibs\MySQL\Query::insert('tblproductconfiglinks', array('pid' => $pid, 'gid' => $this->id));
69 | }
70 | }
71 | }
72 | }
73 |
74 | function getConfigOptions()
75 | {
76 | if (empty($this->_configOptions))
77 | {
78 | $this->_configOptions = array();
79 | $result = main\mgLibs\MySQL\Query::select(configOption::fieldDeclaration(), configOption::tableName(), array('gid' => $this->id));
80 | while ($row = $result->fetch())
81 | {
82 | $this->_configOptions[] = new configOption($row['id'], $row);
83 | }
84 | }
85 |
86 | return $this->_configOptions;
87 | }
88 | }
89 |
--------------------------------------------------------------------------------
/addons/vultr/models/whmcs/servers/Server.php:
--------------------------------------------------------------------------------
1 | $id))->fetch();
73 | if (empty($data))
74 | {
75 | throw new main\mgLibs\exceptions\System('Unable to find Item with ID:' . $id);
76 | }
77 | }
78 |
79 | if (isset($data['passwordEncrypted']))
80 | {
81 | $data['password'] = decrypt($data['passwordEncrypted']);
82 | }
83 |
84 | if (!empty($data))
85 | {
86 | $this->fillProperties($data);
87 | }
88 | }
89 |
90 | function save()
91 | {
92 | parent::save(array(
93 | 'password' => encrypt($this->password)
94 | ));
95 | }
96 | }
97 |
--------------------------------------------------------------------------------
/addons/vultr/models/whmcs/service/Repository.php:
--------------------------------------------------------------------------------
1 | _filters['userid'] = (int)$clientId;
30 |
31 | return $this;
32 | }
33 |
34 | /**
35 | * @param array $status
36 | * @return \MGModule\vultr\models\whmcs\service\Repository
37 | */
38 | public function onlyStatus(array $status)
39 | {
40 | $this->_filters['domainstatus'] = $status;
41 |
42 | return $this;
43 | }
44 |
45 | public function usernameNotNull()
46 | {
47 | $this->_filters[] = ' username != "" ';
48 |
49 | return $this;
50 | }
51 | }
52 |
--------------------------------------------------------------------------------
/addons/vultr/models/whmcs/service/configOptions/ConfigOption.php:
--------------------------------------------------------------------------------
1 | logo__on-dark
--------------------------------------------------------------------------------
/addons/vultr/templates/admin/assets/img/mg-loader.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vultr/whmcs-vultr/974fe431c9a5f004f6bd03d22791ce8b9c8b4e0f/addons/vultr/templates/admin/assets/img/mg-loader.gif
--------------------------------------------------------------------------------
/addons/vultr/templates/admin/assets/img/mg-logo-cog.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vultr/whmcs-vultr/974fe431c9a5f004f6bd03d22791ce8b9c8b4e0f/addons/vultr/templates/admin/assets/img/mg-logo-cog.png
--------------------------------------------------------------------------------
/addons/vultr/templates/admin/assets/img/mg-logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vultr/whmcs-vultr/974fe431c9a5f004f6bd03d22791ce8b9c8b4e0f/addons/vultr/templates/admin/assets/img/mg-logo.png
--------------------------------------------------------------------------------
/addons/vultr/templates/admin/assets/img/select2-spinner.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vultr/whmcs-vultr/974fe431c9a5f004f6bd03d22791ce8b9c8b4e0f/addons/vultr/templates/admin/assets/img/select2-spinner.gif
--------------------------------------------------------------------------------
/addons/vultr/templates/admin/assets/img/sort_asc.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vultr/whmcs-vultr/974fe431c9a5f004f6bd03d22791ce8b9c8b4e0f/addons/vultr/templates/admin/assets/img/sort_asc.png
--------------------------------------------------------------------------------
/addons/vultr/templates/admin/assets/img/sort_asc_disabled.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vultr/whmcs-vultr/974fe431c9a5f004f6bd03d22791ce8b9c8b4e0f/addons/vultr/templates/admin/assets/img/sort_asc_disabled.png
--------------------------------------------------------------------------------
/addons/vultr/templates/admin/assets/img/sort_both.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vultr/whmcs-vultr/974fe431c9a5f004f6bd03d22791ce8b9c8b4e0f/addons/vultr/templates/admin/assets/img/sort_both.png
--------------------------------------------------------------------------------
/addons/vultr/templates/admin/assets/img/sort_desc.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vultr/whmcs-vultr/974fe431c9a5f004f6bd03d22791ce8b9c8b4e0f/addons/vultr/templates/admin/assets/img/sort_desc.png
--------------------------------------------------------------------------------
/addons/vultr/templates/admin/assets/img/sort_desc_disabled.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vultr/whmcs-vultr/974fe431c9a5f004f6bd03d22791ce8b9c8b4e0f/addons/vultr/templates/admin/assets/img/sort_desc_disabled.png
--------------------------------------------------------------------------------
/addons/vultr/templates/admin/assets/js/bootstrap-hover-dropdown.min.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Project: Bootstrap Hover Dropdown
3 | * Author: Cameron Spear
4 | * Contributors: Mattia Larentis
5 | *
6 | * Dependencies: Bootstrap's Dropdown plugin, jQuery
7 | *
8 | * A simple plugin to enable Bootstrap dropdowns to active on hover and provide a nice user experience.
9 | *
10 | * License: MIT
11 | *
12 | * http://cameronspear.com/blog/bootstrap-dropdown-on-hover-plugin/
13 | */(function(b,a,c){var d=b();b.fn.dropdownHover=function(e){if("ontouchstart" in document){return this}d=d.add(this.parent());return this.each(function(){var m=b(this),l=m.parent(),k={delay:500,instantlyCloseOthers:true},i={delay:b(this).data("delay"),instantlyCloseOthers:b(this).data("close-others")},f="show.bs.dropdown",j="hide.bs.dropdown",g=b.extend(true,{},k,e,i),h;l.hover(function(n){if(!l.hasClass("open")&&!m.is(n.target)){return true}d.find(":focus").blur();if(g.instantlyCloseOthers===true){d.removeClass("open")}a.clearTimeout(h);l.addClass("open");m.trigger(f)},function(){h=a.setTimeout(function(){l.removeClass("open");m.trigger(j)},g.delay)});m.hover(function(){d.find(":focus").blur();if(g.instantlyCloseOthers===true){d.removeClass("open")}a.clearTimeout(h);l.addClass("open");m.trigger(f)});l.find(".dropdown-submenu").each(function(){var o=b(this);var n;o.hover(function(){a.clearTimeout(n);o.children(".dropdown-menu").show();o.siblings().children(".dropdown-menu").hide()},function(){var p=o.children(".dropdown-menu");n=a.setTimeout(function(){p.hide()},g.delay)})})})};b(document).ready(function(){b('[data-hover="dropdown"]').dropdownHover()})})(jQuery,this);
--------------------------------------------------------------------------------
/addons/vultr/templates/admin/assets/js/locationController.js:
--------------------------------------------------------------------------------
1 | /*
2 | * Scripts for Location Controller
3 | * @author Mateusz Pawłowski
4 | */
5 |
6 | jQuery(function ()
7 | {
8 | jQuery(".onoffswitch").on('change', function ()
9 | {
10 | var id = jQuery(this).find('input').attr('id');
11 | JSONParser.request('changeLocationSettings', {locationId: id});
12 | });
13 |
14 | });
15 |
16 |
--------------------------------------------------------------------------------
/addons/vultr/templates/admin/assets/js/tableIso.js:
--------------------------------------------------------------------------------
1 | /*
2 | * DataTable MGFramework
3 | * @author Mateusz Pawłowski
4 | */
5 | jQuery(document).ready(function ()
6 | {
7 |
8 | jQuery('#iso table').dataTable({
9 | processing: true,
10 | serverSide: false,
11 | searching: false,
12 | autoWidth: false,
13 | columns: [
14 | , null
15 | , null
16 | , null
17 | , null
18 | , {orderable: false}
19 | ],
20 | pagingType: "simple_numbers",
21 | aLengthMenu: [
22 | [10, 25, 50, 75, 100],
23 | [10, 25, 50, 75, 100]
24 | ],
25 | iDisplayLength: 10,
26 | sDom: 't<"table-bottom"<"row"<"col-sm-6"p><"col-sm-6"L>>>',
27 | "zeroRecords": "{/literal}{$MGLANG->absoluteT('addonAA','datatables','zeroRecords')}{literal}",
28 | "infoEmpty": "{/literal}{$MGLANG->absoluteT('addonAA','datatables','zeroRecords')}{literal}",
29 | "paginate": {
30 | "previous": "{/literal}{$MGLANG->absoluteT('addonAA','datatables','previous')}{literal}"
31 | , "next": "{/literal}{$MGLANG->absoluteT('addonAA','datatables','next')}{literal}"
32 | }
33 | }
34 | );
35 | jQuery('#iso table').MGModalActions();
36 |
37 | jQuery(function ()
38 | {
39 | jQuery(".onoffswitch").on('change', function ()
40 | {
41 | var id = jQuery(this).find('input').attr('id');
42 | JSONParser.request('changeIsoSettings', {isoId: id});
43 | });
44 |
45 | });
46 |
47 | });
48 |
49 |
--------------------------------------------------------------------------------
/addons/vultr/templates/admin/assets/js/tableProducts.js:
--------------------------------------------------------------------------------
1 | /*
2 | * DataTable MGFramework
3 | * @author Mateusz Pawłowski
4 | */
5 | jQuery(document).ready(function ()
6 | {
7 |
8 | jQuery('#productTable table').dataTable({
9 | processing: true,
10 | serverSide: true,
11 | searching: false,
12 | autoWidth: false,
13 | ajax: function (data, callback, settings)
14 | {
15 | var filter = {};
16 | JSONParser.request(
17 | 'getProductList'
18 | , {
19 | filter: filter
20 |
21 | , order: data.order[0]
22 | , limit: data.length
23 | , offset: data.start
24 | }
25 | , function (data)
26 | {
27 | callback(data);
28 | jQuery('[data-toggle="tooltip"]').tooltip();
29 | }
30 | );
31 | },
32 | columns: [
33 | null
34 | , null
35 | , null
36 | , null
37 | , {orderable: false, targets: 0}
38 | ],
39 | pagingType: "simple_numbers",
40 | aLengthMenu: [
41 | [10, 25, 50, 75, 100],
42 | [10, 25, 50, 75, 100]
43 | ],
44 | iDisplayLength: 10,
45 | sDom: 't<"table-bottom"<"row"<"col-sm-6"p><"col-sm-6"L>>>',
46 | "zeroRecords": "{/literal}{$MGLANG->absoluteT('addonAA','datatables','zeroRecords')}{literal}",
47 | "infoEmpty": "{/literal}{$MGLANG->absoluteT('addonAA','datatables','zeroRecords')}{literal}",
48 | "paginate": {
49 | "previous": "{/literal}{$MGLANG->absoluteT('addonAA','datatables','previous')}{literal}"
50 | , "next": "{/literal}{$MGLANG->absoluteT('addonAA','datatables','next')}{literal}"
51 | }
52 | }
53 | );
54 | jQuery('#productTable').MGModalActions();
55 |
56 |
57 | jQuery(document).on('click', '.removeProduct', function ()
58 | {
59 |
60 | var productId = jQuery(this).closest('td').find('input[name="productId"]').val();
61 | jQuery('input[name="ModalProductId"').val(productId);
62 | $("#MGRemoveItem").modal();
63 | });
64 |
65 | jQuery(document).on('click', '#removeProductButton', function ()
66 | {
67 | var productId = jQuery('input[name="ModalProductId"').val();
68 | JSONParser.request('removeProduct', {productId: productId}, function (data)
69 | {
70 | if (data.success)
71 | {
72 | jQuery('#productTable table').DataTable().ajax.reload();
73 | }
74 | }, false);
75 |
76 | });
77 |
78 |
79 | });
80 |
81 |
--------------------------------------------------------------------------------
/addons/vultr/templates/admin/assets/js/tableSnapshots.js:
--------------------------------------------------------------------------------
1 | /*
2 | * DataTable MGFramework
3 | * @author Mateusz Pawłowski
4 | */
5 | jQuery(document).ready(function ()
6 | {
7 |
8 | jQuery('#snapshots table').dataTable({
9 | processing: true,
10 | serverSide: false,
11 | searching: false,
12 | autoWidth: false,
13 | columns: [
14 | , null
15 | , null
16 | , null
17 | , null
18 | , {orderable: false}
19 | , {orderable: false}
20 | ],
21 | pagingType: "simple_numbers",
22 | aLengthMenu: [
23 | [10, 25, 50, 75, 100],
24 | [10, 25, 50, 75, 100]
25 | ],
26 | iDisplayLength: 10,
27 | sDom: 't<"table-bottom"<"row"<"col-sm-6"p><"col-sm-6"L>>>',
28 | "zeroRecords": "{/literal}{$MGLANG->absoluteT('addonAA','datatables','zeroRecords')}{literal}",
29 | "infoEmpty": "{/literal}{$MGLANG->absoluteT('addonAA','datatables','zeroRecords')}{literal}",
30 | "paginate": {
31 | "previous": "{/literal}{$MGLANG->absoluteT('addonAA','datatables','previous')}{literal}"
32 | , "next": "{/literal}{$MGLANG->absoluteT('addonAA','datatables','next')}{literal}"
33 | }
34 | }
35 | );
36 | jQuery('#snapshots table').MGModalActions();
37 |
38 | jQuery(document).on('change', '.onoffswitch', function ()
39 | {
40 | var snapId = jQuery(this).closest('div').find('input').val();
41 | JSONParser.request('changeSnapshotsSettings', {snapId: snapId});
42 | });
43 |
44 | });
45 |
46 |
--------------------------------------------------------------------------------
/addons/vultr/templates/admin/assets/js/whmcsProdConfSupp.js:
--------------------------------------------------------------------------------
1 | jQuery(document).ready(function ()
2 | {
3 | jQuery('#MGNextIsWHMCSConfig').next().hide();
4 |
5 | var relation = {};
6 |
7 | jQuery('#MGNextIsWHMCSConfig').next().find('input').each(function ()
8 | {
9 |
10 | var name = jQuery(this).parent().prev().text();
11 |
12 | relation[name] = jQuery(this).attr('name');
13 |
14 | jQuery('*[name="' + name + '"]').change(function ()
15 | {
16 | var tname = jQuery(this).attr('name');
17 | jQuery('input[name="' + relation[tname] + '"]').val(jQuery(this).val());
18 | }).change();
19 | });
20 | });
--------------------------------------------------------------------------------
/addons/vultr/templates/admin/fatal.tpl:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
25 |
--------------------------------------------------------------------------------
/addons/vultr/templates/admin/formFields/button.tpl:
--------------------------------------------------------------------------------
1 | {if $enableLabel}
2 |
5 | {/if}
6 |
7 |
10 |
--------------------------------------------------------------------------------
/addons/vultr/templates/admin/formFields/checkbox.tpl:
--------------------------------------------------------------------------------
1 | {if $enableLabel}
2 |
4 | {/if}
5 |
6 | {foreach from=$options item=option key=opValue}
7 | {if !$inline} {/if}
8 |
14 | {if !$inline} {/if}
15 | {/foreach}
16 | {if $enableDescription }
17 | {$MGLANG->T('description')}
18 | {/if}
19 | {$error}
20 |
--------------------------------------------------------------------------------
/addons/vultr/templates/admin/formFields/containers/clean.tpl:
--------------------------------------------------------------------------------
1 | {foreach from=$hidden item=field}
2 | {$field->html}
3 | {/foreach}
4 | {foreach from=$fields item=field}
5 | {$field->html}
6 | {/foreach}
--------------------------------------------------------------------------------
/addons/vultr/templates/admin/formFields/containers/default.tpl:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/addons/vultr/templates/admin/formFields/containers/modal.tpl:
--------------------------------------------------------------------------------
1 |
15 |
--------------------------------------------------------------------------------
/addons/vultr/templates/admin/formFields/date.tpl:
--------------------------------------------------------------------------------
1 | {if $enableLabel}
2 |
3 | {/if}
4 |
5 |
8 | {if $enableDescription}
9 | {$MGLANG->T('description')}
10 | {/if}
11 | {$error}
12 |
13 |
--------------------------------------------------------------------------------
/addons/vultr/templates/admin/formFields/hidden.tpl:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/addons/vultr/templates/admin/formFields/legend.tpl:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/addons/vultr/templates/admin/formFields/number.tpl:
--------------------------------------------------------------------------------
1 | {if $enableLabel}
2 |
4 | {/if}
5 |
6 |
11 | {$error}
12 | {if !$enableDescription}
13 | {$MGLANG->T('description')}
14 | {/if}
15 |
--------------------------------------------------------------------------------
/addons/vultr/templates/admin/formFields/onoff.tpl:
--------------------------------------------------------------------------------
1 | {if $enableLabel}
2 |
3 | {/if}
4 |
5 |
6 |
8 |
13 |
14 | {if $enableDescription}
15 | {$MGLANG->T('description')}
16 | {/if}
17 | {$error}
18 |
--------------------------------------------------------------------------------
/addons/vultr/templates/admin/formFields/password.tpl:
--------------------------------------------------------------------------------
1 | {if $enableLabel}
2 |
4 | {/if}
5 |
6 |
10 | {$error}
11 | {if $enableDescription }
12 | {$MGLANG->T('description')}
13 | {/if}
14 |
15 | {if $showPassword}
16 |
19 | {literal}
20 |
30 | {/literal}
31 |
32 | {/if}
--------------------------------------------------------------------------------
/addons/vultr/templates/admin/formFields/radio.tpl:
--------------------------------------------------------------------------------
1 | {if $enableLabel}
2 |
3 | {/if}
4 |
5 | {foreach from=$options item=option key=opValue}
6 |
7 |
12 |
13 | {/foreach}
14 | {$error}
15 |
--------------------------------------------------------------------------------
/addons/vultr/templates/admin/formFields/select.tpl:
--------------------------------------------------------------------------------
1 | {if $enableLabel}
2 |
3 | {/if}
4 |
5 |
15 | {if $readonly}
16 |
17 | {/if}
18 | {if $enableDescription }
19 | {$MGLANG->T('description')}
20 | {/if}
21 | {$error}
22 |
--------------------------------------------------------------------------------
/addons/vultr/templates/admin/formFields/select2.tpl:
--------------------------------------------------------------------------------
1 | {if $enableLabel}
2 |
3 | {/if}
4 |
5 |
14 | {if $readonly}
15 |
16 | {/if}
17 | {if $enableDescription }
18 | {$MGLANG->T('description')}
19 | {/if}
20 | {$error}
21 | {literal}
22 |
28 | {/literal}
29 |
--------------------------------------------------------------------------------
/addons/vultr/templates/admin/formFields/submit.tpl:
--------------------------------------------------------------------------------
1 | {if $enableLabel}
2 |
3 | {/if}
4 |
5 |
9 |
--------------------------------------------------------------------------------
/addons/vultr/templates/admin/formFields/text.tpl:
--------------------------------------------------------------------------------
1 | {if $enableLabel}
2 |
4 | {/if}
5 |
6 |
10 | {$error}
11 | {if $enableDescription}
12 | {$MGLANG->T('description')}
13 | {/if}
14 |
--------------------------------------------------------------------------------
/addons/vultr/templates/admin/formFields/textarea.tpl:
--------------------------------------------------------------------------------
1 | {if $enableLabel}
2 |
3 | {/if}
4 |
5 |
7 | {if $enableDescription}
8 | {$MGLANG->T('description')}
9 | {/if}
10 | {$error}
11 |
--------------------------------------------------------------------------------
/addons/vultr/templates/admin/pages/dns/dns.tpl:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | {$MGLANG->T('DNSInfo')}
6 |
7 | {$MGLANG->T('vanityDNS')}
8 |
27 |
28 |
29 |
30 |
--------------------------------------------------------------------------------
/addons/vultr/templates/admin/pages/home/home.tpl:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/addons/vultr/templates/admin/pages/iSO/iso.tpl:
--------------------------------------------------------------------------------
1 | {$MGLANG->T('isoInfo')}
2 |
43 |
44 |
--------------------------------------------------------------------------------
/addons/vultr/templates/admin/pages/location/location.tpl:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | {$MGLANG->T('serverLocationInfo')}
6 |
7 | {$MGLANG->T('serverLocation')}
8 |
9 | {foreach from=$locationArray item=e}
10 |
26 | {/foreach}
27 |
28 |
29 |
30 |
31 |
32 |
33 |
--------------------------------------------------------------------------------
/addons/vultr/templates/admin/pages/products/edit_product.tpl:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/addons/vultr/templates/admin/pages/products/products.tpl:
--------------------------------------------------------------------------------
1 | {$MGLANG->T('productInfo')}
2 |
3 |
4 |
5 |
6 |
7 |
8 | {$MGLANG->T('name')} |
9 | {$MGLANG->T('group')} |
10 | {$MGLANG->T('plan')} |
11 | {$MGLANG->T('paytype')} |
12 | |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
23 |
24 |
25 |
30 |
31 |
32 | {$MGLANG->T('modal','removeInfo')}
33 |
34 |
40 |
41 |
42 |
43 |
44 |
45 |
--------------------------------------------------------------------------------
/addons/vultr/templates/admin/pages/products/row.tpl:
--------------------------------------------------------------------------------
1 |
2 | {$name} |
3 | {$groupName} |
4 | {$configoption2} |
5 | {$paytype} |
6 |
7 |
8 |
10 |
13 |
15 | |
16 |
--------------------------------------------------------------------------------
/addons/vultr/templates/admin/pages/snapshots/snapshots.tpl:
--------------------------------------------------------------------------------
1 | {$MGLANG->T('snapshotsInfo')}
2 |
47 |
48 |
--------------------------------------------------------------------------------
/addons/vultr/templates/clientarea/default/assets/css/mg-style.css:
--------------------------------------------------------------------------------
1 | .mg-wrapper .navbar-nav li a {
2 | padding-top: 50px;
3 | border-right: 2px #dcdcdc solid;
4 | }
5 |
6 | .mg-wrapper .navbar-nav li:first-child {
7 | border-left: 2px #dcdcdc solid;
8 | }
9 |
10 | .mg-wrapper .nav-menu {
11 | background-color: #f5f5f5;
12 | height: 86px;
13 | }
14 |
15 | .mg-wrapper .nav-menu a:hover {
16 | background-color: #fcfcfc !important;
17 | }
18 |
19 | .mg-wrapper .nav-menu .active {
20 | background-color: #fcfcfc !important;
21 | }
22 |
23 | .mg-wrapper #MGAlerts {
24 | margin: 15px;
25 | }
26 |
27 | #MGLoader {
28 | background-color: rgba(0, 0, 0, 0.1);
29 | position: absolute;
30 | top: 0;
31 | left: -30%;
32 | top: -30%;
33 | width: 160%;
34 | height: 130%;
35 | z-index: 60000;
36 | }
37 |
38 | #MGLoader img {
39 | position: fixed;
40 | top: 50%;
41 | left: 50%;
42 | width: 300px;
43 | margin-left: -150px;
44 | }
--------------------------------------------------------------------------------
/addons/vultr/templates/clientarea/default/assets/css/onoffswitch.css:
--------------------------------------------------------------------------------
1 | .mg-wrapper .onoffswitch {
2 | position: relative;
3 | width: 120px;
4 | -webkit-user-select: none;
5 | -moz-user-select: none;
6 | -ms-user-select: none;
7 | }
8 |
9 | .mg-wrapper .onoffswitch-checkbox {
10 | display: none;
11 | }
12 |
13 | .mg-wrapper .onoffswitch-label {
14 | display: block;
15 | overflow: hidden;
16 | cursor: pointer;
17 | border: 1px solid #666666;
18 | border-radius: 5px;
19 | }
20 |
21 | .mg-wrapper .onoffswitch-inner {
22 | display: block;
23 | width: 200%;
24 | margin-left: -100%;
25 | -moz-transition: margin 0.3s ease-in 0s;
26 | -webkit-transition: margin 0.3s ease-in 0s;
27 | -o-transition: margin 0.3s ease-in 0s;
28 | transition: margin 0.3s ease-in 0s;
29 | }
30 |
31 | .mg-wrapper .onoffswitch-inner:before, .onoffswitch-inner:after {
32 | display: block;
33 | float: left;
34 | width: 50%;
35 | height: 24px;
36 | padding: 0;
37 | line-height: 24px;
38 | font-size: 12px;
39 | color: white;
40 | font-family: Trebuchet, Arial, sans-serif;
41 | font-weight: bold;
42 | -moz-box-sizing: border-box;
43 | -webkit-box-sizing: border-box;
44 | box-sizing: border-box;
45 | }
46 |
47 | .mg-wrapper .onoffswitch-inner:before {
48 | content: attr(data-before);
49 | padding-left: 10px;
50 | background-color: #5CB85C;
51 | color: #FFFFFF;
52 | }
53 |
54 | .mg-wrapper .onoffswitch-inner:after {
55 | content: attr(data-after);
56 | padding-right: 10px;
57 | background-color: #F8F8F8;
58 | color: #666666;
59 | text-align: right;
60 | }
61 |
62 | .mg-wrapper .onoffswitch-switch {
63 | display: block;
64 | width: 35px;
65 | margin: 0px;
66 | height: 26px;
67 | background: #FFFFFF;
68 | border: 1px solid #666666;
69 | border-radius: 5px;
70 | position: absolute;
71 | top: 0;
72 | bottom: 0;
73 | right: 81px;
74 | -moz-transition: all 0.3s ease-in 0s;
75 | -webkit-transition: all 0.3s ease-in 0s;
76 | -o-transition: all 0.3s ease-in 0s;
77 | transition: all 0.3s ease-in 0s;
78 | background-image: -moz-linear-gradient(center top, rgba(0, 0, 0, 0.1) 0%, rgba(0, 0, 0, 0) 100%);
79 | background-image: -webkit-linear-gradient(center top, rgba(0, 0, 0, 0.1) 0%, rgba(0, 0, 0, 0) 100%);
80 | background-image: -o-linear-gradient(center top, rgba(0, 0, 0, 0.1) 0%, rgba(0, 0, 0, 0) 100%);
81 | background-image: linear-gradient(center top, rgba(0, 0, 0, 0.1) 0%, rgba(0, 0, 0, 0) 100%);
82 | }
83 |
84 | .mg-wrapper .onoffswitch-checkbox:checked + .onoffswitch-label .onoffswitch-inner {
85 | margin-left: 0;
86 | }
87 |
88 | .mg-wrapper .onoffswitch-checkbox:checked + .onoffswitch-label .onoffswitch-switch {
89 | right: 0px;
90 | }
--------------------------------------------------------------------------------
/addons/vultr/templates/clientarea/default/assets/fonts/FontAwesome.otf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vultr/whmcs-vultr/974fe431c9a5f004f6bd03d22791ce8b9c8b4e0f/addons/vultr/templates/clientarea/default/assets/fonts/FontAwesome.otf
--------------------------------------------------------------------------------
/addons/vultr/templates/clientarea/default/assets/fonts/Simple-Line-Icons.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vultr/whmcs-vultr/974fe431c9a5f004f6bd03d22791ce8b9c8b4e0f/addons/vultr/templates/clientarea/default/assets/fonts/Simple-Line-Icons.eot
--------------------------------------------------------------------------------
/addons/vultr/templates/clientarea/default/assets/fonts/Simple-Line-Icons.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vultr/whmcs-vultr/974fe431c9a5f004f6bd03d22791ce8b9c8b4e0f/addons/vultr/templates/clientarea/default/assets/fonts/Simple-Line-Icons.ttf
--------------------------------------------------------------------------------
/addons/vultr/templates/clientarea/default/assets/fonts/Simple-Line-Icons.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vultr/whmcs-vultr/974fe431c9a5f004f6bd03d22791ce8b9c8b4e0f/addons/vultr/templates/clientarea/default/assets/fonts/Simple-Line-Icons.woff
--------------------------------------------------------------------------------
/addons/vultr/templates/clientarea/default/assets/fonts/fontawesome-webfont.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vultr/whmcs-vultr/974fe431c9a5f004f6bd03d22791ce8b9c8b4e0f/addons/vultr/templates/clientarea/default/assets/fonts/fontawesome-webfont.eot
--------------------------------------------------------------------------------
/addons/vultr/templates/clientarea/default/assets/fonts/fontawesome-webfont.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vultr/whmcs-vultr/974fe431c9a5f004f6bd03d22791ce8b9c8b4e0f/addons/vultr/templates/clientarea/default/assets/fonts/fontawesome-webfont.ttf
--------------------------------------------------------------------------------
/addons/vultr/templates/clientarea/default/assets/fonts/fontawesome-webfont.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vultr/whmcs-vultr/974fe431c9a5f004f6bd03d22791ce8b9c8b4e0f/addons/vultr/templates/clientarea/default/assets/fonts/fontawesome-webfont.woff
--------------------------------------------------------------------------------
/addons/vultr/templates/clientarea/default/assets/fonts/fontawesome-webfont.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vultr/whmcs-vultr/974fe431c9a5f004f6bd03d22791ce8b9c8b4e0f/addons/vultr/templates/clientarea/default/assets/fonts/fontawesome-webfont.woff2
--------------------------------------------------------------------------------
/addons/vultr/templates/clientarea/default/assets/fonts/glyphicons-halflings-regular.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vultr/whmcs-vultr/974fe431c9a5f004f6bd03d22791ce8b9c8b4e0f/addons/vultr/templates/clientarea/default/assets/fonts/glyphicons-halflings-regular.eot
--------------------------------------------------------------------------------
/addons/vultr/templates/clientarea/default/assets/fonts/glyphicons-halflings-regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vultr/whmcs-vultr/974fe431c9a5f004f6bd03d22791ce8b9c8b4e0f/addons/vultr/templates/clientarea/default/assets/fonts/glyphicons-halflings-regular.ttf
--------------------------------------------------------------------------------
/addons/vultr/templates/clientarea/default/assets/fonts/glyphicons-halflings-regular.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vultr/whmcs-vultr/974fe431c9a5f004f6bd03d22791ce8b9c8b4e0f/addons/vultr/templates/clientarea/default/assets/fonts/glyphicons-halflings-regular.woff
--------------------------------------------------------------------------------
/addons/vultr/templates/clientarea/default/assets/fonts/glyphicons-halflings-regular.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vultr/whmcs-vultr/974fe431c9a5f004f6bd03d22791ce8b9c8b4e0f/addons/vultr/templates/clientarea/default/assets/fonts/glyphicons-halflings-regular.woff2
--------------------------------------------------------------------------------
/addons/vultr/templates/clientarea/default/assets/img/ajax-loader.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vultr/whmcs-vultr/974fe431c9a5f004f6bd03d22791ce8b9c8b4e0f/addons/vultr/templates/clientarea/default/assets/img/ajax-loader.gif
--------------------------------------------------------------------------------
/addons/vultr/templates/clientarea/default/assets/img/favicon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vultr/whmcs-vultr/974fe431c9a5f004f6bd03d22791ce8b9c8b4e0f/addons/vultr/templates/clientarea/default/assets/img/favicon.png
--------------------------------------------------------------------------------
/addons/vultr/templates/clientarea/default/assets/img/jqueryui/ui-bg_diagonals-thick_18_b81900_40x40.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vultr/whmcs-vultr/974fe431c9a5f004f6bd03d22791ce8b9c8b4e0f/addons/vultr/templates/clientarea/default/assets/img/jqueryui/ui-bg_diagonals-thick_18_b81900_40x40.png
--------------------------------------------------------------------------------
/addons/vultr/templates/clientarea/default/assets/img/jqueryui/ui-bg_diagonals-thick_20_666666_40x40.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vultr/whmcs-vultr/974fe431c9a5f004f6bd03d22791ce8b9c8b4e0f/addons/vultr/templates/clientarea/default/assets/img/jqueryui/ui-bg_diagonals-thick_20_666666_40x40.png
--------------------------------------------------------------------------------
/addons/vultr/templates/clientarea/default/assets/img/jqueryui/ui-bg_flat_10_000000_40x100.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vultr/whmcs-vultr/974fe431c9a5f004f6bd03d22791ce8b9c8b4e0f/addons/vultr/templates/clientarea/default/assets/img/jqueryui/ui-bg_flat_10_000000_40x100.png
--------------------------------------------------------------------------------
/addons/vultr/templates/clientarea/default/assets/img/jqueryui/ui-bg_glass_100_f6f6f6_1x400.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vultr/whmcs-vultr/974fe431c9a5f004f6bd03d22791ce8b9c8b4e0f/addons/vultr/templates/clientarea/default/assets/img/jqueryui/ui-bg_glass_100_f6f6f6_1x400.png
--------------------------------------------------------------------------------
/addons/vultr/templates/clientarea/default/assets/img/jqueryui/ui-bg_glass_100_fdf5ce_1x400.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vultr/whmcs-vultr/974fe431c9a5f004f6bd03d22791ce8b9c8b4e0f/addons/vultr/templates/clientarea/default/assets/img/jqueryui/ui-bg_glass_100_fdf5ce_1x400.png
--------------------------------------------------------------------------------
/addons/vultr/templates/clientarea/default/assets/img/jqueryui/ui-bg_glass_65_ffffff_1x400.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vultr/whmcs-vultr/974fe431c9a5f004f6bd03d22791ce8b9c8b4e0f/addons/vultr/templates/clientarea/default/assets/img/jqueryui/ui-bg_glass_65_ffffff_1x400.png
--------------------------------------------------------------------------------
/addons/vultr/templates/clientarea/default/assets/img/jqueryui/ui-bg_gloss-wave_35_f6a828_500x100.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vultr/whmcs-vultr/974fe431c9a5f004f6bd03d22791ce8b9c8b4e0f/addons/vultr/templates/clientarea/default/assets/img/jqueryui/ui-bg_gloss-wave_35_f6a828_500x100.png
--------------------------------------------------------------------------------
/addons/vultr/templates/clientarea/default/assets/img/jqueryui/ui-bg_highlight-soft_100_eeeeee_1x100.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vultr/whmcs-vultr/974fe431c9a5f004f6bd03d22791ce8b9c8b4e0f/addons/vultr/templates/clientarea/default/assets/img/jqueryui/ui-bg_highlight-soft_100_eeeeee_1x100.png
--------------------------------------------------------------------------------
/addons/vultr/templates/clientarea/default/assets/img/jqueryui/ui-bg_highlight-soft_75_ffe45c_1x100.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vultr/whmcs-vultr/974fe431c9a5f004f6bd03d22791ce8b9c8b4e0f/addons/vultr/templates/clientarea/default/assets/img/jqueryui/ui-bg_highlight-soft_75_ffe45c_1x100.png
--------------------------------------------------------------------------------
/addons/vultr/templates/clientarea/default/assets/img/jqueryui/ui-icons_222222_256x240.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vultr/whmcs-vultr/974fe431c9a5f004f6bd03d22791ce8b9c8b4e0f/addons/vultr/templates/clientarea/default/assets/img/jqueryui/ui-icons_222222_256x240.png
--------------------------------------------------------------------------------
/addons/vultr/templates/clientarea/default/assets/img/jqueryui/ui-icons_228ef1_256x240.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vultr/whmcs-vultr/974fe431c9a5f004f6bd03d22791ce8b9c8b4e0f/addons/vultr/templates/clientarea/default/assets/img/jqueryui/ui-icons_228ef1_256x240.png
--------------------------------------------------------------------------------
/addons/vultr/templates/clientarea/default/assets/img/jqueryui/ui-icons_ef8c08_256x240.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vultr/whmcs-vultr/974fe431c9a5f004f6bd03d22791ce8b9c8b4e0f/addons/vultr/templates/clientarea/default/assets/img/jqueryui/ui-icons_ef8c08_256x240.png
--------------------------------------------------------------------------------
/addons/vultr/templates/clientarea/default/assets/img/jqueryui/ui-icons_ffd27a_256x240.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vultr/whmcs-vultr/974fe431c9a5f004f6bd03d22791ce8b9c8b4e0f/addons/vultr/templates/clientarea/default/assets/img/jqueryui/ui-icons_ffd27a_256x240.png
--------------------------------------------------------------------------------
/addons/vultr/templates/clientarea/default/assets/img/jqueryui/ui-icons_ffffff_256x240.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vultr/whmcs-vultr/974fe431c9a5f004f6bd03d22791ce8b9c8b4e0f/addons/vultr/templates/clientarea/default/assets/img/jqueryui/ui-icons_ffffff_256x240.png
--------------------------------------------------------------------------------
/addons/vultr/templates/clientarea/default/assets/img/mg-loader.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vultr/whmcs-vultr/974fe431c9a5f004f6bd03d22791ce8b9c8b4e0f/addons/vultr/templates/clientarea/default/assets/img/mg-loader.gif
--------------------------------------------------------------------------------
/addons/vultr/templates/clientarea/default/assets/img/mg-logo-cog.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vultr/whmcs-vultr/974fe431c9a5f004f6bd03d22791ce8b9c8b4e0f/addons/vultr/templates/clientarea/default/assets/img/mg-logo-cog.png
--------------------------------------------------------------------------------
/addons/vultr/templates/clientarea/default/assets/img/mg-logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vultr/whmcs-vultr/974fe431c9a5f004f6bd03d22791ce8b9c8b4e0f/addons/vultr/templates/clientarea/default/assets/img/mg-logo.png
--------------------------------------------------------------------------------
/addons/vultr/templates/clientarea/default/assets/img/select2-spinner.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vultr/whmcs-vultr/974fe431c9a5f004f6bd03d22791ce8b9c8b4e0f/addons/vultr/templates/clientarea/default/assets/img/select2-spinner.gif
--------------------------------------------------------------------------------
/addons/vultr/templates/clientarea/default/assets/img/sort_asc.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vultr/whmcs-vultr/974fe431c9a5f004f6bd03d22791ce8b9c8b4e0f/addons/vultr/templates/clientarea/default/assets/img/sort_asc.png
--------------------------------------------------------------------------------
/addons/vultr/templates/clientarea/default/assets/img/sort_asc_disabled.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vultr/whmcs-vultr/974fe431c9a5f004f6bd03d22791ce8b9c8b4e0f/addons/vultr/templates/clientarea/default/assets/img/sort_asc_disabled.png
--------------------------------------------------------------------------------
/addons/vultr/templates/clientarea/default/assets/img/sort_both.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vultr/whmcs-vultr/974fe431c9a5f004f6bd03d22791ce8b9c8b4e0f/addons/vultr/templates/clientarea/default/assets/img/sort_both.png
--------------------------------------------------------------------------------
/addons/vultr/templates/clientarea/default/assets/img/sort_desc.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vultr/whmcs-vultr/974fe431c9a5f004f6bd03d22791ce8b9c8b4e0f/addons/vultr/templates/clientarea/default/assets/img/sort_desc.png
--------------------------------------------------------------------------------
/addons/vultr/templates/clientarea/default/assets/img/sort_desc_disabled.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vultr/whmcs-vultr/974fe431c9a5f004f6bd03d22791ce8b9c8b4e0f/addons/vultr/templates/clientarea/default/assets/img/sort_desc_disabled.png
--------------------------------------------------------------------------------
/addons/vultr/templates/clientarea/default/assets/js/bootstrap-hover-dropdown.min.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Project: Bootstrap Hover Dropdown
3 | * Author: Cameron Spear
4 | * Contributors: Mattia Larentis
5 | *
6 | * Dependencies: Bootstrap's Dropdown plugin, jQuery
7 | *
8 | * A simple plugin to enable Bootstrap dropdowns to active on hover and provide a nice user experience.
9 | *
10 | * License: MIT
11 | *
12 | * http://cameronspear.com/blog/bootstrap-dropdown-on-hover-plugin/
13 | */(function(b,a,c){var d=b();b.fn.dropdownHover=function(e){if("ontouchstart" in document){return this}d=d.add(this.parent());return this.each(function(){var m=b(this),l=m.parent(),k={delay:500,instantlyCloseOthers:true},i={delay:b(this).data("delay"),instantlyCloseOthers:b(this).data("close-others")},f="show.bs.dropdown",j="hide.bs.dropdown",g=b.extend(true,{},k,e,i),h;l.hover(function(n){if(!l.hasClass("open")&&!m.is(n.target)){return true}d.find(":focus").blur();if(g.instantlyCloseOthers===true){d.removeClass("open")}a.clearTimeout(h);l.addClass("open");m.trigger(f)},function(){h=a.setTimeout(function(){l.removeClass("open");m.trigger(j)},g.delay)});m.hover(function(){d.find(":focus").blur();if(g.instantlyCloseOthers===true){d.removeClass("open")}a.clearTimeout(h);l.addClass("open");m.trigger(f)});l.find(".dropdown-submenu").each(function(){var o=b(this);var n;o.hover(function(){a.clearTimeout(n);o.children(".dropdown-menu").show();o.siblings().children(".dropdown-menu").hide()},function(){var p=o.children(".dropdown-menu");n=a.setTimeout(function(){p.hide()},g.delay)})})})};b(document).ready(function(){b('[data-hover="dropdown"]').dropdownHover()})})(jQuery,this);
--------------------------------------------------------------------------------
/addons/vultr/templates/clientarea/default/formFields/button.tpl:
--------------------------------------------------------------------------------
1 | {if $enableLabel}
2 |
5 | {/if}
6 |
7 |
10 |
--------------------------------------------------------------------------------
/addons/vultr/templates/clientarea/default/formFields/checkbox.tpl:
--------------------------------------------------------------------------------
1 | {if $enableLabel}
2 |
4 | {/if}
5 |
6 | {foreach from=$options item=option key=opValue}
7 | {if !$inline} {/if}
8 |
14 | {if !$inline} {/if}
15 | {/foreach}
16 | {if $enableDescription }
17 | {$MGLANG->T('description')}
18 | {/if}
19 | {$error}
20 |
--------------------------------------------------------------------------------
/addons/vultr/templates/clientarea/default/formFields/containers/clean.tpl:
--------------------------------------------------------------------------------
1 | {foreach from=$hidden item=field}
2 | {$field->html}
3 | {/foreach}
4 | {foreach from=$fields item=field}
5 | {$field->html}
6 | {/foreach}
--------------------------------------------------------------------------------
/addons/vultr/templates/clientarea/default/formFields/containers/default.tpl:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/addons/vultr/templates/clientarea/default/formFields/containers/modal.tpl:
--------------------------------------------------------------------------------
1 |
15 |
--------------------------------------------------------------------------------
/addons/vultr/templates/clientarea/default/formFields/date.tpl:
--------------------------------------------------------------------------------
1 | {if $enableLabel}
2 |
3 | {/if}
4 |
5 |
8 | {if $enableDescription}
9 | {$MGLANG->T('description')}
10 | {/if}
11 | {$error}
12 |
13 |
--------------------------------------------------------------------------------
/addons/vultr/templates/clientarea/default/formFields/hidden.tpl:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/addons/vultr/templates/clientarea/default/formFields/number.tpl:
--------------------------------------------------------------------------------
1 | {if $enableLabel}
2 |
4 | {/if}
5 |
6 |
11 | {$error}
12 | {if !$enableDescription}
13 | {$MGLANG->T('description')}
14 | {/if}
15 |
--------------------------------------------------------------------------------
/addons/vultr/templates/clientarea/default/formFields/onoff.tpl:
--------------------------------------------------------------------------------
1 | {if $enableLabel}
2 |
3 | {/if}
4 |
5 |
6 |
8 |
13 |
14 | {if $enableDescription}
15 | {$MGLANG->T('description')}
16 | {/if}
17 | {$error}
18 |
--------------------------------------------------------------------------------
/addons/vultr/templates/clientarea/default/formFields/password.tpl:
--------------------------------------------------------------------------------
1 | {if $enableLabel}
2 |
4 | {/if}
5 |
6 |
10 | {$error}
11 | {if $enableDescription }
12 | {$MGLANG->T('description')}
13 | {/if}
14 |
15 | {if $showPassword}
16 |
19 | {literal}
20 |
30 | {/literal}
31 |
32 | {/if}
--------------------------------------------------------------------------------
/addons/vultr/templates/clientarea/default/formFields/radio.tpl:
--------------------------------------------------------------------------------
1 | {if $enableLabel}
2 |
3 | {/if}
4 |
5 | {foreach from=$options item=option key=opValue}
6 |
7 |
12 |
13 | {/foreach}
14 | {$error}
15 |
--------------------------------------------------------------------------------
/addons/vultr/templates/clientarea/default/formFields/select.tpl:
--------------------------------------------------------------------------------
1 | {if $enableLabel}
2 |
3 | {/if}
4 |
5 |
13 | {if $readonly}
14 |
15 | {/if}
16 | {if $enableDescription }
17 | {$MGLANG->T('description')}
18 | {/if}
19 | {$error}
20 |
--------------------------------------------------------------------------------
/addons/vultr/templates/clientarea/default/formFields/select2.tpl:
--------------------------------------------------------------------------------
1 | {if $enableLabel}
2 |
3 | {/if}
4 |
5 |
14 | {if $readonly}
15 |
16 | {/if}
17 | {if $enableDescription }
18 | {$MGLANG->T('description')}
19 | {/if}
20 | {$error}
21 | {literal}
22 |
31 | {/literal}
32 |
--------------------------------------------------------------------------------
/addons/vultr/templates/clientarea/default/formFields/submit.tpl:
--------------------------------------------------------------------------------
1 | {if $enableLabel}
2 |
3 | {/if}
4 |
5 |
9 |
--------------------------------------------------------------------------------
/addons/vultr/templates/clientarea/default/formFields/text.tpl:
--------------------------------------------------------------------------------
1 | {if $enableLabel}
2 |
4 | {/if}
5 |
6 |
10 | {$error}
11 | {if $enableDescription}
12 | {$MGLANG->T('description')}
13 | {/if}
14 |
--------------------------------------------------------------------------------
/addons/vultr/templates/clientarea/default/formFields/textarea.tpl:
--------------------------------------------------------------------------------
1 | {if $enableLabel}
2 |
3 | {/if}
4 |
5 |
7 | {if $enableDescription}
8 | {$MGLANG->T('description')}
9 | {/if}
10 | {$error}
11 |
--------------------------------------------------------------------------------
/addons/vultr/templates/clientarea/default/pages/categories/rowAction.tpl:
--------------------------------------------------------------------------------
1 |
5 |
--------------------------------------------------------------------------------
/addons/vultr/templates/clientarea/default/pages/home/rowAction.tpl:
--------------------------------------------------------------------------------
1 | {if $category.loginUrl}
2 |
5 |
6 | {/if}
7 |
11 |
15 |
--------------------------------------------------------------------------------
/addons/vultr/templates/clientarea/default/pages/home/rowPassword.tpl:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/addons/vultr/templates/clientarea/default/pages/product/product.tpl:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | {$MGLANG->T('Product/Service')} |
8 | {$MGLANG->T('Username')} |
9 | {$MGLANG->T('Password')} |
10 | {$MGLANG->T('Billing Cycle')} |
11 | {$MGLANG->T('Next Due Date')} |
12 | {$MGLANG->T('IP Address')} |
13 | {$MGLANG->T('Status')} |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 | {literal}
23 |
94 | {/literal}
--------------------------------------------------------------------------------
/addons/vultr/templates/clientarea/default/pages/product/rowPassword.tpl:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/addons/vultr/templates/clientarea/default/pages/shared/rowAction.tpl:
--------------------------------------------------------------------------------
1 | {if $category.loginUrl}
2 |
5 |
6 | {/if}
7 |
11 | {if $isAdminPermission}
12 |
16 |
21 | {/if}
--------------------------------------------------------------------------------
/addons/vultr/templates/clientarea/default/pages/shared/rowPassword.tpl:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/addons/vultr/vultr.php:
--------------------------------------------------------------------------------
1 | div.row:not(.module-client-area) {
40 | display: none;
41 | }
42 |
43 | #vultr_power_status,
44 | #vultr_server_state,
45 | #vultr_vm_status {
46 | text-transform: capitalize;
47 | }
48 |
49 | .btn-group-justified {
50 | padding: 0px !important;
51 | }
52 |
53 | div#vultrSCRIPTContainer table {
54 | table-layout: fixed;
55 | word-wrap: break-word;
56 | }
57 |
58 | .refresh-loader {
59 | width: 16px;
60 | height: 16px;
61 | -webkit-animation: spin 2s linear infinite;
62 | -moz-animation: spin 2s linear infinite;
63 | animation: spin 2s linear infinite;
64 | }
65 |
66 | @-moz-keyframes spin {
67 | 100% {
68 | -moz-transform: rotate(360deg);
69 | }
70 | }
71 |
72 | @-webkit-keyframes spin {
73 | 100% {
74 | -webkit-transform: rotate(360deg);
75 | }
76 | }
77 |
78 | @keyframes spin {
79 | 100% {
80 | -webkit-transform: rotate(360deg);
81 | transform: rotate(360deg);
82 | }
83 | }
84 |
85 | #vultr_label_form input {
86 | margin-bottom: 5px;
87 | }
88 |
--------------------------------------------------------------------------------
/servers/vultr/assets/images/ajax-loader.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vultr/whmcs-vultr/974fe431c9a5f004f6bd03d22791ce8b9c8b4e0f/servers/vultr/assets/images/ajax-loader.gif
--------------------------------------------------------------------------------
/servers/vultr/assets/images/console.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vultr/whmcs-vultr/974fe431c9a5f004f6bd03d22791ce8b9c8b4e0f/servers/vultr/assets/images/console.png
--------------------------------------------------------------------------------
/servers/vultr/assets/images/graphs.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vultr/whmcs-vultr/974fe431c9a5f004f6bd03d22791ce8b9c8b4e0f/servers/vultr/assets/images/graphs.png
--------------------------------------------------------------------------------
/servers/vultr/assets/images/loader.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vultr/whmcs-vultr/974fe431c9a5f004f6bd03d22791ce8b9c8b4e0f/servers/vultr/assets/images/loader.gif
--------------------------------------------------------------------------------
/servers/vultr/assets/images/package.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vultr/whmcs-vultr/974fe431c9a5f004f6bd03d22791ce8b9c8b4e0f/servers/vultr/assets/images/package.png
--------------------------------------------------------------------------------
/servers/vultr/assets/images/reboot.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vultr/whmcs-vultr/974fe431c9a5f004f6bd03d22791ce8b9c8b4e0f/servers/vultr/assets/images/reboot.png
--------------------------------------------------------------------------------
/servers/vultr/assets/images/rebuild.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vultr/whmcs-vultr/974fe431c9a5f004f6bd03d22791ce8b9c8b4e0f/servers/vultr/assets/images/rebuild.png
--------------------------------------------------------------------------------
/servers/vultr/assets/images/refresh.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vultr/whmcs-vultr/974fe431c9a5f004f6bd03d22791ce8b9c8b4e0f/servers/vultr/assets/images/refresh.gif
--------------------------------------------------------------------------------
/servers/vultr/assets/images/refresh.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vultr/whmcs-vultr/974fe431c9a5f004f6bd03d22791ce8b9c8b4e0f/servers/vultr/assets/images/refresh.png
--------------------------------------------------------------------------------
/servers/vultr/assets/images/repeat.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vultr/whmcs-vultr/974fe431c9a5f004f6bd03d22791ce8b9c8b4e0f/servers/vultr/assets/images/repeat.png
--------------------------------------------------------------------------------
/servers/vultr/assets/images/reset.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vultr/whmcs-vultr/974fe431c9a5f004f6bd03d22791ce8b9c8b4e0f/servers/vultr/assets/images/reset.png
--------------------------------------------------------------------------------
/servers/vultr/assets/images/shutdown.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vultr/whmcs-vultr/974fe431c9a5f004f6bd03d22791ce8b9c8b4e0f/servers/vultr/assets/images/shutdown.png
--------------------------------------------------------------------------------
/servers/vultr/assets/images/stop.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vultr/whmcs-vultr/974fe431c9a5f004f6bd03d22791ce8b9c8b4e0f/servers/vultr/assets/images/stop.png
--------------------------------------------------------------------------------
/servers/vultr/assets/js/configproducts.js:
--------------------------------------------------------------------------------
1 | $(document).ready(function ()
2 | {
3 | $('form[name="packagefrm"] div.tab-content div#tab3 table:eq(1)').prepend('Configurable Options | Generate default | Custom Fields | Generate default | ');
4 | $('form[name="packagefrm"] div.tab-content div#tab3').on('click', 'a#vultr_configurable_options', function (e)
5 | {
6 | $.post("configproducts.php?action=edit&id=#id#&tab=3", {
7 | productID: '#id#',
8 | vultr_action: 'vultr_configurable_options'
9 | }, function (data)
10 | {
11 | alert(data.message);
12 | if (data.reload !== undefined)
13 | {
14 | location.reload();
15 | }
16 | });
17 | e.preventDefault();
18 | });
19 | $('form[name="packagefrm"] div.tab-content div#tab3').on('click', 'a#vultr_custom_fields', function (e)
20 | {
21 | $.post("configproducts.php?action=edit&id=#id#&tab=3", {
22 | productID: '#id#',
23 | vultr_action: 'vultr_custom_fields'
24 | }, function (data)
25 | {
26 | alert(data.message);
27 | if (data.reload !== undefined)
28 | {
29 | location.reload();
30 | }
31 | });
32 | e.preventDefault();
33 | });
34 | });
35 |
36 |
--------------------------------------------------------------------------------
/servers/vultr/controller/backups.controller.php:
--------------------------------------------------------------------------------
1 | params['customfields']['subid']) || empty($this->params['customfields']['subid']))
10 | {
11 | SessionHelper::setFlashMessage('danger', LangHelper::T('core.client.create_vm_first'));
12 | $this->redirect('clientarea.php?action=productdetails&id=' . $this->serviceID);
13 | }
14 | if (!isset($this->params['configoptions']['auto_backups']) || ($this->params['configoptions']['auto_backups'] != 'Yes' && $this->params['configoptions']['auto_backups'] != '1'))
15 | {
16 | SessionHelper::setFlashMessage('danger', LangHelper::T('backups.other.not_available'));
17 | $this->redirect('clientarea.php?action=productdetails&id=' . $this->serviceID);
18 | }
19 | }
20 |
21 | public function indexAction()
22 | {
23 | if ($this->getVultrAPI())
24 | {
25 | $servers = $this->vultrAPI->server_list();
26 | if (isset($servers[$this->params['customfields']['subid']]))
27 | {
28 | $server = $servers[$this->params['customfields']['subid']];
29 | }
30 | else
31 | {
32 | SessionHelper::setFlashMessage('warning', LangHelper::T('backups.index.vm_not_found'));
33 | $this->redirect('clientarea.php?action=productdetails&id=' . $this->serviceID);
34 | }
35 | $backups = $this->vultrAPI->backup_list();
36 | foreach ($backups as $key => $value)
37 | {
38 | if (strpos($value['description'], $server['main_ip']) === false)
39 | {
40 | unset($backups[$key]);
41 | }
42 | else
43 | {
44 | $backups[$key]['size'] = VultrHelper::recalcSize($backups[$key]['size']);
45 | }
46 | }
47 | return array('vars' => array('backups' => $backups));
48 | }
49 | else
50 | {
51 | return array('error' => LangHelper::T('scripts.core.connection_error'));
52 | }
53 | }
54 |
55 | public function restoreAction()
56 | {
57 | if ($this->getVultrAPI())
58 | {
59 | $id = filter_input(INPUT_GET, 'vultrID');
60 | $api = $this->vultrAPI->restore_backup($this->params['customfields']['subid'], $id);
61 | if ($api != '200')
62 | {
63 | SessionHelper::setFlashMessage('danger', $api);
64 | }
65 | else
66 | {
67 | SessionHelper::setFlashMessage('success', LangHelper::T('backups.restore.success'));
68 | }
69 | $this->redirect('clientarea.php?action=productdetails&id=' . $this->serviceID . '&cloudController=Backups');
70 | }
71 | else
72 | {
73 | return array('error' => LangHelper::T('scripts.core.connection_error'));
74 | }
75 | }
76 | }
77 |
--------------------------------------------------------------------------------
/servers/vultr/controller/console.controller.php:
--------------------------------------------------------------------------------
1 | redirect('clientarea.php?action=productdetails&id=' . $this->serviceID);
10 | if (!isset($this->params['customfields']['subid']) || empty($this->params['customfields']['subid']))
11 | {
12 | SessionHelper::setFlashMessage('danger', LangHelper::T('core.client.create_vm_first'));
13 | $this->redirect('clientarea.php?action=productdetails&id=' . $this->serviceID);
14 | }
15 | }
16 |
17 | public function indexAction()
18 | {
19 | if ($this->getVultrAPI())
20 | {
21 | $servers = $this->vultrAPI->server_list();
22 | if (isset($servers[$this->params['customfields']['subid']]))
23 | {
24 | if ($servers[$this->params['customfields']['subid']]['status'] == 'active')
25 | {
26 | return array(
27 | 'vars' => array(
28 | 'server' => $servers[$this->params['customfields']['subid']]
29 | )
30 | );
31 | }
32 | else
33 | {
34 | $status = $servers[$this->params['customfields']['subid']]['status'];
35 | if ($status == 'pending')
36 | {
37 | $status = 'installing';
38 | }
39 | SessionHelper::setFlashMessage('info', LangHelper::T('main.index.vm_status_is') . $status);
40 | SessionHelper::setFlashMessage('info', LangHelper::T('main.create.reload_info'));
41 | }
42 | }
43 | else
44 | {
45 | SessionHelper::setFlashMessage('info', LangHelper::T('main.index.vm_not_found'));
46 | }
47 | }
48 | else
49 | {
50 | SessionHelper::setFlashMessage('success', LangHelper::T('main.index.connection_error'));
51 | }
52 | }
53 | }
54 |
--------------------------------------------------------------------------------
/servers/vultr/controller/graphs.controller.php:
--------------------------------------------------------------------------------
1 | params['customfields']['subid']) || empty($this->params['customfields']['subid']))
10 | {
11 | SessionHelper::setFlashMessage('danger', LangHelper::T('core.client.create_vm_first'));
12 | $this->redirect('clientarea.php?action=productdetails&id=' . $this->serviceID);
13 | }
14 | }
15 |
16 | public function indexAction()
17 | {
18 | if ($this->getVultrAPI())
19 | {
20 | $incoming = '[';
21 | $outgoing = '[';
22 | $bandwitch = $this->vultrAPI->bandwidth($this->params['customfields']['subid']);
23 | if (empty($bandwitch['incoming_bytes']))
24 | {
25 | SessionHelper::setFlashMessage('info', LangHelper::T('graphs.index.empty_data'));
26 | return array('vars' => array('emptyData' => true));
27 | }
28 | foreach ($bandwitch['incoming_bytes'] as $byte)
29 | {
30 | $incoming .= '{date:\'' . $byte[0] . '\',incoming:' . $byte[1] . '},';
31 | }
32 | foreach ($bandwitch['outgoing_bytes'] as $byte)
33 | {
34 | $outgoing .= '{date:\'' . $byte[0] . '\',outgoing:' . $byte[1] . '},';
35 | }
36 | return array('vars' => array('incoming' => $incoming . ']', 'outgoing' => $outgoing . ']'));
37 | }
38 | else
39 | {
40 | return array('error' => LangHelper::T('scripts.core.connection_error'));
41 | }
42 | }
43 | }
44 |
--------------------------------------------------------------------------------
/servers/vultr/controller/isochange.controller.php:
--------------------------------------------------------------------------------
1 | params['customfields']['subid']) || empty($this->params['customfields']['subid']))
9 | {
10 | SessionHelper::setFlashMessage('danger', LangHelper::T('core.client.create_vm_first'));
11 | $this->redirect('clientarea.php?action=productdetails&id=' . $this->serviceID);
12 | }
13 | }
14 |
15 | public function indexAction()
16 | {
17 |
18 | if ($this->getVultrAPI())
19 | {
20 | $servers = $this->vultrAPI->server_list();
21 | if (isset($servers[$this->params['customfields']['subid']]))
22 | {
23 | $return = array('info' => $servers[$this->params['customfields']['subid']]);
24 |
25 | $mountedIsoId = $this->vultrAPI->iso_status($this->params['customfields']['subid'])["ISOID"];
26 |
27 | $availableIsosList = VultrHelper::getAvailableIsos($this->vultrAPI->iso_list());
28 | $mountedIsoName = VultrHelper::getMountedIsoFileName($this->vultrAPI, $this->params['customfields']['subid']);
29 |
30 | $return['isos'] = $availableIsosList;
31 | $return['mountedIsoId'] = $mountedIsoId;
32 | $return['mountedIsoName'] = $mountedIsoName;
33 |
34 | if (isset($_POST['vultrISOID']))
35 | {
36 | $code = $this->vultrAPI->attach_iso($this->params['customfields']['subid'], filter_input(INPUT_POST, 'vultrISOID'));
37 | if ($code == '200')
38 | {
39 | SessionHelper::setFlashMessage('success', LangHelper::T('isochange.index.success'));
40 | $this->redirect('clientarea.php?action=productdetails&id=' . $this->serviceID);
41 | }
42 | else
43 | {
44 | SessionHelper::setFlashMessage('warning', $code);
45 | }
46 | }
47 |
48 | return array('vars' => $return);
49 | }
50 | else
51 | {
52 | SessionHelper::setFlashMessage('info', LangHelper::T('oschange.index.vm_not_found'));
53 | }
54 | }
55 | else
56 | {
57 | return array('error' => LangHelper::T('scripts.core.connection_error'));
58 | }
59 | }
60 | }
61 |
--------------------------------------------------------------------------------
/servers/vultr/controller/vultr.controller.php:
--------------------------------------------------------------------------------
1 | clientID = $params['userid'];
16 | $this->serviceID = $params['serviceid'];
17 | $this->params = $params;
18 | $this->createTables();
19 | }
20 |
21 | public function createTables()
22 | {
23 | if (!Capsule::schema()->hasTable('vultr_sshkeys'))
24 | {
25 | Capsule::schema()->create(
26 | 'vultr_sshkeys', function ($table){
27 | $table->integer('client_id');
28 | $table->string('SSHKEYID');
29 | }
30 | );
31 | }
32 | if (!Capsule::schema()->hasTable('vultr_snapshots'))
33 | {
34 | Capsule::schema()->create(
35 | 'vultr_snapshots', function ($table){
36 | $table->increments('id');
37 | $table->integer('client_id');
38 | $table->integer('service_id');
39 | $table->string('SNAPSHOTID');
40 | $table->integer('SUBID');
41 | }
42 | );
43 | }
44 | if (!Capsule::schema()->hasTable('vultr_scripts'))
45 | {
46 | Capsule::schema()->create(
47 | 'vultr_scripts', function ($table){
48 | $table->integer('client_id');
49 | $table->integer('SCRIPTID');
50 | $table->string('type');
51 | }
52 | );
53 | }
54 | if (!Capsule::schema()->hasTable('vultr_dns'))
55 | {
56 | Capsule::schema()->create(
57 | 'vultr_dns', function ($table){
58 | $table->integer('client_id');
59 | $table->integer('service_id');
60 | $table->string('domain');
61 | }
62 | );
63 | }
64 | if (!Capsule::schema()->hasTable('vultr_revdns'))
65 | {
66 | Capsule::schema()->create(
67 | 'vultr_revdns', function ($table){
68 | $table->integer('client_id');
69 | $table->integer('service_id');
70 | $table->text('updated');
71 | $table->text('reverse');
72 | }
73 | );
74 | }
75 | }
76 |
77 | public function redirect($url)
78 | {
79 | header("Location: " . $url);
80 | die();
81 | }
82 |
83 | public function getVultrAPI()
84 | {
85 | $vultrAPI = new VultrAPI($this->params['configoption1'], 1);
86 | if ($vultrAPI->checkConnection())
87 | {
88 | $this->vultrAPI = $vultrAPI;
89 | return true;
90 | }
91 | else
92 | {
93 | return FALSE;
94 | }
95 | }
96 | }
97 |
--------------------------------------------------------------------------------
/servers/vultr/helper/lang.helper.php:
--------------------------------------------------------------------------------
1 | langs;
15 | if ($key == null)
16 | {
17 | return $lang;
18 | }
19 | $keyPath = explode('.', $key);
20 | foreach ($keyPath as $key)
21 | {
22 | if (isset($lang[$key]))
23 | {
24 | $lang = str_replace('%var%', $var, $lang[$key]);
25 | }
26 | else
27 | {
28 | return '';
29 | }
30 | }
31 | return $lang;
32 | }
33 |
34 | public static function getInstance($dir = null, $lang = null)
35 | {
36 | if (self::$instance === null)
37 | {
38 | self::$instance = new self();
39 | self::$instance->dir = $dir;
40 | self::$instance->loadLang('english');
41 | if (!$lang)
42 | {
43 | $lang = self::getLang();
44 | }
45 |
46 | if ($lang && $lang != 'english')
47 | {
48 | self::$instance->loadLang($lang);
49 | }
50 | }
51 | return self::$instance;
52 | }
53 |
54 | public static function loadLang($lang)
55 | {
56 | $file = self::getInstance()->dir . DS . $lang . '.php';
57 | if (file_exists($file))
58 | {
59 | include $file;
60 | self::getInstance()->langs = array_merge(self::getInstance()->langs, $_LANG);
61 | self::getInstance()->currentLang = $lang;
62 | }
63 | }
64 |
65 | public static function getLang()
66 | {
67 | $language = '';
68 | if (isset($_SESSION['Language']))
69 | {
70 | $language = strtolower($_SESSION['Language']);
71 | }
72 | elseif (isset($_SESSION['uid']))
73 | {
74 | $q = PDOWrapper::query("SELECT language FROM tblclients WHERE id = :uid", array('uid'=>$_SESSION['uid']));
75 | $row = PDOWrapper::fetch_assoc($q);
76 | if ($row['language'])
77 | {
78 | $language = $row['language'];
79 | }
80 | }
81 |
82 | if (!$language)
83 | {
84 | $q = PDOWrapper::query("SELECT value FROM tblconfiguration WHERE setting = 'Language' LIMIT 1");
85 | $row = PDOWrapper::fetch_assoc($q);
86 | $language = $row['value'];
87 | }
88 |
89 | if (!$language)
90 | {
91 | $language = 'english';
92 | }
93 |
94 | return strtolower($language);
95 | }
96 | }
97 |
--------------------------------------------------------------------------------
/servers/vultr/helper/session.helper.php:
--------------------------------------------------------------------------------
1 | $type, 'message' => $message);
8 | }
9 |
10 | public static function getFlashMessages()
11 | {
12 | if (isset($_SESSION['VULTR']['FLASH']))
13 | {
14 | $flash = $_SESSION['VULTR']['FLASH'];
15 | unset($_SESSION['VULTR']['FLASH']);
16 | return $flash;
17 | }
18 | else
19 | {
20 | return array();
21 | }
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/servers/vultr/hooks.php:
--------------------------------------------------------------------------------
1 | select('id')->where('servertype', 'vultr')->where('id', $productID)->first();
12 | if ($product)
13 | {
14 | $script = str_replace('#id#', $productID, file_get_contents(__DIR__ . DS . 'assets' . DS . 'js' . DS . 'configproducts.js'));
15 | $return = '';
16 | return $return;
17 | }
18 | }
19 | });
20 |
--------------------------------------------------------------------------------
/servers/vultr/loader.php:
--------------------------------------------------------------------------------
1 | ';
50 | var_dump($x);
51 | echo '';
52 | echo '###################################';
53 | if ($die)
54 | {
55 | die();
56 | }
57 | }
58 | }
59 |
--------------------------------------------------------------------------------
/servers/vultr/template/controller/backups/index.tpl:
--------------------------------------------------------------------------------
1 | {include file="modules/servers/vultr/template/element/flashMessages.tpl"}
2 | {include file="modules/servers/vultr/template/element/mainButtons.tpl"}
3 |
4 |
5 |
6 |
7 |
8 | {$_LANG.backups.index.panel_title}
9 |
10 |
11 |
12 |
13 |
14 | {$_LANG.backups.index.name} |
15 | {$_LANG.backups.index.status} |
16 | {$_LANG.backups.index.size} |
17 | {$_LANG.backups.index.desc} |
18 | {$_LANG.backups.index.actions} |
19 |
20 | {foreach from=$backups item=backup}
21 |
22 | {$backup['BACKUPID']} {$backup['date_created']} |
23 | {$backup['status']} |
24 | {$backup['size']} |
25 | {$backup['description']} |
26 |
27 | {$_LANG.backups.index.restore}
30 | |
31 |
32 | {foreachelse}
33 |
34 |
35 | {$_LANG.backups.index.not_found}
36 | |
37 |
38 | {/foreach}
39 |
40 |
41 |
--------------------------------------------------------------------------------
/servers/vultr/template/controller/console/index.tpl:
--------------------------------------------------------------------------------
1 | {include file="modules/servers/vultr/template/element/flashMessages.tpl"}
2 | {include file="modules/servers/vultr/template/element/mainButtons.tpl"}
3 |
--------------------------------------------------------------------------------
/servers/vultr/template/controller/dns/create.tpl:
--------------------------------------------------------------------------------
1 | {include file="modules/servers/vultr/template/element/flashMessages.tpl"}
2 | {include file="modules/servers/vultr/template/element/mainButtons.tpl"}
3 |
48 |
49 |
50 |
51 |
52 |
53 |
--------------------------------------------------------------------------------
/servers/vultr/template/controller/dns/index.tpl:
--------------------------------------------------------------------------------
1 | {include file="modules/servers/vultr/template/element/flashMessages.tpl"}
2 | {include file="modules/servers/vultr/template/element/mainButtons.tpl"}
3 |
4 |
5 |
6 |
7 |
8 | {$_LANG.dns.index.panel_title}
9 |
10 |
14 |
15 |
16 |
17 |
18 | {$_LANG.dns.index.domain} |
19 | {$_LANG.dns.index.created} |
20 | {$_LANG.dns.index.actions} |
21 |
22 | {foreach from=$domains item=domain}
23 |
24 | {$domain['domain']} |
25 | {$domain['date_created']} |
26 |
27 | {$_LANG.dns.index.manage}
29 | {$_LANG.dns.index.delete}
31 | |
32 |
33 | {foreachelse}
34 |
35 |
36 | {$_LANG.dns.index.not_found}
37 | |
38 |
39 | {/foreach}
40 |
41 |
42 |
43 |
44 | {$_LANG.dns.index.dns_title}
45 |
46 |
47 | {$ns['ns1']}
48 |
49 |
50 | {$ns['ns2']}
51 |
52 |
53 |
54 |
55 |
56 |
57 |
--------------------------------------------------------------------------------
/servers/vultr/template/controller/isochange/index.tpl:
--------------------------------------------------------------------------------
1 | {include file="modules/servers/vultr/template/element/flashMessages.tpl"}
2 | {include file="modules/servers/vultr/template/element/mainButtons.tpl"}
3 |
4 |
5 |
6 |
7 |
8 | {$_LANG.isochange.index.panel_title}
9 |
10 |
11 |
12 |
41 |
42 |
--------------------------------------------------------------------------------
/servers/vultr/template/controller/scripts/add.tpl:
--------------------------------------------------------------------------------
1 | {include file="modules/servers/vultr/template/element/flashMessages.tpl"}
2 | {include file="modules/servers/vultr/template/element/mainButtons.tpl"}
3 |
4 |
5 |
6 |
7 |
8 | {$_LANG.scripts.add.panel_title}
9 |
10 |
11 |
12 |
46 |
47 |
--------------------------------------------------------------------------------
/servers/vultr/template/controller/snapshots/add.tpl:
--------------------------------------------------------------------------------
1 | {include file="modules/servers/vultr/template/element/flashMessages.tpl"}
2 | {include file="modules/servers/vultr/template/element/mainButtons.tpl"}
3 |
4 |
5 |
6 |
7 |
8 | {$_LANG.snapshots.add.panel_title}
9 |
10 |
11 |
12 |
13 |
14 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/servers/vultr/template/controller/snapshots/index.tpl:
--------------------------------------------------------------------------------
1 | {include file="modules/servers/vultr/template/element/flashMessages.tpl"}
2 | {include file="modules/servers/vultr/template/element/mainButtons.tpl"}
3 |
4 |
5 |
6 |
7 |
8 | {assign "find" array('%use%', '%available%')}
9 | {assign "repl" array($use,$available)}
10 | {$_LANG['snapshots']['index']['panel_title']|replace:$find:$repl}
11 |
12 |
18 |
19 |
20 |
21 |
22 | {$_LANG['snapshots']['index']['id']} |
23 | {$_LANG['snapshots']['index']['description']} |
24 | {$_LANG['snapshots']['index']['size']} |
25 | {$_LANG['snapshots']['index']['status']} |
26 | {$_LANG['snapshots']['index']['created']} |
27 | {$_LANG['snapshots']['index']['actions']} |
28 |
29 | {foreach from=$snapshots item=script}
30 |
31 | {$script['SNAPSHOTID']} |
32 | {$script['description']} |
33 | {$script['size']} |
34 | {$script['status']} |
35 | {$script['date_created']} |
36 |
37 | {if $script['status']=='pending'}
38 | {$_LANG.snapshots.index.pending}
39 | {else}
40 | {$_LANG.snapshots.index.restore}
43 | {$_LANG.snapshots.index.delete}
46 | |
47 | {/if}
48 |
49 | {foreachelse}
50 |
51 |
52 | {$_LANG.snapshots.index.not_found}
53 | |
54 |
55 | {/foreach}
56 |
57 |
58 |
--------------------------------------------------------------------------------
/servers/vultr/template/controller/sshkeys/add.tpl:
--------------------------------------------------------------------------------
1 | {include file="modules/servers/vultr/template/element/flashMessages.tpl"}
2 | {include file="modules/servers/vultr/template/element/mainButtons.tpl"}
3 |
--------------------------------------------------------------------------------
/servers/vultr/template/controller/sshkeys/index.tpl:
--------------------------------------------------------------------------------
1 | {include file="modules/servers/vultr/template/element/flashMessages.tpl"}
2 | {include file="modules/servers/vultr/template/element/mainButtons.tpl"}
3 |
--------------------------------------------------------------------------------
/servers/vultr/template/element/flashMessages.tpl:
--------------------------------------------------------------------------------
1 |
2 |
3 | {foreach from=$flashMessages item=message}
4 | ×{$message['message']}
6 |
7 | {/foreach}
8 |
--------------------------------------------------------------------------------
/servers/vultr/template/element/mainButtons.tpl:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/servers/vultr/template/element/moduleError.tpl:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/servers/vultr/vendor/PDOWrapper.php:
--------------------------------------------------------------------------------
1 | getPdo()
11 | ->prepare($query);
12 | $statement->execute($params);
13 | return $statement;
14 | }
15 |
16 | public static function real_escape_string($string)
17 | {
18 | return substr(DB::connection()->getPdo()->quote($string), 1, -1);
19 | }
20 |
21 | public static function fetch_assoc($query)
22 | {
23 | return $query->fetch(\PDO::FETCH_ASSOC);
24 | }
25 |
26 | public static function fetch_array($query)
27 | {
28 | return $query->fetch(\PDO::FETCH_BOTH);
29 | }
30 |
31 | public static function fetch_object($query)
32 | {
33 | return $query->fetch(\PDO::FETCH_OBJ);
34 | }
35 |
36 | public static function num_rows($query)
37 | {
38 | $query->fetch(\PDO::FETCH_BOTH);
39 | return $query->rowCount();
40 | }
41 |
42 | public static function insert_id()
43 | {
44 | return DB::connection()
45 | ->getPdo()
46 | ->lastInsertId();
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/servers/vultr/vultr.php:
--------------------------------------------------------------------------------
1 | getConfigOptions();
8 | }
9 |
10 | function vultr_CreateAccount($params)
11 | {
12 | $vultr = new Vultr($params);
13 | return $vultr->createAccount();
14 | }
15 |
16 | function vultr_SuspendAccount($params)
17 | {
18 | $vultr = new Vultr($params);
19 | return $vultr->suspendAccount();
20 | }
21 |
22 | function vultr_UnsuspendAccount($params)
23 | {
24 | $vultr = new Vultr($params);
25 | return $vultr->unsuspendAccount();
26 | }
27 |
28 | function vultr_TerminateAccount($params)
29 | {
30 | $vultr = new Vultr($params);
31 | return $vultr->terminateAccount();
32 | }
33 |
34 | function vultr_ChangePackage($params)
35 | {
36 | $vultr = new Vultr($params);
37 | return $vultr->changePackage();
38 | }
39 |
40 | function vultr_ClientArea($params)
41 | {
42 | $render = new Vultrender($params);
43 | return $render->render('ClientArea');
44 | }
45 |
46 | function vultr_AdminCustomButtonArray($params)
47 | {
48 | $vultr = new Vultr($params);
49 | return $vultr->getAdminCustomButtonArray();
50 | }
51 |
52 | function vultr_start($params)
53 | {
54 | $vultr = new Vultr($params);
55 | return $vultr->start();
56 | }
57 |
58 | function vultr_reboot($params)
59 | {
60 | $vultr = new Vultr($params);
61 | return $vultr->reboot();
62 | }
63 |
64 | function vultr_halt($params)
65 | {
66 | $vultr = new Vultr($params);
67 | return $vultr->halt();
68 | }
69 |
70 | function vultr_reinstall($params)
71 | {
72 | $vultr = new Vultr($params);
73 | return $vultr->reinstall();
74 | }
75 |
76 | function vultr_AdminServicesTabFieldsSave(array $params)
77 | {
78 | $vultr = new Vultr($params);
79 | $vultr->verifyAdminServiceSave();
80 | }
81 |
--------------------------------------------------------------------------------
|