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 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048
|
<!-- AFFICHAGE HISTORIQUE DM --><?php include('histo_dm.php');?>
<!-- AFFICHAGE HISTORIQUE QUINTE --><?php include ('histo_quinte.php'); ?>
<!-- CHALLENGE PRONO --><div class="row" id="challengeprono">
<div class="col-md-12">
<?php
##########################################
# CONNEXION AU SERVEUR BASES DEs DONNEES #
##########################################
##### REFERENCE QUINTE #####
//$REFERENCE_QUINTE= date("dmY");
require('connect_bdd.php');
$reponse = mysqli_query($bdd,"SELECT *, DATE_FORMAT(date_prono, '%d/%m/%Y - %Hh:%i.' ) AS 'date_enregistrement' FROM Prono_Turf WHERE REFERENCE_QUINTE =$REFERENCE_QUINTE ORDER BY date_prono DESC");
//$reponse = mysqli_query($pronos) or die (mysqli_error());
$tab_res = array($C1, $C2, $C3, $C4, $C5);
?>
<div class="panel-heading"><h2 class="panel-title"><strong>Participants au Challenge pour ce Quinté</strong> </h2>
<ul class="panel-controls">
<li><strong>Retrouver son pronostique saisir votre pseudo , ci-dessous</strong></li>
</ul>
</div>
<div class="panel-body"><table class="table datatable">
<thead>
<tr>
<th width="17%" style="border: 1px solid black;"> <div align="center">Date</div></th>
<th width="12%" style="border: 1px solid black;"> <div align="center"><i class="glyphicon glyphicon-user"></i> Participant</div></th>
<th width="2%" style="border: 1px solid black;"> <div align="center"><strong>1</strong></div></th>
<th width="2%" style="border: 1px solid black;"> <div align="center"><strong>2</strong></div></th>
<th width="2%" style="border: 1px solid black;"> <div align="center"><strong>3</strong></div></th>
<th width="2%" style="border: 1px solid black;"> <div align="center"><strong>4</strong></div></th>
<th width="2%" style="border: 1px solid black;"> <div align="center"><strong>5</strong></div></th>
<th width="2%" style="border: 1px solid black;"> <div align="center"><strong>6</strong></div></th>
<th width="2%" style="border: 1px solid black;"> <div align="center"><strong>7</strong></div></th>
<th width="2%" style="border: 1px solid black;"> <div align="center"><strong>8</strong></div></th>
<th width="2%" style="border: 1px solid black;"> <div align="center"><strong>R1</strong></div></th>
<th width="2%" style="border: 1px solid black;"> <div align="center"><strong>R2</strong></div></th>
<th width="2%" style="border: 1px solid black;"> <div align="center"><strong>R3</strong></div></th>
<!-- <th width="8%" style="color:red;"> <div align="center"><strong>Arrivée</strong></div></th>-->
<th colspan="2" width="6%" style="border: 1px solid black; "><div align="center"><img name="" src="img/E_TIERCE.png" width="70" height="25" alt=""></div></th>
<th colspan="2" width="7%" style="border: 1px solid black; "><div align="center"><strong><img name="" src="img/E_QUARTE.png" width="70" height="25" alt=""></strong></div></th>
<th colspan="2" width="7%" style="border: 1px solid black; " ><div align="center"><strong><img name="" src="img/e_quinte__original.png" width="70" height="25" alt=""></strong></div></th>
<th colspan="2" width="7%" style="border: 1px solid black; " ><div align="center"><strong><img name="" src="img/E_COUPLE.png" width="70" height="25" alt=""></strong></div></th>
<th width="4%" style="border: 1px solid black; " ><div align="center"><strong><img name="" src="img/E_2SUR4.png" width="70" height="25" alt=""></div></th>
<th width="7%" style="border: 1px solid black; " ><div align="center"><strong><img name="" src="https://www.digiset.co/wp-content/uploads/2017/12/Untitled-5.gif" width="30" height="30" alt=""></div></th>
</tr>
</thead>
<tbody>
<?php
##### ARRIVEEE DU QUINTE #####
//$REFERENCE_QUINTE= date("dmY");
#########################################
# CONNEXION AU SERVEUR BASES DE DONNEES #
#########################################
require('connect_bdd.php');
$Arrivee_quinte = mysqli_query($bdd, "SELECT *, DATE_FORMAT(Date_du_quinte, '%d/%m/%Y à %Hh:%i.' ) AS 'date_quinte_heure' FROM refquinte WHERE REFERENCE_QUINTE ='$REFERENCE_QUINTE' ");
$Arrivee = mysqli_fetch_array($Arrivee_quinte);
mysqli_close($bdd);
$nonPartant = true; // false si yen a pas
//$nonPartant = false;
$nonPartant_1 = (int)$Arrivee['NP1'];
$nonPartant_2 = (int)$Arrivee['NP2'];
$nonPartant_3 = (int)$Arrivee['NP3'];
?>
<?php
function ordre($prono,$arrive){
return count(array_intersect_assoc($arrive, $prono));
}
function desordre($prono,$arrive){
return count(array_intersect($arrive,$prono));
}
function combine($prono,$arrive){
$total = 0;
for ($a=0;$a<count($arrive);$a++){
$exit = 1;
for ($p=0;$p<count($prono);$p++){
if($arrive[$a] === $prono[$p]){
$exit = 0;
$prono = array_slice($prono,$p,count($prono));
$total+=1;
}
}
if($exit) break;
}
return $total;
}
function combineToutOrdre($prono,$arrive){
return count(array_intersect($arrive,$prono));
}
// CALCUL DES POINT COUPLE PLACER SEULEMENT SI DANS LES 5 PREMIERS //
$points_coupler_placer = $list_quinte['Rbonus4'];
function couple3($prono,$arrive, $points_coupler_placer){
$arrive = array_slice($arrive,0,3);
$prono = array_slice($prono,0,3);
return count(array_intersect($arrive,$prono))>=2 ? $points_coupler_placer : 0;
}
// CALCUL DES POINT 2/4 //
$points_deuxquatre = $list_quinte['R2sur4'];
function DeuxsurQuatre($prono,$arrive, $points_deuxquatre){
$arrive = array_slice($arrive,0,4);
$prono = array_slice($prono,0,4);
return count(array_intersect($arrive,$prono))>=2 ? $points_deuxquatre : 0;
}
// CALCUL COUPLE GAGNANT ET ORDRE //
$points_coupler_gagnant = $list_quinte['rapport_coupler_gagnant'];
function coupler($prono,$arrive, $points_coupler_gagnant){
$arrive = array_slice($arrive,0,2);
$prono = array_slice($prono,0,2);
return count(array_intersect($arrive,$prono))>=2 ? $points_coupler_gagnant : 0;
}
// BONUS DE 30 POINTS SI TIERCE EN TROIS //
function tierce_3($prono,$arrive){
$arrive = array_slice($arrive,0,3);
$prono = array_slice($prono,0,3);
return count(array_intersect($arrive,$prono))>=3 ? 30 : 0;
}
// BONUS DE 40 POINTS SI QUARTE EN QUATRE //
function quarte_4($prono,$arrive){
$arrive = array_slice($arrive,0,4);
$prono = array_slice($prono,0,4);
return count(array_intersect($arrive,$prono))>=4 ? 40 : 0;
}
// BONUS DE 50 POINTS SI QUINTE EN CINQ //
function quinte_5($prono,$arrive){
$arrive = array_slice($arrive,0,5);
$prono = array_slice($prono,0,5);
return count(array_intersect($arrive,$prono))>=5 ? 50 : 0;
}
function jeu($prono,$arrive,$jeu,$type){
switch($jeu){
case "tierce":
if(count($prono)<3) return "Vous n'avez pas assez de chevaux pour jouer au tierce";
if(count($arrive)<3) return "Il n'y a pas assez de chevaux pour jouer au tierce";
$arrive = array_slice($arrive,0,3);
if($type==="ordre"||$type==="desordre"){
$prono = array_slice($prono,0,3);
}
//$tierce_desordre = $list_quinte['TIERCE_DESORDRE'];
//$points = array('ordre'=>100,'desordre'=>50,'combine'=>100/(count($prono)-2),'combineToutOrdre'=>50/(count($prono)-2));
$points = array('ordre'=>100,'desordre'=>50,'combine'=>100,'combineToutOrdre'=>50);
$pointJeu = $type($prono,$arrive) >= 3 ? $points[$type] : 0;
break;
case "quarte":
if(count($prono)<4) return "Vous n'avez pas assez de chevaux pour jouer au quarte";
if(count($arrive)<4) return "Il n'y a pas assez de chevaux pour jouer au quarte";
$arrive = array_slice($arrive,0,4);
if($type==="ordre"||$type==="desordre"){
$prono = array_slice($prono,0,4);
}
//$points = array('ordre'=>200,'desordre'=>100,'combine'=>200/(count($prono)-3),'combineToutOrdre'=>100/(count($prono)-3));
$points = array('ordre'=>200,'desordre'=>100,'combine'=>200,'combineToutOrdre'=>100);
$pointJeu = $type($prono,$arrive) >= 4 ? $points[$type] : 0;
break;
case "quinte":
if(count($prono)<5) return "Vous n'avez pas assez de chevaux pour jouer au quinte";
if(count($arrive)<5) return "Il n'y a pas assez de chevaux pour jouer au quinte";
$arrive = array_slice($arrive,0,5);
if($type==="ordre"||$type==="desordre"){
$prono = array_slice($prono,0,5);
}
//$points = array('ordre'=>500,'desordre'=>250,'combine'=>500/(count($prono)-4),'combineToutOrdre'=>250/(count($prono)-4));
$points = array('ordre'=>500,'desordre'=>250,'combine'=>500,'combineToutOrdre'=>250);
$pointJeu = $type($prono,$arrive) >= 5 ? $points[$type] : 0;
break;
}
return $pointJeu;
}
// FONCTION AFFICHAGE NUMERO EN COULEUR VERTE SI OK //
function afficher_numero($nonPartant_1,$nonPartant_2,$nonPartant_3,$CH,$arrive,$remplacement){
if(
$nonPartant_1===(int)$CH||
$nonPartant_2===(int)$CH||
$nonPartant_3===(int)$CH
){
$color1 = "red";
$color2 = "red";
$CH = $CH."<sub style='color:#8c8dba;'>".($remplacement[(int)$CH])."</sub>";
}else{
$color1 = "#2b2d2c";
$color2 = "#fcfdff";
}
if(in_array($CH,$arrive)){
return '<td style="background:#0fdb6e;color:'.$color1.'">'.$CH.'</td>';
}else{
return '<td style="background:#7a7ef5;color:'.$color2.'">'.$CH.'</td>';
}
}
while($datas = mysqli_fetch_assoc($reponse)) {
#############################################
# CONNEXION AU SERVEUR BASES DE DONNEES #
#############################################
// ON CHERCHE LE PARTICIPANT PAR SON ID_USER //
require('connect_bdd.php');
$PARTICIPANT_PRONO = $datas['PARTICIPANT'];
$recherche_participant = mysqli_query($bdd, "SELECT * FROM PARTICIPANTS WHERE id_user='$PARTICIPANT_PRONO'");
$participant = mysqli_fetch_array($recherche_participant);
$Nom_participant =$participant['login'];
$prono = array((int)$datas['CH1'],(int)$datas['CH2'],(int)$datas['CH3'],(int)$datas['CH4'],(int)$datas['CH5'],(int)$datas['CH6'],(int)$datas['CH7'],(int)$datas['CH8']);
$prono_copy = $prono;
$new_copy = array();
$nonpartant = array((int)$nonPartant_1,(int)$nonPartant_2,(int)$nonPartant_3);
$r1=$r2=$r3=false;
$remplacement = array();
if($nonPartant){
for ($np=0;$np<count($nonpartant);$np++){
if( !$r1 && $nonPartant_1!=0 && !in_array((int)$datas['REGRET1'],$nonpartant) && (int)$datas['REGRET1']!=0 && in_array($nonpartant[$np],$prono)){
for ($p=0;$p<count($prono);$p++){
if($prono[$p]===$nonpartant[$np]){
unset($prono[$p]);
array_push($prono,(int)$datas['REGRET1']);
$r1=true;
$remplacement[$nonpartant[$np]] = $datas['REGRET1'];
}
}
}
else if( !$r2 && $nonPartant_2!=0 && !in_array((int)$datas['REGRET2'],$nonpartant) && (int)$datas['REGRET2']!=0 && in_array($nonpartant[$np],$prono)){
for ($p=0;$p<count($prono);$p++){
if($prono[$p]===$nonpartant[$np]){
unset($prono[$p]);
array_push($prono,(int)$datas['REGRET2']);
$r2=true;
$remplacement[$nonpartant[$np]] = $datas['REGRET2'];
}
}
}
else if( !$r3 && $nonPartant_3!=0 && !in_array((int)$datas['REGRET3'],$nonpartant) && (int)$datas['REGRET3']!=0 && in_array($nonpartant[$np],$prono)){
for ($p=0;$p<count($prono);$p++){
if($prono[$p]===$nonpartant[$np]){
unset($prono[$p]);
array_push($prono,(int)$datas['REGRET3']);
$r3=true;
$remplacement[$nonpartant[$np]] = $datas['REGRET3'];
}
}
}
}
foreach ($prono as $k=>$v){
$new_copy[] = $v;
}
$prono = $new_copy;
}else{
}
$C1 = (int)$Arrivee['tierce_1'];
$C2 = (int)$Arrivee['tierce_2'];
$C3 = (int)$Arrivee['tierce_3'];
$C4 = (int)$Arrivee['quarte_4'];
$C5 = (int)$Arrivee['quinte_5'];
$arrive = array($C1, $C2, $C3, $C4, $C5);
$tierce_ordre = jeu($prono,$arrive,"tierce","combine");
$tierce_desordre = $tierce_ordre===0 ? jeu($prono,$arrive,"tierce","combineToutOrdre"):0;
$quarte_ordre = jeu($prono,$arrive,"quarte","combine");
$quarte_desordre = $quarte_ordre===0 ? jeu($prono,$arrive,"quarte","combineToutOrdre"):0;
$quinte_ordre = jeu($prono,$arrive,"quinte","combine");
$quinte_desordre = $quinte_ordre===0 ? jeu($prono,$arrive,"quinte","combineToutOrdre"):0;
// COUPLER GAGNANT SI PAS DE TIERCE ET QUARTE ET QUINTE //
if($quarte_ordre+$quarte_desordre+$quinte_ordre+$quinte_desordre+$tierce_ordre+$tierce_desordre===0){
$coupler_gagnant = coupler($prono,$arrive , $points_coupler_gagnant);
}else{
$coupler_gagnant = 0;
}
// CALCUL Couplé SI PAS DE TIERCE QUARTE ET QUINTE et Couplé Gagnant //
if($coupler_gagnant+$quarte_ordre+$quarte_desordre+$quinte_ordre+$quinte_desordre+$tierce_ordre+$tierce_desordre===0){
$couple3 = couple3($prono,$arrive, $points_coupler_placer);
}else{
$couple3 = 0;
}
// CALCUL 2/4 SI PAS DE QUARTE ET QUINTE //
if($quarte_ordre+$quarte_desordre+$quinte_ordre+$quinte_desordre===0){
$deuxsurquatre = DeuxsurQuatre($prono,$arrive, $points_deuxquatre);
}else{
$deuxsurquatre = 0;
}
if($datas['CH1']==$C1) {$gagnant=$datas['cheval_gagnant'];} else {$gagnant=0;}
if($list_quinte['rapport_desordre'] < 50 ){ $coefficient = 0.03 ;}
elseif($list_quinte['rapport_desordre'] >= 50.1 AND $list_quinte['rapport_desordre'] <= 100 ){ $coefficient=0.05 ;} // INFERIEUR OU EGAL A 100 EUROS EN GAINS //
elseif($list_quinte['rapport_desordre'] >= 100.1 AND $list_quinte['rapport_desordre'] <= 300 ){ $coefficient=0.15 ;} // SUPERIEUR OU EGAL A 1000 ET INFERIEUR A 2000 EUROS EN GAINS
elseif($list_quinte['rapport_desordre'] >= 300.1 AND $list_quinte['rapport_desordre'] <= 500 ){ $coefficient=0.50 ;} // SUPERIEUR OU EGAL A 1000 ET INFERIEUR A 2000 EUROS EN GAINS
elseif($list_quinte['rapport_desordre'] >= 500.1 AND $list_quinte['rapport_desordre'] <= 1000 ){ $coefficient=1.00 ;} // SUPERIEUR OU EGAL A 1000 ET INFERIEUR A 2000 EUROS EN GAINS
elseif($list_quinte['rapport_desordre'] >= 1000.1 AND $list_quinte['rapport_desordre'] <= 2000 ){ $coefficient=1.50; } // SUPERIEUR OU EGAL A 1000 ET INFERIEUR A 2000 EUROS EN GAINS //
elseif($list_quinte['rapport_desordre'] >= 2000.1 AND $list_quinte['rapport_desordre'] <= 4000 ){ $coefficient=2.5 ;} // SUPERIEUR OU EGAL A 2000 ET INFERIEUR A 3000 EUROS EN GAINS //
elseif($list_quinte['rapport_desordre'] >= 4000.1 AND $list_quinte['rapport_desordre'] <= 7000 ){ $coefficient=3 ;} // SUPERIEUR OU EGAL A 2000 ET INFERIEUR A 3000 EUROS EN GAINS //
elseif($list_quinte['rapport_desordre'] >= 7000.1 AND $list_quinte['rapport_desordre'] <= 10000 ){ $coefficient=4 ;} // SUPERIEUR OU EGAL A 2000 ET INFERIEUR A 3000 EUROS EN GAINS //
elseif($list_quinte['rapport_desordre'] >= 10000.1) { $coefficient = 5 ;} // SUPERIEUR A 6001 EN GAINS //
$gagnant = $list_quinte['cheval_gagnant'];
// POINTS BONUS //
if ($coefficient > 0.15) {
$tierce_3 = tierce_3($prono,$arrive);
$quarte_4 = quarte_4($prono,$arrive);
$quinte_5 = quinte_5($prono,$arrive);
}
else {
$tierce_3 =0;
$quarte_4 =0;
$quinte_5 =0;
}
$sous_total = $coupler_gagnant+$couple3+$tierce_ordre*$coefficient + $tierce_desordre*$coefficient + $quarte_ordre*$coefficient + $quarte_desordre*$coefficient + $quinte_ordre*$coefficient + $quinte_desordre*$coefficient + $bonus4 + $deuxsurquatre + $tierce_3 + $quarte_4 + $quinte_5 ;
// GAGNANT TROUVER //
if($datas['CH1']==$C1)
{ $total = $sous_total + $gagnant ; }
else { $total = $sous_total; }
// #### COEFFICIENT CALCUL AJOUTER #### //
if($tierce_ordre !=0){
$tierce_ordre =$tierce_ordre*$coefficient+$tierce_3 ;
}
if($tierce_desordre !=0){
$tierce_desordre = $tierce_desordre*$coefficient+$tierce_3 ;
}
if($quarte_ordre !=0){
$quarte_ordre = $quarte_ordre*$coefficient+$quarte_4;
}
if($quarte_desordre !=0){
$quarte_desordre = $quarte_desordre*$coefficient+$quarte_4;
}
if($quinte_ordre !=0){
$quinte_ordre = $quinte_ordre*$coefficient+$quinte_5 ;
}
if($quinte_desordre !=0){
$quinte_desordre = $quinte_desordre*$coefficient+$quinte_5 ;
}
?>
<tr>
<?php
if($participant['avatar']!=NULL){
$avatar = '<img <img class="img-circle" src="avatar/'.$participant['avatar'].'" width="35" height="35" />';
} else {
$avatar = '<img class="img-circle" src="https://2.gravatar.com/avatar/'.md5($participant['mail']).'" width="35" height="35" />';
}
echo '<td style="text-transform:uppercase; background: #ccf2c4;color:#2d2d2c;">'.$avatar.' '.$datas['date_enregistrement'].'</td>';
if($_SESSION['id_user'] ==1) {
$iduserturf = $datas['PARTICIPANT'] ;
echo '<td style="text-transform:uppercase; background: #ccf2c4;color:#2d2d2c;"><strong>'.$Nom_participant.' <sub><font color="red">['.$iduserturf.']</font></sub></strong></td>';
} else
{echo '<td style="text-transform:uppercase; background: #ccf2c4;color:#2d2d2c;"><strong>'.$Nom_participant.'</strong></td>'; }
//echo afficher_numero('<span'.$nonPartant_1,$nonPartant_2,$nonPartant_3,$datas['CH1'],$arrive,$remplacement.'</span>');
echo afficher_numero($nonPartant_1,$nonPartant_2,$nonPartant_3,$datas['CH1'],$arrive,$remplacement);
echo afficher_numero($nonPartant_1,$nonPartant_2,$nonPartant_3,$datas['CH2'],$arrive,$remplacement);
echo afficher_numero($nonPartant_1,$nonPartant_2,$nonPartant_3,$datas['CH3'],$arrive,$remplacement);
echo afficher_numero($nonPartant_1,$nonPartant_2,$nonPartant_3,$datas['CH4'],$arrive,$remplacement);
echo afficher_numero($nonPartant_1,$nonPartant_2,$nonPartant_3,$datas['CH5'],$arrive,$remplacement);
echo afficher_numero($nonPartant_1,$nonPartant_2,$nonPartant_3,$datas['CH6'],$arrive,$remplacement);
echo afficher_numero($nonPartant_1,$nonPartant_2,$nonPartant_3,$datas['CH7'],$arrive,$remplacement);
echo afficher_numero($nonPartant_1,$nonPartant_2,$nonPartant_3,$datas['CH8'],$arrive,$remplacement);
echo in_array($datas['REGRET1'],$arrive)&&$r1 ? '<td style="background: green;color:#FFFFFF;">'.$datas['REGRET1'].'</td>' :'<td style="background: #8c3535;color:#FFFFFF;">'.$datas['REGRET1'].'</td>' ;
echo in_array($datas['REGRET2'],$arrive)&&$r2 ? '<td style="background: green;color:#FFFFFF;">'.$datas['REGRET2'].'</td>' :'<td style="background: #8c3535;color:#FFFFFF;">'.$datas['REGRET2'].'</td>' ;
echo in_array($datas['REGRET3'],$arrive)&&$r3 ? '<td style="background: green;color:#FFFFFF;">'.$datas['REGRET3'].'</td>' :'<td style="background: #8c3535;color:#FFFFFF;">'.$datas['REGRET3'].'</td>' ;
// ##### SI PAS D'ARRIVEE OFFICIEL SAISIE ON AFFICHE 0 AUX POINTS #####//
if($C1 ==0) {
$tierce_ordre ='0';
$tierce_desordre ='0';
$quarte_ordre ='0';
$quarte_desordre ='0';
$quinte_ordre ='0';
$quinte_desordre ='0';
$deuxsurquatre ='0';
$couple3 ='0';
$total ='0';
} ?>
<!-- SI ARRIVEE OFFICIEL ON AFFICHE LES POINTS MAIS ILS NE SONT PAS MIS SUR LE COMPTE DU PARTICIPANT -->
<td><?php if($tierce_ordre ==0){echo ''.$tierce_ordre.'';} else {echo '<strong><font color="red">'.$tierce_ordre.'</font></strong>';} ?></td>
<td><?php if($tierce_desordre ==0){echo ''.$tierce_desordre.'';} else {echo '<strong><font color="red">'.$tierce_desordre.'</font></strong>';} ?></td>
<td><?php if($quarte_ordre ==0){echo ''.$quarte_ordre.'';} else {echo '<strong><font color="red">'.$quarte_ordre.'</font></strong>';} ?></td>
<td><?php if($quarte_desordre ==0){echo ''.$quarte_desordre.'';} else {echo '<strong><font color="red">'.$quarte_desordre.'</font></strong>';} ?></td>
<td><?php if($quinte_ordre ==0){echo ''.$quinte_ordre.'';} else {echo '<strong><font color="red">'.$quinte_ordre.'</font></strong>';} ?></td>
<td><?php if($quinte_desordre ==0){echo ''.$quinte_desordre.'';} else {echo '<strong><font color="red">'.$quinte_desordre.'</font></strong>';} ?></td>
<!-- Couplé Gagnant -->
<td><?php if($coupler_gagnant ==0){echo ''.$coupler_gagnant.'';} else {echo '<strong><font color="red">'.$coupler_gagnant.'</font></strong>';} ?></td>
<!-- Couplé Placé -->
<td><?php if($couple3 ==0){echo ''.$couple3.'';} else {echo '<strong><font color="red">'.$couple3.'</font></strong>';} ?></td>
<!-- 2/4 -->
<td><?php if($deuxsurquatre ==0){echo ''.$deuxsurquatre.'';} else {echo '<strong><font color="red">'.$deuxsurquatre.'</font></strong>';} ?></td>
<!-- Total -->
<td>
<?php
if($datas['CH1']==$C1) {echo '<font color="#088A08"><img src="img/tuyau_des_pistes.png" width="15" height="15" /> </font>' ;}
echo '<strong>'.$total.'</strong>';?>
</td>
</tr>
<?php }
//mysqli_close($bdd);
?>
</tbody>
</table>
<?php if($list_quinte['rapport_desordre'] !=0 ){ // ON AFFICHE QUE SI LES RAPPORTS AJOUTES //?>
Si vous avez trouvé le cheval gagnant <strong><font color="green"><?php echo $list_quinte['tierce_1']; ?></font></strong> <font color="#088A08"><img src="img/tuyau_des_pistes.png" width="15" height="15" /></font> * Points obtenus sur la valeur simple gagnant , pour ce jour <strong><font color="green"><?php echo $list_quinte['cheval_gagnant'] ; ?> Points.</font></strong>
<br /> Coefficient pour le calcul des points ce jour : <strong><font color="red"><?php echo $coefficient ; ?></font>
<?php
if ($coefficient ==0.03) { $coef_rapports = "Correspondant avec une arrivée logique du quinté , pour un rapport désordre de 50 euros maximum" ; }
if ($coefficient ==0.05) { $coef_rapports = "Correspondant au rapport du Quinté désordre de 51 euros à 100 euros" ; }
if ($coefficient ==0.15) { $coef_rapports = "Correspondant au rapport du Quinté désordre de 101 euros à 300 euros" ; }
if ($coefficient ==0.50) { $coef_rapports = "Correspondant au rapport du Quinté désordre de 301 euros à 500 euros" ; }
if ($coefficient ==1.00) { $coef_rapports = "Correspondant au rapport du Quinté désordre de 501 euros à 1000 euros" ; }
if ($coefficient ==1.50) { $coef_rapports = "Correspondant au rapport du Quinté désordre de 1001 euros à 2000 euros" ; }
if ($coefficient ==2.5) { $coef_rapports = "Correspondant au rapport du Quinté désordre de 2001 euros à 4000 euros" ; }
if ($coefficient ==3) { $coef_rapports = "Correspondant au rapport du Quinté désordre de 4001 euros à 7000 euros" ; }
if ($coefficient ==4) { $coef_rapports = "Correspondant au rapport du quinté désordre de 7001 supérieur à 10000 euros" ; }
if ($coefficient ==5) { $coef_rapports = "Correspondant au rapport du quinté désordre de 10000 supérieur à 30000 euros" ; }
echo ' - <strong>'.$coef_rapports.'</strong>';
?>
<br/> Vous avez trouvé le couplé gagnant ou ordre selon les rapports de celui_ci <strong>Bonus de <font color="green"><?php echo $list_quinte['rapport_coupler_gagnant'] ; ?></font> points !</strong>
<?php } ?>
</strong>
</div></div> </div>
<!--</div>
END DEFAULT DATATABLE -->
<!-- END PAGE CONTAINER --></div>
<!-- ##### FENETRE MODAL SAISIE PRONOSTIQUE ##### -->
<div class="modal fade" id="saisir_prono" tabindex="-1" data-sound="alert" role="dialog" aria-labelledby="exampleModalLabel">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
<h4 class="modal-title" id="exampleModalLabel">Saisie de votre Pronostique pour ce Quinté du <?php echo ''.$list_quinte['date_quinte_heure'].'';?></h4>
</div><div class="fenetre_modal_position">
<form action="Ajout_prono.php?pronostique=<?php echo ''.$list_quinte['REFERENCE_QUINTE'].''; ?>" method="post" >
<?php
if($list_quinte['NP1'] !=0 ) {echo '<h3><span class="label label-danger"><span class="glyphicon glyphicon-exclamation-sign" aria-hidden="true"></span> Non partant</span> <span class="label label-danger">'.$list_quinte['NP1'].'</span>';}
if($list_quinte['NP2'] !=0 ) {echo ' <span class="label label-danger"> '.$list_quinte['NP2'].'</span>';}
if($list_quinte['NP3'] !=0 ) {echo ' <span class="label label-danger"> '.$list_quinte['NP3'].' </span></h3>';}
?>
<table border="5" align="center" class="table table-hover" id="bootstrap-table">
<thead>
<tr>
<th width="4%"><img name="coupe" src="img/cheval_jeux.png" width="40" height="40"><input type="text" name="CH1" style="width:40px;height:20;" maxlength="2" class="form-control" id="recipient-name" required></th>
<th width="4%"><img name="coupe" src="img/cheval_jeux.png" width="40" height="40"><input type="text" name="CH2" style="width:40px;height:20;" maxlength="2" class="form-control" id="recipient-name" required></th>
<th width="4%"><img name="coupe" src="img/cheval_jeux.png" width="40" height="40"><input type="text" name="CH3" style="width:40px;height:20;" maxlength="2" class="form-control" id="recipient-name" required></th>
<th width="4%"><img name="coupe" src="img/cheval_jeux.png" width="40" height="40"><input type="text" name="CH4" style="width:40px;height:20;" maxlength="2" class="form-control" id="recipient-name" required></th>
</tr>
</thead>
<table border="5" align="center" class="table table-hover" id="bootstrap-table">
<thead>
<tr>
<th width="4%"><img name="coupe" src="img/cheval_jeux.png" width="40" height="40"><input type="text" name="CH5" style="width:40px;height:20;" maxlength="2" class="form-control" id="recipient-name" required></th>
<th width="4%"><img name="coupe" src="img/cheval_jeux.png" width="40" height="40"><input type="text" name="CH6" style="width:40px;height:20;" maxlength="2" class="form-control" id="recipient-name" required></th>
<th width="4%"><img name="coupe" src="img/cheval_jeux.png" width="40" height="40"><input type="text" name="CH7" style="width:40px;height:20;" maxlength="2" class="form-control" id="recipient-name" required></th>
<th width="4%"><img name="coupe" src="img/cheval_jeux.png" width="40" height="40"><input type="text" name="CH8" style="width:40px;height:20;" maxlength="2" class="form-control" id="recipient-name" required></th>
</tr>
</thead>
</table>
<table border="5" align="center" class="table table-hover" id="bootstrap-table">
<h3><span class = "label label-info" >Les regrets ne seront que pris en compte que si un non partant officiel.</ span></h3>
<h3><span class = "label label-info" >Les doublons sont détectés dans le pronostique et aussi dans le premier regret</ span></h3>
<thead>
<tr>
<th width="4%"><img name="coupe" src="img/nonpartant.png" width="40" height="40"><input type="text" name="REGRET1" style="width:50px;height:20;" maxlength="2" class="form-control" id="recipient-name" required>Regret 1</th>
<th width="4%"><img name="coupe" src="img/nonpartant.png" width="40" height="40"><input type="text" name="REGRET2" style="width:50px;height:20;" maxlength="2" class="form-control" id="recipient-name" required>Regret 2</th>
<th width="4%"><img name="coupe" src="img/nonpartant.png" width="40" height="40"><input type="text" name="REGRET3" style="width:50px;height:20;" maxlength="2" class="form-control" id="recipient-name" required>Regret 3</th>
</tr>
</thead>
</table>
<span class="label label-danger">Merci de vérifier votre saisie avant de valider votre pronostique</span>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Fermer cette fenêtre</button>
<button type="submit" class="btn btn-primary"><?php echo ''.$_SESSION['login'].''; ?> : Valider votre pronostique Quinté</button>
</form></div></div>
</div>
</div>
</div>
<!-- ##### FENETRE MODAL MODIFIER PRONOSTIQUE ##### -->
<?php
#############################################
# CONNEXION AU SERVEUR BASES DE DONNEES #
#############################################
require('connect_bdd.php');
// ON CHERCHE LE PARTICIPANT PAR SON ID_USER //
$recherche_prono_jour = mysqli_query($bdd, "SELECT * FROM Prono_Turf WHERE REFERENCE_QUINTE='$REFERENCE_QUINTE' and PARTICIPANT='$id_user'");
$data_participant = mysqli_fetch_array($recherche_prono_jour);
// ON FERME LA BASE DES DONNEES //
mysqli_close($bdd);
?>
<div class="modal fade" id="modifierprono" tabindex="-1" data-sound="alert" role="dialog" aria-labelledby="exampleModalLabel">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
<h4 class="modal-title" id="exampleModalLabel">Saisie de votre Pronostique pour ce Quinté du <?php echo ''.$list_quinte['date_quinte_heure'].'';?></h4>
</div><div class="fenetre_modal_position">
<form action="modifierprono.php?pronostique=<?php echo ''.$list_quinte['REFERENCE_QUINTE'].''; ?>" method="post" >
<?php
if($list_quinte['NP1'] !=0 ) {echo '<h3><span class="label label-danger"><span class="glyphicon glyphicon-exclamation-sign" aria-hidden="true"></span> Non partant</span> <span class="label label-danger">'.$list_quinte['NP1'].'</span>';}
if($list_quinte['NP2'] !=0 ) {echo ' <span class="label label-danger"> '.$list_quinte['NP2'].'</span>';}
if($list_quinte['NP3'] !=0 ) {echo ' <span class="label label-danger"> '.$list_quinte['NP3'].' </span></h3>';}?>
<table border="5" align="center" class="table table-hover" id="bootstrap-table">
<thead>
<tr>
<th width="4%"><img name="coupe" src="img/cheval_jeux.png" width="40" height="40"><input type="text" name="CH1" style="width:40px;height:20;" value="<?php echo $data_participant['CH1'];?>" maxlength="2" class="form-control" id="recipient-name"></th>
<th width="4%"><img name="coupe" src="img/cheval_jeux.png" width="40" height="40"><input type="text" name="CH2" style="width:40px;height:20;" value="<?php echo ''.$data_participant['CH2'].'';?>" maxlength="2" class="form-control" id="recipient-name"></th>
<th width="4%"><img name="coupe" src="img/cheval_jeux.png" width="40" height="40"><input type="text" name="CH3" style="width:40px;height:20;" value="<?php echo ''.$data_participant['CH3'].'';?>" maxlength="2" class="form-control" id="recipient-name"></th>
<th width="4%"><img name="coupe" src="img/cheval_jeux.png" width="40" height="40"><input type="text" name="CH4" style="width:40px;height:20;" value="<?php echo ''.$data_participant['CH4'].'';?>" maxlength="2" class="form-control" id="recipient-name"></th>
</tr>
</thead>
<table border="5" align="center" class="table table-hover" id="bootstrap-table">
<thead>
<tr>
<th width="4%"><img name="coupe" src="img/cheval_jeux.png" width="40" height="40"><input type="text" name="CH5" style="width:40px;height:20;" value="<?php echo ''.$data_participant['CH5'].'';?>" maxlength="2" class="form-control" id="recipient-name"></th>
<th width="4%"><img name="coupe" src="img/cheval_jeux.png" width="40" height="40"><input type="text" name="CH6" style="width:40px;height:20;" value="<?php echo ''.$data_participant['CH6'].'';?>" maxlength="2" class="form-control" id="recipient-name"></th>
<th width="4%"><img name="coupe" src="img/cheval_jeux.png" width="40" height="40"><input type="text" name="CH7" style="width:40px;height:20;" value="<?php echo ''.$data_participant['CH7'].'';?>" maxlength="2" class="form-control" id="recipient-name"></th>
<th width="4%"><img name="coupe" src="img/cheval_jeux.png" width="40" height="40"><input type="text" name="CH8" style="width:40px;height:20;" value="<?php echo ''.$data_participant['CH8'].'';?>" maxlength="2" class="form-control" id="recipient-name"></th>
</tr>
</thead>
</table>
<table border="5" align="center" class="table table-hover" id="bootstrap-table">
<thead>
<tr>
<th width="4%"><img name="coupe" src="img/nonpartant.png" width="40" height="40"><input type="text" name="REGRET1" style="width:40px;height:20;" value="<?php echo ''.$data_participant['REGRET1'].'';?>" maxlength="2" class="form-control" id="recipient-name">Regret 1</th>
<th width="4%"><img name="coupe" src="img/nonpartant.png" width="40" height="40"><input type="text" name="REGRET2" style="width:40px;height:20;" value="<?php echo ''.$data_participant['REGRET2'].'';?>" maxlength="2" class="form-control" id="recipient-name">Regret 2</th>
<th width="4%"><img name="coupe" src="img/nonpartant.png" width="40" height="40"><input type="text" name="REGRET3" style="width:40px;height:20;" value="<?php echo ''.$data_participant['REGRET3'].'';?>" maxlength="2" class="form-control" id="recipient-name">Regret 3</th>
<h3><span class = "label label-info" >Les regrets ne seront que pris en compte que si un non partant officiel.</ span></h3>
<h3><span class = "label label-info" >Les doublons sont détectés dans le pronostique et aussi dans le premier regret</ span></h3>
</tr>
</thead>
</table>
<h3><span class="label label-danger">Merci de vérifier votre saisie avant de valider votre pronostique</span></h3>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Fermer cette fenêtre</button>
<button type="submit" class="btn btn-primary"><?php echo ''.$_SESSION['login'].''; ?> : Valider votre pronostique Quinté</button>
</form></div></div>
</div>
</div>
</div>
<!-- Modifier Tuyau des pistes -->
<div class="modal fade info" id="modifiertuyau" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<?php
require('connect_bdd.php');
$modifiertuyau = mysqli_query($bdd,"SELECT * FROM Tuyaux_des_pistes WHERE ref_quinte=$REFERENCE_QUINTE");
$dataTP = mysqli_fetch_array($modifiertuyau);
?>
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h4 class="modal-title"><span class="glyphicon glyphicon-stats"></span> Modifier le Tuyau des pistes n° <?php echo $dataTP['id_dm']; ?></h4>
</div>
<div class="modal-body">
<form action="Modifier_TP.php?refTP=<?php echo $dataTP['id_dm']; ?>" method="post" >
<div class="row row-sm-offset">
<div class="col-xs-12 col-md-2">
<div class="form-group">
<label class="form-control-label">N° du cheval<span class="form-asterisk">*</span></label>
<input type="text" class="form-control numero_ajoutdm" name="numero" value="<?php echo $dataTP['numero']; ?>" maxlength="2">
</div>
</div>
<div class="col-xs-12 col-md-4">
<div class="form-group">
<label class="form-control-label">Nom du cheval<span class="form-asterisk">*</span></label>
<input type="text" class="form-control nomcheval_ajoutdm" name="nomcheval" value="<?php echo $dataTP['nomcheval']; ?>" required>
</div>
</div>
<div class="col-xs-12 col-md-2">
<div class="form-group">
<label class="form-control-label">Cote actuelle<span class="form-asterisk">*</span></label>
<input type="text" class="form-control numero_ajoutdm" name="cote" value="<?php echo $dataTP['cote']; ?>" required data-form-field="cote" maxlength="3">
</div>
</div>
</div>
<div class="form-group">
<label class="form-control-label" for="form1-0-message">Votre Message</label>
<textarea class="form-control" name="message_tp" rows="4" value="<?php echo $dataTP['numessage_tp']; ?>" data-form-field="Message"><?php echo $dataTP['message_tp']; ?></textarea>
</div>
</div>
<div class="modal-footer">
<button type="submit" class="btn btn-primary">Valider la modification</button>
</div>
</form>
</div>
</div>
</div>
<!-- ##### FENETRE MODAL MODIFIER QUINTE ##### -->
<div class="modal fade" id="modifierquinte" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
<h4 class="modal-title" id="exampleModalLabel">Modifier les informations du Quinté ,référence : <?php echo ''.$list_quinte['REFERENCE_QUINTE'].''; ?></h4>
</div>
<div class="modal-body">
<form action="Modifier_Quinte.php?mod_quinte=<?php echo ''.$list_quinte['REFERENCE_QUINTE'].''; ?>" method="post" >
<div class="form-group">
<label for="recipient-name" class="control-label"><i class="glyphicon glyphicon-user"></i>Détails sur le Quinté</label>
<input type="text" name="coursepmu" value="<?php echo ''.$list_quinte['coursepmu'].'';?>" class="form-control" id="recipient-name">
</div>
<div class="form-group">
<label for="recipient-name" class="control-label"><i class="glyphicon glyphicon-play-cercle"></i>Style Epreuve</label>
<select class="form-control" name="epreuve">
<option value="<?php echo ''.$list_quinte['epreuve'].'';?>" selected="selected"><?php echo ''.$list_quinte['epreuve'].'';?></option>
<option value="1">Attelè quinté du jour</option>
<option value="5">Attelè quinté demain</option>
<option value="2">Plat quinté du jour</option>
<option value="7">Plat quinté demain</option>
<option value="3">Haie quinté du jour</option>
<option value="6">Haie quinté demain</option>
<option value="4">Steeple</option>
</select>
</div>
<div class="form-group"><label class="control-label">Informations sur le Quinté</label>
<textarea class="form-control" name="Infos" value="<?php echo ''.$list_quinte['Infos'].'';?>"><?php echo ''.$list_quinte['Infos'].'';?></textarea>
</div>
<div class="form-group"><label class="control-label">Etat du Terrain</label>
<textarea class="form-control" name="Meteo" value="<?php echo ''.$list_quinte['Meteo'].'';?>"><?php echo ''.$list_quinte['Meteo'].'';?></textarea>
</div>
<div class="form-group">
<label for="recipient-name" class="control-label"><i class="glyphicon glyphicon-user"></i>Nombre de partant</label>
<input type="text" name="NB_Partant" value="<?php echo ''.$list_quinte['NB_Partant'].'';?>"class="form-control" id="recipient-name" required>
</div>
<div class="form-group">
<label for="message-text" type="date" class="control-label"><i class="glyphicon glyphicon-envelope"></i> Date du Quinté et Heure de départ (Ex 2016-02-14 13:50)</label>
<input type="text" name="Date_du_quinte" value="<?php echo ''.$list_quinte['Date_du_quinte'].'';?>" class="form-control" id="recipient-name">
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Fermer cette fenêtre</button>
<button type="submit" class="btn btn-primary">Valider la modification</button>
</form></div>
</div>
</div>
</div>
<!-- ##### FENETRE MODAL SAISIE PRONOSTIQUE #####
<div class="modal fade" id="equidia" tabindex="-1" data-sound="alert" role="dialog" aria-labelledby="exampleModalLabel">
<div class="modal-dialog" role="document">-->
<div id="equidia" class="modal modal-wide fade" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
<h4 class="modal-title" id="exampleModalLabel">Commentaire Equidia : Quinté du <?php echo ''.$list_quinte['date_quinte_heure'].'';?></h4>
</div>
<div class="equidia">
<p class="list-group-item-text" align="justify"><?php echo nl2br(utf8_decode($equidia));?></p>
</div>
</div>
</div>
</div>
<!-- ##### FENETRE MODAL AJOUT TUYAU DES PISTES ##### -->
<div class="modal fade" id="modif_TP" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
<h4 class="modal-title" id="exampleModalLabel">Modifier fiche du Tuyau des pistes référence quinté <strong><?php echo ''.$list_quinte['REFERENCE_QUINTE'].''; ?></strong></h4>
</div>
<div class="modal-body">
<form action="ModifierTP.php?ref_quinte=<?php echo ''.$list_quinte['REFERENCE_QUINTE'].''; ?>" method="post" >
<div class="form-group">
<label for="recipient-name" class="control-label"><i class="glyphicon glyphicon-user"></i>Nom du cheval</label>
<input type="text" name="nomcheval" value="<?php echo ''.$tuyaupiste['nomcheval'].'' ; ?>" class="form-control" id="recipient-name">
</div>
<div class="form-group">
<label for="recipient-name" class="control-label"><i class="glyphicon glyphicon-user"></i>Numéro du cheval</label>
<input type="text" name="numero" value="<?php echo ''.$tuyaupiste['numero'].'' ; ?>" class="form-control" id="recipient-name" required>
</div>
<div class="form-group">
<label for="recipient-name" class="control-label"><i class="glyphicon glyphicon-user"></i>Cote</label>
<input type="text" name="cote" value="<?php echo ''.$tuyaupiste['cote'].'' ; ?>" class="form-control" id="recipient-name" required>
</div>
<div class="form-group"><label class="control-label">Commentaire</label>
<textarea class="form-control" value="<?php echo ''.$tuyaupiste['message_tp'].'' ; ?>" name="message_tp"><?php echo ''.$tuyaupiste['message_tp'].'' ; ?></textarea>
</div>
<div class="form-group">
<label for="recipient-name" class="control-label"><i class="glyphicon glyphicon-user"></i>Résultat au quinté</label>
<input type="text" name="resultat" value="<?php echo ''.$tuyaupiste['résultat'].'' ; ?>" class="form-control" id="recipient-name" required>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Fermer cette fenêtre</button>
<button type="submit" class="btn btn-primary">Valider votre le Tuyau des piste</button>
</form></div>
</div>
</div>
</div>
<!-- MESSAGE BOX-->
<div class="message-box animated fadeIn" data-sound="alert" id="mb-signout">
<div class="mb-container">
<div class="mb-middle">
<div class="mb-title"><span class="fa fa-sign-out"></span> Log <strong>Out</strong> ?</div>
<div class="mb-content">
<p>Are you sure you want to log out?</p>
<p>Press No if youwant to continue work. Press Yes to logout current user.</p>
</div>
<div class="mb-footer">
<div class="pull-right">
<a href="pages-login.html" class="btn btn-success btn-lg">Yes</a>
<button class="btn btn-default btn-lg mb-control-close">No</button>
</div>
</div>
</div><div class="footer"> <strong>Copyright (c) 2016 , Michel mise à jour le 12/05/2018 : <a href="https://www.turf-passion.fr/">www.turf-passion.fr</a>.</strong> </div>
</div>
</div>
<!-- END MESSAGE BOX-->
<!-- START PRELOADS -->
<audio id="audio-alert" src="audio/alert.mp3" preload="auto"></audio>
<audio id="audio-fail" src="audio/fail.mp3" preload="auto"></audio>
<!-- END PRELOADS -->
<!-- START SCRIPTS -->
<!-- START PLUGINS -->
<!-- <script type="text/javascript" src="js/plugins/jquery/jquery.min.js"></script>-->
<script type="text/javascript">
$(document).ready(function() {
// load messages every 1000 milliseconds from server.
load_data = {'fetch':1};
window.setInterval(function(){
$.post('shout.php', load_data, function(data) {
$('.message_box').html(data);
var scrolltoh = $('.message_box')[0].scrollHeight;
$('.message_box').scrollTop(scrolltoh);
});
}, 10000);
//method to trigger when user hits enter key
$("#shout_message").keypress(function(evt) {
if(evt.which == 13) {
var iusername = $('#shout_username').val();
var imessage = $('#shout_message').val();
post_data = {'username':iusername, 'message':imessage};
//send data to "shout.php" using jQuery $.post()
$.post('shout.php', post_data, function(data) {
function mySoNiceSound(s)
{
var e=document.createElement('audio');
e.setAttribute('src',s);
e.play();
}
mySoNiceSound('audio/sf_chabadabada.mp3');
//append data into messagebox with jQuery fade effect!
$(data).hide().appendTo('.message_box').fadeIn();
//keep scrolled to bottom of chat!
var scrolltoh = $('.message_box')[0].scrollHeight;
$('.message_box').scrollTop(scrolltoh);
//reset value of message box
$('#shout_message').val('');
}).fail(function(err) {
//alert HTTP server error
alert(err.statusText);
});
}
});
//toggle hide/show shout box
$(".close_btn").click(function (e) {
//get CSS display state of .toggle_chat element
var toggleState = $('.toggle_chat').css('display');
//toggle show/hide chat box
$('.toggle_chat').slideToggle();
//use toggleState var to change close/open icon image
if(toggleState == 'block')
{
$(".header div").attr('class', 'open_btn');
}else{
$(".header div").attr('class', 'close_btn');
}
});
});
</script>
<!-- <script type="text/javascript" src="js/plugins/jquery/jquery-ui.min.js"></script>-->
<script type="text/javascript" src="js/plugins/bootstrap/bootstrap.min.js"></script>
<!-- END PLUGINS -->
<!-- THIS PAGE PLUGINS -->
<script type='text/javascript' src='js/plugins/icheck/icheck.min.js'></script>
<script type="text/javascript" src="js/plugins/mcustomscrollbar/jquery.mCustomScrollbar.min.js"></script>
<script type="text/javascript" src="js/plugins/datatables/jquery.dataTables.min.js"></script>
<!-- END PAGE PLUGINS -->
<!-- START TEMPLATE
<script type="text/javascript" src="js/settings.js"></script>-->
<!-- END TEMPLATE -->
<!-- START PRELOADS -->
<audio id="audio-alert" src="audio/alert.mp3" preload="auto"></audio>
<audio id="audio-fail" src="audio/fail.mp3" preload="auto"></audio>
<!-- END PRELOADS -->
<!-- START SCRIPTS -->
<!-- START THIS PAGE PLUGINS-->
<!-- --><script type="text/javascript" src="js/plugins/scrolltotop/scrolltopcontrol.js"></script>
<script type="text/javascript" src="js/plugins/morris/raphael-min.js"></script>
<script type="text/javascript" src="js/plugins/morris/morris.min.js"></script>
<script type="text/javascript" src="js/plugins/rickshaw/d3.v3.js"></script>
<script type="text/javascript" src="js/plugins/rickshaw/rickshaw.min.js"></script>
<script type='text/javascript' src='js/plugins/jvectormap/jquery-jvectormap-1.2.2.min.js'></script>
<script type='text/javascript' src='js/plugins/jvectormap/jquery-jvectormap-world-mill-en.js'></script>
<script type='text/javascript' src='js/plugins/bootstrap/bootstrap-datepicker.js'></script>
<script type="text/javascript" src="js/plugins/owl/owl.carousel.min.js"></script>
<script type="text/javascript" src="js/faq.js"></script>
<script type="text/javascript" src="js/plugins/moment.min.js"></script>
<!-- <script type="text/javascript" src="js/plugins/daterangepicker/daterangepicker.js"></script>-->
<script src="assets/countdown/jquery.countdown.min.js"></script>
<script src="assets/countdown/jquery.countdown-fr.js"></script>
<!-- END THIS PAGE PLUGINS-->
<!-- START TEMPLATE -->
<!-- <script type="text/javascript" src="js/settings.js"></script>-->
<script type="text/javascript" src="js/plugins.js"></script>
<script type="text/javascript" src="js/actions.js"></script>
<!-- <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8/jquery.min.js"></script>
<script type="text/javascript" src="inlinemod_partant.js"></script>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8/jquery.min.js"></script> -->
<script type="text/javascript" src="inlinemod_partant.js"></script>
<!-- <script type="text/javascript" src="delete_messagerie.js"></script>-->
<script>
$(document).ready(function() {
$('.supprimer').click(function(){
var id = $(this).attr("id");
$.ajax({
type: "POST",
url: "delete_messagerie.php",
data: {id: id},
success: function(data){
//alert('SUCCES : Cette fiche vidéo a bien été mise en attente pour Upload , Merci.');
$('#delete_message').html('<span style="font-family:arial;color:red;font-size:16px;"><img src="img/loading1.gif" width="30" height="30" align="absmiddle"></img> <strong> Prise en compte du message supprimé ! </strong></p>');
var timeout = null;
setInterval(function () {
if ( serverReachable ()) {
if (timeout === null) {
timeout = setInterval(function(){window.location.href = "";},5000);
}
} else {
clearTimeout(timeout);
timeout = null;
// ...
}
}, 250);
function serverReachable() {
var x = new ( window.ActiveXObject || XMLHttpRequest )( "Microsoft.XMLHTTP" ),
s;
x.open(
"HEAD",
"//" + window.location.hostname + "/?rand=" + Math.random(),
false
);
try {
x.send();
s = x.status;
return ( s >= 200 && s < 300 || s === 304 );
} catch (e) {
return false;
}
}
if(data==1){
alert('Ok sa marche');
}
}
});
});
});
</script>
<?php if($id_user ==1 or $id_user ==1304 or $id_user ==348 or $id_user ==162 or $id_user ==1310 ){ ?>
<script type="text/javascript" src="inlinemod_prono.js"></script>
<?php } ?>
<?php if($id_user ==1){ ?>
<script type="text/javascript" src="inlinemod_prono5.js"></script>
<?php } ?>
<script>
setInterval('notification()',2000)
function notification() {
$('#notification'). load('affiche_notification.php');
}
</script>
<?php if($list_quinte['Quinte_ouvert'] ==1) { ?>
<script>
setInterval('challengeprono()',60000)
function challengeprono() {
$('#challengeprono'). load('challengeprono.php?selection_refquinte=<?php echo $REFERENCE_QUINTE ; ?>');
}
</script>
<?php } ?>
<?php if($list_quinte['Quinte_ouvert'] ==1) { ?>
<script>
setInterval('prono_espoir()',5000)
function prono_espoir() {
$('#prono_espoir'). load('affiche_prono_espoir.php?selection_refquinte=<?php echo $REFERENCE_QUINTE ; ?>');
}
</script>
<?php } ?>
<script>
setInterval('nonpartant()',2000)
function nonpartant() {
$('#nonpartant'). load('nonpartant.php?selection_refquinte=<?php echo $REFERENCE_QUINTE; ?>');
}
</script>
<?php $REFERENCE_QUINTE_JOUR = date("dmY");
if ($REFERENCE_QUINTE_JOUR == $REFERENCE_QUINTE){ ?>
<script>
setInterval('loadsituationcourse()',2000)
function loadsituationcourse() {
$('#chargementcourse'). load('loadfermeture.php?selection_refquinte=<?php echo $REFERENCE_QUINTE_JOUR ;?>');
}
</script>
<?php } ?>
<script>
setInterval('compteprono()',2000)
function compteprono() {
$('#compteprono'). load('compteprono?selection_refquinte=<?php echo $REFERENCE_QUINTE;?>.php');
}
</script>
<?php // SI QUINTE DU JOUR SEULEMENT SINON ON PASSE //
$REFERENCE_QUINTE_JOUR = date("dmY");
if ($REFERENCE_QUINTE_JOUR == $REFERENCE_QUINTE){ ?>
<!-- <script>
setInterval('fermetureprono()',2000)
function fermetureprono() {
$('#fermetureprono'). load('fermetureprono.php');
}
</script>-->
<script>
$(document).ready(function(){
$(a.tooltip-test).mouseover(function(){
$(this).tooltip(show);
});
});
</script>
<?php } ?>
<!-- END SCRIPTS -->
<?php //} ?>
</body>
</html> |
Partager