mirror of
https://github.com/hotspotbilling/phpnuxbill.git
synced 2024-11-14 12:17:18 +08:00
26 lines
No EOL
671 B
PHP
26 lines
No EOL
671 B
PHP
<?php
|
|
/**
|
|
* PHP Mikrotik Billing (https://ibnux.github.io/phpmixbill/)
|
|
**/
|
|
|
|
if(php_sapi_name() !== 'cli'){
|
|
die("RUN ON COMMAND LINE ONLY BY RADIUS ENGINE");
|
|
}
|
|
|
|
require('config.php');
|
|
require('orm.php');
|
|
|
|
use PEAR2\Net\RouterOS;
|
|
require_once 'autoload/PEAR2/Autoload.php';
|
|
|
|
ORM::configure("mysql:host=$db_host;dbname=$db_name");
|
|
ORM::configure('username', $db_user);
|
|
ORM::configure('password', $db_password);
|
|
ORM::configure('return_result_sets', true);
|
|
ORM::configure('logging', true);
|
|
|
|
$result = ORM::for_table('tbl_appconfig')->find_many();
|
|
foreach($result as $value){
|
|
$config[$value['setting']]=$value['value'];
|
|
}
|
|
date_default_timezone_set($config['timezone']); |