move config.php and install to root
This commit is contained in:
parent
ac813ca132
commit
335c5e524b
2
.gitignore
vendored
2
.gitignore
vendored
@ -1,4 +1,4 @@
|
|||||||
system/config.php
|
config.php
|
||||||
.DS_Store
|
.DS_Store
|
||||||
.vscode/
|
.vscode/
|
||||||
ui/compiled/*.php
|
ui/compiled/*.php
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
<?php
|
<?php
|
||||||
$db_host = "localhost"; # Database Host
|
$db_host = "localhost"; # Database Host
|
||||||
$db_port = ""; # Database Port. Keep it blank if you are un sure.
|
$db_port = ""; # Database Port. Keep it blank if you are un sure.
|
||||||
$db_user = "root"; # Database Username
|
$db_user = "root"; # Database Username
|
||||||
$db_password = ""; # Database Password
|
$db_password = ""; # Database Password
|
||||||
$db_name = "phpmixbill"; # Database Name
|
$db_name = "phpmixbill"; # Database Name
|
||||||
define('APP_URL', 'http://localhost/phpmixbill'); # Application URL.
|
define('APP_URL', 'http://localhost/phpmixbill'); # Application URL.
|
||||||
#Please include http and do not use trailing slash after the url. For example use in this format- http://www.example.com Or http://www.example.com/finance
|
#Please include http and do not use trailing slash after the url. For example use in this format- http://www.example.com Or http://www.example.com/finance
|
||||||
$_app_stage = 'Live'; # Do not change this
|
$_app_stage = 'Live'; # Do not change this
|
Before Width: | Height: | Size: 6.6 KiB After Width: | Height: | Size: 6.6 KiB |
Before Width: | Height: | Size: 8.1 KiB After Width: | Height: | Size: 8.1 KiB |
@ -1,60 +1,60 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
<title>PHPMixBill Installer</title>
|
<title>PHPMixBill Installer</title>
|
||||||
<link rel="shortcut icon" type="image/x-icon" href="img/favicon.png">
|
<link rel="shortcut icon" type="image/x-icon" href="img/favicon.png">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
|
||||||
<!--[if lt IE 9]>
|
<!--[if lt IE 9]>
|
||||||
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
|
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
|
||||||
<![endif]-->
|
<![endif]-->
|
||||||
|
|
||||||
<link type='text/css' href='css/style.css' rel='stylesheet' />
|
<link type='text/css' href='css/style.css' rel='stylesheet' />
|
||||||
<link href="css/bootstrap.min.css" rel="stylesheet">
|
<link href="css/bootstrap.min.css" rel="stylesheet">
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body style='background-color: #FBFBFB;'>
|
<body style='background-color: #FBFBFB;'>
|
||||||
<div id='main-container'>
|
<div id='main-container'>
|
||||||
<div class='header'>
|
<div class='header'>
|
||||||
<div class="header-box wrapper">
|
<div class="header-box wrapper">
|
||||||
<div class="hd-logo"><a href="#"><img src="img/logo.png" alt="Logo" /></a></div>
|
<div class="hd-logo"><a href="#"><img src="img/logo.png" alt="Logo" /></a></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- contents area start -->
|
<!-- contents area start -->
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<h4> PHPMixBill Installer </h4>
|
<h4> PHPMixBill Installer </h4>
|
||||||
<h5>Please Read Before Continue</h5>
|
<h5>Please Read Before Continue</h5>
|
||||||
<p><strong>Informasi Aplikasi</strong><br>
|
<p><strong>Informasi Aplikasi</strong><br>
|
||||||
Application Name: PHPMixBill <br>
|
Application Name: PHPMixBill <br>
|
||||||
Release Date: 30/10/2015<br>
|
Release Date: 30/10/2015<br>
|
||||||
By: PHPMixBill [ <a href="https://github.com/ibnux/phpmixbill" target="_blank">https://github.com/ibnux/phpmixbill</a> ]<br>
|
By: PHPMixBill [ <a href="https://github.com/ibnux/phpmixbill" target="_blank">https://github.com/ibnux/phpmixbill</a> ]<br>
|
||||||
Donasi Paypal: <b>me@ibnux.et</b><br>
|
Donasi Paypal: <b>me@ibnux.et</b><br>
|
||||||
<br>
|
<br>
|
||||||
<strong>Syarat Penggunaan:</strong><br>
|
<strong>Syarat Penggunaan:</strong><br>
|
||||||
Syarat Penggunaan ini berlaku untuk semua versi.<br><br>
|
Syarat Penggunaan ini berlaku untuk semua versi.<br><br>
|
||||||
<ul>
|
<ul>
|
||||||
<li>Silahkan Anda menggunakan aplikasi ini dengan bijak, Anda dapat mendesain ulang script maupun tampilan pada
|
<li>Silahkan Anda menggunakan aplikasi ini dengan bijak, Anda dapat mendesain ulang script maupun tampilan pada
|
||||||
aplikasi ini sesuai dengan kebutuhan anda, memperbayak jumlah copy atau mendistribusikan aplikasi ini.
|
aplikasi ini sesuai dengan kebutuhan anda, memperbayak jumlah copy atau mendistribusikan aplikasi ini.
|
||||||
Dengan catatan tidak menghapus link developer.</li>
|
Dengan catatan tidak menghapus link developer.</li>
|
||||||
<li>Tidak ada garansi dari kami jika anda mengalami error atau merasa rugi ketika menggunakan aplikasi ini,
|
<li>Tidak ada garansi dari kami jika anda mengalami error atau merasa rugi ketika menggunakan aplikasi ini,
|
||||||
Anda hanya dapat memberikan feedback yang berisi laporan error, dengan syarat dan ketentuan yang berlaku.</li>
|
Anda hanya dapat memberikan feedback yang berisi laporan error, dengan syarat dan ketentuan yang berlaku.</li>
|
||||||
<li>Semua yang terkait biaya atau donasi apapun versi-nya, Anda dapat update seumur hidup atau selama aplikasi
|
<li>Semua yang terkait biaya atau donasi apapun versi-nya, Anda dapat update seumur hidup atau selama aplikasi
|
||||||
ini masih dikembangkan. Mohon jangan salah pengertian bahwa kami tim pengembang mengkomersilkan produk ini
|
ini masih dikembangkan. Mohon jangan salah pengertian bahwa kami tim pengembang mengkomersilkan produk ini
|
||||||
dan anda membeli produk kami.</li>
|
dan anda membeli produk kami.</li>
|
||||||
<li>Aplikasi ini bersifat sosial untuk dapat dikembangkan bersama. Karena itu kami juga mengundang relawan-relawan
|
<li>Aplikasi ini bersifat sosial untuk dapat dikembangkan bersama. Karena itu kami juga mengundang relawan-relawan
|
||||||
yang mau menjadi pengembangkan aplikasi ini.</li>
|
yang mau menjadi pengembangkan aplikasi ini.</li>
|
||||||
<li>Penulis berhak setiap saat untuk mengubah ketentuan Syarat Penggunaan tanpa pemberitahuan sebelumnya.</li>
|
<li>Penulis berhak setiap saat untuk mengubah ketentuan Syarat Penggunaan tanpa pemberitahuan sebelumnya.</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-12"><br>
|
<div class="col-md-12"><br>
|
||||||
<a href="step2.php" class="btn btn-primary">Accept & Continue</a>
|
<a href="step2.php" class="btn btn-primary">Accept & Continue</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- contents area end -->
|
<!-- contents area end -->
|
||||||
</div>
|
</div>
|
||||||
<div class="footer">Copyright © 2021 PHPMixBill. All Rights Reserved<br /><br /></div>
|
<div class="footer">Copyright © 2021 PHPMixBill. All Rights Reserved<br /><br /></div>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
@ -1,70 +1,70 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
<title>PHPMixBill Installer</title>
|
<title>PHPMixBill Installer</title>
|
||||||
<link rel="shortcut icon" type="image/x-icon" href="img/favicon.ico">
|
<link rel="shortcut icon" type="image/x-icon" href="img/favicon.ico">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
|
||||||
<!--[if lt IE 9]>
|
<!--[if lt IE 9]>
|
||||||
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
|
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
|
||||||
<![endif]-->
|
<![endif]-->
|
||||||
|
|
||||||
<link type='text/css' href='css/style.css' rel='stylesheet' />
|
<link type='text/css' href='css/style.css' rel='stylesheet' />
|
||||||
<link type='text/css' href="css/bootstrap.min.css" rel="stylesheet">
|
<link type='text/css' href="css/bootstrap.min.css" rel="stylesheet">
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body style='background-color: #FBFBFB;'>
|
<body style='background-color: #FBFBFB;'>
|
||||||
<div id='main-container'>
|
<div id='main-container'>
|
||||||
<div class='header'>
|
<div class='header'>
|
||||||
<div class="header-box wrapper">
|
<div class="header-box wrapper">
|
||||||
<div class="hd-logo"><a href="#"><img src="img/logo.png" alt="Logo" /></a></div>
|
<div class="hd-logo"><a href="#"><img src="img/logo.png" alt="Logo" /></a></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="span12">
|
<div class="span12">
|
||||||
<h4> PHPMixBill Installer </h4>
|
<h4> PHPMixBill Installer </h4>
|
||||||
<?php
|
<?php
|
||||||
$passed = '';
|
$passed = '';
|
||||||
$ltext = '';
|
$ltext = '';
|
||||||
if (version_compare(PHP_VERSION, '7.2.0') >= 0) {
|
if (version_compare(PHP_VERSION, '7.2.0') >= 0) {
|
||||||
$ltext .= 'To Run PHPMixBill You need at least PHP version 7.2.0, Your PHP Version is: ' . PHP_VERSION . " Tested <strong>---PASSED---</strong><br/>";
|
$ltext .= 'To Run PHPMixBill You need at least PHP version 7.2.0, Your PHP Version is: ' . PHP_VERSION . " Tested <strong>---PASSED---</strong><br/>";
|
||||||
$passed .= '1';
|
$passed .= '1';
|
||||||
} else {
|
} else {
|
||||||
$ltext .= 'To Run PHPMixBill You need at least PHP version 7.2.0, Your PHP Version is: ' . PHP_VERSION . " Tested <strong>---FAILED---</strong><br/>";
|
$ltext .= 'To Run PHPMixBill You need at least PHP version 7.2.0, Your PHP Version is: ' . PHP_VERSION . " Tested <strong>---FAILED---</strong><br/>";
|
||||||
$passed .= '0';
|
$passed .= '0';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (extension_loaded('PDO')) {
|
if (extension_loaded('PDO')) {
|
||||||
$ltext .= 'PDO is installed on your server: ' . "Tested <strong>---PASSED---</strong><br/>";
|
$ltext .= 'PDO is installed on your server: ' . "Tested <strong>---PASSED---</strong><br/>";
|
||||||
$passed .= '1';
|
$passed .= '1';
|
||||||
} else {
|
} else {
|
||||||
$ltext = 'PDO is installed on your server: ' . "Tested <strong>---FAILED---</strong><br/>";
|
$ltext = 'PDO is installed on your server: ' . "Tested <strong>---FAILED---</strong><br/>";
|
||||||
$passed .= '0';
|
$passed .= '0';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (extension_loaded('pdo_mysql')) {
|
if (extension_loaded('pdo_mysql')) {
|
||||||
$ltext .= 'PDO MySQL driver is enabled on your server: ' . "Tested <strong>---PASSED---</strong><br/>";
|
$ltext .= 'PDO MySQL driver is enabled on your server: ' . "Tested <strong>---PASSED---</strong><br/>";
|
||||||
$passed .= '1';
|
$passed .= '1';
|
||||||
} else {
|
} else {
|
||||||
$ltext .= 'PDO MySQL driver is not enabled on your server: ' . "Tested <strong>---FAILED---</strong><br/>";
|
$ltext .= 'PDO MySQL driver is not enabled on your server: ' . "Tested <strong>---FAILED---</strong><br/>";
|
||||||
$passed .= '0';
|
$passed .= '0';
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($passed == '111') {
|
if ($passed == '111') {
|
||||||
echo ("<br/> $ltext <br/> Great! System Test Completed. You can run PHPMixBill on your server. Click Continue For Next Step.
|
echo ("<br/> $ltext <br/> Great! System Test Completed. You can run PHPMixBill on your server. Click Continue For Next Step.
|
||||||
<br><br>
|
<br><br>
|
||||||
<a href=\"step3.php\" class=\"btn btn-primary\">Continue</a><br><br><a href=\"update.php\" class=\"btn btn-primary\">Update System</a>");
|
<a href=\"step3.php\" class=\"btn btn-primary\">Continue</a><br><br><a href=\"update.php\" class=\"btn btn-primary\">Update System</a>");
|
||||||
} else {
|
} else {
|
||||||
echo ("<br/> $ltext <br/> Sorry. The requirements of PHPMixBill is not available on your server.
|
echo ("<br/> $ltext <br/> Sorry. The requirements of PHPMixBill is not available on your server.
|
||||||
Please contact with us- iesien22@yahoo.com with this code- $passed Or contact with your server administrator
|
Please contact with us- iesien22@yahoo.com with this code- $passed Or contact with your server administrator
|
||||||
<br><br>
|
<br><br>
|
||||||
<a href=\"#\" class=\"btn btn-primary disabled\">Correct The Problem To Continue</a>");
|
<a href=\"#\" class=\"btn btn-primary disabled\">Correct The Problem To Continue</a>");
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="footer">Copyright © 2021 PHPMixBill. All Rights Reserved<br /><br /></div>
|
<div class="footer">Copyright © 2021 PHPMixBill. All Rights Reserved<br /><br /></div>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
@ -1,72 +1,72 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<title>PHPMixBill Installer</title>
|
<title>PHPMixBill Installer</title>
|
||||||
<link rel="shortcut icon" type="image/x-icon" href="img/favicon.ico">
|
<link rel="shortcut icon" type="image/x-icon" href="img/favicon.ico">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
|
||||||
<!--[if lt IE 9]>
|
<!--[if lt IE 9]>
|
||||||
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
|
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
|
||||||
<![endif]-->
|
<![endif]-->
|
||||||
|
|
||||||
<link type='text/css' href='css/style.css' rel='stylesheet'/>
|
<link type='text/css' href='css/style.css' rel='stylesheet'/>
|
||||||
<link type='text/css' href="css/bootstrap.min.css" rel="stylesheet">
|
<link type='text/css' href="css/bootstrap.min.css" rel="stylesheet">
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body style='background-color: #FBFBFB;'>
|
<body style='background-color: #FBFBFB;'>
|
||||||
<div id='main-container'>
|
<div id='main-container'>
|
||||||
<div class='header'>
|
<div class='header'>
|
||||||
<div class="header-box wrapper">
|
<div class="header-box wrapper">
|
||||||
<div class="hd-logo"><a href="#"><img src="img/logo.png" alt="Logo"/></a></div>
|
<div class="hd-logo"><a href="#"><img src="img/logo.png" alt="Logo"/></a></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="span12">
|
<div class="span12">
|
||||||
<h4> PHPMixBill Installer </h4>
|
<h4> PHPMixBill Installer </h4>
|
||||||
<?php
|
<?php
|
||||||
if (isset($_GET['_error']) && ($_GET['_error']) == '1') {
|
if (isset($_GET['_error']) && ($_GET['_error']) == '1') {
|
||||||
echo '<h4 style="color: red;"> Unable to Connect Database, Please make sure database info is correct and try again ! </h4>';
|
echo '<h4 style="color: red;"> Unable to Connect Database, Please make sure database info is correct and try again ! </h4>';
|
||||||
}//
|
}//
|
||||||
|
|
||||||
$cururl = (((!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off')|| $_SERVER['SERVER_PORT'] == 443)?'https':'http').'://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
|
$cururl = (((!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off')|| $_SERVER['SERVER_PORT'] == 443)?'https':'http').'://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
|
||||||
$appurl = str_replace('/install/step3.php', '', $cururl);
|
$appurl = str_replace('/install/step3.php', '', $cururl);
|
||||||
$appurl = str_replace('?_error=1', '', $appurl);
|
$appurl = str_replace('?_error=1', '', $appurl);
|
||||||
$appurl = str_replace('/system', '', $appurl);
|
$appurl = str_replace('/system', '', $appurl);
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<form action="step4.php" method="post">
|
<form action="step4.php" method="post">
|
||||||
<fieldset>
|
<fieldset>
|
||||||
<legend>Database Connection & Site config</legend>
|
<legend>Database Connection & Site config</legend>
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="appurl">Application URL</label>
|
<label for="appurl">Application URL</label>
|
||||||
<input type="text" class="form-control" id="appurl" name="appurl" value="<?php echo $appurl; ?>">
|
<input type="text" class="form-control" id="appurl" name="appurl" value="<?php echo $appurl; ?>">
|
||||||
<span class='help-block'>Application url without trailing slash at the end of url (e.g. http://172.16.10.10). Please keep default, if you are unsure.</span>
|
<span class='help-block'>Application url without trailing slash at the end of url (e.g. http://172.16.10.10). Please keep default, if you are unsure.</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="dbhost">Database Host</label>
|
<label for="dbhost">Database Host</label>
|
||||||
<input type="text" class="form-control" id="dbhost" name="dbhost">
|
<input type="text" class="form-control" id="dbhost" name="dbhost">
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="dbuser">Database Username</label>
|
<label for="dbuser">Database Username</label>
|
||||||
<input type="text" class="form-control" id="dbuser" name="dbuser">
|
<input type="text" class="form-control" id="dbuser" name="dbuser">
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="dbpass">Database Password</label>
|
<label for="dbpass">Database Password</label>
|
||||||
<input type="text" class="form-control" id="dbpass" name="dbpass">
|
<input type="text" class="form-control" id="dbpass" name="dbpass">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="dbname">Database Name</label>
|
<label for="dbname">Database Name</label>
|
||||||
<input type="text" class="form-control" id="dbname" name="dbname">
|
<input type="text" class="form-control" id="dbname" name="dbname">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<button type="submit" class="btn btn-primary">Submit</button>
|
<button type="submit" class="btn btn-primary">Submit</button>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="footer">Copyright © 2021 PHPMixBill. All Rights Reserved<br/><br/></div>
|
<div class="footer">Copyright © 2021 PHPMixBill. All Rights Reserved<br/><br/></div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
@ -1,102 +1,102 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* PHP Mikrotik Billing (https://ibnux.github.io/phpmixbill/)
|
* PHP Mikrotik Billing (https://ibnux.github.io/phpmixbill/)
|
||||||
**/
|
**/
|
||||||
//error_reporting (0);
|
//error_reporting (0);
|
||||||
$appurl = $_POST['appurl'];
|
$appurl = $_POST['appurl'];
|
||||||
$db_host = $_POST['dbhost'];
|
$db_host = $_POST['dbhost'];
|
||||||
$db_user = $_POST['dbuser'];
|
$db_user = $_POST['dbuser'];
|
||||||
$db_password = $_POST['dbpass'];
|
$db_password = $_POST['dbpass'];
|
||||||
$db_name = $_POST['dbname'];
|
$db_name = $_POST['dbname'];
|
||||||
$cn = '0';
|
$cn = '0';
|
||||||
try{
|
try{
|
||||||
$dbh = new pdo( "mysql:host=$db_host;dbname=$db_name",
|
$dbh = new pdo( "mysql:host=$db_host;dbname=$db_name",
|
||||||
"$db_user",
|
"$db_user",
|
||||||
"$db_password",
|
"$db_password",
|
||||||
array(PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION));
|
array(PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION));
|
||||||
$cn = '1';
|
$cn = '1';
|
||||||
}
|
}
|
||||||
catch(PDOException $ex){
|
catch(PDOException $ex){
|
||||||
$cn = '0';
|
$cn = '0';
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($cn == '1') {
|
if ($cn == '1') {
|
||||||
$input = '<?php
|
$input = '<?php
|
||||||
$db_host = \'' . $db_host . '\';
|
$db_host = \'' . $db_host . '\';
|
||||||
$db_user = \'' . $db_user . '\';
|
$db_user = \'' . $db_user . '\';
|
||||||
$db_password = \'' . $db_password . '\';
|
$db_password = \'' . $db_password . '\';
|
||||||
$db_name = \'' . $db_name . '\';
|
$db_name = \'' . $db_name . '\';
|
||||||
define(\'APP_URL\', \'' . $appurl . '\');
|
define(\'APP_URL\', \'' . $appurl . '\');
|
||||||
$_app_stage = \'Live\';';
|
$_app_stage = \'Live\';';
|
||||||
$wConfig = "../config.php";
|
$wConfig = "../config.php";
|
||||||
$fh = fopen($wConfig, 'w') or die("Can't create config file, your server does not support 'fopen' function,
|
$fh = fopen($wConfig, 'w') or die("Can't create config file, your server does not support 'fopen' function,
|
||||||
please create a file named - config.php with following contents- <br/>$input");
|
please create a file named - config.php with following contents- <br/>$input");
|
||||||
|
|
||||||
fwrite($fh, $input);
|
fwrite($fh, $input);
|
||||||
fclose($fh);
|
fclose($fh);
|
||||||
|
|
||||||
$sql = file_get_contents('phpmixbill.sql');
|
$sql = file_get_contents('phpmixbill.sql');
|
||||||
|
|
||||||
$qr = $dbh->exec($sql);
|
$qr = $dbh->exec($sql);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
header("location: step3.php?_error=1");
|
header("location: step3.php?_error=1");
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<title>PHPMixBill Installer</title>
|
<title>PHPMixBill Installer</title>
|
||||||
<link rel="shortcut icon" type="image/x-icon" href="img/favicon.ico">
|
<link rel="shortcut icon" type="image/x-icon" href="img/favicon.ico">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
|
||||||
<!--[if lt IE 9]>
|
<!--[if lt IE 9]>
|
||||||
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
|
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
|
||||||
<![endif]-->
|
<![endif]-->
|
||||||
|
|
||||||
<link type='text/css' href='css/style.css' rel='stylesheet'/>
|
<link type='text/css' href='css/style.css' rel='stylesheet'/>
|
||||||
<link type='text/css' href="css/bootstrap.min.css" rel="stylesheet">
|
<link type='text/css' href="css/bootstrap.min.css" rel="stylesheet">
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body style='background-color: #FBFBFB;'>
|
<body style='background-color: #FBFBFB;'>
|
||||||
<div id='main-container'>
|
<div id='main-container'>
|
||||||
<div class='header'>
|
<div class='header'>
|
||||||
<div class="header-box wrapper">
|
<div class="header-box wrapper">
|
||||||
<div class="hd-logo"><a href="#"><img src="img/logo.png" alt="Logo"/></a></div>
|
<div class="hd-logo"><a href="#"><img src="img/logo.png" alt="Logo"/></a></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="span12">
|
<div class="span12">
|
||||||
<h4> PHPMixBill Installer </h4>
|
<h4> PHPMixBill Installer </h4>
|
||||||
<?php
|
<?php
|
||||||
if ($cn == '1') {
|
if ($cn == '1') {
|
||||||
?>
|
?>
|
||||||
<p><strong>Config File Created and Database Imported.</strong><br></p>
|
<p><strong>Config File Created and Database Imported.</strong><br></p>
|
||||||
<form action="step5.php" method="post">
|
<form action="step5.php" method="post">
|
||||||
<fieldset>
|
<fieldset>
|
||||||
<legend>Click Continue</legend>
|
<legend>Click Continue</legend>
|
||||||
<button type='submit' class='btn btn-primary'>Continue</button>
|
<button type='submit' class='btn btn-primary'>Continue</button>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
</form>
|
</form>
|
||||||
<?php
|
<?php
|
||||||
} elseif ($cn == '2') {
|
} elseif ($cn == '2') {
|
||||||
?>
|
?>
|
||||||
<p> MySQL Connection was successfull. An error occured while adding data on MySQL. Unsuccessfull
|
<p> MySQL Connection was successfull. An error occured while adding data on MySQL. Unsuccessfull
|
||||||
Installation. Please refer manual installation in the website github.com/ibnux/phpmixbill or Contact phpmixbill@ibnux.com for
|
Installation. Please refer manual installation in the website github.com/ibnux/phpmixbill or Contact phpmixbill@ibnux.com for
|
||||||
helping on installation</p>
|
helping on installation</p>
|
||||||
<?php
|
<?php
|
||||||
} else {
|
} else {
|
||||||
?>
|
?>
|
||||||
<p> MySQL Connection Failed.</p>
|
<p> MySQL Connection Failed.</p>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="footer">Copyright © 2021 PHPMixBill. All Rights Reserved<br/><br/></div>
|
<div class="footer">Copyright © 2021 PHPMixBill. All Rights Reserved<br/><br/></div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
@ -1,46 +1,46 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<title>PHPMixBill Installer</title>
|
<title>PHPMixBill Installer</title>
|
||||||
<link rel="shortcut icon" type="image/x-icon" href="img/favicon.ico">
|
<link rel="shortcut icon" type="image/x-icon" href="img/favicon.ico">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
|
||||||
<!--[if lt IE 9]>
|
<!--[if lt IE 9]>
|
||||||
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
|
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
|
||||||
<![endif]-->
|
<![endif]-->
|
||||||
|
|
||||||
<link type='text/css' href='css/style.css' rel='stylesheet'/>
|
<link type='text/css' href='css/style.css' rel='stylesheet'/>
|
||||||
<link type='text/css' href="css/bootstrap.min.css" rel="stylesheet">
|
<link type='text/css' href="css/bootstrap.min.css" rel="stylesheet">
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body style='background-color: #FBFBFB;'>
|
<body style='background-color: #FBFBFB;'>
|
||||||
<div id='main-container'>
|
<div id='main-container'>
|
||||||
<div class='header'>
|
<div class='header'>
|
||||||
<div class="header-box wrapper">
|
<div class="header-box wrapper">
|
||||||
<div class="hd-logo"><a href="#"><img src="img/logo.png" alt="Logo"/></a></div>
|
<div class="hd-logo"><a href="#"><img src="img/logo.png" alt="Logo"/></a></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="span12">
|
<div class="span12">
|
||||||
<h4> PHPMixBill Installer </h4>
|
<h4> PHPMixBill Installer </h4>
|
||||||
<p>
|
<p>
|
||||||
<strong>Congratulations!</strong><br>
|
<strong>Congratulations!</strong><br>
|
||||||
You have just install PHPMixBill !<br>
|
You have just install PHPMixBill !<br>
|
||||||
To Login Admin Portal:<br>
|
To Login Admin Portal:<br>
|
||||||
Use this link -
|
Use this link -
|
||||||
<?php
|
<?php
|
||||||
$cururl = (((!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off')|| $_SERVER['SERVER_PORT'] == 443)?'https':'http').'://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
|
$cururl = (((!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off')|| $_SERVER['SERVER_PORT'] == 443)?'https':'http').'://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
|
||||||
$appurl = str_replace('/install/step5.php', '', $cururl);
|
$appurl = str_replace('/install/step5.php', '', $cururl);
|
||||||
$appurl = str_replace('/system', '', $appurl);
|
$appurl = str_replace('/system', '', $appurl);
|
||||||
echo '<a href="' . $appurl . '/admin">' . $appurl . '/admin</a>';
|
echo '<a href="' . $appurl . '/admin">' . $appurl . '/admin</a>';
|
||||||
?>
|
?>
|
||||||
<br>
|
<br>
|
||||||
Username: admin<br>
|
Username: admin<br>
|
||||||
Password: admin<br>
|
Password: admin<br>
|
||||||
For security, Delete the <b>install</b> directory inside system folder.
|
For security, Delete the <b>install</b> directory inside system folder.
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="footer">Copyright © 2021 PHPMixBill. All Rights Reserved<br/><br/></div>
|
<div class="footer">Copyright © 2021 PHPMixBill. All Rights Reserved<br/><br/></div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
@ -17,10 +17,10 @@ function r2($to, $ntype = 'e', $msg = '')
|
|||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (file_exists('system/config.php')) {
|
if (file_exists('config.php')) {
|
||||||
require('system/config.php');
|
require('config.php');
|
||||||
} else {
|
} else {
|
||||||
r2('system/install');
|
r2('install');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -220,8 +220,7 @@ function _admin($login = true)
|
|||||||
|
|
||||||
function _raid($l)
|
function _raid($l)
|
||||||
{
|
{
|
||||||
$r = substr(str_shuffle(str_repeat('0123456789', $l)), 0, $l);
|
return substr(str_shuffle(str_repeat('0123456789', $l)), 0, $l);
|
||||||
return $r;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function _log($description, $type = '', $userid = '0')
|
function _log($description, $type = '', $userid = '0')
|
||||||
@ -263,6 +262,7 @@ function alphanumeric($str, $tambahan = "")
|
|||||||
function sendTelegram($txt)
|
function sendTelegram($txt)
|
||||||
{
|
{
|
||||||
global $_c;
|
global $_c;
|
||||||
|
run_hook('send_telegram'); #HOOK
|
||||||
if (!empty($_c['telegram_bot']) && !empty($_c['telegram_target_id'])) {
|
if (!empty($_c['telegram_bot']) && !empty($_c['telegram_target_id'])) {
|
||||||
file_get_contents('https://api.telegram.org/bot' . $_c['telegram_bot'] . '/sendMessage?chat_id=' . $_c['telegram_target_id'] . '&text=' . urlencode($txt));
|
file_get_contents('https://api.telegram.org/bot' . $_c['telegram_bot'] . '/sendMessage?chat_id=' . $_c['telegram_target_id'] . '&text=' . urlencode($txt));
|
||||||
}
|
}
|
||||||
@ -272,6 +272,7 @@ function sendTelegram($txt)
|
|||||||
function sendSMS($phone, $txt)
|
function sendSMS($phone, $txt)
|
||||||
{
|
{
|
||||||
global $_c;
|
global $_c;
|
||||||
|
run_hook('send_sms'); #HOOK
|
||||||
if (!empty($_c['sms_url'])) {
|
if (!empty($_c['sms_url'])) {
|
||||||
$smsurl = str_replace('[number]', urlencode($phone), $_c['sms_url']);
|
$smsurl = str_replace('[number]', urlencode($phone), $_c['sms_url']);
|
||||||
$smsurl = str_replace('[text]', urlencode($txt), $smsurl);
|
$smsurl = str_replace('[text]', urlencode($txt), $smsurl);
|
||||||
@ -282,6 +283,7 @@ function sendSMS($phone, $txt)
|
|||||||
function sendWhatsapp($phone, $txt)
|
function sendWhatsapp($phone, $txt)
|
||||||
{
|
{
|
||||||
global $_c;
|
global $_c;
|
||||||
|
run_hook('send_whatsapp'); #HOOK
|
||||||
if (!empty($_c['wa_url'])) {
|
if (!empty($_c['wa_url'])) {
|
||||||
$waurl = str_replace('[number]', urlencode($phone), $_c['wa_url']);
|
$waurl = str_replace('[number]', urlencode($phone), $_c['wa_url']);
|
||||||
$waurl = str_replace('[text]', urlencode($txt), $waurl);
|
$waurl = str_replace('[text]', urlencode($txt), $waurl);
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
* PHP Mikrotik Billing (https://ibnux.github.io/phpmixbill/)
|
* PHP Mikrotik Billing (https://ibnux.github.io/phpmixbill/)
|
||||||
**/
|
**/
|
||||||
|
|
||||||
require('config.php');
|
require('../config.php');
|
||||||
require('orm.php');
|
require('orm.php');
|
||||||
|
|
||||||
use PEAR2\Net\RouterOS;
|
use PEAR2\Net\RouterOS;
|
||||||
|
@ -7,7 +7,7 @@ if(php_sapi_name() !== 'cli'){
|
|||||||
die("RUN ON COMMAND LINE ONLY BY RADIUS ENGINE");
|
die("RUN ON COMMAND LINE ONLY BY RADIUS ENGINE");
|
||||||
}
|
}
|
||||||
|
|
||||||
require(__DIR__.'/config.php');
|
require(__DIR__.'/../config.php');
|
||||||
require(__DIR__.'/orm.php');
|
require(__DIR__.'/orm.php');
|
||||||
|
|
||||||
use PEAR2\Net\RouterOS;
|
use PEAR2\Net\RouterOS;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user