*/ class moreq extends dbquery { /** * Build Maarch module tables into sessions vars with a xml configuration file */ public function build_modules_tables() { if(file_exists($_SESSION['config']['corepath'].'custom'.DIRECTORY_SEPARATOR.$_SESSION['custom_override_id'].DIRECTORY_SEPARATOR."modules".DIRECTORY_SEPARATOR."moreq".DIRECTORY_SEPARATOR."xml".DIRECTORY_SEPARATOR."config.xml")) { $path = $_SESSION['config']['corepath'].'custom'.DIRECTORY_SEPARATOR.$_SESSION['custom_override_id'].DIRECTORY_SEPARATOR."modules".DIRECTORY_SEPARATOR."moreq".DIRECTORY_SEPARATOR."xml".DIRECTORY_SEPARATOR."config.xml"; } else { $path = "modules".DIRECTORY_SEPARATOR."moreq".DIRECTORY_SEPARATOR."xml".DIRECTORY_SEPARATOR."config.xml"; } $xmlconfig = simplexml_load_file($path); foreach($xmlconfig->TABLENAME as $TABLENAME) { $_SESSION['tablename']['mr_aggregation'] = (string) $TABLENAME->mr_aggregation; } $HISTORY = $xmlconfig->HISTORY; } public function load_module_var_session() { /* $_SESSION['user']['moreq'] = array(); $_SESSION['entities_types'] = array(); $_SESSION['user']['primaryentity'] = array(); $type = "root"; $this->connect(); $this->query('select ue.entity_id, ue.user_role, ue.primary_entity, e.entity_label, e.short_label from '.$_SESSION['tablename']['ent_users_entities'].' ue, '.$_SESSION['tablename']['users'].' u, '.$_SESSION['tablename']['ent_entities']." e where ue.user_id = u.user_id and ue.entity_id = e.entity_id and e.enabled = 'Y' and ue.user_id = '".$this->protect_string_db(trim($_SESSION['user']['UserId']))."'"); while($line = $this->fetch_object()) { array_push($_SESSION['user']['entities'],array('ENTITY_ID'=>$line->entity_id, 'ENTITY_LABEL'=>$line->entity_label, 'SHORT_LABEL'=>$line->short_label, 'ROLE'=>$line->user_role)); if($line->primary_entity == 'Y') { $_SESSION['user']['primaryentity']['id'] = $line->entity_id; } } if(file_exists($_SESSION['config']['corepath'].'custom'.DIRECTORY_SEPARATOR.$_SESSION['custom_override_id'].DIRECTORY_SEPARATOR."modules".DIRECTORY_SEPARATOR."entities".DIRECTORY_SEPARATOR."xml".DIRECTORY_SEPARATOR."typentity.xml")) { $path = $_SESSION['config']['corepath'].'custom'.DIRECTORY_SEPARATOR.$_SESSION['custom_override_id'].DIRECTORY_SEPARATOR."modules".DIRECTORY_SEPARATOR."entities".DIRECTORY_SEPARATOR."xml".DIRECTORY_SEPARATOR."typentity.xml"; } else { $path = "modules".DIRECTORY_SEPARATOR."entities".DIRECTORY_SEPARATOR."xml".DIRECTORY_SEPARATOR."typentity.xml"; } $xmltype = simplexml_load_file($path); $entypes = array(); foreach($xmltype->TYPE as $TYPE) { $_SESSION['entities_types'][] = array('id' => (string) $TYPE->id, 'label' => (string) $TYPE->label, 'level'=> (string) $TYPE->typelevel); } //$_SESSION['user']['redirect_groupbasket'] = array(); //$arr1 = $this->load_redirect_groupbasket_session($_SESSION['user']['primarygroup'], $_SESSION['user']['UserId']); //$arr2 = $this->load_redirect_groupbasket_session_for_abs($_SESSION['user']['UserId']); //$_SESSION['user']['redirect_groupbasket'] = array_merge($arr1, $arr2); */ } } ?>