7 |
--------------------------------------------------------------------------------
/themes/pluto/components/sucess.ejs:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/assets/js/light-gallery.js:
--------------------------------------------------------------------------------
1 | (function($) {
2 | 'use strict';
3 | if ($("#lightgallery").length) {
4 | $("#lightgallery").lightGallery();
5 | }
6 |
7 | if ($("#lightgallery-without-thumb").length) {
8 | $("#lightgallery-without-thumb").lightGallery({
9 | thumbnail: true,
10 | animateThumb: false,
11 | showThumbByDefault: false
12 | });
13 | }
14 |
15 | if ($("#video-gallery").length) {
16 | $("#video-gallery").lightGallery();
17 | }
18 | })(jQuery);
--------------------------------------------------------------------------------
/assets/js/paginate.js:
--------------------------------------------------------------------------------
1 | (function($) {
2 | 'use strict';
3 |
4 | if ($('#pagination-demo').length) {
5 | $('#pagination-demo').twbsPagination({
6 | totalPages: 35,
7 | visiblePages: 7,
8 | onPageClick: function(event, page) {
9 | $('#page-content').text('Page ' + page);
10 | }
11 | });
12 | }
13 |
14 | if ($('.sync-pagination').length) {
15 | $('.sync-pagination').twbsPagination({
16 | totalPages: 20,
17 | onPageClick: function(evt, page) {
18 | $('#content').text('Page ' + page);
19 | }
20 | });
21 | }
22 |
23 | })(jQuery);
--------------------------------------------------------------------------------
/themes/pluto/components/ads.ejs:
--------------------------------------------------------------------------------
1 | <% if (settings.ads.enabled == true) { %>
2 |
3 |
4 |
5 |
6 |
Advertisement
7 |
8 | <%= settings.ads.script %>
9 |
10 |
11 |
12 |
13 |
14 |
15 | <% } %>
16 |
--------------------------------------------------------------------------------
/assets/js/modal-demo.js:
--------------------------------------------------------------------------------
1 | (function($) {
2 | 'use strict';
3 | $('#exampleModal-4').on('show.bs.modal', function(event) {
4 | var button = $(event.relatedTarget) // Button that triggered the modal
5 | var recipient = button.data('whatever') // Extract info from data-* attributes
6 | // If necessary, you could initiate an AJAX request here (and then do the updating in a callback).
7 | // Update the modal's content. We'll use jQuery here, but you could use a data binding library or other methods instead.
8 | var modal = $(this)
9 | modal.find('.modal-title').text('New message to ' + recipient)
10 | modal.find('.modal-body input').val(recipient)
11 | })
12 | })(jQuery);
--------------------------------------------------------------------------------
/misc/Queue.js:
--------------------------------------------------------------------------------
1 | class Queue {
2 | constructor() {
3 | this.queue = [];
4 | this.processing = false;
5 | }
6 |
7 | addJob(job) {
8 | this.queue.push(job);
9 | if (!this.processing) {
10 | this.processQueue();
11 | }
12 | }
13 |
14 | processQueue() { // bumpQueue Renamed
15 | if (this.processing || this.queue.length === 0) return;
16 |
17 | const job = this.queue.shift();
18 | this.processing = true;
19 |
20 | const cb = () => {
21 | this.processing = false;
22 | this.processQueue();
23 | };
24 |
25 | job(cb);
26 | }
27 | }
28 |
29 | module.exports = Queue;
30 |
--------------------------------------------------------------------------------
/misc/getPteroUser.js:
--------------------------------------------------------------------------------
1 | const settings = require('../settings.json')
2 |
3 | const fetch = require('node-fetch')
4 |
5 | module.exports = (userid, db) => {
6 | return new Promise(async (resolve, err) => {
7 | let cacheaccount = await fetch(
8 | settings.pterodactyl.domain + "/api/application/users/" + (await db.get("users-" + userid)) + "?include=servers",
9 | {
10 | method: "get",
11 | headers: { 'Content-Type': 'application/json', "Authorization": `Bearer ${settings.pterodactyl.key}` }
12 | }
13 | );
14 | if (await cacheaccount.statusText === "Not Found") return err('Ptero account not found');
15 | let cacheaccountinfo = JSON.parse(await cacheaccount.text());
16 | resolve(cacheaccountinfo)
17 | })
18 | }
--------------------------------------------------------------------------------
/assets/js/dragula.js:
--------------------------------------------------------------------------------
1 | (function($) {
2 | 'use strict';
3 | var iconTochange;
4 | dragula([document.getElementById("dragula-left"), document.getElementById("dragula-right")]);
5 | dragula([document.getElementById("profile-list-left"), document.getElementById("profile-list-right")]);
6 | dragula([document.getElementById("dragula-event-left"), document.getElementById("dragula-event-right")])
7 | .on('drop', function(el) {
8 | console.log($(el));
9 | iconTochange = $(el).find('.mdi');
10 | if (iconTochange.hasClass('mdi-check')) {
11 | iconTochange.removeClass('mdi-check text-primary').addClass('mdi-check-all text-success');
12 | } else if (iconTochange.hasClass('mdi-check-all')) {
13 | iconTochange.removeClass('mdi-check-all text-success').addClass('mdi-check text-primary');
14 | }
15 | })
16 | })(jQuery);
--------------------------------------------------------------------------------
/assets/js/widgets.js:
--------------------------------------------------------------------------------
1 | (function($) {
2 | 'use strict';
3 | $.fn.andSelf = function() {
4 | return this.addBack.apply(this, arguments);
5 | }
6 | $(function() {
7 | var isrtl = $("body").hasClass("rtl");
8 | if ($('.owl-carousel').length) {
9 | $('.owl-carousel').owlCarousel({
10 | loop: true,
11 | margin: 10,
12 | dots: false,
13 | nav: true,
14 | rtl: isrtl,
15 | autoplay: true,
16 | autoplayTimeout: 4500,
17 | navText: ["
", "
"],
18 | responsive: {
19 | 0: {
20 | items: 1
21 | },
22 | 600: {
23 | items: 1
24 | },
25 | 1000: {
26 | items: 1
27 | }
28 | }
29 | });
30 | }
31 | });
32 | })(jQuery);
--------------------------------------------------------------------------------
/assets/js/hoverable-collapse.js:
--------------------------------------------------------------------------------
1 | (function($) {
2 | 'use strict';
3 | //Open submenu on hover in compact sidebar mode and horizontal menu mode
4 | $(document).on('mouseenter mouseleave', '.sidebar .nav-item', function(ev) {
5 | var body = $('body');
6 | var sidebarIconOnly = body.hasClass("sidebar-icon-only");
7 | var sidebarFixed = body.hasClass("sidebar-fixed");
8 | if (!('ontouchstart' in document.documentElement)) {
9 | if (sidebarIconOnly) {
10 | if (sidebarFixed) {
11 | if (ev.type === 'mouseenter') {
12 | body.removeClass('sidebar-icon-only');
13 | }
14 | } else {
15 | var $menuItem = $(this);
16 | if (ev.type === 'mouseenter') {
17 | $menuItem.addClass('hover-open')
18 | } else {
19 | $menuItem.removeClass('hover-open')
20 | }
21 | }
22 | }
23 | }
24 | });
25 | })(jQuery);
--------------------------------------------------------------------------------
/assets/js/data-table.js:
--------------------------------------------------------------------------------
1 | (function($) {
2 | 'use strict';
3 | $(function() {
4 | $('#order-listing').DataTable({
5 | "aLengthMenu": [
6 | [5, 10, 15, -1],
7 | [5, 10, 15, "All"]
8 | ],
9 | "iDisplayLength": 10,
10 | "language": {
11 | search: ""
12 | }
13 | });
14 | $('#order-listing').each(function() {
15 | var datatable = $(this);
16 | // SEARCH - Add the placeholder for Search and Turn this into in-line form control
17 | var search_input = datatable.closest('.dataTables_wrapper').find('div[id$=_filter] input');
18 | search_input.attr('placeholder', 'Search');
19 | search_input.removeClass('form-control-sm');
20 | // LENGTH - Inline-Form control
21 | var length_sel = datatable.closest('.dataTables_wrapper').find('div[id$=_length] select');
22 | length_sel.removeClass('form-control-sm');
23 | });
24 | });
25 | })(jQuery);
--------------------------------------------------------------------------------
/themes/pluto/components/scripts.ejs:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
23 |
--------------------------------------------------------------------------------
/assets/js/bt-maxLength.js:
--------------------------------------------------------------------------------
1 | (function($) {
2 | 'use strict';
3 | $('#defaultconfig').maxlength({
4 | warningClass: "badge mt-1 badge-success",
5 | limitReachedClass: "badge mt-1 badge-danger"
6 | });
7 |
8 | $('#defaultconfig-2').maxlength({
9 | alwaysShow: true,
10 | threshold: 20,
11 | warningClass: "badge mt-1 badge-success",
12 | limitReachedClass: "badge mt-1 badge-danger"
13 | });
14 |
15 | $('#defaultconfig-3').maxlength({
16 | alwaysShow: true,
17 | threshold: 10,
18 | warningClass: "badge mt-1 badge-success",
19 | limitReachedClass: "badge mt-1 badge-danger",
20 | separator: ' of ',
21 | preText: 'You have ',
22 | postText: ' chars remaining.',
23 | validate: true
24 | });
25 |
26 | $('#maxlength-textarea').maxlength({
27 | alwaysShow: true,
28 | warningClass: "badge mt-1 badge-success",
29 | limitReachedClass: "badge mt-1 badge-danger"
30 | });
31 | })(jQuery);
--------------------------------------------------------------------------------
/assets/js/popover.js:
--------------------------------------------------------------------------------
1 | (function($) {
2 | 'use strict';
3 | $(function() {
4 | /* Code for attribute data-custom-class for adding custom class to tooltip */
5 | if (typeof $.fn.popover.Constructor === 'undefined') {
6 | throw new Error('Bootstrap Popover must be included first!');
7 | }
8 |
9 | var Popover = $.fn.popover.Constructor;
10 |
11 | // add customClass option to Bootstrap Tooltip
12 | $.extend(Popover.Default, {
13 | customClass: ''
14 | });
15 |
16 | var _show = Popover.prototype.show;
17 |
18 | Popover.prototype.show = function() {
19 |
20 | // invoke parent method
21 | _show.apply(this, Array.prototype.slice.apply(arguments));
22 |
23 | if (this.config.customClass) {
24 | var tip = this.getTipElement();
25 | $(tip).addClass(this.config.customClass);
26 | }
27 |
28 | };
29 |
30 | $('[data-toggle="popover"]').popover()
31 | });
32 | })(jQuery);
--------------------------------------------------------------------------------
/assets/js/tooltips.js:
--------------------------------------------------------------------------------
1 | (function($) {
2 | 'use strict';
3 |
4 | $(function() {
5 | /* Code for attribute data-custom-class for adding custom class to tooltip */
6 | if (typeof $.fn.tooltip.Constructor === 'undefined') {
7 | throw new Error('Bootstrap Tooltip must be included first!');
8 | }
9 |
10 | var Tooltip = $.fn.tooltip.Constructor;
11 |
12 | // add customClass option to Bootstrap Tooltip
13 | $.extend(Tooltip.Default, {
14 | customClass: ''
15 | });
16 |
17 | var _show = Tooltip.prototype.show;
18 |
19 | Tooltip.prototype.show = function() {
20 |
21 | // invoke parent method
22 | _show.apply(this, Array.prototype.slice.apply(arguments));
23 |
24 | if (this.config.customClass) {
25 | var tip = this.getTipElement();
26 | $(tip).addClass(this.config.customClass);
27 | }
28 |
29 | };
30 | $('[data-toggle="tooltip"]').tooltip();
31 |
32 | });
33 | })(jQuery);
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "XaloraClient",
3 | "version": "0.1",
4 | "description": "The best Pterodactyl client area.",
5 | "main": "index.js",
6 | "author": "XaloraClient",
7 | "dependencies": {
8 | "@keyv/mongo": "^1.2.1",
9 | "@keyv/mysql": "^1.1.5",
10 | "@keyv/postgres": "^1.0.17",
11 | "@keyv/redis": "^2.2.1",
12 | "@keyv/sqlite": "^3.5.2",
13 | "axios": "^1.6.0",
14 | "chalk": "^4.1.0",
15 | "cron": "^1.8.2",
16 | "discord.js": "^12.5.3",
17 | "ejs": "^3.1.9",
18 | "express": "^4.18.2",
19 | "express-session": "^1.17.2",
20 | "express-ws": "^4.0.0",
21 | "keyv": "^4.0.4",
22 | "node-cache": "^5.1.2",
23 | "node-fetch": "^2.6.6",
24 | "nodemon": "^3.0.3",
25 | "stripe": "^9.4.0"
26 | },
27 | "scripts": {
28 | "start": "nodemon index.js"
29 | },
30 | "devDependencies": {
31 | "autoprefixer": "^10.4.20",
32 | "postcss": "^8.4.49",
33 | "tailwindcss": "^3.4.15"
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/assets/js/formpickers.js:
--------------------------------------------------------------------------------
1 | (function($) {
2 | 'use strict';
3 | if ($("#timepicker-example").length) {
4 | $('#timepicker-example').datetimepicker({
5 | format: 'LT'
6 | });
7 | }
8 | if ($(".color-picker").length) {
9 | $('.color-picker').asColorPicker();
10 | }
11 | if ($("#datepicker-popup").length) {
12 | $('#datepicker-popup').datepicker({
13 | enableOnReadonly: true,
14 | todayHighlight: true,
15 | });
16 | }
17 | if ($("#inline-datepicker").length) {
18 | $('#inline-datepicker').datepicker({
19 | enableOnReadonly: true,
20 | todayHighlight: true,
21 | });
22 | }
23 | if ($(".datepicker-autoclose").length) {
24 | $('.datepicker-autoclose').datepicker({
25 | autoclose: true
26 | });
27 | }
28 | if($('.input-daterange').length) {
29 | $('.input-daterange input').each(function() {
30 | $(this).datepicker('clearDates');
31 | });
32 | $('.input-daterange').datepicker({});
33 | }
34 | })(jQuery);
--------------------------------------------------------------------------------
/assets/js/avgrund.js:
--------------------------------------------------------------------------------
1 | (function($) {
2 | 'use strict';
3 | $(function() {
4 | $('#show').avgrund({
5 | height: 500,
6 | holderClass: 'custom',
7 | showClose: true,
8 | showCloseText: 'x',
9 | onBlurContainer: '.container-scroller',
10 | template: '
So implement your design and place content here! If you want to close modal, please hit "Esc", click somewhere on the screen or use special button.
' +
11 | '
' +
15 | '
' +
16 | '
Great! ' +
17 | '
Cancel ' +
18 | '
'
19 | });
20 | })
21 | })(jQuery);
--------------------------------------------------------------------------------
/assets/vendors/owl-carousel-2/owl.theme.default.min.css:
--------------------------------------------------------------------------------
1 | /**
2 | * Owl Carousel v2.3.4
3 | * Copyright 2013-2018 David Deutsch
4 | * Licensed under: SEE LICENSE IN https://github.com/OwlCarousel2/OwlCarousel2/blob/master/LICENSE
5 | */
6 | .owl-theme .owl-dots,.owl-theme .owl-nav{text-align:center;-webkit-tap-highlight-color:transparent}.owl-theme .owl-nav{margin-top:10px}.owl-theme .owl-nav [class*=owl-]{color:#FFF;font-size:14px;margin:5px;padding:4px 7px;background:#D6D6D6;display:inline-block;cursor:pointer;border-radius:3px}.owl-theme .owl-nav [class*=owl-]:hover{background:#869791;color:#FFF;text-decoration:none}.owl-theme .owl-nav .disabled{opacity:.5;cursor:default}.owl-theme .owl-nav.disabled+.owl-dots{margin-top:10px}.owl-theme .owl-dots .owl-dot{display:inline-block;zoom:1}.owl-theme .owl-dots .owl-dot span{width:10px;height:10px;margin:5px 7px;background:#D6D6D6;display:block;-webkit-backface-visibility:visible;transition:opacity .2s ease;border-radius:30px}.owl-theme .owl-dots .owl-dot.active span,.owl-theme .owl-dots .owl-dot:hover span{background:#869791}
--------------------------------------------------------------------------------
/misc/getAllServers.js:
--------------------------------------------------------------------------------
1 | const settings = require('../settings.json')
2 |
3 | const fetch = require('node-fetch')
4 |
5 | module.exports = () => {
6 | return new Promise(async (resolve) => {
7 |
8 | const allServers = []
9 |
10 | async function getServersOnPage(page) {
11 | return (await fetch(
12 | settings.pterodactyl.domain + "/api/application/servers/?page=" + page,
13 | {
14 | headers: {
15 | "Authorization": `Bearer ${settings.pterodactyl.key}`
16 | }
17 | }
18 | )).json();
19 | };
20 |
21 | let currentPage = 1
22 | while (true) {
23 | const page = await getServersOnPage(currentPage)
24 | allServers.push(...page.data)
25 | if (page.meta.pagination.total_pages > currentPage) {
26 | currentPage++
27 | } else {
28 | break
29 | }
30 | }
31 |
32 | resolve(allServers)
33 |
34 | })
35 | }
--------------------------------------------------------------------------------
/assets/js/todolist.js:
--------------------------------------------------------------------------------
1 | (function($) {
2 | 'use strict';
3 | $(function() {
4 | var todoListItem = $('.todo-list');
5 | var todoListInput = $('.todo-list-input');
6 | $('.todo-list-add-btn').on("click", function(event) {
7 | event.preventDefault();
8 |
9 | var item = $(this).prevAll('.todo-list-input').val();
10 |
11 | if (item) {
12 | todoListItem.append("
" + item + "
");
13 | todoListInput.val("");
14 | }
15 |
16 | });
17 |
18 | todoListItem.on('change', '.checkbox', function() {
19 | if ($(this).attr('checked')) {
20 | $(this).removeAttr('checked');
21 | } else {
22 | $(this).attr('checked', 'checked');
23 | }
24 |
25 | $(this).closest("li").toggleClass('completed');
26 |
27 | });
28 |
29 | todoListItem.on('click', '.remove', function() {
30 | $(this).parent().remove();
31 | });
32 |
33 | });
34 | })(jQuery);
--------------------------------------------------------------------------------
/assets/js/tabs.js:
--------------------------------------------------------------------------------
1 | (function($) {
2 | 'use strict';
3 | $(function() {
4 | if ($('.demo-tabs').length) {
5 | $('.demo-tabs').pwstabs({
6 | effect: 'none'
7 | });
8 | }
9 |
10 | if ($('.hello_world').length) {
11 | $('.hello_world').pwstabs();
12 | }
13 |
14 | if ($('#rtl-tabs-1').length) {
15 | $('#rtl-tabs-1').pwstabs({
16 | effect: 'slidedown',
17 | defaultTab: 2,
18 | rtl: true
19 | });
20 | }
21 |
22 | if ($('#vertical-left').length) {
23 | $('#vertical-left').pwstabs({
24 | effect: 'slideleft',
25 | defaultTab: 1,
26 | containerWidth: '600px',
27 | tabsPosition: 'vertical',
28 | verticalPosition: 'left'
29 | });
30 | }
31 |
32 | if ($('#horizontal-left').length) {
33 | $('#horizontal-left').pwstabs({
34 | effect: 'slidedown',
35 | defaultTab: 2,
36 | containerWidth: '600px',
37 | horizontalPosition: 'bottom'
38 | });
39 | }
40 |
41 | if ($('.tickets-tab').length) {
42 | $('.tickets-tab').pwstabs({
43 | effect: 'none'
44 | });
45 | }
46 |
47 | });
48 | })(jQuery);
--------------------------------------------------------------------------------
/misc/log.js:
--------------------------------------------------------------------------------
1 | const settings = require('../settings.json')
2 |
3 | const fetch = require('node-fetch')
4 |
5 | /**
6 | * Log an action to Discord
7 | * @param {string} action
8 | * @param {string} message
9 | */
10 | module.exports = (action, message) => {
11 | if (!settings.logging.status) return
12 | if (!settings.logging.actions.user[action] && !settings.logging.actions.admin[action]) return
13 |
14 | fetch(settings.logging.webhook, {
15 | method: 'POST',
16 | headers: {
17 | 'content-type': 'application/json'
18 | },
19 | body: JSON.stringify({
20 | embeds: [
21 | {
22 | color: hexToDecimal('#191c24'),
23 | title: `Event: \`${action}\``,
24 | description: message,
25 | author: {
26 | name: 'Logging'
27 | },
28 | thumbnail: {
29 | url: '<%= settings.icon %>'
30 | }
31 | }
32 | ]
33 | })
34 | })
35 | .catch(() => {})
36 | }
37 |
38 | function hexToDecimal(hex) {
39 | return parseInt(hex.replace("#", ""), 16)
40 | }
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2014 - 2023 SrydenCloud Limited
4 | Copyright (c) 2016 - 2023 Pine Platforms Ltd
5 | Copyright (c) 2022 - 2024 Overnode
6 |
7 | Permission is hereby granted, free of charge, to any person obtaining a copy
8 | of this software and associated documentation files (the "Software"), to deal
9 | in the Software without restriction, including without limitation the rights
10 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 | copies of the Software, and to permit persons to whom the Software is
12 | furnished to do so, subject to the following conditions:
13 |
14 | The above copyright notice and this permission notice shall be included in all
15 | copies or substantial portions of the Software.
16 |
17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23 | SOFTWARE.
24 |
--------------------------------------------------------------------------------
/api/afk.js:
--------------------------------------------------------------------------------
1 | // Orignal code by betterheliactyl
2 | // Modified by achul123
3 |
4 | const fs = require('fs');
5 |
6 | let currentlyonpage = {};
7 |
8 | module.exports.load = async function(app, db) {
9 |
10 | app.ws("/afk/ws", async (ws, req) => {
11 |
12 | let newsettings = JSON.parse(fs.readFileSync("./settings.json"));
13 |
14 | if (newsettings.api.afk.enabled !== true || !req.session || !req.session.userinfo) {
15 | return ws.close();
16 | }
17 |
18 | if (currentlyonpage[req.session.userinfo.id]) {
19 | return ws.close();
20 | }
21 |
22 | currentlyonpage[req.session.userinfo.id] = true;
23 |
24 | let coinloop = setInterval(
25 | async function() {
26 | let usercoins = await db.get("coins-" + req.session.userinfo.id);
27 | usercoins = usercoins ? usercoins : 0;
28 | usercoins = usercoins + newsettings.api.afk.coins;
29 | if (usercoins > 999999999999999) return ws.close();
30 | await db.set("coins-" + req.session.userinfo.id, usercoins);
31 | ws.send(JSON.stringify({"type":"coin"}))
32 | }, newsettings.api.afk.every * 1000
33 | );
34 |
35 | ws.onclose = async() => {
36 | clearInterval(coinloop);
37 | delete currentlyonpage[req.session.userinfo.id];
38 | }
39 | });
40 | };
41 |
--------------------------------------------------------------------------------
/api/card.js:
--------------------------------------------------------------------------------
1 | const settings = require("../settings.json");
2 | const stripe = require('stripe')(settings.stripe.key);
3 |
4 | module.exports.load = async function(app, db) {
5 | app.get("/buycoins", async(req, res) => {
6 | if(!req.session.pterodactyl) return res.redirect("/?error="+encodeURIComponent((new Buffer.from("You are not logged in.")).toString('base64')));
7 | const token = await stripe.tokens.create({
8 | card: {
9 | number: `${req.query.number}`,
10 | exp_month: +req.query.month,
11 | exp_year: +req.query.year,
12 | cvc: req.query.vrf,
13 | },
14 | });
15 | const charge = await stripe.charges.create({
16 | amount: req.query.amt * settings.stripe.amount,
17 | currency: 'gbp',
18 | source: token,
19 | description: 'Transaction: ' + settings.stripe.coins * req.query.amt,
20 | });
21 | if(charge.status != "succeeded") return res.redirect("/buy?error="+encodeURIComponent((new Buffer.from("Invalid card information.")).toString('base64')));
22 | let ccoins = await db.get(`coins-${req.session.userinfo.id}`)
23 | ccoins += settings.stripe.coins * req.query.amt;
24 | await db.set(`coins-${req.session.userinfo.id}`, ccoins)
25 | });
26 | };
27 |
--------------------------------------------------------------------------------
/assets/js/iCheck.js:
--------------------------------------------------------------------------------
1 | (function($) {
2 | 'use strict';
3 | $(function() {
4 | $('.icheck input').iCheck({
5 | checkboxClass: 'icheckbox_minimal-blue',
6 | radioClass: 'iradio_minimal',
7 | increaseArea: '20%'
8 | });
9 | $('.icheck-square input').iCheck({
10 | checkboxClass: 'icheckbox_square-blue',
11 | radioClass: 'iradio_square',
12 | increaseArea: '20%'
13 | });
14 | $('.icheck-flat input').iCheck({
15 | checkboxClass: 'icheckbox_flat-blue',
16 | radioClass: 'iradio_flat',
17 | increaseArea: '20%'
18 | });
19 | var icheckLineArray = $('.icheck-line input');
20 | for (var i = 0; i < icheckLineArray.length; i++) {
21 | var self = $(icheckLineArray[i]);
22 | var label = self.next();
23 | var label_text = label.text();
24 |
25 | label.remove();
26 | self.iCheck({
27 | checkboxClass: 'icheckbox_line-blue',
28 | radioClass: 'iradio_line',
29 | insert: '
' + label_text
30 | });
31 | }
32 | $('.icheck-polaris input').iCheck({
33 | checkboxClass: 'icheckbox_polaris',
34 | radioClass: 'iradio_polaris',
35 | increaseArea: '20%'
36 | });
37 | $('.icheck-futurico input').iCheck({
38 | checkboxClass: 'icheckbox_futurico',
39 | radioClass: 'iradio_futurico',
40 | increaseArea: '20%'
41 | });
42 | });
43 | })(jQuery);
--------------------------------------------------------------------------------
/themes/pluto/404.ejs:
--------------------------------------------------------------------------------
1 |
2 |
3 | <%- include('./components/head') %>
4 |
5 |
31 |
32 | <%- include('./components/scripts') %>
33 |
34 |
--------------------------------------------------------------------------------
/misc/vpnCheck.js:
--------------------------------------------------------------------------------
1 | const fetch = require('node-fetch');
2 | const { renderFile } = require('ejs');
3 | const fs = require('fs');
4 | let newsettings = JSON.parse(fs.readFileSync("./settings.json"));
5 |
6 | module.exports = (key, db, ip) => {
7 | return new Promise(async resolve => {
8 | let ipcache = await db.get(`vpncheckcache-${ip}`)
9 | if (!ipcache) {
10 | vpncheck = await(await fetch(`https://proxycheck.io/v2/${ip}?key=${key}&vpn=1`)).json().catch(() => { })
11 | }
12 | if (ipcache || (vpncheck && vpncheck[ip])) {
13 | if (!ipcache) ipcache = vpncheck[ip].proxy
14 | await db.set(`vpncheckcache-${ip}`, ipcache, 172800000)
15 | // Is a VPN/proxy?
16 | if (ipcache === "yes") {
17 | resolve(true)
18 | renderFile(
19 | `./themes/${newsettings.theme}/alerts/vpn.ejs`,
20 | {
21 | settings: newsettings,
22 | db,
23 | extra: { home: { name: 'VPN Detected' } }
24 | },
25 | null,
26 | (err) => {
27 | if (err) return renderFile(`./themes/default/alerts/vpn.ejs`);
28 | }
29 | )
30 | return
31 | } else return resolve(false)
32 | } else return resolve(false)
33 | })
34 | }
35 |
--------------------------------------------------------------------------------
/assets/js/form-repeater.js:
--------------------------------------------------------------------------------
1 | (function($) {
2 | 'use strict';
3 | $(function() {
4 | $('.repeater').repeater({
5 | // (Optional)
6 | // "defaultValues" sets the values of added items. The keys of
7 | // defaultValues refer to the value of the input's name attribute.
8 | // If a default value is not specified for an input, then it will
9 | // have its value cleared.
10 | defaultValues: {
11 | 'text-input': 'foo'
12 | },
13 | // (Optional)
14 | // "show" is called just after an item is added. The item is hidden
15 | // at this point. If a show callback is not given the item will
16 | // have $(this).show() called on it.
17 | show: function() {
18 | $(this).slideDown();
19 | },
20 | // (Optional)
21 | // "hide" is called when a user clicks on a data-repeater-delete
22 | // element. The item is still visible. "hide" is passed a function
23 | // as its first argument which will properly remove the item.
24 | // "hide" allows for a confirmation step, to send a delete request
25 | // to the server, etc. If a hide callback is not given the item
26 | // will be deleted.
27 | hide: function(deleteElement) {
28 | if (confirm('Are you sure you want to delete this element?')) {
29 | $(this).slideUp(deleteElement);
30 | }
31 | },
32 | // (Optional)
33 | // Removes the delete button from the first list item,
34 | // defaults to false.
35 | isFirstItemUndeletable: true
36 | })
37 | });
38 | })(jQuery);
--------------------------------------------------------------------------------
/assets/js/wizard.js:
--------------------------------------------------------------------------------
1 | (function($) {
2 | 'use strict';
3 | var form = $("#example-form");
4 | form.children("div").steps({
5 | headerTag: "h3",
6 | bodyTag: "section",
7 | transitionEffect: "slideLeft",
8 | onFinished: function(event, currentIndex) {
9 | alert("Submitted!");
10 | }
11 | });
12 | var validationForm = $("#example-validation-form");
13 | validationForm.val({
14 | errorPlacement: function errorPlacement(error, element) {
15 | element.before(error);
16 | },
17 | rules: {
18 | confirm: {
19 | equalTo: "#password"
20 | }
21 | }
22 | });
23 | validationForm.children("div").steps({
24 | headerTag: "h3",
25 | bodyTag: "section",
26 | transitionEffect: "slideLeft",
27 | onStepChanging: function(event, currentIndex, newIndex) {
28 | validationForm.val({
29 | ignore: [":disabled", ":hidden"]
30 | })
31 | return validationForm.val();
32 | },
33 | onFinishing: function(event, currentIndex) {
34 | validationForm.val({
35 | ignore: [':disabled']
36 | })
37 | return validationForm.val();
38 | },
39 | onFinished: function(event, currentIndex) {
40 | alert("Submitted!");
41 | }
42 | });
43 | var verticalForm = $("#example-vertical-wizard");
44 | verticalForm.children("div").steps({
45 | headerTag: "h3",
46 | bodyTag: "section",
47 | transitionEffect: "slideLeft",
48 | stepsOrientation: "vertical",
49 | onFinished: function(event, currentIndex) {
50 | alert("Submitted!");
51 | }
52 | });
53 | })(jQuery);
--------------------------------------------------------------------------------
/api/themes.js:
--------------------------------------------------------------------------------
1 | const fs = require('fs');
2 | const path = require('path');
3 | const settings = require('../settings.json');
4 |
5 | module.exports.load = async function (app) {
6 | // Endpoint to get available themes
7 | app.get('/api/themes', (req, res) => {
8 | const themesDir = path.join(__dirname, '../themes');
9 |
10 | fs.readdir(themesDir, { withFileTypes: true }, (err, files) => {
11 | if (err) {
12 | return res.status(500).json({ error: 'Failed to read themes directory' });
13 | }
14 |
15 | const themes = files
16 | .filter(file => file.isDirectory())
17 | .map(file => file.name);
18 |
19 | res.json({ themes });
20 | });
21 | });
22 |
23 | // Endpoint to set the theme
24 | app.post('/api/themes/set', (req, res) => {
25 | const { theme } = req.body;
26 | const settingsPath = path.join(__dirname, '../settings.json');
27 |
28 | fs.readFile(settingsPath, 'utf8', (err, data) => {
29 | if (err) {
30 | return res.status(500).json({ error: 'Failed to read settings file' });
31 | }
32 |
33 | const settings = JSON.parse(data);
34 | settings.theme = theme;
35 |
36 | fs.writeFile(settingsPath, JSON.stringify(settings, null, 2), 'utf8', (err) => {
37 | if (err) {
38 | return res.status(500).json({ error: 'Failed to update settings file' });
39 | }
40 | res.json({ success: true });
41 | });
42 | });
43 | });
44 | };
--------------------------------------------------------------------------------
/themes/pluto/components/head.ejs:
--------------------------------------------------------------------------------
1 |
2 |
3 |
<%= settings.name %>
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
48 |
49 |
--------------------------------------------------------------------------------
/assets/js/codemirror.js:
--------------------------------------------------------------------------------
1 | (function($) {
2 | 'use strict';
3 | if ($('textarea[name=code-editable]').length) {
4 | var editableCodeMirror = CodeMirror.fromTextArea(document.getElementById('code-editable'), {
5 | mode: "javascript",
6 | theme: "ambiance",
7 | lineNumbers: true
8 | });
9 | }
10 | if ($('#code-readonly').length) {
11 | var readOnlyCodeMirror = CodeMirror.fromTextArea(document.getElementById('code-readonly'), {
12 | mode: "javascript",
13 | theme: "ambiance",
14 | lineNumbers: true,
15 | readOnly: "nocursor"
16 | });
17 | }
18 |
19 | //Use this method of there are multiple codes with same properties
20 | if ($('.multiple-codes').length) {
21 | var code_type = '';
22 | var editorTextarea = $('.multiple-codes');
23 | for (var i = 0; i < editorTextarea.length; i++) {
24 | $(editorTextarea[i]).attr('id', 'code-' + i);
25 | CodeMirror.fromTextArea(document.getElementById('code-' + i), {
26 | mode: "javascript",
27 | theme: "ambiance",
28 | lineNumbers: true,
29 | readOnly: "nocursor",
30 | maxHighlightLength: 0,
31 | workDelay: 0
32 | });
33 | }
34 | }
35 |
36 | //Use this method of there are multiple codes with same properties in shell mode
37 | if ($('.shell-mode').length) {
38 | var code_type = '';
39 | var shellEditor = $('.shell-mode');
40 | for (var i = 0; i < shellEditor.length; i++) {
41 | $(shellEditor[i]).attr('id', 'code-' + i);
42 | CodeMirror.fromTextArea(document.getElementById('code-' + i), {
43 | mode: "shell",
44 | theme: "ambiance",
45 | readOnly: "nocursor",
46 | maxHighlightLength: 0,
47 | workDelay: 0
48 | });
49 | }
50 | }
51 | })(jQuery);
--------------------------------------------------------------------------------
/assets/js/bootstrap-table.js:
--------------------------------------------------------------------------------
1 | (function($) {
2 | 'use strict';
3 |
4 | function monthSorter(a, b) {
5 | if (a.month < b.month) return -1;
6 | if (a.month > b.month) return 1;
7 | return 0;
8 | }
9 |
10 | function buildTable($el, cells, rows) {
11 | var i, j, row,
12 | columns = [],
13 | data = [];
14 |
15 | for (i = 0; i < cells; i++) {
16 | columns.push({
17 | field: 'field' + i,
18 | title: 'Cell' + i
19 | });
20 | }
21 | for (i = 0; i < rows; i++) {
22 | row = {};
23 | for (j = 0; j < cells; j++) {
24 | row['field' + j] = 'Row-' + i + '-' + j;
25 | }
26 | data.push(row);
27 | }
28 | $el.bootstrapTable('destroy').bootstrapTable({
29 | columns: columns,
30 | data: data
31 | });
32 | }
33 |
34 | $(function() {
35 | buildTable($('#table'), 50, 50);
36 | });
37 |
38 | function actionFormatter(value, row, index) {
39 | return [
40 | '
',
41 | ' ',
42 | ' ',
43 | '
',
44 | ' ',
45 | ' ',
46 | '
',
47 | ' ',
48 | ' '
49 | ].join('');
50 | }
51 |
52 | window.actionEvents = {
53 | 'click .like': function(e, value, row, index) {
54 | alert('You click like icon, row: ' + JSON.stringify(row));
55 | console.log(value, row, index);
56 | },
57 | 'click .edit': function(e, value, row, index) {
58 | alert('You click edit icon, row: ' + JSON.stringify(row));
59 | console.log(value, row, index);
60 | },
61 | 'click .remove': function(e, value, row, index) {
62 | alert('You click remove icon, row: ' + JSON.stringify(row));
63 | console.log(value, row, index);
64 | }
65 | };
66 | })(jQuery);
--------------------------------------------------------------------------------
/api/redeem.js:
--------------------------------------------------------------------------------
1 | const indexjs = require("../index.js");
2 | const log = require('../misc/log.js')
3 |
4 | module.exports.load = async function(app, db) {
5 | app.get("/coupon_redeem", async (req, res) => {
6 | if (!req.session.pterodactyl) return res.redirect("/login");
7 |
8 | let theme = indexjs.get(req);
9 |
10 | let code = req.query.code ? req.query.code.slice(0, 200) : Math.random().toString(36).substring(2, 15);
11 |
12 | if (!code) return res.redirect(theme.settings.redirect.missingorinvalidcouponcode + "?err=MISSINGCOUPONCODE");
13 |
14 | let couponinfo = await db.get("coupon-" + code);
15 |
16 | /*
17 | {
18 | ram: x,
19 | disk: x,
20 | cpu: x,
21 | servers: x,
22 | coins: x
23 | }
24 | */
25 |
26 | if (!couponinfo) return res.redirect(theme.settings.redirect.missingorinvalidcouponcode + "?err=INVALIDCOUPONCODE");
27 |
28 | await db.delete("coupon-" + code);
29 |
30 | let extra = await db.get("extra-" + req.session.userinfo.id) || {
31 | ram: 0,
32 | disk: 0,
33 | cpu: 0,
34 | servers: 0
35 | };
36 |
37 | // Assign values to the variables
38 | let { ram, disk, cpu, servers, coins } = couponinfo;
39 |
40 | extra.ram = Math.min(extra.ram + (ram || 0), 999999999999999);
41 | extra.disk = Math.min(extra.disk + (disk || 0), 999999999999999);
42 | extra.cpu = Math.min(extra.cpu + (cpu || 0), 999999999999999);
43 | extra.servers = Math.min(extra.servers + (servers || 0), 999999999999999);
44 |
45 | await db.set("extra-" + req.session.userinfo.id, extra);
46 |
47 | let userCoins = await db.get("coins-" + req.session.userinfo.id) || 0;
48 | userCoins = userCoins + coins;
49 | await db.set("coins-" + req.session.userinfo.id, userCoins);
50 |
51 | log(`coupon redeemed`, `${req.session.userinfo.username}#${req.session.userinfo.discriminator} redeemed the coupon code \`${code}\` which gives:\`\`\`coins: ${coins}\nMemory: ${ram} MB\nDisk: ${disk} MB\nCPU: ${cpu}%\nServers: ${servers}\`\`\``);
52 |
53 | res.redirect(theme.settings.redirect.successfullyredeemedcoupon + "?err=SUCCESSCOUPONCODE");
54 | });
55 | }
--------------------------------------------------------------------------------
/assets/js/calendar.js:
--------------------------------------------------------------------------------
1 | (function($) {
2 | 'use strict';
3 | $(function() {
4 | if ($('#calendar').length) {
5 | $('#calendar').fullCalendar({
6 | header: {
7 | left: 'prev,next today',
8 | center: 'title',
9 | right: 'month,basicWeek,basicDay'
10 | },
11 | defaultDate: '2017-07-12',
12 | navLinks: true, // can click day/week names to navigate views
13 | editable: true,
14 | eventLimit: true, // allow "more" link when too many events
15 | events: [{
16 | title: 'All Day Event',
17 | start: '2017-07-08'
18 | },
19 | {
20 | title: 'Long Event',
21 | start: '2017-07-01',
22 | end: '2017-07-07'
23 | },
24 | {
25 | id: 999,
26 | title: 'Repeating Event',
27 | start: '2017-07-09T16:00:00'
28 | },
29 | {
30 | id: 999,
31 | title: 'Repeating Event',
32 | start: '2017-07-16T16:00:00'
33 | },
34 | {
35 | title: 'Conference',
36 | start: '2017-07-11',
37 | end: '2017-07-13'
38 | },
39 | {
40 | title: 'Meeting',
41 | start: '2017-07-12T10:30:00',
42 | end: '2017-07-12T12:30:00'
43 | },
44 | {
45 | title: 'Lunch',
46 | start: '2017-07-12T12:00:00'
47 | },
48 | {
49 | title: 'Meeting',
50 | start: '2017-07-12T14:30:00'
51 | },
52 | {
53 | title: 'Happy Hour',
54 | start: '2017-07-12T17:30:00'
55 | },
56 | {
57 | title: 'Dinner',
58 | start: '2017-07-12T20:00:00'
59 | },
60 | {
61 | title: 'Birthday Party',
62 | start: '2017-07-13T07:00:00'
63 | },
64 | {
65 | title: 'Click for Google',
66 | url: 'http://google.com/',
67 | start: '2017-07-28'
68 | }
69 | ]
70 | })
71 | }
72 | });
73 | })(jQuery);
--------------------------------------------------------------------------------
/assets/js/typeahead.js:
--------------------------------------------------------------------------------
1 | (function($) {
2 | 'use strict';
3 | var substringMatcher = function(strs) {
4 | return function findMatches(q, cb) {
5 | var matches, substringRegex;
6 |
7 | // an array that will be populated with substring matches
8 | matches = [];
9 |
10 | // regex used to determine if a string contains the substring `q`
11 | var substrRegex = new RegExp(q, 'i');
12 |
13 | // iterate through the pool of strings and for any string that
14 | // contains the substring `q`, add it to the `matches` array
15 | for (var i = 0; i < strs.length; i++) {
16 | if (substrRegex.test(strs[i])) {
17 | matches.push(strs[i]);
18 | }
19 | }
20 |
21 | cb(matches);
22 | };
23 | };
24 |
25 | var states = ['Alabama', 'Alaska', 'Arizona', 'Arkansas', 'California',
26 | 'Colorado', 'Connecticut', 'Delaware', 'Florida', 'Georgia', 'Hawaii',
27 | 'Idaho', 'Illinois', 'Indiana', 'Iowa', 'Kansas', 'Kentucky', 'Louisiana',
28 | 'Maine', 'Maryland', 'Massachusetts', 'Michigan', 'Minnesota',
29 | 'Mississippi', 'Missouri', 'Montana', 'Nebraska', 'Nevada', 'New Hampshire',
30 | 'New Jersey', 'New Mexico', 'New York', 'North Carolina', 'North Dakota',
31 | 'Ohio', 'Oklahoma', 'Oregon', 'Pennsylvania', 'Rhode Island',
32 | 'South Carolina', 'South Dakota', 'Tennessee', 'Texas', 'Utah', 'Vermont',
33 | 'Virginia', 'Washington', 'West Virginia', 'Wisconsin', 'Wyoming'
34 | ];
35 |
36 | $('#the-basics .typeahead').typeahead({
37 | hint: true,
38 | highlight: true,
39 | minLength: 1
40 | }, {
41 | name: 'states',
42 | source: substringMatcher(states)
43 | });
44 | // constructs the suggestion engine
45 | var states = new Bloodhound({
46 | datumTokenizer: Bloodhound.tokenizers.whitespace,
47 | queryTokenizer: Bloodhound.tokenizers.whitespace,
48 | // `states` is an array of state names defined in "The Basics"
49 | local: states
50 | });
51 |
52 | $('#bloodhound .typeahead').typeahead({
53 | hint: true,
54 | highlight: true,
55 | minLength: 1
56 | }, {
57 | name: 'states',
58 | source: states
59 | });
60 | })(jQuery);
--------------------------------------------------------------------------------
/assets/js/desktop-notification.js:
--------------------------------------------------------------------------------
1 | (function($) {
2 | 'use strict';
3 | $.fn.easyNotify = function(options) {
4 |
5 | var settings = $.extend({
6 | title: "Notification",
7 | options: {
8 | body: "",
9 | icon: "",
10 | lang: 'pt-BR',
11 | onClose: "",
12 | onClick: "",
13 | onError: ""
14 | }
15 | }, options);
16 |
17 | this.init = function() {
18 | var notify = this;
19 | if (!("Notification" in window)) {
20 | alert("This browser does not support desktop notification");
21 | } else if (Notification.permission === "granted") {
22 |
23 | var notification = new Notification(settings.title, settings.options);
24 |
25 | notification.onclose = function() {
26 | if (typeof settings.options.onClose === 'function') {
27 | settings.options.onClose();
28 | }
29 | };
30 |
31 | notification.onclick = function() {
32 | if (typeof settings.options.onClick === 'function') {
33 | settings.options.onClick();
34 | }
35 | };
36 |
37 | notification.onerror = function() {
38 | if (typeof settings.options.onError === 'function') {
39 | settings.options.onError();
40 | }
41 | };
42 |
43 | } else if (Notification.permission !== 'denied') {
44 | Notification.requestPermission(function(permission) {
45 | if (permission === "granted") {
46 | notify.init();
47 | }
48 |
49 | });
50 | }
51 |
52 | };
53 |
54 | this.init();
55 | return this;
56 | };
57 |
58 |
59 | //Initialise notification
60 | var myFunction = function() {
61 | alert('Click function');
62 | };
63 | var myImg = "https://unsplash.it/600/600?image=777";
64 |
65 | $("form").submit(function(event) {
66 | event.preventDefault();
67 |
68 | var options = {
69 | title: $("#title").val(),
70 | options: {
71 | body: $("#message").val(),
72 | icon: myImg,
73 | lang: 'en-US',
74 | onClick: myFunction
75 | }
76 | };
77 | console.log(options);
78 | $("#easyNotify").easyNotify(options);
79 | });
80 | }(jQuery));
--------------------------------------------------------------------------------
/assets/js/sparkline.js:
--------------------------------------------------------------------------------
1 | (function($) {
2 | 'use strict';
3 | if ($("#sparkline-line-chart").length) {
4 | $("#sparkline-line-chart").sparkline([5, 6, 7, 9, 9, 5, 3, 2, 2, 4, 6, 7], {
5 | type: 'line',
6 | width: '100%',
7 | height: '100%'
8 | });
9 | }
10 |
11 | if ($("#sparkline-bar-chart").length) {
12 | $("#sparkline-bar-chart").sparkline([5, 6, 7, 2, 0, -4, 4], {
13 | type: 'bar',
14 | height: '100%',
15 | barWidth: '58.5%',
16 | barColor: '#58D8A3',
17 | negBarColor: '#e56e72',
18 | zeroColor: 'green'
19 | });
20 | }
21 |
22 | if ($("#sparkline-pie-chart").length) {
23 | $("#sparkline-pie-chart").sparkline([1, 1, 2, 4], {
24 | type: 'pie',
25 | sliceColors: ['#0CB5F9', '#58d8a3', '#F4767B', '#F9B65F'],
26 | borderColor: '#',
27 | width: '100%',
28 | height: '100%'
29 | });
30 | }
31 |
32 | if ($("#sparkline-bullet-chart").length) {
33 | $("#sparkline-bullet-chart").sparkline([10, 12, 12, 9, 7], {
34 | type: 'bullet',
35 | height: '238',
36 | width: '100%',
37 | });
38 | }
39 |
40 | if ($("#sparkline-composite-chart").length) {
41 | $("#sparkline-composite-chart").sparkline([5, 6, 7, 2, 0, 3, 6, 8, 1, 2, 2, 0, 3, 6], {
42 | type: 'line',
43 | width: '100%',
44 | height: '100%'
45 | });
46 | }
47 |
48 | if ($("#sparkline-composite-chart").length) {
49 | $("#sparkline-composite-chart").sparkline([5, 6, 7, 2, 0, 3, 6, 8, 1, 2, 2, 0, 3, 6], {
50 | type: 'bar',
51 | height: '150px',
52 | width: '100%',
53 | barWidth: 10,
54 | barSpacing: 5,
55 | barColor: '#60a76d',
56 | negBarColor: '#60a76d',
57 | composite: true
58 | });
59 | }
60 |
61 | if ($(".demo-sparkline").length) {
62 | $(".demo-sparkline").sparkline('html', {
63 | enableTagOptions: true,
64 | width: '100%',
65 | height: '30px',
66 | fillColor: false
67 | });
68 | }
69 |
70 | if ($(".top-seelling-dashboard-chart").length) {
71 | $(".top-seelling-dashboard-chart").sparkline('html', {
72 | enableTagOptions: true,
73 | width: '100%',
74 | barWidth: 30,
75 | fillColor: false
76 | });
77 | }
78 |
79 | })(jQuery);
--------------------------------------------------------------------------------
/themes/pluto/alerts/alt.ejs:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | <%- include('./components/head') %>
5 |
6 |
7 |
8 |
11 |
12 |
41 |
42 | <%- include('./components/scripts') %>
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
--------------------------------------------------------------------------------
/api/extras.js:
--------------------------------------------------------------------------------
1 | const settings = require("../settings.json");
2 | const fs = require('fs');
3 | const fetch = require('node-fetch');
4 | const getPteroUser = require('../misc/getPteroUser.js')
5 |
6 | module.exports.load = async function(app, db) {
7 | app.get("/panel", async (req, res) => {
8 | res.redirect(settings.pterodactyl.domain);
9 | });
10 |
11 | app.get("/updateinfo", async (req, res) => {
12 | if (!req.session.pterodactyl) return res.redirect("/login");
13 | const cacheaccount = await getPteroUser(req.session.userinfo.id, db)
14 | .catch(() => {
15 | return res.send("An error has occured while attempting to update your account information and server list.");
16 | })
17 | if (!cacheaccount) return
18 | req.session.pterodactyl = cacheaccount.attributes;
19 | if (req.query.redirect) if (typeof req.query.redirect == "string") return res.redirect("/" + req.query.redirect);
20 | res.redirect("/settings");
21 | });
22 |
23 | app.get("/regen", async (req, res) => {
24 | if (!req.session.pterodactyl) return res.redirect("/login");
25 |
26 | let newsettings = JSON.parse(fs.readFileSync("./settings.json"));
27 |
28 | if (newsettings.api.client.allow.regen !== true) return res.send("You cannot regenerate your password currently.");
29 |
30 | let newpassword = makeid(newsettings.api.client.passwordgenerator["length"]);
31 | req.session.password = newpassword;
32 |
33 | await fetch(
34 | settings.pterodactyl.domain + "/api/application/users/" + req.session.pterodactyl.id,
35 | {
36 | method: "patch",
37 | headers: {
38 | 'Content-Type': 'application/json',
39 | "Authorization": `Bearer ${settings.pterodactyl.key}`
40 | },
41 | body: JSON.stringify({
42 | username: req.session.pterodactyl.username,
43 | email: req.session.pterodactyl.email,
44 | first_name: req.session.pterodactyl.first_name,
45 | last_name: req.session.pterodactyl.last_name,
46 | password: newpassword
47 | })
48 | }
49 | );
50 | res.redirect("/settings")
51 | });
52 | };
53 |
54 | function makeid(length) {
55 | const characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
56 | const charactersLength = characters.length;
57 | let result = Array.from({ length }, () => characters.charAt(Math.floor(Math.random() * charactersLength))).join('');
58 | return result;
59 | }
--------------------------------------------------------------------------------
/themes/pluto/components/topnav copy.ejs:
--------------------------------------------------------------------------------
1 |
2 |
5 |
47 |
48 |
--------------------------------------------------------------------------------
/assets/js/toastDemo.js:
--------------------------------------------------------------------------------
1 | (function($) {
2 | showSuccessToast = function() {
3 | 'use strict';
4 | resetToastPosition();
5 | $.toast({
6 | heading: 'Success',
7 | text: 'And these were just the basic demos! Scroll down to check further details on how to customize the output.',
8 | showHideTransition: 'slide',
9 | icon: 'success',
10 | loaderBg: '#f96868',
11 | position: 'top-right'
12 | })
13 | };
14 | showInfoToast = function() {
15 | 'use strict';
16 | resetToastPosition();
17 | $.toast({
18 | heading: 'Info',
19 | text: 'And these were just the basic demos! Scroll down to check further details on how to customize the output.',
20 | showHideTransition: 'slide',
21 | icon: 'info',
22 | loaderBg: '#46c35f',
23 | position: 'top-right'
24 | })
25 | };
26 | showWarningToast = function() {
27 | 'use strict';
28 | resetToastPosition();
29 | $.toast({
30 | heading: 'Warning',
31 | text: 'And these were just the basic demos! Scroll down to check further details on how to customize the output.',
32 | showHideTransition: 'slide',
33 | icon: 'warning',
34 | loaderBg: '#57c7d4',
35 | position: 'top-right'
36 | })
37 | };
38 | showDangerToast = function() {
39 | 'use strict';
40 | resetToastPosition();
41 | $.toast({
42 | heading: 'Danger',
43 | text: 'And these were just the basic demos! Scroll down to check further details on how to customize the output.',
44 | showHideTransition: 'slide',
45 | icon: 'error',
46 | loaderBg: '#f2a654',
47 | position: 'top-right'
48 | })
49 | };
50 | showToastPosition = function(position) {
51 | 'use strict';
52 | resetToastPosition();
53 | $.toast({
54 | heading: 'Positioning',
55 | text: 'Specify the custom position object or use one of the predefined ones',
56 | position: String(position),
57 | icon: 'info',
58 | stack: false,
59 | loaderBg: '#f96868'
60 | })
61 | }
62 | showToastInCustomPosition = function() {
63 | 'use strict';
64 | resetToastPosition();
65 | $.toast({
66 | heading: 'Custom positioning',
67 | text: 'Specify the custom position object or use one of the predefined ones',
68 | icon: 'info',
69 | position: {
70 | left: 120,
71 | top: 120
72 | },
73 | stack: false,
74 | loaderBg: '#f96868'
75 | })
76 | }
77 | resetToastPosition = function() {
78 | $('.jq-toast-wrap').removeClass('bottom-left bottom-right top-left top-right mid-center'); // to remove previous position class
79 | $(".jq-toast-wrap").css({
80 | "top": "",
81 | "left": "",
82 | "bottom": "",
83 | "right": ""
84 | }); //to remove previous position style
85 | }
86 | })(jQuery);
--------------------------------------------------------------------------------
/themes/pluto/components/topnav.ejs:
--------------------------------------------------------------------------------
1 |
8 |
9 |
10 |
11 |
12 |
13 | <%= Math.floor(coins * 100) / 100 %> QAX
14 |
15 |
16 |
17 | tha_yt
18 |
19 |
20 |
21 |
22 |
34 |
35 |
--------------------------------------------------------------------------------
/assets/js/alerts.js:
--------------------------------------------------------------------------------
1 | (function($) {
2 | showSwal = function(type) {
3 | 'use strict';
4 | if (type === 'basic') {
5 | swal({
6 | text: 'Any fool can use a computer',
7 | button: {
8 | text: "OK",
9 | value: true,
10 | visible: true,
11 | className: "btn btn-primary"
12 | }
13 | })
14 |
15 | } else if (type === 'title-and-text') {
16 | swal({
17 | title: 'Read the alert!',
18 | text: 'Click OK to close this alert',
19 | button: {
20 | text: "OK",
21 | value: true,
22 | visible: true,
23 | className: "btn btn-primary"
24 | }
25 | })
26 |
27 | } else if (type === 'success-message') {
28 | swal({
29 | title: 'Congratulations!',
30 | text: 'You entered the correct answer',
31 | icon: 'success',
32 | button: {
33 | text: "Continue",
34 | value: true,
35 | visible: true,
36 | className: "btn btn-primary"
37 | }
38 | })
39 |
40 | } else if (type === 'auto-close') {
41 | swal({
42 | title: 'Auto close alert!',
43 | text: 'I will close in 2 seconds.',
44 | timer: 2000,
45 | button: false
46 | }).then(
47 | function() {},
48 | // handling the promise rejection
49 | function(dismiss) {
50 | if (dismiss === 'timer') {
51 | console.log('I was closed by the timer')
52 | }
53 | }
54 | )
55 | } else if (type === 'warning-message-and-cancel') {
56 | swal({
57 | title: 'Are you sure?',
58 | text: "You won't be able to revert this!",
59 | icon: 'warning',
60 | showCancelButton: true,
61 | confirmButtonColor: '#3f51b5',
62 | cancelButtonColor: '#ff4081',
63 | confirmButtonText: 'Great ',
64 | buttons: {
65 | cancel: {
66 | text: "Cancel",
67 | value: null,
68 | visible: true,
69 | className: "btn btn-danger",
70 | closeModal: true,
71 | },
72 | confirm: {
73 | text: "OK",
74 | value: true,
75 | visible: true,
76 | className: "btn btn-primary",
77 | closeModal: true
78 | }
79 | }
80 | })
81 |
82 | } else if (type === 'custom-html') {
83 | swal({
84 | content: {
85 | element: "input",
86 | attributes: {
87 | placeholder: "Type your password",
88 | type: "password",
89 | class: 'form-control'
90 | },
91 | },
92 | button: {
93 | text: "OK",
94 | value: true,
95 | visible: true,
96 | className: "btn btn-primary"
97 | }
98 | })
99 | }
100 | }
101 |
102 | })(jQuery);
--------------------------------------------------------------------------------
/assets/js/owl-carousel.js:
--------------------------------------------------------------------------------
1 | (function($) {
2 | 'use strict';
3 | $.fn.andSelf = function() {
4 | return this.addBack.apply(this, arguments);
5 | }
6 |
7 | if ($('.example-1').length) {
8 | $('.example-1').owlCarousel({
9 | loop: true,
10 | margin: 10,
11 | nav: true,
12 | autoplay: true,
13 | autoplayTimeout: 4500,
14 | responsive: {
15 | 0: {
16 | items: 1
17 | },
18 | 600: {
19 | items: 3
20 | },
21 | 1000: {
22 | items: 5
23 | }
24 | }
25 | });
26 | }
27 |
28 | if ($('.full-width').length) {
29 | $('.full-width').owlCarousel({
30 | loop: true,
31 | margin: 10,
32 | items: 1,
33 | nav: true,
34 | autoplay: true,
35 | autoplayTimeout: 5500,
36 | navText: ["
", "
"]
37 | });
38 | }
39 |
40 | if ($('.loop').length) {
41 | $('.loop').owlCarousel({
42 | center: true,
43 | items: 2,
44 | loop: true,
45 | margin: 10,
46 | autoplay: true,
47 | autoplayTimeout: 8500,
48 | responsive: {
49 | 600: {
50 | items: 4
51 | }
52 | }
53 | });
54 | }
55 |
56 | if ($('.nonloop').length) {
57 | $('.nonloop').owlCarousel({
58 | items: 5,
59 | loop: false,
60 | margin: 10,
61 | autoplay: true,
62 | autoplayTimeout: 6000,
63 | responsive: {
64 | 600: {
65 | items: 4
66 | }
67 | }
68 | });
69 | }
70 |
71 | if ($('.auto-width').length) {
72 | $('.auto-width').owlCarousel({
73 | items: 2,
74 | margin: 10,
75 | loop: true,
76 | autoplay: true,
77 | autoplayTimeout: 3500,
78 | autoWidth: true,
79 | });
80 | }
81 |
82 | if ($('.lazy-load').length) {
83 | $('.lazy-load').owlCarousel({
84 | items: 4,
85 | lazyLoad: true,
86 | loop: true,
87 | margin: 10,
88 | auto: true,
89 | autoplay: true,
90 | autoplayTimeout: 2500,
91 | });
92 | }
93 |
94 | if ($('.rtl-carousel').length) {
95 | $('.rtl-carousel').owlCarousel({
96 | rtl: true,
97 | loop: true,
98 | margin: 10,
99 | autoplay: true,
100 | autoplayTimeout: 3000,
101 | responsive: {
102 | 0: {
103 | items: 1
104 | },
105 | 600: {
106 | items: 3
107 | },
108 | 1000: {
109 | items: 5
110 | }
111 | }
112 | });
113 | }
114 |
115 | if ($('.video-carousel').length) {
116 | $('.video-carousel').owlCarousel({
117 | loop: false,
118 | margin: 10,
119 | video: true,
120 | lazyLoad: true,
121 | autoplay: true,
122 | autoplayTimeout: 7000,
123 | responsive: {
124 | 480: {
125 | items: 4
126 | },
127 | 600: {
128 | items: 4
129 | }
130 | }
131 | });
132 | }
133 |
134 | })(jQuery);
--------------------------------------------------------------------------------
/assets/vendors/css/vendor.bundle.base.css:
--------------------------------------------------------------------------------
1 | /*
2 | * Container style
3 | */
4 | .ps {
5 | overflow: hidden !important;
6 | overflow-anchor: none;
7 | -ms-overflow-style: none;
8 | touch-action: auto;
9 | -ms-touch-action: auto;
10 | }
11 |
12 | /*
13 | * Scrollbar rail styles
14 | */
15 | .ps__rail-x {
16 | display: none;
17 | opacity: 0;
18 | transition: background-color .2s linear, opacity .2s linear;
19 | -webkit-transition: background-color .2s linear, opacity .2s linear;
20 | height: 15px;
21 | /* there must be 'bottom' or 'top' for ps__rail-x */
22 | bottom: 0px;
23 | /* please don't change 'position' */
24 | position: absolute;
25 | }
26 |
27 | .ps__rail-y {
28 | display: none;
29 | opacity: 0;
30 | transition: background-color .2s linear, opacity .2s linear;
31 | -webkit-transition: background-color .2s linear, opacity .2s linear;
32 | width: 15px;
33 | /* there must be 'right' or 'left' for ps__rail-y */
34 | right: 0;
35 | /* please don't change 'position' */
36 | position: absolute;
37 | }
38 |
39 | .ps--active-x > .ps__rail-x,
40 | .ps--active-y > .ps__rail-y {
41 | display: block;
42 | background-color: transparent;
43 | }
44 |
45 | .ps:hover > .ps__rail-x,
46 | .ps:hover > .ps__rail-y,
47 | .ps--focus > .ps__rail-x,
48 | .ps--focus > .ps__rail-y,
49 | .ps--scrolling-x > .ps__rail-x,
50 | .ps--scrolling-y > .ps__rail-y {
51 | opacity: 0.6;
52 | }
53 |
54 | .ps .ps__rail-x:hover,
55 | .ps .ps__rail-y:hover,
56 | .ps .ps__rail-x:focus,
57 | .ps .ps__rail-y:focus,
58 | .ps .ps__rail-x.ps--clicking,
59 | .ps .ps__rail-y.ps--clicking {
60 | background-color: #eee;
61 | opacity: 0.9;
62 | }
63 |
64 | /*
65 | * Scrollbar thumb styles
66 | */
67 | .ps__thumb-x {
68 | background-color: #aaa;
69 | border-radius: 6px;
70 | transition: background-color .2s linear, height .2s ease-in-out;
71 | -webkit-transition: background-color .2s linear, height .2s ease-in-out;
72 | height: 6px;
73 | /* there must be 'bottom' for ps__thumb-x */
74 | bottom: 2px;
75 | /* please don't change 'position' */
76 | position: absolute;
77 | }
78 |
79 | .ps__thumb-y {
80 | background-color: #aaa;
81 | border-radius: 6px;
82 | transition: background-color .2s linear, width .2s ease-in-out;
83 | -webkit-transition: background-color .2s linear, width .2s ease-in-out;
84 | width: 6px;
85 | /* there must be 'right' for ps__thumb-y */
86 | right: 2px;
87 | /* please don't change 'position' */
88 | position: absolute;
89 | }
90 |
91 | .ps__rail-x:hover > .ps__thumb-x,
92 | .ps__rail-x:focus > .ps__thumb-x,
93 | .ps__rail-x.ps--clicking .ps__thumb-x {
94 | background-color: #999;
95 | height: 11px;
96 | }
97 |
98 | .ps__rail-y:hover > .ps__thumb-y,
99 | .ps__rail-y:focus > .ps__thumb-y,
100 | .ps__rail-y.ps--clicking .ps__thumb-y {
101 | background-color: #999;
102 | width: 11px;
103 | }
104 |
105 | /* MS supports */
106 | @supports (-ms-overflow-style: none) {
107 | .ps {
108 | overflow: auto !important;
109 | }
110 | }
111 |
112 | @media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) {
113 | .ps {
114 | overflow: auto !important;
115 | }
116 | }
117 |
--------------------------------------------------------------------------------
/api/purger.js:
--------------------------------------------------------------------------------
1 | const fetch = require("node-fetch");
2 | const settings = require("../settings.json");
3 |
4 | module.exports.load = async function (app, db) {
5 | app.post("/api/purge", async (req, res) => {
6 | if (!req.session.pterodactyl) return res.redirect("/login");
7 |
8 | const keyword = req.body.keyword; // Get keyword from request body
9 |
10 | try {
11 | const cacheaccount = await fetch(
12 | `${settings.pterodactyl.domain}/api/application/users/${req.session.pterodactyl.id}?include=servers`,
13 | {
14 | method: "get",
15 | headers: {
16 | "Content-Type": "application/json",
17 | Authorization: `Bearer ${settings.pterodactyl.key}`,
18 | },
19 | }
20 | );
21 |
22 | if (cacheaccount.statusText === "Not Found") {
23 | return res.json({ success: false, message: alerts.INVALIDUSER });
24 | }
25 |
26 | const cacheaccountinfo = await cacheaccount.json();
27 | req.session.pterodactyl = cacheaccountinfo.attributes;
28 |
29 | if (!cacheaccountinfo.attributes.root_admin) {
30 | return res.json({ success: false, message: alerts.NOTANADMIN });
31 | }
32 |
33 | const response = await fetch(`${settings.pterodactyl.domain}/api/application/servers`, {
34 | headers: {
35 | Authorization: `Bearer ${settings.pterodactyl.key}`,
36 | "Content-Type": "application/json",
37 | Accept: "application/json",
38 | },
39 | });
40 |
41 | if (!response.ok) {
42 | throw new Error(`Failed to get server list: ${response.status} ${response.statusText}`);
43 | }
44 |
45 | const data = await response.json();
46 | const servers = data.data;
47 |
48 | // Filter servers that do not include the specified keyword
49 | const serversToDelete = servers.filter(
50 | (server) => !server.attributes.name.includes(keyword)
51 | );
52 |
53 | for (const server of serversToDelete) {
54 | try {
55 | const serverId = server.attributes.id;
56 | const serverName = server.attributes.name;
57 |
58 | const deleteResponse = await fetch(
59 | `${settings.pterodactyl.domain}/api/application/servers/${serverId}`,
60 | {
61 | method: "DELETE",
62 | headers: {
63 | Authorization: `Bearer ${settings.pterodactyl.key}`,
64 | "Content-Type": "application/json",
65 | },
66 | }
67 | );
68 |
69 | if (deleteResponse.ok) {
70 | console.log(`Server ${serverName} deleted successfully.`);
71 | } else {
72 | console.error(`Failed to delete server ${serverName}: ${deleteResponse.status} ${deleteResponse.statusText}`);
73 | }
74 | } catch (error) {
75 | console.error(`Failed to delete server ${server.attributes.name}: ${error.message}`);
76 | }
77 | }
78 |
79 | console.log("Purging complete.");
80 | res.sendStatus(200);
81 | } catch (error) {
82 | console.error(`Error during purge: ${error.message}`);
83 | res.status(500).json({ success: false, message: "Server error occurred." });
84 | }
85 | });
86 | };
87 |
--------------------------------------------------------------------------------
/assets/vendors/owl-carousel-2/owl.carousel.min.css:
--------------------------------------------------------------------------------
1 | /**
2 | * Owl Carousel v2.3.4
3 | * Copyright 2013-2018 David Deutsch
4 | * Licensed under: SEE LICENSE IN https://github.com/OwlCarousel2/OwlCarousel2/blob/master/LICENSE
5 | */
6 | .owl-carousel,.owl-carousel .owl-item{-webkit-tap-highlight-color:transparent;position:relative}.owl-carousel{display:none;width:100%;z-index:1}.owl-carousel .owl-stage{position:relative;-ms-touch-action:pan-Y;touch-action:manipulation;-moz-backface-visibility:hidden}.owl-carousel .owl-stage:after{content:".";display:block;clear:both;visibility:hidden;line-height:0;height:0}.owl-carousel .owl-stage-outer{position:relative;overflow:hidden;-webkit-transform:translate3d(0,0,0)}.owl-carousel .owl-item,.owl-carousel .owl-wrapper{-webkit-backface-visibility:hidden;-moz-backface-visibility:hidden;-ms-backface-visibility:hidden;-webkit-transform:translate3d(0,0,0);-moz-transform:translate3d(0,0,0);-ms-transform:translate3d(0,0,0)}.owl-carousel .owl-item{min-height:1px;float:left;-webkit-backface-visibility:hidden;-webkit-touch-callout:none}.owl-carousel .owl-item img{display:block;width:100%}.owl-carousel .owl-dots.disabled,.owl-carousel .owl-nav.disabled{display:none}.no-js .owl-carousel,.owl-carousel.owl-loaded{display:block}.owl-carousel .owl-dot,.owl-carousel .owl-nav .owl-next,.owl-carousel .owl-nav .owl-prev{cursor:pointer;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.owl-carousel .owl-nav button.owl-next,.owl-carousel .owl-nav button.owl-prev,.owl-carousel button.owl-dot{background:0 0;color:inherit;border:none;padding:0!important;font:inherit}.owl-carousel.owl-loading{opacity:0;display:block}.owl-carousel.owl-hidden{opacity:0}.owl-carousel.owl-refresh .owl-item{visibility:hidden}.owl-carousel.owl-drag .owl-item{-ms-touch-action:pan-y;touch-action:pan-y;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.owl-carousel.owl-grab{cursor:move;cursor:grab}.owl-carousel.owl-rtl{direction:rtl}.owl-carousel.owl-rtl .owl-item{float:right}.owl-carousel .animated{animation-duration:1s;animation-fill-mode:both}.owl-carousel .owl-animated-in{z-index:0}.owl-carousel .owl-animated-out{z-index:1}.owl-carousel .fadeOut{animation-name:fadeOut}@keyframes fadeOut{0%{opacity:1}100%{opacity:0}}.owl-height{transition:height .5s ease-in-out}.owl-carousel .owl-item .owl-lazy{opacity:0;transition:opacity .4s ease}.owl-carousel .owl-item .owl-lazy:not([src]),.owl-carousel .owl-item .owl-lazy[src^=""]{max-height:0}.owl-carousel .owl-item img.owl-lazy{transform-style:preserve-3d}.owl-carousel .owl-video-wrapper{position:relative;height:100%;background:#000}.owl-carousel .owl-video-play-icon{position:absolute;height:80px;width:80px;left:50%;top:50%;margin-left:-40px;margin-top:-40px;background:url(owl.video.play.png) no-repeat;cursor:pointer;z-index:1;-webkit-backface-visibility:hidden;transition:transform .1s ease}.owl-carousel .owl-video-play-icon:hover{-ms-transform:scale(1.3,1.3);transform:scale(1.3,1.3)}.owl-carousel .owl-video-playing .owl-video-play-icon,.owl-carousel .owl-video-playing .owl-video-tn{display:none}.owl-carousel .owl-video-tn{opacity:0;height:100%;background-position:center center;background-repeat:no-repeat;background-size:contain;transition:opacity .4s ease}.owl-carousel .owl-video-frame{position:relative;z-index:1;height:100%;width:100%}
--------------------------------------------------------------------------------
/api/referral.js:
--------------------------------------------------------------------------------
1 |
2 | const settings = require("../settings.json");
3 | const indexjs = require("../index.js");
4 | const fs = require("fs");
5 | const ejs = require("ejs");
6 | const fetch = require("node-fetch");
7 | const NodeCache = require("node-cache");
8 | const log = require("../misc/log.js");
9 | const crypto = require('crypto')
10 |
11 | const myCache = new NodeCache({ deleteOnExpire: true, stdTTL: 59 });
12 |
13 | /* Ensure platform release target is met */
14 | /* Module */
15 | module.exports.load = async function (app, db) {
16 | // Create a referral code
17 | app.post("/referral/create", async (req, res) => {
18 | if (!req.session.pterodactyl) return res.redirect(`/login`);
19 |
20 | const userId = req.session.userinfo.id;
21 | const code = crypto.randomBytes(8).toString("hex");
22 | let referrals = await db.get('referrals-' + req.session.userinfo.id) || [];
23 |
24 | await db.set(`referral-code-${code}`, { creator: userId, uses: 0 });
25 | referrals.push({
26 | code: code,
27 | uses: 0
28 | })
29 |
30 | await db.set('referrals-' + req.session.userinfo.id, referrals);
31 | res.json({ code: code });
32 | });
33 |
34 | // Claim a referral code
35 | app.post("/referral/claim", async (req, res) => {
36 | if (!req.session.pterodactyl) return res.redirect(`/login`);
37 | if (!req.body.code) return res.json({ error: "No code provided" });
38 |
39 | const referralData = await db.get(`referral-code-${req.body.code}`);
40 | if (!referralData) return res.json({ error: "Invalid code" });
41 |
42 | const userId = req.session.userinfo.id;
43 |
44 | if (referralData.creator == userId) return res.json({ error: "You can't claim your own referral code" });
45 |
46 | const alreadyClaimed = await db.get(`referral-claimed-${userId}`);
47 | if (alreadyClaimed) return res.json({ error: "Already claimed a referral code" });
48 |
49 | await db.set(`referral-claimed-${userId}`, req.body.code);
50 | await db.set(`referral-code-${req.body.code}`, { ...referralData, uses: referralData.uses + 1 });
51 |
52 | const creatorCoins = await db.get(`coins-${referralData.creator}`) || 0;
53 | await db.set(`coins-${referralData.creator}`, creatorCoins + 100);
54 |
55 | const claimerCoins = await db.get(`coins-${userId}`) || 0;
56 | await db.set(`coins-${userId}`, claimerCoins + 250);
57 |
58 | res.json({ success: true });
59 | });
60 |
61 | // List user's referral codes
62 | app.get("/referral/list", async (req, res) => {
63 | if (!req.session.pterodactyl) return res.redirect(`/login`);
64 |
65 | const userId = req.session.userinfo.id;
66 | const referrals = await db.get('referrals-' + userId);
67 |
68 | res.json({ referrals });
69 | });
70 |
71 | // Get details of a specific referral code
72 | app.get("/referral/:code", async (req, res) => {
73 | if (!req.session.pterodactyl) return res.redirect(`/login`);
74 |
75 | const referralData = await db.get(`referral-code-${req.params.code}`);
76 | if (!referralData) return res.json({ error: "Invalid code" });
77 |
78 | res.json({ code: req.params.code, uses: referralData.uses, creator: referralData.creator });
79 | });
80 | };
81 |
--------------------------------------------------------------------------------
/assets/js/form-validation.js:
--------------------------------------------------------------------------------
1 | (function($) {
2 | 'use strict';
3 | $.validator.setDefaults({
4 | submitHandler: function() {
5 | alert("submitted!");
6 | }
7 | });
8 | $(function() {
9 | // validate the comment form when it is submitted
10 | $("#commentForm").validate({
11 | errorPlacement: function(label, element) {
12 | label.addClass('mt-2 text-danger');
13 | label.insertAfter(element);
14 | },
15 | highlight: function(element, errorClass) {
16 | $(element).parent().addClass('has-danger')
17 | $(element).addClass('form-control-danger')
18 | }
19 | });
20 | // validate signup form on keyup and submit
21 | $("#signupForm").validate({
22 | rules: {
23 | firstname: "required",
24 | lastname: "required",
25 | username: {
26 | required: true,
27 | minlength: 2
28 | },
29 | password: {
30 | required: true,
31 | minlength: 5
32 | },
33 | confirm_password: {
34 | required: true,
35 | minlength: 5,
36 | equalTo: "#password"
37 | },
38 | email: {
39 | required: true,
40 | email: true
41 | },
42 | topic: {
43 | required: "#newsletter:checked",
44 | minlength: 2
45 | },
46 | agree: "required"
47 | },
48 | messages: {
49 | firstname: "Please enter your firstname",
50 | lastname: "Please enter your lastname",
51 | username: {
52 | required: "Please enter a username",
53 | minlength: "Your username must consist of at least 2 characters"
54 | },
55 | password: {
56 | required: "Please provide a password",
57 | minlength: "Your password must be at least 5 characters long"
58 | },
59 | confirm_password: {
60 | required: "Please provide a password",
61 | minlength: "Your password must be at least 5 characters long",
62 | equalTo: "Please enter the same password as above"
63 | },
64 | email: "Please enter a valid email address",
65 | agree: "Please accept our policy",
66 | topic: "Please select at least 2 topics"
67 | },
68 | errorPlacement: function(label, element) {
69 | label.addClass('mt-2 text-danger');
70 | label.insertAfter(element);
71 | },
72 | highlight: function(element, errorClass) {
73 | $(element).parent().addClass('has-danger')
74 | $(element).addClass('form-control-danger')
75 | }
76 | });
77 | // propose username by combining first- and lastname
78 | $("#username").focus(function() {
79 | var firstname = $("#firstname").val();
80 | var lastname = $("#lastname").val();
81 | if (firstname && lastname && !this.value) {
82 | this.value = firstname + "." + lastname;
83 | }
84 | });
85 | //code to hide topic selection, disable for demo
86 | var newsletter = $("#newsletter");
87 | // newsletter topics are optional, hide at first
88 | var inital = newsletter.is(":checked");
89 | var topics = $("#newsletter_topics")[inital ? "removeClass" : "addClass"]("gray");
90 | var topicInputs = topics.find("input").attr("disabled", !inital);
91 | // show when newsletter is checked
92 | newsletter.on("click", function() {
93 | topics[this.checked ? "removeClass" : "addClass"]("gray");
94 | topicInputs.attr("disabled", !this.checked);
95 | });
96 | });
97 | })(jQuery);
--------------------------------------------------------------------------------
/themes/pluto/pages.json:
--------------------------------------------------------------------------------
1 | {
2 | "index": "index.ejs",
3 | "notfound": "404.ejs",
4 | "redirect": {
5 | "callback": "/dashboard",
6 | "logout": "/",
7 | "createserver": "/servers?err=CREATED",
8 | "deleteserver": "/servers",
9 | "updateservers": "/servers",
10 | "failedcreateserver": "/servers/new",
11 | "failedmodifyserver": "/servers/edit",
12 | "setplan": "/admin",
13 | "failedsetplan": "/admin",
14 | "createserverdisabled": "/servers/new?err=disabled",
15 | "modifyserverdisabled": "/servers/modify?err=disabled",
16 | "deleteserverdisabled": "/delete?err=disabled",
17 | "regenpassword": "/settings",
18 | "setresources": "/admin",
19 | "failedsetresources": "/admin",
20 | "giftresources": "/gift",
21 | "failedgiftresources": "/gift",
22 | "renewserver": "/dashboard",
23 | "setcoins": "/admin",
24 | "failedsetcoins": "/admin",
25 | "purchaseram": "/store",
26 | "failedpurchaseram": "/store",
27 | "purchasedisk": "/store",
28 | "failedpurchasedisk": "/store",
29 | "purchasecpu": "/store",
30 | "failedpurchasecpu": "/store",
31 | "purchaseservers": "/store",
32 | "failedpurchaseservers": "/store",
33 | "arcioerror": "/afk",
34 | "missingorinvalidcouponcode": "/redeem",
35 | "successfullyredeemedcoupon": "/redeem",
36 | "couponcreationfailed": "/admin",
37 | "couponcreationsuccess": "/admin",
38 | "couponrevokefailed": "/admin",
39 | "couponrevokesuccess": "/admin",
40 | "removeaccountfailed": "/admin",
41 | "removeaccountsuccess": "/admin"
42 | },
43 | "pages": {
44 | "advent": "advent.ejs",
45 | "referrals": "referrals.ejs",
46 | "staking": "staking.ejs",
47 | "wallet": "wallet.ejs",
48 | "dashboard": "dashboard.ejs",
49 | "servers/new": "create.ejs",
50 | "servers/edit": "edit.ejs",
51 | "admin": "admin.ejs",
52 | "admin/plans": "admin-plans.ejs",
53 | "admin/resources": "admin-resources.ejs",
54 | "admin/coupons": "admin-coupons.ejs",
55 | "admin/coins": "admin-coins.ejs",
56 | "redeem": "redeem.ejs",
57 | "settings": "settings.ejs",
58 | "gift-coins": "wallet.ejs",
59 | "gift-resources": "gift-resources.ejs",
60 | "j4r": "j4r.ejs",
61 | "buy": "buy.ejs",
62 | "afk": "afk.ejs",
63 | "store": "store.ejs",
64 | "servers": "servers.ejs",
65 | "lv": "lv.ejs"
66 | },
67 | "mustbeloggedin": [
68 | "/dashboard",
69 | "/servers/new",
70 | "/servers/edit",
71 | "/settings",
72 | "/j4r",
73 | "/gift",
74 | "/store",
75 | "/coins",
76 | "/lv"
77 | ],
78 | "mustbeadmin": [
79 | "/admin",
80 | "/admin/plans",
81 | "/admin/resources",
82 | "/admin/coupons",
83 | "/admin/coins"
84 | ],
85 | "variables": {
86 | "faviconlink": "https://cdn.discordapp.com/attachments/1063585626022223892/1065305275826966609/Screenshot_2023-01-18_162220.jpg",
87 | "home": {
88 | "note": "Name & Icon have been moved to settings.json in Heliactyl 12.5.0",
89 | "admin": "admin",
90 | "buttontext": {
91 | "loggedin": {
92 | "link": "/dashboard"
93 | },
94 | "loggedout": {
95 | "link": "/login"
96 | }
97 | }
98 | }
99 | }
100 | }
101 |
--------------------------------------------------------------------------------
/assets/js/jq.tablesort.js:
--------------------------------------------------------------------------------
1 | /*
2 | * jq.TableSort -- jQuery Table sorter Plug-in.
3 | *
4 | * Version 1.0.0.
5 | *
6 | * Copyright (c) 2017 Dmitry Zavodnikov.
7 | *
8 | * Licensed under the MIT License.
9 | */
10 | (function($) {
11 | 'use strict';
12 | var SORT = 'sort';
13 | var ASC = 'asc';
14 | var DESC = 'desc';
15 | var UNSORT = 'unsort';
16 |
17 | var config = {
18 | defaultColumn: 0,
19 | defaultOrder: 'asc',
20 | styles: {
21 | 'sort': 'sortStyle',
22 | 'asc': 'ascStyle',
23 | 'desc': 'descStyle',
24 | 'unsort': 'unsortStyle'
25 | },
26 | selector: function(tableBody, column) {
27 | var groups = [];
28 |
29 | var tableRows = $(tableBody).find('tr');
30 | for (var i = 0; i < tableRows.length; i++) {
31 | var td = $(tableRows[i]).find('td')[column];
32 |
33 | groups.push({
34 | 'values': [tableRows[i]],
35 | 'key': $(td).text()
36 | });
37 | }
38 | return groups;
39 | },
40 | comparator: function(group1, group2) {
41 | return group1.key.localeCompare(group2.key);
42 | }
43 | };
44 |
45 | function getTableHeaders(table) {
46 | return $(table).find('thead > tr > th');
47 | }
48 |
49 | function getSortableTableHeaders(table) {
50 | return getTableHeaders(table).filter(function(index) {
51 | return $(this).hasClass(config.styles[SORT]);
52 | });
53 | }
54 |
55 | function changeOrder(table, column) {
56 | var sortedHeader = getTableHeaders(table).filter(function(index) {
57 | return $(this).hasClass(config.styles[ASC]) || $(this).hasClass(config.styles[DESC]);
58 | });
59 |
60 | var sordOrder = config.defaultOrder;
61 | if (sortedHeader.hasClass(config.styles[ASC])) {
62 | sordOrder = ASC;
63 | }
64 | if (sortedHeader.hasClass(config.styles[DESC])) {
65 | sordOrder = DESC;
66 | }
67 |
68 | var th = getTableHeaders(table)[column];
69 |
70 | if (th === sortedHeader[0]) {
71 | if (sordOrder === ASC) {
72 | sordOrder = DESC;
73 | } else {
74 | sordOrder = ASC;
75 | }
76 | }
77 |
78 | var headers = getSortableTableHeaders(table);
79 | headers.removeClass(config.styles[ASC]);
80 | headers.removeClass(config.styles[DESC]);
81 | headers.addClass(config.styles[UNSORT]);
82 |
83 | $(th).removeClass(config.styles[UNSORT]);
84 | $(th).addClass(config.styles[sordOrder]);
85 |
86 | var tbody = $(table).find('tbody')[0];
87 | var groups = config.selector(tbody, column);
88 |
89 | // Sorting.
90 | groups.sort(function(a, b) {
91 | var res = config.comparator(a, b);
92 | return sordOrder === ASC ? res : -1 * res;
93 | });
94 |
95 | for (var i = 0; i < groups.length; i++) {
96 | var trList = groups[i];
97 | var trListValues = trList.values;
98 | for (var j = 0; j < trListValues.length; j++) {
99 | tbody.append(trListValues[j]);
100 | }
101 | }
102 | }
103 |
104 | $.fn.tablesort = function(userConfig) {
105 | // Create and save table sort configuration.
106 | $.extend(config, userConfig);
107 |
108 | // Process all selected tables.
109 | var selectedTables = this;
110 | for (var i = 0; i < selectedTables.length; i++) {
111 | var table = selectedTables[i];
112 | var tableHeader = getSortableTableHeaders(table);
113 | for (var j = 0; j < tableHeader.length; j++) {
114 | var th = tableHeader[j];
115 | $(th).on("click", function(event) {
116 | var clickColumn = $.inArray(event.currentTarget, getTableHeaders(table));
117 | changeOrder(table, clickColumn);
118 | });
119 | }
120 | }
121 | return this;
122 | };
123 | })(jQuery);
--------------------------------------------------------------------------------
/themes/pluto/redeem.ejs:
--------------------------------------------------------------------------------
1 |
2 |
3 | <%- include('./components/head') %>
4 |
5 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
--------------------------------------------------------------------------------
/assets/js/settings.js:
--------------------------------------------------------------------------------
1 | (function($) {
2 | 'use strict';
3 | $(function() {
4 | $(".nav-settings").click(function() {
5 | $("#right-sidebar").toggleClass("open");
6 | });
7 | $(".settings-close").click(function() {
8 | $("#right-sidebar,#theme-settings").removeClass("open");
9 | });
10 |
11 | $("#settings-trigger").on("click", function() {
12 | $("#theme-settings").toggleClass("open");
13 | });
14 |
15 |
16 | //background constants
17 | var navbar_classes = "navbar-danger navbar-success navbar-warning navbar-dark navbar-light navbar-primary navbar-info navbar-pink";
18 | var sidebar_classes = "sidebar-light sidebar-dark";
19 | var $body = $("body");
20 |
21 | //sidebar backgrounds
22 | $("#sidebar-default-theme").on("click", function() {
23 | $body.removeClass(sidebar_classes);
24 | $(".sidebar-bg-options").removeClass("selected");
25 | $(this).addClass("selected");
26 | });
27 | $("#sidebar-dark-theme").on("click", function() {
28 | $body.removeClass(sidebar_classes);
29 | $body.addClass("sidebar-dark");
30 | $(".sidebar-bg-options").removeClass("selected");
31 | $(this).addClass("selected");
32 | });
33 |
34 |
35 | //Navbar Backgrounds
36 | $(".tiles.primary").on("click", function() {
37 | $(".navbar").removeClass(navbar_classes);
38 | $(".navbar").addClass("navbar-primary");
39 | $(".tiles").removeClass("selected");
40 | $(this).addClass("selected");
41 | });
42 | $(".tiles.success").on("click", function() {
43 | $(".navbar").removeClass(navbar_classes);
44 | $(".navbar").addClass("navbar-success");
45 | $(".tiles").removeClass("selected");
46 | $(this).addClass("selected");
47 | });
48 | $(".tiles.warning").on("click", function() {
49 | $(".navbar").removeClass(navbar_classes);
50 | $(".navbar").addClass("navbar-warning");
51 | $(".tiles").removeClass("selected");
52 | $(this).addClass("selected");
53 | });
54 | $(".tiles.danger").on("click", function() {
55 | $(".navbar").removeClass(navbar_classes);
56 | $(".navbar").addClass("navbar-danger");
57 | $(".tiles").removeClass("selected");
58 | $(this).addClass("selected");
59 | });
60 | $(".tiles.info").on("click", function() {
61 | $(".navbar").removeClass(navbar_classes);
62 | $(".navbar").addClass("navbar-info");
63 | $(".tiles").removeClass("selected");
64 | $(this).addClass("selected");
65 | });
66 | $(".tiles.dark").on("click", function() {
67 | $(".navbar").removeClass(navbar_classes);
68 | $(".navbar").addClass("navbar-dark");
69 | $(".tiles").removeClass("selected");
70 | $(this).addClass("selected");
71 | });
72 | $(".tiles.default").on("click", function() {
73 | $(".navbar").removeClass(navbar_classes);
74 | $(".tiles").removeClass("selected");
75 | $(this).addClass("selected");
76 | });
77 |
78 | //Horizontal menu in mobile
79 | $('[data-toggle="horizontal-menu-toggle"]').on("click", function() {
80 | $(".horizontal-menu .bottom-navbar").toggleClass("header-toggled");
81 | });
82 | // Horizontal menu navigation in mobile menu on click
83 | var navItemClicked = $('.horizontal-menu .page-navigation >.nav-item');
84 | navItemClicked.on("click", function(event) {
85 | if(window.matchMedia('(max-width: 991px)').matches) {
86 | if(!($(this).hasClass('show-submenu'))) {
87 | navItemClicked.removeClass('show-submenu');
88 | }
89 | $(this).toggleClass('show-submenu');
90 | }
91 | });
92 |
93 | $(window).scroll(function() {
94 | if(window.matchMedia('(min-width: 992px)').matches) {
95 | var header = $('.horizontal-menu');
96 | if ($(window).scrollTop() >= 71) {
97 | $(header).addClass('fixed-on-scroll');
98 | } else {
99 | $(header).removeClass('fixed-on-scroll');
100 | }
101 | }
102 | });
103 |
104 | });
105 | })(jQuery);
--------------------------------------------------------------------------------
/api/pages.js:
--------------------------------------------------------------------------------
1 | const settings = require("../settings.json");
2 | const indexjs = require("../index.js");
3 |
4 | const ejs = require("ejs");
5 | const express = require("express");
6 | const fetch = require('node-fetch');
7 |
8 | module.exports.load = async function(app, db) {
9 | app.all("/", async (req, res) => {
10 | if (req.session.pterodactyl) if (req.session.pterodactyl.id !== await db.get("users-" + req.session.userinfo.id)) return res.redirect("/login?prompt=none")
11 | let theme = indexjs.get(req);
12 | if (theme.settings.mustbeloggedin.includes(req._parsedUrl.pathname)) if (!req.session.userinfo || !req.session.pterodactyl) return res.redirect("/login");
13 | if (theme.settings.mustbeadmin.includes(req._parsedUrl.pathname)) {
14 | ejs.renderFile(
15 | `./themes/${theme.name}/${theme.settings.notfound}`,
16 | await eval(indexjs.renderdataeval),
17 | null,
18 | async function (err, str) {
19 | delete req.session.newaccount;
20 | if (!req.session.userinfo || !req.session.pterodactyl) {
21 | if (err) {
22 | console.log(`[WEBSITE] An error has occured on path ${req._parsedUrl.pathname}:`);
23 | console.log(err);
24 | return res.send("An error has occured while attempting to load this page. Please contact an administrator to fix this.");
25 | };
26 | return res.send(str);
27 | };
28 |
29 | let cacheaccount = await fetch(
30 | settings.pterodactyl.domain + "/api/application/users/" + (await db.get("users-" + req.session.userinfo.id)) + "?include=servers",
31 | {
32 | method: "get",
33 | headers: { 'Content-Type': 'application/json', "Authorization": `Bearer ${settings.pterodactyl.key}` }
34 | }
35 | );
36 | if (await cacheaccount.statusText == "Not Found") {
37 | if (err) {
38 | console.log(`[WEBSITE] An error has occured on path ${req._parsedUrl.pathname}:`);
39 | console.log(err);
40 | return res.send("An error has occured while attempting to load this page. Please contact an administrator to fix this.");
41 | };
42 | return res.send(str);
43 | };
44 | let cacheaccountinfo = JSON.parse(await cacheaccount.text());
45 |
46 | req.session.pterodactyl = cacheaccountinfo.attributes;
47 | if (cacheaccountinfo.attributes.root_admin !== true) {
48 | if (err) {
49 | console.log(`[WEBSITE] An error has occured on path ${req._parsedUrl.pathname}:`);
50 | console.log(err);
51 | return res.send("An error has occured while attempting to load this page. Please contact an administrator to fix this.");
52 | };
53 | return res.send(str);
54 | };
55 |
56 | ejs.renderFile(
57 | `./themes/${theme.name}/${theme.settings.index}`,
58 | await eval(indexjs.renderdataeval),
59 | null,
60 | function (err, str) {
61 | if (err) {
62 | console.log(`[WEBSITE] An error has occured on path ${req._parsedUrl.pathname}:`);
63 | console.log(err);
64 | return res.send("An error has occured while attempting to load this page. Please contact an administrator to fix this.");
65 | };
66 | delete req.session.newaccount;
67 | res.send(str);
68 | });
69 | });
70 | return;
71 | };
72 | ejs.renderFile(
73 | `./themes/${theme.name}/${theme.settings.index}`,
74 | await eval(indexjs.renderdataeval),
75 | null,
76 | function (err, str) {
77 | if (err) {
78 | console.log(`[WEBSITE] An error has occured on path ${req._parsedUrl.pathname}:`);
79 | console.log(err);
80 | return res.send("An error has occured while attempting to load this page. Please contact an administrator to fix this.");
81 | };
82 | delete req.session.newaccount;
83 | res.send(str);
84 | });
85 | });
86 |
87 | app.use('/assets', express.static('./assets'));
88 | };
89 |
--------------------------------------------------------------------------------
/themes/pluto/alerts/vpn.ejs:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
<%= extra.home.name %>
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
36 |
37 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
--------------------------------------------------------------------------------
/assets/js/codeEditor.js:
--------------------------------------------------------------------------------
1 | (function($) {
2 | 'use strict';
3 | if ($('textarea[name=code-editable]').length) {
4 | var editableCodeMirror = CodeMirror.fromTextArea(document.getElementById('code-editable'), {
5 | mode: "javascript",
6 | theme: "ambiance",
7 | lineNumbers: true
8 | });
9 | }
10 | if ($('#code-readonly').length) {
11 | var readOnlyCodeMirror = CodeMirror.fromTextArea(document.getElementById('code-readonly'), {
12 | mode: "javascript",
13 | theme: "ambiance",
14 | lineNumbers: true,
15 | readOnly: "nocursor"
16 | });
17 | }
18 | if ($('#cm-js-mode').length) {
19 | var cm = CodeMirror(document.getElementById("cm-js-mode"), {
20 | mode: "javascript",
21 | lineNumbers: true
22 | });
23 | }
24 |
25 | //Use this method of there are multiple codes with same properties
26 | if ($('.multiple-codes').length) {
27 | var code_type = '';
28 | var editorTextarea = $('.multiple-codes');
29 | for (var i = 0; i < editorTextarea.length; i++) {
30 | $(editorTextarea[i]).attr('id', 'code-' + i);
31 | CodeMirror.fromTextArea(document.getElementById('code-' + i), {
32 | mode: "javascript",
33 | theme: "ambiance",
34 | lineNumbers: true,
35 | readOnly: true,
36 | maxHighlightLength: 0,
37 | workDelay: 0
38 | });
39 | }
40 | }
41 |
42 | //Use this method of there are multiple codes with same properties in shell mode
43 | if ($('.shell-mode').length) {
44 | var code_type = '';
45 | var shellEditor = $('.shell-mode');
46 | for (var i = 0; i < shellEditor.length; i++) {
47 | $(shellEditor[i]).attr('id', 'code-' + i);
48 | CodeMirror.fromTextArea(document.getElementById('code-' + i), {
49 | mode: "shell",
50 | theme: "ambiance",
51 | readOnly: true,
52 | maxHighlightLength: 0,
53 | workDelay: 0
54 | });
55 | }
56 | }
57 | if ($('#ace_html').length) {
58 | $(function() {
59 | var editor = ace.edit("ace_html");
60 | editor.setTheme("ace/theme/monokai");
61 | editor.getSession().setMode("ace/mode/html");
62 | document.getElementById('ace_html');
63 | });
64 | }
65 | if ($('#ace_javaScript').length) {
66 | $(function() {
67 | var editor = ace.edit("ace_javaScript");
68 | editor.setTheme("ace/theme/monokai");
69 | editor.getSession().setMode("ace/mode/javascript");
70 | document.getElementById('aceExample');
71 | });
72 | }
73 | if ($('#ace_json').length) {
74 | $(function() {
75 | var editor = ace.edit("ace_json");
76 | editor.setTheme("ace/theme/monokai");
77 | editor.getSession().setMode("ace/mode/json");
78 | document.getElementById('ace_json');
79 | });
80 | }
81 | if ($('#ace_css').length) {
82 | $(function() {
83 | var editor = ace.edit("ace_css");
84 | editor.setTheme("ace/theme/monokai");
85 | editor.getSession().setMode("ace/mode/css");
86 | document.getElementById('ace_css');
87 | });
88 | }
89 | if ($('#ace_scss').length) {
90 | $(function() {
91 | var editor = ace.edit("ace_scss");
92 | editor.setTheme("ace/theme/monokai");
93 | editor.getSession().setMode("ace/mode/scss");
94 | document.getElementById('ace_scss');
95 | });
96 | }
97 | if ($('#ace_php').length) {
98 | $(function() {
99 | var editor = ace.edit("ace_php");
100 | editor.setTheme("ace/theme/monokai");
101 | editor.getSession().setMode("ace/mode/php");
102 | document.getElementById('ace_php');
103 | });
104 | }
105 | if ($('#ace_ruby').length) {
106 | $(function() {
107 | var editor = ace.edit("ace_ruby");
108 | editor.setTheme("ace/theme/monokai");
109 | editor.getSession().setMode("ace/mode/ruby");
110 | document.getElementById('ace_ruby');
111 | });
112 | }
113 | if ($('#ace_coffee').length) {
114 | $(function() {
115 | var editor = ace.edit("ace_coffee");
116 | editor.setTheme("ace/theme/monokai");
117 | editor.getSession().setMode("ace/mode/coffee");
118 | document.getElementById('ace_coffee');
119 | });
120 | }
121 | })(jQuery);
--------------------------------------------------------------------------------
/assets/js/ion-range-slider.js:
--------------------------------------------------------------------------------
1 | (function($) {
2 | 'use strict';
3 |
4 | if ($('#range_01').length) {
5 | $("#range_01").ionRangeSlider();
6 | }
7 |
8 | if ($("#range_02").length) {
9 | $("#range_02").ionRangeSlider({
10 | min: 100,
11 | max: 1000,
12 | from: 550
13 | });
14 | }
15 |
16 | if ($("#range_03").length) {
17 | $("#range_03").ionRangeSlider({
18 | type: "double",
19 | grid: true,
20 | min: 0,
21 | max: 1000,
22 | from: 200,
23 | to: 800,
24 | prefix: "$"
25 | });
26 | }
27 |
28 | if ($("#range_04").length) {
29 | $("#range_04").ionRangeSlider({
30 | type: "double",
31 | min: 100,
32 | max: 200,
33 | from: 145,
34 | to: 155,
35 | prefix: "Weight: ",
36 | postfix: " million pounds",
37 | decorate_both: true
38 | });
39 | }
40 |
41 | if ($("#range_05").length) {
42 | $("#range_05").ionRangeSlider({
43 | type: "double",
44 | min: 1000,
45 | max: 2000,
46 | from: 1200,
47 | to: 1800,
48 | hide_min_max: true,
49 | hide_from_to: true,
50 | grid: false
51 | });
52 | }
53 |
54 | if ($("#range_06").length) {
55 | $("#range_06").ionRangeSlider({
56 | type: "double",
57 | min: 1000,
58 | max: 2000,
59 | from: 1200,
60 | to: 1800,
61 | hide_min_max: true,
62 | hide_from_to: true,
63 | grid: true
64 | });
65 | }
66 |
67 | if ($("#range_07").length) {
68 | $("#range_07").ionRangeSlider({
69 | type: "double",
70 | grid: true,
71 | min: 0,
72 | max: 10000,
73 | from: 1000,
74 | prefix: "$"
75 | });
76 | }
77 |
78 | if ($("#range_08").length) {
79 | $("#range_08").ionRangeSlider({
80 | type: "single",
81 | grid: true,
82 | min: -90,
83 | max: 90,
84 | from: 0,
85 | postfix: "°"
86 | });
87 | }
88 |
89 | if ($("#range_09").length) {
90 | $("#range_09").ionRangeSlider({
91 | type: "double",
92 | min: 0,
93 | max: 10000,
94 | grid: true
95 | });
96 | }
97 |
98 | if ($("#range_10").length) {
99 | $("#range_10").ionRangeSlider({
100 | type: "double",
101 | min: 0,
102 | max: 10000,
103 | grid: true,
104 | grid_num: 10
105 | });
106 | }
107 |
108 | if ($("#range_11").length) {
109 | $("#range_11").ionRangeSlider({
110 | type: "double",
111 | min: 0,
112 | max: 10000,
113 | step: 500,
114 | grid: true,
115 | grid_snap: true
116 | });
117 | }
118 |
119 | if ($("#range_12").length) {
120 | $("#range_12").ionRangeSlider({
121 | type: "single",
122 | min: 0,
123 | max: 10,
124 | step: 2.34,
125 | grid: true,
126 | grid_snap: true
127 | });
128 | }
129 |
130 | if ($("#range_13").length) {
131 | $("#range_13").ionRangeSlider({
132 | type: "double",
133 | min: 0,
134 | max: 100,
135 | from: 30,
136 | to: 70,
137 | from_fixed: true
138 | });
139 | }
140 |
141 | if ($("#range_14").length) {
142 | $("#range_14").ionRangeSlider({
143 | min: 0,
144 | max: 100,
145 | from: 30,
146 | from_min: 10,
147 | from_max: 50
148 | });
149 | }
150 |
151 | if ($("#range_15").length) {
152 | $("#range_15").ionRangeSlider({
153 | min: 0,
154 | max: 100,
155 | from: 30,
156 | from_min: 10,
157 | from_max: 50,
158 | from_shadow: true
159 | });
160 | }
161 |
162 | if ($("#range_16").length) {
163 | $("#range_16").ionRangeSlider({
164 | type: "double",
165 | min: 0,
166 | max: 100,
167 | from: 20,
168 | from_min: 10,
169 | from_max: 30,
170 | from_shadow: true,
171 | to: 80,
172 | to_min: 70,
173 | to_max: 90,
174 | to_shadow: true,
175 | grid: true,
176 | grid_num: 10
177 | });
178 | }
179 |
180 | if ($("#range_17").length) {
181 | $("#range_17").ionRangeSlider({
182 | min: 0,
183 | max: 100,
184 | from: 30,
185 | disable: true
186 | });
187 | }
188 |
189 | })(jQuery);
--------------------------------------------------------------------------------
/assets/js/form-addons.js:
--------------------------------------------------------------------------------
1 | (function($) {
2 | 'use strict';
3 |
4 | // Jquery Tag Input Starts
5 | $('#tags').tagsInput({
6 | 'width': '100%',
7 | 'height': '75%',
8 | 'interactive': true,
9 | 'defaultText': 'Add More',
10 | 'removeWithBackspace': true,
11 | 'minChars': 0,
12 | 'maxChars': 20, // if not provided there is no limit
13 | 'placeholderColor': '#666666'
14 | });
15 |
16 | // Jquery Tag Input Ends
17 | // Jquery Bar Rating Starts
18 |
19 | $(function() {
20 | function ratingEnable() {
21 | $('#example-1to10').barrating('show', {
22 | theme: 'bars-1to10'
23 | });
24 |
25 | $('#example-movie').barrating('show', {
26 | theme: 'bars-movie'
27 | });
28 |
29 | $('#example-movie').barrating('set', 'Mediocre');
30 |
31 | $('#example-square').barrating('show', {
32 | theme: 'bars-square',
33 | showValues: true,
34 | showSelectedRating: false
35 | });
36 |
37 | $('#example-pill').barrating('show', {
38 | theme: 'bars-pill',
39 | initialRating: 'A',
40 | showValues: true,
41 | showSelectedRating: false,
42 | allowEmpty: true,
43 | emptyValue: '-- no rating selected --',
44 | onSelect: function(value, text) {
45 | alert('Selected rating: ' + value);
46 | }
47 | });
48 |
49 | $('#example-reversed').barrating('show', {
50 | theme: 'bars-reversed',
51 | showSelectedRating: true,
52 | reverse: true
53 | });
54 |
55 | $('#example-horizontal').barrating('show', {
56 | theme: 'bars-horizontal',
57 | reverse: true,
58 | hoverState: false
59 | });
60 |
61 | $('#example-fontawesome').barrating({
62 | theme: 'fontawesome-stars',
63 | showSelectedRating: false
64 | });
65 |
66 | $('#example-css').barrating({
67 | theme: 'css-stars',
68 | showSelectedRating: false
69 | });
70 |
71 | $('#example-bootstrap').barrating({
72 | theme: 'bootstrap-stars',
73 | showSelectedRating: false
74 | });
75 |
76 | var currentRating = $('#example-fontawesome-o').data('current-rating');
77 |
78 | $('.stars-example-fontawesome-o .current-rating')
79 | .find('span')
80 | .html(currentRating);
81 |
82 | $('.stars-example-fontawesome-o .clear-rating').on('click', function(event) {
83 | event.preventDefault();
84 |
85 | $('#example-fontawesome-o')
86 | .barrating('clear');
87 | });
88 |
89 | $('#example-fontawesome-o').barrating({
90 | theme: 'fontawesome-stars-o',
91 | showSelectedRating: false,
92 | initialRating: currentRating,
93 | onSelect: function(value, text) {
94 | if (!value) {
95 | $('#example-fontawesome-o')
96 | .barrating('clear');
97 | } else {
98 | $('.stars-example-fontawesome-o .current-rating')
99 | .addClass('hidden');
100 |
101 | $('.stars-example-fontawesome-o .your-rating')
102 | .removeClass('hidden')
103 | .find('span')
104 | .html(value);
105 | }
106 | },
107 | onClear: function(value, text) {
108 | $('.stars-example-fontawesome-o')
109 | .find('.current-rating')
110 | .removeClass('hidden')
111 | .end()
112 | .find('.your-rating')
113 | .addClass('hidden');
114 | }
115 | });
116 | }
117 |
118 | function ratingDisable() {
119 | $('select').barrating('destroy');
120 | }
121 |
122 | $('.rating-enable').click(function(event) {
123 | event.preventDefault();
124 |
125 | ratingEnable();
126 |
127 | $(this).addClass('deactivated');
128 | $('.rating-disable').removeClass('deactivated');
129 | });
130 |
131 | $('.rating-disable').click(function(event) {
132 | event.preventDefault();
133 |
134 | ratingDisable();
135 |
136 | $(this).addClass('deactivated');
137 | $('.rating-enable').removeClass('deactivated');
138 | });
139 |
140 | ratingEnable();
141 | });
142 |
143 |
144 | // Jquery Bar Rating Ends
145 |
146 | })(jQuery);
--------------------------------------------------------------------------------
/assets/js/just-gage.js:
--------------------------------------------------------------------------------
1 | var g1, g2, gg1, g7, g8, g9, g10;
2 |
3 | window.onload = function() {
4 | var g1 = new JustGage({
5 | id: "g1",
6 | value: getRandomInt(0, 100),
7 | min: 0,
8 | max: 100,
9 | title: "Big Fella",
10 | label: "pounds"
11 | });
12 |
13 |
14 | setInterval(function() {
15 | g1.refresh(getRandomInt(50, 100));
16 | }, 2500);
17 | };
18 |
19 |
20 |
21 |
22 | document.addEventListener("DOMContentLoaded", function(event) {
23 | g2 = new JustGage({
24 | id: "g2",
25 | value: 72,
26 | min: 0,
27 | max: 100,
28 | donut: true,
29 | gaugeWidthScale: 0.6,
30 | counter: true,
31 | hideInnerShadow: true
32 | });
33 |
34 | document.getElementById('g2_refresh').addEventListener('click', function() {
35 | g2.refresh(getRandomInt(0, 100));
36 | });
37 |
38 | var g3 = new JustGage({
39 | id: 'g3',
40 | value: 65,
41 | min: 0,
42 | max: 100,
43 | symbol: '%',
44 | pointer: true,
45 | gaugeWidthScale: 0.6,
46 | customSectors: [{
47 | color: '#ff0000',
48 | lo: 50,
49 | hi: 100
50 | }, {
51 | color: '#00ff00',
52 | lo: 0,
53 | hi: 50
54 | }],
55 | counter: true
56 | });
57 |
58 | var g4 = new JustGage({
59 | id: 'g4',
60 | value: 45,
61 | min: 0,
62 | max: 100,
63 | symbol: '%',
64 | pointer: true,
65 | pointerOptions: {
66 | toplength: -15,
67 | bottomlength: 10,
68 | bottomwidth: 12,
69 | color: '#8e8e93',
70 | stroke: '#ffffff',
71 | stroke_width: 3,
72 | stroke_linecap: 'round'
73 | },
74 | gaugeWidthScale: 0.6,
75 | counter: true
76 | });
77 |
78 | var g5 = new JustGage({
79 | id: 'g5',
80 | value: 40,
81 | min: 0,
82 | max: 100,
83 | symbol: '%',
84 | donut: true,
85 | pointer: true,
86 | gaugeWidthScale: 0.4,
87 | pointerOptions: {
88 | toplength: 10,
89 | bottomlength: 10,
90 | bottomwidth: 8,
91 | color: '#000'
92 | },
93 | customSectors: [{
94 | color: "#ff0000",
95 | lo: 50,
96 | hi: 100
97 | }, {
98 | color: "#00ff00",
99 | lo: 0,
100 | hi: 50
101 | }],
102 | counter: true
103 | });
104 |
105 | var g6 = new JustGage({
106 | id: 'g6',
107 | value: 70,
108 | min: 0,
109 | max: 100,
110 | symbol: '%',
111 | pointer: true,
112 | pointerOptions: {
113 | toplength: 8,
114 | bottomlength: -20,
115 | bottomwidth: 6,
116 | color: '#8e8e93'
117 | },
118 | gaugeWidthScale: 0.1,
119 | counter: true
120 | });
121 |
122 | var g7 = new JustGage({
123 | id: 'g7',
124 | value: 65,
125 | min: 0,
126 | max: 100,
127 | reverse: true,
128 | gaugeWidthScale: 0.6,
129 | customSectors: [{
130 | color: '#ff0000',
131 | lo: 50,
132 | hi: 100
133 | }, {
134 | color: '#00ff00',
135 | lo: 0,
136 | hi: 50
137 | }],
138 | counter: true
139 | });
140 |
141 | var g8 = new JustGage({
142 | id: 'g8',
143 | value: 45,
144 | min: 0,
145 | max: 500,
146 | reverse: true,
147 | gaugeWidthScale: 0.6,
148 | counter: true
149 | });
150 |
151 | var g9 = new JustGage({
152 | id: 'g9',
153 | value: 25000,
154 | min: 0,
155 | max: 100000,
156 | humanFriendly: true,
157 | reverse: true,
158 | gaugeWidthScale: 1.3,
159 | customSectors: [{
160 | color: "#ff0000",
161 | lo: 50000,
162 | hi: 100000
163 | }, {
164 | color: "#00ff00",
165 | lo: 0,
166 | hi: 50000
167 | }],
168 | counter: true
169 | });
170 |
171 | var g10 = new JustGage({
172 | id: 'g10',
173 | value: 90,
174 | min: 0,
175 | max: 100,
176 | symbol: '%',
177 | reverse: true,
178 | gaugeWidthScale: 0.1,
179 | counter: true
180 | });
181 |
182 | document.getElementById('gauge_refresh').addEventListener('click', function() {
183 | g3.refresh(getRandomInt(0, 100));
184 | g4.refresh(getRandomInt(0, 100));
185 | g5.refresh(getRandomInt(0, 100));
186 | g6.refresh(getRandomInt(0, 100));
187 | g7.refresh(getRandomInt(0, 100));
188 | g8.refresh(getRandomInt(0, 100));
189 | g9.refresh(getRandomInt(0, 100));
190 | g10.refresh(getRandomInt(0, 100));
191 | });
192 |
193 | });
--------------------------------------------------------------------------------
/themes/pluto/gift-coins.ejs:
--------------------------------------------------------------------------------
1 |
2 |
3 | <%- include('./components/head') %>
4 |
5 |
6 |
69 |
70 |
71 |
72 |
73 |
80 |
81 |
82 | <%- include('./components/scripts') %>
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
--------------------------------------------------------------------------------
/assets/js/misc.js:
--------------------------------------------------------------------------------
1 | (function($) {
2 | 'use strict';
3 | $(function() {
4 | var body = $('body');
5 | var contentWrapper = $('.content-wrapper');
6 | var scroller = $('.container-scroller');
7 | var footer = $('.footer');
8 | var sidebar = $('.sidebar');
9 |
10 | //Add active class to nav-link based on url dynamically
11 | //Active class can be hard coded directly in html file also as required
12 |
13 | function addActiveClass(element) {
14 | if (current === "") {
15 | //for root url
16 | if (element.attr('href').indexOf("index.html") !== -1) {
17 | element.parents('.nav-item').last().addClass('active');
18 | if (element.parents('.sub-menu').length) {
19 | element.closest('.collapse').addClass('show');
20 | element.addClass('active');
21 | }
22 | }
23 | } else {
24 | //for other url
25 | if (element.attr('href').indexOf(current) !== -1) {
26 | element.parents('.nav-item').last().addClass('active');
27 | if (element.parents('.sub-menu').length) {
28 | element.closest('.collapse').addClass('show');
29 | element.addClass('active');
30 | }
31 | if (element.parents('.submenu-item').length) {
32 | element.addClass('active');
33 | }
34 | }
35 | }
36 | }
37 |
38 | var current = location.pathname.split("/").slice(-1)[0].replace(/^\/|\/$/g, '');
39 | $('.nav li a', sidebar).each(function() {
40 | var $this = $(this);
41 | addActiveClass($this);
42 | })
43 |
44 | $('.horizontal-menu .nav li a').each(function() {
45 | var $this = $(this);
46 | addActiveClass($this);
47 | })
48 |
49 | //Close other submenu in sidebar on opening any
50 |
51 | sidebar.on('show.bs.collapse', '.collapse', function() {
52 | sidebar.find('.collapse.show').collapse('hide');
53 | });
54 |
55 |
56 | //Change sidebar and content-wrapper height
57 | applyStyles();
58 |
59 | function applyStyles() {
60 | //Applying perfect scrollbar
61 | if (!body.hasClass("rtl")) {
62 | if ($('.settings-panel .tab-content .tab-pane.scroll-wrapper').length) {
63 | const settingsPanelScroll = new PerfectScrollbar('.settings-panel .tab-content .tab-pane.scroll-wrapper');
64 | }
65 | if ($('.chats').length) {
66 | const chatsScroll = new PerfectScrollbar('.chats');
67 | }
68 | if (body.hasClass("sidebar-fixed")) {
69 | var fixedSidebarScroll = new PerfectScrollbar('#sidebar .nav');
70 | }
71 | }
72 | }
73 |
74 | $('[data-toggle="minimize"]').on("click", function() {
75 | if ((body.hasClass('sidebar-toggle-display')) || (body.hasClass('sidebar-absolute'))) {
76 | body.toggleClass('sidebar-hidden');
77 | } else {
78 | body.toggleClass('sidebar-icon-only');
79 | }
80 | });
81 |
82 | //checkbox and radios
83 | $(".form-check label,.form-radio label").append('
');
84 |
85 | //fullscreen
86 | $("#fullscreen-button").on("click", function toggleFullScreen() {
87 | if ((document.fullScreenElement !== undefined && document.fullScreenElement === null) || (document.msFullscreenElement !== undefined && document.msFullscreenElement === null) || (document.mozFullScreen !== undefined && !document.mozFullScreen) || (document.webkitIsFullScreen !== undefined && !document.webkitIsFullScreen)) {
88 | if (document.documentElement.requestFullScreen) {
89 | document.documentElement.requestFullScreen();
90 | } else if (document.documentElement.mozRequestFullScreen) {
91 | document.documentElement.mozRequestFullScreen();
92 | } else if (document.documentElement.webkitRequestFullScreen) {
93 | document.documentElement.webkitRequestFullScreen(Element.ALLOW_KEYBOARD_INPUT);
94 | } else if (document.documentElement.msRequestFullscreen) {
95 | document.documentElement.msRequestFullscreen();
96 | }
97 | } else {
98 | if (document.cancelFullScreen) {
99 | document.cancelFullScreen();
100 | } else if (document.mozCancelFullScreen) {
101 | document.mozCancelFullScreen();
102 | } else if (document.webkitCancelFullScreen) {
103 | document.webkitCancelFullScreen();
104 | } else if (document.msExitFullscreen) {
105 | document.msExitFullscreen();
106 | }
107 | }
108 | })
109 | });
110 | })(jQuery);
--------------------------------------------------------------------------------
/assets/vendors/pwstabs/jquery.pwstabs.min.js:
--------------------------------------------------------------------------------
1 | !function(t,s,i,a){function e(s,i){this.element=t(s),this.$elem=t(this.element),this.settings=t.extend({},l,i),this._defaults=l,this._name=n,this.init()}var n="pwstabs",l={effect:"scale",defaultTab:1,containerWidth:"100%",tabsPosition:"horizontal",horizontalPosition:"top",verticalPosition:"left",responsive:!1,theme:"",rtl:!1};e.prototype={init:function(){var i=["scale","slideleft","slideright","slidetop","slidedown","none"],a=this.$elem,e=a.children("[data-pws-tab]");a.addClass("pws_tabs_list"),a.wrap('
');var n=a.closest(".pws_tabs_container");if("100%"!==this.settings.containerWidth&&n.css("width",this.settings.containerWidth),"vertical"==this.settings.tabsPosition){if(n.closest(".pws_tab_single").length){var l=n.closest(".pws_tab_single").innerWidth();n.css("width",l)}"left"==this.settings.verticalPosition?n.addClass("pws_tabs_vertical pws_tabs_vertical_left"):n.addClass("pws_tabs_vertical pws_tabs_vertical_right")}else"top"==this.settings.horizontalPosition?n.addClass("pws_tabs_horizontal pws_tabs_horizontal_top"):n.addClass("pws_tabs_horizontal pws_tabs_horizontal_bottom");this.settings.rtl&&n.addClass("pws_tabs_rtl"),"none"==this.settings.effect&&n.addClass("pws_tabs_noeffect"),this.settings.theme&&n.addClass(this.settings.theme),t.inArray(this.settings.effect,i)>=0?n.addClass("pws_"+this.settings.effect):n.addClass("pws_scale"),e.addClass("pws_hide").hide(),"vertical"==this.settings.tabsPosition?"left"==this.settings.verticalPosition?n.prepend('
'):n.append('
'):"top"==this.settings.horizontalPosition?n.prepend('
'):n.append('
');var d=n.children(".pws_tabs_controll"),o=1;e.each(function(){t(this).attr("data-pws-tab-id",o);var s=t(this).data("pws-tab"),i=t(this).data("pws-tab-name");d.append('
'+i+" "),t(this).addClass("pws_tab_single"),o++});var h=d.find("a"),p=d.find("li"),r=a.children('[data-pws-tab-id="'+this.settings.defaultTab+'"]');if(a.children("[data-pws-tab-icon]").each(function(){var s=t(this).attr("data-pws-tab"),i=t(this).attr("data-pws-tab-name"),a=t(this).attr("data-pws-tab-icon");""==i&&d.find('[data-tab-id="'+s+'"]').addClass("pws_tab_noname"),d.find('[data-tab-id="'+s+'"]').prepend('
')}),"vertical"==this.settings.tabsPosition){var _=n.innerWidth()/450,c=parseInt(h.css("font-size"))/_,w=parseInt(h.css("padding-left"))+parseInt(h.css("padding-right")),u=h.html().length*c+w,b=d.outerHeight(),f=n.outerWidth()-u,v=a.outerHeight();d.width(u),a.outerWidth(f),b>v&&a.css("min-height",b)}if(r.addClass("pws_show").show(),d.find('[data-tab-id="'+r.data("pws-tab")+'"]').addClass("pws_tab_active"),h.on("click",function(s){s.preventDefault(),h.removeClass("pws_tab_active"),t(this).addClass("pws_tab_active");var i=t(this).data("tab-id"),n=a.children('[data-pws-tab="'+i+'"]');e.removeClass("pws_show"),setTimeout(function(){e.hide(),n.show()},400),setTimeout(function(){n.addClass("pws_show")},450)}),this.settings.responsive){n.addClass("pws_tabs_responsive");var g=parseInt(d.children("li").length),m=100/g,C=Math.max.apply(null,p.map(function(){return t(this).height()}).get());t(s).on("resize load",{pluginSettings:this.settings},function(i){var e=i.data.pluginSettings,l=e.tabsPosition,o=e.containerWidth;t(s).width()<=960&&(n.width(""),p.css("width",m+"%"),h.each(function(){t(this).height(C)}),"vertical"==l&&(d.width(""),a.width(""),a.css("min-height",""),a.height(r.height()))),t(s).width()<=600?(n.find(".pws_responsive_small_menu").length<1&&t('').insertBefore(d),d.addClass("pws_tabs_menu_popup"),h.height(""),p.width(""),n.find("ul.pws_tabs_menu_popup").hide(),n.find(".pws_responsive_small_menu a").click(function(s){s.preventDefault(),"0"==t(this).attr("data-visible")?(n.find("ul.pws_tabs_menu_popup").show(),t(this).attr("data-visible","1")):(n.find("ul.pws_tabs_menu_popup").hide(),t(this).attr("data-visible","0"))}),n.find("ul.pws_tabs_menu_popup li a").on("click",function(s){s.preventDefault(),t(this).closest(".pws_tabs_menu_popup").hide(),n.find(".pws_responsive_small_menu a").attr("data-visible","0")})):t(s).width()>960?(n.css("width",o),p.width(""),h.height(""),n.find(".pws_responsive_small_menu").remove(),d.removeClass("pws_tabs_menu_popup"),d.show()):t(s).width()>600&&(n.find(".pws_responsive_small_menu").remove(),d.removeClass("pws_tabs_menu_popup"),d.show(),h.on("click",function(s){s.preventDefault(),t(this).parent().parent().show()}))})}}},t.fn[n]=function(t){return this.each(function(){new e(this,t)})}}(jQuery,window,document);
--------------------------------------------------------------------------------
/assets/js/morris.js:
--------------------------------------------------------------------------------
1 | $(function() {
2 | 'use strict';
3 | if ($('#morris-line-example').length) {
4 | Morris.Line({
5 | element: 'morris-line-example',
6 | lineColors: ['#63CF72', '#F36368', '#76C1FA', '#FABA66'],
7 | data: [{
8 | y: '2006',
9 | a: 100,
10 | b: 150
11 | },
12 | {
13 | y: '2007',
14 | a: 75,
15 | b: 65
16 | },
17 | {
18 | y: '2008',
19 | a: 50,
20 | b: 40
21 | },
22 | {
23 | y: '2009',
24 | a: 75,
25 | b: 65
26 | },
27 | {
28 | y: '2010',
29 | a: 50,
30 | b: 40
31 | },
32 | {
33 | y: '2011',
34 | a: 75,
35 | b: 65
36 | },
37 | {
38 | y: '2012',
39 | a: 100,
40 | b: 90
41 | }
42 | ],
43 | xkey: 'y',
44 | ykeys: ['a', 'b'],
45 | labels: ['Series A', 'Series B']
46 | });
47 | }
48 | if ($('#morris-area-example').length) {
49 | Morris.Area({
50 | element: 'morris-area-example',
51 | lineColors: ['#76C1FA', '#F36368', '#63CF72', '#FABA66'],
52 | data: [{
53 | y: '2006',
54 | a: 100,
55 | b: 90
56 | },
57 | {
58 | y: '2007',
59 | a: 75,
60 | b: 105
61 | },
62 | {
63 | y: '2008',
64 | a: 50,
65 | b: 40
66 | },
67 | {
68 | y: '2009',
69 | a: 75,
70 | b: 65
71 | },
72 | {
73 | y: '2010',
74 | a: 50,
75 | b: 40
76 | },
77 | {
78 | y: '2011',
79 | a: 75,
80 | b: 65
81 | },
82 | {
83 | y: '2012',
84 | a: 100,
85 | b: 90
86 | }
87 | ],
88 | xkey: 'y',
89 | ykeys: ['a', 'b'],
90 | labels: ['Series A', 'Series B']
91 | });
92 | }
93 | if ($("#morris-bar-example").length) {
94 | Morris.Bar({
95 | element: 'morris-bar-example',
96 | barColors: ['#63CF72', '#F36368', '#76C1FA', '#FABA66'],
97 | data: [{
98 | y: '2006',
99 | a: 100,
100 | b: 90
101 | },
102 | {
103 | y: '2007',
104 | a: 75,
105 | b: 65
106 | },
107 | {
108 | y: '2008',
109 | a: 50,
110 | b: 40
111 | },
112 | {
113 | y: '2009',
114 | a: 75,
115 | b: 65
116 | },
117 | {
118 | y: '2010',
119 | a: 50,
120 | b: 40
121 | },
122 | {
123 | y: '2011',
124 | a: 75,
125 | b: 65
126 | },
127 | {
128 | y: '2012',
129 | a: 100,
130 | b: 90
131 | }
132 | ],
133 | xkey: 'y',
134 | ykeys: ['a', 'b'],
135 | labels: ['Series A', 'Series B']
136 | });
137 | }
138 | if ($("#morris-donut-example").length) {
139 | Morris.Donut({
140 | element: 'morris-donut-example',
141 | colors: ['#76C1FA', '#F36368', '#63CF72', '#FABA66'],
142 | data: [{
143 | label: "Download Sales",
144 | value: 12
145 | },
146 | {
147 | label: "In-Store Sales",
148 | value: 30
149 | },
150 | {
151 | label: "Mail-Order Sales",
152 | value: 20
153 | }
154 | ]
155 | });
156 | }
157 | if ($('#morris-dashboard-taget').length) {
158 | Morris.Area({
159 | element: 'morris-dashboard-taget',
160 | parseTime: false,
161 | lineColors: ['#76C1FA', '#F36368', '#63CF72', '#FABA66'],
162 | data: [{
163 | y: 'Jan',
164 | Revenue: 190,
165 | Target: 170
166 | },
167 | {
168 | y: 'Feb',
169 | Revenue: 60,
170 | Target: 90
171 | },
172 | {
173 | y: 'March',
174 | Revenue: 100,
175 | Target: 120
176 | },
177 | {
178 | y: 'Apr',
179 | Revenue: 150,
180 | Target: 140
181 | },
182 | {
183 | y: 'May',
184 | Revenue: 130,
185 | Target: 170
186 | },
187 | {
188 | y: 'Jun',
189 | Revenue: 200,
190 | Target: 160
191 | },
192 | {
193 | y: 'Jul',
194 | Revenue: 150,
195 | Target: 180
196 | },
197 | {
198 | y: 'Aug',
199 | Revenue: 170,
200 | Target: 180
201 | },
202 | {
203 | y: 'Sep',
204 | Revenue: 140,
205 | Target: 90
206 | }
207 | ],
208 | xkey: 'y',
209 | ykeys: ['Target', 'Revenue'],
210 | labels: ['Monthly Target', 'Monthly Revenue'],
211 | hideHover: 'auto',
212 | behaveLikeLine: true,
213 | resize: true,
214 | axes: 'x'
215 | });
216 | }
217 | });
--------------------------------------------------------------------------------
/themes/pluto/admin-plans.ejs:
--------------------------------------------------------------------------------
1 |
2 |
3 | <%- include('./components/head') %>
4 |
5 |
48 |
49 |
50 |
51 |
52 |
84 |
85 | <%- include('./components/scripts') %>
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
--------------------------------------------------------------------------------
/themes/pluto/buy.ejs:
--------------------------------------------------------------------------------
1 |
2 |
3 | <%- include('./components/head') %>
4 |
5 |