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


PHP InitGP函数代码示例

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


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

示例1: array

    $threaddb = array();
    $query = $db->query("SELECT tid,fid,subject,postdate,lastpost,lastposter,replies,hits,titlefont FROM pw_threads WHERE authorid=" . pwEscape($userdb['uid']) . " {$sql} ORDER BY {$ordertype} DESC {$limit}");
    while ($rt = $db->fetch_array($query)) {
        $rt['subject'] = substrs($rt['subject'], 45);
        $rt['forum'] = strip_tags($forum[$rt['fid']]['name']);
        $rt['postdate'] = get_date($rt['postdate'], 'Y-m-d');
        $rt['lastpost'] = get_date($rt['lastpost'], 'Y-m-d');
        $rt['encode_lastposter'] = rawurlencode($rt['lastposter']);
        $threaddb[] = $rt;
    }
    require_once PrintEot('u');
    footer();
} elseif ($action == 'post') {
    include_once D_P . 'data/bbscache/forum_cache.php';
    require_once R_P . 'require/forum.php';
    InitGP(array('ptable', 'page'));
    (!is_numeric($page) || $page < 1) && ($page = 1);
    $limit = pwLimit(($page - 1) * $db_perpage, $db_perpage);
    !isset($ptable) && ($ptable = $db_ptable);
    $pw_posts = GetPtable($ptable);
    $fidoff = $isU ? array(0) : getFidoff($groupid);
    $sqloff = ' AND p.fid NOT IN(' . pwImplode($fidoff) . ')';
    $count = $db->get_value("SELECT COUNT(*) AS count FROM {$pw_posts} p WHERE authorid=" . pwEscape($userdb['uid']) . " {$sqloff}");
    $nurl = "u.php?action=post&uid={$uid}&";
    if ($p_list) {
        $p_table = "";
        foreach ($p_list as $key => $val) {
            $name = $val ? $val : ($key != 0 ? getLangInfo('other', 'posttable') . $key : getLangInfo('other', 'posttable'));
            $p_table .= "<tr><td id=\"up_post{$key}\" class=\"fav\"><a href=\"{$nurl}ptable={$key}\">" . $name . "</a></td></tr>";
        }
        $nurl .= "ptable={$ptable}&";
开发者ID:adi00,项目名称:wumaproject,代码行数:31,代码来源:u.php

示例2: adminmsg

    //$navMenu->cache();
    adminmsg('operate_success');
} elseif ($action == 'delete') {
    InitGP(array('id'));
    empty($db_hackdb[$id]) && adminmsg('hackcenter_del');
    unset($db_hackdb[$id]);
    $sqlarray = file_exists(R_P . "hack/{$id}/sql.txt") ? FileArray($id) : array();
    !empty($sqlarray) && SQLDrop($sqlarray);
    setConfig('db_hackdb', $db_hackdb);
    $navMenu = L::loadClass('navmenu');
    $navMenu->settype('bbs_navinfo');
    $navMenu->del('hack_' . $id);
    $navMenu->cache();
    adminmsg('operate_success');
} elseif ($action == 'add') {
    InitGP(array('hackdir', 'hackname', 'hackopen'), 'G');
    !empty($db_hackdb[$hackdir]) && adminmsg('hackcenter_sign_exists');
    $sqlarray = file_exists(R_P . "hack/{$hackdir}/sql.txt") ? FileArray($hackdir) : array();
    !empty($sqlarray) && SQLCreate($sqlarray);
    $db_hackdb[$hackdir] = array($hackname, $hackdir, $hackopen);
    setConfig('db_hackdb', $db_hackdb);
    $navMenu = L::loadClass('navmenu');
    $navMenu->settype('bbs_navinfo');
    $navMenu->update('hack_' . $hackdir, array('title' => strip_tags($hackname), 'link' => 'hack.php?H_name=' . $hackdir));
    if ($hackopen == 0) {
        $navMenu->setshow('hack_' . $hackdir, 0);
        $navMenu->setupnav('hack_' . $hackdir, 'hack');
    } elseif ($hackopen == 1) {
        $navMenu->setshow('hack_' . $hackdir, 1);
        $navMenu->setupnav('hack_' . $hackdir, 'hack');
    } elseif ($hackopen == 2) {
开发者ID:adi00,项目名称:wumaproject,代码行数:31,代码来源:hackcenter.php

示例3: getAllUsersHtml

    } else {
        $userListHtml = getAllUsersHtml($message);
        $smsList = $messageServer->getReplies($userId, $message['mid'], $rid);
    }
} elseif ($action == 'down') {
    InitGP(array('rid', 'redirect'), 'GP');
    list($isown, $_url) = wap_redirect_init($redirect);
    empty($rid) && wap_msg("非法请求");
    if (!($message = $messageServer->getDownInfoByType($userId, $rid, $isown))) {
        wap_sms_msg("已经是最后一条");
    } else {
        $userListHtml = getAllUsersHtml($message);
        $smsList = $messageServer->getReplies($userId, $message['mid'], $rid);
    }
} elseif ($action == 'post') {
    InitGP(array('parentMid', 'atc_content', 'rid'), 'GP');
    $_url = "index.php?a=ms_index&action=info&mid={$parentMid}&rid={$rid}&";
    if (!$_G['allowmessege']) {
        wap_msg('你所在的用户组不能发送消息', $_url);
    }
    empty($parentMid) && wap_msg('非法操作', $_url);
    empty($atc_content) && wap_msg('回复内容不能为空', $_url);
    $atc_content = trim(strip_tags($atc_content));
    $messageInfo = array('create_uid' => $winduid, 'create_username' => $windid, 'title' => $windid, 'content' => $atc_content);
    if (!($message = $messageServer->sendReply($winduid, $rid, $parentMid, $messageInfo))) {
        wap_msg('回复失败', $_url);
    }
    wap_sms_msg('回复成功!');
}
wap_header();
require_once PrintWAP('ms_index');
开发者ID:jechiy,项目名称:PHPWind,代码行数:31,代码来源:ms_index.php

示例4: get_date

                $uids1[] = $rt['uid'];
            }
        } else {
            $rt['startdate'] && ($rt['date'] = get_date($rt['startdate']));
            $bandb[] = $rt;
        }
    }
    if ($ids) {
        $db->update("DELETE FROM pw_banuser WHERE id IN(" . pwImplode($ids) . ")");
        $uids1 && $db->update("UPDATE pw_members SET groupid='-1' WHERE uid IN(" . pwImplode($uids1) . ")");
        $uids2 && $db->update("UPDATE pw_members m LEFT JOIN pw_banuser b ON m.uid=b.uid AND b.fid>0 SET m.userstatus=m.userstatus&(~1) WHERE b.uid is NULL AND m.uid IN(" . pwImplode($uids2) . ")");
    }
    include PrintEot('viewban');
    exit;
} elseif ($_POST['action'] == 'freeban') {
    InitGP(array('free'), 'P');
    !$free && adminmsg('operate_error');
    $ids = pwImplode($free);
    $uids1 = $uids2 = array();
    $_cache = getDatastore();
    $query = $db->query("SELECT * FROM pw_banuser WHERE uid IN ({$ids})");
    while ($rt = $db->fetch_array($query)) {
        $_cache->delete('UID_' . $rt['uid']);
        if ($rt['fid']) {
            $uids2[] = $rt['uid'];
        } else {
            $uids1[] = $rt['uid'];
        }
    }
    $db->update("DELETE FROM pw_banuser WHERE uid IN({$ids})");
    $uids1 && $db->update("UPDATE pw_members SET groupid='-1' WHERE uid IN(" . pwImplode($uids1) . ")");
开发者ID:adi00,项目名称:wumaproject,代码行数:31,代码来源:viewban.php

示例5: exit

<?php

!defined('P_W') && exit('Forbidden');
define('AJAX', 1);
InitGP(array('tid', 'block_id'));
$tid = (int) $tid;
if (!$tid) {
    exit;
}
$thread = $db->get_one("SELECT tid,fid,author,authorid,subject,type,postdate,hits,replies FROM pw_threads WHERE tid=" . pwEscape($tid));
$temp = array();
if ($thread) {
    $temp = array();
    $temp['url'] = 'read.php?tid=' . $thread['tid'];
    $temp['title'] = $thread['subject'];
    $temp['image'] = '';
    $temp['forumname'] = getForumName($thread['fid']);
    $temp['forumurl'] = getForumUrl($thread['fid']);
    $temp['descrip'] = getDescripByTid($tid);
    //	$block	= $stopic_service->getBlockById($block_id);
    //	foreach ($block['config'] as $value) {
    //		if ($value == 'descrip') {
    //			$temp[$value] = getDescripByTid($tid);
    //		} elseif (array_key_exists($value,$thread)) {
    //			$temp[$value] = $thread[$value];
    //		} else {
    //			$temp[$value] = '';
    //		}
    //	}
    $temp = pwJsonEncode($temp);
    echo "success\t" . $temp;
开发者ID:adi00,项目名称:wumaproject,代码行数:31,代码来源:gettidcontent.php

示例6: exit

<?php

!function_exists('adminmsg') && exit('Forbidden');
$siteBindInfoService = L::loadClass('WeiboSiteBindInfoService', 'sns/weibotoplatform/service');
/* @var $siteBindInfoService PW_WeiboSiteBindInfoService */
$templatesConfig = array('article' => array('title' => '帖子内容', 'description' => '{title}为帖子标题 ; {content}为帖子内容摘要 ; {url}为帖子地址'), 'diary' => array('title' => '日志内容', 'description' => '{title}为日志标题;  {content}为日志内容摘要;  {url}为日志地址'), 'group_active' => array('title' => '群组活动', 'description' => '{title}为群组活动标题; {content}为群组活动内容摘要; {url}为群组活动地址'), 'cms' => array('title' => '文章内容', 'description' => '{title}为文章标题; {content}为文章内容摘要;  {url}为文章地址'), 'photos' => array('title' => '相册', 'description' => '{photo_count}为照片张数;  {url}为相册地址'), 'group_photos' => array('title' => '群组相册', 'description' => '{photo_count}为照片张数;  {url}为群组相册地址'));
InitGP(array('step', 'templates'));
if ($step == 'edit' && !empty($templates)) {
    $warningMessage = '';
    foreach ($templatesConfig as $key => $value) {
        if (!isset($templates[$key]) || '' == $templates[$key]) {
            $warningMessage = '所有微博模版不能为空';
        }
    }
    if (!$warningMessage) {
        $siteBindInfoService->saveWeiboTemplates($templates);
        $warningMessage = '恭喜, 设置成功了';
    }
}
$templatesSet = $siteBindInfoService->getWeiboTemplates();
include PrintTemplate('custom_weibo_template');
exit;
开发者ID:jechiy,项目名称:PHPWind,代码行数:22,代码来源:customweibotemplate.php

示例7: exit

<?php

!defined('P_W') && exit('Forbidden');
InitGP(array('id'), null, 2);
InitGP(array('record'));
$rt = $db->get_one("SELECT tid,fid FROM pw_pinglog WHERE ifhide=0 AND id=" . S::sqlEscape($id));
if (empty($rt) || !$rt['fid']) {
    Showmsg('data_error');
}
L::loadClass('forum', 'forum', false);
$pwforum = new PwForum($rt['fid']);
$isGM = CkInArray($windid, $manager);
if (!$isGM && !pwRights($pwforum->isBM($windid), 'pingcp', $rt['fid'])) {
    Showmsg('mawhole_right');
}
//$db->update("UPDATE pw_pinglog SET record=" . S::sqlEscape($record) . " WHERE id=" . S::sqlEscape($id));
pwQuery::update('pw_pinglog', 'id=:id', array($id), array('record' => $record));
echo "success";
# memcache reflesh
if ($db_memcache) {
    //* $threads = L::loadClass('Threads', 'forum');
    //* $threads->delThreads($rt['tid']);
    Perf::gatherInfo('changeThreadWithThreadIds', array('tid' => $rt['tid']));
}
ajax_footer();
开发者ID:sherlockhouse,项目名称:aliyun,代码行数:25,代码来源:savepinglog.php

示例8: exit

<?php

!function_exists('readover') && exit('Forbidden');
/****

@name:加亮道具
@type:帖子类
@effect:可以将自己的帖子标题加亮显示

****/
if ($tooldb['type'] != 1) {
    Showmsg('tooluse_type_error');
    // 判断道具类型是否设置错误
}
if (!$_POST['step']) {
    require_once PrintHack('index');
    footer();
} else {
    if ($tpcdb['authorid'] != $winduid) {
        Showmsg('tool_authorlimit');
    }
    InitGP(array('title1', 'title2', 'title3', 'title4', 'title5', 'title6'));
    $titlefont = "{$title1}~{$title2}~{$title3}~{$title4}~{$title5}~{$title6}~";
    $db->update("UPDATE pw_threads SET titlefont=" . pwEscape($titlefont) . ",toolinfo=" . pwEscape($tooldb['name'], false) . "WHERE tid=" . pwEscape($tid));
    $db->update("UPDATE pw_usertool SET nums=nums-1 WHERE uid=" . pwEscape($winduid) . "AND toolid=" . pwEscape($toolid));
    $logdata = array('type' => 'use', 'nums' => '', 'money' => '', 'descrip' => 'tool_3_descrip', 'uid' => $winduid, 'username' => $windid, 'ip' => $onlineip, 'time' => $timestamp, 'toolname' => $tooldb['name'], 'subject' => substrs($tpcdb['subject'], 15), 'tid' => $tid);
    writetoollog($logdata);
    Showmsg('toolmsg_success');
}
开发者ID:adi00,项目名称:wumaproject,代码行数:29,代码来源:colortitle.php

示例9: Showmsg

            !$fid && Showmsg('annouce_fid');
            InitGP(array('msgtype', 'toname', 'savetime'), 'P');
            !$msgtype && !$toname && Showmsg('forummsg_object');
            $msgtype == 1 ? $toname = '' : ($msgtype = 2);
            $savetime = $timestamp + (intval($savetime) > 0 ? intval($savetime) : 30) * 86400;
            $message = trim(Char_cv($_POST['message']));
            !$message && Showmsg('forummsg_content');
            $toname = "," . implode(',', $toname) . ",";
            $pwSQL = pwSqlSingle(array('fid' => $fid, 'uid' => $winduid, 'username' => $windid, 'toname' => $toname, 'msgtype' => $msgtype, 'posttime' => $timestamp, 'savetime' => $savetime, 'message' => $message));
            $db->update("INSERT INTO pw_forummsg SET {$pwSQL}");
            refreshto("forumcp.php?action=edit&type=msg&fid={$fid}", 'operate_success');
        }
    }
} elseif ($action == 'del') {
    PostCheck();
    InitGP(array('selid', 'type'));
    $selids = array();
    foreach ($selid as $key => $value) {
        is_numeric($value) && ($selids[] = $value);
    }
    if ($selids) {
        $selids = pwImplode($selids);
    } else {
        Showmsg('id_error');
    }
    if ($type == 'report') {
        $db->update("DELETE FROM pw_report WHERE id IN ({$selids})");
        refreshto("forumcp.php?action=edit&type=report&fid={$fid}", 'operate_success');
    }
}
function updatecache_fd1()
开发者ID:adi00,项目名称:wumaproject,代码行数:31,代码来源:forumcp.php

示例10: foreach

     }
     $editset = $checkvar = '';
     foreach ($nav_left as $title => $left) {
         $checkvar .= ",'chk_{$title}' : true";
         $editset .= '<tr class="tr3"><td width="15%"><a style="cursor:pointer" onclick="CheckForm(getObj(\'' . $title . '\'))">' . $left['name'] . '</a></td><td id="' . $title . '"><ul class="list2">';
         foreach ($left['items'] as $key => $value) {
             $checked = !empty($right) && (int) $right[$key] == 1 ? 'CHECKED' : '';
             $editset .= ' <li><input type="checkbox" name="rightdb[' . $key . ']" value="1" ' . $checked . '> ' . $value . '</li>';
         }
         $editset .= "</ul></td></tr>";
     }
     $checkvar && ($checkvar = substr($checkvar, 1));
     include PrintEot('rightset');
     exit;
 } else {
     InitGP(array('rightdb'), 'P', 2);
     !$gid && adminmsg('undefined_action');
     if (!empty($rightdb) && is_array($rightdb)) {
         $right = array();
         foreach ($rightdb as $key => $value) {
             list($k1, $k2) = explode('_', $key);
             if ($k1 == 'o' || $k1 == 'area' || $k1 == 'app') {
                 $right[$key] = $value;
             } else {
                 if ($k2) {
                     $right[$k1][$k2] = $value;
                 } else {
                     $right[$key] = $value;
                 }
             }
         }
开发者ID:adi00,项目名称:wumaproject,代码行数:31,代码来源:rightset.php

示例11: InitGP

<?php

include "../common.inc.php";
include "function_common.php";
InitGP(array("page", "action", "inbox", "uname", "email", "subject", "message", "did", "delids"));
//初始化变量全局返回
AjaxHead();
//禁止页面缓存
header("Content-type: text/html; charset=" . CHARSET);
if (empty($action)) {
    InitGP(array("uid", "isadmin", "email", "subject", "message"));
    //初始化变量全局返回
    if (!empty($_POST) and !empty($subject)) {
        //发送邮件
        if (isemail($email) && !empty($message)) {
            $emailstr = $message;
            include_once INC_PATH . "/sendmail.class.php";
            $sendmail = new SendEmail();
            $sendmail->sendmailto($subject, $emailstr, $email);
            if (!empty($inbox)) {
                exit("<script language='javascript'>alert('" . $sendmail->printmsg . "');parent.\$.fn.colorbox.close();</script>");
            } else {
                showmsg($sendmail->printmsg, PHP_SELF);
                //出错!
            }
        } else {
            if (!empty($inbox)) {
                exit("<script language='javascript'>alert('email格式错误');location.reload();</script>");
            } else {
                showmsg("email格式错误", PHP_SELF);
                //出错!
开发者ID:dalinhuang,项目名称:c2my,代码行数:31,代码来源:email_send.php

示例12: foreach

        $htm_tr = '';
        foreach ($groupdb as $key => $value) {
            if ($key == '1' || $key == '2') {
                continue;
            }
            $checked = strpos($postcate['viewright'], ',' . $key . ',') !== false ? 'checked' : '';
            $htm_tr = '';
            $num++;
            $num % 5 == 0 ? $htm_tr = '</tr><tr>' : '';
            $viewrighthtml .= "<td><input class='input' type='checkbox' name='viewright[]' value='" . $key . "' " . $checked . ">" . $value['grouptitle'] . "</td>" . $htm_tr;
        }
        $viewrighthtml .= "</tr></table>";
        include PrintEot('postcate');
        exit;
    } else {
        InitGP(array('viewright', 'adminright'));
        $viewrights = ',' . implode(',', $viewright) . ',';
        $adminrights = ',' . implode(',', $adminright) . ',';
        $db->update("UPDATE pw_postcate" . " SET " . pwSqlSingle(array('viewright' => $viewrights, 'adminright' => $adminrights)) . " WHERE pcid=" . pwEscape($pcid));
        updatecache_postcate();
        adminmsg('operate_success', $basename . "&action=rightset&pcid={$pcid}");
    }
}
function getFieldSqlByType($type)
{
    if (in_array($type, array('number', 'calendar'))) {
        $sql = "INT(10) UNSIGNED NOT NULL default '0'";
    } elseif (in_array($type, array('radio', 'select'))) {
        $sql = "TINYINT(3) UNSIGNED NOT NULL default '0'";
    } elseif ($type == 'textarea') {
        $sql = "TEXT NOT NULL";
开发者ID:adi00,项目名称:wumaproject,代码行数:31,代码来源:postcate.php

示例13: exit

<?php

!defined('M_P') && exit('Forbidden');
InitGP(array('pushid'), '', 2);
$pushdata = $invokeService->getPushDataById($pushid);
$invokeService->deletePushData($pushid);
$invokeService->updateCacheDataPiece($pushdata['invokepieceid'], $pushdata['fid'], $pushdata['loopid']);
echo "success";
ajax_footer();
开发者ID:adi00,项目名称:wumaproject,代码行数:9,代码来源:deletepush.php

示例14: exit

<?php

!function_exists('adminmsg') && exit('Forbidden');
$basename = "{$admin_file}?adminjob=unituser";
require_once R_P . 'require/credit.php';
if (!$action) {
    require_once PrintEot('unituser');
} elseif ($_POST['action'] == "unit") {
    InitGP(array('uids', 'newuid'), 'P');
    if (!$uids) {
        adminmsg('unituser_username_empty');
    }
    if (!$newuid) {
        adminmsg('unituser_newname_empty');
    }
    $touser = $db->get_one("SELECT username FROM pw_members WHERE uid=" . pwEscape($newuid));
    Add_S($touser);
    if (!$touser['username']) {
        adminmsg('unituser_newname_error');
    }
    $oldinfo = array();
    $uids = explode(',', $uids);
    foreach ($uids as $key => $val) {
        if (is_numeric($val)) {
            if ($val == $newuid) {
                adminmsg('unituser_samename');
            }
            $rt = $db->get_one("SELECT m.uid,m.username,md.postnum,md.digests,md.rvrc,md.money,md.credit,md.currency,mi.deposit,mi.ddeposit FROM pw_members m LEFT JOIN pw_memberdata md ON m.uid=md.uid LEFT JOIN pw_memberinfo mi ON m.uid=mi.uid WHERE m.uid=" . pwEscape($val));
            if (!$rt['uid']) {
                adminmsg('unituser_username_error');
            } else {
开发者ID:adi00,项目名称:wumaproject,代码行数:31,代码来源:unituser.php

示例15: updatecache_f

        updatecache_f();
        $basename = "{$admin_file}?adminjob=setforum&action=edit&fid={$fid}";
        adminmsg('operate_success');
    }
} elseif ($action == 'changename') {
    $fid = (int) GetGP('fid');
    InitGP(array('fname'), 'P', 0);
    $fname = str_replace('<iframe', '&lt;iframe', $fname);
    $fname = str_replace(array('<iframe', '"', "'"), array("&lt;iframe", "", ""), $fname);
    $db->update("UPDATE pw_forums SET name=" . pwEscape($fname) . " WHERE fid=" . pwEscape($fid));
    updatecache_f();
    $msg = getLangInfo('cpmsg', 'operate_success');
    echo $msg;
    ajax_footer();
} elseif ($action == 'delttype') {
    InitGP(array('type', 'id'));
    $id_array = array();
    if ($type == 'top') {
        $query = $db->query("SELECT id FROM pw_topictype WHERE upid=" . pwEscape($id));
        while ($rt = $db->fetch_array($query)) {
            $id_array[] = $rt['id'];
        }
    }
    $id_array = array_merge($id_array, array($id));
    if (!empty($id_array)) {
        $db->update("DELETE FROM pw_topictype WHERE id IN (" . pwImplode($id_array) . ")");
        updatecache_f();
        $ids = implode("\t", $id_array);
        echo "success\t" . $ids;
    } else {
        echo 'fail';
开发者ID:adi00,项目名称:wumaproject,代码行数:31,代码来源:setforum.php


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