//fonctions
// "Magic Quotes"
ini_set ("set_magic_quotes_runtime", 0);
// Ajout d'anti-slashes selon "Magic Quotes"
function AuAddSlashes($chaine) {
return (get_magic_quotes_gpc() == 1 ? $chaine : AddSlashes($chaine));
}
// Retire les anti-slashes selon "Magic Quotes"
function AuStripSlashes($chaine) {
return (get_magic_quotes_gpc() == 1 ? StripSlashes($chaine) : $chaine);
}
// Convertisseur texte en HTML compatible
function conv($chaine, $nobr = 0) {
$chaine = htmlentities($chaine);
if ($nobr != 1) {
$chaine = nl2br($chaine);
}
$chaine = str_replace("<", "<", $chaine);
$chaine = str_replace(">", ">", $chaine);
$chaine = str_replace(""", "\"", $chaine);
$chaine = str_replace("[<]", "<", $chaine);
$chaine = str_replace("[>]", ">", $chaine);
return $chaine;
}
// Creation de l'index
function creerIndex($requete, $maximum) {
global $deb, $total, $max, $commence;
if ($deb <= 0 || !is_numeric($deb) || !isset ($deb)) {
$deb = 0;
}
$max = $maximum;
$q = mysql_query($requete);
$r = mysql_fetch_array($q);
$total = $r["num"];
$commence = $deb * $max;
}
// Navigateur de pages
function navBarre($plus) {
global $total, $deb, $max, $PHP_SELF;
if ($total > $max) {
echo "
";
for ($i = 0; $i < ceil($total / $max); $i ++) {
if ($i == $deb) {
echo "
". ($i +1)." ";
} else {
echo "
". ($i +1)." ";
}
}
if ($deb > 0) {
echo "
précédentes ";
}
if ($total > ($deb +1) * $max) {
echo "
suivantes ";
}
echo "
\n\n";
}
}
// Table Haut
function hTable($checkbox) {
echo "";
}
// Ajouter une ligne pour la partie admin
function ligne($id, $ip, $titre, $modifier, $supprimer, $activer, $attente, $imgnum, $command1, $command2, $command3, $command4, $command5, $ipban, $supip, $checkbox = "") {
global $PHP_SELF;
$fichier = basename($PHP_SELF);
if ($imgnum % 2) {
echo "";
} else {
echo "
";
}
echo " | ";
echo "".conv($titre)." | ";
if ($modifier == 1) {
echo " | ";
}
if ($supprimer == 1) {
echo " | ";
}
if ($activer == 1) {
echo " | ";
}
if ($attente == 1) {
echo " | ";
}
if ($ipban == 1) {
echo " | ";
}
if ($supip == 1) {
echo " | ";
}
if ($checkbox == 1) {
echo " | ";
}
echo "
\n";
}
function googleBarre($requete_bar, $nb_results_p_page, $nb_avant, $nb_apres, $premiere, $derniere) {
global $start;
//global $nb_results;
//$nb_results = $nb_results_p_page;
$courant = empty ($_GET['page']) ? 1 : $_GET['page'];
$start = ($courant -1) * $nb_results_p_page;
$courant = empty ($_GET['page']) ? 1 : $_GET['page'];
$start = ($courant -1) * $nb_results_p_page;
$result = mysql_query($requete_bar);
if (!$result) {
echo 'erreur SQL';
exit;
}
$ret = mysql_fetch_array($result);
$nb_results = $ret[0];
$nb_pages = ceil($nb_results / $nb_results_p_page);
$avant = $courant > ($nb_avant +1) ? $nb_avant : $courant -1;
$apres = $courant <= $nb_pages - $nb_apres ? $nb_apres : $nb_pages - $courant;
// première page
if ($premiere && $courant - $avant > 1)
echo ' ';
// page précédente
if ($courant > 1)
echo ' ';
// affichage des numéros de page
for ($i = $courant - $avant; $i <= $courant + $apres; $i ++) {
// page courante
if ($i == $courant)
echo ''.$i.' ';
else
echo ''.$i.' ';
}
// page suivante
if ($courant < $nb_pages)
echo ' ';
if ($derniere && $courant + $apres < $nb_pages)
echo ' ';
}
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
$theValue = (!get_magic_quotes_gpc()) ? addslashes($theValue) : $theValue;
switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
}
return $theValue;
}
function microtime_float()
{
list($usec, $sec) = explode(' ', microtime());
return ((float)$usec + (float)$sec);
}
?>
Présentation des membres Heart and Coeur
|
Il y a actuellement 165 profils.
|
Fatal error: Call to undefined function googleBarre() in /public_html/membres/index.php on line 126
|