Esempio n. 1
0
<?php 
echo "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n";
echo "<board>\n";
include "../ConDBi.php";
$uid = $_POST["uid"];
$stmt->prepare("UPDATE Board.board\n\t\t\t\t\t\tSET hit = hit + 1 \n\t\t\t\t\t\t\tWHERE uid = ?");
$stmt->bind_param("d", $uid);
$stmt->execute();
$stmt->prepare("SELECT\tB.uid, concat(M.name, '(', M.id, ')') nickname,\n\t\t\t\t\t\t\tB.title, B.content,\n\t\t\t\t\t\t\tCASE date_format(B.timestamp, '%Y-%m-%d') != date_format(now(), '%Y-%m-%d')\n\t\t\t\t\t\t\t\tWHEN TRUE THEN \n\t\t\t\t\t\t\t\t\tdate_format(B.timestamp, '%Y-%m-%d')\n\t\t\t\t\t\t\t\tELSE \n\t\t\t\t\t\t\t\t\tdate_format(B.timestamp, '%H:%i:%s')\n\t\t\t\t\t\t\tEND timestamp,\n\t\t\t\t\t\t\tB.hit\n\t\t\t\t\t\n\t\t\t\t\tFROM\tBoard.board B, Member.list M\n\t\t\t\t\t\n\t\t\t\t\tWHERE\tB.id = M.id AND uid = ?");
$stmt->bind_param("d", $uid);
echo getRecordXML($stmt, "list", 1, false, true, true);
echo "</board>";
$stmt->close();
$mysqli->close();
Esempio n. 2
0
<?php 
echo "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n";
echo "<board>\n";
include "../ConDBi.php";
$stmt->prepare("SELECT category, name \n\t\t\t\t\tFROM Board.category\n\t\t\t\t\t\tWHERE application = ?");
$stmt->bind_param("d", $application);
echo getRecordXML($stmt, "category", 1, false, true, true);
echo "</board>";
$stmt->close();
$mysqli->close();