1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82
| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<SCRIPT LANGUAGE="JavaScript">
<!--
function popUp(url)
{
window.open(url, "Fulltilt", "toolbar=no, status=yes, scrollbars=yes, resizable=no, width=200, height=100");
}
//-->
</SCRIPT>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="css/style.css" rel="stylesheet" type="text/css" media="screen" />
<title>Fulltilt Fish Tracker</title>
</head>
<body>
</body>
</html>
<?php
error_reporting(0);
if($_GET['id'])
{
$url= $_GET['id'];
$contenuTxt = fopen($url, 'r');
for ($ligne = 1 ; $ligne <= 10 ; $ligne++)
{
$texte[] = fgets($contenuTxt); // Recupere les 10 premiere ligne du fichier
}
$stringTxt = implode("|", $texte); // Explose le tableau en chaine de caractère
$stringTxt = utf8_encode(strip_tags($stringTxt)); // encodage utf8 + nettoyage espace
$stringTxt = str_replace(' ','',$stringTxt);
$reg="#Seat\d+:(?P<nom>[^(]+)#"; // Masque
preg_match_all($reg, $stringTxt, $resultat); // recupere les noms des joueurs
foreach($resultat['nom'] as $elt)
{
echo '<a href="http://www.pokertableratings.com/fulltilt-player-search/'.$elt.'">'.$elt.'<a/><br/>';
}
}
elseif ($_POST['url'])
{
/// Function date
////////////////////////////////////////////////////////////////////////////////
function dd($date)
{
return date("d/m/Y H:i:s",$date);
}
/// Recupere les fichier du dossier dans un tableau
////////////////////////////////////////////////////////////////////////////////
$dir_nom = $_POST['url']; // dossier listé
$dir = opendir($dir_nom) or die('Erreur de listage : le répertoire n\'existe pas'); // ouverture du contenu du dossier courant
$fichier[] = array(); // déclare le tableau contenant tout les noms des fichiers
while($element = readdir($dir))
{
if($element != '.' && $element != '..')
{
if (!is_dir($dir_nom.'/'.$element))
{
$fichier[] = $element;
}
}
}
closedir($dir);
/// Liste les 10 derniers fichier du repertoire
////////////////////////////////////////////////////////////////////////////////
rsort($fichier);
for($i = 1 ; $i <= 6 ; $i++)
{
$lastFichier[1] = $fichier[$i];
echo '<li>Création : '.dd(filectime($dir_nom.$fichier[$i])).'<br/>';
echo '<a href="traitement.php?id='.$dir_nom.''.$fichier[$i].'">'.$fichier[$i].'<a/><br/>';
echo '<a href="javascript:popUp(\'popup.php?id='.$dir_nom.$fichier[$i].'\')">'.$fichier[$i].'<a/><br/><hr>';
}
}
else
{
header("Location: index.php");
}
?> |
Partager