当前位置: 首页>>代码示例>>PHP>>正文


PHP cs_link函数代码示例

本文整理汇总了PHP中cs_link函数的典型用法代码示例。如果您正苦于以下问题:PHP cs_link函数的具体用法?PHP cs_link怎么用?PHP cs_link使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了cs_link函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: getUserIcons

function getUserIcons($cs_lang, $users_id, $nick, $hidden = 0, $email = 0, $icq = 0, $jabber = 0, $url = 0, $skype = 0)
{
    global $account;
    $allow = $users_id == $account['users_id'] or $account['access_users'] > 4 ? 1 : 0;
    $hidden = explode(',', $hidden);
    if (in_array('users_email', $hidden) && empty($allow)) {
        $email = '';
    }
    if (in_array('users_icq', $hidden) && empty($allow)) {
        $icq = '';
    }
    if (in_array('users_jabber', $hidden) && empty($allow)) {
        $jabber = '';
    }
    if (in_array('users_skype', $hidden) && empty($allow)) {
        $skype = '';
    }
    if (in_array('users_url', $hidden) && empty($allow)) {
        $url = '';
    }
    $icons = '';
    $icons .= !empty($email) ? cs_html_mail($email, cs_icon('mail_generic')) : '';
    $icons .= $account['access_users'] >= 2 ? cs_link(cs_icon('mail_send'), 'messages', 'create', 'to_id=' . $users_id, 0, $cs_lang['send_message']) : '';
    $icons .= !empty($icq) ? cs_html_link('http://www.icq.com/people/' . $icq, cs_icon('licq'), 1, 0, $cs_lang['icq']) : '';
    $icons .= !empty($jabber) ? cs_html_jabbermail($jabber, cs_icon('jabber_protocol')) : '';
    $icons .= !empty($skype) ? cs_html_link('skype:' . $skype . '?userinfo', cs_html_img('http://mystatus.skype.com/smallicon/' . $skype, '16', '16', '0', 'Skype'), 0, 0, $cs_lang['skype']) : '';
    $icons .= !empty($url) ? cs_html_link('http://' . $url, cs_icon('gohome'), 1, 0, $cs_lang['homepage']) : '';
    return $icons;
}
开发者ID:aberrios,项目名称:WEBTHESGO,代码行数:29,代码来源:functions.php

示例2: cs_manage

function cs_manage($mod, $action, $def_mod, $def_action, $merge = array(), $head = array())
{
    global $account, $cs_lang;
    $merge = is_array($merge) ? $merge : array();
    $show = $mod . '/' . $action;
    if (empty($head['message'])) {
        $head['message'] = '';
    }
    $data = array('head' => $head);
    $data['content'] = array();
    $options = array('info' => 0, 'size' => 48, 'theme' => '');
    $options['theme'] = empty($account['users_view']) ? 'manage' : 'manage_' . $account['users_view'];
    if ($account['users_view'] == 'list') {
        $options['size'] = 16;
        if ($show == 'clansphere/admin') {
            $options['theme'] = 'manage_admin';
            $options['info'] = 1;
        }
    }
    $mod_array = cs_checkdirs('mods', $show);
    $content = array_merge($merge, $mod_array);
    ksort($content);
    $loop = 0;
    foreach ($content as $mod) {
        if (!array_key_exists('dir', $mod)) {
            $mod['dir'] = $def_mod;
        }
        if (!array_key_exists('file', $mod)) {
            $mod['file'] = $def_action;
        }
        $acc_dir = 'access_' . $mod['dir'];
        if (array_key_exists($acc_dir, $account) and $account[$acc_dir] >= $mod['show'][$show]) {
            $cs_lap = cs_icon($mod['icon'], $options['size'], 0, 0);
            $data['content'][$loop]['img_1'] = $cs_lap;
            $data['content'][$loop]['txt_1'] = $mod['name'];
            $data['content'][$loop]['link_1'] = cs_url($mod['dir'], $mod['file']);
            if (!empty($options['info'])) {
                if (file_exists('mods/' . $mod['dir'] . '/create.php')) {
                    $data['content'][$loop]['create_1'] = cs_link(cs_icon('editpaste', 16, $cs_lang['create']), $mod['dir'], 'create');
                } else {
                    $data['content'][$loop]['create_1'] = '';
                }
                if (file_exists('mods/' . $mod['dir'] . '/manage.php')) {
                    $data['content'][$loop]['manage_1'] = cs_link(cs_icon('kfm', 16, $cs_lang['manage']), $mod['dir'], 'manage');
                } else {
                    $data['content'][$loop]['manage_1'] = '';
                }
                if (file_exists('mods/' . $mod['dir'] . '/options.php')) {
                    $data['content'][$loop]['options_1'] = cs_link(cs_icon('package_settings', 16, $cs_lang['options']), $mod['dir'], 'options');
                } else {
                    $data['content'][$loop]['options_1'] = '';
                }
            }
            $loop++;
        }
    }
    $data['head']['total'] = $loop;
    return cs_subtemplate(__FILE__, $data, 'clansphere', $options['theme']);
}
开发者ID:aberrios,项目名称:WEBTHESGO,代码行数:59,代码来源:functions.php

示例3: cs_installerror

function cs_installerror($old_query = '')
{
    global $cs_db, $cs_lang, $account;
    $cs_lang = cs_translate('install');
    $error = empty($cs_db['last_error']) ? 'Unknown' : $cs_db['last_error'];
    $msg = 'Error: ' . $error . cs_html_br(2) . 'Query: ' . $old_query . cs_html_br(4);
    $msg .= cs_link($cs_lang['remove_and_again'], 'install', 'sql', 'lang=' . $account['users_lang'] . '&uninstall=1');
    die(cs_error_internal('sql', $msg));
}
开发者ID:aberrios,项目名称:WEBTHESGO,代码行数:9,代码来源:sql.php

示例4: cs_abcode_pb_url

function cs_abcode_pb_url($matches)
{
    $cs_get = cs_get('id,where');
    if (!empty($cs_get['id'])) {
        $matches[3] = empty($cs_get['id']) ? 0 : $cs_get['id'];
    }
    if (!empty($cs_get['where'])) {
        $matches[3] = empty($cs_get['where']) ? 0 : $cs_get['where'];
    }
    if (empty($matches[2])) {
        $matches[2] = $matches[1];
    }
    return cs_link($matches[2], 'articles', 'view', 'id=' . $matches[3] . '&page=' . $matches[1]);
}
开发者ID:aberrios,项目名称:WEBTHESGO,代码行数:14,代码来源:cutpages.php

示例5: cs_admin_menu

function cs_admin_menu()
{
    global $cs_main, $account;
    $cs_lang = cs_translate('clansphere');
    $data = array();
    $recent_mod = $cs_main['mod'];
    $recent_action = $cs_main['action'];
    $link_count = 0;
    if (file_exists('mods/' . $recent_mod . '/manage.php') && $account['access_' . $recent_mod] >= 3) {
        include $cs_main['def_path'] . '/mods/' . $recent_mod . '/info.php';
        # look for sql table named like mod, else use first sql table given
        $mod_tables = is_array($mod_info['tables']) ? $mod_info['tables'] : array();
        if (in_array($recent_mod, $mod_tables)) {
            $sql_table = $recent_mod;
        } elseif (isset($mod_tables[0])) {
            $sql_table = $mod_tables[0];
        } else {
            $sql_table = false;
        }
        $sql_count = empty($sql_table) ? '' : ' (' . cs_sql_count(__FILE__, $sql_table) . ')';
        $link_count++;
        $data['menu']['manage'] = $recent_action == 'manage' ? $cs_lang['manage'] : cs_link($cs_lang['manage'], $recent_mod, 'manage') . $sql_count;
        $data['if']['manage'] = true;
    } else {
        $data['menu']['manage'] = '';
        $data['if']['manage'] = false;
    }
    if (file_exists('mods/' . $recent_mod . '/create.php') && $account['access_' . $recent_mod] >= 3 && $recent_mod != 'shoutbox') {
        $link_count++;
        $data['menu']['create'] = $recent_action == 'create' ? $cs_lang['create'] : cs_link($cs_lang['create'], $recent_mod, 'create');
        $data['if']['create'] = true;
    } else {
        $data['menu']['create'] = '';
        $data['if']['create'] = false;
    }
    if (file_exists('mods/' . $recent_mod . '/options.php') && $account['access_' . $recent_mod] >= 5) {
        $link_count++;
        $data['menu']['options'] = $recent_action == 'options' ? $cs_lang['options'] : cs_link($cs_lang['options'], $recent_mod, 'options');
        $data['if']['options'] = true;
    } else {
        $data['menu']['options'] = '';
        $data['if']['options'] = false;
    }
    if ($link_count > 1) {
        $data['links']['count'] = $link_count;
        return cs_subtemplate(__FILE__, $data, 'clansphere', 'admin_menu');
    }
}
开发者ID:aberrios,项目名称:WEBTHESGO,代码行数:48,代码来源:admin_menu.php

示例6: cs_datacontrol

function cs_datacontrol($data_id, $div = 0, $style = '', $more = '')
{
    global $cs_main, $cs_lang, $account;
    $content = '';
    $mod = $cs_main['mod'];
    $get_axx = 'mods/' . $mod . '/access.php';
    $axx_file = array();
    include $get_axx;
    if (!empty($div)) {
        $content .= '<div style="' . $style . '" ' . $more . '>';
    }
    if ($account['access_' . $mod] >= $axx_file['edit']) {
        $img_edit = cs_icon('edit', 16, $cs_lang['edit']);
        $content .= cs_link($img_edit, $mod, 'edit', 'id=' . $data_id, 0, $cs_lang['edit']);
    }
    if ($account['access_' . $mod] >= $axx_file['remove']) {
        $img_del = cs_icon('editdelete', 16, $cs_lang['remove']);
        $content .= cs_link($img_del, $mod, 'remove', 'id=' . $data_id, 0, $cs_lang['remove']);
    }
    if (!empty($div)) {
        $content .= '</div>';
    }
    return $content;
}
开发者ID:aberrios,项目名称:WEBTHESGO,代码行数:24,代码来源:functions.php

示例7: count

$gbook_loop = count($cs_gbook);
for ($run = 0; $run < $gbook_loop; $run++) {
    if ($cs_gbook[$run]['users_id'] > 0) {
        $gbook[$run]['nick'] = cs_secure($cs_gbook[$run]['users_nick']);
        $gbook[$run]['email'] = cs_secure($cs_gbook[$run]['users_email']);
    } else {
        $gbook[$run]['nick'] = cs_secure($cs_gbook[$run]['gbook_nick']);
        $gbook[$run]['email'] = cs_secure($cs_gbook[$run]['gbook_email']);
    }
    $gbook[$run]['time'] = cs_date('unix', $cs_gbook[$run]['gbook_time'], 1);
    if (empty($user_gb)) {
        $active = cs_link(cs_icon('cancel'), 'gbook', 'manage', 'active=' . $cs_gbook[$run]['gbook_id'], 0, $cs_lang['active']);
        $deactive = cs_link(cs_icon('submit'), 'gbook', 'manage', 'deactive=' . $cs_gbook[$run]['gbook_id'], 0, $cs_lang['deactive']);
    } else {
        $active = cs_link(cs_icon('cancel'), 'gbook', 'manage', 'active=' . $cs_gbook[$run]['gbook_id'] . '&amp;user_gb=' . $user_gb, 0, $cs_lang['active']);
        $deactive = cs_link(cs_icon('submit'), 'gbook', 'manage', 'deactive=' . $cs_gbook[$run]['gbook_id'] . '&amp;user_gb=' . $user_gb, 0, $cs_lang['deactive']);
    }
    $gbook[$run]['lock'] = empty($cs_gbook[$run]['gbook_lock']) ? $active : $deactive;
    $gbook[$run]['id'] = $cs_gbook[$run]['gbook_id'];
    $gbook[$run]['ip'] = '';
    if ($account['access_gbook'] >= 4) {
        $ip = $cs_gbook[$run]['gbook_ip'];
        if ($account['access_gbook'] == 4) {
            $last = strlen(substr(strrchr($cs_gbook[$run]['gbook_ip'], '.'), 1));
            $ip = strlen($gbook_ip);
            $ip = substr($gbook_ip, 0, $ip - $last);
            $ip = $ip . '*';
        }
        $ip_show = empty($ip) ? '-' : $ip;
        $gbook[$run]['ip'] = cs_html_img('symbols/' . $cs_main['img_path'] . '/16/important.' . $cs_main['img_ext'], 16, 16, 'title="' . $ip_show . '"');
    }
开发者ID:aberrios,项目名称:WEBTHESGO,代码行数:31,代码来源:manage.php

示例8: cs_cups_get_teams

function cs_cups_get_teams($cups_id, $cups_type, $cs_lang)
{
    switch ($cups_type) {
        case CS_CUPS_TYPE_TEAMS:
            $tables = 'cupsquads cs LEFT JOIN {pre}_';
            $tables .= 'squads team ON cs.squads_id = team.squads_id';
            $cells = 'cs.cupsquads_id AS cupsquads_id, cs.cupsquads_time AS cupsquads_time, cs.squads_id AS squads_id, ';
            $cells .= 'cs.cupsquads_seed AS cupsquads_seed, cs.cupsquads_autoseed AS cupsquads_autoseed, ';
            $cells .= 'team.squads_name AS squads_name';
            break;
        case CS_CUPS_TYPE_USERS:
            $tables = 'cupsquads cs LEFT JOIN {pre}_';
            $tables .= 'users team ON cs.squads_id = team.users_id';
            $cells = 'cs.cupsquads_id AS cupsquads_id, cs.cupsquads_time AS cupsquads_time, cs.squads_id AS squads_id, ';
            $cells .= 'cs.cupsquads_seed AS cupsquads_seed, cs.cupsquads_autoseed AS cupsquads_autoseed, ';
            $cells .= 'team.users_nick AS squads_name, team.users_active AS users_active, team.users_delete AS users_delete';
            break;
    }
    $teams = cs_sql_select(__FILE__, $tables, $cells, 'cs.cups_id = ' . $cups_id, 'cupsquads_autoseed ASC, cupsquads_seed ASC', 0, 0);
    if (!count($teams)) {
        return NULL;
    }
    foreach ($teams as $key => $team) {
        if (empty($team['cupsquads_autoseed'])) {
            $teams[$key]['seed_text'] = $team['cupsquads_seed'];
            $teams[$key]['autoseed_on'] = '';
            $teams[$key]['autoseed_off'] = 'checked';
        } else {
            $teams[$key]['seed_text'] = $cs_lang['auto'];
            $teams[$key]['autoseed_on'] = 'checked';
            $teams[$key]['autoseed_off'] = '';
        }
        $teams[$key]['join'] = cs_date('unix', $teams[$key]['cupsquads_time'], 1);
        switch ($cups_type) {
            case CS_CUPS_TYPE_TEAMS:
                $teams[$key]['link'] = cs_link(cs_secure($team['squads_name']), 'squads', 'view', 'id=' . $team['squads_id']);
                break;
            case CS_CUPS_TYPE_USERS:
                $teams[$key]['link'] = cs_user($team['squads_id'], $team['squads_name'], $team['users_active'], $team['users_delete']);
                break;
        }
    }
    return $teams;
}
开发者ID:aberrios,项目名称:WEBTHESGO,代码行数:44,代码来源:functions.php

示例9: cs_secure

            $data['threads'][$run]['important'] = '';
        }
        $headline = cs_secure($thread['threads_headline']);
        $data['threads'][$run]['headline'] = cs_link($headline, 'board', 'thread', 'where=' . $thread['threads_id']);
        if ($thread['threads_comments'] > $account['users_limit']) {
            $data['threads'][$run]['pages'] = cs_html_br(1);
            $data['threads'][$run]['pages'] .= $cs_lang['page'] . ' ';
            $data['threads'][$run]['pages'] .= cs_pages('board', 'thread', $thread['threads_comments'], 0, $thread['threads_id'], 0, 0, 1);
        } else {
            $data['threads'][$run]['pages'] = '';
        }
        $data['threads'][$run]['comments'] = $thread['threads_comments'];
        $data['threads'][$run]['view'] = $thread['threads_view'];
        if (!empty($thread['threads_last_time'])) {
            $date = cs_date('unix', $thread['threads_last_time'], 1);
            $comments = $thread['threads_comments'] == 0 ? 0 : $thread['threads_comments'] - 1;
            $goto = floor($comments / $account['users_limit']) * $account['users_limit'];
            $goto .= '#com' . $thread['threads_comments'];
            $data['threads'][$run]['last'] = cs_link($date, 'board', 'thread', 'where=' . $thread['threads_id'] . '&amp;start=' . $goto);
            if (!empty($thread['users_id'])) {
                $data['threads'][$run]['last_user'] = cs_html_br(1);
                $data['threads'][$run]['last_user'] .= $cs_lang['from'] . ' ';
                $data['threads'][$run]['last_user'] .= cs_user($thread['users_id'], $thread['users_nick'], $thread['users_active']);
            } else {
                $data['threads'][$run]['last_user'] = '';
            }
        }
        $run++;
    }
}
echo cs_subtemplate(__FILE__, $data, 'board', 'active');
开发者ID:aberrios,项目名称:WEBTHESGO,代码行数:31,代码来源:active.php

示例10: empty

$start = empty($_REQUEST['start']) ? 0 : $_REQUEST['start'];
$cs_sort[1] = 'boardreport_time DESC';
$cs_sort[2] = 'boardreport_time ASC';
$cs_sort[3] = 'boardreport_done DESC, boardreport_time DESC';
$cs_sort[4] = 'boardreport_done ASC, boardreport_time DESC';
$cs_sort[5] = 'threads_headline DESC';
$cs_sort[6] = 'boardreport_time ASC';
$sort = empty($_REQUEST['sort']) ? 1 : $_REQUEST['sort'];
$order = $cs_sort[$sort];
$data['lang']['getmsg'] = cs_getmsg();
$data['head']['boardreport_count'] = cs_sql_count(__FILE__, 'boardreport');
$data['head']['pages'] = cs_pages('board', 'reportlist', $data['head']['boardreport_count'], $start, 0, $sort);
$data['sort']['boardreport_time'] = cs_sort('board', 'reportlist', $start, 0, 1, $sort);
$data['sort']['boardreport_done'] = cs_sort('board', 'reportlist', $start, 0, 3, $sort);
$data['sort']['threads_headline'] = cs_sort('board', 'reportlist', $start, 0, 5, $sort);
$from = 'boardreport bdr INNER JOIN {pre}_threads thr ON bdr.threads_id = thr.threads_id';
$select = 'bdr.boardreport_time AS boardreport_time, bdr.boardreport_done AS boardreport_done, bdr.threads_id AS threads_id, thr.threads_headline AS threads_headline, bdr.comments_id AS comments_id';
$cs_report = cs_sql_select(__FILE__, $from, $select, 0, $order, $start, $account['users_limit']);
$report_loop = count($cs_report);
$data['boardreport'] = array();
for ($run = 0; $run < $report_loop; $run++) {
    $data['boardreport'][$run]['boardreport_time'] = cs_date('date', $cs_report[$run]['boardreport_time'], 1);
    $data['boardreport'][$run]['boardreport_done'] = empty($cs_report[$run]['boardreport_done']) ? $cs_lang['no'] : $cs_lang['yes'];
    $headline = cs_secure($cs_report[$run]['threads_headline']);
    // $comments_count = empty($cs_report[$run]['comments_id']) ? 0 : cs_sql_count(__FILE__,'comments',"comments_mod = 'board' AND comments_fid = '" . $cs_report[$run]['threads_id'] . "'");
    // $goto = floor($comments_count / $account['users_limit']) * $account['users_limit'] . '#com' . $comments_count;
    $link = cs_link($headline, 'board', 'thread', 'where=' . $cs_report[$run]['threads_id']);
    // . '&amp;start=' . $goto);
    $data['boardreport'][$run]['threads_headline'] = $link . ' #' . $cs_report[$run]['comments_id'];
}
echo cs_subtemplate(__FILE__, $data, 'board', 'reportlist');
开发者ID:aberrios,项目名称:WEBTHESGO,代码行数:31,代码来源:reportlist.php

示例11: cs_link

        $data['if']['done'] = true;
        $data['link']['wizard'] = cs_link($cs_lang['show'], 'wizard', 'roots') . ' - ' . cs_link($cs_lang['task_done'], 'wizard', 'roots', 'handler=temp&amp;done=1');
    }
}
if (!empty($activate) and !empty($allow)) {
    require_once 'mods/clansphere/func_options.php';
    $save = array();
    $save['def_tpl'] = $activate;
    if (isset($templates[ucfirst($activate)]['themes'])) {
        $themes = cs_checkdirs('themes');
        if (isset($themes[ucfirst($templates[ucfirst($activate)]['themes'])])) {
            $save['def_theme'] = $templates[ucfirst($activate)]['themes'];
        }
    }
    cs_optionsave('clansphere', $save);
    $msg = file_exists('themes/' . $activate) ? $cs_lang['theme_found'] . cs_link($cs_lang['change_to_this'], 'clansphere', 'themes_list', 'activate=' . $activate) : $cs_lang['success'];
    cs_redirect($msg, 'clansphere', 'temp_list');
} else {
    $data['lang']['getmsg'] = cs_getmsg();
    $run = 0;
    foreach ($templates as $mod) {
        if ($mod['dir'] == 'install') {
            $tpl_all--;
            continue;
        }
        $data['temp_list'][$run]['name'] = $mod['name'];
        $data['temp_list'][$run]['dir'] = $mod['dir'];
        $data['temp_list'][$run]['version'] = $mod['version'];
        $data['temp_list'][$run]['date'] = cs_date('date', $mod['released']);
        $data['temp_list'][$run]['if']['active'] = $mod['dir'] == $cs_main['template'] ? 1 : 0;
        $data['temp_list'][$run]['if']['def'] = $mod['dir'] == $cs_main['def_tpl'] ? 1 : 0;
开发者ID:aberrios,项目名称:WEBTHESGO,代码行数:31,代码来源:temp_list.php

示例12: cs_sql_select

}
$from = 'news nws INNER JOIN {pre}_users usr ON nws.users_id = usr.users_id INNER JOIN {pre}_categories cat ON nws.categories_id = cat.categories_id';
$select = 'nws.news_id AS news_id, nws.news_headline AS news_headline, nws.news_time AS news_time, nws.news_text AS news_text, nws.news_close AS news_close, nws.news_public AS news_public, nws.news_pictures as news_pictures, nws.users_id AS users_id, usr.users_nick AS users_nick, usr.users_active AS users_active, usr.users_delete AS users_delete, nws.categories_id AS categories_id, cat.categories_access AS categories_access, cat.categories_picture AS categories_picture, nws.news_mirror AS news_mirror, nws.news_mirror_name AS news_mirror_name, nws.news_readmore AS news_readmore, nws.news_readmore_active AS news_readmore_active';
$cs_news = cs_sql_select(__FILE__, $from, $select, "news_id = '" . $cs_news_id . "'");
$head['head']['mod'] = $cs_lang['mod_name'];
$head['head']['action'] = $cs_lang['details'];
$topline = empty($cs_news['news_public']) ? 'not_public' : 'news_info';
$head['head']['topline'] = $cs_lang[$topline];
echo cs_subtemplate(__FILE__, $head, 'news', 'head');
$pub = $cs_news['categories_access'] > $account['access_news'] ? 0 : $cs_news['news_public'];
if (!empty($pub)) {
    $com_where = "comments_mod = 'news' AND comments_fid = '" . $cs_news['news_id'] . "'";
    $data['news']['comments_count'] = cs_sql_count(__FILE__, 'comments', $com_where);
    $start = floor($data['news']['comments_count'] / ($account['users_limit'] + 1)) * $account['users_limit'];
    $cs_news_com_count = $data['news']['comments_count'] - $start;
    $data['news']['comments_link'] = cs_link($cs_lang['comments'], 'news', 'view', 'id=' . $cs_news['news_id'] . '&amp;start=' . $start . '#com' . $cs_news_com_count);
    $cs_main['page_title'] = $cs_news['news_headline'];
    $data['news']['news_headline'] = cs_secure($cs_news['news_headline']);
    $data['news']['news_time'] = cs_date('unix', $cs_news['news_time'], 1);
    $data['news']['news_text'] = cs_secure($cs_news['news_text'], $abcode[0], $abcode[1], $abcode[2], $abcode[3], $abcode[4]);
    if (empty($cs_news['news_readmore_active'])) {
        $data['news']['news_readmore'] = '';
    } else {
        $data['news']['news_readmore'] = cs_secure($cs_news['news_readmore'], $abcode[0], $abcode[1], $abcode[2], $abcode[3], $abcode[4]);
        $data['news']['news_readmore'] .= cs_html_br(2);
    }
    $data['news']['users_link'] = cs_user($cs_news['users_id'], $cs_news['users_nick'], $cs_news['users_active'], $cs_news['users_delete']);
    $data['if']['catimg'] = empty($cs_news['categories_picture']) ? false : true;
    $data['news']['url_catimg'] = empty($data['if']['catimg']) ? '' : 'uploads/categories/' . $cs_news['categories_picture'];
    $data['news']['pictures'] = '';
    if (!empty($cs_news['news_pictures'])) {
开发者ID:aberrios,项目名称:WEBTHESGO,代码行数:31,代码来源:view.php

示例13: cs_translate

<?php

// ClanSphere 2010 - www.clansphere.net
// $Id$
$cs_lang = cs_translate('rules');
$data = array();
$data['rules'] = array();
$rules_count = cs_sql_count(__FILE__, 'rules');
$where = "categories_mod = 'rules' AND categories_access <= '" . $account['access_rules'] . "'";
$categories_data = cs_sql_select(__FILE__, 'categories', '*', $where, 'categories_name', 0, 0);
$categories_loop = count($categories_data);
$data['count']['rules'] = sprintf($cs_lang['all'], $rules_count);
for ($run = 0; $run < $categories_loop; $run++) {
    $data['rules'][$run]['cat'] = cs_link(cs_secure($categories_data[$run]['categories_name']), 'rules', 'listcat', 'id=' . $categories_data[$run]['categories_id']);
    $content = cs_sql_count(__FILE__, 'rules', 'categories_id = ' . $categories_data[$run]['categories_id']);
    $data['rules'][$run]['count_cat'] = $content;
    $data['rules'][$run]['cat_text'] = cs_secure($categories_data[$run]['categories_text'], 1, 1);
}
echo cs_subtemplate(__FILE__, $data, 'rules', 'list');
开发者ID:aberrios,项目名称:WEBTHESGO,代码行数:19,代码来源:list.php

示例14: count

$sqd_loop = count($sqd_data);
for ($run = 0; $run < $sqd_loop; $run++) {
    $data['squad'][$run]['selected'] = $sqd_data[$run]['squads_id'] == $squads_id ? ' selected="selected"' : '';
    $data['squad'][$run]['id'] = $sqd_data[$run]['squads_id'];
    $data['squad'][$run]['name'] = cs_secure($sqd_data[$run]['squads_name']);
}
if (empty($sqd_loop)) {
    $data['squad'] = array();
}
$data['lang']['msg'] = !empty($msg) ? $msg : '';
$select = 'mem.members_admin AS members_admin, mem.members_order AS members_order, mem.users_id AS users_id, usr.users_nick AS users_nick, usr.users_delete AS users_delete, usr.users_active AS users_active, mem.members_task, mem.members_id AS members_id';
$from = 'members mem INNER JOIN {pre}_users usr ON mem.users_id = usr.users_id';
$where = "mem.squads_id = '" . $squads_id . "'";
$cs_members = cs_sql_select(__FILE__, $from, $select, $where, $order, 0, 0);
$members_loop = count($cs_members);
$data['sort']['user'] = cs_sort('members', 'center', 0, $squads_id, 1, $sort);
$data['sort']['task'] = cs_sort('members', 'center', 0, $squads_id, 3, $sort);
$img_edit = cs_icon('edit', 16, $cs_lang['edit']);
$img_del = cs_icon('editdelete', 16, $cs_lang['remove']);
if (empty($members_loop)) {
    $data['members'] = '';
}
for ($run = 0; $run < $members_loop; $run++) {
    $users_nick = cs_user($cs_members[$run]['users_id'], $cs_members[$run]['users_nick'], $cs_members[$run]['users_active'], $cs_members[$run]['users_delete']);
    $data['members'][$run]['user'] = empty($cs_members[$run]['members_admin']) ? $users_nick : cs_html_big(1) . $users_nick . cs_html_big(0);
    $data['members'][$run]['task'] = cs_secure($cs_members[$run]['members_task']);
    $data['members'][$run]['order'] = $cs_members[$run]['members_order'];
    $data['members'][$run]['edit'] = cs_link($img_edit, 'members', 'change', 'id=' . $cs_members[$run]['members_id'], 0, $cs_lang['edit']);
    $data['members'][$run]['remove'] = cs_link($img_del, 'members', 'center', 'del_id=' . $cs_members[$run]['members_id'], 0, $cs_lang['remove']);
}
echo cs_subtemplate(__FILE__, $data, 'members', 'center');
开发者ID:aberrios,项目名称:WEBTHESGO,代码行数:31,代码来源:center.php

示例15: cs_secure

    $comments_fid = $cs_comments[$run_2]['comments_fid'];
    $votes_id = $cs_votes[0]['votes_id'];
    if ($comments_fid == $votes_id) {
        $com_count++;
    }
}
$data['votes'] = '';
for ($run = 0; $run < $votes_loop; $run++) {
    $question = cs_secure($cs_votes_archiv[$run]['votes_question']);
    $com_count = 0;
    for ($run_2 = 0; $run_2 < $comments_loop; $run_2++) {
        $comments_fid = $cs_comments[$run_2]['comments_fid'];
        $votes_id = $cs_votes_archiv[$run]['votes_id'];
        if ($comments_fid == $votes_id) {
            $com_count++;
        }
    }
    $answers_count = 0;
    $votes_id = $cs_votes_archiv[$run]['votes_id'];
    for ($run_2 = 0; $run_2 < $voted_loop; $run_2++) {
        $voted_fid = $cs_voted[$run_2]['voted_fid'];
        if ($voted_fid == $votes_id) {
            $answers_count++;
        }
    }
    $data['votes'][$run]['question_link'] = cs_link($question, 'votes', 'view', 'where=' . $cs_votes_archiv[$run]['votes_id']);
    $data['votes'][$run]['com_count'] = $com_count;
    $data['votes'][$run]['elect_count'] = $answers_count;
    $data['votes'][$run]['ends_on'] = cs_date('unix', $cs_votes_archiv[$run]['votes_end'], 1);
}
echo cs_subtemplate(__FILE__, $data, 'votes');
开发者ID:aberrios,项目名称:WEBTHESGO,代码行数:31,代码来源:list.php


注:本文中的cs_link函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。