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


PHP cs_post函数代码示例

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


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

示例1: cs_translate

<?php

// ClanSphere 2010 - www.clansphere.net
// $Id$
$cs_lang = cs_translate('gbook');
$cs_post = cs_post('where,start,sort');
$cs_get = cs_get('where,start,sort');
$data = array();
if (!empty($_GET['active'])) {
    cs_sql_update(__FILE__, 'gbook', array('gbook_lock'), array('1'), (int) $_GET['active']);
    cs_redirectmsg($cs_lang['active_done']);
}
if (!empty($_GET['deactive'])) {
    cs_sql_update(__FILE__, 'gbook', array('gbook_lock'), array('0'), (int) $_GET['deactive']);
    cs_redirectmsg($cs_lang['deactive_done']);
}
$id = empty($cs_get['where']) ? 0 : $cs_get['where'];
if (!empty($cs_post['where'])) {
    $id = $cs_post['where'];
}
$start = empty($cs_get['start']) ? 0 : $cs_get['start'];
if (!empty($cs_post['start'])) {
    $start = $cs_post['start'];
}
$sort = empty($cs_get['sort']) ? 1 : $cs_get['sort'];
if (!empty($cs_post['sort'])) {
    $sort = $cs_post['sort'];
}
$cs_sort[1] = 'gbk.gbook_time DESC';
$cs_sort[2] = 'gbk.gbook_time ASC';
$cs_sort[3] = 'usr.users_email DESC';
开发者ID:aberrios,项目名称:WEBTHESGO,代码行数:31,代码来源:manage.php

示例2: cs_translate

<?php

// ClanSphere 2010 - www.clansphere.net
// $Id$
$cs_lang = cs_translate('gallery', 1);
$cs_post = cs_post('id');
$cs_get = cs_get('id');
$data = array();
require_once 'mods/gallery/functions.php';
$gallery_id = empty($cs_get['id']) ? 0 : $cs_get['id'];
if (!empty($cs_post['id'])) {
    $gallery_id = $cs_post['id'];
}
settype($gallery_id, 'integer');
$edit = cs_sql_select(__FILE__, 'usersgallery', '*', "usersgallery_id = '" . (int) $gallery_id . "'");
$cs_option = cs_sql_option(__FILE__, 'gallery');
$gallery_count_reset = 0;
$new_time = 0;
if (isset($_POST['submit'])) {
    $edit['usersgallery_titel'] = $_POST['gallery_titel'];
    $edit['folders_id'] = empty($_POST['folders_name']) ? $_POST['folders_id'] : make_folders_create('usersgallery', $_POST['folders_name'], $account['users_id']);
    $edit['usersgallery_access'] = $_POST['gallery_access'];
    $edit['usersgallery_status'] = $_POST['gallery_status'];
    $edit['usersgallery_description'] = $_POST['gallery_description'];
    $edit['usersgallery_vote'] = isset($_POST['gallery_vote']) ? $_POST['gallery_vote'] : 0;
    if (!empty($_POST['new_time'])) {
        $edit['usersgallery_time'] = cs_time();
    }
    if (!empty($_POST['gallery_count_reset'])) {
        $edit['usersgallery_count'] = 0;
    }
开发者ID:aberrios,项目名称:WEBTHESGO,代码行数:31,代码来源:users_edit.php

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

示例4: cs_translate

<?php

// ClanSphere 2010 - www.clansphere.net
// $Id$
$cs_lang = cs_translate('files');
$cs_post = cs_post('fid');
$cs_get = cs_get('id');
$fid = empty($cs_post['fid']) ? 0 : $cs_post['fid'];
$quote_id = empty($cs_get['id']) ? 0 : $cs_get['id'];
$cs_files = cs_sql_select(__FILE__, 'files', 'files_close', "files_id = '" . $fid . "'");
require_once 'mods/comments/functions.php';
cs_commments_create($fid, 'files', 'view', $quote_id, $cs_lang['mod_name'], $cs_files['files_close']);
开发者ID:aberrios,项目名称:WEBTHESGO,代码行数:12,代码来源:com_create.php

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

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

示例7: cs_translate

<?php

// ClanSphere 2010 - www.clansphere.net
// $Id$
$cs_lang = cs_translate('ajax');
$cs_post = cs_post('ajax_reload');
$files = cs_files();
if (!empty($cs_post['submit'])) {
    $errors = '';
    if (!empty($files['loading']['tmp_name'])) {
        $ext = strtolower(substr(strrchr($files['loading']['name'], '.'), 1));
        if ($ext != 'gif') {
            $errors .= cs_html_br(1) . '- ' . $cs_lang['ext_only_gif'];
        }
    }
    if (empty($errors)) {
        if (!empty($files['loading']['tmp_name'])) {
            cs_upload('ajax', 'loading.gif', $files['loading']['tmp_name']);
        }
        if (empty($cs_post['ajax'])) {
            $cs_post['ajax_reload'] = 0;
        }
        require_once 'mods/clansphere/func_options.php';
        $save = array();
        $save['ajax'] = empty($cs_post['ajax']) ? '0' : (int) $cs_post['for'];
        $save['ajax_reload'] = $cs_post['ajax_reload'];
        cs_optionsave('clansphere', $save);
        # clear cache to not run into trouble on ajax changes
        cs_cache_clear();
        cs_redirect($cs_lang['success'], 'options', 'roots');
    }
开发者ID:aberrios,项目名称:WEBTHESGO,代码行数:31,代码来源:options.php

示例8: cs_translate

<?php

// ClanSphere 2010 - www.clansphere.net
// $Id$
$cs_lang = cs_translate('gallery');
$cs_post = cs_post('where,folders_id');
$cs_get = cs_get('where,folders_id');
$data = array();
$gid = empty($cs_get['where']) ? 0 : $cs_get['where'];
if (!empty($cs_post['where'])) {
    $gid = $cs_post['where'];
}
$folder_id = empty($cs_get['folders_id']) ? 0 : $cs_get['folders_id'];
if (!empty($cs_post['folders_id'])) {
    $folder_id = $cs_post['folders_id'];
}
require_once 'mods/gallery/functions.php';
$time = cs_time();
$voted_ip = cs_getip();
$exp = extension_loaded('gd');
$option = cs_sql_option(__FILE__, 'gallery');
$id = empty($gid) ? $folder_id : $gid;
$select = 'gallery_id, gallery_name, gallery_titel, gallery_description, ';
$select .= 'gallery_time, gallery_vote, gallery_count, folders_id, users_id';
$where = 'gallery_id = ' . $id . ' AND gallery_status = 1 AND gallery_access <=' . $account['access_gallery'];
$cs_gallery = cs_sql_select(__FILE__, 'gallery', $select, $where);
$gallery_loop = count($cs_gallery);
if (empty($gallery_loop)) {
    $data['head']['error'] = cs_link($cs_lang['mod_name'], 'gallery', 'list') . ' - ' . $cs_lang['head_view'];
    echo cs_subtemplate(__FILE__, $data, 'gallery', 'error');
} else {
开发者ID:aberrios,项目名称:WEBTHESGO,代码行数:31,代码来源:com_view.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


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