From 06e8d66c95f1bedcb4c28866e06743a1d8a3dff1 Mon Sep 17 00:00:00 2001 From: venbatechnologies Date: Tue, 19 Jun 2018 14:00:06 +0530 Subject: [PATCH] datechange --- .../controllers/emergencypurchaseorder.php | 35 +++++++++++++------ application/views/POlist.php | 7 ++-- 2 files changed, 30 insertions(+), 12 deletions(-) diff --git a/application/controllers/emergencypurchaseorder.php b/application/controllers/emergencypurchaseorder.php index 7ad77223..744710f4 100644 --- a/application/controllers/emergencypurchaseorder.php +++ b/application/controllers/emergencypurchaseorder.php @@ -477,24 +477,36 @@ function add($pathname) $constant = $this->input->post('hideconstants'); + +// $result = $_POST['browseFiles']; + +// $obj = json_decode($result, true); + +// echo ' ' . $obj . ' '; +// die(); - $arr = []; + $arr = []; $prefile =array(); for($i=1;$i<=$constant;$i++) - { + { + + $pathname = 'browseFiles'.$i; - if(!empty(str_replace(" ","",$_FILES[$pathname]['name']))) - { + if(!empty($_FILES[$pathname]['name'])) + { + + $files = str_replace(" ","",$_FILES[$pathname]['name']); + $fcount = 0; foreach ($prefile as $value) { - if($value == str_replace(" ","",$_FILES[$pathname]['name'])) + if($value == $files) { @@ -514,7 +526,7 @@ $prefile =array(); } - $prefile[] = str_replace(" ","",$_FILES[$pathname]['name']); + $prefile[] = $files; } } @@ -1042,15 +1054,18 @@ $prefile =array(); { $pathname = 'browseFiles'.$i; - if(!empty(str_replace(" ","",$_FILES[$pathname]['name']))) - { + if(!empty($_FILES[$pathname]['name'])) + { + + $files = str_replace(" ","",$_FILES[$pathname]['name']); + $fcount = 0; foreach ($prefile as $value) { - if($value == str_replace(" ","",$_FILES[$pathname]['name'])) + if($value == $files) { @@ -1070,7 +1085,7 @@ $prefile =array(); } - $prefile[] = str_replace(" ","",$_FILES[$pathname]['name']); + $prefile[] = $files; } } diff --git a/application/views/POlist.php b/application/views/POlist.php index 4cedc9cd..c135459e 100755 --- a/application/views/POlist.php +++ b/application/views/POlist.php @@ -113,8 +113,11 @@ "paging" : true, "ordering" : true, "scrollCollapse" : true, - "aaSorting": [[ 0, "desc" ]], - "searching" : true, + // "aaSorting": [[ 0, "desc" ]], + // "searching" : true, + "searching" : false, + "columnDefs" : [{"targets":3, "type":"date"}], + // "columnDefs" : [{"targets":3, "type":"date-eu"}], "bInfo": true });