From d483e2ae19fb35f222124783b98c04d0ca58fdeb Mon Sep 17 00:00:00 2001 From: Umar Date: Wed, 20 Jan 2021 21:11:06 +0500 Subject: [PATCH 1/4] BSCS170048 - Muhammad Umar lower_snake_case issue fixed in controllers/tracking.php more than 80 characters per line fixed --- application/controllers/cron.php | 54 ++++++++++++++++++++------- application/controllers/tracking.php | 56 ++++++++++++++-------------- 2 files changed, 68 insertions(+), 42 deletions(-) diff --git a/application/controllers/cron.php b/application/controllers/cron.php index e4bf5cf..b74fb9c 100644 --- a/application/controllers/cron.php +++ b/application/controllers/cron.php @@ -84,7 +84,9 @@ public function post_missing_activity_record(){ //$last_row_id++; } - $query = "SELECT * FROM mobile_activity_log WHERE id >= $last_row_id and CAST(created_datetime AS DATE) < '$datetime' and error IS NULL limit $limit"; + $query = "SELECT * FROM mobile_activity_log WHERE id >= $last_row_id"; + $query .= " and CAST(created_datetime AS DATE)" + $query .= "< '$datetime' and error IS NULL limit $limit"; //exit; @@ -96,13 +98,16 @@ public function post_missing_activity_record(){ if($range_row){ $last_rec_index = $results[count($results) - 1]; $this->db->where('id', $range_row->id); - $this->db->update('cron', array('log_id'=>$last_rec_index['id'] , 'run_datetime' => $run_datetime)); + $this->db->update('cron', array('log_id'=>$last_rec_index['id'] , + 'run_datetime' => $run_datetime) + ); } }else{ - - $min_log = mysql_query( "SELECT min(id) as minid FROM mobile_activity_log where error IS NULL"); + $mysql_string = "SELECT min(id) as minid FROM"; + $mysql_string .= " mobile_activity_log where error IS NULL"; + $min_log = mysql_query(mysql_string); $min_log_row = mysql_fetch_object($min_log); $last_row_id = 0; if($min_log_row){ @@ -110,7 +115,9 @@ public function post_missing_activity_record(){ //$run_datetime = date('Y-m-d H:i:s'); if($range_row){ $this->db->where('id', $range_row->id); - $this->db->update('cron', array('log_id'=>$last_row_id , 'run_datetime' => $run_datetime)); + $this->db->update('cron', array('log_id'=>$last_row_id , + 'run_datetime' => $run_datetime) + ); } } exit; @@ -175,7 +182,10 @@ public function post_missing_activity_record(){ $captions_images[$key] = $v; } else if ($key == 'caption_sequence') { $caption_sequence = urldecode($v); - } elseif ($key == 'form_id' || $key == 'row_key' || $key == 'security_key' || $key == "dateTime" || $key == "landing_page" || $key == "is_take_picture" || $key == 'form_icon_name') { + } elseif ($key == 'form_id' || $key == 'row_key' || + $key == 'security_key' || $key == "dateTime" || + $key == "landing_page" || $key == "is_take_picture" || + $key == 'form_icon_name') { } else { @@ -183,7 +193,9 @@ public function post_missing_activity_record(){ $vdcode = urldecode(base64_decode($v)); } else if(strpos($v, $form_info['security_key']) !== FALSE){ - $vdcode = urldecode(base64_decode(str_replace($form_info['security_key'], '', $v))); + $vdcode = urldecode(base64_decode(str_replace($form_info['security_key'], + '', $v)) + ); } else { $vdcode = urldecode($v); @@ -200,18 +212,28 @@ public function post_missing_activity_record(){ $warning_message = ''; $app_map_view_setting = get_map_view_settings($app_id); - if(isset($app_map_view_setting->map_distance_mapping) && $app_map_view_setting->map_distance_mapping)//if Distance maping on then call this block + + //if Distance maping on then call this block + if(isset($app_map_view_setting->map_distance_mapping) && + $app_map_view_setting->map_distance_mapping) { $saved_distance=500; - if($app_map_view_setting->distance !== ''){//if distance not given then default distance will assign as 500 + //if distance not given then default distance will assign as 500 + if($app_map_view_setting->distance !== ''){ $saved_distance=$app_map_view_setting->distance; } - $matching_value = $record[$app_map_view_setting->matching_field]; //this field name getting from setting and getting value from received json - $kml_poligon_rec = $this->db->get_where('kml_poligon', array('app_id' => $app_id, 'type' => 'distence','matching_value' => $matching_value))->row_array(); + //this field name getting from setting and getting value from received json + $matching_value = $record[$app_map_view_setting->matching_field]; + $kml_poligon_rec = $this->db->get_where('kml_poligon', + array('app_id' => $app_id, 'type' => 'distence', + 'matching_value' => $matching_value))->row_array(); if(!empty($kml_poligon_rec)){ $lat_long = explode(',', $location);//Received location from mobile device - $distance_from_center = lan_lng_distance($kml_poligon_rec['latitude'], $kml_poligon_rec['longitude'],$lat_long[0], $lat_long[1]); + $distance_from_center = lan_lng_distance($kml_poligon_rec['latitude'], + $kml_poligon_rec['longitude'],$lat_long[0], + $lat_long[1] + ); if($distance_from_center > $saved_distance) { $warning_message = 'Your location mismatched. '; @@ -292,7 +314,9 @@ public function post_missing_activity_record(){ $fields_count = $this->db->list_fields('zform_' . $form_id); $fields_count = array_map('strtolower', $fields_count); if(count($fields_count) < 90){ - $field = array($element => array('type' => 'VARCHAR', 'constraint' => 200, 'NULL' => TRUE)); + $field = array($element => array('type' => 'VARCHAR', + 'constraint' => 200, 'NULL' => TRUE) + ); $this->dbforge->add_column('zform_' . $form_id, $field, $after_field); }else { @@ -332,7 +356,9 @@ public function post_missing_activity_record(){ $this->form_results_model->remove_mobile_activity($r_value['id']); continue; } - $this->form_results_model->update_mobile_activity($r_value['id'],array('error'=>$err_msg)); + $this->form_results_model->update_mobile_activity($r_value['id'], + array('error'=>$err_msg) + ); continue; } else{ diff --git a/application/controllers/tracking.php b/application/controllers/tracking.php index 3da9899..478db27 100644 --- a/application/controllers/tracking.php +++ b/application/controllers/tracking.php @@ -188,33 +188,33 @@ public function savetrackingbulk() { exit; } //exit; - $newDistanceGeo=0; - $lastDistanceGeo=0; - $newDistance=0; - $lastDistance=0; + $new_distance_geo=0; + $last_distance_geo=0; + $new_distance=0; + $last_distance=0; foreach($result as $r) { //print_r($r); $distance=(float)$r['distance']; - $d=$distance-$lastDistance; + $d=$distance-$last_distance; if($d>0) { - $newDistance+=$distance-$lastDistance; + $new_distance+=$distance-$last_distance; } - $lastDistance=$distance; + $last_distance=$distance; //print_r($r); $distanceGeo=(float)$r['distanceGeo']; - $dGeo=$distanceGeo-$lastDistanceGeo; + $dGeo=$distanceGeo-$last_distance_geo; if($dGeo>0) { - $newDistanceGeo+=$distanceGeo-$lastDistanceGeo; + $new_distance_geo+=$distanceGeo-$last_distance_geo; } - $lastDistanceGeo=$distanceGeo; + $last_distance_geo=$distanceGeo; } $gps_time = $params ['gpsTime']; $records = $tracking_records; - $distanceCovered = $newDistance; - $distanceCoveredGeo = $newDistanceGeo; + $distanceCovered = $new_distance; + $distanceCoveredGeo = $new_distance_geo; $gps_time = date('Y-m-d H:i:s', strtotime($gps_time)); @@ -223,7 +223,7 @@ public function savetrackingbulk() { 'route_id' => $route_id, 'imei_no' => $imei_no, 'gps_datetime' => $gps_time, - 'distanceCovered' => round($newDistance,2), + 'distanceCovered' => round($new_distance,2), 'distanceCoveredGeo' => round($distanceCoveredGeo,2), 'records' => $records, 'created_datetime' => $created_datetime @@ -319,35 +319,35 @@ public function testtrackingbulk1() { $result=$tracking_result[0]['records']; $result=json_decode($result,true); //exit; - $newDistanceGeo=0; - $lastDistanceGeo=0; - $newDistance=0; - $lastDistance=0; + $new_distance_geo=0; + $last_distance_geo=0; + $new_distance=0; + $last_distance=0; foreach($result as $r) { //print_r($r); $distance=(float)$r['distance']; - $d=$distance-$lastDistance; + $d=$distance-$last_distance; if($d>0) { - $newDistance+=$distance-$lastDistance; + $new_distance+=$distance-$last_distance; } - echo $r['gpsTime']." =>> ".$newDistance." = ".$distance." - ".$lastDistance."
"; - echo $r['id']." -> ".$r['gpsTime']." : D:".$distance." LD:".$lastDistance." ND:".$newDistance."
"; - $lastDistance=$distance; + echo $r['gpsTime']." =>> ".$new_distance." = ".$distance." - ".$last_distance."
"; + echo $r['id']." -> ".$r['gpsTime']." : D:".$distance." LD:".$last_distance." ND:".$new_distance."
"; + $last_distance=$distance; //print_r($r); $distanceGeo=(float)$r['distanceGeo']; - $dGeo=$distanceGeo-$lastDistanceGeo; + $dGeo=$distanceGeo-$last_distance_geo; if($dGeo>0) { - $newDistanceGeo+=$distanceGeo-$lastDistanceGeo; + $new_distance_geo+=$distanceGeo-$last_distance_geo; } - $lastDistanceGeo=$distanceGeo; + $last_distance_geo=$distanceGeo; } // $gps_time = $params ['gpsTime']; // $records = $tracking_records; - $distanceCovered = $newDistance; - $distanceCoveredGeo = $newDistanceGeo; + $distanceCovered = $new_distance; + $distanceCoveredGeo = $new_distance_geo; // $gps_time = date('Y-m-d H:i:s', strtotime($gps_time)); @@ -356,7 +356,7 @@ public function testtrackingbulk1() { // 'route_id' => $route_id, // 'imei_no' => $imei_no, // 'gps_datetime' => $gps_time, - // 'distanceCovered' => round($newDistance,2), + // 'distanceCovered' => round($new_distance,2), // 'distanceCoveredGeo' => round($distanceCoveredGeo,2), // 'created_datetime' => $created_datetime // ); From ee187b2be65c9f91f08527c781f99bc9673be9d0 Mon Sep 17 00:00:00 2001 From: Umar Date: Wed, 20 Jan 2021 21:22:14 +0500 Subject: [PATCH 2/4] Revert "BSCS170048 - Muhammad Umar" This reverts commit d483e2ae19fb35f222124783b98c04d0ca58fdeb. --- application/controllers/cron.php | 54 +++++++-------------------- application/controllers/tracking.php | 56 ++++++++++++++-------------- 2 files changed, 42 insertions(+), 68 deletions(-) diff --git a/application/controllers/cron.php b/application/controllers/cron.php index b74fb9c..e4bf5cf 100644 --- a/application/controllers/cron.php +++ b/application/controllers/cron.php @@ -84,9 +84,7 @@ public function post_missing_activity_record(){ //$last_row_id++; } - $query = "SELECT * FROM mobile_activity_log WHERE id >= $last_row_id"; - $query .= " and CAST(created_datetime AS DATE)" - $query .= "< '$datetime' and error IS NULL limit $limit"; + $query = "SELECT * FROM mobile_activity_log WHERE id >= $last_row_id and CAST(created_datetime AS DATE) < '$datetime' and error IS NULL limit $limit"; //exit; @@ -98,16 +96,13 @@ public function post_missing_activity_record(){ if($range_row){ $last_rec_index = $results[count($results) - 1]; $this->db->where('id', $range_row->id); - $this->db->update('cron', array('log_id'=>$last_rec_index['id'] , - 'run_datetime' => $run_datetime) - ); + $this->db->update('cron', array('log_id'=>$last_rec_index['id'] , 'run_datetime' => $run_datetime)); } }else{ - $mysql_string = "SELECT min(id) as minid FROM"; - $mysql_string .= " mobile_activity_log where error IS NULL"; - $min_log = mysql_query(mysql_string); + + $min_log = mysql_query( "SELECT min(id) as minid FROM mobile_activity_log where error IS NULL"); $min_log_row = mysql_fetch_object($min_log); $last_row_id = 0; if($min_log_row){ @@ -115,9 +110,7 @@ public function post_missing_activity_record(){ //$run_datetime = date('Y-m-d H:i:s'); if($range_row){ $this->db->where('id', $range_row->id); - $this->db->update('cron', array('log_id'=>$last_row_id , - 'run_datetime' => $run_datetime) - ); + $this->db->update('cron', array('log_id'=>$last_row_id , 'run_datetime' => $run_datetime)); } } exit; @@ -182,10 +175,7 @@ public function post_missing_activity_record(){ $captions_images[$key] = $v; } else if ($key == 'caption_sequence') { $caption_sequence = urldecode($v); - } elseif ($key == 'form_id' || $key == 'row_key' || - $key == 'security_key' || $key == "dateTime" || - $key == "landing_page" || $key == "is_take_picture" || - $key == 'form_icon_name') { + } elseif ($key == 'form_id' || $key == 'row_key' || $key == 'security_key' || $key == "dateTime" || $key == "landing_page" || $key == "is_take_picture" || $key == 'form_icon_name') { } else { @@ -193,9 +183,7 @@ public function post_missing_activity_record(){ $vdcode = urldecode(base64_decode($v)); } else if(strpos($v, $form_info['security_key']) !== FALSE){ - $vdcode = urldecode(base64_decode(str_replace($form_info['security_key'], - '', $v)) - ); + $vdcode = urldecode(base64_decode(str_replace($form_info['security_key'], '', $v))); } else { $vdcode = urldecode($v); @@ -212,28 +200,18 @@ public function post_missing_activity_record(){ $warning_message = ''; $app_map_view_setting = get_map_view_settings($app_id); - - //if Distance maping on then call this block - if(isset($app_map_view_setting->map_distance_mapping) && - $app_map_view_setting->map_distance_mapping) + if(isset($app_map_view_setting->map_distance_mapping) && $app_map_view_setting->map_distance_mapping)//if Distance maping on then call this block { $saved_distance=500; - //if distance not given then default distance will assign as 500 - if($app_map_view_setting->distance !== ''){ + if($app_map_view_setting->distance !== ''){//if distance not given then default distance will assign as 500 $saved_distance=$app_map_view_setting->distance; } - //this field name getting from setting and getting value from received json - $matching_value = $record[$app_map_view_setting->matching_field]; - $kml_poligon_rec = $this->db->get_where('kml_poligon', - array('app_id' => $app_id, 'type' => 'distence', - 'matching_value' => $matching_value))->row_array(); + $matching_value = $record[$app_map_view_setting->matching_field]; //this field name getting from setting and getting value from received json + $kml_poligon_rec = $this->db->get_where('kml_poligon', array('app_id' => $app_id, 'type' => 'distence','matching_value' => $matching_value))->row_array(); if(!empty($kml_poligon_rec)){ $lat_long = explode(',', $location);//Received location from mobile device - $distance_from_center = lan_lng_distance($kml_poligon_rec['latitude'], - $kml_poligon_rec['longitude'],$lat_long[0], - $lat_long[1] - ); + $distance_from_center = lan_lng_distance($kml_poligon_rec['latitude'], $kml_poligon_rec['longitude'],$lat_long[0], $lat_long[1]); if($distance_from_center > $saved_distance) { $warning_message = 'Your location mismatched. '; @@ -314,9 +292,7 @@ public function post_missing_activity_record(){ $fields_count = $this->db->list_fields('zform_' . $form_id); $fields_count = array_map('strtolower', $fields_count); if(count($fields_count) < 90){ - $field = array($element => array('type' => 'VARCHAR', - 'constraint' => 200, 'NULL' => TRUE) - ); + $field = array($element => array('type' => 'VARCHAR', 'constraint' => 200, 'NULL' => TRUE)); $this->dbforge->add_column('zform_' . $form_id, $field, $after_field); }else { @@ -356,9 +332,7 @@ public function post_missing_activity_record(){ $this->form_results_model->remove_mobile_activity($r_value['id']); continue; } - $this->form_results_model->update_mobile_activity($r_value['id'], - array('error'=>$err_msg) - ); + $this->form_results_model->update_mobile_activity($r_value['id'],array('error'=>$err_msg)); continue; } else{ diff --git a/application/controllers/tracking.php b/application/controllers/tracking.php index 478db27..3da9899 100644 --- a/application/controllers/tracking.php +++ b/application/controllers/tracking.php @@ -188,33 +188,33 @@ public function savetrackingbulk() { exit; } //exit; - $new_distance_geo=0; - $last_distance_geo=0; - $new_distance=0; - $last_distance=0; + $newDistanceGeo=0; + $lastDistanceGeo=0; + $newDistance=0; + $lastDistance=0; foreach($result as $r) { //print_r($r); $distance=(float)$r['distance']; - $d=$distance-$last_distance; + $d=$distance-$lastDistance; if($d>0) { - $new_distance+=$distance-$last_distance; + $newDistance+=$distance-$lastDistance; } - $last_distance=$distance; + $lastDistance=$distance; //print_r($r); $distanceGeo=(float)$r['distanceGeo']; - $dGeo=$distanceGeo-$last_distance_geo; + $dGeo=$distanceGeo-$lastDistanceGeo; if($dGeo>0) { - $new_distance_geo+=$distanceGeo-$last_distance_geo; + $newDistanceGeo+=$distanceGeo-$lastDistanceGeo; } - $last_distance_geo=$distanceGeo; + $lastDistanceGeo=$distanceGeo; } $gps_time = $params ['gpsTime']; $records = $tracking_records; - $distanceCovered = $new_distance; - $distanceCoveredGeo = $new_distance_geo; + $distanceCovered = $newDistance; + $distanceCoveredGeo = $newDistanceGeo; $gps_time = date('Y-m-d H:i:s', strtotime($gps_time)); @@ -223,7 +223,7 @@ public function savetrackingbulk() { 'route_id' => $route_id, 'imei_no' => $imei_no, 'gps_datetime' => $gps_time, - 'distanceCovered' => round($new_distance,2), + 'distanceCovered' => round($newDistance,2), 'distanceCoveredGeo' => round($distanceCoveredGeo,2), 'records' => $records, 'created_datetime' => $created_datetime @@ -319,35 +319,35 @@ public function testtrackingbulk1() { $result=$tracking_result[0]['records']; $result=json_decode($result,true); //exit; - $new_distance_geo=0; - $last_distance_geo=0; - $new_distance=0; - $last_distance=0; + $newDistanceGeo=0; + $lastDistanceGeo=0; + $newDistance=0; + $lastDistance=0; foreach($result as $r) { //print_r($r); $distance=(float)$r['distance']; - $d=$distance-$last_distance; + $d=$distance-$lastDistance; if($d>0) { - $new_distance+=$distance-$last_distance; + $newDistance+=$distance-$lastDistance; } - echo $r['gpsTime']." =>> ".$new_distance." = ".$distance." - ".$last_distance."
"; - echo $r['id']." -> ".$r['gpsTime']." : D:".$distance." LD:".$last_distance." ND:".$new_distance."
"; - $last_distance=$distance; + echo $r['gpsTime']." =>> ".$newDistance." = ".$distance." - ".$lastDistance."
"; + echo $r['id']." -> ".$r['gpsTime']." : D:".$distance." LD:".$lastDistance." ND:".$newDistance."
"; + $lastDistance=$distance; //print_r($r); $distanceGeo=(float)$r['distanceGeo']; - $dGeo=$distanceGeo-$last_distance_geo; + $dGeo=$distanceGeo-$lastDistanceGeo; if($dGeo>0) { - $new_distance_geo+=$distanceGeo-$last_distance_geo; + $newDistanceGeo+=$distanceGeo-$lastDistanceGeo; } - $last_distance_geo=$distanceGeo; + $lastDistanceGeo=$distanceGeo; } // $gps_time = $params ['gpsTime']; // $records = $tracking_records; - $distanceCovered = $new_distance; - $distanceCoveredGeo = $new_distance_geo; + $distanceCovered = $newDistance; + $distanceCoveredGeo = $newDistanceGeo; // $gps_time = date('Y-m-d H:i:s', strtotime($gps_time)); @@ -356,7 +356,7 @@ public function testtrackingbulk1() { // 'route_id' => $route_id, // 'imei_no' => $imei_no, // 'gps_datetime' => $gps_time, - // 'distanceCovered' => round($new_distance,2), + // 'distanceCovered' => round($newDistance,2), // 'distanceCoveredGeo' => round($distanceCoveredGeo,2), // 'created_datetime' => $created_datetime // ); From 169c30e833e95fbd5c6eb79017971cf7c3713c49 Mon Sep 17 00:00:00 2001 From: Umar Date: Wed, 20 Jan 2021 21:25:33 +0500 Subject: [PATCH 3/4] BSCS17048 - Muhammad Umar lower_snake_case issue fixed in controllers/tracking.php more than 80 characters per line fixed --- application/controllers/cron.php | 1 - 1 file changed, 1 deletion(-) diff --git a/application/controllers/cron.php b/application/controllers/cron.php index e4bf5cf..f6d1382 100644 --- a/application/controllers/cron.php +++ b/application/controllers/cron.php @@ -89,7 +89,6 @@ public function post_missing_activity_record(){ //$query = "SELECT * FROM mobile_activity_log WHERE CAST(created_datetime AS DATE) < '$datetime' and app_id='269' limit 20000"; - $query_result = $this->db->query($query); $results = $query_result->result_array(); if(count($results)>0){ From 110f9058e90a8669cd105e0a299d54a904c3ae4a Mon Sep 17 00:00:00 2001 From: Umar Date: Fri, 22 Jan 2021 21:57:31 +0500 Subject: [PATCH 4/4] BSCS17048 - Muhammad Umar - All tasks completed --- application/controllers/api.php | 33 ++++++++++++++++++++++----------- 1 file changed, 22 insertions(+), 11 deletions(-) diff --git a/application/controllers/api.php b/application/controllers/api.php index ce6f2be..553b507 100644 --- a/application/controllers/api.php +++ b/application/controllers/api.php @@ -19,7 +19,8 @@ public function __construct() { } /** - * This function is used for updating the android application when user click on refresh button that available on android application title bar. + * This function is used for updating the android application when + user click on refresh button that available on android application title bar. * * @return json * @author Zahid Nadeem @@ -32,7 +33,8 @@ public function updateforms() { } @$imei_no = $_REQUEST ['imei_no']; $jsone_array = array(); - $already_installed = $this->app_installed_model->get_app_installed($app_id, $imei_no); + $already_installed = $this->app_installed_model->get_app_installed($app_id, + $imei_no); if ($already_installed) { //$change_status = $already_installed ['change_status']; $jsone_array = $this->get_forms($app_id, $imei_no); @@ -50,7 +52,8 @@ public function updateforms() { } /** - * This function is used for saving the installed application device imei#, for further updation of application. + * This function is used for saving the installed application + device imei#, for further updation of application. * * @author Zahid Nadeem */ @@ -65,8 +68,10 @@ function install_app($data = array()) { * @author Zahid Nadeem */ function get_forms($app_id, $imei_no) { - // get imei_no against view_id if multiple views available of a single application - $views_list = $this->app_users_model->get_view_id_by_imei_no($app_id, $imei_no); + // get imei_no against view_id if multiple + //views available of a single application + $views_list = $this->app_users_model->get_view_id_by_imei_no($app_id, + $imei_no); $view_id = ''; if ($views_list && $views_list ['view_id'] != '0') { $view_id = $views_list ['view_id']; @@ -78,11 +83,13 @@ function get_forms($app_id, $imei_no) { $form_array = array(); $total_forms = count($forms); - // if multiple form available then make landing page which consist form icon with links. Otherwise launch form directly + // if multiple form available then make landing page + //which consist form icon with links. Otherwise launch form directly if ($total_forms > 1) { $selected_app = $this->app_model->get_app($app_id, $view_id); $image_array [] = array( - 'image_url' => FORM_IMG_DISPLAY_PATH . '../form_icons/' . $app_id . '/' . $selected_app ['icon'], + 'image_url' => FORM_IMG_DISPLAY_PATH . '../form_icons/' + . $app_id . '/' . $selected_app ['icon'], 'image_name' => $selected_app ['icon'] ); @@ -107,7 +114,8 @@ function get_forms($app_id, $imei_no) { $formId = $form ['form_id']; $formName = $form ['form_name']; $image_array [] = array( - 'image_url' => FORM_IMG_DISPLAY_PATH . '../form_icons/' . $app_id . '/' . $form ['form_icon'], + 'image_url' => FORM_IMG_DISPLAY_PATH . '../form_icons/' + . $app_id . '/' . $form ['form_icon'], 'image_name' => $form ['form_icon'] ); $formFullDescription = $form ['full_description']; @@ -119,8 +127,10 @@ function get_forms($app_id, $imei_no) { $file_name_html = 'form_'.$form['form_id'].'.html'; } $html_file = ''; - if (file_exists('./assets/images/data/form_icons/' . $app_id . '/' . $file_name_html)) { - $html_file = FORM_IMG_DISPLAY_PATH . '../form_icons/' . $app_id . '/' . $file_name_html; + if (file_exists('./assets/images/data/form_icons/' + . $app_id . '/' . $file_name_html)) { + $html_file = FORM_IMG_DISPLAY_PATH . '../form_icons/' ; + $html_file .= $app_id . '/' . $file_name_html; } $released = $this->app_released_model->get_latest_released($app_id); @@ -2382,7 +2392,8 @@ public function importDataFormBased() { //for hospital watch app public function hospitalwatchapi() { - //if (isset($_REQUEST['app_id']) && isset($_REQUEST['last_date_stamp']) && isset($_REQUEST['security_token'])) { + //if (isset($_REQUEST['app_id']) && isset($_REQUEST['last_date_stamp']) + //&& isset($_REQUEST['security_token'])) { if (isset($_REQUEST['app_id'])) { $app_id = $_REQUEST['app_id']; $last_date_stamp = isset($_REQUEST['last_date_stamp']) ? $_REQUEST['last_date_stamp'] : '';