Esempio n. 1
0
function areaFooter()
{
    global $db_advertdb;
    if (!defined('AREA_PAGE') && ($db_advertdb['Site.PopupNotice'] || $db_advertdb['Site.FloatLeft'] || $db_advertdb['Site.FloatRight'] || $db_advertdb['Site.FloatRand'])) {
        require PrintEot('advert');
    }
    $output = cookTemplate();
    echo ObContents($output);
    unset($output);
    N_flush();
}
Esempio n. 2
0
function wap_footer()
{
    global $wind_version, $db_obstart, $windid, $db_charset, $db_wapcharset, $prog, $chs;
    require_once PrintEot('wap_footer');
    $output = ob_get_contents();
    ob_end_clean();
    $db_obstart && function_exists('ob_gzhandler') ? ob_start('ob_gzhandler') : ob_start();
    if ($db_charset != 'utf8') {
        $chs = new Chinese();
        $output = $chs->Convert($output, $db_charset, $db_wapcharset ? 'UTF8' : 'UNICODE');
    }
    $output = str_replace(array('<!--<!---->', '<!---->'), '', $output);
    echo $output;
    flush();
    exit;
}
 function getAdminTemplate($uid)
 {
     pwCache::getData(D_P . 'data/bbscache/customfield.php');
     global $customfield;
     if (!S::isArray($customfield)) {
         return false;
     }
     require PrintEot('customerfield_admin');
     $template = new customerFieldAdminTemplate();
     $template->pwCustomerField = $this->customerField;
     $html = '';
     $this->customerFieldData = L::loadClass('CustomerFieldData', 'user');
     foreach ($customfield as $v) {
         $customFieldValue = $this->customerFieldData->getCustomerData($v, $uid);
         $html .= $template->buildHtml($v, $customFieldValue);
     }
     return $html;
 }
Esempio n. 4
0
<?php

!defined('P_W') && exit('Forbidden');
InitGP(array('keyword'));
require_once R_P . "lib/adminsearch.class.php";
$searchpurview = new AdminSearch($keyword);
$result = $searchpurview->search();
include PrintEot('search');
exit;
Esempio n. 5
0
            adminmsg('user_not_exists');
        }
        $uid = $userdb['uid'];
    }
    if ($uid) {
        $sql .= " AND fs.uid=" . S::sqlEscape($uid);
    }
    if ($fid) {
        $sql .= " AND fs.fid=" . S::sqlEscape($fid);
    }
    $page < 1 && ($page = 1);
    $limit = S::sqlLimit(($page - 1) * $db_perpage, $db_perpage);
    $rt = $db->get_one("SELECT COUNT(*) AS sum FROM pw_forumsell fs {$sql}");
    $pages = numofpage($rt['sum'], $page, ceil($rt['sum'] / $db_perpage), "{$basename}&uid={$uid}&fid={$fid}&");
    $buydb = array();
    $query = $db->query("SELECT fs.*,m.username,m.uid FROM pw_forumsell fs LEFT JOIN pw_members m USING(uid) {$sql} ORDER BY fs.overdate DESC {$limit}");
    while ($rt = $db->fetch_array($query)) {
        $rt['buydate'] = get_date($rt['buydate']);
        $rt['overtime'] = get_date($rt['overdate']);
        $buydb[] = $rt;
    }
    include PrintEot('forumsell');
    exit;
} elseif ($_POST['action'] == 'del') {
    S::gp(array('selid'));
    if (!($selid = checkselid($selid))) {
        adminmsg('operate_error');
    }
    $db->update("DELETE FROM pw_forumsell WHERE id IN({$selid})");
    adminmsg('operate_success');
}
Esempio n. 6
0
                $creditdb = explode('|', $value);
                $tmpCreditPop .= ($tmpCreditPop ? '<br/>' : '') . S::escapeChar(GetCreditLang('creditpop', $creditdb['0']));
                unset($creditdb['0']);
                foreach ($creditdb as $val) {
                    list($credit_1, $credit_2) = explode(':', $val);
                    $tmpCreditPop .= '<span class="st2">' . pwCreditNames($credit_1) . '&nbsp;<span class="f24">' . $credit_2 . '</span></span>';
                }
            }
            $credit_pop = $tmpCreditPop;
            $userService = L::loadClass('UserService', 'user');
            /* @var $userService PW_UserService */
            $userService->update($winduid, array(), array('creditpop' => ''));
        }
    }
    $db_ifcredit && $credit_pop && (require PrintEot('credit_pop'));
    require_once PrintEot('read_addfloor');
    //	$output = ob_get_contents();
    //	$output = str_replace(
    //	array("\r",'<!---->-->','<!--<!---->',"<!---->\n",'<!---->','<!-- -->',"<!--\n-->","\t\t",'        ',"\n\t","\n\n","<!--","-->"),
    //	array('','','','','','','','',"\n","\n","",""),
    //	$output
    //	);
    ajax_footer();
}
function viewread($read, $start_limit)
{
    global $db, $_G, $isGM, $pwSystem, $groupid, $attach_url, $winduid, $tablecolor, $tpc_author, $tpc_buy, $tpc_pid, $tpc_tag, $count, $orderby, $pageinverse, $timestamp, $db_onlinetime, $attachdir, $attachpath, $readcolorone, $readcolortwo, $lpic, $ltitle, $imgpath, $db_ipfrom, $db_showonline, $stylepath, $db_windpost, $db_windpic, $db_signwindcode, $fid, $tid, $pid, $db_md_ifopen, $_MEDALDB, $rewardtype, $db_shield, $db_iftag, $db_readtag, $viewpic;
    global $ping_logs;
    if ($read['istop'] == 'topped') {
        $read['lou'] = $read['floor'];
    } else {
Esempio n. 7
0
        if ($rightset[$key]) {
            if (is_array($value)) {
                foreach ($value as $k => $v) {
                    $output2 .= "<tr><td class=b onmouseover=\"this.className='left_over';\" onmouseout=\"this.className='b'\">" . $v . "</td></tr>";
                }
            } else {
                $output2 .= "<tr><td class=b onmouseover=\"this.className='left_over';\" onmouseout=\"this.className='b'\">" . $value . "</td></tr>";
            }
        }
    }
    if ($output2) {
        $output1 .= $output2 . "</td></tr></tbody></table></td></tr>";
    } else {
        unset($output1);
    }
    $leftinfo .= $output1;
    $i++;
}
function GetDeploy($name)
{
    global $_COOKIE;
    if (strpos($_COOKIE['deploy'], "\t" . $name . "\t") === false) {
        $type = 'fold';
    } else {
        $type = 'open';
        $style = 'display:none;';
    }
    return array($type, $style);
}
include PrintEot('adminleft');
exit;
Esempio n. 8
0
 if (empty($_POST['step'])) {
     S::gp("id", null, 2);
     //* @include_once pwCache::getPath(D_P.'data/bbscache/o_config.php');
     pwCache::getData(D_P . 'data/bbscache/o_config.php');
     $friend = getFriends($winduid) ? getFriends($winduid) : array();
     foreach ($friend as $key => $value) {
         $frienddb[$value['ftid']][] = $value;
     }
     $query = $db->query("SELECT * FROM pw_friendtype WHERE uid=" . S::sqlEscape($winduid) . " ORDER BY ftid");
     $friendtype = array();
     while ($rt = $db->fetch_array($query)) {
         $friendtype[$rt['ftid']] = $rt;
     }
     $no_group_name = getLangInfo('other', 'no_group_name');
     $friendtype[0] = array('ftid' => 0, 'uid' => $winduid, 'name' => $no_group_name);
     require_once PrintEot('thread_member');
     footer();
 } elseif ($_POST['step'] == 1) {
     // 发送email邀请
     S::gp(array('emails', 'customdes'), 'P');
     strlen($emails) > 200 && Showmsg('mode_o_email_toolang');
     strlen($content) > 200 && Showmsg('mode_o_extra_toolang');
     if (strpos($emails, ',') !== false) {
         $emails = explode(',', $emails);
     } else {
         $emails = explode("\n", $emails);
     }
     count($emails) > 5 && Showmsg('mode_o_email_toolang');
     if ($emails) {
         foreach ($emails as $key => $email) {
             $emails[$key] = trim($email);
Esempio n. 9
0
            if ($rt['fid']) {
                $uids2[] = $rt['uid'];
            } else {
                $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'];
        }
Esempio n. 10
0
        }
    } else {
        $child['logo'] = '';
    }
    if ($child['forumadmin']) {
        $forumadmin = explode(",", $child['forumadmin']);
        foreach ($forumadmin as $key => $value) {
            if ($value) {
                if (!$db_adminshow) {
                    //if ($key==4) {$child['admin'].='...'; break;}
                    $child['admin'] .= "<a href=u.php?username="******">{$value}</a> ";
                } else {
                    $child['admin'] .= "<option value={$value}>{$value}</option>";
                }
            }
        }
        $db_adminshow && ($child['admin'] .= '</select>');
    }
    /*The app client*/
    if ($db_siteappkey && $db_apps_list['17']['status'] == 1) {
        $child['forumappinfo'] = $appclient->showForumappinfo($child['fid'], 'subforum_erect,subforum_across', '17');
    }
    /*The app client*/
    $forumdb[] = $child;
}
$db->free_result($query);
$forumdb && ($foruminfo['viewsub'] == 0 || $foruminfo['viewsub'] == 1) && ($thread_children = 'thread_children');
if ($foruminfo['viewsub'] == 3 || $foruminfo['viewsub'] == 1) {
    require_once PrintEot('thread_childmain');
    footer();
}
Esempio n. 11
0
            $messageServer->manageMessageWithMessageIds($delid);
            adminmsg('operate_success', "{$url}");
        }
    } elseif ($action == 'msglog') {
        S::gp(array('smstype', 'keepunread', 'direct', 'page'));
        $page = intval($page) ? intval($page) : 1;
        $url = $basename . "&action=msglog&smstype={$smstype}&keepunread={$keepunread}&";
        if (empty($_POST['step'])) {
            $direct = 1;
            empty($smstype) && adminmsg('类型不能为空');
            list($searchCount, $searchList) = $messageServer->manageMessageWithCategory($smstype, $keepunread, $direct, $page, $db_perpage);
            $pages = numofpage($searchCount, $page, ceil($searchCount / $db_perpage), "{$url}");
            if ($direct) {
                adminmsg('operate_success');
            } else {
                include PrintEot('superdel');
                exit;
            }
        } elseif ($_POST['step'] == 2) {
            S::gp(array('delid'), 'P');
            empty($delid) && adminmsg("请选择要删除的消息");
            $messageServer->manageMessageWithMessageIds($delid);
            adminmsg('operate_success', "{$url}");
        }
    }
}
function _delModelTopic($modeldb)
{
    global $db;
    foreach ($modeldb as $key => $value) {
        $modelids = S::sqlImplode($value);
Esempio n. 12
0
<?php

!function_exists('adminmsg') && exit('Forbidden');
$basename = "{$admin_file}?adminjob=ipban&job=ipstates";
if ($action != 'submit' && $action != 'ipIndex') {
    ifcheck($db_ipstates, 'ipstates');
    include PrintEot('ipstates');
} elseif ($_POST['action'] == "submit") {
    S::gp(array('ipstates'), 'P');
    setConfig('db_ipstates', $ipstates);
    updatecache_c();
    $navConfigService = L::loadClass('navconfig', 'site');
    $navConfigService->controlShowByKey('sort_ipstate', $ipstates);
    adminmsg('operate_success');
} elseif ($action == "ipIndex") {
    $ipTable = L::loadClass('IPTable', 'utility');
    $ipTable->createIpIndex();
    adminmsg('operate_success');
}
Esempio n. 13
0
            $title = $temp['group']['name'] . "({$rt['link']})";
        } elseif ($rt['type'] == 'diary') {
            $title = $temp['diary']['subject'] . "({$rt['link']})";
        } elseif ($rt['type'] == 'topic') {
            $title = $temp['topic']['subject'] . "({$rt['link']})";
        } else {
            $title = $rt['link'];
        }
        $descrip = $temp['descrip'];
        $username = $rt['username'];
        $atc_name = getLangInfo('app', $rt['type']);
        require_once PrintEot('m_ajax');
        ajax_footer();
    }
}
require_once PrintEot('m_collection');
pwOutPut();
function getVideo($link, $host)
{
    $matches = array();
    switch ($host) {
        case 'youku.com':
            preg_match("/v_show\\/id_(\\w+)\\.html/", $link, $matches);
            break;
        case 'youtube.com':
            preg_match("/v\\=([\\w\\-]+)/", $link, $matches);
            break;
        case 'sina.com.cn':
            preg_match("/\\/(\\d+)-(\\d+)\\.html/", $link, $matches);
            break;
        case 'sohu.com':
Esempio n. 14
0
    if (!$_checkService->getServerStatus()) {
        list($fsockopen, $parse_url, $isgethostbyname, $gethostbyname) = $_checkService->getFunctionsInfo();
        list($searchHost, $searchIP, $searchPort, $searchPing) = $_checkService->getSearchHostInfo();
        list($defendHost, $defendIp, $defendPort, $defendPing) = $_checkService->getDefendHostInfo();
    } else {
        $step = 3;
    }
} elseif ($step == 3) {
    if (!$_checkService->getServerStatus()) {
        Showmsg('环境检测末通过,请联系论坛空间提供商解决');
    }
} elseif ($step == 4) {
    CLOUDWIND_SECURITY_SERVICE::gp(array('siteurl', 'sitename', 'bossname', 'bossphone', 'search', 'defend'));
    if (!$siteurl || !$sitename || !$bossname || !$bossphone) {
        Showmsg('站点信息请填写完整', $basename . '&step=3');
    }
    if (!($marksite = $_checkService->markSite())) {
        Showmsg('云服务验证失败,请重试', $basename . '&step=3');
    }
    if (!CloudWind::yunApplyPlatform($siteurl, $sitename, $bossname, $bossphone, $marksite)) {
        $marksite = $_checkService->markSite(false);
        Showmsg('申请云服务失败,请检查网络或重试', $basename . '&step=3');
    }
    is_null($db_yun_model) && $_checkService->setYunMode(array());
    $_checkService->initServices($search, $defend);
    $step = 5;
} else {
    $yundescribe = $_checkService->getYunDescribe();
}
include PrintEot('yunbasic');
Esempio n. 15
0
         //分类模型
         foreach ($topicmodeldb as $key => $value) {
             if ($value['ifable'] == 1) {
                 $modeldb[$value['cateid']][$key]['cateid'] = $value['cateid'];
                 $modeldb[$value['cateid']][$key]['modelid'] = $value['modelid'];
                 $modeldb[$value['cateid']][$key]['name'] = $value['name'];
             }
         }
         !$allowtype && ($posttypestyle = 'style="display:none"');
         !$modelid && ($topiccatestyle = 'style="display:none"');
         !$pcid && ($postcatestyle = 'style="display:none"');
         //团购活动
         @(include_once D_P . 'data/bbscache/postcate_config.php');
     }
     $ajaxurl = EncodeUrl($basename);
     include PrintEot('setforum');
     exit;
 } elseif ($_POST['step'] == 2) {
     $forum = $db->get_one("SELECT type,fup,forumadmin,logo FROM pw_forums WHERE fid=" . pwEscape($fid));
     InitGP(array('name', 'descrip', 'metadescrip'), 'P', 0);
     InitGP(array('vieworder', 'dirname', 'style', 'across', 'keywords'), 'P');
     $name = str_replace('<iframe', '&lt;iframe', $name);
     $descrip = str_replace('<iframe', '&lt;iframe', $descrip);
     $metadescrip = str_replace('<iframe', '&lt;iframe', $metadescrip);
     $keywords = Char_cv($keywords);
     strlen($descrip) > 250 && adminmsg('descrip_long');
     strlen($metadescrip) > 250 && adminmsg('descrip_long');
     if ($forum['type'] == 'category') {
         $db->update("UPDATE pw_forums SET " . pwSqlSingle(array('name' => $name, 'vieworder' => $vieworder, 'dirname' => $dirname, 'style' => $style, 'across' => $across, 'cms' => $cms)) . " WHERE fid=" . pwEscape($fid));
     } else {
         InitGP(array('forumsetdb', 'uploadset', 'rewarddb', 'cfup', 'ffup', 'showsub', 'ifhide', 'viewsub', 'allowhide', 'allowsell', 'copyctrl', 'f_check', 'password', 'allowvisit', 'allowread', 'allowpost', 'allowrp', 'allowupload', 'allowdownload', 'otherfid', 'otherforum', 'allowtime', 'allowtype', 'recycle', 'forumsell', 'sdate', 'cprice', 'rprice', 'logotype', 'logo_upload', 'logo_url', 'ifdellogo', 't_view_db', 'new_t_view_db', 't_logo_db', 'new_t_logo_db', 'new_t_sub_logo_db', 'new_t_sub_view_db', 't_type', 'modelid', 'pcid'), 'P');
Esempio n. 16
0
        }
        !$rt['pid'] && ($rt['pid'] = 'tpc');
        $rt['fname'] = $forum[$rt['fid']]['name'];
        $showdb[$key] = $rt;
    }
    require_once PrintEot('show');
    footer();
} else {
    $pw_attachs = L::loadDB('attachs', 'forum');
    $rt = $pw_attachs->get($aid);
    if ($rt && $rt['tid'] && $rt['fid']) {
        $pw_tmsgs = GetTtable($rt['tid']);
        $rtinfo = $db->get_one("SELECT t.fid,t.subject,t.ifcheck,t.ifshield,tm.content,m.username\r\n\t\t\tFROM pw_threads t LEFT JOIN {$pw_tmsgs} tm ON tm.tid=t.tid\r\n\t\t\tLEFT JOIN pw_members m ON m.uid=t.authorid\r\n\t\t\tWHERE t.tid=" . S::sqlEscape($rt['tid'], false));
        if (in_array($rtinfo['fid'], $fidoff) || $rtinfo['ifshield'] == '2' || $groupid != '3' && $groupid != '4' && ($rtinfo['needrvrc'] > $userrvrc || !$rtinfo['ifcheck'] || $rtinfo['ifshield'] || strpos($rtinfo['content'], "[post]") !== false && strpos($rtinfo['content'], "[/post]") !== false || strpos($rtinfo['content'], "[hide") !== false && strpos($rtinfo['content'], "[/hide]") !== false || strpos($rtinfo['content'], "[sell") !== false && strpos($rtinfo['content'], "[/sell]") !== false)) {
            Showmsg('pic_not_exists');
        }
        $rt['subject'] = $rtinfo['subject'];
        $rt['username'] = $rtinfo['username'];
        $a_url = geturl($rt['attachurl'], 'show');
        $rt['a_url'] = is_array($a_url) ? $a_url[0] : $a_url;
        $uid = $rt['uid'];
        $type = 1;
        $owner = $rt['username'];
        !$rt['pid'] && ($rt['pid'] = 'tpc');
        !$rt['descrip'] && ($rt['descrip'] = substrs(stripWindCode($rtinfo['content']), 120));
    } else {
        Showmsg('pic_not_exists');
    }
    require_once PrintEot('show');
    footer();
}
Esempio n. 17
0
<?php

!function_exists('adminmsg') && exit('Forbidden');
$basename = "{$admin_file}?adminjob=userpay";
if (!$_POST['action']) {
    include_once D_P . 'data/bbscache/ol_config.php';
    !$ol_paypalcode && ($ol_paypalcode = RandString('40'));
    ifcheck($ol_onlinepay, 'onlinepay');
    include PrintEot('userpay');
    exit;
} else {
    InitGP(array('userpay'), 'P');
    !$userpay['ol_paypalcode'] && ($userpay['ol_paypalcode'] = RandString('40'));
    foreach ($userpay as $key => $value) {
        setConfig($key, $value);
    }
    updatecache_ol();
    adminmsg('operate_success');
}
function RandString($len)
{
    $rand = '1234567890qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM';
    mt_srand((double) microtime() * 1000000);
    for ($i = 0; $i < $len; $i++) {
        $code .= $rand[mt_rand(0, strlen($rand))];
    }
    return $code;
}
Esempio n. 18
0
require_once R_P . 'require/bbscode.php';
S::gp(array('pcid', 'modelid'), 'P', 2);
$fielddb = array();
$data = array();
$atc_content = S::escapeChar(stripslashes(S::getGP('atc_content', 'P')));
$pcinfo = S::escapeChar(stripslashes(S::getGP('pcinfo', 'P')));
if ($modelid > 0) {
    $query = $db->query("SELECT fieldid,fieldname FROM pw_topicfield WHERE modelid=" . S::sqlEscape($modelid));
    while ($rt = $db->fetch_array($query)) {
        $fielddb[$rt['fieldid']] = $rt['fieldname'];
    }
    $pcdb = getPcviewdata($pcinfo, 'topic');
    L::loadClass('posttopic', 'forum', false);
    $postTopic = new postTopic($data);
    $topicvalue = $postTopic->getTopicvalue($modelid, $pcdb);
} elseif ($pcid > 0) {
    $query = $db->query("SELECT fieldid,fieldname FROM pw_pcfield WHERE pcid=" . S::sqlEscape($pcid));
    while ($rt = $db->fetch_array($query)) {
        $fielddb[$rt['fieldname']] = $rt['fieldid'];
    }
    $pcdb = getPcviewdata($pcinfo, 'postcate');
    L::loadClass('postcate', 'forum', false);
    $postCate = new postCate($data);
    list(, $topicvalue) = $postCate->getCatevalue($pcid, $pcdb);
}
$atc_content = wordsConvert($atc_content);
$atc_content = convert($atc_content, $db_windpost);
$preatc = str_replace("\n", "<br>", $atc_content);
require_once R_P . 'require/header.php';
require_once PrintEot('preview');
footer();
Esempio n. 19
0
                }
            }
            adminmsg('operate_success');
        }
    } else {
        S::gp(array('page'), 'GP', 2);
        $page < 1 && ($page = 1);
        $limit = S::sqlLimit(($page - 1) * $db_perpage, $db_perpage);
        $rt = $db->get_one("SELECT COUNT(*) AS sum FROM pw_membercredit WHERE value!=0");
        $pages = numofpage($rt['sum'], $page, ceil($rt['sum'] / $db_perpage), "{$basename}&");
        $query = $db->query("SELECT m.uid,m.username,mc.cid,mc.value FROM pw_membercredit mc LEFT JOIN pw_members m USING(uid) WHERE value!=0 ORDER BY cid, value DESC {$limit}");
        while ($rt = $db->fetch_array($query)) {
            $rt['name'] = $_CREDITDB[$rt['cid']][0];
            $creditdb[] = $rt;
        }
        include PrintEot('usermanage');
        exit;
    }
}
function initGroupOptions()
{
    global $db, $groupselect, $groupselect_add, $g_sel;
    //for template file
    $groupselect = "<option value='-1'>" . getLangInfo('all', 'reg_member') . "</option>";
    $groupselect_add = "<option value='-1'>" . getLangInfo('all', 'reg_member') . "</option>";
    $g_sel = '';
    $query = $db->query("SELECT gid,gptype,grouptitle FROM pw_usergroups WHERE gid>2 AND gptype<>'member' ORDER BY gid");
    while ($group = $db->fetch_array($query)) {
        $groupselect .= "<option value=\"{$group['gid']}\">{$group['grouptitle']}</option>";
        if ($group['gid'] != 5) {
            $groupselect_add .= "<option value=\"{$group['gid']}\">{$group['grouptitle']}</option>";
Esempio n. 20
0
// update posts hits
if ($c_htm || $db_hits_store == 2) {
    $db_hithour == 0 && ($db_hithour = 4);
    $hit_wtime = $hit_control * $db_hithour;
    $hit_wtime > 24 && ($hit_wtime = 0);
    $hitsize = @filesize(D_P . 'data/bbscache/hits.txt');
    if ($hitsize && ($hitsize > 1024 || $timestamp - $hit_tdtime > $hit_wtime * 3600) && procLock('hitupdate')) {
        require_once R_P . 'require/hitupdate.php';
        procUnLock('hitupdate');
    }
}
if ($higholnum < $usertotal) {
    pwQuery::update('pw_bbsinfo', 'id=:id', array(1), array('higholnum' => $usertotal, 'higholtime' => $timestamp));
    $higholnum = $usertotal;
}
if ($hposts < $tposts) {
    pwQuery::update('pw_bbsinfo', 'id=:id', array(1), array('hposts' => $tposts));
    $hposts = $tposts;
}
$mostinbbstime = get_date($higholtime);
if (!$ol_offset && $db_onlinelmt != 0 && $usertotal >= $db_onlinelmt) {
    Cookie('ol_offset', '', 0);
    Showmsg('most_online');
}
if ($plantime && $timestamp > $plantime && procLock('task')) {
    require_once R_P . 'require/task.php';
    procUnLock('task');
}
require_once PrintEot('index');
CloudWind::yunSetCookie(SCR);
footer();
Esempio n. 21
0
} 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) {
    require_once PrintEot('m_photos_bottom');
} else {
    require_once PrintEot('m_photos');
}
pwOutPut();
Esempio n. 22
0
        foreach ($logdb as $key => $val) {
            writelog($val);
        }
        if ($tids) {
            $db->update("UPDATE pw_argument SET titlefont=" . S::sqlEscape($titlefont) . " WHERE tid IN(" . S::sqlImplode($tids) . ")");
        }
        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);
Esempio n. 23
0
$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'];
    }
    $i++;
    $memberdb[] = $rt;
}
require_once PrintEot('ajax');
ajax_footer();
Esempio n. 24
0
        }
        $userdb['groupid'] == '-1' && ($userdb['groupid'] = $userdb['memberid']);
        if ($o_groups && strpos($o_groups, ',' . $userdb['groupid'] . ',') === false) {
            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'");
Esempio n. 25
0
        } else {
            $allowmutinum = 'infinite';
        }
    }
    echo "ok\t{$allowmutinum}";
    ajax_footer();
}
//require_once(M_P.'require/header.php');
if ($space == 1 && defined('F_M')) {
    //$basename .= "space=1&u=$u&";
    $spaceurl = $baseUrl;
    require_once R_P . 'require/credit.php';
    list($userdb, $ismyfriend, $friendcheck, $usericon, $usercredit, $totalcredit, $appcount, $p_list) = getAppleftinfo($u);
    //list($isheader,$isfooter,$tplname,$isuserspace) = array(true,true,"user_photos",true);
    require_once PrintEot('header');
    require_once PrintEot('user_photos');
    footer();
} else {
    if (!$s) {
        //require_once PrintEot('m_photos');
        list($isheader, $isfooter, $tplname, $isleft) = array(true, true, "m_photos", true);
    } else {
        //require_once PrintEot('m_photos_bottom');
        list($isheader, $isfooter, $tplname, $isleft) = array(true, true, "m_photos_bottom", true);
    }
}
//footer();
function createfail($checkpwd, $showinfo = '', $type = 'fail')
{
    if ($checkpwd) {
        $showinfo = 'fail' == $type && '' != $showinfo ? getLangInfo('msg', $showinfo) : $showinfo;
Esempio n. 26
0
    }
    if ($createtime_s) {
        $addsql .= " AND created_time >= " . s::sqlEscape(PwStrtoTime($createtime_s));
    }
    if ($createtime_e) {
        $addsql .= " AND created_time <= " . s::sqlEscape(PwStrtoTime($createtime_e));
    }
    $statisticDb = array();
    $sql = "SELECT keyword, sum( num ) AS times FROM `pw_searchstatistic` WHERE 1 {$addsql} GROUP BY keyword ORDER BY times DESC LIMIT 0 , 500";
    $qurey = $db->query($sql);
    while ($rt = $db->fetch_array($qurey)) {
        $rt['keyword'] = str_replace(array("&#160;", "&#61;", "&nbsp;", "&#60;", "<", ">", "&gt;", "(", ")", "&#41;"), array(" "), $rt['keyword']);
        $statisticDb[] = $rt;
    }
}
include PrintEot('searcher');
exit;
/**
* 更新缓存
*/
function updatecache_search()
{
    global $db;
    $query = $db->query("SELECT * FROM pw_searchadvert WHERE ifshow = 1 ORDER BY orderby ASC");
    while ($rt = $db->fetch_array($query)) {
        $t = array();
        $t['keyword'] = $rt['keyword'];
        $t['starttime'] = $rt['starttime'];
        $t['endtime'] = $rt['endtime'];
        $t['code'] = str_replace(array("\\\\", "\\'", '&lt;', '&gt;', '&quot;'), array("\\", "'", '<', '>', '"'), $rt['code']);
        $rt['config'] = unserialize($rt['config']);
Esempio n. 27
0
                    $filedata = @file_get_contents(R_P . "hack/{$hackdir}/info.xml");
                } else {
                    $filedata = readover(R_P . "hack/{$hackdir}/info.xml");
                }
                if (preg_match('/\\<hackname\\>(.+?)\\<\\/hackname\\>\\s+\\<ifopen\\>(.+?)\\<\\/ifopen\\>/is', $filedata, $infodb)) {
                    $infodb[1] && ($hackname = Char_cv(str_replace(array("\n"), '', $infodb[1])));
                    $hackopen = (int) $infodb[2];
                }
                $hackurl = EncodeUrl("{$basename}&action=add&hackdir={$hackdir}&hackname=" . rawurlencode($hackname) . "&hackopen={$hackopen}");
                $uninstalldb[] = array($hackname, $hackdir, $hackopen, $hackurl);
            }
        }
        closedir($fp);
    }
    unset($db_hackdb);
    include PrintEot('hackcenter');
    exit;
} elseif ($action == 'edit') {
    InitGP(array('hackname'), 'GP', 0);
    //InitGP(array('hackopen'),'GP',2);
    //$navMenu = L::loadClass('navmenu');
    //$navMenu->settype('bbs_navinfo');
    !is_array($hackname) && ($hackname = array());
    foreach ($hackname as $key => $value) {
        $value = str_replace(array("\t", "\n", "\r", '  '), array('&nbsp; &nbsp; ', '<br />', '', '&nbsp; '), $value);
        if ($value && $db_hackdb[$key][1] == $key && ($db_hackdb[$key][0] != $value || $db_hackdb[$key][2] != $hackopen[$key])) {
            /*
            if ($hackopen[$key] == 0) {
            	$navMenu->setshow('hack_'.$key,0);
            	$navMenu->setupnav('hack_'.$key,'hack');
            } elseif ($hackopen[$key] == 1) {
Esempio n. 28
0
<?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');
}
Esempio n. 29
0
    if ($special && method_exists($postSpecial, 'setInfo')) {
        $set = $postSpecial->setInfo();
    }
    list($guidename, $forumtitle) = $pwforum->getTitle();
    if ($cyid) {
        require_once R_P . 'apps/groups/lib/colony.class.php';
        $newColony = new PwColony($cyid);
        $guidename .= "<em>&gt;</em><a href=\"thread.php?cyid={$cyid}\">" . $newColony->info['cname'] . "</a>";
    }
    $db_metakeyword = str_replace(array('|', ' - '), ',', $forumtitle) . 'phpwind';
    list($sellMoney, $hideMoney) = array(0, 0);
    $checkedAutourl = $winddb['postnum'] < $_G['posturlnum'] && !$pwpost->isGM ? 'disabled' : 'checked';
    require_once R_P . 'require/header.php';
    $msg_guide = $pwforum->headguide($guidename);
    $postMinLength = empty($pwpost->forum->foruminfo['forumset']['contentminlen']) ? $db_postmin : $pwpost->forum->foruminfo['forumset']['contentminlen'];
    require_once PrintEot('post');
    CloudWind::yunSetCookie(SCR);
    footer();
} elseif ($_POST['step'] == 2) {
    S::gp(array('atc_title', 'atc_content'), 'P', 0);
    S::gp(array('replayorder', 'atc_anonymous', 'atc_newrp', 'atc_tags', 'atc_hideatt', 'magicid', 'magicname', 'atc_enhidetype', 'atc_credittype', 'flashatt', 'buildIfcheck', 'robstarttime', 'robendtime', 'robendbuild', 'robawardbuilds', '_usernames', 'replyrewardcredit'), 'P');
    S::gp(array('atc_iconid', 'atc_email', 'digest', 'topped', 'atc_hide', 'atc_requireenhide', 'atc_rvrc', 'atc_requiresell', 'atc_money', 'atc_usesign', 'atc_html', 'p_type', 'p_sub_type', 'atc_convert', 'atc_autourl', 'replyreward'), 'P', 2);
    S::gp(array('iscontinue'), 'P');
    //ajax提交时有敏感词时显示是否继续
    $db_sellset['price'] && (int) $atc_money > $db_sellset['price'] && Showmsg('post_price_limit');
    require_once R_P . 'require/bbscode.php';
    $postdata = new topicPostData($pwpost);
    $replayorder = $replayorder == 1 || $replayorder == 2 ? $replayorder : 0;
    $postdata->setStatus('3', decbin($replayorder));
    $postdata->setWtype($p_type, $p_sub_type, $t_per, $t_db, $db_forcetype);
    $postdata->setTitle($atc_title);
Esempio n. 30
0
                $delnum++;
                $delname .= "{$rs['attachurl']}<br>";
            }
        }
        $db->update("DELETE FROM pw_attachs WHERE {$sql} AND aid IN({$attachs})");
    }
    adminmsg('attachstats_del', "{$basename}&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}&page={$page}");
} elseif ($action == 'msgList') {
    S::gp(array('page'), 'GP');
    $messageServer = L::loadClass('message', 'message');
    $attachCount = $messageServer->countAllAttachs();
    $pageCount = ceil($attachCount / $db_perpage);
    $page = $page < 0 || empty($page) ? 1 : ($page > $pageCount ? $pageCount : $page);
    $attachList = $messageServer->getAllAttachs($page, $db_perpage);
    $pages = numofpage($attachCount, $page, $pageCount, $basename . '&action=msgList&');
    include PrintEot('attachment');
    exit;
} elseif ($action == 'msgDel') {
    S::gp(array('mids'), 'GP');
    !is_array($mids) && adminmsg('请选择要删除的附件');
    $messageServer = L::loadClass('message', 'message');
    $messageServer->deleteAttachsByMessageIds($mids);
    adminmsg('附件删除成功!', "{$basename}&action=msgList&");
}
function attachcheck($file)
{
    global $cache_file, $attachdir, $admin_pwd, $filename, $filesize, $ifless, $postdate1, $postdate2, $direct, $attachdir;
    if ($filename && strpos($file, $filename) === false) {
        return;
    }
    if ($filesize) {