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


PHP cs_html_link函数代码示例

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


在下文中一共展示了cs_html_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_translate

<?php

// ClanSphere 2010 - www.clansphere.net
// $Id$
$cs_lang = cs_translate('partner');
$data['categories'] = array();
$op_partner = cs_sql_option(__FILE__, 'partner');
$data['partner']['list_width'] = $op_partner['def_width_listimg'] + 20;
$categories_select = 'categories_name, categories_id, categories_order';
$categories_order = 'categories_order DESC';
$categories_data = cs_sql_select(__FILE__, 'categories', $categories_select, "categories_mod = 'partner'", $categories_order, 0, 0);
$categories_loop = count($categories_data);
for ($run = 0; $run < $categories_loop; $run++) {
    $data['categories'][$run]['categories_name'] = $categories_data[$run]['categories_name'];
    $categories_id = $categories_data[$run]['categories_id'];
    $data['categories'][$run]['partner'] = array();
    $select = 'partner_id, partner_name, partner_url, partner_text, partner_alt, partner_limg';
    $order = 'partner_priority ASC';
    $where = "categories_id = '" . $categories_id . "'";
    $cs_partner = cs_sql_select(__FILE__, 'partner', $select, $where, $order, 0, 0);
    $partner_loop = count($cs_partner);
    for ($run2 = 0; $run2 < $partner_loop; $run2++) {
        $data['categories'][$run]['partner'][$run2]['partner_name'] = cs_html_link('http://' . $cs_partner[$run2]['partner_url'], cs_secure($cs_partner[$run2]['partner_name']));
        $data['categories'][$run]['partner'][$run2]['partner_text'] = cs_secure($cs_partner[$run2]['partner_text'], 1);
        $data['categories'][$run]['partner'][$run2]['partner_alt'] = cs_secure($cs_partner[$run2]['partner_alt']);
        $place = "uploads/partner/";
        $data['categories'][$run]['partner'][$run2]['partner_limg'] = cs_html_link('http://' . $cs_partner[$run2]['partner_url'], cs_html_img($place . $cs_partner[$run2]['partner_limg'], 0, 0, 0, $cs_partner[$run2]['partner_alt']));
    }
}
echo cs_subtemplate(__FILE__, $data, 'partner', 'list');
开发者ID:aberrios,项目名称:WEBTHESGO,代码行数:30,代码来源:list.php

示例3: getimagesize

if (empty($cs_clan['clans_picture'])) {
    $data['clans']['img'] = $cs_lang['nopic'];
} else {
    $place = 'uploads/clans/' . $cs_clan['clans_picture'];
    $size = getimagesize($cs_main['def_path'] . '/' . $place);
    $data['clans']['img'] = cs_html_img($place, $size[1], $size[0]);
}
$data['clans']['short'] = cs_secure($cs_clan['clans_short']);
if (!empty($cs_clan['clans_country'])) {
    include_once 'lang/' . $account['users_lang'] . '/countries.php';
    $data['clans']['country'] = cs_html_img('symbols/countries/' . $cs_clan['clans_country'] . '.png', 11, 16) . ' ' . $cs_country[$cs_clan['clans_country']];
} else {
    $data['clans']['country'] = '-';
}
if (!empty($cs_clan['clans_url'])) {
    $data['clans']['url'] = cs_html_link('http://' . $cs_clan['clans_url'], cs_secure($cs_clan['clans_url']));
} else {
    $data['clans']['url'] = '';
}
if (!empty($cs_clan['clans_since'])) {
    $content = cs_date('date', $cs_clan['clans_since']);
    $birth = explode('-', $cs_clan['clans_since']);
    $age = cs_datereal('Y') - $birth[0];
    if (cs_datereal('m') <= $birth[1]) {
        $age--;
    }
    if (cs_datereal('d') >= $birth[2] and cs_datereal('m') == $birth[1]) {
        $age++;
    }
    $content .= ' (' . $age . ')';
    $data['clans']['since'] = $content;
开发者ID:aberrios,项目名称:WEBTHESGO,代码行数:31,代码来源:view.php

示例4: explode

        } else {
            $temp_mirror = explode("\n", $cs_news['news_mirror']);
            $temp_mirror_name = explode("\n", $cs_news['news_mirror_name']);
            $run_loop_2 = count($temp_mirror);
        }
        $prev_run = 0;
        for ($run_prev = 1; $run_prev < $run_loop_2; $run_prev++) {
            $num = $run_prev;
            if ($run_prev == count($temp_mirror) - 1) {
                $data['prev_mirror'][$prev_run]['dot'] = '';
            } elseif (!empty($run_prev)) {
                $data['prev_mirror'][$prev_run]['dot'] = ' - ';
            } else {
                $data['prev_mirror'][$prev_run]['dot'] = ' - ';
            }
            $data['prev_mirror'][$prev_run]['news_mirror'] = cs_html_link($temp_mirror[$run_prev], $temp_mirror_name[$run_prev]);
            $prev_run++;
        }
    }
    $data['if']['preview'] = true;
}
if (isset($_POST['mirror'])) {
    $cs_news['categories_id'] = empty($_POST['categories_name']) ? $_POST['categories_id'] : cs_categories_create('news', $_POST['categories_name']);
    $cs_news['news_close'] = isset($_POST['news_close']) ? $_POST['news_close'] : 0;
    $cs_news['news_public'] = isset($_POST['news_public']) ? $_POST['news_public'] : 0;
    $cs_news['news_attached'] = isset($_POST['news_attached']) ? $_POST['news_attached'] : 0;
    $cs_news['news_headline'] = $_POST['news_headline'];
    $cs_news['news_time'] = cs_time();
    $cs_news['news_publishs_at'] = isset($_POST['publish_at']) ? cs_datepost('date', 'unix') : 0;
    $cs_news['news_readmore_active'] = isset($_POST['news_readmore_active']) ? $_POST['news_readmore_active'] : 0;
    $cs_news['news_text'] = empty($cs_main['rte_html']) ? $_POST['news_text'] : cs_abcode_inhtml($_POST['news_text'], 'add');
开发者ID:aberrios,项目名称:WEBTHESGO,代码行数:31,代码来源:create.php

示例5: cs_translate

<?php

// ClanSphere 2010 - www.clansphere.net
// $Id$
$cs_lang = cs_translate('links');
$data = array();
$links_count = cs_sql_count(__FILE__, 'links', 'links_sponsor = 1');
$data['head']['body'] = sprintf($cs_lang['all1'], $links_count);
$select = 'links_name, links_url, links_banner, links_info';
$data['links'] = cs_sql_select(__FILE__, 'links', $select, 'links_sponsor = 1', 0, 0, 0);
$links_loop = count($data['links']);
for ($run = 0; $run < $links_loop; $run++) {
    $data['links'][$run]['name'] = cs_secure($data['links'][$run]['links_name']);
    $target = 'http://' . $data['links'][$run]['links_url'];
    $data['links'][$run]['url_img'] = cs_html_link($target, $data['links'][$run]['links_url']);
    if (!empty($data['links'][$run]['links_banner'])) {
        $place = 'uploads/links/' . $data['links'][$run]['links_banner'];
        $img = cs_html_img($place, 0, 0, 0, $data['links'][$run]['links_name']);
        $data['links'][$run]['url_img'] = cs_html_link($target, $img);
    }
    $data['links'][$run]['info'] = cs_secure($data['links'][$run]['links_info'], 1, 1, 1, 1);
}
echo cs_subtemplate(__FILE__, $data, 'links', 'sponsors');
开发者ID:aberrios,项目名称:WEBTHESGO,代码行数:23,代码来源:sponsors.php

示例6: cs_translate

<?php

// ClanSphere 2010 - www.clansphere.net
// $Id$
$cs_temp = cs_translate('clansphere');
$dir = empty($_GET['dir']) ? '' : $_GET['dir'];
if (empty($dir) or !preg_match("=^[_a-z0-9-]+\$=i", $dir)) {
    $dir = $cs_main['def_tpl'];
}
include 'templates/' . $dir . '/info.php';
$data['temp_view']['name'] = $mod_info['name'];
$data['temp_view']['version'] = $mod_info['version'];
$data['temp_view']['mod_released'] = cs_date('date', $mod_info['released']);
$data['temp_view']['creator'] = $mod_info['creator'];
$data['temp_view']['mod_team'] = $mod_info['team'];
$data['temp_view']['mod_url'] = cs_html_link('http://' . $mod_info['url'], $mod_info['url']);
$data['temp_view']['mod_desc'] = $mod_info['text'];
echo cs_subtemplate(__FILE__, $data, 'clansphere', 'temp_view');
开发者ID:aberrios,项目名称:WEBTHESGO,代码行数:18,代码来源:temp_view.php

示例7: explode

        }
    }
    $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']);
}
开发者ID:aberrios,项目名称:WEBTHESGO,代码行数:31,代码来源:view.php

示例8: cs_html_option

        $mods['dir'] == $where ? $sel = 1 : ($sel = 0);
        $data['mod'][$run]['sel'] = cs_html_option($mods['name'], $mods['dir'], $sel);
        $run++;
    }
}
$data['head']['getmsg'] = cs_getmsg();
$data['sort']['name'] = cs_sort('categories', 'manage', $start, $where, 1, $sort);
$data['sort']['url'] = cs_sort('categories', 'manage', $start, $where, 3, $sort);
$select = 'categories_id, categories_name, categories_url, categories_subid';
$data['cat'] = cs_sql_select(__FILE__, 'categories', $select, $mdp, $order, $start, $account['users_limit']);
$data['cat'] = cs_catsort($data['cat']);
$categories_loop = !empty($data['cat']) ? count($data['cat']) : '';
for ($run = 0; $run < $categories_loop; $run++) {
    $blank = '';
    if (!empty($data['cat'][$run]['layer'])) {
        for ($i = 0; $i < $data['cat'][$run]['layer']; $i++) {
            $blank .= '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;';
        }
        $blank .= cs_icon('add_sub_task');
    }
    $data['cat'][$run]['subcat_layer'] = $blank;
    $cs_cat_name = cs_secure($data['cat'][$run]['categories_name']);
    $data['cat'][$run]['category'] = cs_link($cs_cat_name, 'categories', 'view', 'id=' . $data['cat'][$run]['categories_id']);
    $data['cat'][$run]['url'] = '';
    if (!empty($data['cat'][$run]['categories_url'])) {
        $cs_cat_url = cs_secure($data['cat'][$run]['categories_url']);
        $data['cat'][$run]['url'] = cs_html_link('http://' . $cs_cat_url, $cs_cat_url);
    }
    $data['cat'][$run]['id'] = $data['cat'][$run]['categories_id'];
}
echo cs_subtemplate(__FILE__, $data, 'categories', 'manage');
开发者ID:aberrios,项目名称:WEBTHESGO,代码行数:31,代码来源:manage.php

示例9: cs_user

    $nick = $data['squad']['clans_tagpos'] == 1 ? $data['squad']['clans_tag'] . ' ' . $users_nick : $users_nick . ' ' . $data['squad']['clans_tag'];
    $data['members'][$run]['users_url'] = cs_user($data['members'][$run]['users_id'], $data['members'][$run]['users_nick'], $data['members'][$run]['users_active'], $data['members'][$run]['users_delete']);
}
//ranks
$data['if']['rank'] = 0;
if (!empty($account['access_ranks'])) {
    $cells = 'ranks_id, ranks_name, ranks_url, ranks_img, ranks_code';
    $ranks = cs_sql_select(__FILE__, 'ranks', $cells, "squads_id = '" . $squads_id . "'", 'ranks_name', 0, 5);
    $ranks_loop = count($ranks);
    $data['if']['rank'] = empty($ranks_loop) ? FALSE : TRUE;
    for ($run = 0; $run < $ranks_loop; $run++) {
        $ranks[$run]['name'] = cs_secure($ranks[$run]['ranks_name']);
        $ranks[$run]['picture'] = '';
        if (!empty($ranks[$run]['ranks_url']) and $ranks[$run]['ranks_img'] != 'http://') {
            $picture = cs_html_img($ranks[$run]['ranks_img']);
            $ranks[$run]['picture'] = cs_html_link('http://' . $ranks[$run]['ranks_url'], $picture);
        } else {
            $ranks[$run]['picture'] = $ranks[$run]['ranks_code'];
        }
    }
}
$data['ranks'] = !empty($ranks) ? $ranks : array(0 => '');
//awards
$data['if']['award'] = 0;
if (!empty($account['access_awards'])) {
    $from = 'awards aws INNER JOIN {pre}_games gms ON aws.games_id = gms.games_id';
    $select = 'aws.awards_id AS awards_id, aws.awards_time AS awards_time, aws.awards_event AS awards_event, aws.awards_event_url AS awards_event_url, aws.awards_rank AS awards_rank';
    $awards = cs_sql_select(__FILE__, $from, $select, "squads_id = '" . $squads_id . "'", 'awards_time DESC', 0, 5);
    $awards_loop = count($awards);
    $data['if']['award'] = empty($awards_loop) ? FALSE : TRUE;
    $medals = array(1 => 'gold', 2 => 'silber', 3 => 'bronze');
开发者ID:aberrios,项目名称:WEBTHESGO,代码行数:31,代码来源:view.php

示例10: strlen

             $file = $cs_thread_files[$run]['boardfiles_name'];
             $extension = strlen(strrchr($file, "."));
             $name = strlen($file);
             $ext = substr($file, $name - $extension + 1, $name);
             $cs_thread_files[$run]['boardfiles_typ'] = $ext;
         }
         require_once 'mods/clansphere/filetype.php';
         for ($run = 0; $run < $loop_files; $run++) {
             $ext = $cs_thread_files[$run]['boardfiles_typ'];
             $file = $cs_thread_files[$run]['boardfiles_name'];
             if (file_exists('uploads/board/files/' . $cs_thread_files[$run]['boardfiles_id'] . '.' . $ext)) {
                 $file_file = filesize('uploads/board/files/' . $cs_thread_files[$run]['boardfiles_id'] . '.' . $ext);
                 $data['files'][$run]['file'] = cs_filetype($ext) . ' ' . cs_html_link($cs_main['php_self']['dirname'] . 'mods/board/attachment.php?id=' . $cs_thread_files[$run]['boardfiles_id'], $file, 1) . ' (' . cs_filesize($file_file) . ' - ' . $cs_thread_files[$run]['boardfiles_downloaded'] . ' ' . $cs_lang['times'] . ' )';
             } elseif (file_exists('uploads/board/files/' . $file)) {
                 $file_file = filesize('uploads/board/files/' . $file);
                 $data['files'][$run]['file'] = cs_filetype($ext) . ' ' . cs_html_link($cs_main['php_self']['dirname'] . 'mods/board/attachment.php?id=' . $file, $file, 1) . ' (' . cs_filesize($file_file) . ' - ' . $cs_thread_files[$run]['boardfiles_downloaded'] . ' ' . $cs_lang['times'] . ' )';
             } else {
                 $data['files'][$run]['file'] = $cs_lang['no_att_file'];
             }
         }
     }
 }
 //Files Ende
 $data['thread_desc']['signature'] = getUserSignature($data['thread']['users_signature']);
 if (!empty($data['thread']['threads_edit'])) {
     $data['thread_desc']['checkedit'] = checkLastEdit($data['thread']['threads_edit'], $cs_lang);
 }
 //board_safemode($data['thread']['users_nick'], $data['thread']['threads_time'], $options);
 $data['thread_desc']['laston'] = cs_userstatus($data['thread']['users_laston'], $data['thread']['users_invisible'], 1);
 //echo cs_html_hr('100%');
 $data['thread_desc']['users_icons'] = getUserIcons($cs_lang, $data['thread']['users_id'], $data['thread']['users_nick'], $data['thread']['users_hidden'], $data['thread']['users_email'], $data['thread']['users_icq'], $data['thread']['users_jabber'], $data['thread']['users_url'], $data['thread']['users_skype']);
开发者ID:aberrios,项目名称:WEBTHESGO,代码行数:31,代码来源:thread.php

示例11: strlen

$data['link']['attachments_count'] = $count_att;
if (empty($count_att)) {
    $data['attachments'] = '';
}
require_once 'mods/clansphere/filetype.php';
for ($run = 0; $run < $count_att; $run++) {
    $file = $cs_att[$run]['boardfiles_name'];
    $extension = strlen(strrchr($file, "."));
    $name = strlen($file);
    $ext = substr($file, $name - $extension + 1, $name);
    $ext_lower = strtolower($ext);
    $data['attachments'][$run]['img'] = cs_filetype($ext_lower);
    if (file_exists('uploads/board/files/' . $cs_att[$run]['boardfiles_id'] . '.' . $ext)) {
        $file_file = filesize('uploads/board/files/' . $cs_att[$run]['boardfiles_id'] . '.' . $ext);
        $data['attachments'][$run]['filename'] = cs_html_link('mods/board/attachment.php?id=' . $cs_att[$run]['boardfiles_id'], $file, 1);
        $data['attachments'][$run]['size'] = cs_filesize($file_file);
    } elseif (file_exists('uploads/board/files/' . $file)) {
        $file_file = filesize('uploads/board/files/' . $file);
        $data['attachments'][$run]['filename'] = cs_html_link('mods/board/attachment.php?name=' . $file, $file, 1);
        $data['attachments'][$run]['size'] = cs_filesize($file_file);
    } else {
        $data['attachments'][$run]['filename'] = $cs_lang['no_att_exist'];
        $data['attachments'][$run]['size'] = cs_filesize(0);
    }
    $headline = strlen($cs_att[$run]['threads_headline']) <= 15 ? $cs_att[$run]['threads_headline'] : cs_substr($cs_att[$run]['threads_headline'], 0, 15) . '...';
    $data['attachments'][$run]['topics'] = cs_link($headline, 'board', 'thread', 'where=' . $cs_att[$run]['threads_id'], 0, $cs_att[$run]['threads_headline']);
    $data['attachments'][$run]['downloaded'] = $cs_att[$run]['boardfiles_downloaded'];
    $img_del = cs_icon('editdelete', 16, $cs_lang['remove']);
    $data['attachments'][$run]['remove'] = cs_link($img_del, 'board', 'delatt', 'id=' . $cs_att[$run]['boardfiles_id'], 0, $cs_lang['remove']);
}
echo cs_subtemplate(__FILE__, $data, 'board', 'attachments');
开发者ID:aberrios,项目名称:WEBTHESGO,代码行数:31,代码来源:attachments.php

示例12: cs_translate

if (empty($dir) or !preg_match("=^[_a-z0-9-]+\$=i", $dir)) {
    $dir = $cs_main['def_mod'];
}
$cs_lang_mod = cs_translate('modules', 1);
$cs_lang_acc = cs_translate('access', 1);
include 'mods/' . $dir . '/info.php';
$cs_lang = empty($cs_lang) ? array() : $cs_lang;
# combine translations of target info file with mods access and modules
$cs_lang = array_merge($cs_lang, $cs_lang_acc, $cs_lang_mod);
$data['mod']['name'] = $mod_info['name'];
$data['mod']['version'] = $mod_info['version'];
$data['mod']['released'] = cs_date('date', $mod_info['released']);
$data['mod']['protected'] = empty($mod_info['protected']) ? $cs_lang['no'] : $cs_lang['yes'];
$data['mod']['creator'] = $mod_info['creator'];
$data['mod']['team'] = $mod_info['team'];
$data['mod']['url'] = cs_html_link('http://' . $mod_info['url'], $mod_info['url']);
$data['mod']['icon_48'] = empty($mod_info['icon']) ? '' : cs_icon($mod_info['icon'], '48');
$data['mod']['icon_16'] = empty($mod_info['icon']) ? '' : cs_icon($mod_info['icon']);
$data['mod']['text'] = $mod_info['text'];
if (!empty($account['access_explorer'])) {
    $data['if']['access_explorer'] = TRUE;
    include_once 'mods/explorer/functions.php';
    $more = 'dir=' . cs_explorer_path('mods/' . $dir, 'escape');
    $data['extended']['link'] = cs_link($cs_lang['jump_to_explorer'], 'explorer', 'roots', $more);
}
if (file_exists('mods/' . $dir . '/access.php')) {
    $sort = empty($_REQUEST['sort']) ? 2 : $_REQUEST['sort'];
    $data['sort']['file'] = cs_sort('modules', 'view', 0, 0, 1, $sort, 'dir=' . $dir);
    $data['sort']['access'] = cs_sort('modules', 'view', 0, 0, 3, $sort, 'dir=' . $dir);
    $axx_file = array();
    include 'mods/' . $dir . '/access.php';
开发者ID:aberrios,项目名称:WEBTHESGO,代码行数:31,代码来源:view.php

示例13: cs_translate

<?php

// ClanSphere 2010 - www.clansphere.net
// $Id$
$cs_lang = cs_translate('abcode');
$name = empty($_GET['name']) ? '' : $_GET['name'];
$name = preg_replace('/[^\\w]/s', '', $name);
$where = "abcode_func = 'img'";
$cs_abcode = cs_sql_select(__FILE__, 'abcode', '*', $where, 'abcode_pattern ASC', 0, 0);
$abcode_loop = count($cs_abcode);
for ($run = 0; $run < $abcode_loop; $run++) {
    $data['abcode'][$run]['pattern'] = cs_secure($cs_abcode[$run]['abcode_pattern']);
    $img = cs_secure($cs_abcode[$run]['abcode_pattern'], 1, 1);
    $url = "javascript:abc_insert_list('" . $cs_abcode[$run]['abcode_pattern'] . "','','" . $name . "')";
    $data['abcode'][$run]['result'] = cs_html_link($url, $img, 0);
}
echo cs_subtemplate(__FILE__, $data, 'abcode', 'listimg');
开发者ID:aberrios,项目名称:WEBTHESGO,代码行数:17,代码来源:listimg.php

示例14: cs_cspnews

function cs_cspnews($all = 0)
{
    $remote_url_secnews = 'http://www.clansphere.net/clansphere/updates.txt';
    $remote_url_newsid = 'http://www.clansphere.net/index/news/view/id/';
    $timeout = 5;
    $content = '';
    global $cs_lang, $cs_main;
    $cs_lang = cs_translate('clansphere');
    cs_cache_delete('op_clansphere');
    $id = empty($_GET['sec_news']) ? 0 : (int) $_GET['sec_news'];
    $data['if']['one'] = false;
    $data['if']['all'] = false;
    $allow_url_fopen = ini_get('allow_url_fopen');
    if (empty($allow_url_fopen)) {
        $error = $cs_lang['need_url_fopen'];
    } else {
        if (!empty($id) and empty($all)) {
            $opt_where = "options_mod = 'clansphere' AND options_name = 'sec_last'";
            cs_sql_update(__FILE__, 'options', array('options_value'), array($id), 0, $opt_where);
        } else {
            $opt_where = "options_mod = 'clansphere' AND options_name = 'sec_time'";
            cs_sql_update(__FILE__, 'options', array('options_value'), array(cs_time()), 0, $opt_where);
            ini_set("default_socket_timeout", $timeout);
            $rfp = fopen($remote_url_secnews, 'r');
            if (is_resource($rfp)) {
                stream_set_timeout($rfp, $timeout);
                $content = fread($rfp, 4096);
                fclose($rfp);
            }
            if (!empty($content)) {
                $content = str_replace(array("\r", "\n"), '', $content);
                $news = explode(';', $content);
                $content = explode('@', $news[0]);
                if ($content[0] > $cs_main['sec_news']) {
                    $opt_where = "options_mod = 'clansphere' AND options_name = 'sec_news'";
                    $sec_news = (int) $content[0];
                    cs_sql_update(__FILE__, 'options', array('options_value'), array($sec_news), 0, $opt_where);
                }
                if (empty($all)) {
                    if ($content[0] > $cs_main['sec_last']) {
                        $url = $remote_url_newsid . $content[0];
                        $data['info']['text'] = htmlentities($content[1], ENT_QUOTES, $cs_main['charset']);
                        $data['info']['view'] = cs_html_link($url, $cs_lang['view']);
                        $data['info']['read'] = cs_link($cs_lang['read'], 'clansphere', 'sec_news', 'sec_news=' . $content[0]);
                        $data['info']['showall'] = cs_link($cs_lang['showall'], 'clansphere', 'sec_news');
                        $data['if']['one'] = true;
                        $data['if']['all'] = false;
                        return cs_subtemplate(__FILE__, $data, 'clansphere', 'news');
                    }
                } else {
                    $data['if']['one'] = false;
                    $data['if']['all'] = true;
                    $count = count($news) - 1;
                    for ($run = 0; $run < $count; $run++) {
                        $content = explode("@", $news[$run]);
                        $data['infos'][$run]['text'] = cs_secure($content[1]);
                        $url = $remote_url_newsid . $content[0];
                        $data['infos'][$run]['view'] = cs_html_link($url, $cs_lang['view']);
                    }
                    return cs_subtemplate(__FILE__, $data, 'clansphere', 'news');
                }
            }
        }
    }
}
开发者ID:aberrios,项目名称:WEBTHESGO,代码行数:65,代码来源:sec_func.php

示例15: sprintf

     if (!empty($check_name)) {
         $error .= sprintf($cs_lang['name_exists'], $cs_links['links_name']) . cs_html_br(1);
     }
 } else {
     $error .= $cs_lang['no_name'] . cs_html_br(1);
 }
 if (empty($cs_links['categories_id'])) {
     $error .= $cs_lang['no_cat'] . cs_html_br(1);
 }
 //check url
 if (!empty($cs_links['links_url'])) {
     $where = "links_url = '" . $cs_links['links_url'] . "'";
     $check_url = cs_sql_count(__FILE__, 'links', $where);
     if (!empty($check_url)) {
         $link_exists = cs_sql_select(__FILE__, 'links', 'links_name', $where);
         $url = cs_html_link($cs_links['links_url'], $cs_links['links_url']);
         $error .= sprintf($cs_lang['url_exists'], $link_exists['links_name'], $url) . cs_html_br(1);
     }
 } else {
     $error .= $cs_lang['no_url'] . cs_html_br(1);
 }
 if (empty($cs_links['links_stats'])) {
     $error .= $cs_lang['no_status'] . cs_html_br(1);
 }
 if (empty($cs_links['links_info'])) {
     $error .= $cs_lang['no_info'] . cs_html_br(1);
 }
 $img_size = false;
 if (!empty($files_gl['symbol']['tmp_name'])) {
     $img_size = getimagesize($files_gl['symbol']['tmp_name']);
 }
开发者ID:aberrios,项目名称:WEBTHESGO,代码行数:31,代码来源:create.php


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