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
| <?php require_once('Connections/ConnexionMYSQL.php'); ?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
if (PHP_VERSION < 6) {
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
}
$theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($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;
}
}
mysql_select_db($database_ConnexionMYSQL, $ConnexionMYSQL);
$query_RsCalendar = "SELECT `match`.`MATCH_ID`, `match`.`TYPE_MATCH_ID`, DATE_FORMAT(`match`.`MATCH_DATE`, '%d/%m/%Y') AS `MATCH_DATE`, `match`.`MATCH_TIME`, `match`.`MATCH_PLAY`, `match`.`MATCH_DOM_TEAM_ID`, `team`.`TEAM_NAME` AS `MATCH_DOM_TEAM_NAME`, `match`.`MATCH_EXT_TEAM_ID`, `team1`.`TEAM_NAME` AS `MATCH_EXT_TEAM_NAME`, `type_match`.`TYPE_MATCH_DESC`, `type_match`.`TYPE_MATCH_ID` FROM `match` INNER JOIN `type_match` ON (`match`.`TYPE_MATCH_ID` = `type_match`.`TYPE_MATCH_ID`) INNER JOIN `team` ON (`match`.`MATCH_DOM_TEAM_ID` = `team`.`TEAM_ID`) INNER JOIN `team` `team1` ON (`match`.`MATCH_EXT_TEAM_ID` = `team1`.`TEAM_ID`)";
$RsCalendar = mysql_query($query_RsCalendar, $ConnexionMYSQL) or die(mysql_error());
$row_RsCalendar = mysql_fetch_assoc($RsCalendar);
$totalRows_RsCalendar = mysql_num_rows($RsCalendar);
?>
<!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 src="js/jquery-1.8.2.js" type="text/javascript"></script>
<script src="js/jquery.dataTables.js" type="text/javascript"></script>
<script type="text/javascript" src="js/jquery-ui-1.9.1.custom.min.js"></script>
<script type="text/javascript" charset="utf-8">
$(document).ready( function () {
$('#datatables').dataTable( {
"bJQueryUI":true, // Specifie si on utilise un theme
"bPaginate": false, //permet la pagination de la page
"BLengthChange": true,
"Bfilter": true,
"BSort": true,
//"sPaginationType":"full_numbers", // Type de pagination fleche ou nombres
"aaSorting":[[0, "asc"]],
"aoColumns": [
{ "sType": "date" },
null,
null,
null
]
} );
} );
</script>
<style type="text/css">
@import "css/ui-darkness/jquery-ui-1.9.1.custom.css";
@import "css/demo_table.css";
.dataTables_info { padding-top: 0; }
.dataTables_paginate { padding-top: 0; }
.css_right { float: right; }
#example_wrapper .fg-toolbar { font-size: 0.8em }
#theme_links span { float: left; padding: 2px 10px; }
</style>
<style>
*{
font-family: arial;
}
</style>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>test</title>
</head>
<body>
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="display" id="datatables">
<thead>
<tr>
<th>Date</th>
<th>Heure</th>
<th>Rencontres</th>
<th>Compétition</th>
</tr>
</thead>
<tbody>
<?php do { ?>
<tr height="20px" style="text-align:center">
<td><?php echo $row_RsCalendar['MATCH_DATE']; ?></td>
<td><?php echo $row_RsCalendar['MATCH_TIME']; ?></td>
<td><?php echo $row_RsCalendar['MATCH_DOM_TEAM_NAME']; ?> VS <?php echo $row_RsCalendar['MATCH_EXT_TEAM_NAME']; ?></td>
<td><?php echo $row_RsCalendar['TYPE_MATCH_DESC']; ?></td>
</tr>
<?php } while ($row_RsCalendar = mysql_fetch_assoc($RsCalendar)); ?>
</tbody>
<tfoot>
<tr><th colspan="4"> </th></tr>
</tfoot>
</table>
</body>
</html>
<?php
mysql_free_result($RsCalendar);
?> |
Partager