Пример #1
0
function insertScore($username, $points)
{
    $position = getPosition($points);
    $connection = dbConnect();
    $username = empty($username) ? null : $username;
    $sql = "INSERT INTO punteggi( utente, punti, posizione ) VALUES(\"" . $username . "\",\"" . $points . "\",\"" . $position . "\")";
    mysql_query($sql) or die("Errore durante la query SQL: " . mysql_error());
    mysql_close($connection);
    printScores($username, $points);
}
Пример #2
0
h1 {
	font-family: Arial, Helvetica, sans-serif;
	text-align: center;
}
.scores {
	margin-left: auto;
	margin-right: auto;
}
/* some garbage auto generated table style*/
.datagrid table { border-collapse: collapse; text-align: left; width: 100%; } .datagrid {font: normal 12px/150% Arial, Helvetica, sans-serif; background: #fff; overflow: hidden; border: 1px solid #000000; }.datagrid table td, .datagrid table th { padding: 5px 5px; }.datagrid table thead th {background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #999999), color-stop(1, #8F8F8F) );background:-moz-linear-gradient( center top, #999999 5%, #8F8F8F 100% );filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#999999', endColorstr='#8F8F8F');background-color:#999999; color:#FFFFFF; font-size: 15px; font-weight: bold; border-left: 1px solid #D1D1D1; } .datagrid table thead th:first-child { border: none; }.datagrid table tbody td { color: #000000; border-left: 1px solid #D1D1D1;font-size: 12px;font-weight: normal; }.datagrid table tbody .alt td { background: #F4F4F4; color: #000000; }.datagrid table tbody td:first-child { border-left: none; }.datagrid table tbody tr:last-child td { border-bottom: none; }
</style>
</head>
<body>
<h1>ArcTetris HighScores</h1>
<div class="datagrid">
<table>
<thead>
<tr>
<th>Rank</th>
<th>Name</th>
<th>Score</th>
</tr>
</thead>
<?php 
printScores();
?>
</table>
</div>
</body>
</html>