move config.php and install to root

This commit is contained in:
Ibnu Maksum 2022-09-19 09:31:35 +07:00
parent ac813ca132
commit 335c5e524b
No known key found for this signature in database
GPG key ID: 7FC82848810579E5
18 changed files with 365 additions and 363 deletions

2
.gitignore vendored
View file

@ -1,4 +1,4 @@
system/config.php
config.php
.DS_Store
.vscode/
ui/compiled/*.php

View file

@ -1,9 +1,9 @@
<?php
$db_host = "localhost"; # Database Host
$db_port = ""; # Database Port. Keep it blank if you are un sure.
$db_user = "root"; # Database Username
$db_password = ""; # Database Password
$db_name = "phpmixbill"; # Database Name
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
<?php
$db_host = "localhost"; # Database Host
$db_port = ""; # Database Port. Keep it blank if you are un sure.
$db_user = "root"; # Database Username
$db_password = ""; # Database Password
$db_name = "phpmixbill"; # Database Name
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
$_app_stage = 'Live'; # Do not change this

View file

Before

Width:  |  Height:  |  Size: 6.6 KiB

After

Width:  |  Height:  |  Size: 6.6 KiB

View file

Before

Width:  |  Height:  |  Size: 8.1 KiB

After

Width:  |  Height:  |  Size: 8.1 KiB

View file

@ -1,60 +1,60 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>PHPMixBill Installer</title>
<link rel="shortcut icon" type="image/x-icon" href="img/favicon.png">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!--[if lt IE 9]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<link type='text/css' href='css/style.css' rel='stylesheet' />
<link href="css/bootstrap.min.css" rel="stylesheet">
</head>
<body style='background-color: #FBFBFB;'>
<div id='main-container'>
<div class='header'>
<div class="header-box wrapper">
<div class="hd-logo"><a href="#"><img src="img/logo.png" alt="Logo" /></a></div>
</div>
</div>
<!-- contents area start -->
<div class="row">
<div class="col-md-12">
<h4> PHPMixBill Installer </h4>
<h5>Please Read Before Continue</h5>
<p><strong>Informasi Aplikasi</strong><br>
Application Name: PHPMixBill <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>
Donasi Paypal: <b>me@ibnux.et</b><br>
<br>
<strong>Syarat Penggunaan:</strong><br>
Syarat Penggunaan ini berlaku untuk semua versi.<br><br>
<ul>
<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.
Dengan catatan tidak menghapus link developer.</li>
<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>
<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
dan anda membeli produk kami.</li>
<li>Aplikasi ini bersifat sosial untuk dapat dikembangkan bersama. Karena itu kami juga mengundang relawan-relawan
yang mau menjadi pengembangkan aplikasi ini.</li>
<li>Penulis berhak setiap saat untuk mengubah ketentuan Syarat Penggunaan tanpa pemberitahuan sebelumnya.</li>
</ul>
</div>
<div class="col-md-12"><br>
<a href="step2.php" class="btn btn-primary">Accept &amp; Continue</a>
</div>
</div>
<!-- contents area end -->
</div>
<div class="footer">Copyright &copy; 2021 PHPMixBill. All Rights Reserved<br /><br /></div>
</body>
<!DOCTYPE html>
<html lang="en">
<head>
<title>PHPMixBill Installer</title>
<link rel="shortcut icon" type="image/x-icon" href="img/favicon.png">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!--[if lt IE 9]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<link type='text/css' href='css/style.css' rel='stylesheet' />
<link href="css/bootstrap.min.css" rel="stylesheet">
</head>
<body style='background-color: #FBFBFB;'>
<div id='main-container'>
<div class='header'>
<div class="header-box wrapper">
<div class="hd-logo"><a href="#"><img src="img/logo.png" alt="Logo" /></a></div>
</div>
</div>
<!-- contents area start -->
<div class="row">
<div class="col-md-12">
<h4> PHPMixBill Installer </h4>
<h5>Please Read Before Continue</h5>
<p><strong>Informasi Aplikasi</strong><br>
Application Name: PHPMixBill <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>
Donasi Paypal: <b>me@ibnux.et</b><br>
<br>
<strong>Syarat Penggunaan:</strong><br>
Syarat Penggunaan ini berlaku untuk semua versi.<br><br>
<ul>
<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.
Dengan catatan tidak menghapus link developer.</li>
<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>
<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
dan anda membeli produk kami.</li>
<li>Aplikasi ini bersifat sosial untuk dapat dikembangkan bersama. Karena itu kami juga mengundang relawan-relawan
yang mau menjadi pengembangkan aplikasi ini.</li>
<li>Penulis berhak setiap saat untuk mengubah ketentuan Syarat Penggunaan tanpa pemberitahuan sebelumnya.</li>
</ul>
</div>
<div class="col-md-12"><br>
<a href="step2.php" class="btn btn-primary">Accept &amp; Continue</a>
</div>
</div>
<!-- contents area end -->
</div>
<div class="footer">Copyright &copy; 2021 PHPMixBill. All Rights Reserved<br /><br /></div>
</body>
</html>

View file

@ -1,70 +1,70 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>PHPMixBill Installer</title>
<link rel="shortcut icon" type="image/x-icon" href="img/favicon.ico">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!--[if lt IE 9]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<link type='text/css' href='css/style.css' rel='stylesheet' />
<link type='text/css' href="css/bootstrap.min.css" rel="stylesheet">
</head>
<body style='background-color: #FBFBFB;'>
<div id='main-container'>
<div class='header'>
<div class="header-box wrapper">
<div class="hd-logo"><a href="#"><img src="img/logo.png" alt="Logo" /></a></div>
</div>
</div>
<div class="span12">
<h4> PHPMixBill Installer </h4>
<?php
$passed = '';
$ltext = '';
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/>";
$passed .= '1';
} 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/>";
$passed .= '0';
}
if (extension_loaded('PDO')) {
$ltext .= 'PDO is installed on your server: ' . "Tested <strong>---PASSED---</strong><br/>";
$passed .= '1';
} else {
$ltext = 'PDO is installed on your server: ' . "Tested <strong>---FAILED---</strong><br/>";
$passed .= '0';
}
if (extension_loaded('pdo_mysql')) {
$ltext .= 'PDO MySQL driver is enabled on your server: ' . "Tested <strong>---PASSED---</strong><br/>";
$passed .= '1';
} else {
$ltext .= 'PDO MySQL driver is not enabled on your server: ' . "Tested <strong>---FAILED---</strong><br/>";
$passed .= '0';
}
if ($passed == '111') {
echo ("<br/> $ltext <br/> Great! System Test Completed. You can run PHPMixBill on your server. Click Continue For Next Step.
<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>");
} else {
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
<br><br>
<a href=\"#\" class=\"btn btn-primary disabled\">Correct The Problem To Continue</a>");
}
?>
</div>
</div>
<div class="footer">Copyright &copy; 2021 PHPMixBill. All Rights Reserved<br /><br /></div>
</body>
<!DOCTYPE html>
<html lang="en">
<head>
<title>PHPMixBill Installer</title>
<link rel="shortcut icon" type="image/x-icon" href="img/favicon.ico">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!--[if lt IE 9]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<link type='text/css' href='css/style.css' rel='stylesheet' />
<link type='text/css' href="css/bootstrap.min.css" rel="stylesheet">
</head>
<body style='background-color: #FBFBFB;'>
<div id='main-container'>
<div class='header'>
<div class="header-box wrapper">
<div class="hd-logo"><a href="#"><img src="img/logo.png" alt="Logo" /></a></div>
</div>
</div>
<div class="span12">
<h4> PHPMixBill Installer </h4>
<?php
$passed = '';
$ltext = '';
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/>";
$passed .= '1';
} 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/>";
$passed .= '0';
}
if (extension_loaded('PDO')) {
$ltext .= 'PDO is installed on your server: ' . "Tested <strong>---PASSED---</strong><br/>";
$passed .= '1';
} else {
$ltext = 'PDO is installed on your server: ' . "Tested <strong>---FAILED---</strong><br/>";
$passed .= '0';
}
if (extension_loaded('pdo_mysql')) {
$ltext .= 'PDO MySQL driver is enabled on your server: ' . "Tested <strong>---PASSED---</strong><br/>";
$passed .= '1';
} else {
$ltext .= 'PDO MySQL driver is not enabled on your server: ' . "Tested <strong>---FAILED---</strong><br/>";
$passed .= '0';
}
if ($passed == '111') {
echo ("<br/> $ltext <br/> Great! System Test Completed. You can run PHPMixBill on your server. Click Continue For Next Step.
<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>");
} else {
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
<br><br>
<a href=\"#\" class=\"btn btn-primary disabled\">Correct The Problem To Continue</a>");
}
?>
</div>
</div>
<div class="footer">Copyright &copy; 2021 PHPMixBill. All Rights Reserved<br /><br /></div>
</body>
</html>

View file

@ -1,72 +1,72 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>PHPMixBill Installer</title>
<link rel="shortcut icon" type="image/x-icon" href="img/favicon.ico">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!--[if lt IE 9]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<link type='text/css' href='css/style.css' rel='stylesheet'/>
<link type='text/css' href="css/bootstrap.min.css" rel="stylesheet">
</head>
<body style='background-color: #FBFBFB;'>
<div id='main-container'>
<div class='header'>
<div class="header-box wrapper">
<div class="hd-logo"><a href="#"><img src="img/logo.png" alt="Logo"/></a></div>
</div>
</div>
<div class="span12">
<h4> PHPMixBill Installer </h4>
<?php
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>';
}//
$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('?_error=1', '', $appurl);
$appurl = str_replace('/system', '', $appurl);
?>
<form action="step4.php" method="post">
<fieldset>
<legend>Database Connection &amp Site config</legend>
<div class="form-group">
<label for="appurl">Application URL</label>
<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>
</div>
<div class="form-group">
<label for="dbhost">Database Host</label>
<input type="text" class="form-control" id="dbhost" name="dbhost">
</div>
<div class="form-group">
<label for="dbuser">Database Username</label>
<input type="text" class="form-control" id="dbuser" name="dbuser">
</div>
<div class="form-group">
<label for="dbpass">Database Password</label>
<input type="text" class="form-control" id="dbpass" name="dbpass">
</div>
<div class="form-group">
<label for="dbname">Database Name</label>
<input type="text" class="form-control" id="dbname" name="dbname">
</div>
<button type="submit" class="btn btn-primary">Submit</button>
</fieldset>
</form>
</div>
</div>
<div class="footer">Copyright &copy; 2021 PHPMixBill. All Rights Reserved<br/><br/></div>
</body>
</html>
<!DOCTYPE html>
<html lang="en">
<head>
<title>PHPMixBill Installer</title>
<link rel="shortcut icon" type="image/x-icon" href="img/favicon.ico">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!--[if lt IE 9]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<link type='text/css' href='css/style.css' rel='stylesheet'/>
<link type='text/css' href="css/bootstrap.min.css" rel="stylesheet">
</head>
<body style='background-color: #FBFBFB;'>
<div id='main-container'>
<div class='header'>
<div class="header-box wrapper">
<div class="hd-logo"><a href="#"><img src="img/logo.png" alt="Logo"/></a></div>
</div>
</div>
<div class="span12">
<h4> PHPMixBill Installer </h4>
<?php
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>';
}//
$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('?_error=1', '', $appurl);
$appurl = str_replace('/system', '', $appurl);
?>
<form action="step4.php" method="post">
<fieldset>
<legend>Database Connection &amp Site config</legend>
<div class="form-group">
<label for="appurl">Application URL</label>
<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>
</div>
<div class="form-group">
<label for="dbhost">Database Host</label>
<input type="text" class="form-control" id="dbhost" name="dbhost">
</div>
<div class="form-group">
<label for="dbuser">Database Username</label>
<input type="text" class="form-control" id="dbuser" name="dbuser">
</div>
<div class="form-group">
<label for="dbpass">Database Password</label>
<input type="text" class="form-control" id="dbpass" name="dbpass">
</div>
<div class="form-group">
<label for="dbname">Database Name</label>
<input type="text" class="form-control" id="dbname" name="dbname">
</div>
<button type="submit" class="btn btn-primary">Submit</button>
</fieldset>
</form>
</div>
</div>
<div class="footer">Copyright &copy; 2021 PHPMixBill. All Rights Reserved<br/><br/></div>
</body>
</html>

View file

@ -1,102 +1,102 @@
<?php
/**
* PHP Mikrotik Billing (https://ibnux.github.io/phpmixbill/)
**/
//error_reporting (0);
$appurl = $_POST['appurl'];
$db_host = $_POST['dbhost'];
$db_user = $_POST['dbuser'];
$db_password = $_POST['dbpass'];
$db_name = $_POST['dbname'];
$cn = '0';
try{
$dbh = new pdo( "mysql:host=$db_host;dbname=$db_name",
"$db_user",
"$db_password",
array(PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION));
$cn = '1';
}
catch(PDOException $ex){
$cn = '0';
}
if ($cn == '1') {
$input = '<?php
$db_host = \'' . $db_host . '\';
$db_user = \'' . $db_user . '\';
$db_password = \'' . $db_password . '\';
$db_name = \'' . $db_name . '\';
define(\'APP_URL\', \'' . $appurl . '\');
$_app_stage = \'Live\';';
$wConfig = "../config.php";
$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");
fwrite($fh, $input);
fclose($fh);
$sql = file_get_contents('phpmixbill.sql');
$qr = $dbh->exec($sql);
} else {
header("location: step3.php?_error=1");
exit;
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<title>PHPMixBill Installer</title>
<link rel="shortcut icon" type="image/x-icon" href="img/favicon.ico">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!--[if lt IE 9]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<link type='text/css' href='css/style.css' rel='stylesheet'/>
<link type='text/css' href="css/bootstrap.min.css" rel="stylesheet">
</head>
<body style='background-color: #FBFBFB;'>
<div id='main-container'>
<div class='header'>
<div class="header-box wrapper">
<div class="hd-logo"><a href="#"><img src="img/logo.png" alt="Logo"/></a></div>
</div>
</div>
<div class="span12">
<h4> PHPMixBill Installer </h4>
<?php
if ($cn == '1') {
?>
<p><strong>Config File Created and Database Imported.</strong><br></p>
<form action="step5.php" method="post">
<fieldset>
<legend>Click Continue</legend>
<button type='submit' class='btn btn-primary'>Continue</button>
</fieldset>
</form>
<?php
} elseif ($cn == '2') {
?>
<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
helping on installation</p>
<?php
} else {
?>
<p> MySQL Connection Failed.</p>
<?php
}
?>
</div>
</div>
<div class="footer">Copyright &copy; 2021 PHPMixBill. All Rights Reserved<br/><br/></div>
</body>
</html>
<?php
/**
* PHP Mikrotik Billing (https://ibnux.github.io/phpmixbill/)
**/
//error_reporting (0);
$appurl = $_POST['appurl'];
$db_host = $_POST['dbhost'];
$db_user = $_POST['dbuser'];
$db_password = $_POST['dbpass'];
$db_name = $_POST['dbname'];
$cn = '0';
try{
$dbh = new pdo( "mysql:host=$db_host;dbname=$db_name",
"$db_user",
"$db_password",
array(PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION));
$cn = '1';
}
catch(PDOException $ex){
$cn = '0';
}
if ($cn == '1') {
$input = '<?php
$db_host = \'' . $db_host . '\';
$db_user = \'' . $db_user . '\';
$db_password = \'' . $db_password . '\';
$db_name = \'' . $db_name . '\';
define(\'APP_URL\', \'' . $appurl . '\');
$_app_stage = \'Live\';';
$wConfig = "../config.php";
$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");
fwrite($fh, $input);
fclose($fh);
$sql = file_get_contents('phpmixbill.sql');
$qr = $dbh->exec($sql);
} else {
header("location: step3.php?_error=1");
exit;
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<title>PHPMixBill Installer</title>
<link rel="shortcut icon" type="image/x-icon" href="img/favicon.ico">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!--[if lt IE 9]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<link type='text/css' href='css/style.css' rel='stylesheet'/>
<link type='text/css' href="css/bootstrap.min.css" rel="stylesheet">
</head>
<body style='background-color: #FBFBFB;'>
<div id='main-container'>
<div class='header'>
<div class="header-box wrapper">
<div class="hd-logo"><a href="#"><img src="img/logo.png" alt="Logo"/></a></div>
</div>
</div>
<div class="span12">
<h4> PHPMixBill Installer </h4>
<?php
if ($cn == '1') {
?>
<p><strong>Config File Created and Database Imported.</strong><br></p>
<form action="step5.php" method="post">
<fieldset>
<legend>Click Continue</legend>
<button type='submit' class='btn btn-primary'>Continue</button>
</fieldset>
</form>
<?php
} elseif ($cn == '2') {
?>
<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
helping on installation</p>
<?php
} else {
?>
<p> MySQL Connection Failed.</p>
<?php
}
?>
</div>
</div>
<div class="footer">Copyright &copy; 2021 PHPMixBill. All Rights Reserved<br/><br/></div>
</body>
</html>

View file

@ -1,46 +1,46 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>PHPMixBill Installer</title>
<link rel="shortcut icon" type="image/x-icon" href="img/favicon.ico">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!--[if lt IE 9]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<link type='text/css' href='css/style.css' rel='stylesheet'/>
<link type='text/css' href="css/bootstrap.min.css" rel="stylesheet">
</head>
<body style='background-color: #FBFBFB;'>
<div id='main-container'>
<div class='header'>
<div class="header-box wrapper">
<div class="hd-logo"><a href="#"><img src="img/logo.png" alt="Logo"/></a></div>
</div>
</div>
<div class="span12">
<h4> PHPMixBill Installer </h4>
<p>
<strong>Congratulations!</strong><br>
You have just install PHPMixBill !<br>
To Login Admin Portal:<br>
Use this link -
<?php
$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('/system', '', $appurl);
echo '<a href="' . $appurl . '/admin">' . $appurl . '/admin</a>';
?>
<br>
Username: admin<br>
Password: admin<br>
For security, Delete the <b>install</b> directory inside system folder.
</p>
</div>
</div>
<div class="footer">Copyright &copy; 2021 PHPMixBill. All Rights Reserved<br/><br/></div>
</body>
<!DOCTYPE html>
<html lang="en">
<head>
<title>PHPMixBill Installer</title>
<link rel="shortcut icon" type="image/x-icon" href="img/favicon.ico">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!--[if lt IE 9]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<link type='text/css' href='css/style.css' rel='stylesheet'/>
<link type='text/css' href="css/bootstrap.min.css" rel="stylesheet">
</head>
<body style='background-color: #FBFBFB;'>
<div id='main-container'>
<div class='header'>
<div class="header-box wrapper">
<div class="hd-logo"><a href="#"><img src="img/logo.png" alt="Logo"/></a></div>
</div>
</div>
<div class="span12">
<h4> PHPMixBill Installer </h4>
<p>
<strong>Congratulations!</strong><br>
You have just install PHPMixBill !<br>
To Login Admin Portal:<br>
Use this link -
<?php
$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('/system', '', $appurl);
echo '<a href="' . $appurl . '/admin">' . $appurl . '/admin</a>';
?>
<br>
Username: admin<br>
Password: admin<br>
For security, Delete the <b>install</b> directory inside system folder.
</p>
</div>
</div>
<div class="footer">Copyright &copy; 2021 PHPMixBill. All Rights Reserved<br/><br/></div>
</body>
</html>

View file

@ -17,10 +17,10 @@ function r2($to, $ntype = 'e', $msg = '')
exit;
}
if (file_exists('system/config.php')) {
require('system/config.php');
if (file_exists('config.php')) {
require('config.php');
} else {
r2('system/install');
r2('install');
}
@ -220,8 +220,7 @@ function _admin($login = true)
function _raid($l)
{
$r = substr(str_shuffle(str_repeat('0123456789', $l)), 0, $l);
return $r;
return substr(str_shuffle(str_repeat('0123456789', $l)), 0, $l);
}
function _log($description, $type = '', $userid = '0')
@ -263,6 +262,7 @@ function alphanumeric($str, $tambahan = "")
function sendTelegram($txt)
{
global $_c;
run_hook('send_telegram'); #HOOK
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));
}
@ -272,6 +272,7 @@ function sendTelegram($txt)
function sendSMS($phone, $txt)
{
global $_c;
run_hook('send_sms'); #HOOK
if (!empty($_c['sms_url'])) {
$smsurl = str_replace('[number]', urlencode($phone), $_c['sms_url']);
$smsurl = str_replace('[text]', urlencode($txt), $smsurl);
@ -282,6 +283,7 @@ function sendSMS($phone, $txt)
function sendWhatsapp($phone, $txt)
{
global $_c;
run_hook('send_whatsapp'); #HOOK
if (!empty($_c['wa_url'])) {
$waurl = str_replace('[number]', urlencode($phone), $_c['wa_url']);
$waurl = str_replace('[text]', urlencode($txt), $waurl);

View file

@ -3,7 +3,7 @@
* PHP Mikrotik Billing (https://ibnux.github.io/phpmixbill/)
**/
require('config.php');
require('../config.php');
require('orm.php');
use PEAR2\Net\RouterOS;

View file

@ -7,7 +7,7 @@ if(php_sapi_name() !== 'cli'){
die("RUN ON COMMAND LINE ONLY BY RADIUS ENGINE");
}
require(__DIR__.'/config.php');
require(__DIR__.'/../config.php');
require(__DIR__.'/orm.php');
use PEAR2\Net\RouterOS;