load_lang(); $users = new history(); $sec = new security(); $func = new functions(); $request= new request(); $type = new types(); $coll_id = $_SESSION['collection_id_choice']; $view = $sec->retrieve_view_from_coll_id($_SESSION['collection_id_choice']); $s_id = $_REQUEST['id']; $_SESSION['doc_id'] = $s_id; //to change $right = true; if (isset($_SESSION['origin']) && $_SESSION['origin'] <> "basket") { $right = $sec->test_right_doc($coll_id, $s_id); } else { $right = true; } if (!$right) { ?> add($table, $s_id ,"VIEW", _VIEW_DETAILS_NUM.$s_id, $_SESSION['config']['databasetype'],'apps'); } */ $db = new dbquery(); $db->connect(); $comp_fields = ''; $db->query("select type_id from " . $view . " where res_id = " . $s_id); if ($db->nb_result() > 0) { $res = $db->fetch_object(); $type_id = $res->type_id; $indexes = $type->get_indexes($type_id, $coll_id, 'minimal'); for ($i=0; $iis_module_loaded('cases') == true) { $case_sql_complementary = " , case_id"; } $db->query("select * from " . $view . " where res_id = ". $s_id); //$db->show(); if ($_SESSION['collection_id_choice'] == 'res_coll') { } $res = $db->fetch_object(); $typist = $res->typist; $format = $res->format; $filesize = $res->filesize; $creation_date = $db->format_date_db($res->creation_date, false); $chrono_number = $res->alt_identifier; $fingerprint = $res->fingerprint; $work_batch = $res->work_batch; $page_count = $res->page_count; $is_paper = $res->is_paper; $scan_date = $db->format_date_db($res->scan_date); $scan_user = $res->scan_user; $scan_location = $res->scan_location; $scan_wkstation = $res->scan_wkstation; $scan_batch = $res->scan_batch; $doc_language = $res->doc_language; $closing_date = $db->format_date_db($res->closing_date, false); $indexes = $type->get_indexes($type_id, $coll_id); $indexesData = ''; foreach (array_keys($indexes) as $key) { if(preg_match('/^custom/', $key)) { $tmp = 'doc_' . $key; } else { $tmp = $key; } if ($indexes[$key]['type'] == "date") { $res->$tmp = $db->format_date_db($res->$tmp, false); } $indexes[$key]['value'] = $res->$tmp; $indexes[$key]['show_value'] = $res->$tmp; if ($indexes[$key]['type'] == "string") { $indexes[$key]['show_value'] = $db->show_string($res->$tmp); } elseif($indexes[$key]['type'] == "date") { $indexes[$key]['show_value'] = $db->format_date_db($res->$tmp, true); } $indexesData .= '

'; } $data = get_general_data($coll_id, $s_id, 'full', $param_data); $generalData = ''; foreach (array_keys($data) as $key) { $view = true; if ( ($key == 'category_id' || $key == 'priority') && $_SESSION['collection_id_choice'] == 'res_coll' ) { $view = false; } if ($view) { $generalData .= '

'; } } require_once('apps/maarch_entreprise/smartphone/view_resource_controler.php'); ?>

is_module_loaded('notes')) { require_once('modules/notes/notes_tables.php'); $selectNotes = "select * from ". NOTES_TABLE ." where identifier = " . $s_id . " and coll_id ='" . $_SESSION['collection_id_choice'] . "' order by date_note desc"; $dbNotes = new dbquery(); $dbNotes->connect(); $dbNotes->query($selectNotes); $nbNotes = $dbNotes->nb_result(); ?>  

 

0) { ?>