Skip to content

Instantly share code, notes, and snippets.

@truelecter
Created October 12, 2014 13:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save truelecter/c15e44e574f85fc83926 to your computer and use it in GitHub Desktop.
Save truelecter/c15e44e574f85fc83926 to your computer and use it in GitHub Desktop.
<!DOCTYPE html >
<html>
<head>
<title>Selection</title>
<meta http-equiv="content-type" content="text/html;charset=utf-8" />
</head>
<body>
<?
$link = mysql_connect('mysql.hostinger.ru','u885629350_roooo','123456');
mysql_select_db('u885629350_usic');
mysql_set_charset('utf8');
$r = 0;
if (isset($HTTP_POST_VARS[range])){
$r = time() - $HTTP_POST_VARS[range];
}
if (isset($HTTP_POST_VARS[typeF])){
$t = $HTTP_POST_VARS[typeF];
$res = mysql_query("SELECT * FROM `usicMoney` WHERE type='$t'");
} else {
$res = mysql_query("SELECT * FROM `usicMoney`");
}
echo "<table>";
echo '<tr>
<td>
<div class="cell">ПІБ</div>
</td>
<td>
<div class="cell">Кошти</div>
</td>
<td>
<div class="cell">Тип каси</div>
</td>
<td>
<div class="cell" >Дата та час</div>
</td>
<td>
<div class="cell">Примітка</div>
</td>
<td>
<div class="cell">timeStamp</div>
</td>
<td>
<div class="cell">id</div>
</td>
</tr>';
while ($row = mysql_fetch_array($res))
if ($row["timeStamp"] > $r){
echo "<tr><td>", $row["name"], "</td><td>", $row["money"], "</td><td>", $row["type"], "</td><td>", $row["dateTime"], "</td><td>", $row["comment"], "</td><td>", $row["timeStamp"], "</td><td>", $row["id"], "</td></tr>";
}
echo "</table>";
?></br>
<a href="index.php">return</a>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment