コード例 #1
0
ファイル: edit.php プロジェクト: kaz6120/Loggix
/**
 * Edit Comment Controller
 *
 * @package   Loggix_Module_Comment
 * @since     5.5.15
 * @version   9.5.20
 */
/**
 * Include Module class
 */
$pathToIndex = '../..';
require_once $pathToIndex . '/lib/Loggix/Module/Comment.php';
$app = new Loggix_Module_Comment();
$config = $app->getConfigArray();
$sessionState = $app->getSessionState();
$app->getModuleLanguage('comment');
$app->insertTagSafe();
// Display Editor
if (isset($_GET['id'])) {
    $id = intval($_GET['id']);
    // Main Contents
    $sql = 'SELECT ' . '* ' . 'FROM ' . COMMENT_TABLE . ' ' . 'WHERE ' . 'id = :id';
    $stmt = $app->db->prepare($sql);
    $stmt->execute(array(':id' => $id));
    if ($stmt) {
        while ($row = $stmt->fetch()) {
            $item['comments']['id'] = intval($row['id']);
            $item['comments']['tid'] = intval($row['tid']);
            $item['comments']['user_name'] = htmlspecialchars($row['user_name']);
            $item['comments']['user_mail'] = htmlspecialchars($row['user_mail']);
            $item['comments']['user_uri'] = htmlspecialchars($row['user_uri']);