-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
112 lines (89 loc) · 3.61 KB
/
index.php
File metadata and controls
112 lines (89 loc) · 3.61 KB
1
2
3
4
5
6
7
8
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
<?php
#################################################################
## WHMX Billing system for cPanel / WHM ##
##-------------------------------------------------------------##
## Version: 1.00 - ENVATO MARKET ##
##-------------------------------------------------------------##
## Author: Gianck Luiz obviosistemas@gmail.com ##
##-------------------------------------------------------------##
## Copyright ©2016 . All rights reserved. ##
##-------------------------------------------------------------##
#################################################################
session_start();
ob_start();
$filename = 'adm/config/conexao.php';
if (!file_exists($filename)) {
header("Location: install.php");
}
require_once("adm/config/conexao.class.php");
require_once("adm/config/crud.class.php");
require_once("adm/config/mega.class.php");
include_once("adm/config/common.php"); // Language
$con = new conexao();
$con->connect();
$dbconfig = mysql_query("SELECT * FROM config WHERE id = '1'");
$config = mysql_fetch_array($dbconfig);
$thema = $config['thema'];
use megaphp\view\MVC;
$tpl = new MVC("theme/$thema/index.html");
$tpl->addFile("NAVBAR", "theme/$thema/inc/navbar.html");
$tpl->addFile("DEMO", "theme/$thema/inc/demo.html");
$tpl->addFile("FOOTER", "theme/$thema/inc/footer.html");
require('adm/config/whois.php');
// SESSION
//LOGADO
if ( !isset($_SESSION['id']) ){
$tpl->block("BLOCK_NAO_LOGADO");
} else {
$idbase = $_SESSION['id'];
$cslogin = mysql_query("SELECT * FROM customers WHERE id = + $idbase");
$logado = mysql_fetch_array($cslogin);
$tpl->USER_NAME = $logado['name'];
$tpl->block("CHAT_LOGIN");
$tpl->block("BLOCK_LOGADO");
}
if(isset ($_POST['check'])){
if (isset($_POST['domain'])){
if (check_availability($_POST['domain']) == true) {
$tpl->CHECK = "<strong>".$_POST['domain'] . "</strong> avaliable!";
$tpl->block("BLOCK_AVALIABLE");
} else {
$tpl->CHECK = "<strong>".$_POST['domain'] . "</strong> not avaliable!";
$tpl->block("BLOCK_NOT_AVALIABLE");
}
$tpl->CHECKWHOIS = "<pre>".show_whois($_POST['domain'])."</pre>";
$tpl->block("BLOCK_WHOIS");
$line = anti_injection($_POST['domain']);
$domain = substr($line, 0, strpos($line, "."));
$tld = substr($line, strpos($line, "."), (strlen($line) - strlen($domain)));
$tpl->TLD = $tld;
$tpl->DOMAIN = $domain;
$costld = mysql_query("SELECT * FROM tdl WHERE tdl = '$tld'");
$rtld = mysql_fetch_array($costld);
$tpl->AMOUNT = number_format($rtld['amount'],2,'.','');
$tpl->PERIOD = $rtld['period'];
}
// END CHECK DOMAIN
}
if(isset ($_POST['hosting'])){
$line = anti_injection($_POST['domain']);
$domain = substr($line, 0, strpos($line, "."));
$tld = substr($line, strpos($line, "."), (strlen($line) - strlen($domain)));
$tpl->TLD = $tld;
$tpl->DOMAIN = $domain;
$costld = mysql_query("SELECT * FROM tdl WHERE tdl = '$tld'");
$rtld = mysql_fetch_array($costld);
$tpl->AMOUNT = number_format($rtld['amount'],2,'.','');
$tpl->PERIOD = $rtld['period'];
$tpl->block("BLOCK_HOSTING");
}
$tpl->BASE = $config['base'];
$tpl->TITLE = $config['title'];
$tpl->COMPANY = $config['company'];
$tpl->CURRENCY = $config['moeda'];
//DATE DEMO
$tpl->DATE_DEMO = date('m-d-Y');
$tpl->PAGELANG = basename($_SERVER['PHP_SELF']);
// SHOW TPL
$tpl->show();
?>