-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathreplycomment.php
More file actions
36 lines (32 loc) · 1.15 KB
/
replycomment.php
File metadata and controls
36 lines (32 loc) · 1.15 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<?php
include 'header.php';
require dirname(__DIR__) . '/temp.php';
require_once XOOPS_ROOT_PATH . '/class/xoopscomments.php';
// パラメータを変数にセット
$vars = array_merge($_POST, $_GET);
$prms = ['item_id', 'comment_id', 'mode', 'order', 'ok'];
foreach ($prms as $prm) {
if (isset($vars[$prm])) {
if ('item_id' == $prm || 'comment_id' == $prm) {
$vars[$prm] = (int)$vars[$prm];
}
$$prm = $vars[$prm];
} else {
$$prm = false;
}
}
$pollcomment = new XoopsComments($xoopsDB->prefix('yomi_comments'), $comment_id);
$r_date = formatTimestamp($pollcomment->getVar('date'));
$r_name = XoopsUser::getUnameFromId($pollcomment->getVar('user_id'));
$r_content = _PL_POSTERC . '' . $r_name . ' ' . _PL_DATEC . '' . $r_date . '<br><br>';
$r_content .= $pollcomment->getVar('comment');
$r_subject = $pollcomment->getVar('subject');
$subject = $pollcomment->getVar('subject', 'E');
themecenterposts($r_subject, $r_content);
$pid = $comment_id;
unset($comment_id);
$item_id = $pollcomment->getVar('item_id');
OpenTable();
require XOOPS_ROOT_PATH . '/include/commentform.inc.php';
CloseTable();
include 'footer.php';