Exemple #1
0
} else {
    //Affichage co
    $menu = false;
}
$title = "Bienvenue chez vincent !";
//Gestion carrousel
$carrouselShow = returnValueFromParam("carrousel");
$tagShow = returnValueFromParam("tagcloud");
$img1 = returnValueFromParam("img1");
$img2 = returnValueFromParam("img2");
$img3 = returnValueFromParam("img3");
$link1 = returnValueFromParam("link1");
$link2 = returnValueFromParam("link2");
$link3 = returnValueFromParam("link3");
//Get categories + listing tag cloud
$cats = AffichageNomsCat();
foreach ($cats as $cle => $cat) {
    $cats["cle"]["id"] = $cat["id"];
    $cats["cle"]["nom"] = htmlspecialchars($cat["nom"]);
}
//Inclusion vue index
include_once "vue/index.php";
?>
<!--
	//BBCODE-like
	$billets["cle"]["contenu"] = preg_replace("#\[alert=(success|info|warning|danger)\](.+)\[/alert\]#isU","<div class=\"alert alert-$1\" role=\"alert\">$2</div>",$billet["contenu"]); //bold
	$billets["cle"]["contenu"] = preg_replace("#\[b\](.+)\[/b\]#isU","<strong>$1</strong>",$billet["contenu"]); //bold
	$billets["cle"]["contenu"] = preg_replace("#\[i\](.+)\[/i\]#isU","<em>$1</em>",$billet["contenu"]); //italic
	$billets["cle"]["contenu"] = preg_replace("#\[color=(blue|red|green|\#[a-z0-9]{6})\](.+)\[/color\]#isU","<span style=\"color: $1\">$2</strong>",$billet["contenu"]); //color
	$billets["cle"]["contenu"] = preg_replace("#url!(https?://[a-z0-9._/-]+[a-z0-9A-Z&\?._=-]*)#i", "<a href='$1'>$1</a>", $billet["contenu"]); // url (with url!)
	$billets["cle"]["contenu"] = preg_replace("#\[img=(.+)\](https?://[a-z0-9._/-]+[a-z0-9A-Z&\?._=-]*)\[/img\]#isU", "<img src='$2' alt='$1'/>", $billet["contenu"]); //images
Exemple #2
0
<?php

$listeCats = AffichageNomsCat();
foreach ($listeCats as $cle => $cat) {
    $listeCats["cle"]["id"] = $cat["id"];
    $listeCats["cle"]["nom"] = htmlspecialchars($cat["nom"]);
}