Source for file items.php
Documentation is available at items.php
* @author linea21 <info@linea21.com>
* @license http://opensource.org/licenses/gpl-3.0.html
* Renvoie les liens de creation de compte ou de déconnexion
* suivant le statut de l'utilisateur
$link_account = array('rub' => $GLOBALS['links'][LANGUAGE]['user-prefs']['linkvalue']);
$content = '<div id="myaccount">' . END_LINE;
$content .= '<div id="tologin">' . END_LINE;
$content .= '<a href="' . HrefMaker($link_account) . '" accesskey="u" title="'. $GLOBALS['lang']['header']['myaccount_title']. '"><img src="../gfx/' . THEME_PUBLIC. '/images/public/' . LANGUAGE. '/menu_myaccount.png" alt="'. $GLOBALS['lang']['header']['myaccount_title']. '" /><span>' . $GLOBALS['lang']['header']['myaccount'] . '</span></a>';
$link_create = array('rub' => $GLOBALS['links'][LANGUAGE]['user-registration']['linkvalue']);
$link_logout = array('rub' => $GLOBALS['links'][LANGUAGE]['logout']['linkvalue']);
$content .= '<div id="logout">' . END_LINE;
if (isset ($_COOKIE['linea21']['whois'])) $content .= '<a href="' . HrefMaker($link_logout) . '" accesskey="l" title="'. $GLOBALS['lang']['header']['deconnexion_title']. '">' . $GLOBALS['lang']['header']['deconnexion'] . '</a>';
else $content .= '<a href="' . HrefMaker($link_create) . '" accesskey="c" title="'. $GLOBALS['lang']['divers']['user_inscription_title']. '">' . $GLOBALS['lang']['divers']['user_inscription'] . '</a>';
* Formulaire d'authentification pour login ou inscription
* @return void (echo string)
$input_hidden = $GLOBALS['links'][LANGUAGE]['user-prefs']['linkvalue'];
$input_hidden = $GLOBALS['links'][LANGUAGE]['user-registration']['linkvalue'];
$form = '<form action="index.php" method="post">' . END_LINE;
$form .= '<div id="' . $div_id . '">' . END_LINE;
$form .= '<label for="login" class="labelised">' . $GLOBALS['lang']['divers']['login'] . ' : </label>' . END_LINE;
$form .= '<input type="text" maxlength="20" class="shorttextfield" name="login" id="login" />' . END_LINE;
$form .= '<label for="password" class="labelised">' . $GLOBALS['lang']['divers']['password'] . ' : </label>' . END_LINE;
$form .= '<input type="password" maxlength="20" class="shorttextfield" name="password" id="password" />' . END_LINE;
$form .= '<label for="email" class="labelised">' . $GLOBALS['lang']['divers']['email'] . ' : </label>' . END_LINE;
$form .= '<input type="text" maxlength="100" class="shorttextfield" name="email" id="email" />' . END_LINE;
$form .= '<input type="hidden" name="rub" id="rub" value="' . $input_hidden . '" />' . END_LINE;
$form .= '<input type="image" src="../gfx/' . THEME_PUBLIC. '/images/public/btn_go.gif" value="'. $GLOBALS['lang']['btn']['valid']. '" alt="'. $GLOBALS['lang']['btn']['valid']. '" title="'. $GLOBALS['lang']['btn']['valid']. '" size="15" name="valid" id="valid" style="margin-left:30em" />'. END_LINE;
* to the global array $GLOBALS['current_title']
if(count($GLOBALS['current_title']) == 0) array_push($GLOBALS['current_title'], SITE_CITY_NAME);
* @return void ( echo string )
$content .= '<a href="#contenu" class="semnone" title="'. $GLOBALS['lang']['header']['goto_contents']. '" accesskey="2">'. $GLOBALS['lang']['header']['goto_contents']. '</a>'. END_LINE;
while (list ($key, $value) = each ($GLOBALS['menuitems'])) {
(ActiveItemAlias($GLOBALS['activeitem']) == $value) ? $classe = ' class="actif"' : $classe = '' ;
$current_link = array('rub' => $GLOBALS['links'][LANGUAGE][$value]['linkvalue']);
$content .= '<li id="menu_'. $value. '">';
$content .= '<a href="' . HrefMaker($current_link) . '" title="' . $GLOBALS['links'][LANGUAGE][$value]['desc'] . '" accesskey="' . $GLOBALS['links'][LANGUAGE][$value]['accesskey'] . '" id="amenu_'. $value. '"'. $classe. '>' . $GLOBALS['links'][LANGUAGE][$value]['title'] . '</a>';
* Generated a well-formed string URL for SEO
* if MOD_REWRITE is set to 1
* Can be override if the given array contains a key
* named 'rewrite_override'
* @return string $url_maked
if (defined("MOD_REWRITE") && MOD_REWRITE == true && !in_array('rewrite_override', $array)) {
$url_maked .= $array['rub'];
$url_maked .= URI_SEPARATOR . '@@'. $array['filter'];
$url_maked .= URI_SEPARATOR . $array['id'];
$url_maked .= URI_SEPARATOR . $array['parentid'];
$url_maked .= URI_SEPARATOR . $array['parentparentid'];
$url_maked .= URI_SEPARATOR . '-' . $array['debut'] . '-' ;
if(isset ($array['rewrite_override'])) unset ($array['rewrite_override']);
while (list ($key, $value) = each ($array)) {
$url_string .= $sep . $key . '=' . $value;
$url_maked = 'index.php?' . $url_string;
* Include the required template
* if no user template is found in /public/
* includes the /public/dist/ version.
$current_template = $GLOBALS['links'][LANGUAGE][$key]['template'];
* Détermine l'item actif et le place en var global
if (array_key_exists('rub', $_REQUEST)) $GLOBALS['activeitem'] = $_REQUEST['rub'];
else $GLOBALS['activeitem'] = $GLOBALS['links'][LANGUAGE]['home']['linkvalue'];
* Return the Active item key
foreach ($GLOBALS['links'][LANGUAGE] as $key => $value) {
if ($GLOBALS['links'][LANGUAGE][$key]['linkvalue'] == $item) return $key;
if ($GLOBALS['links'][LANGUAGE][$key]['alias'] === false) return $key;
else return $GLOBALS['links'][LANGUAGE][$key]['alias'];
|