Commit 57b81eb9 by Tobin

Merge branch 'master' into 'dev_production'

Master See merge request !24
parents f2c6ddf1 a8c975b5
/application/controllers/Webservice.php /application/config/database.php
/application/models/Webservice_model.php /.htaccess
/application/models/Validation_app_model.php /application/config/config.php
/index.php
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [L]
</IfModule>
\ No newline at end of file
<IfModule authz_core_module> <IfModule mod_rewrite.c>
Require all denied RewriteEngine On
</IfModule> RewriteCond %{REQUEST_FILENAME} !-f
<IfModule !authz_core_module> RewriteCond %{REQUEST_FILENAME} !-d
Deny from all RewriteRule ^(.*)$ index.php?/$1 [L]
</IfModule> </IfModule>
\ No newline at end of file
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*
| -------------------------------------------------------------------
| DATABASE CONNECTIVITY SETTINGS
| -------------------------------------------------------------------
| This file will contain the settings needed to access your database.
|
| For complete instructions please consult the 'Database Connection'
| page of the User Guide.
|
| -------------------------------------------------------------------
| EXPLANATION OF VARIABLES
| -------------------------------------------------------------------
|
| ['dsn'] The full DSN string describe a connection to the database.
| ['hostname'] The hostname of your database server.
| ['username'] The username used to connect to the database
| ['password'] The password used to connect to the database
| ['database'] The name of the database you want to connect to
| ['dbdriver'] The database driver. e.g.: mysqli.
| Currently supported:
| cubrid, ibase, mssql, mysql, mysqli, oci8,
| odbc, pdo, postgre, sqlite, sqlite3, sqlsrv
| ['dbprefix'] You can add an optional prefix, which will be added
| to the table name when using the Query Builder class
| ['pconnect'] TRUE/FALSE - Whether to use a persistent connection
| ['db_debug'] TRUE/FALSE - Whether database errors should be displayed.
| ['cache_on'] TRUE/FALSE - Enables/disables query caching
| ['cachedir'] The path to the folder where cache files should be stored
| ['char_set'] The character set used in communicating with the database
| ['dbcollat'] The character collation used in communicating with the database
| NOTE: For MySQL and MySQLi databases, this setting is only used
| as a backup if your server is running PHP < 5.2.3 or MySQL < 5.0.7
| (and in table creation queries made with DB Forge).
| There is an incompatibility in PHP with mysql_real_escape_string() which
| can make your site vulnerable to SQL injection if you are using a
| multi-byte character set and are running versions lower than these.
| Sites using Latin-1 or UTF-8 database character set and collation are unaffected.
| ['swap_pre'] A default table prefix that should be swapped with the dbprefix
| ['encrypt'] Whether or not to use an encrypted connection.
|
| 'mysql' (deprecated), 'sqlsrv' and 'pdo/sqlsrv' drivers accept TRUE/FALSE
| 'mysqli' and 'pdo/mysql' drivers accept an array with the following options:
|
| 'ssl_key' - Path to the private key file
| 'ssl_cert' - Path to the public key certificate file
| 'ssl_ca' - Path to the certificate authority file
| 'ssl_capath' - Path to a directory containing trusted CA certificats in PEM format
| 'ssl_cipher' - List of *allowed* ciphers to be used for the encryption, separated by colons (':')
| 'ssl_verify' - TRUE/FALSE; Whether verify the server certificate or not ('mysqli' only)
|
| ['compress'] Whether or not to use client compression (MySQL only)
| ['stricton'] TRUE/FALSE - forces 'Strict Mode' connections
| - good for ensuring strict SQL while developing
| ['ssl_options'] Used to set various SSL options that can be used when making SSL connections.
| ['failover'] array - A array with 0 or more data for connections if the main should fail.
| ['save_queries'] TRUE/FALSE - Whether to "save" all executed queries.
| NOTE: Disabling this will also effectively disable both
| $this->db->last_query() and profiling of DB queries.
| When you run a query, with this setting set to TRUE (default),
| CodeIgniter will store the SQL statement for debugging purposes.
| However, this may cause high memory usage, especially if you run
| a lot of SQL queries ... disable this to avoid that problem.
|
| The $active_group variable lets you choose which connection group to
| make active. By default there is only one group (the 'default' group).
|
| The $query_builder variables lets you determine whether or not to load
| the query builder class.
*/
$active_group = 'default';
$query_builder = TRUE;
$db['default'] = array(
'dsn' => '',
'hostname' => 'localhost',
'username' => 'nuvento_timeout',
'password' => 'Golden_123',
'database' => 'nuvento_timeout',
'dbdriver' => 'mysqli',
'dbprefix' => '',
'pconnect' => FALSE,
'db_debug' => (ENVIRONMENT !== 'production'),
'cache_on' => FALSE,
'cachedir' => '',
'char_set' => 'utf8',
'dbcollat' => 'utf8_general_ci',
'swap_pre' => '',
'encrypt' => FALSE,
'compress' => FALSE,
'stricton' => FALSE,
'failover' => array(),
'save_queries' => TRUE
);
...@@ -40,22 +40,22 @@ class CMS extends CI_Controller { ...@@ -40,22 +40,22 @@ class CMS extends CI_Controller {
redirect(base_url($url)); redirect(base_url($url));
} }
if(isset($_POST['faq_en']) && empty($_POST['faq_en'])){ if(!isset($_POST['faq_en']) || empty($_POST['faq_en'])){
unset($_POST['faq_en']); unset($_POST['faq_en']);
} }
if(isset($_POST['privacy_policy_en']) && empty($_POST['privacy_policy_en'])){ if(!isset($_POST['privacy_policy_en']) || empty($_POST['privacy_policy_en'])){
unset($_POST['privacy_policy_en']); unset($_POST['privacy_policy_en']);
} }
if(isset($_POST['terms_and_conditions_en']) && empty($_POST['terms_and_conditions_en'])){ if(!isset($_POST['terms_and_conditions_en']) || empty($_POST['terms_and_conditions_en'])){
unset($_POST['terms_and_conditions_en']); unset($_POST['terms_and_conditions_en']);
} }
if(isset($_POST['faq_ar']) && empty($_POST['faq_ar'])){ if(!isset($_POST['faq_ar']) || empty($_POST['faq_ar'])){
unset($_POST['faq_ar']); unset($_POST['faq_ar']);
} }
if(isset($_POST['privacy_policy_ar']) && empty($_POST['privacy_policy_ar'])){ if(!isset($_POST['privacy_policy_ar']) || empty($_POST['privacy_policy_ar'])){
unset($_POST['privacy_policy_ar']); unset($_POST['privacy_policy_ar']);
} }
if(isset($_POST['terms_and_conditions_ar']) && empty($_POST['terms_and_conditions_ar'])){ if(!isset($_POST['terms_and_conditions_ar']) || empty($_POST['terms_and_conditions_ar'])){
unset($_POST['terms_and_conditions_ar']); unset($_POST['terms_and_conditions_ar']);
} }
...@@ -68,5 +68,48 @@ class CMS extends CI_Controller { ...@@ -68,5 +68,48 @@ class CMS extends CI_Controller {
redirect(base_url($url)); redirect(base_url($url));
} }
public function notification() {
$template['page'] = 'CMS/notification';
$template['menu'] = "Notification Templates";
$template['smenu'] = "Change Notification Templates";
$template['pTitle'] = "Notification Templates";
$template['page_head'] = "Notification Templates";
$template['pDescription'] = "Change Notification Templates";
$template['notificationData'] = $this->Cms_model->getNotifData();
$this->load->view('template',$template);
}
public function changeNotifData(){
$url = 'CMS/notification';
$flashMsg = array('message'=>'Something went wrong, please try again..!','class'=>'error');
if(!isset($_POST) || empty($_POST)){
$this->session->set_flashdata('message',$flashMsg);
redirect(base_url($url));
}
if(!isset($_POST['forgot_mail']) || empty($_POST['forgot_mail'])){
unset($_POST['forgot_mail']);
}
if(!isset($_POST['forgot_sms']) || empty($_POST['forgot_sms'])){
unset($_POST['forgot_sms']);
}
if(!isset($_POST['registration_mail']) || empty($_POST['registration_mail'])){
unset($_POST['registration_mail']);
}
if(!isset($_POST['registration_sms']) || empty($_POST['registration_sms'])){
unset($_POST['registration_sms']);
}
$status = $this->Cms_model->updateNotif($_POST);
if($status){
$flashMsg['class'] = 'success';
$flashMsg['message'] = 'Settings Successfully Updated..!';
}
$this->session->set_flashdata('message',$flashMsg);
redirect(base_url($url));
}
} }
?> ?>
\ No newline at end of file
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Checker extends CI_Controller {
public function __construct() {
parent::__construct();
date_default_timezone_set("Asia/Kolkata");
$this->load->model('Checker_model');
$this->load->model('Provider_model');
if(!$this->session->userdata('logged_in')) {
redirect(base_url('Login'));
}
}
function viewCheckers(){
$template['page'] = 'Checker/viewChecker';
$template['menu'] = 'Checker Management';
$template['smenu'] = 'View Checker';
$template['pTitle'] = "Checker Management";
$template['pDescription'] = "View Checker List";
$provider_id = $this->session->userdata['id'];
if($this->session->userdata['user_type'] == 1){
$provider_id = (isset($_POST['provider_id'])&&$_POST['provider_id']!='')?$_POST['provider_id']:'';
}
$template['provider_id'] = $provider_id;
$template['checker_data'] = $this->Checker_model->getCheckerData($provider_id);
$template['provider_data'] = $this->Provider_model->getProviderData('','0,1');
$template['enc_provider_id'] = encode_param($provider_id);
$this->load->view('template',$template);
}
function addChecker(){
$template['page'] = 'Checker/checkerAddForm';
$template['menu'] = 'Checker Management';
$template['smenu'] = 'Add Checker';
$template['pTitle'] = "Add Checker";
$template['pDescription'] = "Create New Checker";
$template['provider_id'] = $_GET['provider_id'];
$this->load->view('template',$template);
}
function createChecker(){
$flashMsg = array('message'=>'Something went wrong, please try again..!','class'=>'error');
if(!isset($_POST) || empty($_POST)){
$this->session->set_flashdata('message',$flashMsg);
redirect(base_url('Checker/addChecker'));
}
$err = 0;
$errMsg = '';
if($err == 0 && (!isset($_POST['username']) || empty($_POST['username']))){
$err = 1;
$errMsg = 'Provide Checker User Name';
} else if($err == 0 && (!isset($_POST['password']) || empty($_POST['password']))){
$err = 1;
$errMsg = 'Provide Checker Password';
} else if($err == 0 && (!isset($_POST['provider_id']) || empty($_POST['provider_id']) ||
empty($provider_id = decode_param($_POST['provider_id'])))){
$err = 1;
$errMsg = 'Something went wrong, please try again..!';
}
if($err == 1){
$flashMsg['class'] = 'error';
$flashMsg['message'] = $errMsg;
$this->session->set_flashdata('message',$flashMsg);
redirect(base_url('Checker/viewCheckers'));
}
$_POST['password'] = md5($_POST['password']);
$_POST['provider_id'] = $provider_id;
$status = $this->Checker_model->createChecker($_POST);
if($status == 1){
$flashMsg['class'] = 'success';
$flashMsg['message'] = 'Checker Created';
$this->session->set_flashdata('message',$flashMsg);
redirect(base_url('Checker/viewCheckers'));
} else if ($status == 2){
$flashMsg['class'] = 'error';
$flashMsg['message'] = 'Checker User name already exist..!';
$this->session->set_flashdata('message',$flashMsg);
redirect(base_url('Checker/viewCheckers'));
}
$this->session->set_flashdata('message',$flashMsg);
redirect(base_url('Checker/addChecker'));
}
function changeStatus($checker_id = '',$status = '1'){
$flashMsg = array('message'=>'Something went wrong, please try again..!','class'=>'error');
if(empty($checker_id)){
$this->session->set_flashdata('message',$flashMsg);
redirect(base_url('Checker/viewCheckers'));
}
$checker_id = decode_param($checker_id);
$status = $this->Checker_model->changeStatus($checker_id,$status);
if(!$status){
$this->session->set_flashdata('message',$flashMsg);
}
redirect(base_url('Checker/viewCheckers'));
}
}
?>
\ No newline at end of file
...@@ -125,6 +125,12 @@ ...@@ -125,6 +125,12 @@
include 'BayanPayPaymentLibrary.php'; include 'BayanPayPaymentLibrary.php';
} }
function getNotifTemplate(){
$CI = & get_instance();
$settings = $CI->db->get('notification_templates');
return (!empty($settings))?$settings->row_array():'';
}
// function resizeImage($file=array()){ // function resizeImage($file=array()){
// if(empty($file) || ($size = $file['size']/1024) < 100 || // if(empty($file) || ($size = $file['size']/1024) < 100 ||
// empty($info = getimagesize($file['tmp_name'])) || $info['mime'] == 'image/gif'){ // empty($info = getimagesize($file['tmp_name'])) || $info['mime'] == 'image/gif'){
......
<?php
class Checker_model extends CI_Model {
public function _consruct(){
parent::_construct();
}
public function getCheckerData($provider_id='',$view=''){
$cond = (!empty($view))?" CHK.status IN ($view) ":" CHK.status != '2' ";
$cond .= (!empty($provider_id))?" AND PRV.provider_id='$provider_id' ":"";
$checkerData = $this->db->query("SELECT CHK.*,PRV.name
FROM checker AS CHK
INNER JOIN provider AS PRV ON (CHK.provider_id=PRV.provider_id)
WHERE $cond");
return $checkerData->result();
}
public function createChecker($checkerData = array()){
if(empty($checkerData)){
return 0;
}
$usrCheck=$this->db->get_where('checker',array('username'=>$checkerData['username'],'status !='=>'2'));
if($usrCheck->num_rows() > 0){
return 2;
}
$status = $this->db->insert('checker',$checkerData);
return $status;
}
public function changeStatus($id = '', $status = '0'){
if(empty($id)){
return 0;
}
$status = $this->db->update('checker',array('status'=>$status),array('id'=>$id));
return $status;
}
}
?>
\ No newline at end of file
...@@ -20,5 +20,22 @@ class Cms_model extends CI_Model { ...@@ -20,5 +20,22 @@ class Cms_model extends CI_Model {
$status = $this->db->update('privacy_policy',$cmsData); $status = $this->db->update('privacy_policy',$cmsData);
return $status; return $status;
} }
public function getNotifData(){
$notifData = $this->db->query("SELECT * FROM notification_templates");
if(!empty($notifData)){
return $notifData->row();
}
return 0;
}
public function updateNotif($notifData = array()){
if(empty($notifData)){
return 0;
}
$status = $this->db->update('notification_templates',$notifData);
return $status;
}
} }
?> ?>
\ No newline at end of file
<?php
class Validation_app_model extends CI_Model {
public $validation_array = array(
'login'=> array('email'=>array('required'=>array('code'=>'ER02', 'message'=>'Email id is null or empty'),
'email'=>array('code'=>'ER03', 'message'=>'Invalid Email id')),
'password'=>array('required'=>array('code'=>'ER04', 'message'=>'Password is null or empty'),)),
'check_email_availability'=> array('email'=>array('required'=>array('code'=>'ER02', 'message'=>'Email id is null or empty'),
'email'=>array('code'=>'ER03', 'message'=>'Invalid Email id')
),
'phone'=>array('required'=>array('code'=>'ER07', 'message'=>'Phone no is null or empty'),
'phone'=>array('code'=>'ER08', 'message'=>'Invalid Phone no')
),
),
'registration'=> array('email'=>array('required'=>array('code'=>'ER02', 'message'=>'Email id is null or empty'),
'email'=>array('code'=>'ER03', 'message'=>'Invalid Email id')
),
'phone'=>array('required'=>array('code'=>'ER07', 'message'=>'Phone no is null or empty'),
'phone'=>array('code'=>'ER08', 'message'=>'Invalid Phone no'),
),
'password'=>array('required'=>array('code'=>'ER04', 'message'=>'Password is null or empty'),
)
),
'get_events_list'=>array('auth_token'=>array('required'=>array('code'=>'ER17', 'message'=>'User Id is null or empty'),
)
),
'filters'=>array('auth_token'=>array('required'=>array('code'=>'ER17', 'message'=>'User Id is null or empty'),
)
),
'events_details'=>array('auth_token'=>array('required'=>array('code'=>'ER17', 'message'=>'User Id is null or empty'),
)
),
'get_category_list'=>array('auth_token'=>array('required'=>array('code'=>'ER17', 'message'=>'User Id is null or empty'),
)
),
'get_last_booking'=>array('auth_token'=>array('required'=>array('code'=>'ER17', 'message'=>'User Id is null or empty'),
)
),
'add_favorites'=> array('auth_token'=>array('required'=>array('code'=>'ER17', 'message'=>'User Id is null or empty')),
'event_id'=>array('required'=>array('code'=>'ER16', 'message'=>'Event id is null or empty')),),
'get_cities_list'=>array('auth_token'=>array('required'=>array('code'=>'ER19', 'message'=>'User Id is null or empty'),
)
),
'update_city'=>array('auth_token'=>array('required'=>array('code'=>'ER19', 'message'=>'User Id is null or empty'),
)
),
'booking_summary'=>array('auth_token'=>array('required'=>array('code'=>'ER17', 'message'=>'User Id is null or empty'),
)
),
'payment'=> array('auth_token'=>array('required'=>array('code'=>'ER17', 'message'=>'User Id is null or empty')),
'booking_id'=>array('required'=>array('code'=>'ER34', 'message'=>'Booking id is null or empty'))),
'event_rating'=> array('auth_token'=>array('required'=>array('code'=>'ER17', 'message'=>'User Id is null or empty')),
'rating'=>array('required'=>array('code'=>'ER26', 'message'=>'Rating is null or empty')),
'event_id'=>array('required'=>array('code'=>'ER27', 'message'=>'Event id is null or empty')),
'description'=>array('required'=>array('code'=>'ER28', 'message'=>'description id is null or empty')),),
'update_notification_email_status'=>array('auth_token'=>array('required'=>array('code'=>'ER17', 'message'=>'User Id is null or empty'),
)
),
'profile_details'=>array('auth_token'=>array('required'=>array('code'=>'ER17', 'message'=>'User Id is null or empty'),)),
'profile_edit'=> array('auth_token'=>array('required'=>array('code'=>'ER17', 'message'=>'User Id is null or empty')),),
'booking'=> array('auth_token'=>array('required'=>array('code'=>'ER17', 'message'=>'User Id is null or empty')),
'event_id'=>array('required'=>array('code'=>'ER20', 'message'=>'Event id is null or empty')),
'customer_id'=>array('required'=>array('code'=>'ER29', 'message'=>'Customer id is null or empty')),
'event_date_id'=>array('required'=>array('code'=>'ER30', 'message'=>'Event date id is null or empty')),
'no_of_ticket'=>array('required'=>array('code'=>'ER31', 'message'=>'Number of ticket is null or empty')),
'ticket_details'=>array('required'=>array('code'=>'ER32', 'message'=>'Ticket details is null or empty')),
'amount'=>array('required'=>array('code'=>'ER33', 'message'=>'Amount is null or empty')),),
'cancel_booking'=> array('auth_token'=>array('required'=>array('code'=>'ER17', 'message'=>'User Id is null or empty')),
'booking_id'=>array('required'=>array('code'=>'ER34', 'message'=>'Booking Id is null or empty')),),
'get_favorites_list'=>array('auth_token'=>array('required'=>array('code'=>'ER17', 'message'=>'User Id is null or empty'),
)
),
'get_booking_list'=>array('auth_token'=>array('required'=>array('code'=>'ER17', 'message'=>'User Id is null or empty'),
)
),
'settings'=>array('auth_token'=>array('required'=>array('code'=>'ER17', 'message'=>'User Id is null or empty'),
)
),
'forgot_password'=> array('new_password'=>array('required'=>array('code'=>'ER35', 'message'=>'New password is null or empty')),
'phone'=>array('required'=>array('code'=>'ER07', 'message'=>'Phone is null or empty')),),
);
public function validation_check($method_name, $parms) {
$state = 0;
$rules = $this->validation_array[$method_name];
$error_key = '';
foreach ($rules as $key => $value) {
foreach ($value as $keys => $values) {
switch ($keys) {
case 'required':
if(!isset($parms[$key]) || $parms[$key]=='' || $parms[$key]== null){
$state = 1;
$error_key = $values;
}
break;
case 'email':
if (isset($parms[$key]) && !filter_var($parms[$key], FILTER_VALIDATE_EMAIL)) {
$state = 1;
$error_key = $values;
}
break;
case 'phone':
if(isset($parms[$key])){
$phone = preg_replace('/[^0-9]/', '', $parms[$key]);
/*if (strlen($phone) !== 10) {
$state = 1;
$error_key = $values;
} */
}
break;
default:
# code...
break;
}
if($state==1){
break;
}
}
if($state==1){
break;
}
}
return array('state'=>$state,'response'=>$error_key);
}
}
?>
\ No newline at end of file
...@@ -72,7 +72,7 @@ ...@@ -72,7 +72,7 @@
<div class="col-md-6"> <div class="col-md-6">
<div class="box-footer textCenterAlign"> <div class="box-footer textCenterAlign">
<button type="submit" class="btn btn-primary">Submit</button> <button type="submit" class="btn btn-primary">Submit</button>
<a href="<?= base_url('Category/listCategory') ?>" class="btn btn-primary">Cancel</a> <a href="<?= base_url() ?>" class="btn btn-primary">Cancel</a>
</div> </div>
</div> </div>
......
<div class="content-wrapper">
<section class="content-header">
<h1>
<?= $pTitle ?>
<small><?= $pDescription ?></small>
</h1>
<ol class="breadcrumb">
<li><a href="<?= base_url() ?>"><i class="fa fa-star-o" aria-hidden="true"></i>Home</a></li>
<li><?= $menu ?></li>
<li class="active"><?= $smenu ?></li>
</ol>
</section>
<section class="content">
<div class="row">
<div class="col-md-12">
<?php if($this->session->flashdata('message')) {
$flashdata = $this->session->flashdata('message'); ?>
<div class="alert alert-<?= $flashdata['class'] ?>">
<button class="close" data-dismiss="alert" type="button">×</button>
<?= $flashdata['message'] ?>
</div>
<?php } ?>
</div>
<div class="col-md-12">
<div class="box box-warning">
<div class="box-body">
<form role="form" action="<?= base_url('CMS/changeNotifData') ?>" method="post"
class="validate" data-parsley-validate="" enctype="multipart/form-data">
<div class="box-header with-border">
<h3 class="box-title padLeft10 padTop5">Email Template</h3>
</div>
<div class="box-body">
<div class="col-sm-12">
<div class="col-sm-6">
<div class="form-group">
<label>Registration Mail</label>
<textarea id="rich_editor" type="text" class="ip_reg_form_input form-control reset-form-custom" placeholder="Registration Mail" name="registration_mail" style="height:108px;" data-parsley-trigger="change"><?= $notificationData->registration_mail ?></textarea>
</div>
</div>
<div class="col-sm-6">
<div class="form-group">
<label>Forgot Mail</label>
<textarea id="rich_editor_1" type="text" class="ip_reg_form_input form-control reset-form-custom" placeholder="Forgot Mail" name="forgot_mail" style="height:108px;" data-parsley-trigger="change"><?= $notificationData->forgot_mail ?></textarea>
</div>
</div>
</div>
</div>
<div class="box-header with-border">
<h3 class="box-title padLeft10 padTop5">SMS Template</h3>
</div>
<div class="box-body">
<div class="col-sm-12">
<div class="col-sm-6">
<div class="form-group">
<label>Registration SMS</label>
<textarea type="text" class="ip_reg_form_input form-control reset-form-custom" placeholder="Registration SMS" name="registration_sms" style="height:108px;" data-parsley-trigger="change"><?= $notificationData->registration_sms ?></textarea>
</div>
</div>
<div class="col-sm-6">
<div class="form-group">
<label>Forgot SMS</label>
<textarea type="text" class="ip_reg_form_input form-control reset-form-custom" placeholder="Forgot SMS" name="forgot_sms" style="height:108px;" data-parsley-trigger="change"><?= $notificationData->forgot_sms ?></textarea>
</div>
</div>
</div>
<div class="col-sm-12">
<div class="col-md-6">
<div class="box-footer textCenterAlign">
<button type="submit" class="btn btn-primary">Submit</button>
<a href="<?= base_url() ?>" class="btn btn-primary">Cancel</a>
</div>
</div>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
</section>
</div>
\ No newline at end of file
<div class="content-wrapper">
<section class="content-header">
<h1>
<?= $pTitle ?>
<small><?= $pDescription ?></small>
</h1>
<ol class="breadcrumb">
<li><a href="<?= base_url() ?>"><i class="fa fa-star-o" aria-hidden="true"></i>Home</a></li>
<li><?= $menu ?></li>
<li class="active"><?= $smenu ?></li>
</ol>
</section>
<section class="content">
<div class="row">
<div class="col-md-12">
<?php
if($this->session->flashdata('message')) {
$flashdata = $this->session->flashdata('message'); ?>
<div class="alert alert-<?= $flashdata['class'] ?>">
<button class="close" data-dismiss="alert" type="button">×</button>
<?= $flashdata['message'] ?>
</div>
<?php } ?>
</div>
<div class="col-md-12">
<div class="box box-warning">
<div class="box-body">
<form role="form" action="<?= base_url('Checker/createChecker') ?>" method="post"
class="validate" data-parsley-validate="" enctype="multipart/form-data">
<div class="col-md-6">
<div class="form-group">
<label>User Name</label>
<input type="text" class="form-control required" data-parsley-trigger="change"
data-parsley-minlength="2" name="username" required="" placeholder="User Name">
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label>Password</label>
<input type="password" class="form-control required" name="password" placeholder="Password" required="">
</div>
</div>
<input type="hidden" name="provider_id" value="<?= $provider_id ?>">
<div class="col-md-12 padTop10">
<div class="box-footer textCenterAlign">
<button type="submit" class="btn btn-primary">Submit</button>
<a href="<?= base_url('Checker/viewCheckers') ?>" class="btn btn-primary">Cancel</a>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
</section>
</div>
\ No newline at end of file
<div class="content-wrapper" >
<!-- Content Header (Page header) -->
<section class="content-header">
<h1>
<?= $pTitle ?>
<small><?= $pDescription ?></small>
</h1>
<ol class="breadcrumb">
<li><a href="<?= base_url() ?>"><i class="fa fa-star-o" aria-hidden="true"></i>Home</a></li>
<li><?= $menu ?></li>
<li class="active"><?= $smenu ?></li>
</ol>
</section>
<!-- Main content -->
<section class="content">
<div class="row">
<div class="col-md-12">
<?php if($this->session->flashdata('message')) {
$flashdata = $this->session->flashdata('message'); ?>
<div class="alert alert-<?= $flashdata['class'] ?>">
<button class="close" data-dismiss="alert" type="button">×</button>
<?= $flashdata['message'] ?>
</div>
<?php } ?>
</div>
<div class="col-xs-12">
<?php if($this->session->userdata['user_type'] == 1){ ?>
<div class="box box-warning marginBottom-10">
<div class="box-body">
<form role="form" name="venueForm" action="<?= base_url('Checker/viewCheckers')?>" method="post"
class="validate" data-parsley-validate="" enctype="multipart/form-data">
<div class="col-md-12">
<?php if(!empty($provider_data)){ ?>
<div class="form-group">
<label>Choose Povider</label>
<select name="provider_id" class="form-control"
placeholder="Select Venue" onchange="venueSubmitForm()">
<option selected value="0">All provider</option>
<?php
foreach ($provider_data as $provider) {
$select=(isset($provider_id)&&$provider->provider_id==$provider_id)?'selected':'';
echo '<option '.$select.' value="'.$provider->provider_id.'">'.
$provider->name.
'</option>';
}
?>
</select>
</div>
<?php } ?>
</div>
</form>
</div>
</div>
<?php } ?>
<div class="box box-warning">
<div class="box-header with-border">
<div class="col-md-6"><h3 class="box-title">Creater List</h3></div>
<div class="col-md-6" align="right">
<?php if($this->session->userdata['user_type'] != 1){ ?>
<a class="btn btn-sm btn-primary" href="<?= base_url('Checker/addChecker?provider_id='.$enc_provider_id) ?>">
Add New Checker
</a>
<?php } ?>
<a class="btn btn-sm btn-primary" href="<?= base_url() ?>">Back</a>
</div>
</div>
<div class="box-body">
<table id="mechanicUsers" class="table table-bordered table-striped datatable ">
<thead>
<tr>
<th class="hidden">ID</th>
<th width="250px;">Creater User Name</th>
<th width="250px;">Provider</th>
<th>Status</th>
<th>Action</th>
</tr>
</thead>
<tbody>
<?php
if(!empty($checker_data)){
foreach($checker_data as $checker) { ?>
<tr>
<th class="hidden"><?= $checker->id ?></th>
<th class="center"><?= $checker->username ?></th>
<th class="center"><?= $checker->name ?></th>
<th class="center"><?= ($checker->status == 1)?'Active':'De-activate' ?></th>
<td class="center">
<a class="btn btn-sm btn-danger"
href="<?= base_url("Checker/changeStatus/".encode_param($checker->id))."/2" ?>"
onClick="return doconfirm()">
<i class="fa fa-fw fa-trash"></i>Delete
</a>
<?php if($checker->status == 1){ ?>
<a class="btn btn-sm btn-success" style="background-color:#ac2925" href="<?= base_url("Checker/changeStatus/".encode_param($checker->id))."/0" ?>">
<i class="fa fa-cog"></i> De-activate
</a>
<?php } else { ?>
<a class="btn btn-sm btn-success" href="<?= base_url("Checker/changeStatus/".encode_param($checker->id))."/1" ?>">
<i class="fa fa-cog"></i> Activate
</a>
<?php } ?>
</td>
</tr>
<?php } } ?>
</tbody>
</table>
</div>
</div>
</div>
</div>
</section>
</div>
\ No newline at end of file
...@@ -10,18 +10,22 @@ x <aside class="main-sidebar"> ...@@ -10,18 +10,22 @@ x <aside class="main-sidebar">
</div> </div>
</div> </div>
<ul class="sidebar-menu"> <ul class="sidebar-menu">
<li><a href="<?= base_url('Dashboard') ?>"> <li>
<img src="<?=base_url("assets/images/m1.png") ?>"> <a href="<?= base_url('Dashboard') ?>">
<span>Dashboard</span></a> <img src="<?=base_url("assets/images/m1.png") ?>">
<span>Dashboard</span>
</a>
</li> </li>
<li><a href="<?= base_url('Tag/listTags') ?>"> <li>
<img src="<?=base_url("assets/images/m2.png") ?>"> <a href="<?= base_url('Tag/listTags') ?>">
<span>Tag Management</span></a> <img src="<?=base_url("assets/images/m2.png") ?>">
<span>Tag Management</span>
</a>
</li> </li>
<li class="treeview"> <li class="treeview">
<a href="#"> <a href="#">
<img src="<?=base_url("assets/images/m3.png") ?>"> <img src="<?=base_url("assets/images/m3.png") ?>">
<span>Host Categories</span> <span>Host Categories</span>
<i class="fa fa-angle-left pull-right"></i> <i class="fa fa-angle-left pull-right"></i>
</a> </a>
<ul class="treeview-menu"> <ul class="treeview-menu">
...@@ -39,18 +43,22 @@ x <aside class="main-sidebar"> ...@@ -39,18 +43,22 @@ x <aside class="main-sidebar">
</li> </li>
</ul> </ul>
</li> </li>
<li><a href="<?= base_url('Region/listRegion') ?>"> <li>
<img src="<?=base_url("assets/images/m4.png") ?>"> <a href="<?= base_url('Region/listRegion') ?>">
<span>Region Management</span></a> <img src="<?=base_url("assets/images/m4.png") ?>">
<span>Region Management</span>
</a>
</li> </li>
<li><a href="<?= base_url('Category/listCategory') ?>"> <li>
<img src="<?=base_url("assets/images/m5.png") ?>"> <a href="<?= base_url('Category/listCategory') ?>">
<span>Category Management</span></a> <img src="<?=base_url("assets/images/m5.png") ?>">
<span>Category Management</span>
</a>
</li> </li>
<li class="treeview"> <li class="treeview">
<a href="#"> <a href="#">
<img src="<?=base_url("assets/images/m6.png") ?>"> <img src="<?=base_url("assets/images/m6.png") ?>">
<span>Venue Management</span> <span>Venue Management</span>
<i class="fa fa-angle-left pull-right"></i> <i class="fa fa-angle-left pull-right"></i>
</a> </a>
<ul class="treeview-menu"> <ul class="treeview-menu">
...@@ -111,6 +119,14 @@ x <aside class="main-sidebar"> ...@@ -111,6 +119,14 @@ x <aside class="main-sidebar">
</li> </li>
</ul> </ul>
</li> </li>
<?php } ?>
<li>
<a href="<?= base_url('Checker/viewCheckers') ?>">
<img src="<?=base_url("assets/images/m2.png") ?>">
<span>Checker Management</span>
</a>
</li>
<?php if($this->session->userdata['user_type'] == 1){ ?>
<li class="treeview"> <li class="treeview">
<a href="#"> <a href="#">
<img src="<?=base_url("assets/images/m9.png") ?>"> <img src="<?=base_url("assets/images/m9.png") ?>">
...@@ -149,6 +165,10 @@ x <aside class="main-sidebar"> ...@@ -149,6 +165,10 @@ x <aside class="main-sidebar">
<span>CMS Management</span> <span>CMS Management</span>
</a> </a>
</li> </li>
<li><a href="<?= base_url('CMS/notification') ?>">
<img src="<?=base_url("assets/images/m2.png") ?>">
<span>Notification Tempaltes</span></a>
</li>
<li> <li>
<a href="<?= base_url('Settings') ?>"> <a href="<?= base_url('Settings') ?>">
<i class="fa fa-wrench" aria-hidden="true"> <i class="fa fa-wrench" aria-hidden="true">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment