Linux websever 5.15.0-153-generic #163-Ubuntu SMP Thu Aug 7 16:37:18 UTC 2025 x86_64
Apache/2.4.52 (Ubuntu)
: 192.168.3.70 | : 192.168.1.99
Cant Read [ /etc/named.conf ]
8.1.2-1ubuntu2.23
urlab
www.github.com/MadExploits
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
CPANEL RESET
CREATE WP USER
README
+ Create Folder
+ Create File
/
var /
www /
html /
cai /
application /
controllers /
[ HOME SHELL ]
Name
Size
Permission
Action
11-05-Publication.php
1.2
KB
-rwxr-x--x
260923-Events.php
1.62
KB
-rwxr-x--x
Ablog.php
17.92
KB
-rwxr-x--x
Artist.php
372
B
-rwxr-x--x
Blog.php
1.71
KB
-rwxr-x--x
Cat.php
19.11
KB
-rwxr-x--x
Contact.php
4.03
KB
-rwxr-x--x
Corse.php
20.35
KB
-rwxr-x--x
Courses.php
1.76
KB
-rwxr-x--x
Dashboard.php
491
B
-rwxr-x--x
Digital.php
373
B
-rwxr-x--x
Event.php
371
B
-rwxr-x--x
Events.php
1.62
KB
-rwxrwxrwx
Evnt.php
21.69
KB
-rwxr-x--x
Faculty.php
602
B
-rwxr-x--x
Fareas.php
1.16
KB
-rwxr-x--x
Home.php
717
B
-rwxr-x--x
Item.php
32.49
KB
-rwxr-x--x
Jobc.php
20.29
KB
-rwxr-x--x
Jobs.php
4.62
KB
-rwxr-x--x
Login.php
3.63
KB
-rwxr-x--x
Mdc.php
15.88
KB
-rwxr-x--x
Media.php
1.14
KB
-rwxr-x--x
Memories.php
481
B
-rwxr-x--x
Mems.php
16.03
KB
-rwxr-x--x
Pages.php
6.05
KB
-rwxr-x--x
Prod.php
5.01
KB
-rwxr-x--x
Profile.php
2.15
KB
-rwxr-x--x
Proj.php
22.41
KB
-rwxr-x--x
Projects.php
1.64
KB
-rwxr-x--x
Projt.php
10.86
KB
-rwxr-x--x
Puba.php
10.95
KB
-rwxr-x--x
Publ.php
22.94
KB
-rwxr-x--x
Publication.php
2.59
KB
-rwxr-x--x
Pubv.php
10.95
KB
-rwxr-x--x
Staff.php
600
B
-rwxr-x--x
Udig.php
10.37
KB
-rwxr-x--x
User.php
25.22
KB
-rwxr-x--x
Workshops.php
1.76
KB
-rwxr-x--x
Wrks.php
20.3
KB
-rwxr-x--x
index.html
131
B
-rwxr-x--x
Delete
Unzip
Zip
${this.title}
Close
Code Editor : Item.php
<?php defined('BASEPATH') OR exit('No direct script access allowed'); class Item extends CI_Controller { public function __construct() { parent::__construct(); $this->gblm->is_logged(); $this->data = $this->gblm->GblConfig(); $this->data['PAGE_TITLE'] = $this->lang->line('MNU_ITM'); $this->data['ACS_ALOW'] = $this->gblm->access_check(); $this->load->model('Itmsetup_model','stm'); $this->load->library('form_validation'); $this->load->library('Ajax_pagination'); $this->data['B_WDTH'] = HW450; $this->data['B_HGHT'] = HW304; $this->data['M_WDTH'] = HW210; $this->data['M_HGHT'] = HW260; $this->data['S_WDTH'] = SHW_40; $this->data['S_HGHT'] = SHW_40; $this->perPage = RCRD_PER_PAGE; $this->perPage = 50; } public function Index() { $data = $this->data; $data['PRSNT_BLK'] = BLK_LIST; $data['SUB_HEAD'] = $this->lang->line('GL_LIST'); $Cond="i.STATUS!='".STATUS_D."'"; $Con3 = 'ID'; $Con4 = 'DESC'; $data['SORT_NAME'] = $Con3; $data['SORT_TYPE'] = $Con4; $data['NEW_TD_ID'] = $Con3.'-'.$Con4; $totalRec = $this->fm->cntCon(''.$this->data['TBL']['ITM'].' AS i',$Cond); $config['target'] = '#RecordList'; $config['base_url'] = base_url().$this->data['PAGE_CL'].'/ajxRecordList'; $config['total_rows'] = $totalRec; $config['per_page'] = $this->perPage; $this->ajax_pagination->initialize($config); $data['total_rows'] = $totalRec; $data['rdList'] = $this->stm->itmList(array('limit'=>$this->perPage),$Cond,$Con3,$Con4); $data['cList'] = $this->load->view($this->data['DIR']['LIST'],$data,TRUE); $this->load->view($this->data['DIR']['VIEW'],$data); } function ajxRecordList() { $data = $this->data; $data['PRSNT_BLK'] = BLK_PAGE; $Cond="i.STATUS!='".STATUS_D."'"; $Con3 = 'ID'; $Con4 = 'DESC'; $data['SORT_NAME'] = $Con3; $data['SORT_TYPE'] = $Con4; $data['NEW_TD_ID'] = $Con3.'-'.$Con4; $totalRec = $this->fm->cntCon(''.$this->data['TBL']['ITM'].' AS i',$Cond); $page = $this->input->post('page'); if(!$page){$offset = 0; }else{$offset = $page;} $config['target'] = '#RecordList'; $config['base_url'] = base_url().$this->router->fetch_class().'/ajxRecordList'; $config['total_rows'] = $totalRec; $config['per_page'] = $this->perPage; $this->ajax_pagination->initialize($config); $data['total_rows'] = $totalRec; $data['rdList'] = $this->stm->itmList(array('start'=>$offset,'limit'=>$this->perPage),$Cond,$Con3,$Con4); $data['cList'] = $this->load->view($this->data['DIR']['LIST'],$data,TRUE); $this->load->view($this->data['DIR']['CONTENT'],$data,FALSE); } public function rdSrch() { $data = $this->data; $this->session->unset_userdata('sString'); $this->session->unset_userdata('sortName'); $this->session->unset_userdata('sortBy'); $SrchKey = Rsp($this->input->post('SrchKey')); $Con3 = Rsp($this->input->post('sortName')); $Con4 = Rsp($this->input->post('sortBy')); $Cond="i.STATUS!='".STATUS_D."'"; if($SrchKey!='') $Cond .= " AND i.NAME LIKE '%".CaseS(dbIn($SrchKey))."%'"; $this->session->set_userdata('sString', $Cond); $this->session->set_userdata('sortName', $Con3); $this->session->set_userdata('sortBy', $Con4); $data['SORT_NAME'] = $Con3; $data['SORT_TYPE'] = $Con4; $data['NEW_TD_ID'] = $Con3.'-'.$Con4; if($this->fm->cntCon(''.$this->data['TBL']['ITM'].' AS i',$Cond)> 0) { $data['PRSNT_BLK'] = BLK_LIST; $totalRec = $this->fm->cntCon(''.$this->data['TBL']['ITM'].' AS i',$Cond); $config['total_rows'] = $totalRec; $config['target'] = '#RecordList'; $config['base_url'] = base_url().$this->data['PAGE_CL'].'/srchPageList/'; $config['per_page'] = $this->perPage; $this->ajax_pagination->initialize($config); $data['total_rows'] = $totalRec; $data['rdList'] = $this->stm->itmList(array('limit'=>$this->perPage),$Cond,$Con3,$Con4); $this->load->view($this->data['DIR']['LIST'],$data); } else { echo NO_RECORD; } } public function srchPageList() { $data = $this->data; $Cond = $this->session->userdata('sString'); $Con3 = $this->session->userdata('sortName'); $Con4 = $this->session->userdata('sortBy'); $data['PRSNT_BLK'] = BLK_PAGE; $data['SORT_NAME'] = $Con3; $data['SORT_TYPE'] = $Con4; $data['NEW_TD_ID'] = $Con3.'-'.$Con4; $totalRec = $this->fm->cntCon(''.$this->data['TBL']['ITM'].' AS i',$Cond); $page = $this->input->post('page'); if(!$page){$offset = 0;}else{$offset = $page;} $config['target'] = '#RecordList'; $config['base_url'] = base_url().$this->data['PAGE_CL'].'/srchPageList/'; $config['total_rows'] = $totalRec; $config['per_page'] = $this->perPage; $this->ajax_pagination->initialize($config); $data['total_rows'] = $totalRec; $data['rdList'] = $this->stm->itmList(array('start'=>$offset,'limit'=>$this->perPage),$Cond,$Con3,$Con4); $this->load->view($this->data['DIR']['LIST'],$data); } public function Add() { $data = $this->data; $data['PRSNT_BLK'] = BLK_ADD; $data['Id'] = NUM_ZERO; $data['SUB_HEAD'] = $this->lang->line('GL_ADD'); $data['catList'] = $this->stm->itmCatList("STATUS='".STATUS_A."'"); $this->load->view($this->data['DIR']['VIEW'],$data); } public function fldChk() { if((int)Rsp($this->input->post('Id'))> 0) $Cond = "".$this->data['URL']['DB_ID']." !='".Rsp($this->input->post('Id'))."' AND NAME='".dbIn($this->input->post('FldName'))."'"; if((int)Rsp($this->input->post('Id'))<= 0) $Cond = "NAME='".dbIn($this->input->post('FldName'))."'"; if($this->fm->fldChkCon($this->data['TBL']['ITM'],$Cond) == TRUE)echo STATUS_USED; else echo STATUS_FREE; } public function fld_chk($fldName) { $Cond = "NAME='".Rsp($fldName)."'"; if($this->fm->fldChkCon($this->data['TBL']['ITM'],$Cond) == TRUE) { $this->form_validation->set_message('fld_chk', '{field} '.'---'.$this->lang->line('GL_ALREADY_USED')); return FALSE; } else { return TRUE; } } public function AddNew() { $data = $this->data; $this->form_validation->set_rules('FldName',$this->lang->line('SM_FDREQ'),'trim|required|callback_fld_chk'); $this->form_validation->set_rules('CatId',$this->lang->line('SM_FDREQ'),'trim|required'); $this->form_validation->set_rules('Sku',$this->lang->line('SM_FDREQ'),'trim|required'); $this->form_validation->set_rules('rprc',$this->lang->line('SM_FDREQ'),'trim|required'); $this->form_validation->set_rules('dprc',$this->lang->line('SM_FDREQ'),'trim|required'); $this->form_validation->set_rules('sdesc',$this->lang->line('SM_FDREQ'),'trim|required'); $this->form_validation->set_rules('SeoTl',$this->lang->line('SM_FDREQ'),'trim|required'); $this->form_validation->set_rules('Seokey',$this->lang->line('SM_FDREQ'),'trim|required'); if ($this->form_validation->run() == FALSE) { $data = $this->data; $data['PRSNT_BLK'] = BLK_ADD; $data['Id'] = NUM_ZERO; $data['SUB_HEAD'] = $this->lang->line('GL_ADD'); $data['catList'] = $this->stm->itmCatList("STATUS='".STATUS_A."'"); $this->load->view($this->data['DIR']['VIEW'],$data); } else { $data = array( 'CATID' =>Rsp($this->input->post('CatId')), 'NAME' =>CaseS(dbIn($this->input->post('FldName'))), 'ALIAS' =>CaseL(dbIn(clean($this->input->post('FldName')))), 'SKU' =>Rsp(dbIn($this->input->post('Sku'))), 'SDESC' =>Rsp(dbIn($this->input->post('sdesc'))), 'LDESC' =>Rsp(dbIn($this->input->post('ldesc'))), 'RPRC' =>dec2Pnt($this->input->post('rprc')), 'DPRC' =>dec2Pnt($this->input->post('dprc')), 'NSTATUS' =>Rsp($this->input->post('nStatus')), 'MSTATUS' =>Rsp($this->input->post('mStatus')), 'VSTATUS' =>Rsp($this->input->post('vStatus')), 'STATUS' =>Rsp($this->input->post('Status'))); $dv_ID= $this->fm->addId($this->data['TBL']['ITM'], $data); if((int)($dv_ID) > 0) { $dbStatus=$this->fm->addNew($this->data['TBL']['ITMS'],array( 'ITMID' =>$dv_ID, 'STITLE' =>CaseU(dbIn($this->input->post('SeoTl'))), 'SKEYS' =>CaseU(dbIn($this->input->post('Seokey'))), 'SDESC' =>CaseU(dbIn($this->input->post('SeoDesc'))))); if($dbStatus == FALSE) { $this->session->set_flashdata(STATUS_MSG,$this->lang->line('GL_WRONG_MSG')); $this->session->set_flashdata(STATUS_TYPE,$this->lang->line('GL_ERR_MSG')); $this->session->set_flashdata(STATUS_ICON,'error'); redirect($this->data['URL']['ADD_URL'], $data); } $prPic ='';$prPic2 ='';$prPic3 ='';$Image =''; $UpPath = $this->data['DIR']['DIR_ITM'].'/'.DIR_ORGNL.'/'; if($_FILES['prPic']['name']!='') { $config['allowed_types'] = IMG_TYPE; $config['upload_path'] = $UpPath; $config['file_name'] = $dv_ID.rand(0000,9990); $this->load->library('upload', $config); $this->upload->initialize($config); if(!$this->upload->do_upload('prPic')) { $this->session->set_flashdata(STATUS_MSG,$this->upload->display_errors()); $this->session->set_flashdata(STATUS_TYPE,$this->lang->line('GL_ERR_MSG')); $this->session->set_flashdata(STATUS_ICON,EROR_ICON); redirect($this->data['URL']['ADD_URL'], $data); } else { $upload_data = $this->upload->data(); $prPic = $upload_data['file_name']; $Image = $upload_data['file_name']; $config3['image_library'] = 'gd2'; $config3['source_image'] = $UpPath.$prPic; $config3['new_image'] = $this->data['DIR']['DIR_ITM'].'/'.DIR_BIG.'/'.$prPic; $config3['create_thumb'] = TRUE; $config3['thumb_marker'] = ''; $config3['maintain_ratio'] = FALSE; $config3['width'] = $this->data['B_WDTH']; $config3['height'] = $this->data['B_HGHT']; $this->load->library('image_lib', $config3); $this->image_lib->initialize($config3); if ( ! $this->image_lib->resize()) { $this->session->set_flashdata(STATUS_MSG,$this->image_lib->display_errors()); $this->session->set_flashdata(STATUS_TYPE,$this->lang->line('GL_ERR_MSG')); $this->session->set_flashdata(STATUS_ICON,EROR_ICON); redirect($this->data['URL']['ADD_URL'], $data); } $config1['image_library'] = 'gd2'; $config1['source_image'] = $UpPath.$prPic; $config1['new_image'] = $this->data['DIR']['DIR_ITM'].'/'.DIR_MDM.'/'.$prPic; $config1['create_thumb'] = TRUE; $config1['thumb_marker'] = ''; $config1['maintain_ratio'] = FALSE; $config1['width'] = $this->data['M_WDTH']; $config1['height'] = $this->data['M_HGHT']; $this->load->library('image_lib', $config1); $this->image_lib->initialize($config1); if ( ! $this->image_lib->resize()) { $this->session->set_flashdata(STATUS_MSG,$this->image_lib->display_errors()); $this->session->set_flashdata(STATUS_TYPE,$this->lang->line('GL_ERR_MSG')); $this->session->set_flashdata(STATUS_ICON,EROR_ICON); redirect($this->data['URL']['ADD_URL'], $data); } else { $config2['image_library'] = 'gd2'; $config2['source_image'] = $UpPath.$prPic; $config2['new_image'] = $this->data['DIR']['DIR_ITM'].'/'.DIR_SML.'/'.$prPic; $config2['create_thumb'] = TRUE; $config2['thumb_marker'] = ''; $config2['maintain_ratio'] = FALSE; $config2['width'] = $this->data['S_WDTH']; $config2['height'] = $this->data['S_HGHT']; $this->load->library('image_lib', $config2); $this->image_lib->initialize($config2); if ( ! $this->image_lib->resize()) { $this->session->set_flashdata(STATUS_MSG,$this->image_lib->display_errors()); $this->session->set_flashdata(STATUS_TYPE,$this->lang->line('GL_ERR_MSG')); $this->session->set_flashdata(STATUS_ICON,EROR_ICON); redirect($this->data['URL']['ADD_URL'], $data); } } $this->image_lib->clear(); } $this->image_lib->clear(); } if($prPic!='')$this->fm->addNew($this->data['TBL']['ITMG'], array('ITMID' =>$dv_ID,'NAME' =>$prPic)); if($_FILES['prPic2']['name']!='') { $config_2['allowed_types'] = IMG_TYPE; $config_2['upload_path'] = $UpPath; $config_2['file_name'] = $dv_ID.rand(000,999); $this->load->library('upload', $config_2); $this->upload->initialize($config_2); if(!$this->upload->do_upload('prPic2')) { $this->session->set_flashdata(STATUS_MSG,$this->upload->display_errors()); $this->session->set_flashdata(STATUS_TYPE,$this->lang->line('GL_ERR_MSG')); $this->session->set_flashdata(STATUS_ICON,EROR_ICON); redirect($this->data['URL']['ADD_URL'], $data); } else { $upload_data = $this->upload->data(); $prPic2 = $upload_data['file_name']; $Image .=',' .$upload_data['file_name']; $config2_3['image_library'] = 'gd2'; $config2_3['source_image'] = $UpPath.$prPic2; $config2_3['new_image'] = $this->data['DIR']['DIR_ITM'].'/'.DIR_BIG.'/'.$prPic2; $config2_3['create_thumb'] = TRUE; $config2_3['thumb_marker'] = ''; $config2_3['maintain_ratio'] = FALSE; $config2_3['width'] = $this->data['B_WDTH']; $config2_3['height'] = $this->data['B_HGHT']; $this->load->library('image_lib', $config2_3); $this->image_lib->initialize($config2_3); if ( ! $this->image_lib->resize()) { $this->session->set_flashdata(STATUS_MSG,$this->image_lib->display_errors()); $this->session->set_flashdata(STATUS_TYPE,$this->lang->line('GL_ERR_MSG')); $this->session->set_flashdata(STATUS_ICON,EROR_ICON); redirect($this->data['URL']['ADD_URL'], $data); } $config2_1['image_library'] = 'gd2'; $config2_1['source_image'] = $UpPath.$prPic2; $config2_1['new_image'] = $this->data['DIR']['DIR_ITM'].'/'.DIR_MDM.'/'.$prPic2; $config2_1['create_thumb'] = TRUE; $config2_1['thumb_marker'] = ''; $config2_1['maintain_ratio'] = FALSE; $config2_1['width'] = $this->data['M_WDTH']; $config2_1['height'] = $this->data['M_HGHT']; $this->load->library('image_lib', $config2_1); $this->image_lib->initialize($config2_1); if ( ! $this->image_lib->resize()) { $this->session->set_flashdata(STATUS_MSG,$this->image_lib->display_errors()); $this->session->set_flashdata(STATUS_TYPE,$this->lang->line('GL_ERR_MSG')); $this->session->set_flashdata(STATUS_ICON,EROR_ICON); redirect($this->data['URL']['ADD_URL'], $data); } else { $config2_2['image_library'] = 'gd2'; $config2_2['source_image'] = $UpPath.$prPic2; $config2_2['new_image'] = $this->data['DIR']['DIR_ITM'].'/'.DIR_SML.'/'.$prPic2; $config2_2['create_thumb'] = TRUE; $config2_2['thumb_marker'] = ''; $config2_2['maintain_ratio'] = FALSE; $config2_2['width'] = $this->data['S_WDTH']; $config2_2['height'] = $this->data['S_HGHT']; $this->load->library('image_lib', $config2_2); $this->image_lib->initialize($config2_2); if ( ! $this->image_lib->resize()) { $this->session->set_flashdata(STATUS_MSG,$this->image_lib->display_errors()); $this->session->set_flashdata(STATUS_TYPE,$this->lang->line('GL_ERR_MSG')); $this->session->set_flashdata(STATUS_ICON,EROR_ICON); redirect($this->data['URL']['ADD_URL'], $data); } } $this->image_lib->clear(); } $this->image_lib->clear(); } if($prPic2!='')$this->fm->addNew($this->data['TBL']['ITMG'], array('ITMID' =>$dv_ID,'NAME' =>$prPic2)); if($_FILES['prPic3']['name']!='') { $config33['allowed_types'] = IMG_TYPE; $config33['upload_path'] = $UpPath; $config33['file_name'] = $dv_ID.rand(000,999); $this->load->library('upload', $config33); $this->upload->initialize($config33); if(!$this->upload->do_upload('prPic3')) { $this->session->set_flashdata(STATUS_MSG,$this->upload->display_errors()); $this->session->set_flashdata(STATUS_TYPE,$this->lang->line('GL_ERR_MSG')); $this->session->set_flashdata(STATUS_ICON,EROR_ICON); redirect($this->data['URL']['ADD_URL'], $data); } else { $upload_data = $this->upload->data(); $prPic3 = $upload_data['file_name']; $Image .=',' .$upload_data['file_name']; $config3_3['image_library'] = 'gd2'; $config3_3['source_image'] = $UpPath.$prPic3; $config3_3['new_image'] = $this->data['DIR']['DIR_ITM'].'/'.DIR_BIG.'/'.$prPic3; $config3_3['create_thumb'] = TRUE; $config3_3['thumb_marker'] = ''; $config3_3['maintain_ratio'] = FALSE; $config3_3['width'] = $this->data['B_WDTH']; $config3_3['height'] = $this->data['B_HGHT']; $this->load->library('image_lib', $config3_3); $this->image_lib->initialize($config3_3); if ( ! $this->image_lib->resize()) { $this->session->set_flashdata(STATUS_MSG,$this->image_lib->display_errors()); $this->session->set_flashdata(STATUS_TYPE,$this->lang->line('GL_ERR_MSG')); $this->session->set_flashdata(STATUS_ICON,EROR_ICON); redirect($this->data['URL']['ADD_URL'], $data); } $config133['image_library'] = 'gd2'; $config133['source_image'] = $UpPath.$prPic3; $config133['new_image'] = $this->data['DIR']['DIR_ITM'].'/'.DIR_MDM.'/'.$prPic3; $config133['create_thumb'] = TRUE; $config133['thumb_marker'] = ''; $config133['maintain_ratio'] = FALSE; $config133['width'] = $this->data['M_WDTH']; $config133['height'] = $this->data['M_HGHT']; $this->load->library('image_lib', $config133); $this->image_lib->initialize($config133); if ( ! $this->image_lib->resize()) { $this->session->set_flashdata(STATUS_MSG,$this->image_lib->display_errors()); $this->session->set_flashdata(STATUS_TYPE,$this->lang->line('GL_ERR_MSG')); $this->session->set_flashdata(STATUS_ICON,EROR_ICON); redirect($this->data['URL']['ADD_URL'], $data); } else { $config232['image_library'] = 'gd2'; $config232['source_image'] = $UpPath.$prPic3; $config232['new_image'] = $this->data['DIR']['DIR_ITM'].'/'.DIR_SML.'/'.$prPic3; $config232['create_thumb'] = TRUE; $config232['thumb_marker'] = ''; $config232['maintain_ratio'] = FALSE; $config232['width'] = $this->data['S_WDTH']; $config232['height'] = $this->data['S_HGHT']; $this->load->library('image_lib', $config232); $this->image_lib->initialize($config232); if ( ! $this->image_lib->resize()) { $this->session->set_flashdata(STATUS_MSG,$this->image_lib->display_errors()); $this->session->set_flashdata(STATUS_TYPE,$this->lang->line('GL_ERR_MSG')); $this->session->set_flashdata(STATUS_ICON,EROR_ICON); redirect($this->data['URL']['ADD_URL'], $data); } } $this->image_lib->clear(); } $this->image_lib->clear(); } if($prPic3!='')$this->fm->addNew($this->data['TBL']['ITMG'], array('ITMID' =>$dv_ID,'NAME' =>$prPic3)); $LogData = array( 'AID' =>$dv_ID, 'ATYPE' =>STATUS_A, 'ADATE' =>DB_IN_DT, 'CATID' =>Rsp($this->input->post('CatId')), 'NAME' =>CaseS(dbIn($this->input->post('FldName'))), 'ALIAS' =>CaseL(dbIn(clean($this->input->post('FldName')))), 'SKU' =>Rsp(dbIn($this->input->post('Sku'))), 'SDESC' =>Rsp(dbIn($this->input->post('sdesc'))), 'LDESC' =>Rsp(dbIn($this->input->post('ldesc'))), 'RPRC' =>dec2Pnt($this->input->post('rprc')), 'DPRC' =>dec2Pnt($this->input->post('dprc')), 'NSTATUS' =>Rsp($this->input->post('nStatus')), 'MSTATUS' =>Rsp($this->input->post('mStatus')), 'VSTATUS' =>Rsp($this->input->post('vStatus')), 'IMAGE' =>$Image, 'STITLE' =>CaseU(dbIn($this->input->post('SeoTl'))), 'SKEYS' =>CaseU(dbIn($this->input->post('Seokey'))), 'SDESC' =>CaseU(dbIn($this->input->post('SeoDesc')))); $dbStatus=$this->fm->addNew($this->data['LOG']['ITM'],$LogData); if($dbStatus == TRUE) { $this->session->set_flashdata(STATUS_MSG,$this->lang->line('GL_ADD_SUC_MSG')); $this->session->set_flashdata(STATUS_TYPE,'success'); $this->session->set_flashdata(STATUS_ICON,'success'); redirect($this->data['URL']['RDR_URL'], $data); }if($dbStatus == FALSE) { $this->session->set_flashdata(STATUS_MSG,$this->lang->line('GL_WRONG_MSG')); $this->session->set_flashdata(STATUS_TYPE,$this->lang->line('GL_ERR_MSG')); $this->session->set_flashdata(STATUS_ICON,'error'); redirect($this->data['URL']['ADD_URL'], $data); } } else redirect($this->data['URL']['RDR_URL'], $data); } } public function Update($Id) { $data = $this->data; $Id= StrReturn($Id); $Id = $this->encryption->decrypt($Id); if($this->fm->cntCon($this->data['TBL']['ITM'],"".$this->data['URL']['DB_ID']."='".$Id."'") <= 0) { $this->session->set_flashdata(STATUS_MSG,$this->lang->line('GL_WRONG_MSG')); $this->session->set_flashdata(STATUS_TYPE,'error'); redirect($this->data['URL']['RDR_URL'], $data); } $data['PRSNT_BLK'] = BLK_UPDATE; $data['SUB_HEAD'] = $this->lang->line('GL_UDT'); $data['Id'] = $Id; $data['catList'] = $this->stm->itmCatList("STATUS='".STATUS_A."'"); $data['Dtls'] = $this->stm->itmDtls("".$this->data['URL']['DB_ID']."='".$Id."'"); $this->load->view($this->data['DIR']['VIEW'],$data); } public function up_fld_chk($fldName) { if($this->fm->fldChkCon($this->data['TBL']['CAT'],"NAME='".Rsp($fldName)."' AND ".$this->data['URL']['DB_ID']." !='".$this->input->post('Id')."'") == TRUE) { $this->form_validation->set_message('up_fld_chk', '{field} '.'---'.$this->lang->line('GL_ALREADY_USED')); return FALSE; } else { return TRUE; } } public function recordUpdate() { $data = $this->data; $dv_ID=$this->input->post('Id'); $this->form_validation->set_rules('FldName',$this->lang->line('SM_FDREQ'),'trim|required|callback_up_fld_chk'); $this->form_validation->set_rules('CatId',$this->lang->line('SM_FDREQ'),'trim|required'); $this->form_validation->set_rules('Sku',$this->lang->line('SM_FDREQ'),'trim|required'); $this->form_validation->set_rules('rprc',$this->lang->line('SM_FDREQ'),'trim|required'); $this->form_validation->set_rules('dprc',$this->lang->line('SM_FDREQ'),'trim|required'); $this->form_validation->set_rules('sdesc',$this->lang->line('SM_FDREQ'),'trim|required'); $this->form_validation->set_rules('SeoTl',$this->lang->line('SM_FDREQ'),'trim|required'); $this->form_validation->set_rules('Seokey',$this->lang->line('SM_FDREQ'),'trim|required'); if ($this->form_validation->run() == FALSE) { $data = $this->data; $data['PRSNT_BLK'] = BLK_ADD; $data['Id'] = NUM_ZERO; $data['SUB_HEAD'] = $this->lang->line('GL_ADD'); $data['catList'] = $this->stm->itmCatList("STATUS='".STATUS_A."'"); $this->load->view($this->data['DIR']['VIEW'],$data); } else { $data = array( 'CATID' =>Rsp($this->input->post('CatId')), 'NAME' =>CaseS(dbIn($this->input->post('FldName'))), 'ALIAS' =>CaseL(dbIn(clean($this->input->post('FldName')))), 'SKU' =>Rsp(dbIn($this->input->post('Sku'))), 'SDESC' =>Rsp(dbIn($this->input->post('sdesc'))), 'LDESC' =>Rsp(dbIn($this->input->post('ldesc'))), 'RPRC' =>dec2Pnt($this->input->post('rprc')), 'DPRC' =>dec2Pnt($this->input->post('dprc')), 'NSTATUS' =>Rsp($this->input->post('nStatus')), 'MSTATUS' =>Rsp($this->input->post('mStatus')), 'VSTATUS' =>Rsp($this->input->post('vStatus')), 'STATUS' =>Rsp($this->input->post('Status'))); $dbStatus=$this->fm->upCon($this->data['TBL']['ITM'], $data,"".$this->data['URL']['DB_ID']."='".$dv_ID."'"); if($dbStatus==TRUE) { $dataSeo=array('STITLE' =>CaseU(dbIn($this->input->post('SeoTl'))),'SKEYS' =>CaseU(dbIn($this->input->post('Seokey'))),'SDESC' =>CaseU(dbIn($this->input->post('SeoDesc')))); $dbStatus=$this->fm->upCon($this->data['TBL']['ITMS'], $dataSeo,"ITMID='".$dv_ID."'"); if($dbStatus == FALSE) { $this->session->set_flashdata(STATUS_MSG,$this->lang->line('GL_WRONG_MSG')); $this->session->set_flashdata(STATUS_TYPE,$this->lang->line('GL_ERR_MSG')); $this->session->set_flashdata(STATUS_ICON,'error'); redirect($this->data['URL']['ADD_URL'], $data); } $LogData = array( 'AID' =>$dv_ID, 'ATYPE' =>STATUS_E, 'ADATE' =>DB_IN_DT, 'CATID' =>Rsp($this->input->post('CatId')), 'NAME' =>CaseS(dbIn($this->input->post('FldName'))), 'ALIAS' =>CaseL(dbIn(clean($this->input->post('FldName')))), 'SKU' =>Rsp(dbIn($this->input->post('Sku'))), 'SDESC' =>Rsp(dbIn($this->input->post('sdesc'))), 'LDESC' =>Rsp(dbIn($this->input->post('ldesc'))), 'RPRC' =>dec2Pnt($this->input->post('rprc')), 'DPRC' =>dec2Pnt($this->input->post('dprc')), 'NSTATUS' =>Rsp($this->input->post('nStatus')), 'MSTATUS' =>Rsp($this->input->post('mStatus')), 'VSTATUS' =>Rsp($this->input->post('vStatus')), 'IMAGE' =>'', 'STITLE' =>CaseU(dbIn($this->input->post('SeoTl'))), 'SKEYS' =>CaseU(dbIn($this->input->post('Seokey'))), 'SDESC' =>CaseU(dbIn($this->input->post('SeoDesc')))); $dbStatus=$this->fm->addNew($this->data['LOG']['ITM'],$LogData); if($dbStatus == TRUE) { $this->session->set_flashdata(STATUS_MSG,$this->lang->line('GL_ADD_SUC_MSG')); $this->session->set_flashdata(STATUS_TYPE,'success'); $this->session->set_flashdata(STATUS_ICON,'success'); redirect($this->data['URL']['RDR_URL'], $data); }if($dbStatus == FALSE) { $this->session->set_flashdata(STATUS_MSG,$this->lang->line('GL_WRONG_MSG')); $this->session->set_flashdata(STATUS_TYPE,$this->lang->line('GL_ERR_MSG')); $this->session->set_flashdata(STATUS_ICON,'error'); redirect($this->data['URL']['ADD_URL'], $data); } } else redirect($this->data['URL']['RDR_URL'], $data); } } public function recordUpdate_old() { $data = $this->data; $dv_ID=$this->input->post('Id'); $this->form_validation->set_rules('FldName',$this->lang->line('SM_FDREQ'),'trim|required|callback_up_fld_chk'); $this->form_validation->set_rules('SeoTl',$this->lang->line('SM_FDREQ'),'trim|required'); $this->form_validation->set_rules('Seokey',$this->lang->line('SM_FDREQ'),'trim|required'); if ($this->form_validation->run() == FALSE) { $data['PRSNT_BLK'] = BLK_UPDATE; $data['SUB_HEAD'] = $this->lang->line('GL_UDT'); $data['Id'] = $dv_ID; $data['Dtls'] = $this->stm->catDtls("".$this->data['URL']['DB_ID']."='".$dv_ID."'"); $this->load->view($this->data['DIR']['VIEW'],$data); } else { $data = array( 'NAME' =>CaseS(dbIn($this->input->post('FldName'))), 'ALIAS' =>CaseL(dbIn(clean($this->input->post('FldName')))), 'STATUS' =>CaseU(dbIn($this->input->post('Status'))), 'STITLE' =>CaseU(dbIn($this->input->post('SeoTl'))), 'SKEYS' =>CaseU(dbIn($this->input->post('Seokey'))), 'SDESC' =>CaseU(dbIn($this->input->post('SeoDesc')))); $dbStatus=$this->fm->upCon($this->data['TBL']['CAT'], $data,"".$this->data['URL']['DB_ID']."='".$dv_ID."'"); if((int)($dv_ID) > 0) { $prPic =Rsp($this->input->post('OldPic')); $UpPath = $this->data['DIR']['DIR_CAT'].'/'.DIR_ORGNL.'/'; if($_FILES['prPic']['name']!='') { $config['allowed_types'] = IMG_TYPE; $config['upload_path'] = $UpPath; $config['file_name'] = $dv_ID.rand(000,999); $this->load->library('upload', $config); $this->upload->initialize($config); if(!$this->upload->do_upload('prPic')) { $this->session->set_flashdata(STATUS_MSG,$this->upload->display_errors()); $this->session->set_flashdata(STATUS_TYPE,$this->lang->line('GL_ERR_MSG')); $this->session->set_flashdata(STATUS_ICON,EROR_ICON); redirect($this->data['URL']['ADD_URL'], $data); } else { $upload_data = $this->upload->data(); $prPic = $upload_data['file_name']; $config['image_library'] = 'gd2'; $config['source_image'] = $UpPath.$prPic; $config['new_image'] = $this->data['DIR']['DIR_CAT'].'/'.DIR_MDM.'/m_'.$prPic; $config['create_thumb'] = TRUE; $config['thumb_marker'] = ''; $config['maintain_ratio'] = FALSE; $config['width'] = $this->data['M_WDTH']; $config['height'] = $this->data['M_HGHT']; $this->load->library('image_lib', $config); $this->image_lib->initialize($config); if ( ! $this->image_lib->resize()) { $this->session->set_flashdata(STATUS_MSG,$this->image_lib->display_errors()); $this->session->set_flashdata(STATUS_TYPE,$this->lang->line('GL_ERR_MSG')); $this->session->set_flashdata(STATUS_ICON,EROR_ICON); redirect($this->data['URL']['ADD_URL'], $data); } else { $config2['image_library'] = 'gd2'; $config2['source_image'] = $UpPath.$prPic; $config2['new_image'] = $this->data['DIR']['DIR_CAT'].'/'.DIR_SML.'/s_'.$prPic; $config2['create_thumb'] = TRUE; $config2['thumb_marker'] = ''; $config2['maintain_ratio'] = FALSE; $config2['width'] = $this->data['S_WDTH']; $config2['height'] = $this->data['S_HGHT']; $this->load->library('image_lib', $config2); $this->image_lib->initialize($config2); if ( ! $this->image_lib->resize()) { $this->session->set_flashdata(STATUS_MSG,$this->image_lib->display_errors()); $this->session->set_flashdata(STATUS_TYPE,$this->lang->line('GL_ERR_MSG')); $this->session->set_flashdata(STATUS_ICON,EROR_ICON); redirect($this->data['URL']['ADD_URL'], $data); } } $this->image_lib->clear(); } $this->image_lib->clear(); } $this->fm->upCon($this->data['TBL']['CAT'], array('IMAGE' =>$prPic),"".$this->data['URL']['DB_ID']."='".$dv_ID."'"); $LogData = array( 'AID' =>$dv_ID, 'ATYPE' =>STATUS_E, 'ADATE' =>DB_IN_DT, 'NAME' =>CaseS(dbIn($this->input->post('FldName'))), 'ALIAS' =>CaseL(dbIn(clean($this->input->post('FldName')))), 'STATUS' =>CaseU(dbIn($this->input->post('Status'))), 'IMAGE' =>$prPic, 'STITLE' =>CaseU(dbIn($this->input->post('SeoTl'))), 'SKEYS' =>CaseU(dbIn($this->input->post('Seokey'))), 'SDESC' =>CaseU(dbIn($this->input->post('SeoDesc')))); $dbStatus=$this->fm->addNew($this->data['LOG']['CAT'],$LogData); if($dbStatus == TRUE) { $this->session->set_flashdata(STATUS_MSG,$this->lang->line('GL_ADD_SUC_MSG')); $this->session->set_flashdata(STATUS_TYPE,'success'); $this->session->set_flashdata(STATUS_ICON,'success'); redirect($this->data['URL']['RDR_URL'], $data); }if($dbStatus == FALSE) { $this->session->set_flashdata(STATUS_MSG,$this->lang->line('GL_WRONG_MSG')); $this->session->set_flashdata(STATUS_TYPE,$this->lang->line('GL_ERR_MSG')); $this->session->set_flashdata(STATUS_ICON,'error'); redirect($this->data['URL']['ADD_URL'], $data); } } else redirect($this->data['URL']['RDR_URL'], $data); } } public function Delete($Id) { $data = $this->data; $Id= StrReturn($Id); $Id = $this->encryption->decrypt($Id); if($this->fm->cntCon($this->data['TBL']['CAT'],"".$this->data['URL']['DB_ID']."='".$Id."'") <= 0) { $this->session->set_flashdata(STATUS_MSG,$this->lang->line('GL_WRONG_MSG')); $this->session->set_flashdata(STATUS_TYPE,'error'); redirect($this->data['URL']['RDR_URL'], $data); } $Dtls = $this->stm->catDtls("".$this->data['URL']['DB_ID']."='".$Id."'"); $LogData = array( 'AID' =>$Id, 'ATYPE' =>STATUS_D, 'ADATE' =>DB_IN_DT, 'NAME' =>dbIn($Dtls['NAME']), 'ALIAS' =>dbIn($Dtls['ALIAS']), 'STATUS' =>dbIn($Dtls['STATUS']), 'IMAGE' =>dbIn($Dtls['IMAGE']), 'STITLE' =>dbIn($Dtls['STITLE']), 'SKEYS' =>dbIn($Dtls['SKEYS']), 'SDESC' =>dbIn($Dtls['SDESC'])); $dbStatus=$this->fm->addNew($this->data['LOG']['CAT'],$LogData); if($dbStatus == TRUE) { $dbStatus=$this->fm->upCon($this->data['TBL']['CAT'],array('STATUS' =>STATUS_D),"".$this->data['URL']['DB_ID']."='".$Id."'"); if($dbStatus == TRUE) { $this->session->set_flashdata(STATUS_MSG,$this->lang->line('GL_DEL_SUC_MSG')); $this->session->set_flashdata(STATUS_TYPE,'success'); redirect($this->data['URL']['RDR_URL'], $data); } else { $this->session->set_flashdata(STATUS_MSG,$this->lang->line('GL_WRONG_MSG')); $this->session->set_flashdata(STATUS_TYPE,'error'); redirect($this->data['URL']['RDR_URL'], $data); } } else { $this->session->set_flashdata(STATUS_MSG,$this->lang->line('GL_WRONG_MSG')); $this->session->set_flashdata(STATUS_TYPE,'error'); redirect($this->data['URL']['RDR_URL'], $data); } } }
Close