'.mysql_error() : 'voir DEBUGSQL')); if ($data = mysql_fetch_array($req, MYSQL_ASSOC)) { $k = strpos($data['rtitre'], '#'); $k++; echo 'Aide : ',htmlspecialchars(substr($data['rtitre'], $k)),'',"\n"; } else echo 'Aide',"\n"; ?>
Aide du CMS
= 0 && $tvniv[$k] >= $niv) { if ($tvniv[$k] == $niv) { $tveta[$k] = 1; $g = $k; $g++; $tvouv[$k] = $g < $nbtv && $tvniv[$g] > $niv ? 1 : 0; } if ($up) $k++; else $k--; } return $k; } $tvouv = array(); $tvchem = array(); if ($data) { $k = $data['rdet']; if ($data['manipul'] == 'Y') $tveta[$k] = 3; $niv = $tvniv[$k]; $g = $k; $g++; $tvouv[$k] = $g < $nbtv && $tvniv[$g] > $niv ? 2 : 0; $tvchem[] = $k; $k++; $niv++; menuouvr($k, $niv, true); $k--; $niv--; while ($k >= 0) { $tveta[$k] |= 2; $niv = $tvniv[$k]; $g = $k; $g++; $tvouv[$k] = $g < $nbtv && $tvniv[$g] > $niv ? 2 : 0; $k++; menuouvr($k, $niv, true); $k--; $k--; $k = menuouvr($k, $niv, false); if ($k >= 0) $tvchem[] = $k; } } else menuouvr(0, 0, true); echo '
    ',"\n",'
  • recherche
  • ',"\n"; for ($k = 0; $k < $nbtv; $k++) if ($tveta[$k]) echo '
  • ',$tvmtit[$k],'
  • ',"\n"; echo '
',"\n"; //----- chemin ----- $chn = ''; reset($tvchem); while (list($k, $g) = each($tvchem)) $chn = ''.$tvmtit[$g].($k ? ' > '.$chn : ''.$chn); echo '
',$chn,'
',"\n"; unset($tvniv, $tvpnom, $tvmtit, $tveta, $tvouv, $tvchem, $nbtv, $niv, $chn); //----- contenu ----- echo '
',"\n"; if ($data) echo $data['rtexte'],"\n"; else echo '

Désolé.

Pour le moment, il n\'existe aucune aide disponible pour cette partie du CMS.

',"\n"; //----- recherche ----- if ($apg == 'recherche') { $cherch = isset($cherch) ? stripslashes($cherch) : ''; echo '
',"\n"; } if ($apg == 'recherche' && $cherch) { $sql = 'SELECT rcont,rtexte,rtitre FROM cmscherch WHERE rpage=65535 AND rtype=\'A\''; $tch = explode(' ', strtr(strtolower($cherch), 'àâçèéêëîïôùûü', 'aaceeeeiiouuu')); reset($tch); while (list($k, $g) = each($tch)) if (strlen($g) < 2) unset($tch[$k]); else { $g = addslashes($g); $sql .= " AND (rtexte LIKE '%$g%' OR rtitre LIKE '%$g%')"; $tch[$k] = preg_quote($tch[$k]); } if (! count($tch)) $sql .= ' AND 0'; $req = mysql_query($sql) or die('Erreur SQL: '.(DEBUGSQL ? $sql.'
'.mysql_error() : 'voir DEBUGSQL')); $tpoi = array(); while ($data = mysql_fetch_array($req, MYSQL_ASSOC)) { $cle = $data['rcont']; $k = strpos($data['rtitre'], '#'); $tpag[$cle] = substr($data['rtitre'], 0, $k++); $ttit[$cle] = substr($data['rtitre'], $k); $data['rtitre'] = strtr(strtolower($ttit[$cle]), 'àâçèéêëîïôùûü', 'aaceeeeiiouuu'); $data['rtexte'] = strtr(strtolower(html_entity_decode(strip_tags($data['rtexte']))), 'àâçèéêëîïôùûü', 'aaceeeeiiouuu'); $tpoi[$cle] = 0; $poi = 20; reset($tch); while (list(, $chn) = each($tch)) { $g = 0; if ($k = preg_match_all('/\b'.$chn.'\b/', $data['rtitre'], $tnull)) $g += $poi + 16 + ($k << 2); if ($k = preg_match_all('/\b'.$chn.'/', $data['rtitre'], $tnull)) $g += $poi + 8 + ($k << 1); if ($k = preg_match_all('/'.$chn.'/', $data['rtitre'], $tnull)) $g += $poi + 4 + $k; if ($k = preg_match_all('/\b'.$chn.'\b/', $data['rtexte'], $tnull)) $g += $poi + 8 + ($k << 2); if ($k = preg_match_all('/\b'.$chn.'/', $data['rtexte'], $tnull)) $g += $poi + 4 + ($k << 1); if ($k = preg_match_all('/'.$chn.'/', $data['rtexte'], $tnull)) $g += $poi + 2 + $k; if (! $g) { unset($tpoi[$cle]); break; } $tpoi[$cle] += $g; if ($poi > 0) $poi -= 4; } } if (count($tpoi)) { echo '
',htmlspecialchars($cherch),' a été trouvé dans ces pages :',"\n",'',"\n"; } else echo '
',htmlspecialchars($cherch),' n\'a été trouvé dans aucune page.',"\n"; unset($tch, $tpag, $ttit, $tpoi, $cle, $poi, $tnull, $chn); } echo '
',"\n"; mysql_close($db_link); ?>
conception Vertige asbl