示例#1
0
文件: install.php 项目: v998/dsu
<?php

if (!defined('IN_DISCUZ') || !defined('IN_ADMINCP')) {
    exit('Access Denied');
}
$process_url = str_replace('&step=' . $_G['gp_step'], '', $_SERVER['QUERY_STRING']);
showsubmenusteps($installlang['auto_1'], array(array($installlang['auto_4'], empty($_G['gp_step'])), array($installlang['auto_5'], $_G['gp_step'] == 1), array($installlang['auto_7'], $_G['gp_step'] == 2), array($installlang['auto_8'], $_G['gp_step'] == 3)));
$sql = <<<EOF
CREATE TABLE IF NOT EXISTS `pre_dsu_marcothief` (
  `uid` int(8) unsigned NOT NULL,
  `thief` int(8) unsigned NOT NULL DEFAULT '0',
  `steal` int(8) unsigned NOT NULL DEFAULT '0',
  `total` int(8) unsigned NOT NULL DEFAULT '0',
  `lose` int(8) unsigned NOT NULL DEFAULT '0',
  `sucess` int(8) unsigned NOT NULL DEFAULT '0',
  `fail` int(8) unsigned NOT NULL DEFAULT '0',
  `action` int(8) unsigned NOT NULL DEFAULT '0',
  `actions` int(8) unsigned NOT NULL DEFAULT '0',
  `raids` int(8) NOT NULL DEFAULT '0',
  `jail` int(10) NOT NULL,
  `run` int(10) NOT NULL,
  `goodluck` int(10) NOT NULL,
  `protect` int(10) NOT NULL,
  `weapon` int(8) unsigned NOT NULL DEFAULT '0',
  `raids_tool` int(8) unsigned NOT NULL DEFAULT '0',
  `run_tool` int(8) unsigned NOT NULL DEFAULT '0',
  PRIMARY KEY (`uid`)
) ENGINE=MyISAM;

CREATE TABLE IF NOT EXISTS `pre_dsu_marcothief_bag` (
  `id` int(8) unsigned NOT NULL AUTO_INCREMENT,
            $search_condition = dunserialize($_POST['conditions']);
        }
        $membernum = countmembers($search_condition, $urladd);
        notifymembers('confermedal', 'medalletter');
    }
} elseif ($operation == 'confermagic') {
    $magics = '';
    foreach (C::t('common_magic')->fetch_all_data(1) as $magic) {
        $magics .= showtablerow('', array('class="td25"', 'class="td23"', 'class="td25"', ''), array("<input class=\"checkbox\" type=\"checkbox\" name=\"magic[]\" value=\"{$magic['magicid']}\" />", "<img src=\"static/image/magic/{$magic['identifier']}.gif\" />", $magic['name'], '<input class="txt" type="text" name="magicnum[' . $magic['magicid'] . ']" value="1" size="3">'), TRUE);
    }
    if (!$magics) {
        cpmsg('members_edit_magics_nonexistence', 'action=magics', 'error');
    }
    if (!submitcheck('confermagicsubmit')) {
        shownav('extended', 'nav_magics', 'nav_members_confermagic');
        showsubmenusteps('nav_members_confermagic', array(array('nav_members_select', !$_GET['submit']), array('nav_members_confermagic', $_GET['submit'])), array(array('admin', 'magics&operation=admin', 0), array('nav_magics_confer', 'members&operation=confermagic', 1)));
        showsearchform('confermagic');
        if (submitcheck('submit', 1)) {
            $membernum = countmembers($search_condition, $urladd);
            showtagheader('div', 'confermedal', TRUE);
            showformheader('members&operation=confermagic' . $urladd);
            echo '<table class="tb tb1">';
            if (!$membernum) {
                showtablerow('', 'class="lineheight"', $lang['members_search_nonexistence']);
                showtablefooter();
            } else {
                showtablerow('class="first"', array('class="th11"'), array(cplang('members_confermagic_members'), cplang('members_search_result', array('membernum' => $membernum)) . "<a href=\"###\" onclick=\"\$('searchmembers').style.display='';\$('confermedal').style.display='none';\$('step1').className='current';\$('step2').className='';\" class=\"act\">{$lang['research']}</a>"));
                echo '<tr><td class="th12">' . cplang('members_confermagic') . '</td><td>';
                showtableheader('', 'noborder');
                showsubtitle(array('nav_magics_confer', 'nav_magics_image', 'nav_magics_name', 'nav_magics_num'));
                echo $magics;
示例#3
0
/*
	[Discuz!] (C)2001-2009 Comsenz Inc.
	This is NOT a freeware, use is subject to license terms

	$Id: attach.inc.php 20422 2009-09-27 03:19:30Z monkey $
*/
if (!defined('IN_DISCUZ') || !defined('IN_ADMINCP')) {
    exit('Access Denied');
}
cpheader();
if (!submitcheck('deletesubmit')) {
    require_once DISCUZ_ROOT . './include/forum.func.php';
    $anchor = in_array($anchor, array('search', 'admin')) ? $anchor : 'search';
    shownav('topic', 'nav_attaches');
    showsubmenusteps('nav_attaches', array(array('search', !$searchsubmit), array('admin', $searchsubmit)));
    showtips('attach_tips', 'attach_tips', $searchsubmit);
    showtagheader('div', 'search', !$searchsubmit);
    showformheader('attach');
    showtableheader();
    showsetting('attach_nomatched', 'nomatched', 0, 'radio');
    showsetting('attach_forum', '', '', '<select name="inforum"><option value="all">&nbsp;&nbsp;>' . lang('all') . '</option><option value="">&nbsp;</option>' . forumselect(FALSE, 0, 0, TRUE) . '</select>');
    showsetting('attach_sizerange', array('sizeless', 'sizemore'), array('', ''), 'range');
    showsetting('attach_dlcountrange', array('dlcountless', 'dlcountmore'), array('', ''), 'range');
    showsetting('attach_daysold', 'daysold', '', 'text');
    showsetting('filename', 'filename', '', 'text');
    showsetting('attach_keyword', 'keywords', '', 'text');
    showsetting('attach_author', 'author', '', 'text');
    showsubmit('searchsubmit', 'search');
    showtablefooter();
    showformfooter();
示例#4
0
 * 应用 >> 安米手机客户端 >> 更新缓存
 *
 * @author 谢建平 <*****@*****.**>
 * @copyright 2012-2014 Appbyme
 * @license http://opensource.org/licenses/LGPL-3.0
 */
if (!defined('IN_DISCUZ') || !defined('IN_ADMINCP')) {
    exit('Access Denied');
}
set_time_limit(0);
require_once dirname(__FILE__) . '/appbyme.class.php';
Appbyme::init();
$baseUrl = rawurldecode(cpurl());
$step = max(1, intval($_GET['step']));
$cleanImage = true;
showsubmenusteps('nav_updatecache', array(array('nav_updatecache_confirm', $step == 1), array('nav_updatecache_verify', $step == 2), array('nav_updatecache_completed', $step == 3)));
showtips(Appbyme::lang('mobcent_tips_updatecache'));
switch ($step) {
    case 1:
        $thumbTaskList = Appbyme::getDzPluginCache('thumb_task_list');
        $thumbTaskList === false && ($thumbTaskList = array());
        $thumbTaskCount = (int) count($thumbTaskList);
        cpmsg(sprintf('
            <input type="checkbox" name="type[]" value="cleandata" id="clean_datacache" class="checkbox" checked />
            <label for="clean_datacache">%s</label>
            <input type="checkbox" name="type[]" value="updatedata" id="update_datacache" class="checkbox" checked />
            <label for="update_datacache">%s</label>
            <input type="checkbox" name="type[]" value="cleanthumb" id="clean_thumbcache" class="checkbox" />
            <label for="clean_thumbcache">%s</label><br />
            %s
            <input type="text" name="thumb_task_length" value="0" class="text" />
示例#5
0
$cids = $_G['gp_cids'];
$page = max(1, $_G['gp_page']);
cpheader();
$aid = $_G['gp_aid'];
$subject = $_G['gp_subject'];
if (!submitcheck('postcommentsubmit')) {
    if (empty($_G['gp_search'])) {
        $newlist = 1;
        $detail = 1;
        $starttime = dgmdate(TIMESTAMP - 86400 * 7, 'Y-n-j');
    }
    $starttime = !preg_match("/^(0|\\d{4}\\-\\d{1,2}\\-\\d{1,2})\$/", $starttime) ? dgmdate(TIMESTAMP - 86400 * 7, 'Y-n-j') : $starttime;
    $endtime = $_G['adminid'] == 3 || !preg_match("/^(0|\\d{4}\\-\\d{1,2}\\-\\d{1,2})\$/", $endtime) ? dgmdate(TIMESTAMP, 'Y-n-j') : $endtime;
    shownav('topic', 'nav_postcomment');
    showsubmenu('nav_postcomment', array(array('newlist', 'postcomment', !empty($newlist)), array('search', 'postcomment&search=true', empty($newlist))));
    empty($newlist) && showsubmenusteps('', array(array('postcomment_search', !$searchsubmit), array('nav_postcomment', $searchsubmit)));
    if (empty($newlist)) {
        $search_tips = 1;
        showtips('postcomment_tips');
    }
    echo <<<EOT
<script type="text/javascript" src="static/js/calendar.js"></script>
<script type="text/JavaScript">
function page(number) {
\t\$('postcommentforum').page.value=number;
\t\$('postcommentforum').searchsubmit.click();
}
</script>
EOT;
    showtagheader('div', 'searchposts', !$searchsubmit && empty($newlist));
    showformheader("postcomment" . (!empty($_G['gp_search']) ? '&search=true' : ''), '', 'postcommentforum');
示例#6
0
    } else {
        countmembers();
        notifymembers('reward', 'creditsnotify');
    }
} elseif ($operation == 'confermedal') {
    $medals = '';
    $query = $db->query("SELECT * FROM {$tablepre}medals WHERE available='1' ORDER BY displayorder");
    while ($medal = $db->fetch_array($query)) {
        $medals .= showtablerow('', array('class="td25"', 'class="td23"'), array("<input class=\"checkbox\" type=\"checkbox\" name=\"medals[{$medal['medalid']}]\" value=\"1\" />", "<img src=\"images/common/{$medal['image']}\" />", $medal['name']), TRUE);
    }
    if (!$medals) {
        cpmsg('members_edit_medals_nonexistence', $BASESCRIPT . '?action=medals', 'error');
    }
    if (!submitcheck('confermedalsubmit', 1)) {
        shownav('user', 'nav_members_confermedal');
        showsubmenusteps('nav_members_confermedal', array(array('nav_members_select', !$submit), array('nav_members_confermedal', $submit)));
        searchmembers('confermedal');
        if (submitcheck('submit', 1)) {
            countmembers();
            showtagheader('div', 'confermedal', TRUE);
            showformheader('members&operation=confermedal' . $urladd);
            echo '<table class="tb tb1">';
            if (!$membernum) {
                showtablerow('', 'class="lineheight"', $lang['members_search_nonexistence']);
                showtablefooter();
            } else {
                eval("\$lang[members_search_result] = \"" . $lang['members_search_result'] . "\";");
                showtablerow('class="first"', array('class="th11"'), array(lang('members_confermedal_members'), "{$lang['members_search_result']} <a href=\"###\" onclick=\"\$('searchmembers').style.display='';\$('confermedal').style.display='none';\$('step1').className='current';\$('step2').className='';\" class=\"act\">{$lang['research']}</a>"));
                echo '<tr><td class="th12">' . lang('members_confermedal') . '</td><td>';
                showtableheader('', 'noborder');
                showsubtitle(array('medals_grant', 'medals_image', 'name'));
示例#7
0
$muticondition .= $detail ? '&detail=' . $detail : '';
if (!submitcheck('blogsubmit')) {
    if (empty($_GET['search'])) {
        $newlist = 1;
        $detail = 1;
    }
    if ($fromumanage) {
        $starttime = !preg_match("/^(0|\\d{4}\\-\\d{1,2}\\-\\d{1,2})\$/", $starttime) ? '' : $starttime;
        $endtime = $_G['adminid'] == 3 || !preg_match("/^(0|\\d{4}\\-\\d{1,2}\\-\\d{1,2})\$/", $endtime) ? '' : $endtime;
    } else {
        $starttime = !preg_match("/^(0|\\d{4}\\-\\d{1,2}\\-\\d{1,2})\$/", $starttime) ? dgmdate(TIMESTAMP - 86400 * 7, 'Y-n-j') : $starttime;
        $endtime = $_G['adminid'] == 3 || !preg_match("/^(0|\\d{4}\\-\\d{1,2}\\-\\d{1,2})\$/", $endtime) ? dgmdate(TIMESTAMP, 'Y-n-j') : $endtime;
    }
    shownav('topic', 'nav_blog');
    showsubmenu('nav_blog', array(array('newlist', 'blog', !empty($newlist)), array('search', 'blog&search=true', empty($newlist))));
    empty($newlist) && showsubmenusteps('', array(array('blog_search', !$searchsubmit), array('nav_blog', $searchsubmit)));
    if ($muticondition) {
        showtips('blog_tips');
    }
    echo <<<EOT
<script type="text/javascript" src="static/js/calendar.js"></script>
<script type="text/JavaScript">
function page(number) {
\t\$('blogforum').page.value=number;
\t\$('blogforum').searchsubmit.click();
}
</script>
EOT;
    showtagheader('div', 'searchposts', !$searchsubmit && empty($newlist));
    showformheader("blog" . (!empty($_GET['search']) ? '&search=true' : ''), '', 'blogforum');
    showhiddenfields(array('page' => $page, 'pp' => $_GET['pp'] ? $_GET['pp'] : $_GET['perpage']));
示例#8
0
$users = $_G['gp_users'];
$picid = $_G['gp_picid'];
$postip = $_G['gp_postip'];
$hot1 = $_G['gp_hot1'];
$hot2 = $_G['gp_hot2'];
$starttime = $_G['gp_starttime'];
$endtime = $_G['gp_endtime'];
$searchsubmit = $_G['gp_searchsubmit'];
$picids = $_G['gp_picids'];
$ppp = $_G['ppp'];
cpheader();
if (!submitcheck('picsubmit')) {
    $starttime = !preg_match("/^(0|\\d{4}\\-\\d{1,2}\\-\\d{1,2})\$/", $starttime) ? dgmdate(TIMESTAMP - 86400 * 7, 'Y-n-j') : $starttime;
    $endtime = $_G['adminid'] == 3 || !preg_match("/^(0|\\d{4}\\-\\d{1,2}\\-\\d{1,2})\$/", $endtime) ? dgmdate(TIMESTAMP, 'Y-n-j') : $endtime;
    shownav('topic', 'nav_pic');
    showsubmenusteps('nav_pic', array(array('pic_search', !$searchsubmit), array('nav_pic', $searchsubmit)));
    showtips('pic_tips');
    echo <<<EOT
<script type="text/javascript" src="static/js/forum_calendar.js"></script>
<script type="text/JavaScript">
function page(number) {
\t\$('picforum').page.value=number;
\t\$('picforum').searchsubmit.click();
}
</script>
EOT;
    showtagheader('div', 'searchposts', !$searchsubmit);
    showformheader("pic", '', 'picforum');
    showhiddenfields(array('page' => $page));
    showtableheader();
    showsetting('pic_search_detail', 'detail', $detail, 'radio');
示例#9
0
    }
} elseif ($subop == 'nodeview') {
    dsetcookie('debugmokuai', $biaoshi);
    //人性化
    $nodetype = getgpc('nodetype');
    $node = getgpc('node');
    $nodexml_file = MOKUAI_DIR . "/server/1.0/Data/node_" . $biaoshi . "_" . $version . ".xml";
    $nodes = xml2array(file_get_contents($nodexml_file));
    $view_file = MOKUAI_DIR . '/' . $biaoshi . '/' . $version . '/Controler/admincp_' . $node . '.php';
    require_once $view_file;
} elseif ($subop == 'nodeedit') {
    $nodes = $nodes_temp = xml2array(file_get_contents(MOKUAI_DIR . "/server/1.0/Data/node_" . $biaoshi . "_" . $version . ".xml"));
    $nodetype = trim($_GET['nodetype']);
    $node = trim($_GET['node']);
    $step = max(1, intval($_GET['step']));
    showsubmenusteps(lang('plugin/yiqixueba', 'mokuaisheji'), array(array(lang('plugin/yiqixueba', 'mokuaisheji'), $step == 1), array(lang('plugin/yiqixueba', 'mokuaisheji'), $step == 2), array(lang('plugin/yiqixueba', 'mokuaisheji'), $step == 3)));
    //	dump($biaoshi);
    //	dump($version);
    //	dump($nodetype);
    $nodefile = $nodetype == 'global' ? $node : $nodetype . '_' . $node;
    //	dump($node);
    //dump($nodes);
    if ($step == 1) {
        if (!submitcheck('submit')) {
            showtips(lang('plugin/yiqixueba', 'mokuai_node_tips'));
            showformheader($this_page . '&subop=nodeedit&biaoshi=' . $biaoshi . '&version=' . $version . '&nodetype=' . $nodetype . '&node=' . $node);
            showtableheader(lang('plugin/yiqixueba', 'mokuai_info'));
            showsubtitle(array('', 'display_order', lang('plugin/yiqixueba', 'subop_name'), lang('plugin/yiqixueba', 'subop_title'), lang('plugin/yiqixueba', 'subop_type')));
            echo '<tr><td colspan="1"></td><td colspan="1"><div><a href="###" onclick="addrow(this, 0, 0)" class="addtr">' . lang('plugin/yiqixueba', 'add_node') . '</a></div></td></tr>';
            showsubmit('submit');
            showtablefooter();
示例#10
0
$viewnum1 = $_G['gp_viewnum1'];
$viewnum2 = $_G['gp_viewnum2'];
$replynum1 = $_G['gp_replynum1'];
$replynum2 = $_G['gp_replynum2'];
$hot1 = $_G['gp_hot1'];
$hot2 = $_G['gp_hot2'];
$starttime = $_G['gp_starttime'];
$endtime = $_G['gp_endtime'];
$searchsubmit = $_G['gp_searchsubmit'];
$blogids = $_G['gp_blogids'];
$ppp = $_G['ppp'];
if (!submitcheck('blogsubmit')) {
    $starttime = !preg_match("/^(0|\\d{4}\\-\\d{1,2}\\-\\d{1,2})\$/", $starttime) ? dgmdate(TIMESTAMP - 86400 * 7, 'Y-n-j') : $starttime;
    $endtime = $_G['adminid'] == 3 || !preg_match("/^(0|\\d{4}\\-\\d{1,2}\\-\\d{1,2})\$/", $endtime) ? dgmdate(TIMESTAMP, 'Y-n-j') : $endtime;
    shownav('topic', 'nav_blog');
    showsubmenusteps('nav_blog', array(array('blog_search', !$searchsubmit), array('nav_blog', $searchsubmit)));
    showtips('blog_tips');
    echo <<<EOT
<script type="text/javascript" src="static/js/forum_calendar.js"></script>
<script type="text/JavaScript">
function page(number) {
\t\$('blogforum').page.value=number;
\t\$('blogforum').searchsubmit.click();
}
</script>
EOT;
    showtagheader('div', 'searchposts', !$searchsubmit);
    showformheader("blog", '', 'blogforum');
    showhiddenfields(array('page' => $page));
    showtableheader();
    showsetting('blog_search_detail', 'detail', $detail, 'radio');
示例#11
0
$opt = strtolower(substr($operation, 6));
if (!in_array($opt, array('install', 'uninstall', 'upgrade'))) {
    cpmsg('BAD INPUT');
}
//load common lib
require_once DISCUZ_ROOT . './source/plugin/dsu_medalCenter/include/install/FSO.class.php';
require_once DISCUZ_ROOT . './source/plugin/dsu_medalCenter/include/function_common.php';
$stepMax = 3;
if (empty($_G['gp_step'])) {
    require DISCUZ_ROOT . './source/plugin/dsu_medalCenter/include/install/stat.inc.php';
    $step = 1;
} else {
    $step = max(intval($_G['gp_step']), 1);
}
$stepArr = array(1 => array('插件文件处理', $step == 1), 2 => array('数据库升级', $step == 2), 3 => array('数据处理', $step == 3));
if (1 <= $step && $step <= $stepMax) {
    showsubmenusteps('【DSU】勋章中心安装程序', $stepArr);
}
$nextstep = max(intval($_G['gp_nextstep']), $step);
if ($nextstep == $step) {
    $nextstep = $nextstep + 1;
    cpmsg('操作执行中,请稍后……', "action=plugins&operation={$operation}&dir=dsu_medalCenter&step={$step}&nextstep={$nextstep}", 'loading');
} else {
    $nextstep = $step + 1;
}
if (1 <= $step && $step <= $stepMax) {
    require DISCUZ_ROOT . './source/plugin/dsu_medalCenter/include/install/' . $opt . '.php';
    cpmsg('操作完成!进入下一步操作。', "action=plugins&operation={$operation}&dir=dsu_medalCenter&step={$nextstep}", 'succeed');
} else {
    $finish = TRUE;
}
示例#12
0
$search_condition = array_merge($_GET, $_POST);
foreach ($search_condition as $k => $v) {
    if (in_array($k, array('action', 'operation', 'formhash', 'submit', 'page')) || $v === '') {
        unset($search_condition[$k]);
    }
}
$medals = '';
$query = DB::query("SELECT * FROM " . DB::table('forum_medal') . " WHERE available='1' ORDER BY displayorder");
while ($medal = DB::fetch($query)) {
    $medals .= showtablerow('', array('class="td25"', 'class="td23"'), array("<input class=\"checkbox\" type=\"checkbox\" name=\"medals[{$medal['medalid']}]\" value=\"1\" />", "<img src=\"static/image/common/{$medal['image']}\" />", $medal['name']), TRUE);
}
if (!$medals) {
    cpmsg('members_edit_medals_nonexistence', 'plugins&operation=config&identifier=dsu_medalCenter&pmod=admin_manage', 'error');
}
if (!submitcheck('confermedalsubmit', 1)) {
    showsubmenusteps('nav_members_confermedal', array(array('nav_members_select', !$_G['gp_submit']), array('nav_members_confermedal', $_G['gp_submit'])));
    showsearchform('confermedal');
    if (submitcheck('submit', 1)) {
        $membernum = countmembers($search_condition, $urladd);
        showtagheader('div', 'confermedal', TRUE);
        showformheader('plugins&operation=config&identifier=dsu_medalCenter&pmod=admin_confer' . $urladd);
        echo '<table class="tb tb1">';
        if (!$membernum) {
            showtablerow('', 'class="lineheight"', $lang['members_search_nonexistence']);
            showtablefooter();
        } else {
            showtablerow('class="first"', array('class="th11"'), array(cplang('members_confermedal_members'), cplang('members_search_result', array('membernum' => $membernum)) . "<a href=\"###\" onclick=\"\$('searchmembers').style.display='';\$('confermedal').style.display='none';\$('step1').className='current';\$('step2').className='';\" class=\"act\">{$lang['research']}</a>"));
            echo '<tr><td class="th12">' . cplang('members_confermedal') . '</td><td>';
            showtableheader('', 'noborder');
            showsubtitle(array('medals_grant', 'medals_image', 'name'));
            echo $medals;
示例#13
0
 $upgrade_step['step'] = $step;
 $upgrade_step['operation'] = $operation;
 $upgrade_step['version'] = $version;
 $upgrade_step['release'] = $release;
 $upgrade_step['charset'] = $charset;
 $upgrade_step['locale'] = $locale;
 C::t('common_cache')->insert(array('cachekey' => 'upgrade_step', 'cachevalue' => serialize($upgrade_step), 'dateline' => $_G['timestamp']), false, true);
 $upgrade_run = C::t('common_cache')->fetch('upgrade_run');
 if (!$upgrade_run) {
     C::t('common_cache')->insert(array('cachekey' => 'upgrade_run', 'cachevalue' => serialize($_G['setting']['upgrade']), 'dateline' => $_G['timestamp']), false, true);
     $upgrade_run = $_G['setting']['upgrade'];
 } else {
     $upgrade_run = dunserialize($upgrade_run['cachevalue']);
 }
 shownav('tools', 'nav_founder_upgrade');
 showsubmenusteps('nav_founder_upgrade', array(array('founder_upgrade_updatelist', $step == 1), array('founder_upgrade_download', $step == 2), array('founder_upgrade_compare', $step == 3), array('founder_upgrade_upgrading', $step == 4), array('founder_upgrade_complete', $step == 5)));
 showtableheader();
 if ($step != 5) {
     foreach ($upgrade_run as $type => $list) {
         if ($type == $operation && $version == $list['latestversion'] && $release == $list['latestrelease']) {
             $discuz_upgrade->locale = $locale;
             $discuz_upgrade->charset = $charset;
             $upgradeinfo = $list;
             break;
         }
     }
     if (!$upgradeinfo) {
         cpmsg('upgrade_none', '', '', array('upgradeurl' => upgradeinformation(-1)));
     }
     $updatefilelist = $discuz_upgrade->fetch_updatefile_list($upgradeinfo);
     $updatemd5filelist = $updatefilelist['md5'];
示例#14
0
cpheader();
$detail = $_G['gp_detail'];
$albumname = $_G['gp_albumname'];
$albumid = $_G['gp_albumid'];
$uid = $_G['gp_uid'];
$users = $_G['gp_users'];
$starttime = $_G['gp_starttime'];
$endtime = $_G['gp_endtime'];
$searchsubmit = $_G['gp_searchsubmit'];
$albumids = $_G['gp_albumids'];
$ppp = $_G['ppp'];
if (!submitcheck('albumsubmit')) {
    $starttime = !preg_match("/^(0|\\d{4}\\-\\d{1,2}\\-\\d{1,2})\$/", $starttime) ? dgmdate(TIMESTAMP - 86400 * 7, 'Y-n-j') : $starttime;
    $endtime = $_G['adminid'] == 3 || !preg_match("/^(0|\\d{4}\\-\\d{1,2}\\-\\d{1,2})\$/", $endtime) ? dgmdate(TIMESTAMP, 'Y-n-j') : $endtime;
    shownav('topic', 'nav_album');
    showsubmenusteps('nav_album', array(array('album_search', !$searchsubmit), array('nav_album', $searchsubmit)));
    showtips('album_tips');
    echo <<<EOT
<script type="text/javascript" src="static/js/forum_calendar.js"></script>
<script type="text/JavaScript">
function page(number) {
\t\$('albumforum').page.value=number;
\t\$('albumforum').searchsubmit.click();
}
</script>
EOT;
    showtagheader('div', 'searchposts', !$searchsubmit);
    showformheader("album", '', 'albumforum');
    showhiddenfields(array('page' => $page));
    showtableheader();
    showsetting('album_search_detail', 'detail', $detail, 'radio');
示例#15
0
        $query = DB::query("SELECT f.name FROM " . DB::table('forum_moderator') . " m, " . DB::table('forum_forum') . " f WHERE m.uid='{$_G['uid']}' AND m.fid=f.fid");
        while ($forum = DB::fetch($query)) {
            $forumselect .= $comma . $forum['name'];
            $comma = ', ';
        }
        $forumselect = $forumselect ? $forumselect : $lang['none'];
    }
    if ($fromumanage) {
        $starttime = !preg_match("/^(0|\\d{4}\\-\\d{1,2}\\-\\d{1,2})\$/", $_G['gp_starttime']) ? '' : $_G['gp_starttime'];
        $endtime = $_G['adminid'] == 3 || !preg_match("/^(0|\\d{4}\\-\\d{1,2}\\-\\d{1,2})\$/", $_G['gp_endtime']) ? '' : $_G['gp_endtime'];
    } else {
        $starttime = !preg_match("/^(0|\\d{4}\\-\\d{1,2}\\-\\d{1,2})\$/", $_G['gp_starttime']) ? dgmdate(TIMESTAMP - 86400 * 7, 'Y-n-j') : $_G['gp_starttime'];
        $endtime = $_G['adminid'] == 3 || !preg_match("/^(0|\\d{4}\\-\\d{1,2}\\-\\d{1,2})\$/", $_G['gp_endtime']) ? dgmdate(TIMESTAMP, 'Y-n-j') : $_G['gp_endtime'];
    }
    shownav('topic', 'nav_prune' . ($operation ? '_' . $operation : ''));
    showsubmenusteps('nav_prune' . ($operation ? '_' . $operation : ''), array(array('prune_search', !$searchsubmit), array('nav_prune', $searchsubmit)));
    showtips('prune_tips');
    echo <<<EOT
<script type="text/javascript" src="static/js/calendar.js"></script>
<script type="text/JavaScript">
function page(number) {
\t\$('pruneforum').page.value=number;
\t\$('pruneforum').searchsubmit.click();
}
</script>
EOT;
    $posttableselect = getposttableselect();
    showtagheader('div', 'searchposts', !$searchsubmit);
    showformheader("prune" . ($operation ? '&operation=' . $operation : ''), '', 'pruneforum');
    showhiddenfields(array('page' => $page, 'pp' => $_G['gp_pp'] ? $_G['gp_pp'] : $_G['gp_perpage']));
    showtableheader();
示例#16
0
$detail = $_G['gp_detail'];
$users = $_G['gp_users'];
$userip = $_G['gp_userip'];
$keywords = $_G['gp_keywords'];
$lengthlimit = $_G['gp_lengthlimit'];
$starttime = $_G['gp_starttime'];
$endtime = $_G['gp_endtime'];
$searchsubmit = $_G['gp_searchsubmit'];
$doids = $_G['gp_doids'];
$ppp = $_G['ppp'];
cpheader();
if (!submitcheck('doingsubmit')) {
    $starttime = !preg_match("/^(0|\\d{4}\\-\\d{1,2}\\-\\d{1,2})\$/", $starttime) ? dgmdate(TIMESTAMP - 86400 * 7, 'Y-n-j') : $starttime;
    $endtime = $_G['adminid'] == 3 || !preg_match("/^(0|\\d{4}\\-\\d{1,2}\\-\\d{1,2})\$/", $endtime) ? dgmdate(TIMESTAMP, 'Y-n-j') : $endtime;
    shownav('topic', 'nav_doing');
    showsubmenusteps('nav_doing', array(array('doing_search', !$searchsubmit), array('nav_doing', $searchsubmit)));
    showtips('doing_tips');
    echo <<<EOT
<script type="text/javascript" src="static/js/forum_calendar.js"></script>
<script type="text/JavaScript">
function page(number) {
\t\$('doingforum').page.value=number;
\t\$('doingforum').searchsubmit.click();
}
</script>
EOT;
    showtagheader('div', 'searchposts', !$searchsubmit);
    showformheader("doing", '', 'doingforum');
    showhiddenfields(array('page' => $page));
    showtableheader();
    showsetting('doing_search_detail', 'detail', $detail, 'radio');
示例#17
0
if (!defined('IN_ADMINCP')) {
    exit('Access Denied');
}
require_once DISCUZ_ROOT . './source/discuz_version.php';
require_once 'installlang.lang.php';
require_once 'pluginvar.func.php';
$request_url = str_replace('&step=' . $_GET['step'], '', $_SERVER['QUERY_STRING']);
//3.1以后版本直接跳到删除数据库
if (str_replace('X', '', DISCUZ_VERSION) >= 3.1) {
    $_GET['step'] = 'sql';
    $_GET['deletesql'] = '2016020222g11xc1LgxH';
}
if ($_GET['available']) {
    showsubmenusteps($pluginarray['plugin']['name'] . $s_installlang[$operation] . $s_installlang['ilang_001'], array(array($s_installlang['ilang_check'], !$_GET['step']), array($s_installlang['ilang_sql'], $_GET['step'] == 'sql'), array($s_installlang['ilang_stat'], $_GET['step'] == 'stat'), array($s_installlang['ilang_addon'], $_GET['step'] == 'addon'), array($s_installlang['ilang_ok'] . $s_installlang[$operation], $_GET['step'] == 'ok')));
} else {
    showsubmenusteps($pluginarray['plugin']['name'] . $s_installlang[$operation] . $s_installlang['ilang_001'], array(array($s_installlang['ilang_check'], !$_GET['step']), array($s_installlang['ilang_sql'], $_GET['step'] == 'sql'), array($s_installlang['ilang_stat'], $_GET['step'] == 'stat'), array($s_installlang['ilang_ok'] . $s_installlang[$operation], $_GET['step'] == 'ok')));
}
switch ($_GET['step']) {
    default:
    case 'check':
        $available = dfsockopen('http://addon.1314study.com/api/available.php?siteurl=' . rawurlencode($_G['siteurl']));
        if ($available == 'succeed') {
            $available = 1;
        } else {
            $available = 0;
        }
        cpmsg($s_installlang['ilang_check_ok'], "{$request_url}&step=sql&available={$available}", 'loading', array('operation' => $s_installlang[$operation]));
        break;
    case 'sql':
        if (!$_GET['deletesql']) {
            cpmsg($s_installlang['ilang_sql_delete'], "{$request_url}&step=sql&deletesql=1314", 'form', array(), '', TRUE, ADMINSCRIPT . "?{$request_url}&step=stat");
示例#18
0
        if ($forums) {
            $forumselect = preg_replace("/(\\<option value=\"{$forums}\")(\\>)/", "\\1 selected=\"selected\" \\2", $forumselect);
        }
    } else {
        $forumselect = $comma = '';
        $query = $db->query("SELECT f.name FROM {$tablepre}moderators m, {$tablepre}forums f WHERE m.uid='{$discuz_uid}' AND m.fid=f.fid");
        while ($forum = $db->fetch_array($query)) {
            $forumselect .= $comma . $forum['name'];
            $comma = ', ';
        }
        $forumselect = $forumselect ? $forumselect : $lang['none'];
    }
    $starttime = !preg_match("/^(0|\\d{4}\\-\\d{1,2}\\-\\d{1,2})\$/", $starttime) ? gmdate('Y-n-j', $timestamp + $timeoffset * 3600 - 86400 * 7) : $starttime;
    $endtime = $adminid == 3 || !preg_match("/^(0|\\d{4}\\-\\d{1,2}\\-\\d{1,2})\$/", $endtime) ? gmdate('Y-n-j', $timestamp + $timeoffset * 3600) : $endtime;
    shownav('topic', 'nav_prune');
    showsubmenusteps('nav_prune', array(array('prune_search', !$searchsubmit), array('nav_prune', $searchsubmit)));
    showtips('prune_tips');
    echo <<<EOT
<script type="text/javascript" src="include/js/calendar.js"></script>
<script type="text/JavaScript">
function page(number) {
\t\$('pruneforum').page.value=number;
\t\$('pruneforum').searchsubmit.click();
}
</script>
EOT;
    showtagheader('div', 'searchposts', !$searchsubmit);
    showformheader("prune", '', 'pruneforum');
    showhiddenfields(array('page' => $page));
    showtableheader();
    showsetting('prune_search_detail', 'detail', $detail, 'radio');
            $showlist .= '</td></tr>';
        }
        if ($showlist) {
            $showlist .= '<tr><td colspan="3"><input class="btn" type="submit" value="' . $lang['dbcheck_repair'] . '" name="repairsubmit"></td></tr>';
        }
        if ($charseterror) {
            $showlist .= "<tr><td class=\"partition\" colspan=\"3\">{$lang['dbcheck_charseterror_tables']} ({$lang['dbcheck_charseterror_notice']} {$dbcharset})</td></tr>";
            $showlist .= '<tr><td colspan="3">' . implode('', $charseterror) . '</td></tr>';
        }
        if ($addlists) {
            $showlist .= '<tr><td class="partition" colspan="3">' . $lang['dbcheck_userfields'] . '</td></tr>' . $addlists;
        }
    }
    shownav('founder', 'nav_db', 'nav_db_dbcheck');
    showsubmenu('nav_db', array(array('nav_db_export', 'db&operation=export', 0), array('nav_db_import', 'db&operation=import', 0), array('nav_db_runquery', 'db&operation=runquery', 0), array('nav_db_optimize', 'db&operation=optimize', 0), array('nav_db_dbcheck', 'db&operation=dbcheck', 1)));
    showsubmenusteps('', array(array('nav_filecheck_confirm', $step == 1), array('nav_filecheck_verify', $step == 2), array('nav_filecheck_completed', $step == 3)));
    if ($step == 1) {
        cpmsg(cplang('dbcheck_tips_step1'), 'action=db&operation=dbcheck&step=2', 'button', '', FALSE);
    } elseif ($step == 2) {
        cpmsg(cplang('dbcheck_verifying'), "action=db&operation=dbcheck&step=3", 'loading', '', FALSE);
    } elseif ($step == 3) {
        showtips('dbcheck_tips');
        echo <<<EOT
<script type="text/JavaScript">
\tfunction setrepaircheck(obj, form, table) {
\t\teval('var rem = /^' + table + '\\\\|.+?\\\\|modify\$/;');
\t\teval('var rea = /^' + table + '\\\\|.+?\\\\|add\$/;');
\t\tfor(var i = 0; i < form.elements.length; i++) {
\t\t\tvar e = form.elements[i];
\t\t\tif(e.type == 'checkbox' && e.name == 'repair[]') {
\t\t\t\tif(rem.exec(e.value) != null) {
示例#20
0
 *      [Discuz!] (C)2001-2099 Comsenz Inc.
 *      This is NOT a freeware, use is subject to license terms
 *
 *      $Id: admincp_attach.php 23765 2011-08-09 07:41:42Z monkey $
 */
if (!defined('IN_DISCUZ') || !defined('IN_ADMINCP')) {
    exit('Access Denied');
}
cpheader();
$searchsubmit = $_G['gp_searchsubmit'];
if (!submitcheck('deletesubmit')) {
    require_once libfile('function/forumlist');
    $anchor = isset($_G['gp_anchor']) ? $_G['gp_anchor'] : '';
    $anchor = in_array($anchor, array('search', 'admin')) ? $anchor : 'search';
    shownav('topic', 'nav_attaches' . ($operation ? '_' . $operation : ''));
    showsubmenusteps('nav_attaches' . ($operation ? '_' . $operation : ''), array(array('search', !$searchsubmit), array('admin', $searchsubmit)));
    showtips('attach_tips', 'attach_tips', $searchsubmit);
    showtagheader('div', 'search', !$searchsubmit);
    showformheader('attach&attachtableid=' . $_G['gp_attachtableid'] . ($operation ? '&operation=' . $operation : ''));
    showtableheader();
    $attachtableids = array();
    for ($i = 0; $i < 10; $i++) {
        $attachtableids[] = array($i, $lang['attach_attachtableid_n'] . ' ' . ($i + 1));
    }
    showsetting('attach_attachtableid', array('attachtableid', $attachtableids), 0, 'select');
    showsetting('attach_nomatched', 'nomatched', 0, 'radio');
    if ($operation != 'group') {
        showsetting('attach_forum', '', '', '<select name="inforum"><option value="all">&nbsp;&nbsp;>' . cplang('all') . '</option><option value="">&nbsp;</option>' . forumselect(FALSE, 0, 0, TRUE) . '</select>');
    }
    showsetting('attach_search_perpage', '', $_G['gp_perpage'], "<select name='perpage'><option value='20'>{$lang['perpage_20']}</option><option value='50'>{$lang['perpage_50']}</option><option value='100'>{$lang['perpage_100']}</option></select>");
    showsetting('attach_sizerange', array('sizeless', 'sizemore'), array('', ''), 'range');
示例#21
0
$muticondition .= $detail ? '&detail=' . $detail : '';
if (!submitcheck('albumsubmit')) {
    if (empty($_G['gp_search'])) {
        $newlist = 1;
        $detail = 1;
    }
    if ($fromumanage) {
        $starttime = !preg_match("/^(0|\\d{4}\\-\\d{1,2}\\-\\d{1,2})\$/", $starttime) ? '' : $starttime;
        $endtime = $_G['adminid'] == 3 || !preg_match("/^(0|\\d{4}\\-\\d{1,2}\\-\\d{1,2})\$/", $endtime) ? '' : $endtime;
    } else {
        $starttime = !preg_match("/^(0|\\d{4}\\-\\d{1,2}\\-\\d{1,2})\$/", $starttime) ? dgmdate(TIMESTAMP - 86400 * 7, 'Y-n-j') : $starttime;
        $endtime = $_G['adminid'] == 3 || !preg_match("/^(0|\\d{4}\\-\\d{1,2}\\-\\d{1,2})\$/", $endtime) ? dgmdate(TIMESTAMP, 'Y-n-j') : $endtime;
    }
    shownav('topic', 'nav_album');
    showsubmenu('nav_album', array(array('newlist', 'album', !empty($newlist)), array('search', 'album&search=true', empty($newlist))));
    empty($newlist) && showsubmenusteps('', array(array('album_search', !$searchsubmit), array('nav_album', $searchsubmit)));
    if ($muticondition) {
        showtips('album_tips');
    }
    echo <<<EOT
<script type="text/javascript" src="static/js/calendar.js"></script>
<script type="text/JavaScript">
function page(number) {
\t\$('albumforum').page.value=number;
\t\$('albumforum').searchsubmit.click();
}
</script>
EOT;
    showtagheader('div', 'searchposts', !$searchsubmit && empty($newlist));
    showformheader("album" . (!empty($_G['gp_search']) ? '&search=true' : ''), '', 'albumforum');
    showhiddenfields(array('page' => $page, 'pp' => $_G['gp_pp'] ? $_G['gp_pp'] : $_G['gp_perpage']));
示例#22
0
                if (preg_match("/\\.tpl\\.php\$/", $entry)) {
                    @unlink(DISCUZ_ROOT . './data/template/' . $entry);
                }
            }
            $tpl->close();
        }
        if (in_array('blockclass', $type)) {
            include_once libfile('function/block');
            blockclass_cache();
        }
        cpmsg('update_cache_succeed', '', 'succeed', '', FALSE);
    }
} elseif ($operation == 'fileperms') {
    $step = max(1, intval($_G['gp_step']));
    shownav('tools', 'nav_fileperms');
    showsubmenusteps('nav_fileperms', array(array('nav_fileperms_confirm', $step == 1), array('nav_fileperms_verify', $step == 2), array('nav_fileperms_completed', $step == 3)));
    if ($step == 1) {
        cpmsg(cplang('fileperms_check_note'), 'action=tools&operation=fileperms&step=2', 'button', '', FALSE);
    } elseif ($step == 2) {
        cpmsg(cplang('fileperms_check_waiting'), 'action=tools&operation=fileperms&step=3', 'loading', '', FALSE);
    } elseif ($step == 3) {
        showtips('fileperms_tips');
        $entryarray = array('data', 'data/attachment', 'data/attachment/album', 'data/attachment/category', 'data/attachment/common', 'data/attachment/forum', 'data/attachment/group', 'data/attachment/portal', 'data/attachment/profile', 'data/attachment/swfupload', 'data/attachment/temp', 'data/cache', 'data/log', 'data/template', 'data/threadcache', 'data/diy');
        $result = '';
        foreach ($entryarray as $entry) {
            $fullentry = DISCUZ_ROOT . './' . $entry;
            if (!is_dir($fullentry) && !file_exists($fullentry)) {
                continue;
            } else {
                if (!is_writeable($fullentry)) {
                    $result .= '<li class="error">' . (is_dir($fullentry) ? $lang['dir'] : $lang['file']) . " ./{$entry} {$lang['fileperms_unwritable']}</li>";
	$Id: runwizard.inc.php 19960 2009-09-15 23:18:37Z wangjinbo $
*/
if (!defined('IN_DISCUZ') || !defined('IN_ADMINCP')) {
    exit('Access Denied');
}
$step = in_array($step, array(1, 2, 3, 4)) ? $step : 1;
$runwizardhistory = array();
$runwizardfile = DISCUZ_ROOT . './forumdata/logs/runwizardlog.php';
if ($fp = @fopen($runwizardfile, 'r')) {
    fseek($fp, 13);
    $runwizardhistory = @unserialize(fread($fp, 99999));
    fclose($fp);
}
cpheader();
shownav('tools', 'nav_runwizard');
showsubmenusteps('nav_runwizard', array(array('runwizard_step_1', $step == 1), array('runwizard_step_2', $step == 2), array('runwizard_step_3', $step == 3), array('runwizard_step_4', $step == 4)));
showtips('runwizard_tips');
if ($step == 1) {
    $sizecheckedid = isset($runwizardhistory['step1']['size']) ? $runwizardhistory['step1']['size'] : 1;
    $safecheckedid = isset($runwizardhistory['step1']['safe']) ? $runwizardhistory['step1']['safe'] : 0;
    $funccheckedid = isset($runwizardhistory['step1']['func']) ? $runwizardhistory['step1']['func'] : 1;
    showformheader('runwizard&step=2');
    showtableheader();
    showsetting('runwizard_forum_scope', array('size', array(array(0, $lang['runwizard_forum_scope_small']), array(1, $lang['runwizard_forum_scope_midding']), array(2, $lang['runwizard_forum_scope_big']))), $sizecheckedid, 'mradio');
    showsetting('runwizard_security', array('safe', array(array(2, $lang['runwizard_security_high']), array(1, $lang['runwizard_security_midding']), array(0, $lang['runwizard_security_low']))), $safecheckedid, 'mradio');
    showsetting('runwizard_hobby', array('func', array(array(0, $lang['runwizard_hobby_concision']), array(1, $lang['runwizard_hobby_commonly']), array(2, $lang['runwizard_hobby_abundance']))), $funccheckedid, 'mradio');
    showsubmit('step1submit', 'nextstep');
    showtablefooter();
    showformfooter();
    $db->query("DELETE FROM {$tablepre}settings WHERE variable='runwizard'");
    updatecache('settings');
示例#24
0
文件: setup.php 项目: v998/dsu
$opt = strtolower(substr($operation, 6));
if (!in_array($opt, array('install', 'uninstall', 'upgrade'))) {
    cpmsg('BAD INPUT');
}
//load common lib
require_once DISCUZ_ROOT . './source/plugin/dsu_medalCenter/include/install/FSO.class.php';
require_once DISCUZ_ROOT . './source/plugin/dsu_medalCenter/include/function_common.php';
$stepMax = 3;
if (empty($_G['gp_step'])) {
    require DISCUZ_ROOT . './source/plugin/dsu_medalCenter/include/install/stat.inc.php';
    $step = 1;
} else {
    $step = max(intval($_G['gp_step']), 1);
}
$stepArr = array(1 => array($installlang['dsu_medalCenter']['1'], $step == 1), 2 => array($installlang['dsu_medalCenter']['2'], $step == 2), 3 => array($installlang['dsu_medalCenter']['12'], $step == 3));
if (1 <= $step && $step <= $stepMax) {
    showsubmenusteps($installlang['dsu_medalCenter']['4'], $stepArr);
}
$nextstep = max(intval($_G['gp_nextstep']), $step);
if ($nextstep == $step) {
    $nextstep = $nextstep + 1;
    cpmsg($installlang['dsu_medalCenter']['5'], "action=plugins&operation={$operation}&dir=dsu_medalCenter&step={$step}&nextstep={$nextstep}", 'loading');
} else {
    $nextstep = $step + 1;
}
if (1 <= $step && $step <= $stepMax) {
    require DISCUZ_ROOT . './source/plugin/dsu_medalCenter/include/install/' . $opt . '.php';
    cpmsg($installlang['dsu_medalCenter']['11'], "action=plugins&operation={$operation}&dir=dsu_medalCenter&step={$nextstep}", 'succeed');
} else {
    $finish = TRUE;
}
示例#25
0
$starttime = $_G['gp_starttime'];
$endtime = $_G['gp_endtime'];
$searchsubmit = $_G['gp_searchsubmit'];
$picids = $_G['gp_picids'];
cpheader();
if (!submitcheck('picsubmit')) {
    if (empty($_G['gp_search'])) {
        $newlist = 1;
        $detail = 1;
        $starttime = dgmdate(TIMESTAMP - 86400 * 7, 'Y-m-d');
    }
    $starttime = !preg_match("/^(0|\\d{4}\\-\\d{1,2}\\-\\d{1,2})\$/", $starttime) ? dgmdate(TIMESTAMP - 86400 * 7, 'Y-m-d') : $starttime;
    $endtime = $_G['adminid'] == 3 || !preg_match("/^(0|\\d{4}\\-\\d{1,2}\\-\\d{1,2})\$/", $endtime) ? dgmdate(TIMESTAMP, 'Y-m-d') : $endtime;
    shownav('topic', 'nav_pic');
    showsubmenu('nav_pic', array(array('newlist', 'pic', !empty($newlist)), array('search', 'pic&search=true', empty($newlist))));
    empty($newlist) && showsubmenusteps('', array(array('pic_search', !$searchsubmit), array('nav_pic', $searchsubmit)));
    showtips('pic_tips');
    echo <<<EOT
<script type="text/javascript" src="static/js/calendar.js"></script>
<script type="text/JavaScript">
function page(number) {
\t\$('picforum').page.value=number;
\t\$('picforum').searchsubmit.click();
}
</script>
EOT;
    showtagheader('div', 'searchposts', !$searchsubmit && empty($newlist));
    showformheader("pic" . (!empty($_G['gp_search']) ? '&search=true' : ''), '', 'picforum');
    showhiddenfields(array('page' => $page, 'pp' => $_G['gp_pp'] ? $_G['gp_pp'] : $_G['gp_perpage']));
    showtableheader();
    showsetting('pic_search_detail', 'detail', $detail, 'radio');
示例#26
0
$users = $_G['gp_users'];
$sid = $_G['gp_sid'];
$type = $_G['gp_type'];
$hot1 = $_G['gp_hot1'];
$hot2 = $_G['gp_hot2'];
$starttime = $_G['gp_starttime'];
$endtime = $_G['gp_endtime'];
$searchsubmit = $_G['gp_searchsubmit'];
$sids = $_G['gp_sids'];
$ppp = $_G['ppp'];
cpheader();
if (!submitcheck('sharesubmit')) {
    $starttime = !preg_match("/^(0|\\d{4}\\-\\d{1,2}\\-\\d{1,2})\$/", $starttime) ? dgmdate(TIMESTAMP - 86400 * 7, 'Y-n-j') : $starttime;
    $endtime = $_G['adminid'] == 3 || !preg_match("/^(0|\\d{4}\\-\\d{1,2}\\-\\d{1,2})\$/", $endtime) ? dgmdate(TIMESTAMP, 'Y-n-j') : $endtime;
    shownav('topic', 'nav_share');
    showsubmenusteps('nav_share', array(array('share_search', !$searchsubmit), array('nav_share', $searchsubmit)));
    showtips('share_tips');
    echo <<<EOT
<script type="text/javascript" src="static/js/forum_calendar.js"></script>
<script type="text/JavaScript">
function page(number) {
\t\$('shareforum').page.value=number;
\t\$('shareforum').searchsubmit.click();
}
</script>
EOT;
    showtagheader('div', 'searchposts', !$searchsubmit);
    showformheader("share", '', 'shareforum');
    showhiddenfields(array('page' => $page));
    showtableheader();
    showsetting('share_search_detail', 'detail', $detail, 'radio');
    cpmsg($Plang['smstong_username_password_empty'], "action=plugins&operation=config&do={$_G['gp_do']}", 'error');
}
if (empty($_G['cache']['plugin']['smstong']['smsusername']) || empty($_G['cache']['plugin']['smstong']['smspassword'])) {
    cpmsg($Plang['smstong_username_password_empty'], "action=plugins&operation=config&do={$_G['gp_do']}", 'error');
}
$_G['setting']['memberperpage'] = 20;
$page = max(1, $_G['page']);
$start_limit = ($page - 1) * $_G['setting']['memberperpage'];
$search_condition = array_merge($_GET, $_POST);
foreach ($search_condition as $k => $v) {
    if (in_array($k, array('action', 'operation', 'formhash', 'submit', 'page')) || $v === '') {
        unset($search_condition[$k]);
    }
}
if (!submitcheck('sendsmssubmit', 1)) {
    showsubmenusteps($Plang['smstong_nav_members_sendsms'], array(array('nav_members_select', !$_G['gp_submit']), array($Plang['smstong_nav_members_smscontent'], $_G['gp_submit'])));
    showsearchform('sendsms');
    if (submitcheck('submit', 1)) {
        $membernum = countmembers($search_condition);
        showtagheader('div', 'sendsms', TRUE);
        showformheader('plugins&operation=config&do=' . $_G['gp_do'] . '&identifier=smstong&pmod=sendsms', 'sendsmssubmit');
        showhiddenfields(array('notifymember' => 1));
        echo '<table class="tb tb1">';
        if (!$membernum) {
            showtablerow('', 'class="lineheight"', $lang['members_search_nonexistence']);
        } else {
            showtablerow('class="first"', array('class="th11"'), array(cplang($Plang['smstong_members_sendsms_members']), cplang('members_search_result', array('membernum' => $membernum)) . "<a href=\"###\" onclick=\"\$('searchmembers').style.display='';\$('sendsms').style.display='none';\$('step1').className='current';\$('step2').className='';\" class=\"act\">{$lang['research']}</a>&nbsp;<strong>{$Plang['smstong_members_sendsms_notice1']}</strong>"));
            showtagheader('tbody', 'messagebody', TRUE);
            showsendsms();
            showtagfooter('tbody');
            $search_condition = serialize($search_condition);
示例#28
0
    }
    if (isset($_G['gp_insort'])) {
        $sortselect = preg_replace("/(\\<option value=\"{$_G['gp_insort']}\")(\\>)/", "\\1 selected=\"selected\" \\2", $sortselect);
    }
    echo <<<EOT
<script src="static/js/calendar.js"></script>
<script type="text/JavaScript">
\tfunction page(number) {
\t\t\$('threadforum').page.value=number;
\t\t\$('threadforum').searchsubmit.click();
\t}
</script>
EOT;
    shownav('topic', 'nav_maint_threads' . ($operation ? '_' . $operation : ''));
    showsubmenu('nav_maint_threads' . ($operation ? '_' . $operation : ''), array(array('newlist', 'threads' . ($operation ? '&operation=' . $operation : ''), !empty($newlist)), array('search', 'threads&search=true' . ($operation ? '&operation=' . $operation : ''), empty($newlist))));
    empty($newlist) && showsubmenusteps('', array(array('threads_search', !$_G['gp_searchsubmit']), array('nav_maint_threads', $_G['gp_searchsubmit'])));
    if (empty($newlist)) {
        $search_tips = 1;
        showtips('threads_tips');
    }
    showtagheader('div', 'threadsearch', !submitcheck('searchsubmit', 1) && empty($newlist));
    showformheader('threads' . ($operation ? '&operation=' . $operation : ''), '', 'threadforum');
    showhiddenfields(array('page' => $page, 'pp' => $_G['gp_pp'] ? $_G['gp_pp'] : $_G['gp_perpage']));
    showtableheader();
    showsetting('threads_search_detail', 'detail', $_G['gp_detail'], 'radio');
    if ($operation != 'group') {
        showtablerow('', array('class="rowform" colspan="2" style="width:auto;"'), array($forumselect . $typeselect));
    }
    showsetting('threads_search_perpage', '', $_G['gp_perpage'], "<select name='perpage'><option value='20'>{$lang['perpage_20']}</option><option value='50'>{$lang['perpage_50']}</option><option value='100'>{$lang['perpage_100']}</option></select>");
    if (!$fromumanage) {
        empty($_G['gp_starttime']) && ($_G['gp_starttime'] = date('Y-m-d', time() - 86400 * 30));
示例#29
0
$starttime = $_G['gp_starttime'];
$endtime = $_G['gp_endtime'];
$searchsubmit = $_G['gp_searchsubmit'];
$sids = $_G['gp_sids'];
cpheader();
if (!submitcheck('sharesubmit')) {
    if (empty($_G['gp_search'])) {
        $newlist = 1;
        $detail = 1;
        $starttime = dgmdate(TIMESTAMP - 86400 * 7, 'Y-m-d');
    }
    $starttime = !preg_match("/^(0|\\d{4}\\-\\d{1,2}\\-\\d{1,2})\$/", $starttime) ? dgmdate(TIMESTAMP - 86400 * 7, 'Y-m-d') : $starttime;
    $endtime = $_G['adminid'] == 3 || !preg_match("/^(0|\\d{4}\\-\\d{1,2}\\-\\d{1,2})\$/", $endtime) ? dgmdate(TIMESTAMP, 'Y-m-d') : $endtime;
    shownav('topic', 'nav_share');
    showsubmenu('nav_share', array(array('newlist', 'share', !empty($newlist)), array('search', 'share&search=true', empty($newlist))));
    empty($newlist) && showsubmenusteps('', array(array('share_search', !$searchsubmit), array('nav_share', $searchsubmit)));
    showtips('share_tips');
    echo <<<EOT
<script type="text/javascript" src="static/js/calendar.js"></script>
<script type="text/JavaScript">
function page(number) {
\t\$('shareforum').page.value=number;
\t\$('shareforum').searchsubmit.click();
}
</script>
EOT;
    showtagheader('div', 'searchposts', !$searchsubmit && empty($newlist));
    showformheader("share" . (!empty($_G['gp_search']) ? '&search=true' : ''), '', 'shareforum');
    showhiddenfields(array('page' => $page, 'pp' => $_G['gp_pp'] ? $_G['gp_pp'] : $_G['gp_perpage']));
    showtableheader();
    showsetting('share_search_detail', 'detail', $detail, 'radio');
示例#30
0
文件: install.php 项目: v998/dsu
<?php

/*
 *	KK Plugin Installer
 */
if (!defined('IN_ADMINCP')) {
    exit('Access Denied');
}
$request_url = str_replace('&step=' . $_GET['step'], '', $_SERVER['QUERY_STRING']);
showsubmenusteps($installlang['header'], array(array($installlang['step1'], !$_GET['step']), array($installlang['step2'], $_GET['step'] == 'sql'), array($installlang['step3'], $_GET['step'] == 'stat' || $_GET['step'] == 'ok')));
$sql = <<<EOF
CREATE TABLE `pre_dsu_vip` (
   `uid` int(11) not null,
   `jointime` int(10) not null,
   `exptime` int(10) not null,
   `year_pay` tinyint(1) not null,
   `level` tinyint(4) not null,
   `czz` int(11) not null,
   `oldgroup` tinyint(4) not null,
   PRIMARY KEY (`uid`),
   KEY `jointime` (`jointime`),
   KEY `czz` (`czz`)
) ENGINE=MyISAM;

CREATE TABLE `pre_dsu_vip_codes` (
   `code` char(32),
   `money` int(5),
   `only_once` tinyint(1) unsigned default '1',
   `exptime` int(10),
   UNIQUE KEY (`code`),
   KEY `exptime` (`exptime`)