Dear diary,
MYSQL_connect("localhost","narudiary","keitarooo");
//MYSQL_connect("192.168.0.2","root","");
//MYSQL_connect("localhost",root,"");
@mysql_select_db("narudiary");
if ($submitted == "true" && $nom != "online poker" && $nom != "viagra" && $nom != "debt consolidation") {
if (substr($comments,0,1) == "<" || substr($url,0,4) == "NY") die;
$myquery = "INSERT INTO gbook VALUES ('$nom','$email','$homepage','$comments','$referrer', '$date', '$ipadress', '$rooms');";
$queryresult = MYSQL_QUERY($myquery);
Print "
An old client just registered! I sorted the records by date, so I can easily see who recently registered! Isn't that wonderful? If I don't get into Tokyo U with that... :)";}
else {
print "
Hehe, I just found the Client Register of Hinata-sou at Haruka-san's place. When I think about all the people who slept in my room in the past... brr!
I brought it here and recopied everything in my diary, so I can keep traces of it! If people already came at Hinata-sou before and don't see their name here, they should add it here!";}
?>
Naru Narusegawa
$myquery = "SELECT gbook_rooms.room, gbook_rooms.owner, gbook.nom, gbook.email, gbook.url, gbook.comment, gbook.referrer, gbook.date FROM gbook, gbook_rooms WHERE gbook.numroom = gbook_rooms.numroom ORDER BY gbook.date DESC;";
$queryresult = MYSQL_QUERY($myquery);
$numrows = MYSQL_NUM_ROWS($queryresult);
//
//print "$numrows";
//print " $queryresult";
//print " $myquery";
print " I already found $numrows customers who went to Hinata-sou!";
$i4=0;
while ($i4 < $numrows){
$room = mysql_result($queryresult,$i4,"room");
$owner = mysql_result($queryresult,$i4,"owner");
$nom = mysql_result($queryresult,$i4, "nom");
$email = mysql_result($queryresult,$i4,"email");
$url = mysql_result($queryresult,$i4,"url");
$comment = mysql_result($queryresult,$i4,"comment");
$referrer = mysql_result($queryresult,$i4,"referrer");
$date = mysql_result($queryresult,$i4,"date");
$annee = substr($date,0,4);
$mois = substr($date,5,2);
$jour = substr($date,8,2);
$heure = substr($date,11,2);
$minutes = substr($date,14,2);
if ($mois == "01") {$mois = "January";}
if ($mois == "02") {$mois = "February";}
if ($mois == "03") {$mois = "March";}
if ($mois == "04") {$mois = "April";}
if ($mois == "05") {$mois = "May";}
if ($mois == "06") {$mois = "June";}
if ($mois == "07") {$mois = "July";}
if ($mois == "08") {$mois = "August";}
if ($mois == "09") {$mois = "September";}
if ($mois == "10") {$mois = "October";}
if ($mois == "11") {$mois = "November";}
if ($mois == "12") {$mois = "December";}
print " ";
print " On $mois $jour $annee at $heure:$minutes, room $room ($owner's now) has been rent by:";
print " Name: $nom";
print " E-mail: $email";
print " Website: $url";
print " How did the client get here?: $referrer";
print " What did he think of his stay here?: $comment";
print "
";
$i4++;
}
?>
Would you like to rent a room?
"
?>
|