本文整理汇总了PHP中param类的典型用法代码示例。如果您正苦于以下问题:PHP param类的具体用法?PHP param怎么用?PHP param使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了param类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: __construct
public function __construct()
{
parent::__construct();
//if (!module_exists(ROUTE_M)) showmessage(L('module_not_exists'));
$this->username = param::get_cookie('admin_username');
$this->db = pc_base::load_model('announce_model');
}
开发者ID:zhouzhouxs,项目名称:Progect,代码行数:7,代码来源:admin_announce.php
示例2: url
function url($action = 'check') {
$modules = '';
$site = getcache('sitelist','commons');
$sitename = $site['1']['name'];
$siturl = $site['1']['domain'];
foreach ($site as $list) $sitelist .= $list['domain'].',';
$pars = array(
'action'=>$action,
'ZLCMS_username'=>'',
'sitename'=>$sitename,
'siteurl'=>$siturl,
'charset'=>CHARSET,
'version'=>PC_VERSION,
'release'=>PC_RELEASE,
'os'=>PHP_OS,
'php'=>phpversion(),
'mysql'=>mysql_get_server_info(),
'browser'=>urlencode($_SERVER['HTTP_USER_AGENT']),
'username'=>urlencode(param::get_cookie('admin_username')),
'email'=> urlencode(param::get_cookie('admin_email')),
'modules'=>ROUTE_M,
'sitelist'=>urlencode($sitelist),
'uuid'=>urlencode($this->uuid),
);
$data = http_build_query($pars);
$verify = md5($this->uuid);
if($s = $this->module()) {
$p = '&p='.$s;
}
return $this->update_url.'?'.$data.'&verify='.$verify.$p;
}
开发者ID:panhongsheng,项目名称:zl_cms,代码行数:31,代码来源:update.class.php
示例3: publish
/**
* ***************************************
* 发表留言外部暴露接口
* ***************************************
*/
public function publish()
{
extract($this->setting);
//是否允许游客发表评论
if (!$allow_guest_post) {
if (!param::get_cookie('_userid') && !$_SESSION['userid']) {
showmessage('您需要登录才可以发表留言', HTTP_REFERER);
}
}
//是否启用了验证码
if ($use_code) {
if (isset($_POST['code'])) {
$code = isset($_POST['code']) && trim($_POST['code']) ? trim($_POST['code']) : showmessage('请输入验证码', HTTP_REFERER);
if ($_SESSION['code'] != strtolower($code)) {
showmessage('验证码错误', HTTP_REFERER);
}
}
}
$r = $this->api->add();
if (false !== $r) {
showmessage('发表成功', HTTP_REFERER);
} else {
showmessage('发表失败', HTTP_REFERER);
}
}
开发者ID:zhouzhouxs,项目名称:Progect,代码行数:30,代码来源:index.php
示例4: init
public function init()
{
$page = isset($_GET['page']) && intval($_GET['page']) ? intval($_GET['page']) : 1;
$userid = param::get_cookie('_userid');
$sql = " `userid` = '{$userid}'";
if (isset($_GET['dosubmit'])) {
$type = isset($_GET['type']) && intval($_GET['type']) ? intval($_GET['type']) : '';
$endtime = isset($_GET['endtime']) && trim($_GET['endtime']) ? strtotime(trim($_GET['endtime'])) : '';
$starttime = isset($_GET['starttime']) && trim($_GET['starttime']) ? strtotime(trim($_GET['starttime'])) : '';
if (!empty($starttime) && empty($endtime)) {
$endtime = SYS_TIME;
}
if (!empty($starttime) && !empty($endtime) && $endtime < $starttime) {
showmessage(L('wrong_time_over_time_to_time_less_than'));
}
if (!empty($starttime)) {
$sql .= $sql ? " AND `creat_at` BETWEEN '{$starttime}' AND '{$endtime}' " : " `creat_at` BETWEEN '{$starttime}' AND '{$endtime}' ";
}
if (!empty($type)) {
$sql .= $sql ? " AND `type` = '{$type}' " : " `type` = '{$type}'";
}
}
$list = $this->spend_db->listinfo($sql, '`id` desc', $page);
$pages = $this->spend_db->pages;
include template('pay', 'spend_list');
}
开发者ID:ahmatjan,项目名称:huluphp,代码行数:26,代码来源:spend_list.php
示例5: editor
function editor($field, $value, $fieldinfo) {
$grouplist = getcache('grouplist','member');
$_groupid = param::get_cookie('_groupid');
$grouplist = $grouplist[$_groupid];
extract($fieldinfo);
extract(string2array($setting));
$disabled_page = isset($disabled_page) ? $disabled_page : 0;
if(!$height) $height = 300;
$allowupload = defined('IN_ADMIN') ? 1 : $grouplist['allowattachment'] ? 1: 0;
if(!$value) $value = $defaultvalue;
if($minlength || $pattern) $allow_empty = '';
if($minlength) $this->formValidator .= '$("#'.$field.'").formValidator({'.$allow_empty.'onshow:"",onfocus:"'.$errortips.'"}).functionValidator({
fun:function(val,elem){
var oEditor = CKEDITOR.instances.'.$field.';
var data = oEditor.getData();
if($(\'#islink\').attr(\'checked\')){
return true;
} else if(($(\'#islink\').attr(\'checked\')==false) && (data==\'\')){
return "'.$errortips.'";
} else if (data==\'\' || $.trim(data)==\'\') {
return "'.$errortips.'";
}
return true;
}
});';
return "<div id='{$field}_tip'></div>".'<textarea name="info['.$field.']" id="'.$field.'" boxid="'.$field.'">'.$value.'</textarea>'.form::editor($field,$toolbar,'content',$this->catid,'',$allowupload,1,'',$height,$disabled_page);
}
开发者ID:hxzyzz,项目名称:ddc,代码行数:27,代码来源:content_form.class.php
示例6: get
function get($data = array())
{
$_roleid = param::get_cookie('_roleid');
$_groupid = param::get_cookie('_groupid');
$this->data = $data;
if (isset($data['id'])) {
$this->id = $data['id'];
}
$info = array();
foreach ($this->fields as $field => $v) {
if (defined('IN_ADMIN')) {
if ($v['disabled'] || $v['iscore'] || check_in($_roleid, $v['unsetroleids']) || check_in($_groupid, $v['unsetgroupids'])) {
continue;
}
} else {
if ($v['disabled'] || $v['iscore'] || !$v['isadd'] || check_in($_roleid, $v['unsetroleids']) || check_in($_groupid, $v['unsetgroupids'])) {
continue;
}
}
$func = $v['formtype'];
$value = isset($data[$field]) ? new_html_special_chars($data[$field]) : '';
if ($func == 'pages' && isset($data['maxcharperpage'])) {
$value = $data['paginationtype'] . '|' . $data['maxcharperpage'];
}
if (!method_exists($this, $func)) {
continue;
}
$form = $this->{$func}($field, $value, $v);
if ($form !== false) {
$star = $v['minlength'] || $v['pattern'] ? 1 : 0;
$info[$field] = array('name' => $v['name'], 'tips' => $v['tips'], 'form' => $form, 'star' => $star, 'isbase' => $v['isbase'], 'isomnipotent' => $v['isomnipotent'], 'formtype' => $v['formtype']);
}
}
return $info;
}
开发者ID:klj123wan,项目名称:czsz,代码行数:35,代码来源:member_form.class.php
示例7: manage
function manage() {
$tree = pc_base::load_sys_class('tree');
$tree->icon = array(' │ ',' ├─ ',' └─ ');
$tree->nbsp = ' ';
$userid = $_SESSION['userid'];
$admin_username = param::get_cookie('admin_username');
$result = $this->db->select('','*','','listorder ASC,id DESC');
foreach($result as $r) {
$r['cname'] = L($r['name'], '', 'member_menu');
$r['str_manage'] = '<a href="?m=member&c=member_menu&a=edit&id='.$r['id'].'&menuid='.$_GET['menuid'].'">'.L('edit').'</a> | <a href="javascript:confirmurl(\'?m=member&c=member_menu&a=delete&id='.$r['id'].'&menuid='.$_GET['menuid'].'\',\''.L('confirm',array('message'=>$r['cname'])).'\')">'.L('delete').'</a> ';
$array[] = $r;
}
$str = "<tr>
<td align='center'><input name='listorders[\$id]' type='text' size='3' value='\$listorder' class='input-text-c'></td>
<td align='center'>\$id</td>
<td >\$spacer\$cname</td>
<td align='center'>\$str_manage</td>
</tr>";
$tree->init($array);
$categorys = $tree->get_tree(0, $str);
include $this->admin_tpl('member_menu');
}
开发者ID:panhongsheng,项目名称:zl_cms,代码行数:25,代码来源:member_menu.php
示例8: vote
function vote($id, $pid)
{
$M = getcache('ask', 'commons');
$M = $M[1];
$_username = param::get_cookie('_username');
$_userid = param::get_cookie('_userid');
$id = intval($id);
$pid = intval($pid);
$userid = intval($_userid);
if (!$id || !$pid || !$userid) {
return false;
}
$r = $this->db->get_one("count(voteid) AS num", $this->db_tablepre . "ask_vote", "askid={$id} AND userid={$userid}");
if ($r['num'] > 0) {
return false;
}
$a = $this->db->get_one('catid', $this->db_tablepre . "ask", "askid={$id} AND siteid=" . $this->siteid);
//检测表
$posts_table_name = $this->posts_table($a['catid']);
$this->table_name = $posts_table_name;
$this->update(array('votecount' => '+=1'), "pid={$pid}");
if ($M['vote_give_credit']) {
$maxnum = floor($M['vote_max_credit'] / $M['vote_give_credit']);
if ($r['num'] <= $maxnum) {
$this->credit->update_credit($_userid, $_username, $M['vote_give_credit'], 1);
pc_base::load_app_class('receipts', 'pay', 0);
receipts::point($M['vote_give_credit'], $_userid, $_username, $flag, 'selfincome', L('votes_the_reward_integral'), $_username);
}
}
$posts['askid'] = $id;
$posts['pid'] = $pid;
$posts['userid'] = $userid;
$posts['addtime'] = SYS_TIME;
return $this->db->insert($posts, $this->db_tablepre . "ask_vote");
}
开发者ID:zhouzhouxs,项目名称:Progect,代码行数:35,代码来源:answer_model.class.php
示例9: __construct
function __construct()
{
$this->db = pc_base::load_model('content_model');
$this->_userid = param::get_cookie('_userid');
$this->_username = param::get_cookie('_username');
$this->_groupid = param::get_cookie('_groupid');
}
开发者ID:hw18708118867,项目名称:htmlmoban,代码行数:7,代码来源:demo.php
示例10: get
function get($data = array())
{
$_groupid = param::get_cookie('_groupid');
$this->data = $data;
if (isset($data['id'])) {
$this->id = $data['id'];
}
$info = array();
$info = array();
if (is_array($this->fields)) {
foreach ($this->fields as $field => $v) {
$func = $v['formtype'];
$value = isset($data[$field]) ? new_html_special_chars($data[$field]) : '';
if ($func == 'pages' && isset($data['maxcharperpage'])) {
$value = $data['paginationtype'] . '|' . $data['maxcharperpage'];
}
if (!method_exists($this, $func)) {
continue;
}
$form = $this->{$func}($field, $value, $v);
if ($form !== false) {
$star = $v['minlength'] || $v['pattern'] ? 1 : 0;
$info[$field] = array('name' => $v['name'], 'tips' => $v['tips'], 'form' => $form, 'star' => $star, 'isomnipotent' => $v['isomnipotent'], 'formtype' => $v['formtype']);
}
}
}
return $info;
}
开发者ID:codercpf,项目名称:privatewk,代码行数:28,代码来源:formguide_form.class.php
示例11: __construct
function __construct()
{
$admin_username = param::get_cookie('admin_username');
$userid = $_SESSION['userid'];
$this->db = pc_base::load_model('badword_model');
parent::__construct();
}
开发者ID:ahmatjan,项目名称:huluphp,代码行数:7,代码来源:badword.php
示例12: __construct
function __construct() {
$this->userid = param::get_cookie('_userid');
if(!$this->userid) {
header("Location: index.php?m=member&c=index&a=login&forward=".urlencode(get_url()));
exit;
}
$this->username = param::get_cookie('_username');
}
开发者ID:panhongsheng,项目名称:zl_cms,代码行数:8,代码来源:readpoint.php
示例13: __construct
function __construct() {
$this->db_config = pc_base::load_config('database');
$this->db_setting = 'default';
$this->table_name = 'message';
$this->_username = param::get_cookie('_username');
$this->_userid = param::get_cookie('_userid');
parent::__construct();
}
开发者ID:panhongsheng,项目名称:zl_cms,代码行数:8,代码来源:message_model.class.php
示例14: __construct
public function __construct() {
$this->message_db = pc_base::load_model('message_model');
$this->message_group_db = pc_base::load_model('message_group_model');
$this->message_data_db = pc_base::load_model('message_data_model');
$this->_username = param::get_cookie('_username');
$this->_userid = param::get_cookie('_userid');
$this->_groupid = get_memberinfo($this->_userid,'groupid');
}
开发者ID:panhongsheng,项目名称:zl_cms,代码行数:8,代码来源:message_tag.class.php
示例15: check_member
/**
* 判断用户是否已经登陆
*/
public final function check_member()
{
$phpcms_auth = param::get_cookie('auth');
if (ROUTE_M == 'member' && ROUTE_C == 'index' && in_array(ROUTE_A, array('login', 'register', 'mini', 'send_newmail'))) {
if ($phpcms_auth && ROUTE_A != 'mini') {
showmessage(L('login_success', '', 'member'), 'index.php?m=member&c=index');
} else {
return true;
}
} else {
//判断是否存在auth cookie
if ($phpcms_auth) {
$auth_key = $auth_key = md5(pc_base::load_config('system', 'auth_key') . $_SERVER['HTTP_USER_AGENT']);
list($userid, $password) = explode("\t", sys_auth($phpcms_auth, 'DECODE', $auth_key));
//验证用户,获取用户信息
$this->memberinfo = $this->db->get_one(array('userid' => $userid));
//获取用户模型信息
$this->db->set_model($this->memberinfo['modelid']);
$this->_member_modelinfo = $this->db->get_one(array('userid' => $userid));
$this->_member_modelinfo = $this->_member_modelinfo ? $this->_member_modelinfo : array();
$this->db->set_model();
if (is_array($this->memberinfo)) {
$this->memberinfo = array_merge($this->memberinfo, $this->_member_modelinfo);
}
if ($this->memberinfo && $this->memberinfo['password'] === $password) {
if (!defined('SITEID')) {
define('SITEID', $this->memberinfo['siteid']);
}
if ($this->memberinfo['groupid'] == 1) {
param::set_cookie('auth', '');
param::set_cookie('_userid', '');
param::set_cookie('_username', '');
param::set_cookie('_groupid', '');
showmessage(L('userid_banned_by_administrator', '', 'member'), 'index.php?m=member&c=index&a=login');
} elseif ($this->memberinfo['groupid'] == 7) {
param::set_cookie('auth', '');
param::set_cookie('_userid', '');
param::set_cookie('_groupid', '');
//设置当前登录待验证账号COOKIE,为重发邮件所用
param::set_cookie('_regusername', $this->memberinfo['username']);
param::set_cookie('_reguserid', $this->memberinfo['userid']);
param::set_cookie('_reguseruid', $this->memberinfo['phpssouid']);
param::set_cookie('email', $this->memberinfo['email']);
showmessage(L('need_emial_authentication', '', 'member'), 'index.php?m=member&c=index&a=register&t=2');
}
} else {
param::set_cookie('auth', '');
param::set_cookie('_userid', '');
param::set_cookie('_username', '');
param::set_cookie('_groupid', '');
}
unset($userid, $password, $phpcms_auth, $auth_key);
} else {
$forward = isset($_GET['forward']) ? urlencode($_GET['forward']) : urlencode(get_url());
showmessage(L('please_login', '', 'member'), 'index.php?m=member&c=index&a=login&forward=' . $forward);
}
}
}
开发者ID:pondyond,项目名称:phpcmsv9,代码行数:61,代码来源:foreground.class.php
示例16: set_siteid
/**
* ÉèÖÃÕ¾µãid
*/
private function set_siteid()
{
if (defined('IN_ADMIN')) {
$this->siteid = get_siteid();
} else {
param::get_cookie('siteid');
$this->siteid = param::get_cookie('siteid');
}
}
开发者ID:ahmatjan,项目名称:huluphp,代码行数:12,代码来源:wap_url.class.php
示例17: init
/**
* **************************************************
* 会员中心 我的留言列表
* **************************************************
*/
public function init()
{
$page = $_GET['page'];
$user_id = param::get_cookie('_userid');
$res = $this->api->show(array('user_id' => $user_id, 'parent_id' => 0), $page, 10);
$list = $res['data'];
$pages = $list['pages'];
include template('guestbook', 'guestbook_list');
}
开发者ID:zhouzhouxs,项目名称:Progect,代码行数:14,代码来源:guestbook_member.php
示例18: __construct
function __construct()
{
parent::__construct();
$this->db = pc_base::load_model('log_model');
pc_base::load_sys_class('form');
$admin_username = param::get_cookie('admin_username');
//管理员COOKIE
$userid = $_SESSION['userid'];
//登陆USERID
}
开发者ID:shenhua4286,项目名称:gxw,代码行数:10,代码来源:log.php
示例19: __construct
public function __construct()
{
pc_base::load_app_class('ku6api', 'video', 0);
$this->userid = param::get_cookie('userid');
$this->setting = getcache('video');
if (empty($this->setting)) {
showmessage(L('module_not_exists'));
}
$this->ku6api = new ku6api($this->setting['sn'], $this->setting['skey']);
}
开发者ID:shenhua4286,项目名称:gxw,代码行数:10,代码来源:index.php
示例20: __construct
public function __construct($value = '')
{
$this->db = pc_base::load_model($this->_model);
$this->_userid = param::get_cookie('_userid');
$this->_username = param::get_cookie('_username');
$this->_groupid = param::get_cookie('_groupid');
if (!$this->_userid) {
showmessage("请登录", 'index.php?m=member&c=index&a=login');
}
}
开发者ID:cfhb,项目名称:MIS,代码行数:10,代码来源:office.class.php
注:本文中的param类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论