File size: 1.09Kb
<?php
// модуль регистрации
include "config.inc.php";
include "unicode.lib.php";
include "header.php";
$name = trim($name); $url = trim($url); $description = trim($description);
if ($mycon = mysql_connect($db_host,$db_user,$db_pass)) {
if($mybase = mysql_select_db($db_name, $mycon)) {
if($db_query = mysql_query("select date,views,today from $table_wapcat where name='$name'", $mycon)) {
$user_array = mysql_fetch_row($db_query);
$date = $user_array[0];
$views = $user_array[1];
$today = $user_array[2];
if($date == date("d.m.Y",time())) {
mysql_query("where name='$name'");
}
else {
print "<card id=\"wstat\" title=\"w-stat\">\n";
print "<p>";
print ($i+1).". <a href=\"".$url."\">".$url."</a><br/>";
print utf_encode("Сегодня: ".$today."<br/>");
print utf_encode("Всего: ".$views."<br/>");
print utf_encode("Описание: ".$description."<br/>");
print "<a href=\"index.php\">".utf_encode("Главная")."</a>\n";
print "</p></card>";
}
@mysql_close();
include "footer.php";
?>