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


PHP S::gp方法代码示例

本文整理汇总了PHP中S::gp方法的典型用法代码示例。如果您正苦于以下问题:PHP S::gp方法的具体用法?PHP S::gp怎么用?PHP S::gp使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在S的用法示例。


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

示例1: list

    if (count($online_info = explode("\t", GetCookie('online_info'))) == 3 && $timestamp - $online_info[0] < 60) {
        list(, $userinbbs, $guestinbbs) = $online_info;
    } else {
        $onlineService = L::loadClass('OnlineService', 'user');
        $userinbbs = $onlineService->countOnlineUser();
        $guestinbbs = $onlineService->countOnlineGuest();
        Cookie('online_info', $timestamp . "\t" . $userinbbs . "\t" . $guestinbbs);
    }
}
if ($last_statistictime == 0 || get_date($timestamp, 'G') - get_date($last_statistictime, 'G') > 1 || $timestamp - $last_statistictime > 3600) {
    $stasticsService = L::loadClass('Statistics', 'datanalyse');
    $stasticsService->updateOnlineInfo();
}
$usertotal = $guestinbbs + $userinbbs;
if ($db_indexonline) {
    S::gp(array('online'));
    empty($online) && ($online = GetCookie('online'));
    if ($online == 'yes') {
        if ($usertotal > 2000 && !S::inArray($windid, $manager)) {
            //$online = 'no';
            Cookie('online', 'no');
        } else {
            $index_whosonline = '';
            $db_online = intval($db_online);
            Cookie('online', $online);
            include_once S::escapePath(R_P . "require/online_{$db_online}.php");
        }
    }
    if ($online == 'no') {
        Cookie('online', 'no');
    }
开发者ID:jechiy,项目名称:PHPWind,代码行数:31,代码来源:index.php

示例2: exit

<?php

!defined('P_W') && exit('Forbidden');
S::gp(array('aid'), 'GP', 2);
empty($aid) && Showmsg('job_attach_error');
$attachService = L::loadClass('attachs', 'forum');
$attachInfo = $attachService->getByAid($aid);
if (!S::isArray($attachInfo) || $attachInfo['type'] != 'img' || !$attachInfo['tid']) {
    Showmsg('job_attach_error');
}
$isGM = S::inArray($windid, $manager);
!$isGM && $groupid == 3 && ($isGM = 1);
$adminCheck = $attachInfo['uid'] == $winduid || $isGM ? 1 : 0;
if (!$adminCheck) {
    Showmsg('没有权限设置封面!');
}
$tucoolService = L::loadClass('tucool', 'forum');
if ($tucoolService->setCover($attachInfo['tid'], $attachInfo['attachurl'], $attachInfo['ifthumb'])) {
    echo "success";
    ajax_footer();
}
Showmsg('undefined_action');
开发者ID:sherlockhouse,项目名称:aliyun,代码行数:22,代码来源:setcover.php

示例3: messageReplace

    $message['content'] = messageReplace($message['content']);
    $notReadCount = (int) $messageServer->countNoticesNotRead($winduid);
}
if ($smstype && in_array($action, array('info', 'next', 'previous'))) {
    $navtype = $messageServer->getReverseConst($smstype);
    $navtype = explode('_', $navtype);
    $nav[$navtype[1]] = 'class = current';
}
if (empty($action) || in_array($action, array('unread', 'system', 'postcate', 'active', 'apps', 'comment', 'guestbook'))) {
    if ($action != 'unread') {
        $notReadCount = (int) $messageServer->countNoticesNotRead($winduid);
        list($today, $yesterday, $tTimes, $yTimes, $mTimes) = getSubListInfo($noticeList);
    }
    $pages = numofpage($noticeCount, $page, $pageCount, "{$normalUrl}&action={$action}&");
} elseif ($action == 'checkover') {
    S::gp(array('rid', 'dir'), 'GP');
    if ($dir == 'previous') {
        $message = $messageServer->getUpNotice($winduid, $rid, $smstype);
    } else {
        $message = $messageServer->getDownNotice($winduid, $rid, $smstype);
    }
    if ($message) {
        echo "success\t";
    } else {
        echo "over\t";
    }
    ajax_footer();
}
$messageServer->resetStatistics(array($winduid), 'notice_num');
!defined('AJAX') && (include_once R_P . 'actions/message/ms_header.php');
require messageEot($subtype);
开发者ID:sherlockhouse,项目名称:aliyun,代码行数:31,代码来源:ms_notice.php

示例4: exit

<?php

!defined('P_W') && exit('Forbidden');
!$fid && Showmsg('undefined_action');
S::gp(array('type'));
$myshortcut = explode(',', $winddb['shortcut']);
foreach ($myshortcut as $key => $value) {
    if (!$value || !is_numeric($value)) {
        unset($myshortcut[$key]);
    }
}
$myshortcut = array_unique($myshortcut);
$userService = L::loadClass('UserService', 'user');
/* @var $userService PW_UserService */
if ($type == "delete") {
    if (empty($myshortcut) && $db_shortcutforum) {
        $myshortcut = array_keys($db_shortcutforum);
    }
    if (in_array($fid, $myshortcut)) {
        $shortcut = array_diff($myshortcut, array($fid));
    }
    $shortcut = $shortcut ? $shortcut : array();
    $shortcut = ',' . implode(',', $shortcut) . ',';
    $shortcut .= $shortcut . "\t" . $winddb['appshortcut'];
    $userService->update($winduid, array('shortcut' => $shortcut));
    Showmsg("shortcutno");
} elseif (in_array($fid, $myshortcut)) {
    foreach ($myshortcut as $key => $value) {
        if (!$value || $value == $fid) {
            unset($myshortcut[$key]);
        }
开发者ID:sherlockhouse,项目名称:aliyun,代码行数:31,代码来源:shortcut.php

示例5: exit

<?php

!defined('P_W') && exit('Forbidden');
S::gp(array('page', 'tid', 'jointype', 'payway', 'ifend', 'pcid'));
$isadminright = $jointype == 3 ? 0 : 1;
L::loadClass('postcate', 'forum', false);
$postCate = new postCate($data);
list(, $isviewright) = $postCate->getViewright($pcid, $tid);
$memberdb = array();
$count = $sum = $paysum = 0;
$query = $db->query("SELECT ifpay,nums FROM pw_pcmember WHERE tid=" . S::sqlEscape($tid));
while ($rt = $db->fetch_array($query)) {
    $count++;
    if ($rt['ifpay']) {
        $paysum += $rt['nums'];
    }
    $sum += $rt['nums'];
}
$page < 1 && ($page = 1);
$numofpage = ceil($count / $db_perpage);
if ($numofpage && $page > $numofpage) {
    $page = $numofpage;
}
$start = ($page - 1) * $db_perpage;
$limit = S::sqlLimit($start, $db_perpage);
$pages = numofpage($count, $page, $numofpage, "pw_ajax.php?action={$action}&tid={$tid}&jointype={$jointype}&payway={$payway}&", null, 'ajaxview');
$i = $pcid = 0;
$query = $db->query("SELECT pcmid,uid,pcid,username,nums,totalcash,phone,mobile,address,extra,ifpay,jointime FROM pw_pcmember WHERE tid=" . S::sqlEscape($tid) . " ORDER BY (uid=" . S::sqlEscape($winduid) . ") DESC,ifpay ASC,pcmid DESC {$limit}");
while ($rt = $db->fetch_array($query)) {
    if ($i == 0) {
        $pcid = $rt['pcid'];
开发者ID:jechiy,项目名称:PHPWind,代码行数:31,代码来源:pcmember.php

示例6: IN

 }
 $query = $db->query("SELECT gid,rkey,rvalue FROM pw_permission WHERE uid='0' AND fid='0' AND gid=" . S::sqlEscape($gid) . " AND rkey IN ('sellinfo','sellprice','rmbprice','selltype','selllimit','allowbuy')");
 while ($permi = $db->fetch_array($query)) {
     $rt['sright'][$permi['rkey']] = $permi['rvalue'];
 }
 if (!$rt['sright']['allowbuy']) {
     Showmsg('special_allowbuy');
 }
 if (empty($_POST['step'])) {
     $rt['sright']['selltype'] = $credit->cType[$rt['sright']['selltype']];
     require_once uTemplate::PrintEot('profile_buy');
     pwOutPut();
 } else {
     PostCheck();
     S::gp(array('pwpwd'), 'P');
     S::gp(array('days', 'buymethod', 'options'), null, 2);
     if (!is_numeric($days) || $days <= 0) {
         Showmsg('illegal_nums');
     }
     if ($days < $rt['sright']['selllimit']) {
         Showmsg('special_selllimit');
     }
     $userService = L::loadClass('UserService', 'user');
     /* @var $userService PW_UserService */
     $mb = $userService->get($winduid);
     if ($gid == $groupid || strpos($mb['groups'], ",{$gid},") !== false) {
         Showmsg('specialgroup_noneed');
     }
     if ($buymethod) {
         if ($rt['sright']['rmbprice'] <= 0) {
             Showmsg('undefined_action');
开发者ID:sherlockhouse,项目名称:aliyun,代码行数:31,代码来源:buy.php

示例7: exit

<?php

!defined('P_W') && exit('Forbidden');
define('AJAX', '1');
require_once R_P . 'require/functions.php';
!$winduid && Showmsg('not_login');
S::gp(array('action'));
if ($action == 'delatt') {
    PostCheck();
    S::gp(array('did', 'aid'));
    empty($aid) && Showmsg('job_attach_error');
    $attach = $db->get_one("SELECT * FROM pw_attachs WHERE aid=" . S::sqlEscape($aid));
    !$attach && Showmsg('job_attach_error');
    if (empty($attach['attachurl']) || strpos($attach['attachurl'], '..') !== false) {
        Showmsg('job_attach_error');
    }
    $aid = $attach['aid'];
    //获取管理权限
    $isGM = S::inArray($windid, $manager);
    !$isGM && ($groupid = 3 && ($isGM = 1));
    if ($isGM) {
        $admincheck = 1;
    } else {
        $admincheck = 0;
    }
    $attach['attachurl'] = "diary/" . $attach['attachurl'];
    if ($admincheck || $attach['uid'] == $winduid) {
        pwDelatt($attach['attachurl'], $db_ifftp);
        pwFtpClose($ftp);
        $diaryService = L::loadClass('Diary', 'diary');
        /* @var $diaryService PW_Diary */
开发者ID:jechiy,项目名称:PHPWind,代码行数:31,代码来源:ajax.php

示例8: exit

<?php

!function_exists('adminmsg') && exit('Forbidden');
$basename = "{$admin_file}?adminjob=setads";
if ($action != 'submit') {
    ${'ads_' . $db_ads} = 'checked';
    include PrintEot('setads');
} elseif ($_POST['action'] == "submit") {
    S::gp(array('ads'), 'P');
    setConfig('db_ads', $ads);
    updatecache_c();
    adminmsg('operate_success');
}
开发者ID:jechiy,项目名称:PHPWind,代码行数:13,代码来源:setads.php

示例9: exit

<?php

!defined('P_W') && exit('Forbidden');
define('AJAX', 1);
S::gp(array('style', 'stopicid', 'blockid'));
$stopicid = (int) $stopicid;
$layout = $stopic_service->getStyleConfig($style, 'layout_set');
if (!$layout || $stopicid === '' || $blockid === '') {
    echo "error";
    ajax_footer();
}
$layout['bannerurl'] = $stopic_service->getStyleBanner($style);
$stopic_service->addUnit(array('stopic_id' => $stopicid, 'html_id' => $blockid, 'title' => '', 'data' => array('image' => $layout['bannerurl'])));
$layout = styleJsonEncode($layout);
echo "success\t" . $layout;
ajax_footer();
function styleJsonEncode($var)
{
    switch (gettype($var)) {
        case 'boolean':
            return $var ? 'true' : 'false';
        case 'NULL':
            return 'null';
        case 'integer':
            return (int) $var;
        case 'double':
        case 'float':
            return (double) $var;
        case 'string':
            return '"' . addslashes(str_replace(array("\r\n", "\n", "\r", "\t"), array('<br />', '<br />', '<br />', ''), $var)) . '"';
        case 'array':
开发者ID:sherlockhouse,项目名称:aliyun,代码行数:31,代码来源:changestyle.php

示例10: array

    //活动被取消无法支付
    $param = array('buyer_name' => $memberdb['username'], 'out_biz_no' => $defaultValue['out_biz_no'], 'out_trade_no' => $out_trade_no, 'amount' => $memberdb['totalcash'], 'notify_url' => "{$db_bbsurl}/act_alipay_receive.php", 'return_url' => "{$db_bbsurl}/read.php?tid={$tid}");
    if ($fromuid != '-1') {
        //是否代付
        $fromusername = $db->get_value("SELECT username FROM pw_members WHERE uid=" . S::sqlEscape($fromuid));
        $issubstitute = 1;
    } else {
        $fromuid = $issubstitute = 0;
        $fromusername = '';
    }
    $sqlarray = array('out_trade_no' => $out_trade_no, 'issubstitute' => $issubstitute, 'fromuid' => $fromuid, 'fromusername' => $fromusername);
    $db->update("UPDATE pw_activitymembers SET " . S::sqlSingle($sqlarray) . " WHERE actuid=" . S::sqlEscape($actuid));
    ObHeader($AlipayInterface->alipayurl($param));
} elseif ($action == 'refund_aa_payment') {
    //退款
    S::gp(array('tid', 'actuid', 'actmid'), GP, 2);
    $memberdb = $db->get_one("SELECT am.ifpay,am.isrefund,am.username,am.totalcash,am.out_trade_no,am.refundcost,t.authorid FROM pw_activitymembers am LEFT JOIN pw_threads t USING(tid) WHERE am.actuid=" . S::sqlEscape($actuid));
    $tempcost = $db->get_value("SELECT SUM(totalcash) as sum FROM pw_activitymembers WHERE isrefund=1 AND fupid=" . S::sqlEscape($actuid));
    //已退费用
    if ($memberdb['isrefund'] || $memberdb['authorid'] != $winduid) {
        //退款交易无法操作、不是发起人无法操作
        Showmsg('act_refund_noright');
    }
    $memberdb['ifpay'] != 1 && Showmsg('act_refund_error');
    //支付宝支付成功才能退款
    if (!$memberdb['refundcost'] || !preg_match("/^(([1-9]\\d*)|0)(\\.\\d{0,2})?\$/", $memberdb['refundcost']) || $memberdb['refundcost'] > number_format($memberdb['totalcash'] - $tempcost, 2, '.', '')) {
        //费用错误、超出剩余费用
        Showmsg('act_refund_cash_error');
    }
    $refundcost = number_format($memberdb['refundcost'], 2, '.', '');
    //退款金额
开发者ID:sherlockhouse,项目名称:aliyun,代码行数:31,代码来源:act_alipay_push.php

示例11: while

     while ($rt = $db->fetch_array($query)) {
         if (($GLOBALS['banword'] = $filterService->comprise($rt['keyword'])) !== false) {
             continue;
         }
         $searchHotwords[] = $rt;
     }
     //		if (!$db_dopen) {/*日志应用关闭*/
     //			$search_type_disabled['diary'] = "disabled";
     //			if ($search_type_expand['diary']) $search_type_expand['diary'] = "";
     //		}
     //		if (!$db_groups_open){/*群组应用关闭*/
     //			 $search_type_disabled['group'] = "disabled";
     //			 if ($search_type_expand['group']) $search_type_expand['group'] = "";
     //		}
 } else {
     S::gp(array('schctl', 'config', 'hotwordsconfig', 'view', 'new_view'));
     $schctl['schstart'] > 23 && ($schctl['schstart'] = 0);
     $schctl['schend'] > 23 && ($schctl['schend'] = 0);
     $config['opensch'] = $schctl['opensch'] . "\t" . $schctl['schstart'] . "\t" . $schctl['schend'];
     $config['maxresult'] = intval($config['maxresult']);
     $config['schwait'] = intval($config['schwait']);
     //		$config['hotwords'] = trim($config['hotwords']);
     $config['filterids'] = trim($config['filterids']);
     $config['operate_log'] = (array) $config['operate_log'];
     $config['search_type_expand'] = (array) $config['search_type_expand'];
     $config['openbuildattachs'] = $config['openbuildattachs'];
     if ($config['operate_log'] && array_diff($config['operate_log'], array('log_forums', 'log_threads', 'log_posts', 'log_diarys', 'log_members', 'log_colonys'))) {
         showMsg("抱歉,操作行为记录类型不存在");
     }
     if ($config['search_type_expand'] && array_diff($config['search_type_expand'], array('cms', 'diary', 'group'))) {
         showMsg("抱歉,搜索类型扩展不存在");
开发者ID:sherlockhouse,项目名称:aliyun,代码行数:31,代码来源:searcher.php

示例12: Showmsg

            Showmsg('您选择的用户没有接受的权限!');
        }
        //* $db->update("UPDATE pw_colonys SET admin=" . S::sqlEscape($userdb['username']) . ' WHERE id=' . S::sqlEscape($cyid));
        pwQuery::update('pw_colonys', 'id=:id', array($cyid), array('admin' => $userdb['username']));
        M::sendNotice(array($userdb['username']), array('title' => getLangInfo('writemsg', 'group_attorn_title'), 'content' => getLangInfo('writemsg', 'group_attorn_content', array('username' => $windid, 'cyid' => $cyid, 'cname' => $colony['cname'], 'descrip' => $colony['descrip']))));
        refreshto("thread.php?cyid={$cyid}", '转让群组成功!');
    }
} elseif ($t == 'disband') {
    if (!($windid == $colony['admin'] && $groupRight['allowdisband'] || $groupid == '3')) {
        Showmsg('colony_out_right');
    }
    if (empty($_POST['step'])) {
        require_once PrintEot('thread_set');
        footer();
    } else {
        S::gp(array('password'));
        if (!threadSetCheckOwnerPassword($winduid, $password)) {
            Showmsg('您输入的密码不正确!');
        }
        if ($db->get_value("SELECT COUNT(*) as sum FROM pw_cnalbum WHERE atype=1 AND ownerid=" . S::sqlEscape($cyid)) > 0) {
            Showmsg('colony_del_photo');
        }
        if ($colony['cnimg']) {
            require_once R_P . 'require/functions.php';
            pwDelatt("cn_img/{$colony['cnimg']}", $db_ifftp);
            pwFtpClose($ftp);
        }
        $query = $db->query("SELECT uid FROM pw_cmembers WHERE colonyid=" . S::sqlEscape($cyid) . " AND ifadmin != '-1'");
        while ($rt = $db->fetch_array($query)) {
            $cMembers[] = $rt['uid'];
        }
开发者ID:jechiy,项目名称:PHPWind,代码行数:31,代码来源:thread_set.php

示例13: adminmsg

            if ($v < 1) {
                continue;
            }
            $medalService->{$functionName}($v);
        }
        adminmsg('operate_success', "{$basename}&action=verify");
    }
    /* 勋章设置 */
} elseif ($action == 'set') {
    S::gp(array('step'), 'P');
    if (!$step) {
        ifcheck($db_md_ifopen, 'ifopen');
        ifcheck($db_md_ifapply, 'ifapply');
        require_once PrintApp('admin_set');
    } else {
        S::gp(array('config'), 'P');
        foreach ($config as $key => $value) {
            setConfig($key, $value);
        }
        updatecache_c();
        adminmsg('operate_success', "{$basename}&action=set");
    }
}
/**
 * JSON处理
 * 
 * @return Ambigous <multitype:, string>
 */
function getMedalJson($medal)
{
    $openMedalTemp = array();
开发者ID:sherlockhouse,项目名称:aliyun,代码行数:31,代码来源:manage.php

示例14: refreshto

        }
        refreshto("apps.php?q=group&a=thread&cyid={$cyid}", 'highlight_success');
    }
} elseif ($action == 'del') {
    if (empty($_POST['step'])) {
        if (defined('AJAX')) {
            $a = 'del';
            require_once PrintEot('m_ajax');
            ajax_footer();
        } else {
            require_once PrintEot('m_topicadmin');
            footer();
        }
    } else {
        PostCheck();
        S::gp(array('ifdel', 'ifmsg'));
        $msgdb = array();
        require_once R_P . 'require/credit.php';
        $creditset = $credit->creditset($foruminfo['creditset'], $db_creditset);
        $msg_delrvrc = $ifdel ? abs($creditset['Delete']['rvrc']) : 0;
        $msg_delmoney = $ifdel ? abs($creditset['Delete']['money']) : 0;
        $delarticle = L::loadClass('DelArticle', 'forum');
        $readdb = $delarticle->getTopicDb('tid ' . $delarticle->sqlFormatByIds($selids));
        foreach ($readdb as $key => $read) {
            if ($ifmsg) {
                isset($msg_delrvrc) && ($tmp_msg_delrvrc = $msg_delrvrc != 0 ? "-{$msg_delrvrc}" : 0);
                isset($msg_delmoney) && ($tmp_msg_delmoney = $msg_delmoney != 0 ? "-{$msg_delmoney}" : 0);
                $msgdb[] = array('toUser' => $read['author'], 'title' => getLangInfo('writemsg', 'del_title'), 'content' => getLangInfo('writemsg', 'del_content', array('manager' => $windid, 'fid' => $read['fid'], 'tid' => $read['tid'], 'subject' => $read['subject'], 'postdate' => get_date($read['postdate']), 'forum' => strip_tags($forum[$fid]['name']), 'affect' => "{$db_rvrcname}:{$tmp_msg_delrvrc},{$db_moneyname}:{$tmp_msg_delmoney}", 'admindate' => get_date($timestamp), 'reason' => stripslashes($atc_content))));
            }
        }
        $delarticle->delTopic($readdb, $db_recycle, $ifdel, array('reason' => $atc_content));
开发者ID:sherlockhouse,项目名称:aliyun,代码行数:31,代码来源:m_topicadmin.php

示例15: empty

    S::gp(array('aid'));
    $aid = (int) $aid;
    empty($aid) && Showmsg('data_error');
    require_once PrintEot('m_ajax_photos');
    ajax_footer();
} elseif ($a == 'createajax') {
    define('AJAX', 1);
    define('F_M', true);
    banUser();
    S::gp(array('job'));
    require_once PrintEot('m_ajax_photos');
    ajax_footer();
} elseif ($a == 'getallowflash') {
    define('AJAX', 1);
    define('F_M', true);
    S::gp(array('aid'));
    $aid = (int) $aid;
    if ($aid) {
        $albumInfo = $photoService->getAlbumInfo($aid);
        $photonums = $albumInfo['photonum'];
        $o_maxphotonum && $photonums >= $o_maxphotonum && Showmsg('colony_photofull');
        if ($o_maxphotonum) {
            $allowmutinum = $o_maxphotonum - $photonums;
        } else {
            $allowmutinum = 'infinite';
        }
    }
    echo "ok\t{$allowmutinum}";
    ajax_footer();
}
if ($s) {
开发者ID:jechiy,项目名称:PHPWind,代码行数:31,代码来源:my.php


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