forked from kevinowino869/mitrobill
Voucher Template, Disquss, static pages, bug menu
Voucher template di kanan bisa diganti, di kiri permanen, silahkan edit di themes kalo mau. Disquss untuk diskusi, static pages untuk kenten statis jarang diubah, ada bug di menu kalo di mobile tidak bisa di klik menu kanan nya, diperbaiki dengan cara paksa
This commit is contained in:
@ -80,6 +80,7 @@ $ui->assign('app_url', APP_URL);
|
||||
define('U', APP_URL.'/index.php?_route=');
|
||||
$ui->assign('_url', APP_URL.'/index.php?_route=');
|
||||
$ui->assign('_theme', $_theme);
|
||||
$ui->assign('_path', __DIR__);
|
||||
$ui->assign('_c', $config);
|
||||
$ui->assign('_L', $_L);
|
||||
$ui->assign('_system_menu', 'dashboard');
|
||||
|
23
system/controllers/disquss.php
Normal file
23
system/controllers/disquss.php
Normal file
@ -0,0 +1,23 @@
|
||||
<?php
|
||||
/**
|
||||
* PHP Mikrotik Billing (www.phpmixbill.com)
|
||||
* Ibnu Maksum <me@ibnux.net>
|
||||
* @copyright Copyright (C) 2014-2015 PHP Mikrotik Billing
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
* @donate PayPal: me@ibnux.net
|
||||
**/
|
||||
_admin();
|
||||
$ui->assign('_title', 'Disquss - '. $config['CompanyName']);
|
||||
$ui->assign('_system_menu', 'disquss');
|
||||
|
||||
$admin = Admin::_info();
|
||||
$ui->assign('_admin', $admin);
|
||||
|
||||
if($admin['user_type'] != 'Admin' AND $admin['user_type'] != 'Sales'){
|
||||
r2(U."dashboard",'e',$_L['Do_Not_Access']);
|
||||
}
|
||||
|
||||
switch ($action) {
|
||||
default:
|
||||
$ui->display('disquss.tpl');
|
||||
}
|
@ -11,10 +11,13 @@ _auth();
|
||||
$ui->assign('_title', $_L['Order_Voucher'].'- '. $config['CompanyName']);
|
||||
$ui->assign('_system_menu', 'order');
|
||||
|
||||
$action = $routes['1'];
|
||||
$user = User::_info();
|
||||
$ui->assign('_user', $user);
|
||||
|
||||
switch ($action) {
|
||||
default:
|
||||
$ui->display('404.tpl');
|
||||
}
|
||||
if(file_exists(__DIR__."/../../pages/".str_replace(".","",$action).".html")){
|
||||
$ui->assign("PageFile",$action);
|
||||
$ui->assign("pageHeader",$action);
|
||||
$ui->display('user-pages.tpl');
|
||||
}else
|
||||
$ui->display('404.tpl');
|
42
system/controllers/pages.php
Normal file
42
system/controllers/pages.php
Normal file
@ -0,0 +1,42 @@
|
||||
<?php
|
||||
/**
|
||||
* PHP Mikrotik Billing (www.phpmixbill.com)
|
||||
* Ismail Marzuqi <iesien22@yahoo.com>
|
||||
* @version 5.0
|
||||
* @copyright Copyright (C) 2014-2015 PHP Mikrotik Billing
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
* @donate PayPal: iesien22@yahoo.com / Bank Mandiri: 130.00.1024957.4
|
||||
**/
|
||||
_admin();
|
||||
$ui->assign('_title', 'Pages - '. $config['CompanyName']);
|
||||
$ui->assign('_system_menu', 'pages');
|
||||
|
||||
$action = $routes['1'];
|
||||
$admin = Admin::_info();
|
||||
$ui->assign('_admin', $admin);
|
||||
|
||||
if(strpos($action,"-post")===false){
|
||||
$path = __DIR__."/../../pages/".str_replace(".","",$action).".html";
|
||||
//echo $path;
|
||||
if(file_exists($path)){
|
||||
$html = file_get_contents($path);
|
||||
$ui->assign("htmls",str_replace(["<div","</div>"],"",$html));
|
||||
$ui->assign("writeable",is_writable($path));
|
||||
$ui->assign("pageHeader",$action);
|
||||
$ui->assign("PageFile",$action);
|
||||
$ui->display('page-edit.tpl');
|
||||
}else
|
||||
$ui->display('a404.tpl');
|
||||
}else{
|
||||
$action = str_replace("-post","",$action);
|
||||
$path = __DIR__."/../../pages/".str_replace(".","",$action).".html";
|
||||
if(file_exists($path)){
|
||||
$html = _post("html");
|
||||
if(file_put_contents($path, str_replace(["<div","</div>"],"",$html))){
|
||||
r2(U . 'pages/'.$action, 's', $_L['Success_Save_Page']);
|
||||
}else{
|
||||
r2(U . 'pages/'.$action, 'e', $_L['Failed_Save_Page']);
|
||||
}
|
||||
}else
|
||||
$ui->display('a404.tpl');
|
||||
}
|
@ -427,28 +427,79 @@ switch ($action) {
|
||||
|
||||
case 'print-voucher':
|
||||
$from_id = _post('from_id')*1;
|
||||
$pagebreak = _post('pagebreak');
|
||||
if ($from_id != ''){
|
||||
$planid = _post('planid')*1;
|
||||
$pagebreak = _post('pagebreak')*1;
|
||||
$limit = _post('limit')*1;
|
||||
|
||||
if($pagebreak<1) $pagebreak = 6;
|
||||
|
||||
if($limit<1) $limit = $pagebreak *2;
|
||||
|
||||
if ($from_id >0 && $planid >0){
|
||||
$v = ORM::for_table('tbl_plans')
|
||||
->join('tbl_voucher', array('tbl_plans.id', '=', 'tbl_voucher.id_plan'))
|
||||
->where('tbl_voucher.status','0')
|
||||
->where('tbl_plans.id',$planid)
|
||||
->where_gt('tbl_voucher.id',$from_id)
|
||||
->limit($limit)
|
||||
->find_many();
|
||||
$vc = ORM::for_table('tbl_plans')
|
||||
->join('tbl_voucher', array('tbl_plans.id', '=', 'tbl_voucher.id_plan'))
|
||||
->where('tbl_voucher.status','0')
|
||||
->where('tbl_plans.id',$planid)
|
||||
->where_gt('tbl_voucher.id',$from_id)
|
||||
->count();
|
||||
}else if ($from_id == 0 && $planid > 0){
|
||||
$v = ORM::for_table('tbl_plans')
|
||||
->join('tbl_voucher', array('tbl_plans.id', '=', 'tbl_voucher.id_plan'))
|
||||
->where('tbl_voucher.status','0')
|
||||
->where('tbl_plans.id',$planid)
|
||||
->limit($limit)
|
||||
->find_many();
|
||||
$vc = ORM::for_table('tbl_plans')
|
||||
->join('tbl_voucher', array('tbl_plans.id', '=', 'tbl_voucher.id_plan'))
|
||||
->where('tbl_voucher.status','0')
|
||||
->where('tbl_plans.id',$planid)
|
||||
->count();
|
||||
}else if ($from_id > 0 && $planid == 0){
|
||||
$v = ORM::for_table('tbl_plans')
|
||||
->join('tbl_voucher', array('tbl_plans.id', '=', 'tbl_voucher.id_plan'))
|
||||
->where('tbl_voucher.status','0')
|
||||
->where_gt('tbl_voucher.id',$from_id)
|
||||
->limit($limit)
|
||||
->find_many();
|
||||
$vc = ORM::for_table('tbl_plans')
|
||||
->join('tbl_voucher', array('tbl_plans.id', '=', 'tbl_voucher.id_plan'))
|
||||
->where('tbl_voucher.status','0')
|
||||
->where_gt('tbl_voucher.id',$from_id)
|
||||
->count();
|
||||
}else{
|
||||
$v = ORM::for_table('tbl_plans')
|
||||
->join('tbl_voucher', array('tbl_plans.id', '=', 'tbl_voucher.id_plan'))
|
||||
->where('tbl_voucher.status','0')
|
||||
->limit($limit)
|
||||
->find_many();
|
||||
$vc = ORM::for_table('tbl_plans')
|
||||
->join('tbl_voucher', array('tbl_plans.id', '=', 'tbl_voucher.id_plan'))
|
||||
->where('tbl_voucher.status','0')
|
||||
->count();
|
||||
}
|
||||
|
||||
$ui->assign('_title', $_L['Voucher_Hotspot'].' - '. $config['CompanyName']);
|
||||
$ui->assign('from_id',$from_id);
|
||||
if($pagebreak<1) $pagebreak = 6;
|
||||
$ui->assign('pagebreak',$pagebreak);
|
||||
|
||||
$plans = ORM::for_table('tbl_plans')->find_many();
|
||||
$ui->assign('plans',$plans);
|
||||
$ui->assign('limit',$limit);
|
||||
$ui->assign('planid',$planid);
|
||||
|
||||
$ui->assign('v',$v);
|
||||
$ui->assign('vc',$vc);
|
||||
|
||||
//for counting pagebreak
|
||||
$ui->assign('jml',0);
|
||||
|
||||
$ui->display('print-voucher.tpl');
|
||||
break;
|
||||
case 'voucher-post':
|
||||
|
@ -35,6 +35,11 @@ $_L['Created_Successfully'] = 'Data Created Successfully';
|
||||
$_L['Updated_Successfully'] = 'Data Updated Successfully';
|
||||
$_L['Delete_Successfully'] = 'Data Deleted Successfully';
|
||||
|
||||
$_L['Static_Pages'] = "Static Pages";
|
||||
$_L['Failed_Save_Page'] = "Failed to save page, make sure i can write to folder pages, <i>chmod 664 pages/*.html<i>";
|
||||
$_L['Success_Save_Page'] = "Saving page success";
|
||||
$_L['Info_Page'] = "Sometimes you need to refresh 3 times until content change";
|
||||
|
||||
$_L['Dashboard'] = 'Dashboard';
|
||||
$_L['Search_Contact'] = 'Search Customers...';
|
||||
$_L['My_Account'] = 'My Account';
|
||||
@ -209,7 +214,7 @@ $_L['Title'] = 'Title';
|
||||
$_L['Message'] = 'Message';
|
||||
$_L['Account_Information'] = 'Your Account Information';
|
||||
$_L['Welcome_Text_User'] = 'Welcome to the Panel Members page, on this page you can:';
|
||||
$_L['Welcome_Text_Admin'] = '<b>PHPMixBill</b> adalah sebuah aplikasi billing Hotspot dan PPPOE untuk Mikrotik dengan menggunakan bahasa pemograman PHP dan menggunakan API Mikrotik sebagai komunikasi dengan router. Jika aplikasi ini sangat berguna bagi bisnis Anda silahkan Anda donasi berapapun.';
|
||||
$_L['Welcome_Text_Admin'] = '<b>PHPMixBill</b> is a billing Hotspot and PPPOE for Mikrotik using PHP and Mikrotik API to comunicate with router. If you get more profit with this application, please donate us.<br>Watch project <a href="https://github.com/ibnux/phpmixbill" target="_blank">in here</a>';
|
||||
|
||||
//update
|
||||
$_L['Invalid_Username_or_Password'] = 'Invalid Username or Password';
|
||||
|
@ -35,6 +35,11 @@ $_L['Created_Successfully'] = 'Data berhasil di buat';
|
||||
$_L['Updated_Successfully'] = 'Data berhasil di ubah';
|
||||
$_L['Delete_Successfully'] = 'Berhasil menghapus data';
|
||||
|
||||
$_L['Static_Pages'] = "Halaman statis";
|
||||
$_L['Failed_Save_Page'] = "Gagal menyimpan halaman, pastikan diperbolehkan menulis file di folder pages, <i>chmod 664 pages/*.html<i>";
|
||||
$_L['Success_Save_Page'] = "Sukses menyimpan halaman";
|
||||
$_L['Info_Page'] = "Kadang harus di-refresh 3 kali baru konten berubah";
|
||||
|
||||
$_L['Dashboard'] = 'Beranda';
|
||||
$_L['Search_Contact'] = 'Cari username member...';
|
||||
$_L['My_Account'] = 'Akun Saya';
|
||||
@ -208,7 +213,7 @@ $_L['Title'] = 'Title';
|
||||
$_L['Message'] = 'Message';
|
||||
$_L['Account_Information'] = 'Informasi Akun Anda';
|
||||
$_L['Welcome_Text_User'] = 'Selamat datang di Member Panel, disini Anda dapat mengetahui:';
|
||||
$_L['Welcome_Text_Admin'] = '<b>PHPMixBill</b> adalah sebuah aplikasi billing Hotspot dan PPPOE untuk Mikrotik dengan menggunakan bahasa pemograman PHP dan menggunakan API Mikrotik sebagai komunikasi dengan router. Jika aplikasi ini sangat berguna bagi bisnis Anda silahkan Anda donasi berapapun.';
|
||||
$_L['Welcome_Text_Admin'] = '<b>PHPMixBill</b> adalah sebuah aplikasi billing Hotspot dan PPPOE untuk Mikrotik dengan menggunakan bahasa pemograman PHP dan menggunakan API Mikrotik sebagai komunikasi dengan router. Jika aplikasi ini sangat berguna bagi bisnis Anda silahkan Anda donasi berapapun.<br>Pantau proyek <a href="https://github.com/ibnux/phpmixbill" target="_blank">disini</a>';
|
||||
|
||||
//update
|
||||
$_L['Invalid_Username_or_Password'] = 'Username atau Password Salah';
|
||||
|
Reference in New Issue
Block a user