/** * * * @param * @access public * @return void */ protected function getmarkerArray() { $content = ''; $title = ''; //pour le cas d'une réécriture d'url if (isset($_SERVER['PATH_INFO']) && trim($_SERVER['PATH_INFO'])) { $info = explode('/', trim($_SERVER['PATH_INFO'])); if (trim($_SERVER['PATH_INFO']) != '/') { if (isset($info[1]) && trim($info[1]) && ($info[1] == 'declic' || $info[1] == 'pixel')) { $type = trim($info[1]); $module = isset($info[2]) && trim($info[2]) ? trim($info[2]) : ''; } else { $type = ''; $module = isset($info[1]) && trim($info[1]) ? trim($info[1]) : ''; } } else { $module = $GLOBALS['SITECONF']['CONFIG']['defaultModule']; $type = $GLOBALS['SITECONF']['CONFIG']['defaultType']; } } elseif (isset($_GET['module']) && trim($_GET['module'])) { $module = trim($_GET['module']); $type = isset($_GET['type']) && trim($_GET['type']) ? trim($_GET['type']) : ''; } else { $module = $GLOBALS['SITECONF']['CONFIG']['defaultModule']; $type = $GLOBALS['SITECONF']['CONFIG']['defaultType']; } if (!div::moduleExist($module, $type)) { $module = 'error404'; $type = ''; } if (div::redirectAuth($module, $type)) { $redirect = array('type' => $type, 'module' => $module == 'authentification' ? $GLOBALS['SITECONF']['CONFIG']['defaultModule'] : $module); $module = 'authentification'; $path = PATH_MODULE; $path .= $module . '/'; $className = 'm_' . $module; require_once $path . $className . '.php'; $class = new $className('', $module); $content = $class->main($redirect); $title = $class->titlePage; } else { $path = PATH_MODULE; if ($type) { $path .= $type . '/'; } $path .= $module . '/'; $className = 'm_' . $module; require_once $path . $className . '.php'; $class = new $className($type, $module); $content = $class->main(); $title = $class->titlePage; } $currentType = $type ? $type : (isset($class->type) ? $class->type : ''); $markerArray = array('title' => $title, 'content' => $content, 'header' => headmgr::getHeader()); if (isset($GLOBALS['CONF']['addMarker'])) { foreach ($GLOBALS['CONF']['addMarker'] as $k => $v) { $markerArray[$k] = div::callUserFunc($v, array($type, $module, $currentType), $this); } } return $markerArray; }