*/ $core_tools = new core_tools(); $core_tools->test_user(); $core_tools->load_lang(); require_once('core/manage_bitmask.php'); require_once "apps" . DIRECTORY_SEPARATOR . $_SESSION['config']['app_id'] . DIRECTORY_SEPARATOR . "security_bitmask.php"; require_once ("core" . DIRECTORY_SEPARATOR . "class" . DIRECTORY_SEPARATOR . "class_request.php"); require_once ("core" . DIRECTORY_SEPARATOR . "class" . DIRECTORY_SEPARATOR . "class_security.php"); require_once ("apps" . DIRECTORY_SEPARATOR . $_SESSION['config']['app_id'] . DIRECTORY_SEPARATOR . "class" . DIRECTORY_SEPARATOR . "class_list_show.php"); require_once ("core" . DIRECTORY_SEPARATOR . "class" . DIRECTORY_SEPARATOR . "class_history.php"); require_once ("apps" . DIRECTORY_SEPARATOR . $_SESSION['config']['app_id'] . DIRECTORY_SEPARATOR . "class" . DIRECTORY_SEPARATOR . "class_indexing_searching_app.php"); require_once ("apps" . DIRECTORY_SEPARATOR . $_SESSION['config']['app_id'] . DIRECTORY_SEPARATOR . "class" . DIRECTORY_SEPARATOR . "class_types.php"); if(file_exists('custom'.DIRECTORY_SEPARATOR.$_SESSION['custom_override_id'].DIRECTORY_SEPARATOR.'apps' . DIRECTORY_SEPARATOR . $_SESSION['config']['app_id'] . DIRECTORY_SEPARATOR . "definition_mail_categories.php")) { include ('custom'.DIRECTORY_SEPARATOR.$_SESSION['custom_override_id'].DIRECTORY_SEPARATOR.'apps' . DIRECTORY_SEPARATOR . $_SESSION['config']['app_id'] . DIRECTORY_SEPARATOR . "definition_mail_categories.php"); } else { include ('apps' . DIRECTORY_SEPARATOR . $_SESSION['config']['app_id'] . DIRECTORY_SEPARATOR . "definition_mail_categories_invoices.php"); } if (!isset ($_REQUEST['coll_id'])) { $_REQUEST['coll_id'] = ""; } $_SESSION['doc_convert'] = array (); //test service view technical infos $viewTechnicalInfos = false; if ($core_tools->test_service('view_technical_infos', 'apps', false)) { $viewTechnicalInfos = true; } /****************Management of the location bar ************/ $init = false; if (isset ($_REQUEST['reinit']) && $_REQUEST['reinit'] == "true") { $init = true; } if (isset ($_SESSION['indexation']) && $_SESSION['indexation'] == true) { $init = true; } $level = ""; if (isset ($_REQUEST['level']) && ($_REQUEST['level'] == 2 || $_REQUEST['level'] == 3 || $_REQUEST['level'] == 4 || $_REQUEST['level'] == 1)) { $level = $_REQUEST['level']; } $page_path = $_SESSION['config']['businessappurl'] . 'index.php?page=detail_invoicess&dir=indexing_searching&coll_id=' . $_REQUEST['coll_id'] . '&id=' . $_REQUEST['id']; $page_label = _DETAILS; $page_id = "details_invoices"; $core_tools->manage_location_bar($page_path, $page_label, $page_id, $init, $level); /***********************************************************/ $users = new history(); $security = new security(); $func = new functions(); $request = new request; $type = new types(); $s_id = ""; $_SESSION['req'] = 'details_invoices'; $_SESSION['indexing'] = array (); $is = new indexing_searching_app(); $coll_id = ''; $table = ''; if (!isset ($_REQUEST['coll_id']) || empty ($_REQUEST['coll_id'])) { //$_SESSION['error'] = _COLL_ID.' '._IS_MISSING; $coll_id = "res_coll"; $table = "res_view"; $is_view = true; } else { $coll_id = $_REQUEST['coll_id']; $table = $security->retrieve_view_from_coll_id($coll_id); $is_view = true; if (empty ($table)) { $table = $security->retrieve_table_from_coll($coll_id); $is_view = false; } } $_SESSION['collection_id_choice'] = $coll_id; if (isset ($_GET['id']) && !empty ($_GET['id'])) { $s_id = addslashes($func->wash($_GET['id'], "num", _THE_DOC)); } $_SESSION['doc_id'] = $s_id; if (isset ($_SESSION['origin']) && $_SESSION['origin'] <> "basket") { $right = $security->test_right_doc($coll_id, $s_id); //$_SESSION['error'] = 'coll '.$coll_id.', res_id : '.$s_id; } else { $right = true; } if (!$right) { ?> add($table, $s_id, "VIEW", _VIEW_DETAILS_NUM . $s_id, $_SESSION['config']['databasetype'], 'apps'); } $modify_doc = check_right( $_SESSION['user']['security'][$coll_id]['DOC']['securityBitmask'], DATA_MODIFICATION ); $delete_doc = check_right( $_SESSION['user']['security'][$coll_id]['DOC']['securityBitmask'], DELETE_RECORD ); //update index with the doctype if (isset ($_POST['submit_index_doc'])) { $is->update_mail($_POST, "POST", $s_id, $coll_id); } //delete the doctype if (isset ($_POST['delete_doc'])) { $is->delete_doc($s_id, $coll_id); ?> connect(); if (empty ($_SESSION['error']) || $_SESSION['indexation']) { $comp_fields = ''; $db->query("select type_id from " . $table . " 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'); $comp_field = ''; for ($i = 0; $i < count($indexes); $i++) { if (preg_match('/^custom_/', $indexes[$i])) // In the view all custom from res table begin with doc_ { $comp_field .= ', doc_' . $indexes[$i]; } else { $comp_field .= ', ' . $indexes[$i]; } } } $db->query("select * from ".$table." where res_id = ".$s_id.""); } ?>