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


PHP cs_get函数代码示例

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


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

示例1: 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

示例2: cs_translate

<?php

// ClanSphere 2010 - www.clansphere.net
// $Id$
$cs_lang = cs_translate('users');
$cs_get = cs_get('id');
$data = array();
$users_id = empty($cs_get['id']) ? 0 : $cs_get['id'];
$nick_temp = cs_sql_select(__FILE__, 'users', 'users_nick', 'users_id = ' . $users_id);
if (isset($_GET['agree'])) {
    $nick = $nick_temp['users_nick'];
    $chars = 'abcdefghijklmnopqrstuvwxyz0123456789';
    $chars_count = strlen($chars) - 1;
    $mail = '';
    $given = 1;
    while (!empty($given)) {
        for ($i = 0; $i < 40; $i++) {
            $rand = rand(0, $chars_count);
            $mail .= $chars[$rand];
        }
        $given = cs_sql_count(__FILE__, 'users', "users_email = '" . $mail . "'");
    }
    $array_data = array('access_id' => 0, 'users_nick' => $nick, 'users_pwd' => '', 'users_name' => '', 'users_surname' => '', 'users_sex' => '', 'users_age' => '', 'users_height' => 0, 'users_lang' => '', 'users_country' => "fam", 'users_postalcode' => '', 'users_place' => '', 'users_adress' => '', 'users_icq' => 0, 'users_jabber' => '', 'users_skype' => '', 'users_email' => $mail, 'users_url' => '', 'users_phone' => '', 'users_mobile' => '', 'users_laston' => 0, 'users_picture' => '', 'users_avatar' => '', 'users_signature' => '', 'users_info' => '', 'users_regkey' => '', 'users_register' => 0, 'users_delete' => 1);
    $array_keys = array_keys($array_data);
    $array_values = array_values($array_data);
    cs_sql_update(__FILE__, 'users', $array_keys, $array_values, $users_id);
    cs_sql_delete(__FILE__, 'members', $users_id, 'users_id');
    cs_cache_clear();
    cs_redirect($cs_lang['del_true'], 'users');
}
if (isset($_GET['cancel'])) {
开发者ID:aberrios,项目名称:WEBTHESGO,代码行数:31,代码来源:remove.php

示例3: cs_translate

<?php

// ClanSphere 2010 - www.clansphere.net
// $Id$
$cs_lang = cs_translate('linkus');
$cs_post = cs_post('start,sort');
$cs_get = cs_get('start,sort');
$data = array();
$start = empty($cs_get['start']) ? 0 : $cs_get['start'];
if (!empty($cs_post['start'])) {
    $start = $cs_post['start'];
}
$sort = empty($cs_get['sort']) ? 2 : $cs_get['sort'];
if (!empty($cs_post['sort'])) {
    $sort = $cs_post['sort'];
}
$cs_sort[1] = 'linkus_name DESC';
$cs_sort[2] = 'linkus_name ASC';
$cs_sort[3] = 'linkus_banner DESC';
$cs_sort[4] = 'linkus_banner ASC';
$order = $cs_sort[$sort];
$linkus_count = cs_sql_count(__FILE__, 'linkus');
$data['head']['count'] = $linkus_count;
$data['head']['pages'] = cs_pages('linkus', 'manage', $linkus_count, $start, 0, $sort);
$data['head']['getmsg'] = cs_getmsg();
$data['sort']['name'] = cs_sort('linkus', 'manage', $start, 0, 1, $sort);
$data['sort']['banner'] = cs_sort('linkus', 'manage', $start, 0, 3, $sort);
$select = 'linkus_id, linkus_name, linkus_banner';
$data['linkus'] = cs_sql_select(__FILE__, 'linkus', $select, 0, $order, $start, $account['users_limit']);
$linkus_loop = count($data['linkus']);
for ($run = 0; $run < $linkus_loop; $run++) {
开发者ID:aberrios,项目名称:WEBTHESGO,代码行数:31,代码来源:manage.php

示例4: cs_translate

<?php

// ClanSphere 2010 - www.clansphere.net
// $Id$
$cs_lang = cs_translate('news');
$cs_get = cs_get('id,where');
$cs_option = cs_sql_option(__FILE__, 'news');
$abcode = explode(",", $cs_option['abcode']);
$cs_news_id = empty($cs_get['id']) ? 0 : $cs_get['id'];
if (!empty($cs_get['where'])) {
    $cs_news_id = $cs_get['where'];
}
$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]);
开发者ID:aberrios,项目名称:WEBTHESGO,代码行数:31,代码来源:view.php

示例5: cs_translate

<?php

// ClanSphere 2010 - www.clansphere.net
// $Id$
$cs_lang = cs_translate('gallery', 1);
$cs_post = cs_post('id,cat_id,start');
$cs_get = cs_get('id_cat_id,start');
$data = array();
$id = empty($cs_get['id']) ? 0 : $cs_get['id'];
if (!empty($cs_post['id'])) {
    $id = $cs_post['id'];
}
$cat_id = empty($cs_get['cat_id']) ? 0 : $cs_get['cat_id'];
if (!empty($cs_post['cat_id'])) {
    $cat_id = $cs_post['cat_id'];
}
$start = empty($cs_get['start']) ? 0 : $cs_get['start'];
if (!empty($cs_post['start'])) {
    $start = $cs_post['start'];
}
require_once 'mods/gallery/functions.php';
$options = cs_sql_option(__FILE__, 'gallery');
$cols = $options['cols'];
$rows = $options['rows'];
$cols_rows = $account['users_limit'];
$access_id = $account['access_usersgallery'];
$data['lang']['getmsg'] = cs_getmsg();
$data['data']['addons'] = cs_addons('users', 'view', $id, 'usersgallery');
if (!empty($id)) {
    if (empty($cat_id)) {
        $from = 'usersgallery';
开发者ID:aberrios,项目名称:WEBTHESGO,代码行数:31,代码来源:users.php

示例6: cs_translate

<?php

// ClanSphere 2010 - www.clansphere.net
// $Id$
$cs_lang = cs_translate('gallery', 1);
$cs_post = cs_post('id,cat_id,more,move');
$cs_get = cs_get('id_cat_id,more,move');
$id = empty($cs_get['id']) ? 0 : $cs_get['id'];
if (!empty($cs_post['id'])) {
    $id = $cs_post['id'];
}
$cat_id = empty($cs_get['cat_id']) ? 0 : $cs_get['cat_id'];
if (!empty($cs_post['cat_id'])) {
    $cat_id = $cs_post['cat_id'];
}
$detail = empty($cs_get['more']) ? 0 : $cs_get['more'];
if (!empty($cs_post['more'])) {
    $more = $cs_post['more'];
}
$move = empty($cs_get['move']) ? 0 : $cs_get['move'];
if (!empty($cs_post['move'])) {
    $move = $cs_post['move'];
}
$access_id = $account['access_usersgallery'];
$cs_options = cs_sql_option(__FILE__, 'gallery');
$data['data']['addons'] = cs_addons('users', 'view', $id, 'usersgallery');
$data['if']['error'] = FALSE;
$data['if']['view'] = FALSE;
$data['if']['details'] = FALSE;
$data['if']['vote'] = FALSE;
$select = 'usersgallery_id , usersgallery_name, usersgallery_titel, usersgallery_download, ';
开发者ID:aberrios,项目名称:WEBTHESGO,代码行数:31,代码来源:com_view.php

示例7: cs_translate

<?php

// ClanSphere 2010 - www.clansphere.net
// $Id$
$cs_lang = cs_translate('gbook');
$cs_post = cs_post('start');
$cs_get = cs_get('start');
$start = empty($cs_get['start']) ? 0 : $cs_get['start'];
if (!empty($cs_post['start'])) {
    $start = $cs_post['start'];
}
$gbook_count = cs_sql_count(__FILE__, 'gbook', "gbook_users_id = '0' AND gbook_lock = '1'");
$data['head']['entry'] = cs_link($cs_lang['submit'], 'gbook', 'entry', 'id=0&amp;from=list');
$data['head']['count'] = $gbook_count;
$data['head']['pages'] = cs_pages('gbook', 'list', $gbook_count, $start);
$data['head']['getmsg'] = cs_getmsg();
$from = 'gbook gbk LEFT JOIN {pre}_users usr ON gbk.users_id = usr.users_id';
$select = 'gbk.gbook_id AS gbook_id, gbk.users_id AS users_id, gbk.gbook_time AS gbook_time, gbk.gbook_nick AS gbook_nick, ';
$select .= 'gbk.gbook_email AS gbook_email, gbk.gbook_icq AS gbook_icq, gbk.gbook_jabber AS gbook_jabber, gbk.gbook_skype AS gbook_skype, ';
$select .= 'gbk.gbook_url AS gbook_url, gbk.gbook_town AS gbook_town, gbk.gbook_text AS gbook_text, gbk.gbook_ip AS gbook_ip, ';
$select .= 'usr.users_nick AS users_nick, usr.users_place AS users_place, usr.users_icq AS users_icq, usr.users_jabber AS users_jabber, ';
$select .= 'usr.users_skype AS users_skype, usr.users_email AS users_email, usr.users_url AS users_url, usr.users_hidden AS users_hidden, usr.users_active AS users_active, usr.users_delete AS users_delete';
$where = "gbook_users_id = '0' AND gbook_lock = '1'";
$order = 'gbk.gbook_id DESC';
$cs_gbook = cs_sql_select(__FILE__, $from, $select, $where, $order, $start, $account['users_limit']);
$gbook_loop = count($cs_gbook);
$c = 0;
for ($run = 0; $run < $gbook_loop; $run++) {
    $entry_count = $gbook_count - $start - $c;
    $c++;
    $gbook[$run]['entry_count'] = $entry_count;
开发者ID:aberrios,项目名称:WEBTHESGO,代码行数:31,代码来源:list.php

示例8: cs_translate

<?php

// ClanSphere 2010 - www.clansphere.net
// $Id$
$cs_lang = cs_translate('gbook');
$cs_post = cs_post('id,from');
$cs_get = cs_get('id,from');
$data = array();
$from = 'list';
$id = empty($cs_get['id']) ? 0 : $cs_get['id'];
if (!empty($cs_post['id'])) {
    $id = $cs_post['id'];
}
if (!empty($_POST['from'])) {
    $from = $_POST['from'];
} elseif (!empty($_GET['from'])) {
    $from = $_GET['from'];
}
$from = cs_secure($from, 0, 0, 0, 0, 0);
$cs_options = cs_sql_option(__FILE__, 'gbook');
$users_id = $account['users_id'];
$error = '';
$ip = cs_getip();
//check if user exists
if ($id != 0) {
    $users_check = cs_sql_count(__FILE__, 'users', "users_id = '" . (int) $id . "'");
    if (empty($users_check)) {
        cs_redirect($cs_lang['user_not_exist'], 'gbook', 'list');
    }
    if ($users_id == 0) {
        $error .= $cs_lang['error_login'] . cs_html_br(1);
开发者ID:aberrios,项目名称:WEBTHESGO,代码行数:31,代码来源:entry.php

示例9: cs_translate

<?php

// ClanSphere 2010 - www.clansphere.net
// $Id$
$cs_lang = cs_translate('news');
$data = array();
$cs_post = cs_post('where');
$cs_get = cs_get('where');
require_once 'mods/categories/functions.php';
$cat_id = empty($cs_get['where']) ? 0 : $cs_get['where'];
if (!empty($cs_post['where'])) {
    $cat_id = $cs_post['where'];
}
$cs_option = cs_sql_option(__FILE__, 'news');
$abcode = explode(",", $cs_option['abcode']);
$where = "nws.news_public = 1 AND cat.categories_access <= " . $account['access_news'];
if (!empty($cat_id)) {
    $cat_where = 'categories_subid = ' . $cat_id;
    $categories = cs_sql_select(__FILE__, 'categories', 'categories_id', $cat_where, 0, 0, 0);
    if (!empty($categories)) {
        $where .= " AND (cat.categories_id = '" . $cat_id . "'";
        for ($a = 0; $a < count($categories); $a++) {
            $where .= " OR cat.categories_id = '" . $categories[$a]['categories_id'] . "'";
        }
        $where .= ")";
    } else {
        $where .= " AND cat.categories_id = '" . $cat_id . "'";
    }
}
$start = empty($_REQUEST['start']) ? 0 : (int) $_REQUEST['start'];
$data['cats']['dropdown'] = cs_categories_dropdown2('news', $cat_id, 0, 'where');
开发者ID:aberrios,项目名称:WEBTHESGO,代码行数:31,代码来源:recent.php

示例10: cs_translate

<?php

// ClanSphere 2010 - www.clansphere.net
// $Id$
$cs_lang = cs_translate('wars');
$cs_get = cs_get('catid,squadid');
$cs_option = cs_sql_option(__FILE__, 'wars');
$data = array();
$select = 'war.games_id AS games_id, cln.clans_short AS clans_short, war.wars_score1 AS wars_score1, ' . 'war.wars_score2 AS wars_score2, war.wars_date AS wars_date, war.wars_id AS wars_id';
$from = 'wars war INNER JOIN {pre}_clans cln ON war.clans_id = cln.clans_id';
$order = 'war.wars_date DESC';
$where = empty($cs_get['squadid']) ? 'war.wars_status = \'played\'' : 'war.wars_status = \'played\' AND war.squads_id = ' . $cs_get['squadid'];
if (!empty($cs_get['catid'])) {
    $where .= ' AND war.categories_id = ' . $cs_get['catid'];
}
$cs_wars = cs_sql_select(__FILE__, $from, $select, $where, $order, 0, $cs_option['max_navlist']);
if (!empty($cs_wars)) {
    if ($cs_option['max_navlist'] == 1) {
        $cs_wars = array(0 => $cs_wars);
    }
    $all = count($cs_wars);
    for ($i = 0; $i < $all; $i++) {
        $cs_wars[$i]['game_icon'] = file_exists('uploads/games/' . $cs_wars[$i]['games_id'] . '.gif') ? cs_html_img('uploads/games/' . $cs_wars[$i]['games_id'] . '.gif') : '';
        $secure_short = cs_secure($cs_wars[$i]['clans_short']);
        $cs_wars[$i]['enemy'] = cs_link($secure_short, 'wars', 'view', 'id=' . $cs_wars[$i]['wars_id']);
        $result = $cs_wars[$i]['wars_score1'] - $cs_wars[$i]['wars_score2'];
        $icon = $result > 0 ? 'green' : 'red';
        if (empty($result)) {
            $icon = 'grey';
        }
        $cs_wars[$i]['icon'] = cs_html_img('symbols/clansphere/' . $icon . '.gif');
开发者ID:aberrios,项目名称:WEBTHESGO,代码行数:31,代码来源:navlist.php


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