<?php define("RelativePathTop", "../../libs/top/"); include RelativePathTop . "top_lib.php"; $page = "<div class=\"ui-grid-b\">\n <bloc::ligne>\n <div class=\"ui-block-a\">\n <h4>Journée {journee}</h4>\n </div>\n <div class=\"ui-block-b\" style=\"text-align: center;\">\n <h4><a href=\"#pageten\" value=\"{journee}\" data-transition=\"slide\">{point}</a></h4>\n </div>\n <div class=\"ui-block-c\" style=\"text-align: center;\">\n </div>\n </bloc::ligne>\n </div>"; $cookie = GetFromPost('cookie'); $courbe = courbeResultat($cookie); $contenu = extrait($courbe, 'l2 = paper.text', '</script>'); preg_match_all('#text\\(([0-9]*)[^0-9]*([0-9]*)[^0-9]*([0-9]*)#', $contenu, $match); $result = array(); $retour = array(); $str = ''; $nb = count($match[0]); for ($i = 0; $i < $nb; $i++) { $result[$match[1][$i]][$match[2][$i]] = $match[3][$i]; } foreach ($result as $x => $y) { foreach ($y as $val) { $retour[] = intval($val); } } $nb = count($retour); $Tpl->chargeBuffer($page); for ($i = $nb; $i > 0; $i--) { $Tpl->Parse('ligne.journee', $i); $Tpl->Parse('ligne.point', $retour[$i - 1]); $Tpl->Loop('ligne'); } $resultat = array(); if ($nb) { $resultat['courbe'] = $retour;
<?php define("RelativePathTop", "../../libs/top/"); include RelativePathTop . "top_lib.php"; $site_ouvert = true; $action = GetFromPost('action'); foreach (explode('&', GetFromPost('formData')) as $params) { $param = explode('=', $params); ${$param}[0] = $param[1]; } function urlBdt($url, $fields = array()) { $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, "http://www.bancdetouche.fr/" . $url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_HEADER, 1); if (count($fields) > 0) { $fields_string = ''; foreach ($fields as $key => $value) { $fields_string .= $key . '=' . $value . '&'; } rtrim($fields_string, '&'); curl_setopt($ch, CURLOPT_POST, count($fields)); curl_setopt($ch, CURLOPT_POSTFIELDS, $fields_string); } $resultat = curl_exec($ch); $cookie = substr(extrait($resultat, 'Set-Cookie:', ';'), 12, 45); $info = curl_getinfo($ch); if (isset($info['http_code'])) { $code_ret = $info['http_code']; } else {
<?php define("RelativePathTop", "../../libs/top/"); include RelativePathTop . "top_lib.php"; $page = "<h5>{image}</h5>\n <div class=\"ui-grid-a\">\n <div class=\"ui-block-a\">\n <div class=\"ui-bar ui-bar-a\" style=\"height: 42px;\"><h5>{nom}</h5></div>\n </div>\n <div class=\"ui-block-b\">\n <div class=\"ui-bar ui-bar-a\" style=\"height: 42px;\"><h5>Dernière J : {journee}</h5></div>\n </div>\n <div class=\"ui-block-a\">\n <div class=\"ui-bar ui-bar-a\" style=\"height: 42px;\"><h5>{club}</h5></div>\n </div>\n <div class=\"ui-block-b\">\n <div class=\"ui-bar ui-bar-a\" style=\"height: 42px;\"><h5>Saison : {saison}</h5></div>\n </div>\n <div class=\"ui-block-a\">\n <div class=\"ui-bar ui-bar-a\" style=\"height: 42px;\"><h5>{poste}</h5></div>\n </div>\n <div class=\"ui-block-b\">\n <div class=\"ui-bar ui-bar-a\" style=\"height: 42px;\"><h5>Valeur à l'achat : {achat}</h5></div>\n </div>\n <div class=\"ui-block-a\">\n <div class=\"ui-bar ui-bar-a\" style=\"height: 42px;\"><h5>Titulaire : {titulaire}</h5></div>\n </div>\n <div class=\"ui-block-b\">\n <div class=\"ui-bar ui-bar-a\" style=\"height: 42px;\"><h5>Valeur actuelle : {vente}</h5></div>\n </div>\n <div class=\"ui-block-a\">\n <div class=\"ui-bar ui-bar-a\" style=\"height: 42px;\"><h5>Remplacant : {remplacant}</h5></div>\n </div>\n <div class=\"ui-block-b\">\n <div class=\"ui-bar ui-bar-a\" style=\"height: 42px;\">{capitaine}</div>\n </div>\n </div>\n <div id=\"boutonvendre\" class=\"ui-btn ui-input-btn ui-btn-b ui-corner-all ui-shadow\">Vendre</div>"; $listejoueur = "<div data-role=\"none\">\n <table id=\"tableJoueur\">\n <thead><tr><th><h5>Club</h5></th><th><h5>Nom</h5></th><th><h5>M €</h5></th></tr></thead>\n <tbody><bloc::ligne>\n <tr><td><img src=\"{maillot}\" value={num}></td><td>{nom}</td><td>{achat}</td><td>{equipe}</td></tr></bloc::ligne>\n <bloc::budgetzero><tr><td></td><td>Budget insuffisant</td><td></td><td></td></tr></bloc::budgetzero>\n </tbody></table>\n </div>"; $cookie = GetFromPost('cookie'); $action = GetFromPost('action'); $num = GetFromPost('num', 0); $id = GetFromPost('id', '5a1'); // $num = 0; if ($action == 'info' && $num != 0) { $joueurinfo = joueurInfo($cookie, 'joueurinfo', $num); $joueurinfo2 = joueurInfo($cookie, 'joueurinfo2', $num); $contenu = utf8_decode(str_replace(" ", " ", extrait($joueurinfo, '<table', '</table>'))); $contenu2 = utf8_decode(str_replace(" ", " ", extrait($joueurinfo2, '<table', '</table>'))); $contenu = str_replace("<br>", "xx", $contenu); preg_match_all('#src="(.*)png(.*)#', $contenu, $match); $maillot = $match[1][0] . 'png'; preg_match_all('#\\s(.*)xx(.*)xx#', $contenu, $match); $nom = str_replace(array(",", "."), array("", ""), trim($match[1][0])); $club = trim($match[2][0]); preg_match_all('#\\((.*)\\)(.*)#', $contenu, $match); $poste = trim($match[1][0]); preg_match_all('#>\\s(Capitaine)(.*)#', $contenu, $match); if (substr($id, 0, 1) < 5) { $str = '<a href="#" id="fairecapitaine" data-role="button" data-mini="true" style="bottom: 10px;">Capitaine</a>'; } else { $str = ' '; } $capitaine = isset($match[1][0]) ? 'Capitaine' : $str;
<?php define("RelativePathTop", "../../libs/top/"); include RelativePathTop . "top_lib.php"; $ck = GetFromPost('cookie'); $conf = GetFromPost('conf', 1); echo miseAJourConfig($ck, $conf);
<?php define("RelativePathTop", "../../libs/top/"); include RelativePathTop . "top_lib.php"; $page = "\n <div data-role=\"content\" class=\"ui-bar ui-bar-a\" style=\"text-align: center;\">\n <h1>Joueurs</h1>\n <img id=\"completude\" src=\"images/red_light.png\" width=\"20\" style=\"float: right\">\n <img id=\"completude_v\" src=\"images/green_light.png\" width=\"20\" style=\"float: right; display: none\">\n </div>\n <bloc::ligne_joueur>\n <div class=\"ui-grid-{nb_joueur}\">\n <bloc::poste>\n <div class=\"ui-block-{pos_joueur}\">\n <div class=\"ui-bar ui-bar-f\">{joueur}</div>\n </div>\n </bloc::poste>\n </div>\n </bloc::ligne_joueur>\n\n <div data-role=\"content\" class=\"ui-bar ui-bar-a\" style=\"text-align: center;\">\n <h1>Entraineur</h1>\n </div>\n\n <div class=\"ui-grid-c\">\n <div class=\"ui-block-a\">\n <div class=\"ui-bar ui-bar-f\">{entraineur}</div>\n </div>\n <div class=\"ui-block-b\">\n <div class=\"ui-bar ui-bar-f\"></div>\n </div>\n <div class=\"ui-block-c\">\n <div class=\"ui-bar ui-bar-f\"></div>\n </div>\n <div class=\"ui-block-d\">\n <div class=\"ui-bar ui-bar-f\"></div>\n </div>\n </div>\n\n <div data-role=\"content\" class=\"ui-bar ui-bar-a\" style=\"text-align: center;\">\n <h1>Remplaçants</h1>\n </div>\n <div class=\"ui-grid-c\">\n <div class=\"ui-block-a\">\n <div class=\"ui-bar ui-bar-f\">{remp1}</div>\n </div>\n <div class=\"ui-block-b\">\n <div class=\"ui-bar ui-bar-f\">{remp2}</div>\n </div>\n <div class=\"ui-block-c\">\n <div class=\"ui-bar ui-bar-f\">{remp3}</div>\n </div>\n <div class=\"ui-block-d\">\n <div class=\"ui-bar ui-bar-f\"></div>\n </div>\n </div>\n <div data-role=\"content\" class=\"ui-bar ui-bar-a\" style=\"text-align: center;\">\n <h1>Capital</h1>\n </div>\n <div id=\"valeurportefeuille\" data-role=\"content\" data-theme=\"b\">\n <h5>{portefeuille}</h5>\n <h5>{achat} / {vente}</h5>\n </div>\n </div>"; $cookie = GetFromPost('cookie'); $action = GetFromPost('action'); function miseEnForme($tableau, $type) { global $Tpl; $tab_nb_joueur = array(null, 'b', 'a', 'b', 'c', 'd'); $tab_pos_joueur = array(null, 'a', 'b', 'c', 'd', 'e'); $nb = count($tableau); if ($nb == 1) { $str = '<img id="' . $type . 'a1" width="30" border="0" src="' . $tableau[0]['maillot'] . '" value="' . $tableau[0]['num'] . '" ><p>' . $tableau[0]['nom'] . '</p>'; $Tpl->Parse('ligne_joueur.nb_joueur', $tab_nb_joueur[3]); $Tpl->Parse('ligne_joueur.poste.pos_joueur', 'a'); $Tpl->Parse('ligne_joueur.poste.joueur', ''); $Tpl->Loop('ligne_joueur.poste'); $Tpl->Parse('ligne_joueur.poste.pos_joueur', 'b'); $Tpl->Parse('ligne_joueur.poste.joueur', $str); $Tpl->Loop('ligne_joueur.poste'); $Tpl->Parse('ligne_joueur.poste.pos_joueur', 'c'); $Tpl->Parse('ligne_joueur.poste.joueur', ''); $Tpl->Loop('ligne_joueur.poste'); } if ($nb > 1) { for ($i = 0; $i < $nb; $i++) { $j = $i + 1; $str = '<img id="' . $type . 'a' . $j . '" width="30" border="0" src="' . $tableau[$i]['maillot'] . '" value="' . $tableau[$i]['num'] . '" ><p>' . $tableau[$i]['nom'] . '</p>'; $Tpl->Parse('ligne_joueur.nb_joueur', $tab_nb_joueur[$nb]);
<?php define("RelativePathTop", "../../libs/top/"); include RelativePathTop . "top_lib.php"; $rel = GetFromPost('rel', 'external'); $page = "<ul data-role=\"listview\">\n <bloc::liste_menu>\n <li><a href=\"{link_menu}\" "; if ($rel == "external") { $page .= "rel=\"external\" "; } $page .= "data-transition=\"slide\">{item_menu}</a></li>\n </bloc::liste_menu>\n </ul>"; $liste_menu = array(); $liste_menu[] = array('Composition', 'maintwo.php#pagefour'); $liste_menu[] = array('Résultats', '#pagenine'); $liste_menu[] = array('Ligue', '#'); $liste_menu[] = array('Division', '#'); $liste_menu[] = array('Gold Cup', '#'); $liste_menu[] = array('Silver Cup', '#'); $Tpl->chargeBuffer($page); foreach ($liste_menu as $item_menu) { $Tpl->Parse('liste_menu.item_menu', $item_menu[0]); $Tpl->Parse('liste_menu.link_menu', $item_menu[1]); $Tpl->Loop('liste_menu'); } echo $Tpl->output_json();
<?php define("RelativePathTop", "../../libs/top/"); include RelativePathTop . "top_lib.php"; $page = "<div class=\"ui-grid-b\">\n <div class=\"ui-block-a\">\n <h4><img id=\"jprec\" src=\"images/arrow_left.png\" style=\"width: 20px;\"></h4>\n </div>\n <div class=\"ui-block-b\" style=\"text-align: center;\">\n <h4>Journée n°{journee}</h4>\n </div> \n <div class=\"ui-block-c\" style=\"text-align: right;\">\n <h4><img id=\"jsuiv\" src=\"images/arrow_right.png\" style=\"width: 20px;\"></h4>\n </div>\n <div class=\"ui-block-a\"> </div>\n <div class=\"ui-block-b\" style=\"text-align: center;\"> </div> \n <div class=\"ui-block-c\" style=\"text-align: right;\"> </div>\n <bloc::ligne>\n <div class=\"ui-block-a\">\n <div class=\"ui-bar ui-bar-b\"><h5>{equipe1}</h5></div>\n </div>\n <div class=\"ui-block-b\">\n <div class=\"ui-bar ui-bar-b\" style=\"text-align: center;\"><h5>{score}</h5></div>\n </div>\n <div class=\"ui-block-c\">\n <div class=\"ui-bar ui-bar-b\"><h5>{equipe2}</h5></div>\n </div>\n </bloc::ligne>\n </div>"; $journee = GetFromPost('journee', 1); $calendrierjournee = calendrierJournee($journee); preg_match_all('#<td class="txt7"([^/]*)#', $calendrierjournee, $match); $match[1][0] = ''; $temp = str_replace('Saint-Etienne', 'StEtienne', implode($match[1])); preg_match_all('#>([^<]*)#', $temp, $match2); $Tpl->chargeBuffer($page); for ($i = 0; $i < 10; $i++) { $j = $i * 3; $Tpl->Parse('ligne.equipe1', $match2[1][$j]); $Tpl->Parse('ligne.score', $match2[1][$j + 1]); $Tpl->Parse('ligne.equipe2', $match2[1][$j + 2]); $Tpl->Loop('ligne'); } $Tpl->Parse('journee', $journee); echo utf8_encode($Tpl->output());
function GetFromParam($param, $defaut = "") { return isset($_POST[$param]) ? GetFromPost($param, $defaut) : GetFromGet($param, $defaut); }