Witam, dziś zacząłem swoją przygodę z JS posiadam pewien problem, nie wiem czy to dobrze wykonałem ale nie chce wyświetlić strony
<script type="text/javascript" src="http://www.google.com/jsapi"></script>
<script type="text/javascript">
google.load('visualization', '1.1', {packages: ['controls']});
</script>
<script type="text/javascript">
function drawVisualization() {
// Prepare the data.
var data = google.visualization.arrayToDataTable([
['Nick', 'Admin','Powod','Data','Odbanowany za:'],
<?
$i = 0;
{
$i++;
$id_admin = mysql_query("SELECT * FROM `Players` WHERE `id` = '{$row['admin']}'");
if($i==$ileper['count(*)'])
{
if($row['time'] == NULL)
{
[$row['name'],$admins['Nick'],$row['reason'],$row['date'],'Pernamentny']
}
else
{
if($row['czas_unix'] > time()) {
?>
[$row['name'],$admins['Nick'],$row['reason'],$row['date'],$row['time']]
<? }
}
}
else
{
if($row['time'] == NULL)
{
?>
[$row['name'],$admins['Nick'],$row['reason'],$row['date'],'Pernamentny'],
<?
}
else
{
if($row['czas_unix'] > time()) {
?>
[$row['name'],$admins['Nick'],$row['reason'],$row['date'],$row['time']],
<?
}
}
}
}
?>
]);
// Define a StringFilter control for the 'Name' column
var stringFilter = new google.visualization.ControlWrapper({
'controlType': 'StringFilter',
'containerId': 'control1',
'options': {
'filterColumnLabel': 'Nick'
}
});
// Define a table visualization
var table = new google.visualization.ChartWrapper({
'chartType': 'Table',
'containerId': 'chart1',
'options': {'height': '13em', 'width': 'auto'}
});
// Create the dashboard.
var dashboard = new google.visualization.Dashboard(document.getElementById('dashboard')).
// Configure the string filter to affect the table contents
bind(stringFilter, table).
// Draw the dashboard
draw(data);
}
google.setOnLoadCallback(drawVisualization);
</script>