Пример #1
0
    $inconnu = '(navigateur inconnu)';
    if (!isset($agent)) {
        $agent = $_SERVER['HTTP_USER_AGENT'];
    }
    $agent = strtolower($agent);
    foreach ($navs as $key => $value) {
        if (strpos($agent, $key) !== false) {
            return $value;
        }
    }
    return $inconnu;
}
?>

<?php 
if (navigateur('google')) {
    ?>
	<meta http-equiv="Refresh" content="1; URL=./view/index.php ">
	<?php 
} else {
    ?>
	<meta http-equiv="refresh" content="secondes;URL=./view/index.php">
	<?php 
}
?>
</head>
<body>

</body>
</html>
Пример #2
0
function display_thumbnails($galid, $picid, $start = 0)
{
    global $config, $s_joueur;
    global $strRetour, $strConfirmEffacerFile, $strS, $strPasDImage;
    $picspath = $config['gallery_path'] . "/{$galid}/";
    $pics = create_pics_array($galid);
    $nbpics = count($pics);
    if ($nbpics != 0) {
        if (!$start) {
            $start = 0;
        }
        $counter = 0;
        $nb_max = $config['nb_gallery_thumb'];
        $nb_total = $nbpics;
        $offset_start = $start;
        $offset_stop = $offset_start + $config['nb_gallery_thumb'];
        if ($offset_stop > $nbpics) {
            $offset_stop = $nbpics;
        }
        echo '<table border="0" cellpadding="3" cellspacing="2" align="center">';
        echo "<tr><td class=text2 colspan=\"" . $config['col_gallery_thumb'] . "\" align=center>" . navigateur($start, $nb_max, $nb_total, "?page=galerie&g={$galid}&start=%d") . "<br><br></td></tr>";
        for ($i = $offset_start; $i < $offset_stop; $i++) {
            $picture_name = $pics[$i];
            $picurl = $picspath . $picture_name;
            $thumbname = "_thb_" . $pics[$i];
            $thumburl = $picspath . $thumbname;
            $picdim = getimagesize($picurl);
            $thumbdim = getimagesize($thumburl);
            $picsize = (int) (filesize($picurl) / 1024);
            $picindex = $i + 1;
            // index that is displayed
            if ($counter % $config['col_gallery_thumb'] == 0) {
                echo "<tr>";
            }
            echo '<td align="center" valign="top" class="text2">';
            if (is_new($picurl)) {
                echo '<img src="images/new.gif" border="0"><br>';
            }
            echo '<table border="0" cellspacing="0" cellpadding="0">';
            echo '<tr><td colspan="3"><img src="images/photo_top.gif" width="42" height="8"></td></tr>';
            echo '<tr>';
            echo '<td width="8" valign="top"><img src="images/photo_left.gif" height="35" width="8"></td>';
            echo '<td>';
            echo "<a href=\"?page=galerie&g={$galid}&p={$i}&amp;start={$start}\">";
            echo "<img src=\"{$thumburl}\" WIDTH=\"{$thumbdim['0']}\" HEIGHT=\"{$thumbdim['1']}\" alt=\"{$picture_name}\" border=\"0\"></a>";
            echo '</td>';
            echo '<td width="8" valign="bottom"><img src="images/photo_right.gif" height="35" width="8"></td>';
            echo '</tr>';
            echo '<tr><td colspan="3" align="right"><img src="images/photo_bottom.gif" width="42" height="8"></td></tr>';
            echo '</table>';
            echo "[ {$picdim['0']}x{$picdim['1']} - {$picsize} KB ]";
            if ($grade['a'] == 'a' || $grade['b'] == 'b' || $grade['q'] == 'q') {
                echo " <a href=\"?page=galerie&op=delete&g={$galid}&filename={$picture_name}\" onclick=\"return confirm('{$strConfirmEffacerFile}');\">[{$strS}]</a>";
            }
            echo "</td>";
            if ($counter % $config['col_gallery_thumb'] == $config['col_gallery_thumb'] - 1) {
                echo "</tr>";
            }
            $counter++;
        }
        echo "</table>";
    } elseif ($galid) {
        echo '<table cellspacing="2" cellpadding="2" border="0">';
        echo "<tr><td class=title>{$strPasDImage}</td></tr>";
        echo '</table>';
    }
}
Пример #3
0
         echo "<table width=100% border=0 cellspacing=1 cellpadding=2>";
         echo "<tr>";
         echo "<td class=text><div style=\"clear: both\"><div style=\"float: left\">#" . $nbSignatures . " - {$strPostePar} <b>" . stripslashes($signature->auteur) . "</b> " . $date . "</div>";
         if ($op == 'admin') {
             echo "<div style=\"float: right\">&nbsp;<a href=?page=livredor&op=delete&id=" . $signature->id . " onclick=\"return confirm('{$strConfirmEffacerSignature}');\">[{$strS}]</a></div>";
         }
         echo "</div></td>";
         echo "</tr>";
         echo "<tr>";
         echo "<td class=text>" . stripslashes($contenu) . "<br><br></td>";
         echo "</tr>";
         echo "</table>";
         echo "</td></tr></table>";
     }
     echo "<table cellspacing=0 cellpadding=0 border=0 align=center>";
     echo "<tr><td class=text2>" . navigateur($start, $nb_max, $nb_total, "?page=livredor{$str_op}&start=%d") . "</td></tr>";
     echo "</table><br>";
     echo "</td></tr></table>";
 } else {
     echo "<table cellspacing=0 cellpadding=0 border=0>";
     echo "<tr><td class=title>{$strPasDeSignature}</td></tr>";
     echo "</table><br>";
 }
 /*** poster un commentaire ***/
 if ($op != 'admin') {
     echo "<form method=post name=\"formulaire\" action=?page=livredor&op=add>";
     echo "<table border=0 cellpadding=0 cellspacing=0 class=bordure2><tr><td>";
     echo "<table cellspacing=1 cellpadding=0 border=0>";
     echo "<tr><td class=headerfiche>{$strAjouterSignature}</td></tr>";
     echo "<tr><td>";
     echo "<table cellspacing=0 cellpadding=3 border=0 width=100%>";
Пример #4
0
         }
         echo "</div></td>";
         echo "</tr>";
         echo "<tr>";
         echo "<td class=text>" . stripslashes($contenu) . "<br><br></td>";
         echo "</tr>";
         echo "</table>";
         echo "</td></tr></table>";
     }
     if ($op) {
         $p = "op={$op}&";
     } else {
         $p = "";
     }
     echo "<table cellspacing=0 cellpadding=0 border=0 align=center>";
     echo "<tr><td class=text2>" . navigateur($start, $nb_max, $nb_total, "?page=news&" . $p . "id=" . $news->id . "&start=%d") . "</td></tr>";
     echo "</table><br>";
     echo "</td></tr></table>";
 }
 /*** poster un commentaire ***/
 echo "<form method=post name=\"formulaire\" action=?page=news&op=add_commentaire>";
 echo "<table border=0 cellpadding=0 cellspacing=0 class=bordure2><tr><td>";
 echo "<table cellspacing=1 cellpadding=0 border=0>";
 echo "<tr><td class=headerfiche>{$strAjouterCommentaire}</td></tr>";
 echo "<tr><td>";
 echo "<table cellspacing=0 cellpadding=3 border=0 width=100%>";
 if (empty($s_joueur)) {
     echo "<tr>";
     echo "<td class=textfiche align=center>{$strLoguePourPoster}</td>";
     echo "</tr>";
 } else {
         }
         echo "</div></td>";
         echo "</tr>";
         echo "<tr>";
         echo "<td class=text>" . stripslashes($contenu) . "<br><br></td>";
         echo "</tr>";
         echo "</table>";
         echo "</td></tr></table>";
     }
     if ($op) {
         $p = "op={$op}&";
     } else {
         $p = "";
     }
     echo "<table cellspacing=0 cellpadding=0 border=0 align=center>";
     echo "<tr><td class=text2>" . navigateur($start, $nb_max, $nb_total, "?page=matchs_commentaires&" . $p . "match={$match}&start=%d&header=win") . "</td></tr>";
     echo "</table><br>";
     echo "</td></tr></table>";
 }
 /*** poster un commentaire ***/
 echo "<form method=post name=\"formulaire\" action=?page=matchs_commentaires&op=add>";
 echo "<table border=0 cellpadding=0 cellspacing=0 class=bordure2><tr><td>";
 echo "<table cellspacing=1 cellpadding=0 border=0>";
 echo "<tr><td class=headerfiche>{$strAjouterCommentaire}</td></tr>";
 echo "<tr><td>";
 echo "<table cellspacing=0 cellpadding=3 border=0 width=100%>";
 if ($post != 1) {
     echo "<tr>";
     echo "<td class=textfiche align=center>{$strParticipePourPoster}</td>";
     echo "</tr>";
 } else {