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'] : ''; 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){