From b0852aeaa1a9d363b809e48ee195c2b6d8cd3e20 Mon Sep 17 00:00:00 2001 From: "venbatechnologies@gmail.com" Date: Wed, 20 Jun 2018 13:55:19 +0530 Subject: [PATCH] favourite added --- application/controllers/user.php | 50 +- application/helpers/cias_helper.php | 12 + application/models/user_model.php | 23 + application/views/Favourite.php | 1207 +++++++++++++++++++++++++ application/views/includes/header.php | 44 + 5 files changed, 1329 insertions(+), 7 deletions(-) mode change 100644 => 100755 application/controllers/user.php create mode 100644 application/views/Favourite.php diff --git a/application/controllers/user.php b/application/controllers/user.php old mode 100644 new mode 100755 index bca0b9cc..1f7e7b92 --- a/application/controllers/user.php +++ b/application/controllers/user.php @@ -1519,15 +1519,51 @@ function deliver_perform() $this->loadviews("deliver_perform",$this->global,$data,NULL); - - - - - - - } + /* + *favourite add function and load view + */ + + function favourite() + { + $this->global['pageTitle'] = 'Siddharth :Favourite '; + + + // $data['ponoreset']=$this->purchaseorder_model->ponoresetfinyear(); + + + $this->loadViews("Favourite", $this->global,Null); + + } + function favouriteadd() + { + $name = $this->input->post('name'); + $url = $this->input->post('url'); + $status = $this->input->post('status'); + $CreateBy = $this->session->userdata ( 'userId' ); + + $dt = new DateTime('now', new DateTimeZone('Asia/Kolkata')); + $createddt = $dt->format('Y-m-d H:i:s'); + $menu = $this->input->post('menu'); + // $RowCount = $this->input->post('txtRowCount'); + // $DeletedRow = $this->input->post('txtDeletedRow'); + // $comma_separated = explode(':', $DeletedRow); + $favourite = array('Menu_Name'=>$name,'Menu_URL'=>$url,'Status'=>$status,'Created_BY'=>$CreateBy,'Created_ON'=>$createddt,'Menu_ID'=>$menu); + $getdata= $this->user_model->favouriteadd($favourite); + // print_r($favourite); + // die(); + if($getdata==1) + + { + echo"success"; + + } + else{ + echo"failed"; + } + + } } ?> diff --git a/application/helpers/cias_helper.php b/application/helpers/cias_helper.php index d1f0b702..7a6df371 100755 --- a/application/helpers/cias_helper.php +++ b/application/helpers/cias_helper.php @@ -47,4 +47,16 @@ if(!function_exists('verifyHashedPassword')) } } + function get_fav($user) + { + $CI = &get_instance(); + $CI->load->database(); + + $CI->db->where('Created_BY',$user); + $CI->db->where('Status',1); + return $CI->db->get('T_fav_add')->result(); + + } + + ?> \ No newline at end of file diff --git a/application/models/user_model.php b/application/models/user_model.php index 324c58c5..2d0c30a7 100755 --- a/application/models/user_model.php +++ b/application/models/user_model.php @@ -286,6 +286,29 @@ GROUP BY financial_year "; return $query->result(); } + /* + *fav model + */ + function favouriteadd($favourite) + + { //echo $favourite['Menu_ID'];die; + if($favourite['Menu_ID'] !=''){ + //echo "if"; + + // $this->db->where('id', $id); + // return $this->db->delete('employee'); + $this->db->where('Menu_ID',$favourite['Menu_ID']); + $this->db->delete('T_fav_add'); + + }else{ + //echo "else"; + + $this->db->insert('T_fav_add',$favourite); + $r = $this->db->affected_rows(); + return $r; + } + } + } diff --git a/application/views/Favourite.php b/application/views/Favourite.php new file mode 100644 index 00000000..5cd076f2 --- /dev/null +++ b/application/views/Favourite.php @@ -0,0 +1,1207 @@ + + + + + + + + + +
+ + + session->userdata('userId')); + $count=sizeof($fav); + + //$get_fav = $fav;( + if(!empty($fav)){ + foreach($fav as $getfav){ + ?> + + + + + +
+
+

Siddharth Industries - Add Favourite

+
+ +
+
+
+
+

Complaint

+
+
+
+
Add Complaint
+
Complaint List
+
+
+
+
+ + + + +
+
+
+

Requisition

+
+
+
+
Raise Requisition
+
Update Service PO Status
+
Approve Requisition
+ + + +
Purchase Order From Requisition
+ + + + + + AssDep; + + if($assd == PURCHASE || $DEPCode == PURCHASE){?> + +
Purchase Order From Requisition
+ + + + +
+
+
+
+ + + + + + + +
+
+
+

Store Requisition

+
+
+
+
Store Requisition
+
Approve Store Requisition
+ + + + + + +
Store Requisition Listing
+ + + + + + + + + AssDep; + + if($assd == STORE || $assd == QUALITY || $DEPCode == STORE || $DEPCode == QUALITY || $DEPCode == PRODUCTION || $assd == PRODUCTION){ $check =1;?> +
Store Requisition Listing
+ + + + +
+
+
+
+ + + + +
+
+ + + + + +
+
+
+

Stock Details

+
+
+
+
Final Product
+ + +
Finished Product History
+ + +
Final Product Listing
+ + +
Material Adjustment
+ +
Material Adjustment List
+
+
+
+
+ + +AssDep; + if($assd == PRODUCTION || $DEPCode == PRODUCTION){ + $check25 =1 + ?> + + +
+
+
+

Stock Details

+
+
+
+
Final Product
+ + +
Finished Product History
+ + +
Final Product Listing
+ + +
Material Adjustment
+ +
Material Adjustment List
+ +
Material History
+
+
+
+
+ + + + + + + + + + + +
+
+
+

In Process Inspection

+
+
+
+
In Process Inspection Report List
+
New In Process Inspection
+
New Nissan In Process Inspection
+
+
+
+
+ + + + + + + + + + AssDep; + + if( $assd == QUALITY || $DEPCode == QUALITY ){ $check =1;?> + + + +
+
+
+

In Process Inspection

+
+
+
+
In Process Inspection Report List
+
New In Process Inspection
+
New Nissan In Process Inspection
+
+
+
+
+ + + + + + + + + + + + + + +
+
+
+

TRP Batch card

+
+ + +
+
+
Batchcard - HourlyListing
+
Batchcard - DailyListing
+
Batchcard - StockDetails
+
Batchcard - Maintenance/Breakdown
+
+
+
+
+ + + + + + + AssDep; + + if($assd == PRODUCTION || $DEPCode == PRODUCTION ){ $check =1;?> + +
+
+
+

TRP Batch card

+
+ +
+
+
Batchcard - HourlyListing
+
Batchcard - DailyListing
+
Batchcard - StockDetails
+
Batchcard - Maintenance/Breakdown
+
+
+
+
+ + + + + + + +
+
+ + + + + +
+
+
+

Resin Batch card

+
+ + +
+
+
Resin Batchcard List
+
Add New Batch Card
+
+
+
+
+ + + + + + + + + AssDep; + + if($assd == PRODUCTION || $DEPCode == PRODUCTION ){ $check =1;?> + +
+
+
+

Resin Batch card

+
+ + +
+
+
Resin Batchcard List
+
Add New Batch Card
+
+
+
+
+ + + + + + + + + + + + + +
+ +
+
+

Master Details

+
+
+
+ +
Cost Details
+ +
Asset Details
+ + + +
Employee Details
+ + + +
Supplier Details
+ + + +
Company Master
+ +
Employee Details
+ +
Config Master
+ +
Department Master
+ +
Material Master
+ +
Machine History/Master
+ +
Users
+ + +
+
+
+ +
+ + + + + + +
+
+
+

Enquiry and Order

+
+
+
+
Add Order Enquiry
+
View Order Enquiry List
+
+
+
+
+ + + + + + + + AssDep; + + if($assd == FINANCE || $assd == HR || $assd == SALES || $assd == SYSTEM_ADMIN || $DEPCode == FINANCE || $DEPCode == HR || $DEPCode ==SALES || $DEPCode == ADMIN){ $check= $check+1;?> + + + +
+
+
+

Master Details

+
+
+
+ AssDep;?> + + + +
Supplier Details
+ + + + + + + AssDep; + + ?> + + +
Cost Details
+
Asset Details
+ + + + + + + AssDep;?> + + + + +
Company Master
+ +
Employee Details
+ + +
Config Master
+ + +
Department Master
+ +
Material Master
+ +
Machine History/Master
+ +
Users
+ +
PurchaseOrderNumberReset
+ + + + + + + + + +
+
+
+
+ + + + + + + AssDep; + + if($assd == SALES || $DEPCode == SALES){?> + + +
+
+
+

Enquiry and Order

+
+
+
+
Add Order Enquiry
+
View Order Enquiry List
+
+
+
+
+ + + + + +
+
+
+

Purchase order

+
+
+
+ +
Approve Purchase Order
+ + + +
Release Purchase Order
+ + + + +
Emergency Purchase Order
+
Purchase Order List
+
Amendment Purchase Order
+ +
+
+
+
+ + + + +
+
+
+

Advance Request

+
+
+
+
Advance Request
+ +
+
+
+
+ + + + + AssDep; + if($assd == PURCHASE || $assd == FINANCE || $assd == MANAGEMENT || $DEPCode == PURCHASE || $DEPCode == FINANCE || $DEPCode == MANAGEMENT){ $check = $check+1;?> + + + + + +
+
+
+

Purchase order

+
+
+
+ + AssDep; $check1=1;?> + + +
Approve Purchase Order
+ + + + + AssDep; $check1=1;?> + + +
Release Purchase Order
+ + + + + + AssDep; $check1=1;?> + + +
Emergency Purchase Order
+
Purchase Order List
+
Amendment Purchase Order
+ + + +
+
+
+
+ + + + + + AssDep; $check1=1;?> + + + +
+
+
+

Advance Request

+
+
+
+
Advance Request
+ +
+
+
+
+ + + + + + + + + + + + + + + + + +
+
+
+

Billing

+
+
+
+
MRIR Billing
+
Service PO Billing
+
+
+
+
+ +
+
+
+

Cash Book

+
+
+
+
Account Master
+
Receipt and Payment
+
Advance
+
+
+
+
+
+
+
+

Banking

+
+
+
+
Bank Statement Upload
+
Bank Statements
+
Amount Paid Reports(PO)
+
Amount Recived Reports(Inv)
+
+
+
+
+ + + + + + AssDep; + + if($assd == FINANCE || $DEPCode == FINANCE){ $check = $check+1;?> + + +
+
+
+

Billing

+
+
+
+
MRIR Billing
+
Service PO Billing
+
+
+
+
+
+
+
+

Cash Book

+
+
+
+
Account Master
+
Receipt and Payment
+
Advance
+
+
+
+
+
+
+
+

Banking

+
+
+
+
Bank Statement Upload
+
Bank Statements
+
Amount Paid Reports(PO)
+
Amount Recived Reports(Inv)
+
+
+
+
+ + + + + + + + + +
+
+
+

Inspection

+
+ +
+
+ +
Inward Gate Register Entry
+ +
View Inward Gate Register
+ +
Outward Gate Register Entry
+ +
View Outward Gate Register
+ + + + + +
View Inward Gate Register
+ +
View Material Inspection Report
+ + + +
Product Test Specification Master
+ + +
Product Test Report
+ + +
Inward Material Test Report
+ + + +
+
+
+
+ + +
+
+
+

Stock Details

+
+
+
+
Stock Details
+
+
+
+
+ + + + + + AssDep; + + //echo $assd; + + if($assd == STORE || $DEPCode == QUALITY || $assd == QUALITY || $DEPCode == STORE || $DEPCode == SECURITY || $assd == SECURITY){ $check8 = $check8+1;?> + + +
+
+
+

Inspection

+
+
+
+
View Inward Gate Register
+
View Material Inspection Report
+
Product Test Specification Master
+
Product Test Report
+
Inward Material Test Report
+
Inward Gate Register Entry
+
View Inward Gate Register
+
Outward Gate Register Entry
+
View Outward Gate Register
+ +
+
+
+
+ + + AssDep;?> + + +
+
+
+

Stock Details

+
+
+
+
Stock Details
+
+
+
+
+ + + + + + + + + + + + + + + + +
+
+
+

PaySlip

+
+
+
+
Monthly Pay Information
+
PaySlip Generator
+
Edit Payslip
+
Employee Salary Details
+
Bank Report
+
Public Holidays
+
Loan Reports
+
Incentives and Bonus Reports
+
+
+
+
+ + + + + AssDep; + if($assd == HR || $DEPCode == HR){ $check = $check+1;?> + + +
+
+
+

PaySlip

+
+
+
+
Monthly Pay Information
+
PaySlip Generator
+
Edit Payslip
+
Employee Salary Details
+
Bank Report
+
Public Holidays
+
Loan Reports
+
Incentives and Bonus Reports
+
+
+
+
+ + + + + + + + + + + +
+
+
+

ReportList

+
+
+
+
ReportList
+
+
+
+
+ + + + + + AssDep;?> + +
+
+
+

ReportList

+
+
+
+
ReportList
+
+
+
+
+ + + + + + + + + + + + + + +
+
+
+

Attendance

+
+
+
+
Monthly Attendance
+
+ +
+
Permission Slip
+
+
+
+
+ + + + + + AssDep;?> + +
+
+
+

Attendance

+
+
+
+
Monthly Attendance
+
+ +
+
Permission Slip
+
+
+
+
+ + + + + + +
+ +
+
+ + + + + \ No newline at end of file diff --git a/application/views/includes/header.php b/application/views/includes/header.php index c54aabbb..9d22046d 100755 --- a/application/views/includes/header.php +++ b/application/views/includes/header.php @@ -206,6 +206,50 @@ display: none;