コード例 #1
0
ファイル: view.php プロジェクト: aberrios/WEBTHESGO
        }
    }
    $data['if']['show'] = false;
    if (!empty($cs_news['news_mirror'])) {
        $data['if']['show'] = true;
        $temp_mirror = explode("\n", $cs_news['news_mirror']);
        $temp_mirror_name = explode("\n", $cs_news['news_mirror_name']);
        $tpl_run = 0;
        for ($run_mirror = 1; $run_mirror < count($temp_mirror); $run_mirror++) {
            $num = $run_mirror;
            if ($run_mirror == count($temp_mirror) - 1) {
                $data['mirror'][$tpl_run]['dot'] = '';
            } elseif (!empty($run_mirror)) {
                $data['mirror'][$tpl_run]['dot'] = ' - ';
            } else {
                $data['mirror'][$tpl_run]['dot'] = ' - ';
            }
            $url = strpos($temp_mirror[$run_mirror], '://') === false ? 'http://' . $temp_mirror[$run_mirror] : $temp_mirror[$run_mirror];
            $data['mirror'][$tpl_run]['news_mirror'] = cs_html_link($url, $temp_mirror_name[$run_mirror]);
            $tpl_run++;
        }
    }
    echo cs_subtemplate(__FILE__, $data, 'news', 'view');
    echo cs_html_anchor('com0');
    include_once 'mods/comments/functions.php';
    if (!empty($data['news']['comments_count'])) {
        echo cs_html_br(1);
        echo cs_comments_view($cs_news_id, 'news', 'view', $data['news']['comments_count']);
    }
    echo cs_comments_add($cs_news_id, 'news', $cs_news['news_close']);
}
コード例 #2
0
ファイル: thread.php プロジェクト: aberrios/WEBTHESGO
 } else {
     $data['comment'][$run]['if']['no_com_moderator'] = true;
     $data['comment'][$run]['users_rank'] = getUserRank($user_posts, $ranks);
     $data['comment'][$run]['users_title'] = getRankTitle($user_posts, $ranks);
 }
 $data['comment'][$run]['avatar'] = getUserAvatar($cs_com[$run]['users_avatar']);
 $content = cs_secure($cs_com[$run]['users_place']);
 $hidden = explode(',', $cs_com[$run]['users_hidden']);
 if (in_array('users_place', $hidden)) {
     $content = ($account['access_users'] > 4 or $cs_com[$run]['users_id'] == $account['users_id']) ? cs_html_italic(1) . $content . cs_html_italic(0) : '';
 }
 $data['comment'][$run]['place'] = empty($content) ? '' : $cs_lang['place'] . ': ' . $content;
 $data['comment'][$run]['posts'] = $user_posts;
 $data['comment'][$run]['current'] = $current;
 $data['comment'][$run]['date'] = cs_date('unix', $cs_com[$run]['comments_time'], 1);
 $data['comment'][$run]['current_anchor'] = cs_html_anchor('com' . $current);
 if (isset($cs_report[$rpno]['comments_id']) and $cs_report[$rpno]['comments_id'] == $cs_com[$run]['comments_id']) {
     $data['comment'][$run]['if']['com_report'] = true;
     $matches[1] = $cs_lang['report'];
     $matches[2] = '<div style="float: right">' . cs_link(cs_icon('special_paste', 16, $cs_lang['reports']), 'board', 'reportlist');
     $rid = 'id=' . $cs_report[$rpno]['boardreport_id'];
     if (!empty($cs_report[$rpno]['boardreport_done'])) {
         $matches[1] .= ' - ' . $cs_lang['done'];
     } else {
         $matches[2] .= ' ' . cs_link(cs_icon('submit', 16, $cs_lang['done']), 'board', 'reportdone', $rid);
     }
     $matches[2] .= ' ' . cs_link(cs_icon('cancel', 16, $cs_lang['remove']), 'board', 'reportdel', $rid) . '</div>';
     $matches[2] .= cs_date('unix', $cs_report[$rpno]['boardreport_time'], 1) . ' - ';
     $matches[2] .= cs_user($cs_report[$rpno]['users_id'], $cs_report[$rpno]['users_nick'], $cs_report[$rpno]['users_active'], $cs_report[$rpno]['users_delete']);
     $matches[2] .= cs_html_br(2) . cs_secure($cs_report[$rpno]['boardreport_text'], 1);
     $data['comment'][$run]['com_clip'] = cs_abcode_clip($matches);