本文整理汇总了PHP中S::getGP方法的典型用法代码示例。如果您正苦于以下问题:PHP S::getGP方法的具体用法?PHP S::getGP怎么用?PHP S::getGP使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类S
的用法示例。
在下文中一共展示了S::getGP方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: setData
function setData()
{
$bonus = S::escapeChar(S::getGP('bonus', 'P'), true);
$ctype = S::escapeChar(S::getGP('ctype', 'P'));
if (empty($bonus)) {
$bonus = array();
$bonus['best'] = $this->b_val;
$bonus['active'] = $this->a_val;
}
$bonus['best'] < $this->b_val && Showmsg('credit_limit');
$bonus['active'] < $this->a_val && Showmsg('credit_limit');
reset($this->allowcredit);
if (!$ctype['best']) {
$ctype['best'] = current($this->allowcredit);
}
if (!$ctype['active']) {
$ctype['active'] = current($this->allowcredit);
}
if (!in_array($ctype['best'], $this->allowcredit) || !in_array($ctype['active'], $this->allowcredit)) {
Showmsg('reward_credit_error');
}
$this->data['cbtype'] = $ctype['best'];
$this->data['catype'] = $ctype['active'];
$this->data['cbval'] = $bonus['best'];
$this->data['caval'] = $bonus['active'];
}
示例2: getguestIndexpath
function getguestIndexpath()
{
global $db_guestdir;
$mode = S::getGP('m');
$mode = $mode && in_array($mode, array('bbs', 'area', 'o')) ? $mode : '';
return D_P . "{$db_guestdir}/index" . $mode . ".html";
}
示例3: initData
function initData()
{
global $timestamp;
!$_POST['vt_select'] && Showmsg('postfunc_noempty');
$vt_select = S::getGP('vt_select', 'P');
$vt_select = explode("\n", $vt_select);
$votearray = array();
foreach ($vt_select as $key => $option) {
if ($option = trim($option)) {
$votearray[] = array(stripslashes($option), 0);
}
}
$vtcount = count($votearray);
if ($vtcount > $this->maxselect) {
Showmsg('vote_num_limit');
}
$regdatelimit = S::getGP('regdatelimit', 'P');
$multiplevote = intval(S::getGP('multiplevote', 'P'));
$mostvotes = intval(S::getGP('mostvotes', 'P'));
$timelimit = intval(S::getGP('timelimit', 'P'));
$modifiable = intval(S::getGP('modifiable', 'P'));
$previewable = intval(S::getGP('previewable', 'P'));
$leastvotes = intval(S::getGP('leastvotes', 'P'));
$postnumlimit = intval(S::getGP('postnumlimit', 'P'));
if (empty($multiplevote)) {
$mostvotes = 1;
} elseif ($mostvotes > $vtcount || $mostvotes < 1) {
$mostvotes = $vtcount;
}
if (empty($multiplevote) || $leastvotes > $mostvotes || $leastvotes < 1) {
$leastvotes = 1;
}
$timelimit < 0 && ($timelimit = 0);
$postnumlimit < 0 && ($postnumlimit = 0);
$regdatelimit = strtotime($regdatelimit);
$regdatelimit = $regdatelimit > $timestamp ? $timestamp : $regdatelimit;
$creditlimit = S::getGP('creditlimit', 'P');
$creditlimit_temp = array();
foreach ($creditlimit as $key => $value) {
if (!empty($value)) {
$creditlimit_temp[$key] = (int) $value;
}
}
$this->data['voteopts'] = serialize($votearray);
$this->data['modifiable'] = $modifiable;
$this->data['previewable'] = $previewable;
$this->data['multiple'] = $multiplevote;
$this->data['mostvotes'] = $mostvotes;
$this->data['leastvotes'] = $leastvotes;
$this->data['timelimit'] = $timelimit;
$this->data['regdatelimit'] = $regdatelimit;
$this->data['creditlimit'] = serialize($creditlimit_temp);
$this->data['postnumlimit'] = $postnumlimit;
}
示例4: update
function update($uploaddb)
{
global $db_charset;
$this->transfer();
foreach ($uploaddb as $value) {
$value['descrip'] = S::escapeChar(S::getGP('atc_desc' . $value['id'], 'P'));
$value['name'] = stripslashes(pwConvert($value['name'], $db_charset, 'utf-8'));
$this->attachs[] = $value;
}
return $uploaddb;
}
示例5: _setData
function _setData()
{
$goodsname = S::escapeChar(S::getGP('goodsname'));
$price = S::escapeChar(S::getGP('price'));
$costprice = S::escapeChar(S::getGP('costprice'));
$locus = S::escapeChar(S::getGP('locus'));
$mailfee = S::escapeChar(S::getGP('mailfee'));
$expressfee = S::escapeChar(S::getGP('expressfee'));
$emsfee = S::escapeChar(S::getGP('emsfee'));
$icon = S::escapeChar(S::getGP('attachment_1'));
$degree = intval(S::getGP('degree'));
$ptype = intval(S::getGP('ptype'));
$goodsnum = intval(S::getGP('goodsnum'));
$paymethod = S::escapeChar(S::getGP('paymethod'), 1);
$transport = intval(S::getGP('transport'));
!$goodsname && ($goodsname = S::escapeChar($_POST['atc_title']));
if (!is_numeric($costprice) || $costprice <= 0) {
Showmsg('goods_setprice');
}
$goodsnum < 1 && Showmsg('goods_num_error');
$paymethod && ($paymethod = array_sum($paymethod));
$paymethod < 1 && Showmsg('goods_pay_error');
!is_numeric($price) && ($price = 0);
if ($transport) {
!is_numeric($mailfee) && ($mailfee = 0);
!is_numeric($expressfee) && ($expressfee = 0);
!is_numeric($emsfee) && ($emsfee = 0);
if (!$mailfee && !$expressfee && !$emsfee) {
Showmsg('goods_logistics');
}
} else {
$mailfee = $expressfee = $emsfee = 0;
}
$goodsicon = '';
$this->data['name'] = $goodsname;
$this->data['price'] = $price;
$this->data['costprice'] = $costprice;
$this->data['locus'] = $locus;
$this->data['mailfee'] = $mailfee;
$this->data['expressfee'] = $expressfee;
$this->data['emsfee'] = $emsfee;
$this->data['degree'] = $degree;
$this->data['type'] = $ptype;
$this->data['num'] = $goodsnum;
$this->data['paymethod'] = $paymethod;
$this->data['transport'] = $transport;
$icon && ($this->data['icon'] = $icon);
}
示例6: setCustomfield
function setCustomfield($customfield)
{
global $value;
$srcValue = $value;
if (empty($customfield) || !is_array($customfield)) {
return;
}
foreach ($customfield as $key => $value) {
$field = "field_" . (int) $value['id'];
$v = S::escapeChar(S::getGP($field, 'P'));
if ($value['required'] && !$v) {
Showmsg('field_empty');
}
if ($value['maxlen'] && strlen($v) > $value['maxlen']) {
Showmsg('field_lenlimit');
}
$v && ($this->memberinfo[$field] = $v);
}
$value = $srcValue;
}
示例7: _setData
function _setData()
{
$this->data['subject'] = S::escapeChar(S::getGP('act_subject', 'P'));
$this->data['location'] = S::escapeChar(S::getGP('act_location', 'P'));
$this->data['sexneed'] = intval(S::getGP('act_sex'));
$act_starttime = S::escapeChar(S::getGP('act_starttime'));
$act_deadline = S::escapeChar(S::getGP('act_deadline'));
$act_endtime = S::escapeChar(S::getGP('act_endtime'));
$act_num = intval(S::getGP('act_num'));
$act_costs = intval(S::getGP('act_costs'));
!($this->data['subject'] && $act_starttime && $act_deadline) && Showmsg('active_data_empty');
$act_starttime = PwStrtoTime($act_starttime);
$act_endtime = PwStrtoTime($act_endtime);
$act_deadline = PwStrtoTime($act_deadline);
$act_num < 1 && ($act_num = 0);
$act_costs < 1 && ($act_costs = 0);
$this->data['starttime'] = $act_starttime;
$this->data['deadline'] = $act_deadline;
$this->data['endtime'] = $act_endtime;
$this->data['num'] = $act_num;
$this->data['costs'] = $act_costs;
}
示例8: update
function update($uploaddb)
{
global $db_enhideset, $db_sellset, $timestamp, $db_ifpwcache;
$this->transfer();
foreach ($uploaddb as $value) {
$value['name'] = addslashes($value['name']);
if ($value['attname'] == 'replace' && isset($this->replacedb[$value['id']])) {
$aid = $value['id'];
$value['needrvrc'] = $this->replacedb[$aid]['needrvrc'];
$value['special'] = $this->replacedb[$aid]['special'];
$value['ctype'] = $this->replacedb[$aid]['ctype'];
$value['descrip'] = $this->replacedb[$aid]['desc'];
$this->pw_attachs->updateById($aid, array('name' => $value['name'], 'type' => $value['type'], 'size' => $value['size'], 'attachurl' => $value['fileuploadurl'], 'needrvrc' => $value['needrvrc'], 'special' => $value['special'], 'ctype' => $value['ctype'], 'uploadtime' => $timestamp, 'descrip' => $value['descrip'], 'ifthumb' => $value['ifthumb']));
$this->replacedb[$aid]['name'] = $value['name'];
$this->replacedb[$aid]['type'] = $value['type'];
$this->replacedb[$aid]['size'] = $value['size'];
$this->replacedb[$aid]['ifthumb'] = $value['ifthumb'];
} else {
$value['descrip'] = S::escapeChar(S::getGP('atc_desc' . $value['id'], 'P'));
$value['needrvrc'] = intval(S::getGP('atc_needrvrc' . $value['id'], 'P'));
$value['special'] = intval(S::getGP('att_special' . $value['id'], 'P'));
$value['ctype'] = S::getGP('att_ctype' . $value['id'], 'P');
if ($value['needrvrc'] > 0 && ($value['special'] == 1 && $this->post->allowencode && in_array($value['ctype'], $db_enhideset['type']) || $value['special'] == 2 && $this->post->allowsell && in_array($value['ctype'], $db_sellset['type']))) {
} else {
$value['needrvrc'] = $value['special'] = 0;
$value['ctype'] = '';
}
$aid = $this->pw_attachs->add(array('fid' => $this->forum->fid, 'uid' => $this->post->uid, 'hits' => 0, 'name' => $value['name'], 'type' => $value['type'], 'size' => $value['size'], 'attachurl' => $value['fileuploadurl'], 'needrvrc' => $value['needrvrc'], 'special' => $value['special'], 'ctype' => $value['ctype'], 'uploadtime' => $timestamp, 'descrip' => $value['descrip'], 'ifthumb' => $value['ifthumb']));
$this->attachs[$aid] = array('aid' => $aid, 'name' => stripslashes($value['name']), 'type' => $value['type'], 'attachurl' => $value['fileuploadurl'], 'needrvrc' => $value['needrvrc'], 'special' => $value['special'], 'ctype' => $value['ctype'], 'size' => $value['size'], 'hits' => 0, 'desc' => str_replace('\\', '', $value['descrip']), 'ifthumb' => $value['ifthumb']);
$this->idrelate[$aid] = $value['id'];
$this->post->user['uploadnum']++;
$this->post->user['uploadtime'] = $timestamp;
}
if ($value['type'] == 'img') {
$this->ifupload = 1;
$this->uploadImgNum++;
} else {
$this->ifupload = $value['type'] == 'txt' ? 2 : 3;
}
//Start elementupdate
if ($db_ifpwcache & 512 && $value['type'] == 'img' && !$value['needrvrc'] && !$this->elementpic) {
$this->elementpic = array('aid' => $aid, 'attachurl' => $value['fileuploadurl'], 'ifthumb' => $value['ifthumb']);
}
//End elementupdate
}
$this->addCredit();
return true;
}
示例9: setDataAlipay
function setDataAlipay($uid, $tableName, $fieldName, $required = false)
{
if (!$this->memberData[$uid][$tableName]['tradeinfo']) {
$userService = L::loadClass('UserService', 'user');
/* @var $userService PW_UserService */
$userInfo = $userService->get($uid, true, false, true);
if (!$userInfo) {
return false;
}
$this->memberData[$uid][$tableName]['tradeinfo'] = $userInfo['tradeinfo'];
}
$tradeInfo = @(array) unserialize($userInfo['tradeinfo']);
$tradeInfo[$fieldName] = S::escapeChar(S::getGP($fieldName, 'P'));
if (!$required && !$tradeInfo[$fieldName] || $tradeInfo[$fieldName] && $this->checkAlipay($tradeInfo[$fieldName]) === true) {
$this->memberData[$uid][$tableName]['tradeinfo'] = serialize($tradeInfo);
return true;
} else {
return false;
}
}
示例10: stripslashes
$value = $tmp;
} else {
$value = $tmp[0];
}
} else {
$value = stripslashes(str_replace(array('=', '&'), array('=', '&'), $value));
/*other*/
}
$config[$key] = is_array($value) ? $value : $value;
}
$config['size'] = $config['size'] . "px";
$config = addslashes(serialize($config));
if ($id) {
$db->update("UPDATE pw_advert SET " . S::sqlSingle(array('ckey' => $advert['ckey'], 'stime' => $advert['stime'], 'etime' => $advert['etime'], 'ifshow' => $advert['ifshow'], 'orderby' => $advert['orderby'], 'descrip' => $advert['descrip'], 'config' => $config)) . " WHERE type='1' AND id=" . S::sqlEscape($id));
} else {
$otherkey = (array) S::getGP('otherkey');
$userService = L::loadClass('UserService', 'user');
/* @var $userService PW_UserService */
$winduid = $userService->getUserIdByUserName($admin_name);
foreach ($otherkey as $value) {
if (!$cates[$value] || $advert['ckey'] == $value) {
continue;
}
$db->update("INSERT INTO pw_advert SET " . S::sqlSingle(array('uid' => $winduid, 'type' => 1, 'ckey' => $value, 'stime' => $advert['stime'], 'etime' => $advert['etime'], 'ifshow' => $advert['ifshow'], 'orderby' => $advert['orderby'], 'descrip' => $advert['descrip'], 'config' => $config)));
}
$db->update("INSERT INTO pw_advert SET " . S::sqlSingle(array('uid' => $winduid, 'type' => 1, 'ckey' => $advert['ckey'], 'stime' => $advert['stime'], 'etime' => $advert['etime'], 'ifshow' => $advert['ifshow'], 'orderby' => $advert['orderby'], 'descrip' => $advert['descrip'], 'config' => $config)));
$id = $db->insert_id();
}
if ($advert['ifshow']) {
$db->update("UPDATE pw_advert SET ifshow=1 WHERE type=0 AND ifshow=0 AND ckey=" . S::sqlEscape($advert['ckey']));
}
示例11: COUNT
$count = $db->get_value("SELECT COUNT(*) AS count FROM temp");
}
(!is_numeric($page) || $page < 1) && ($page = 1);
$pages = numofpage($count, $page, ceil($count / $db_perpage), "{$basename}&action={$action}&{$pageurl}");
$limit = S::sqlLimit(($page - 1) * $db_perpage, $db_perpage);
$query = $db->query("SELECT fid,gid FROM pw_permission WHERE {$sql} GROUP BY fid,gid {$limit}");
while ($rd = $db->fetch_array($query)) {
$g_d[] = $rd;
}
$jschk = ($fid || $gid) && $pages ? 'true' : 'false';
include PrintEot('singleright');
exit;
} elseif ($action == 'setright') {
//单用户权限设置
S::gp(array('uid', 'gid', 'fid'), 'GP', 2);
$pwuser = S::escapeChar(S::getGP('pwuser'));
$jumpurl = "{$basename}&action={$job}";
$f = $db->get_one("SELECT name,type FROM pw_forums WHERE fid=" . S::sqlEscape($fid));
empty($f) && adminmsg('undefined_action', $jumpurl);
//* include_once pwCache::getPath(D_P.'data/bbscache/forumcache.php');
pwCache::getData(D_P . 'data/bbscache/forumcache.php');
list($hidefid, $hideforum) = GetHiddenForum();
$forumcache .= $hideforum;
$userService = L::loadClass('UserService', 'user');
/* @var $userService PW_UserService */
if (empty($_POST['step'])) {
if ($job == 'user') {
if ($pwuser) {
//add
$rt = $userService->getByUserName($pwuser);
if (empty($rt)) {
示例12: adminmsg
adminmsg('operate_success', "{$basename}" . "&action=check");
} else {
if (empty($pid)) {
adminmsg('operate_error');
}
if (is_array($pid)) {
if (!($selid = checkselid($pid))) {
$basename = "javascript:history.go(-1);";
adminmsg('operate_error');
}
$objid = array_keys($pid);
} else {
$selid = (int) $pid;
$objid = (int) $pid;
}
$ptable = S::getGP('ptable');
if (is_array($ptable)) {
if ($db_plist && count($db_plist) > 1) {
foreach ($ptable as $key => $value) {
if (isset($db_plist[$value])) {
$postslist[$value] = GetPtable($value);
}
}
} else {
$postslist[] = 'pw_posts';
}
} else {
$postslist[] = GetPtable($ptable);
}
foreach ($postslist as $pw_posts) {
$fids = $tids = $db_threads = array();
示例13: PrintEot
}
if ($_POST['step'] != 2) {
include PrintEot('manager');
exit;
} else {
if (!$username) {
adminmsg('manager_empty');
}
if (str_replace(array('\\', '&', ' ', "'", '"', '/', '*', ',', '<', '>', "\r", "\t", "\n", '#'), '', $username) != $username) {
adminmsg('manager_errorusername');
}
$key = (int) array_search($oldname, $manager);
if (!$password) {
$password = $manager_pwd[$key];
} else {
if (S::getGP('check_pwd') != $password) {
adminmsg('password_confirm');
}
if (str_replace(array('\\', '&', ' ', "'", '"', '/', '*', ',', '<', '>', "\r", "\t", "\n", '#'), '', $password) != $password) {
adminmsg('manager_errorpassword');
}
$password = $manager_pwd[$key] = md5($password);
}
if ($username != $oldname) {
if (S::inArray($username, $manager)) {
adminmsg('manager_had');
}
$manager[$key] = $username;
$oldname == $admin_name && Cookie('AdminUser', '', 0);
}
$newconfig = array('dbhost' => $dbhost, 'dbuser' => $dbuser, 'dbpw' => $dbpw, 'dbname' => $dbname, 'database' => $database, 'PW' => $PW, 'pconnect' => $pconnect, 'charset' => $charset, 'manager' => $manager, 'manager_pwd' => $manager_pwd, 'db_hostweb' => $db_hostweb, 'db_distribute' => $db_distribute, 'attach_url' => $attach_url, 'slaveConfigs' => $slaveConfigs);
示例14: pwOutPut
$iconfile = '';
}
require_once uTemplate::PrintEot('info_face');
pwOutPut();
} else {
if ($step == '2') {
PostCheck();
S::slashes($userdb);
S::gp(array('facetype', 'proicon'), 'P');
require_once R_P . 'require/showimg.php';
$user_a = explode('|', $winddb['icon']);
$usericon = '';
if ($facetype == 1) {
$usericon = setIcon($proicon, $facetype, $user_a);
} elseif ($_G['allowportait'] && $facetype == 2) {
$httpurl = S::getGP('httpurl', 'P');
if (strncmp($httpurl[0], 'http://', 7) != 0 || strrpos($httpurl[0], '|') !== false) {
refreshto("profile.php?action=modify&info_type={$info_type}&facetype={$facetype}", getLangInfo('msg', 'illegal_customimg'), 2, true);
}
$proicon = S::escapeChar($httpurl[0]);
$httpurl[1] = (int) $httpurl[1];
$httpurl[2] = (int) $httpurl[2];
$httpurl[3] = (int) $httpurl[3];
$httpurl[4] = (int) $httpurl[4];
list($user_a[2], $user_a[3]) = flexlen($httpurl[1], $httpurl[2], $httpurl[3], $httpurl[4]);
$usericon = setIcon($proicon, $facetype, $user_a);
unset($httpurl);
}
pwFtpClose($ftp);
//update member
$usericon && ($result = $userService->update($winduid, array('icon' => $usericon)));
示例15: list
$moneyName = $credit->cType[$key];
$unit = $credit->cUnit[$key];
$creditPops .= $value . $unit . $moneyName . ",";
}
$deletePhotoCredit = $creditset ? '删除照片会扣除积分:' . $creditPops . '继续吗?' : '是否确认删除?';
list($photo, $nearphoto, $prePid, $nextPid) = $result;
$isown = $photo['ownerid'] == $winduid ? '1' : '0';
if (!$isown) {
//转跳处理
$url = $db_bbsurl . "/apps.php?q=photos&a=view&pid=" . $pid . "&uid=" . $photo['ownerid'];
ObHeader($url);
}
$u = $photo['ownerid'];
$username = $photo['owner'];
$aid = $photo['aid'];
$page = (int) S::getGP('page');
$page < 1 && ($page = 1);
$url = $basename . 'a=view&pid=' . $pid;
$url .= $ifriend == 1 ? '&ifriend=' . $ifriend . '&' : '&';
require_once R_P . 'require/bbscode.php';
list($commentdb, $subcommentdb, $pages) = getCommentDbByTypeid('photo', $pid, $page, $url);
$comment_type = 'photo';
$comment_typeid = $pid;
$ouserdataService = L::loadClass('Ouserdata', 'sns');
/* @var $ouserdataService PW_Ouserdata */
$myOuserData = $ouserdataService->get($photo['ownerid']);
$weiboPriv = false;
!$myOuserData['index_privacy'] && !$myOuserData['photos_privacy'] && !$photo['private'] && ($weiboPriv = true);
} elseif ($a == 'next') {
define('AJAX', 1);
S::gp(array('pid'));