Commit f4fbea77 by tobin

dc

parent ed6849c4
......@@ -75,9 +75,9 @@ $query_builder = TRUE;
$db['default'] = array(
'dsn' => '',
'hostname' => '192.168.140.123',
'hostname' => 'localhost',
'username' => 'root',
'password' => 'Golden_123',
'password' => '',
'database' => 'tobin_eventTimeOut',
'dbdriver' => 'mysqli',
'dbprefix' => '',
......
......@@ -33,26 +33,34 @@ class CMS extends CI_Controller {
}
public function changeCMSdata(){
$url = 'CMS/changeCMSdata';
$url = 'cms';
$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['faq']) && empty($_POST['faq'])){
unset($_POST['faq']);
if(isset($_POST['faq_en']) && empty($_POST['faq_en'])){
unset($_POST['faq_en']);
}
if(isset($_POST['privacy_policy']) && empty($_POST['privacy_policy'])){
unset($_POST['privacy_policy']);
if(isset($_POST['privacy_policy_en']) && empty($_POST['privacy_policy_en'])){
unset($_POST['privacy_policy_en']);
}
if(isset($_POST['terms_and_conditions']) && empty($_POST['terms_and_conditions'])){
unset($_POST['terms_and_conditions']);
if(isset($_POST['terms_and_conditions_en']) && empty($_POST['terms_and_conditions_en'])){
unset($_POST['terms_and_conditions_en']);
}
if(isset($_POST['faq_ar']) && empty($_POST['faq_ar'])){
unset($_POST['faq_ar']);
}
if(isset($_POST['privacy_policy_ar']) && empty($_POST['privacy_policy_ar'])){
unset($_POST['privacy_policy_ar']);
}
if(isset($_POST['terms_and_conditions_ar']) && empty($_POST['terms_and_conditions_ar'])){
unset($_POST['terms_and_conditions_ar']);
}
$status = $this->Cms_model->updateCMS($_POST);
if($status){
$url = '';
$flashMsg['class'] = 'success';
$flashMsg['message'] = 'Settings Successfully Updated..!';
}
......
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Payment extends CI_Controller {
public function __construct() {
parent::__construct();
date_default_timezone_set("Asia/Kolkata");
$this->load->model('Provider_model');
if(!$this->session->userdata('logged_in')) {
redirect(base_url('Login'));
}
}
function getPayDetails(){
$provider_id = '';
if($this->session->userdata('user_type') == 1){
$provider_id=(isset($_POST['provider_id'])&&!empty($_POST['provider_id']))?$_POST['provider_id']:'';
}else{
$provider_id = $this->session->userdata('id');
$template['provider_id'] = $provider_id;
}
$template['page'] = 'Payment/payment_details';
$template['page_desc'] = "Payment Details";
$template['page_title'] = "Payment Management";
$template['menu'] = "Payment Management";
$template['sub_menu'] = "Payment Details";
$template['provider_id'] = $provider_id;
$template['user_type'] = $this->session->userdata('user_type');
$template['company_data'] = $this->Provider_model->getProviderData();
$template['payment_details'] = $this->Provider_model->getPayDetails($provider_id);
$template['broker_pay_details'] = $this->Provider_model->getBrokerPayDetails($provider_id);
$this->load->view('template',$template);
}
function updatePaymentDate(){
$retStatus = array('status'=>'0');
if(!isset($_POST) || empty($_POST) ||
!isset($_POST['broker_id']) || empty($_POST['broker_id']) ||
!isset($_POST['last_paid_date']) || empty($_POST['last_paid_date'])){
echo json_encode($retStatus);exit;
}
$_POST['broker_id'] = decode_param($_POST['broker_id']);
$_POST['provider_id'] = $this->session->userdata['id'];
$_POST['last_paid_date'] = date('Y-m-d 00:00:00',strtotime($_POST['last_paid_date']));
$retStatus['status'] = $this->Provider_model->updatePaymentDate($_POST);
if($retStatus['status']){
$data = $this->Provider_model->getBrokerPayDetails($_POST['provider_id']);
if(!isset($data[$_POST['broker_id']]) || empty($data[$_POST['broker_id']])){
$retStatus['status'] = 0;
} else {
$data[$_POST['broker_id']]['last_paid_date'] = date('d-M-Y',strtotime($data[$_POST['broker_id']]['last_paid_date']));
$retStatus['data'] = $data[$_POST['broker_id']];
}
}
echo json_encode($retStatus);exit;
}
}
?>
\ No newline at end of file
......@@ -221,5 +221,52 @@ class Provider extends CI_Controller {
redirect(base_url('Provider/editProviders/'.$provider_id));
}
}
function getProviderPayDetails(){
$provider_id = '';
if($this->session->userdata('user_type') == 1){
$provider_id=(isset($_POST['provider_id'])&&!empty($_POST['provider_id']))?$_POST['provider_id']:'';
}else{
$provider_id = $this->session->userdata('id');
}
$template['page'] = 'Provider/providerPayDetails';
$template['page_desc'] = "Payment Details";
$template['page_title'] = "Payment Management";
$template['menu'] = "Payment Management";
$template['sub_menu'] = "Payment Details";
$template['user_type'] = $this->session->userdata('user_type');
$template['provider_id'] = $provider_id;
$template['provider_data'] = $this->Provider_model->getProviderData();
$template['providerPayDetails'] = $this->Provider_model->getProviderPayData($provider_id);
$this->load->view('template',$template);
}
function updateProviderPayDate(){
$retStatus = array('status'=>'0');
if(!isset($_POST) || empty($_POST) ||
!isset($_POST['broker_id']) || empty($_POST['broker_id']) ||
!isset($_POST['last_paid_date']) || empty($_POST['last_paid_date'])){
echo json_encode($retStatus);exit;
}
$_POST['broker_id'] = decode_param($_POST['broker_id']);
$_POST['provider_id'] = $this->session->userdata['id'];
$_POST['last_paid_date'] = date('Y-m-d 00:00:00',strtotime($_POST['last_paid_date']));
$retStatus['status'] = $this->Provider_model->updatePaymentDate($_POST);
if($retStatus['status']){
$data = $this->Provider_model->getBrokerPayDetails($_POST['provider_id']);
if(!isset($data[$_POST['broker_id']]) || empty($data[$_POST['broker_id']])){
$retStatus['status'] = 0;
} else {
$data[$_POST['broker_id']]['last_paid_date'] = date('d-M-Y',strtotime($data[$_POST['broker_id']]['last_paid_date']));
$retStatus['data'] = $data[$_POST['broker_id']];
}
}
echo json_encode($retStatus);exit;
}
}
?>
\ No newline at end of file
......@@ -186,5 +186,13 @@ class Provider_model extends CI_Model {
}
return $mechData;
}
function getProviderPayData($provider_id = ''){
if(empty($provider_id)){
return false;
}
}
}
?>
\ No newline at end of file
......@@ -27,33 +27,55 @@
<form role="form" action="<?= base_url('CMS/changeCMSdata') ?>" method="post"
class="validate" data-parsley-validate="" enctype="multipart/form-data">
<div class="col-sm-12">
<div class="col-sm-6">
<div class="form-group">
<label>FAQ</label>
<textarea id="rich_editor" type="text" class="ip_reg_form_input form-control reset-form-custom" placeholder="FAQ" name="faq" style="height:108px;" data-parsley-trigger="change" data-parsley-minlength="2"><?= $cmsData->faq ?></textarea>
<label>FAQ English</label>
<textarea id="rich_editor" type="text" class="ip_reg_form_input form-control reset-form-custom" placeholder="FAQ English" name="faq_en" style="height:108px;" data-parsley-trigger="change" data-parsley-minlength="2"><?= $cmsData->faq_en ?></textarea>
</div>
</div>
<div class="col-sm-6">
<div class="form-group">
<label>FAQ Arabic</label>
<textarea id="rich_editor_3" type="text" class="ip_reg_form_input form-control reset-form-custom" placeholder="FAQ Arabic" name="faq_ar" style="height:108px;" data-parsley-trigger="change" data-parsley-minlength="2"><?= $cmsData->faq_ar ?></textarea>
</div>
</div>
<div class="col-sm-12">
<div class="col-sm-6">
<div class="form-group">
<label>Privacy Policy</label>
<textarea id="rich_editor_1" type="text" placeholder="Privacy Policy" class="ip_reg_form_input form-control reset-form-custom" name="privacy_policy" style="height:108px;" data-parsley-minlength="2" data-parsley-trigger="change"><?= $cmsData->privacy_policy ?></textarea>
<label>Privacy Policy English</label>
<textarea id="rich_editor_1" type="text" placeholder="Privacy Policy English" class="ip_reg_form_input form-control reset-form-custom" name="privacy_policy_en" style="height:108px;" data-parsley-minlength="2" data-parsley-trigger="change"><?= $cmsData->privacy_policy_en ?></textarea>
</div>
</div>
<div class="col-sm-12">
<div class="col-sm-6">
<div class="form-group">
<label>Terms and Condition</label>
<textarea id="rich_editor_2" type="text" class="ip_reg_form_input form-control reset-form-custom" placeholder="Terms and Condition" name="terms_and_conditions" style="height:108px;" data-parsley-trigger="change" data-parsley-minlength="2"><?= $cmsData->terms_and_conditions ?></textarea>
<label>Privacy Policy Arabic</label>
<textarea id="rich_editor_4" type="text" placeholder="Privacy Policy Arabic" class="ip_reg_form_input form-control reset-form-custom" name="privacy_policy_ar" style="height:108px;" data-parsley-minlength="2" data-parsley-trigger="change"><?= $cmsData->privacy_policy_ar ?></textarea>
</div>
</div>
<div class="col-sm-6">
<div class="form-group">
<label>Terms and Condition English</label>
<textarea id="rich_editor_2" type="text" class="ip_reg_form_input form-control reset-form-custom" placeholder="Terms and Condition English" name="terms_and_conditions_en" style="height:108px;" data-parsley-trigger="change" data-parsley-minlength="2"><?= $cmsData->terms_and_conditions_en ?></textarea>
</div>
</div>
<div class="col-sm-6">
<div class="form-group">
<label>Terms and Condition Arabic</label>
<textarea id="rich_editor_5" type="text" class="ip_reg_form_input form-control reset-form-custom" placeholder="Terms and Condition Arabic" name="terms_and_conditions_ar" style="height:108px;" data-parsley-trigger="change" data-parsley-minlength="2"><?= $cmsData->terms_and_conditions_ar ?></textarea>
</div>
</div>
<div class="col-md-12">
<div class="col-md-6">
<div class="box-footer textCenterAlign">
<button type="submit" class="btn btn-primary">Submit</button>
<a href="<?= base_url('Category/listCategory') ?>" class="btn btn-primary">Cancel</a>
</div>
</div>
</div>
</form>
</div>
</div>
......
......@@ -26,12 +26,11 @@
jQuery('.clockpicker').clockpicker();
jQuery( document ).ready(function() {
if(jQuery('#rich_editor').length == 1) { CKEDITOR.replace('rich_editor'); }
});
jQuery( document ).ready(function() {
if(jQuery('#rich_editor_1').length == 1) { CKEDITOR.replace('rich_editor_1'); }
});
jQuery( document ).ready(function() {
if(jQuery('#rich_editor_1').length == 1) { CKEDITOR.replace('rich_editor_2'); }
if(jQuery('#rich_editor_2').length == 1) { CKEDITOR.replace('rich_editor_2'); }
if(jQuery('#rich_editor_3').length == 1) { CKEDITOR.replace('rich_editor_3'); }
if(jQuery('#rich_editor_4').length == 1) { CKEDITOR.replace('rich_editor_4'); }
if(jQuery('#rich_editor_5').length == 1) { CKEDITOR.replace('rich_editor_5'); }
});
function doconfirm(){
......
......@@ -137,9 +137,9 @@ x <aside class="main-sidebar">
<img src="<?=base_url("assets/images/m8.png") ?>">
<span>Booking Details</span></a>
</li>
<li><a href="<?= base_url('Payment/getPayDetails') ?>">
<li><a href="<?= base_url('Provider/getProviderPayDetails') ?>">
<img src="<?=base_url("assets/images/m2.png") ?>">
<span>Transaction Management</span></a>
<span>Commission Management</span></a>
</li>
<li>
<a href="<?= base_url('CMS') ?>">
......
......@@ -261,6 +261,10 @@ jQuery('[id="viewVenueDetails"]').on('click',function() {
});
});
function providerSubmitForm(){
jQuery('[id="providerForm"]').submit();
}
function venueSubmitForm(){
jQuery('[name="venueForm"]').submit();
}
......
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