<?php require_once 'visitor_database.php'; $id = isset($_POST['id']) ? htmlspecialchars($_POST['id']) : ''; $pos = isset($_POST['pos']) ? htmlspecialchars($_POST['pos']) : ''; $db = new visitor_database(); $row = $db->getIntroduction($pos, $id); $intro = $row['introduction']; $intro = $intro == null ? '' : $intro; $title = $row['title']; $size = $db->getSize($pos, $id - 1) . "|" . $db->getSize($pos, $id + 1); echo $intro . "|"; echo $title . "|"; echo $size;
<?php require_once 'visitor_database.php'; $pos = isset($_POST['pos']) ? htmlspecialchars($_POST['pos']) : ''; $id = isset($_POST['id']) ? htmlspecialchars($_POST['id']) : ''; $length = isset($_POST['length']) ? htmlspecialchars($_POST['length']) : ''; $db = new visitor_database(); $title = $db->getTitle($pos, $id + 1) . "-" . $db->getSize($pos, $id + 1); for ($i = 2; $i <= $length; $i++) { $title = $title . '|' . $db->getTitle($pos, $id + $i) . "-" . $db->getSize($pos, $id + $i); } echo $title;
<?php require_once 'visitor_database.php'; $db = new visitor_database(); $pos = isset($_POST['pos']) ? htmlspecialchars($_POST['pos']) : ''; $num = $db->getNum($pos); echo $num;
<?php require_once 'visitor_database.php'; $pos = isset($_POST['pos']) ? htmlspecialchars($_POST['pos']) : ''; $db = new visitor_database(); echo $db->getNum($pos);
<?php /* * Created on 2015-4-2 * * To change the template for this generated file go to * Window - Preferences - PHPeclipse - PHP - Code Templates */ //fwrite(fopen("log.txt","a"),"active"); require_once "visitor_database.php"; $pos = $_GET['pos']; $i = $_GET['id'] + 1; $db = new visitor_database(); $row = $db->getImg($i, $pos); if ($row == null) { die; } //print_r($row); header('content-type:' . $row['type']); echo $row['data'];