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


PHP CkInArray函数代码示例

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


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

示例1: PwPost

 function PwPost(&$forum)
 {
     global $db, $winddb, $groupid, $_time, $_G, $manager, $windid, $winduid;
     $this->db =& $db;
     $this->user =& $winddb;
     $this->groupid =& $groupid;
     $this->hours =& $_time['hours'];
     $this->forum =& $forum;
     $this->uid =& $winduid;
     $this->username =& $windid;
     $this->_G =& $_G;
     $this->isGM = CkInArray($this->username, $manager);
     $this->isBM = $this->forum->isBM($this->username);
     $this->admincheck = $this->isGM || $this->isBM;
     $this->allowhide = $this->forum->foruminfo['allowhide'] && $this->_G['allowhidden'];
     $this->allowsell = $this->forum->foruminfo['allowsell'] && $this->_G['allowsell'];
     $this->allowencode = $this->forum->forumset['allowencode'] && $this->_G['allowencode'];
 }
开发者ID:adi00,项目名称:wumaproject,代码行数:18,代码来源:post.class.php

示例2: wap_check

function wap_check($fid, $action)
{
    global $db, $groupid, $_G, $_time, $db_titlemax, $db_postmin, $db_postmax, $subject, $content;
    $subject = trim($subject);
    $content = trim($content);
    if ($action == 'new' && (!$subject || strlen($subject) > $db_titlemax)) {
        wap_msg('subject_limit');
    }
    if (strlen($content) >= $db_postmax || strlen($content) < $db_postmin) {
        wap_msg('content_limit');
    }
    $fm = $db->get_one("SELECT f.forumadmin,f.fupadmin,f.password,f.allowvisit,f.f_type,f.f_check,f.allowpost,f.allowrp,fe.forumset FROM pw_forums f LEFT JOIN pw_forumsextra fe USING(fid) WHERE f.fid=" . pwEscape($fid));
    $forumset = unserialize($fm['forumset']);
    if (!$fm || $fm['password'] != '' || $fm['f_type'] == 'hidden' || $fm['allowvisit'] && @strpos($fm['allowvisit'], ",{$groupid},") === false) {
        wap_msg('post_right');
    }
    if ($action == 'new') {
        $isGM = CkInArray($GLOBALS['windid'], $GLOBALS['manager']);
        $isBM = admincheck($fm['forumadmin'], $fm['fupadmin'], $GLOBALS['windid']);
        if ($fm['f_check'] == '1' || $fm['f_check'] == '3') {
            wap_msg('post_right');
        }
        if ($fm['allowpost'] && strpos($fm['allowpost'], ",{$groupid},") === false) {
            wap_msg('post_right');
        }
        if (!$fm['allowpost'] && $_G['allowpost'] == 0) {
            wap_msg('post_group');
        }
        if ($forumset['allowtime'] && !$isGM && !allowcheck($forumset['allowtime'], "{$_time['hours']}", '') && !pwRights($isBM, 'allowtime')) {
            wap_msg('post_right');
        }
    } elseif ($action == 'reply') {
        if ($fm['f_check'] == '2' || $fm['f_check'] == '3') {
            wap_msg('reply_right');
        }
        if ($fm['allowrp'] && strpos($fm['allowrp'], ",{$groupid},") === false) {
            wap_msg('reply_right');
        }
        if (!$fm['allowrp'] && $_G['allowrp'] == 0) {
            wap_msg('reply_group');
        }
    }
}
开发者ID:adi00,项目名称:wumaproject,代码行数:43,代码来源:wap_global.php

示例3: forumcheck

 function forumcheck($user, $groupid)
 {
     if ($this->foruminfo['f_type'] == 'former' && $groupid == 'guest' && $_COOKIE) {
         Showmsg('forum_former');
     }
     if (!empty($this->foruminfo['style']) && file_exists(D_P . "data/style/{$this->foruminfo[style]}.php")) {
         $GLOBALS['skin'] = $this->foruminfo['style'];
     }
     $pwdcheck = GetCookie('pwdcheck');
     if ($this->foruminfo['password'] != '' && ($groupid == 'guest' || $pwdcheck[$this->fid] != $this->foruminfo['password'] && !CkInArray($user['username'], $GLOBALS['manager']))) {
         require_once R_P . 'require/forumpw.php';
     }
     if (!$this->allowvisit($user, $groupid)) {
         Showmsg('forum_jiami');
     }
     if (!$this->foruminfo['cms'] && $this->foruminfo['f_type'] == 'hidden' && !$this->foruminfo['allowvisit']) {
         Showmsg('forum_hidden');
     }
 }
开发者ID:adi00,项目名称:wumaproject,代码行数:19,代码来源:forum.class.php

示例4: wind_forumcheck

function wind_forumcheck($forum)
{
    global $windid, $groupid, $tid, $fid, $skin, $winddb, $manager;
    if ($forum['f_type'] == 'former' && $groupid == 'guest' && $_COOKIE) {
        Showmsg('forum_former');
    }
    if (!empty($forum['style']) && file_exists(D_P . "data/style/{$forum['style']}.php")) {
        $skin = $forum['style'];
    }
    $pwdcheck = GetCookie('pwdcheck');
    if ($forum['password'] != '' && ($groupid == 'guest' || $pwdcheck[$fid] != $forum['password'] && !CkInArray($windid, $manager))) {
        require_once R_P . 'require/forumpw.php';
    }
    if ($forum['allowvisit'] && !allowcheck($forum['allowvisit'], $groupid, $winddb['groups'], $fid, $winddb['visit'])) {
        Showmsg('forum_jiami');
    }
    if (!$forum['cms'] && $forum['f_type'] == 'hidden' && !$forum['allowvisit']) {
        Showmsg('forum_hidden');
    }
}
开发者ID:adi00,项目名称:wumaproject,代码行数:20,代码来源:forum.php

示例5: IN

            $query = $db->query("SELECT aid,COUNT(*) AS sum FROM pw_cnphoto WHERE aid IN(" . pwImplode(array($aid, $photo['aid'])) . ') GROUP BY aid');
            while ($rt = $db->fetch_array($query)) {
                $phnum[$rt['aid']] = $rt['sum'];
            }
            if ($photo['path'] == $photo['lastphoto']) {
                $lastphoto = $db->get_value("SELECT path FROM pw_cnphoto WHERE aid=" . pwEscape($photo['aid']) . " ORDER BY pid DESC LIMIT 1");
            }
            $db->update("UPDATE pw_cnalbum SET " . pwSqlSingle(array('photonum' => $phnum[$aid] ? $phnum[$aid] : 0, 'lastpid' => implode(',', getLastPid($aid)))) . ' WHERE aid=' . pwEscape($aid));
            $db->update("UPDATE pw_cnalbum SET " . pwSqlSingle(array('photonum' => $phnum[$photo['aid']] ? $phnum[$photo['aid']] : 0, 'lastpid' => implode(',', getLastPid($photo['aid'])), 'lastphoto' => $lastphoto)) . ' WHERE aid=' . pwEscape($photo['aid']));
        }
        refreshto("{$basename}a=view&pid={$pid}", 'operate_success');
    }
} elseif ($a == 'delphoto') {
    define('AJAX', '1');
    InitGP(array('pid'), null, 2);
    $isGM = CkInArray($windid, $manager);
    !$isGM && $groupid == 3 && ($isGM = 1);
    if ($isGM) {
        $whereadd = '';
    } else {
        $whereadd = " AND ca.ownerid=" . pwEscape($winduid);
    }
    $photo = $db->get_one("SELECT cp.path,cp.uploader,ca.aid,ca.lastphoto,ca.lastpid,m.uid FROM pw_cnphoto cp LEFT JOIN pw_cnalbum ca ON cp.aid=ca.aid LEFT JOIN pw_members m ON cp.uploader=m.username WHERE cp.pid=" . pwEscape($pid) . " AND ca.atype='0' {$whereadd}");
    if (empty($photo)) {
        Showmsg('data_error');
    }
    $db->update("DELETE FROM pw_cnphoto WHERE pid=" . pwEscape($pid));
    $pwSQL = array();
    if ($photo['path'] == $photo['lastphoto']) {
        $pwSQL['lastphoto'] = $db->get_value("SELECT path FROM pw_cnphoto WHERE aid=" . pwEscape($photo['aid']) . " ORDER BY pid DESC LIMIT 1");
    }
开发者ID:adi00,项目名称:wumaproject,代码行数:31,代码来源:index.php

示例6: array

 $upmembers = $upmemdata = $upmeminfo = array();
 if ($ifppt) {
     include_once D_P . 'data/bbscache/dbreg.php';
     InitGP(array('propwd', 'proemail'), 'P');
     if ($propwd || $userdb['email'] != $proemail) {
         if ($_POST['oldpwd']) {
             if (strlen($userdb['password']) == 16) {
                 $_POST['oldpwd'] = substr(md5($_POST['oldpwd']), 8, 16);
                 //支持 16 位 md5截取密码
             } else {
                 $_POST['oldpwd'] = md5($_POST['oldpwd']);
             }
         }
         $userdb['password'] != $_POST['oldpwd'] && Showmsg('pwd_confirm_fail');
         if ($propwd) {
             CkInArray($windid, $manager) && Showmsg('pro_manager');
             $propwd != $_POST['check_pwd'] && Showmsg('password_confirm');
             if ($propwd != str_replace(array("\\", '&', ' ', "'", '"', '/', '*', ',', '<', '>', "\r", "\t", "\n", '#', '%'), '', $propwd)) {
                 Showmsg('illegal_password');
             }
             list($rg_regminpwd, $rg_regmaxpwd) = explode("\t", $rg_pwdlen);
             if (strlen($propwd) < $rg_regminpwd) {
                 Showmsg('reg_password_minlimit');
             } elseif ($rg_regmaxpwd && strlen($propwd) > $rg_regmaxpwd) {
                 Showmsg('reg_password_maxlimit');
             } elseif ($rg_npdifferf && $propwd == $windid) {
                 Showmsg('reg_nameuptopwd');
             }
             if ($rg_pwdcomplex) {
                 $arr_rule = array();
                 $arr_rule = explode(',', $rg_pwdcomplex);
开发者ID:adi00,项目名称:wumaproject,代码行数:31,代码来源:modify.php

示例7: checkpass

function checkpass($CK)
{
    Add_S($CK);
    global $db, $manager, $db_ifsafecv, $db_gdcheck;
    if ($_POST['Login_f'] == 1 && $db_gdcheck & 32) {
        GdConfirm($_POST['lg_num']);
    }
    if (CkInArray($CK[1], $manager)) {
        global $manager_pwd;
        $v_key = array_search($CK[1], $manager);
        if (!SafeCheck($CK, PwdCode($manager_pwd[$v_key]))) {
            $rt = $db->get_one("SELECT uid,username,groupid,groups,password,safecv FROM pw_members WHERE username=" . pwEscape($CK[1]));
            if (!SafeCheck($CK, PwdCode($rt['password'])) || $db_ifsafecv && $rt['safecv'] != $CK['3']) {
                return false;
            }
            if (!admincheck($rt['uid'], $rt['username'], $rt['groupid'], $rt['groups'], 'check')) {
                return false;
            }
        } elseif ($db_ifsafecv) {
            $query = $db->query('SELECT safecv FROM pw_members WHERE username=' . pwEscape($CK[1]), null, false);
            if ($db->num_rows($query) > 0) {
                $rt = $db->fetch_array($query, MYSQL_NUM);
                if ($rt[0] != $CK['3']) {
                    return false;
                }
            }
        }
        define('If_manager', 1);
        $rightset['gid'] = 3;
        $rightset['all'] = 1;
        require GetLang('purview');
        foreach ($purview as $key => $value) {
            $rightset[$key] = 1;
        }
        foreach ($nav_manager['option'] as $key => $value) {
            $rightset[$key] = 1;
        }
    } else {
        $rt = $db->get_one("SELECT m.uid,m.username,m.groupid,m.groups,m.password,m.safecv,m.groupid,u.gptype,p.rvalue as allowadmincp FROM pw_members m LEFT JOIN pw_usergroups u ON u.gid=m.groupid LEFT JOIN pw_permission p ON p.uid='0' AND p.fid='0' AND p.gid=m.groupid AND p.rkey='allowadmincp' WHERE m.username=" . pwEscape($CK[1]));
        if (!$rt['allowadmincp'] || $rt['gptype'] != 'system' && $rt['gptype'] != 'special' || $db_ifsafecv && $rt['safecv'] != $CK['3']) {
            return false;
        }
        if (!SafeCheck($CK, PwdCode($rt['password'])) || !admincheck($rt['uid'], $CK[1], $rt['groupid'], $rt['groups'], 'check')) {
            return false;
        }
        $rightset = $db->get_value('SELECT value FROM pw_adminset WHERE gid=' . pwEscape($rt['groupid']));
        if ($rightset) {
            if (!is_array($rightset = unserialize($rightset))) {
                $rightset = array();
            }
        } else {
            $rightset = array();
        }
        require GetLang('purview');
        foreach ($rightset as $key => $value) {
            $rightset[$key] = isset($purview[$key]) && $rightset[$key] == 1 ? 1 : 0;
        }
        $rightset['gid'] = $rt['groupid'];
    }
    return $rightset;
}
开发者ID:adi00,项目名称:wumaproject,代码行数:61,代码来源:admincp.php

示例8: pingCheck

 function pingCheck($checkType = '')
 {
     global $db_pingtime, $timestamp, $gp_gptype, $winduid, $windid, $manager, $_G;
     $pids = array_keys($this->postData);
     foreach ($pids as $k => $v) {
         !is_numeric($v) && ($pids[$k] = 0);
     }
     foreach ($this->postData as $pid => $post) {
         if ($db_pingtime && $timestamp - $post['postdate'] > $db_pingtime * 3600 && $gp_gptype != 'system') {
             return 'pingtime_over';
         }
         if ($winduid == $post['authorid'] && $checkType == 1 && !CkInArray($windid, $manager)) {
             return 'masigle_manager';
         }
     }
     if ($checkType == '1' && $_G['markable'] < 2 && $this->isPing($this->tid, $pids)) {
         return 'no_markagain';
     }
     if ($checkType == '2' && $this->isNotPing($this->tid, $pids)) {
         return 'have_not_showping';
     }
     return true;
 }
开发者ID:sherlockhouse,项目名称:aliyun,代码行数:23,代码来源:ping.class.php

示例9: adminmsg

            adminmsg('manager_errorusername');
        }
        $key = (int) array_search($oldname, $manager);
        if (!$password) {
            $password = $manager_pwd[$key];
        } else {
            if (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 (CkInArray($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, 'attach_url' => $attach_url);
        require_once R_P . 'require/updateset.php';
        write_config($newconfig);
        unset($newconfig);
        pwUpdateManager($username, $password);
        adminmsg('operate_success');
    }
} elseif ($action == 'delete') {
    if ($_POST['step'] != 2) {
        $inputmsg = '<input name="step" type="hidden" value="2" /><input name="action" type="hidden" value="delete" /><input name="username" type="hidden" value="' . $oldname . '" />';
开发者ID:adi00,项目名称:wumaproject,代码行数:31,代码来源:manager.php

示例10: while

     $query = $db->query("SELECT uid,username,email,icon as face,regdate,honor FROM pw_members WHERE {$where} " . "ORDER BY regdate DESC " . $limit);
     while ($rt = $db->fetch_array($query)) {
         list($rt['face']) = showfacedesign($rt['face'], '1', 'm');
         $rt['regdate'] = get_date($rt['regdate']);
         $rt['honor'] = substrs($rt['honor'], 50);
         $members[] = $rt;
     }
 } else {
     $mfriendkeys = $friendkeys = array();
     if ($myfriends = getFriends($winduid, 0)) {
         $friendkeys = array_keys($myfriends);
         if ($friendkeys) {
             $query = $db->query('SELECT friendid FROM pw_friends WHERE uid IN(' . pwImplode($friendkeys) . ') AND status=0 LIMIT 30');
             $mfriends = array();
             while ($rt = $db->fetch_array($query)) {
                 if ($rt['friendid'] != $winduid && !CkInArray($rt['friendid'], $friendkeys)) {
                     isset($mfriends[$rt['friendid']]) ? $mfriends[$rt['friendid']]++ : ($mfriends[$rt['friendid']] = 1);
                 }
             }
             arsort($mfriends);
             if (count($mfriends) > 6) {
                 $i = 0;
                 $temp_friend = array();
                 foreach ($mfriends as $key => $value) {
                     $temp_friend[$key] = $value;
                     $i++;
                     if ($i == 6) {
                         break;
                     }
                 }
                 $mfriends = $temp_friend;
开发者ID:adi00,项目名称:wumaproject,代码行数:31,代码来源:m_friend.php

示例11: ceil

     $per['uploadmaxsize'] = ceil(($gRight['uploadmaxsize'] ? $gRight['uploadmaxsize'] : $db_uploadmaxsize) / 1024);
     !$gRight['uploadtype'] && ($gRight['uploadtype'] = $db_uploadfiletype);
     $gRight['uploadtype'] = unserialize($gRight['uploadtype']);
     $per['uptype'] = '';
     foreach ($gRight['uploadtype'] as $key => $value) {
         $per['uptype'] .= ($per['uptype'] ? ', ' : '') . "{$key}:{$value}";
     }
     unset($creditdb, $groups, $value, $ltitle, $gRight);
 } else {
     require_once R_P . 'require/forum.php';
     if (!($rt = L::forum($fid))) {
         Showmsg('data_error');
     }
     (!$rt || $rt['type'] == 'category') && Showmsg('data_error');
     $forumset = $rt['forumset'];
     if (!CkInArray($windid, $manager)) {
         wind_forumcheck($rt);
     }
     $forumset['link'] && Showmsg('data_error');
     $per = $forumright = array();
     $creditset = $credit->creditset($rt['creditset'], $db_creditset);
     foreach ($creditset as $key => $value) {
         foreach ($value as $k => $v) {
             $forumright[$k][$key] = (int) $v;
         }
     }
     $per['upload'] = $per['down'] = $per['rp'] = $per['post'] = $per['visit'] = 1;
     $per['name'] = strip_tags($rt['name']);
     if ($rt['allowvisit'] && strpos($rt['allowvisit'], ',' . $groupid . ',') === false) {
         $per['visit'] = 0;
     }
开发者ID:jechiy,项目名称:PHPWind,代码行数:31,代码来源:permission.php

示例12: SUM

            $sys_mail = 'Disabled';
        }
        @extract($db->get_one('SELECT totalmember,yposts FROM pw_bbsinfo WHERE id=1'));
        @extract($db->get_one('SELECT SUM(topic) AS threads,SUM(article) AS posts FROM pw_forumdata'));
        $hits = $db->get_value('SELECT SUM(hits) FROM pw_threads');
        $cachetime = $timestamp + 60 * 60 * 12;
        writeover(D_P . 'data/bbscache/admin_cache.php', "<?php die;?>{$cachetime}|{$pw_size}|{$o_size}|{$dbversion}|{$max_upload}|{$max_ex_time}|{$sys_mail}|{$totalmember}|{$threads}|{$posts}|{$hits}|{$yposts}\r\n{$cachetext[1]}");
    }
    $altertime = gmdate('Y-m-d H:i', $timestamp + $db_timedf * 3600);
    $systemtime = $db_cvtime == 0 ? $altertime : gmdate('Y-m-d H:i', time() + $db_timedf * 3600);
    $sysversion = PHP_VERSION;
    $sysos = str_replace('PHP/' . $sysversion, '', GetServer('SERVER_SOFTWARE'));
    $ifcookie = isset($_COOKIE) ? 'SUCCESS' : 'FAIL';
}
if (!$job || $job == 'desktop') {
    if (CkInArray($admin_name, $manager)) {
        $u = 1;
        if (pwWritable(D_P . 'data/sql_config.php')) {
            $warnid += 1;
        }
        if (is_dir('data')) {
            $warnid += 2;
        }
        if (ini_get('register_globals')) {
            $warnid += 4;
        }
        if (file_exists('admin.php')) {
            $warnid += 8;
        }
        if (!$db_ifsafecv || strpos($db_safegroup, ',3,') === false || strpos($db_safegroup, ',4,') === false || strpos($db_safegroup, ',5,') === false) {
            $warnid += 16;
开发者ID:adi00,项目名称:wumaproject,代码行数:31,代码来源:admininfo.php

示例13: checkName

 function checkName($regname)
 {
     if (!PW_Register::checkNameLen(strlen($regname))) {
         Showmsg('reg_username_limit');
     }
     if (str_replace($this->illegalChar, '', $regname) != $regname) {
         Showmsg('illegal_username');
     }
     if (!L::reg('rg_rglower') && !PW_Register::checkRglower($regname)) {
         Showmsg('username_limit');
     }
     if (CkInArray(strtolower($regname), array('guest', 'system'))) {
         Showmsg('illegal_username');
     }
     $banname = explode(',', L::reg('rg_banname'));
     foreach ($banname as $key => $value) {
         if ($value && strpos($regname, $value) !== false) {
             Showmsg('illegal_username');
         }
     }
     if ($regname !== Sql_cv($regname)) {
         Showmsg('illegal_username');
     }
 }
开发者ID:adi00,项目名称:wumaproject,代码行数:24,代码来源:register.class.php

示例14: str_replace

    $rt['content'] = str_replace("\n", "<br>", $rt['content']);
    include_once D_P . 'data/bbscache/wordsfb.php';
    foreach ($alarm as $key => $value) {
        $rt['content'] = str_replace($key, '<span style="background-color:#ffff66">' . $key . '</span>', $rt['content']);
    }
    include PrintEot('content');
    exit;
} elseif ($type == 'post') {
    $pw_posts = GetPtable('N', $tid);
    $rt = $db->get_one("SELECT pid,tid,subject,content FROM {$pw_posts} WHERE pid=" . pwEscape($id));
    $rt['content'] = str_replace("\n", "<br>", $rt['content']);
    include_once D_P . 'data/bbscache/wordsfb.php';
    foreach ($alarm as $key => $value) {
        $rt['content'] = str_replace($key, '<span style="background-color:#ffff66">' . $key . '</span>', $rt['content']);
    }
    include PrintEot('content');
    exit;
} elseif ($type == 'message') {
    $rt = $db->get_one("SELECT m.touid,mc.title,mc.content FROM pw_msg m LEFT JOIN pw_msgc mc USING(mid) WHERE m.mid=" . pwEscape($id));
    $msg = $db->get_one("SELECT username,groupid FROM pw_members WHERE uid=" . pwEscape($rt['touid']));
    if ($msg['username'] && CkInArray($msg['username'], $manager) && !If_manager) {
        adminmsg('msg_managerright');
    }
    if ($msg['groupid'] == 3 && $admin_gid != 3) {
        adminmsg('msg_adminright');
    }
    $rt['subject'] = $rt['title'];
    $rt['content'] = str_replace("\n", "<br>", $rt['content']);
    include PrintEot('content');
    exit;
}
开发者ID:adi00,项目名称:wumaproject,代码行数:31,代码来源:content.php

示例15: AND

 if ($filesize) {
     if ($ifless) {
         $sql .= " AND (size<" . pwEscape($filesize) . ')';
     } else {
         $sql .= " AND (size>" . pwEscape($filesize) . ')';
     }
 }
 if ($postdate1) {
     $uploadtime = PwStrtoTime($postdate1);
     is_numeric($uploadtime) && ($sql .= " AND uploadtime>" . pwEscape($uploadtime));
 }
 if ($postdate2) {
     $uploadtime = PwStrtoTime($postdate2);
     is_numeric($uploadtime) && ($sql .= " AND uploadtime<" . pwEscape($uploadtime));
 }
 if (CkInArray($orderway, array('uploadtime', 'size', 'rvrc', 'name', 'hits'))) {
     $order = "ORDER BY {$orderway}";
     $asc == 'DESC' && ($order .= ' ' . $asc);
 } else {
     $order = '';
 }
 $pernum = is_numeric($pernum) ? $pernum : 20;
 $page < 1 && ($page = 1);
 $limit = pwLimit(($page - 1) * $pernum, $pernum);
 $rt = $db->get_one("SELECT COUNT(*) AS count FROM pw_attachs WHERE {$sql}");
 $sum = $rt['count'];
 $numofpage = ceil($sum / $pernum);
 $pages = numofpage($sum, $page, $numofpage, "{$basename}&action=search&fid={$fid}&uid={$uid}&filename=" . rawurlencode($filename) . "&hits={$hits}&ifmore={$ifmore}&filesize={$filesize}&ifless={$ifless}&orderway={$orderway}&asc={$asc}&postdate1={$postdate1}&postdate2={$postdate2}&pernum={$pernum}&");
 $attachdb = $thread = array();
 $query = $db->query("SELECT * FROM pw_attachs WHERE {$sql} {$order} {$limit}");
 while (@extract($db->fetch_array($query))) {
开发者ID:adi00,项目名称:wumaproject,代码行数:31,代码来源:attachment.php


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