function execute($requests) { $v = array(); $target_c_commu_topic_ids = $requests['target_c_commu_topic_ids']; // トピックが選択されていない場合はエラー if (!$target_c_commu_topic_ids) { admin_client_redirect('topic_list', "トピックが選択されていません"); } $id_ary = split(":", $target_c_commu_topic_ids); $v = array(); $topic_list = array(); foreach ($id_ary as $id) { $topic = db_commu_c_topic4c_commu_topic_id_2($id); if (!$topic) { admin_client_redirect('topic_list', '指定されたトピック・イベントは存在しません'); } $member = db_member_c_member4c_member_id($topic['c_member_id']); $topic['count_comments'] = _db_count_c_commu_topic_comments4c_commu_topic_id($topic['c_commu_topic_id']); $commu = db_commu_c_commu4c_commu_id($topic['c_commu_id']); $topic['commu_name'] = $commu['name']; $topic['c_member'] = $member; $topic['original_filename'] = db_file_original_filename4filename($topic['filename']); array_push($topic_list, $topic); } $this->set('topic_list', $topic_list); $this->set('pref', p_regist_prof_c_profile_pref_list4null()); $this->set('target_c_commu_topic_ids', $target_c_commu_topic_ids); $v['SNS_NAME'] = SNS_NAME; $v['OPENPNE_VERSION'] = OPENPNE_VERSION; $this->set($v); return 'success'; }
function execute($requests) { $v = array(); $target_c_commu_topic_comment_ids = $requests['target_c_commu_topic_comment_ids']; // トピックのコメントが選択されていない場合はエラー if (!$target_c_commu_topic_comment_ids) { admin_client_redirect('topic_comment_list', "トピックのコメントが選択されていません"); } $id_ary = split(":", $target_c_commu_topic_comment_ids); $v = array(); $topic_comment_list = array(); foreach ($id_ary as $id) { $topic_comment = db_commu_c_commu_topic_comment4c_commu_topic_comment_id($id); if (!$topic_comment) { admin_client_redirect('topic_comment_list', '指定されたトピック・イベントのコメントは存在しません'); } if ($topic_comment['number'] == 0) { admin_client_redirect('topic_comment_list', '指定されたコメントはトピック本文のためトピック削除にて削除してください'); } $member = db_member_c_member4c_member_id($topic_comment['c_member_id']); $topic_comment['nickname'] = $member['nickname']; $topic_comment['count_comments'] = _db_count_c_commu_topic_comments4c_commu_topic_id($topic_comment['c_commu_topic_id']); $topic_comment['original_filename'] = db_file_original_filename4filename($topic_comment['filename']); array_push($topic_comment_list, $topic_comment); } $this->set('topic_comment_list', $topic_comment_list); $this->set('target_c_commu_topic_comment_ids', $target_c_commu_topic_comment_ids); $v['SNS_NAME'] = SNS_NAME; $v['OPENPNE_VERSION'] = OPENPNE_VERSION; $this->set($v); return 'success'; }
function execute($requests) { $v = array(); $target_c_commu_topic_comment_id = $requests['target_c_commu_topic_comment_id']; $v = array(); $topic_comment = db_commu_c_commu_topic_comment4c_commu_topic_comment_id($target_c_commu_topic_comment_id); if (!$topic_comment) { admin_client_redirect('topic_comment_list', '指定されたトピック・イベントのコメントは存在しません'); } if ($topic_comment['number'] == 0) { admin_client_redirect('topic_comment_list', '指定されたコメントはトピック本文のためトピック削除にて削除してください'); } $member = db_member_c_member4c_member_id($topic_comment['c_member_id']); $topic_comment['nickname'] = $member['nickname']; $topic_comment['count_comments'] = _db_count_c_commu_topic_comments4c_commu_topic_id($topic_comment['c_commu_topic_id']); $topic_comment['original_filename'] = db_file_original_filename4filename($topic_comment['filename']); $this->set('topic_comment', $topic_comment); $v['SNS_NAME'] = SNS_NAME; $v['OPENPNE_VERSION'] = OPENPNE_VERSION; $this->set($v); return 'success'; }
function execute($requests) { $v = array(); $target_c_commu_topic_id = $requests['target_c_commu_topic_id']; $v = array(); $topic = db_commu_c_topic4c_commu_topic_id_2($target_c_commu_topic_id); if (!$topic) { admin_client_redirect('topic_list', '指定されたトピック・イベントは存在しません'); } $member = db_member_c_member4c_member_id($topic['c_member_id']); $topic['count_comments'] = _db_count_c_commu_topic_comments4c_commu_topic_id($topic['c_commu_topic_id']); $commu = db_commu_c_commu4c_commu_id($topic['c_commu_id']); $topic['commu_name'] = $commu['name']; $topic['c_member'] = $member; $topic['original_filename'] = db_file_original_filename4filename($topic['filename']); $this->set('topic', $topic); $this->set('pref', p_regist_prof_c_profile_pref_list4null()); $v['SNS_NAME'] = SNS_NAME; $v['OPENPNE_VERSION'] = OPENPNE_VERSION; $this->set($v); return 'success'; }
function monitor_new_topic_list($limit) { $limit = intval($limit); $select = 'SELECT c.name AS commu_name, ct.*'; $from = ' FROM c_commu AS c, c_commu_topic AS ct'; $where = ' WHERE c.c_commu_id = ct.c_commu_id'; $group = ' GROUP BY ct.c_commu_topic_id'; $order = ' ORDER BY ct.u_datetime DESC'; $sql = $select . $from . $where . $group . $order; $list = db_get_all_limit($sql, 0, $limit); foreach ($list as $key => $value) { $list[$key]['count_comments'] = _db_count_c_commu_topic_comments4c_commu_topic_id($value['c_commu_topic_id']); } return $list; }