コード例 #1
0
$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');
    showhiddenfields(array('page' => $page, 'pp' => $_G['gp_pp'] ? $_G['gp_pp'] : $_G['gp_perpage']));
    showtableheader();
    showsetting('postcomment_search_detail', 'detail', $detail, 'radio');
コード例 #2
0
ファイル: admincp_postsplit.php プロジェクト: v998/discuzx-en
        update_posttableids();
        updatecache('setting');
        cpmsg('postsplit_table_memo_update_succeed', 'action=postsplit&operation=manage', 'succeed');
    }
} elseif ($operation == 'split') {
    if (!$_G['setting']['bbclosed']) {
        cpmsg('postsplit_forum_must_be_closed', 'action=postsplit&operation=manage', 'error');
    }
    $tableid = intval($_G['gp_tableid']);
    $tablename = getposttable($tableid);
    if ($tableid && $tablename != 'forum_post' || !$tableid) {
        $status = gettablestatus(DB::table($tablename), false);
        $allowsplit = false;
        if ($status && (!$tableid && $status['Data_length'] > 400 * 1048576 || $tableid && $status['Data_length'])) {
            if (!submitcheck('splitsubmit')) {
                showtips('postsplit_manage_tips');
                showformheader('postsplit&operation=split&tableid=' . $tableid);
                showtableheader();
                showsetting('postsplit_from', '', '', getposttable($tableid) . (!empty($posttable_info[$tableid]['memo']) ? '(' . $posttable_info[$tableid]['memo'] . ')' : ''));
                $tablelist = '<option value="-1">' . cplang('postsplit_create') . '</option>';
                foreach ($posttable_info as $tid => $info) {
                    if ($tableid != $tid) {
                        $tablestatus = gettablestatus(DB::table(getposttable($tid)));
                        $tablelist .= '<option value="' . $tid . '">' . ($info['memo'] ? $info['memo'] : 'forum_post' . ($tid ? '_' . $tid : '')) . '(' . $tablestatus['Data_length'] . ')' . '</option>';
                    }
                }
                showsetting('postsplit_to', '', '', '<select onchange="if(this.value >= 0) {$(\'tableinfo\').style.display = \'none\';} else {$(\'tableinfo\').style.display = \'\';}" name="targettable">' . $tablelist . '</select>');
                showtagheader('tbody', 'tableinfo', true, 'sub');
                showsetting('postsplit_manage_table_memo', "memo", '', 'text');
                showtagfooter('tbody');
                $datasize = round($status['Data_length'] / 1048576);
コード例 #3
0
ファイル: admincp_share.php プロジェクト: v998/discuzx-en
$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');
    showsetting('share_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>");
コード例 #4
0
ファイル: adv.inc.php プロジェクト: pan289091315/Discuz
        $extra = $type != 'custom' ? '' : '&customid=' . $parameters['extra']['customid'];
        $advnew['parameters'] = addslashes(serialize(array_merge(is_array($parameters) ? $parameters : array(), array('style' => $advnew['style']), $advnew['style'] == 'code' ? array() : $advnew[$advnew['style']], array('html' => $advnew['code']), array('displayorder' => $advnew['displayorder']))));
        $advnew['code'] = addslashes($advnew['code']);
        $query = DB::query("UPDATE " . DB::table('advertisement') . " SET title='{$advnew['title']}', targets='{$advnew['targets']}', parameters='{$advnew['parameters']}', code='{$advnew['code']}', starttime='{$advnew['starttime']}', endtime='{$advnew['endtime']}' WHERE advid='{$advid}'");
        updatecache('advs');
        updatecache('setting');
        if ($operation == 'edit') {
            cpmsg('adv_succeed', $_G['gp_referer'], 'succeed');
        } else {
            cpmsg('adv_succeed', 'action=adv&operation=edit&advid=' . $advid . $extra, 'succeed');
        }
    }
} elseif ($operation == 'list') {
    shownav('global', 'adv_admin');
    showsubmenu('adv_admin', array(array('adv_admin_list', 'adv&operation=list', 1), array('adv_admin_listall', 'adv&operation=ad', 0)));
    showtips('adv_list_tip');
    $advs = getadvs();
    showtableheader('', 'fixpadding');
    $row = 4;
    $rowwidth = 1 / $row * 100;
    $customadv = $ads = array();
    $tmp = $advs['adv_custom.php'];
    unset($advs['adv_custom.php']);
    $advs['adv_custom.php'] = $tmp;
    $query = DB::query("SELECT type, count(type) as count FROM " . DB::table('advertisement') . " GROUP BY type");
    while ($ad = DB::fetch($query)) {
        $ads[$ad['type']] = $ad['count'];
    }
    $query = DB::query("SELECT parameters FROM " . DB::table('advertisement') . " WHERE type='custom'");
    while ($ad = DB::fetch($query)) {
        $parameters = unserialize($ad['parameters']);
コード例 #5
0
ファイル: myapp.inc.php プロジェクト: Mushan3420/BigApp-PHP7
function showRTitle($appId)
{
    global $ak, $sk, $_G, $pluginid;
    $str = '';
    $str .= '<li>' . sprintf(lang('plugin/bigapp', 'myapp_tip1'), $_G['setting']['plugins']['version']['bigapp']) . '</li>';
    $str .= '<li>' . lang('plugin/bigapp', 'myapp_tip2') . $_G['setting']['version'] . '</li>';
    $str .= '<li>' . lang('plugin/bigapp', 'myapp_tip3') . '</li>';
    //$str .= '<li>' . lang('plugin/bigapp', 'myapp_tip4') . '</li>';
    $str .= '<li style="color:red;font-weight:bold">' . lang('plugin/bigapp', 'jump2conf_tip1') . '<a href="' . rtrim($_G['siteurl'], '/') . '/admin.php?action=plugins&operation=config&do=' . $pluginid . '&identifier=bigapp&pmod=buildapp' . '">' . lang('plugin/bigapp', 'menu_app_gen') . '</a>' . lang('plugin/bigapp', 'jump2conf_tip2') . '</li>';
    showtips($str, '', true);
    $str = '';
    $str .= '<li>APP_KEY: ' . $ak . '</li>';
    $str .= '<li>APP_SECRET: ' . $sk . '</li>';
    $title = lang('plugin/bigapp', 'basic_setting');
    $be = checkBoost();
    $exit = 0;
    if (0 !== $be) {
        if (1 == $be) {
            $str = '<li>' . lang('plugin/bigapp', 'boost_file_miss1') . '</li>';
        } else {
            $str = '<li>' . lang('plugin/bigapp', 'boost_file_miss2') . '</li>';
        }
        $exit = 1;
        $title = lang('plugin/bigapp', 'api_invalid');
    }
    showtips($str, '', true, $title);
    showtablefooter();
    return $exit;
}
コード例 #6
0
<?php

/**
 *      [Discuz!] (C)2001-2099 Comsenz Inc.
 *      This is NOT a freeware, use is subject to license terms
 *
 *      $Id: cloud_smilies.php 25510 2011-11-14 02:22:26Z yexinhao $
 */
if (!defined('IN_DISCUZ') || !defined('IN_ADMINCP')) {
    exit('Access Denied');
}
cpheader();
$_GET['anchor'] = in_array($_GET['anchor'], array('base')) ? $_GET['anchor'] : 'base';
shownav('navcloud', 'cloud_storage');
showsubmenu('cloud_storage');
showtips('cloud_storage_tips');
コード例 #7
0
ファイル: admincp_tasks.php プロジェクト: v998/discuzx-en
            }
        }
        cpmsg('tasks_succeed', "action=tasks", 'succeed');
    }
} elseif ($operation == 'delete' && $id) {
    if (!$_G['gp_confirmed']) {
        cpmsg('tasks_del_confirm', "action=tasks&operation=delete&id={$id}", 'form');
    }
    DB::query("DELETE FROM " . DB::table('common_task') . " WHERE taskid='{$id}'");
    DB::query("DELETE FROM " . DB::table('common_taskvar') . " WHERE taskid='{$id}'");
    DB::query("DELETE FROM " . DB::table('common_mytask') . " WHERE taskid='{$id}'");
    cpmsg('tasks_del', 'action=tasks', 'succeed');
} elseif ($operation == 'type') {
    shownav('extended', 'nav_tasks');
    showsubmenu('nav_tasks', array(array('admin', 'tasks', 0), $submenus ? array(array('menu' => 'add', 'submenu' => $submenus), '', 0) : array(), array('nav_task_type', 'tasks&operation=type', 1)));
    showtips('tasks_tips_add_type');
    $tasks = gettasks();
    showtableheader('', 'fixpadding');
    if ($tasks) {
        showsubtitle(array('name', 'tasks_version', 'copyright', ''));
        foreach ($tasks as $task) {
            showtablerow('', '', array($task['name'] . ($task['filemtime'] > TIMESTAMP - 86400 ? ' <font color="red">New!</font>' : ''), $task['version'], $task['copyright'], in_array($task['class'], $custom_scripts) ? "<a href=\"" . ADMINSCRIPT . "?action=tasks&operation=upgrade&script={$task['class']}\" class=\"act\">{$lang['tasks_upgrade']}</a> <a href=\"" . ADMINSCRIPT . "?action=tasks&operation=uninstall&script={$task['class']}\" class=\"act\">{$lang['tasks_uninstall']}</a><br />" : "<a href=\"" . ADMINSCRIPT . "?action=tasks&operation=install&script={$task['class']}\" class=\"act\">{$lang['tasks_install']}</a>"));
        }
    } else {
        showtablerow('', '', $lang['task_module_nonexistence']);
    }
    showtablefooter();
} elseif ($operation == 'install' && $_G['gp_script']) {
    if (DB::result_first("SELECT COUNT(*) FROM " . DB::table('common_task') . " WHERE scriptname='{$_G['gp_script']}'")) {
        cpmsg('tasks_install_duplicate', '', 'error');
    }
コード例 #8
0
ファイル: admincp_plugins.php プロジェクト: v998/discuzx-en
     $condition = !empty($uid) ? "uid='{$uid}'" : "username='******'";
 }
 $plugin = DB::fetch_first("SELECT * FROM " . DB::table('common_plugin') . " WHERE pluginid='{$pluginid}'");
 if (!$plugin) {
     cpmsg('plugin_not_found', '', 'error');
 }
 $plugin['modules'] = unserialize($plugin['modules']);
 if ($plugin['modules']['system']) {
     cpmsg('plugin_donot_edit', '', 'error');
 }
 if (!submitcheck('editsubmit')) {
     $adminidselect = array($plugin['adminid'] => 'selected');
     shownav('plugin');
     $anchor = in_array($_G['gp_anchor'], array('config', 'modules', 'vars')) ? $_G['gp_anchor'] : 'config';
     showsubmenuanchors($lang['plugins_edit'] . ' - ' . $plugin['name'] . ($plugin['available'] ? cplang('plugins_edit_available') : ''), array(array('plugins_list', 'plugins', 0, 1), array('config', 'config', $anchor == 'config'), array('plugins_config_module', 'modules', $anchor == 'modules'), array('plugins_config_vars', 'vars', $anchor == 'vars'), array('export', 'plugins&operation=export&pluginid=' . $plugin['pluginid'], 0, 1)));
     showtips('plugins_edit_tips');
     showtagheader('div', 'config', $anchor == 'config');
     showformheader("plugins&operation=edit&type=common&pluginid={$pluginid}", '', 'configform');
     showtableheader();
     showsetting('plugins_edit_name', 'namenew', $plugin['name'], 'text');
     showsetting('plugins_edit_version', 'versionnew', $plugin['version'], 'text');
     if (!$plugin['copyright']) {
         showsetting('plugins_edit_copyright', 'copyrightnew', $plugin['copyright'], 'text');
     }
     showsetting('plugins_edit_identifier', 'identifiernew', $plugin['identifier'], 'text');
     showsetting('plugins_edit_directory', 'directorynew', $plugin['directory'], 'text');
     showsetting('plugins_edit_description', 'descriptionnew', $plugin['description'], 'textarea');
     showsetting('plugins_edit_langexists', 'langexists', $plugin['modules']['extra']['langexists'], 'radio');
     showsubmit('editsubmit');
     showtablefooter();
     showformfooter();
コード例 #9
0
         }
     }
     function showtextradio($textname, $textvalue, $radioname, $radioes = array())
     {
         $a = '<input type="text" class="txt marginbot" name="' . $textname . '" id="' . $textname . '" value="' . $textvalue . '" /><ul style="width: 340px;" onmouseover="altStyle(this);">';
         if (is_array($radioes)) {
             foreach ($radioes as $radio) {
                 $a .= '<li><input type="radio" name="' . $radioname . '" value="' . $radio[1] . '" class="radio" onclick="$(\'' . $textname . '\').value = this.value"' . ($radio[2] ? ' checked="checked"' : '') . ' /> ' . $radio[0] . '</li>';
             }
         }
         $a .= '</ul>';
         return $a;
     }
     shownav('tools', 'nav_creditwizard');
     showsubmenu('nav_creditwizard', array(array('creditwizard_step_menu_1', 'creditwizard&step=1', $step == 1), array('creditwizard_step_menu_2', 'creditwizard&step=2', $step == 2), array('creditwizard_step_menu_3', 'creditwizard&step=3', $step == 3), array('creditwizard_step_menu_4', 'settings&operation=ec&from=creditwizard', 0), array('ec_alipay', 'ec&operation=alipay&from=creditwizard', 0)));
     showtips('creditwizard_tips_creditsuse');
     showformheader('creditwizard&step=3');
     showtableheader('creditwizard_step_menu_3');
     showsetting('settings_credits_trans', '', '', '<select onchange="$(\'allowcreditstrans\').style.display = this.value != 0 ? \'\' : \'none\'" name="creditstransnew">' . $creditstransselect . '</select>');
     showsetting('settings_credits_tax', '', '', showtextradio('creditstaxnew', $creditstax, 'creditstaxradio', array(array($lang['low'] . ' (0.01)', '0.01', $creditstax == '0.01'), array($lang['middle'] . ' (0.1)', '0.1', $creditstax == '0.1'), array($lang['high'] . ' (0.5)', '0.5', $creditstax == '0.5'))));
     showsetting('settings_credits_minexchange', '', '', showtextradio('exchangemincreditsnew', $exchangemincredits, 'exchangemincreditsradio', array(array($lang['low'] . ' (100)', 100, $exchangemincredits == 100), array($lang['middle'] . ' (1000)', 1000, $exchangemincredits == 1000), array($lang['high'] . ' (5000)', 5000, $exchangemincredits == 5000))));
     showtagheader('tbody', 'allowcreditstrans', $creditstrans);
     showtitle('creditwizard_allowcreditstrans');
     showsetting('settings_credits_mintransfer', '', '', showtextradio('transfermincreditsnew', $transfermincredits, 'transfermincreditsradio', array(array($lang['low'] . ' (100)', 100, $transfermincredits == 100), array($lang['middle'] . ' (1000)', 1000, $transfermincredits == 1000), array($lang['high'] . ' (5000)', 5000, $transfermincredits == 5000))));
     showsetting('settings_credits_maxincperthread', '', '', showtextradio('maxincperthreadnew', $maxincperthread, 'maxincperthreadradio', array(array($lang['nolimit'] . ' (0)', 0, $maxincperthread == 0), array($lang['low'] . ' (10)', 10, $maxincperthread == 10), array($lang['middle'] . ' (50)', 50, $maxincperthread == 50), array($lang['high'] . ' (100)', 100, $maxincperthread == 100))));
     showsetting('settings_credits_maxchargespan', '', '', showtextradio('maxchargespannew', $maxchargespan, 'maxchargespanradio', array(array($lang['nolimit'] . ' (0)', 0, $maxchargespan == 0), array($lang['low'] . ' (5)', 5, $maxchargespan == 5), array($lang['middle'] . ' (24)', 24, $maxchargespan == 24), array($lang['high'] . ' (48)', 48, $maxchargespan == 48))));
     showtagfooter('tbody');
     showsubmit('settingsubmit');
     showtablefooter();
     showformfooter();
 } else {
コード例 #10
0
ファイル: category.inc.php プロジェクト: pan289091315/Discuz
                showtablerow('', array('class="td27" style="width:30px;"'), array("<input class='radio' type='radio' name='cmid' value='{$value['cmid']}' {$checked}/>", $value['modelname'], $value['scorenamestr'], date('Y-m-d', $value['dateline'])));
            }
            echo "</table>";
        } else {
            showtablerow('', array('class="td27"'), array(lang('catmodel_add')));
        }
        echo "</td></tr>";
        showtagfooter('tbody');
    }
    showhiddenfields(array('upid' => $_GET['upid']));
    showhiddenfields(array('catid' => $_GET['catid']));
    showhiddenfields(array('type' => $type));
    showsubmit('valuesubmit');
    showtablefooter();
    showformfooter();
} else {
    //沒有提交數據的列表頁
    shownav('catmanage', 'category_' . $type . '_list');
    showsubmenu('menu_category_' . $type);
    showtips('category_list_tips_' . $type);
    showformheader('category&type=' . $type);
    showtableheader('');
    showsubtitle(array('display_order', 'catid', 'catname', 'operation'));
    foreach ($categorylist as $value) {
        showtablerow('', array(), array('<input name="display[' . $value['catid'] . ']" type="text" size="2" value="' . $value['displayorder'] . '" />', $value['catid'], empty($value['url']) ? $value['pre'] . ' ' . $value['name'] : '<a href="' . $value['url'] . '" target="_blank">' . $value['pre'] . ' ' . $value['name'] . ' </a>', '[<a href="admin.php?action=category&op=add&type=' . $type . '&upid=' . $value['catid'] . '">' . lang('category_add_sub') . '</a>]' . ('[<a href="admin.php?action=category&op=edit&type=' . $type . '&upid=' . $value['upid'] . '&catid=' . $value['catid'] . '">' . lang('category_edit') . '</a>] ' . ($type != 'shop' && $type != 'region' && !$value['havechild'] ? '[<a href="admin.php?action=attribute&cid=' . $value['catid'] . '&type=' . $type . '">' . lang('attribute_list') . '</a>]' : '') . ' [<a href="admin.php?action=category&op=del&catid=' . $value['catid'] . '&type=' . $type . '">' . lang('category_del') . '</a>]')));
    }
    echo '<tr class="hover"><td></td><td><a href="?action=category&op=add&type=' . $type . '" class="addtr">' . lang('category_add_' . $type) . '</a></td><td></td><td></td><td></td></tr>';
    showsubmit('listsubmit');
    showtablefooter();
    showformfooter();
}
コード例 #11
0
         $options[$fieldid] = $value['title'];
     }
 }
 if (!empty($_GET['fieldid']) && !isset($options[$_GET['fieldid']])) {
     cpmsg('members_stat_bad_fieldid', 'action=members&operation=stat', 'error');
 }
 if (!empty($_GET['fieldid']) && $_GET['fieldid'] == 'groupid') {
     $usergroups = array();
     foreach (C::t('common_usergroup')->range() as $value) {
         $usergroups[$value['groupid']] = $value['grouptitle'];
     }
 }
 if (!submitcheck('statsubmit')) {
     shownav('user', 'nav_members_stat');
     showsubmenu('nav_members_stat');
     showtips('members_stat_tips');
     showformheader('members&operation=stat&fieldid=' . $_GET['fieldid']);
     showtableheader('members_stat_options');
     $option_html = '<ul>';
     foreach ($options as $key => $value) {
         $extra_style = $_GET['fieldid'] == $key ? ' font-weight: 900;' : '';
         $option_html .= "" . "<li style=\"float: left; width: 160px;{$extra_style}\">" . "<a href=\"" . ADMINSCRIPT . "?action=members&operation=stat&fieldid={$key}\">{$value}</a>" . "</li>";
     }
     $option_html .= '</ul><br style="clear: both;" />';
     showtablerow('', array('colspan="5"'), array($option_html));
     if ($_GET['fieldid']) {
         $list = array();
         $total = 0;
         foreach ($list = C::t('common_member_stat_field')->fetch_all_by_fieldid($_GET['fieldid']) as $value) {
             $total += $value['users'];
         }
コード例 #12
0
        echo '<br />';
        showtype('jswizard_custom', 'top');
        showsetting('jswizard_jskey', 'jskey', $jskey, 'text');
        showsetting('jswizard_cachelife', 'parameter[cachelife]', $parameter['cachelife'] != '' ? intval($parameter['cachelife']) : '', 'text');
        if (strtoupper($charset) != 'UTF-8') {
            showsetting('jswizard_charset', 'parameter[jscharset]', $parameter['jscharset'], 'radio');
        } else {
            showsetting('jswizard_charsetr', array('parameter[jscharset]', array(array(0, $lang['none']), array(1, 'GBK'), array(2, 'BIG5'))), intval($parameter['jscharset']), 'mradio');
        }
        showtype('', 'bottom');
        echo $editext . '<br /><center><input class="button" type="submit" name="jssubmit" value="' . $lang['jswizard_preview'] . '">&nbsp; &nbsp;<input class="button" type="button" onclick="this.form.preview.value=0;this.form.jssubmit.click()" value="' . $lang['submit'] . '"><input name="preview" type="hidden" value="1"></center></form><br />';
        /* Custom == End == */
    }
} elseif ($action == 'fileperms') {
    shownav('menu_tools_fileperms');
    showtips('fileperms_tips');
    ?>
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="tableborder">
<tr class="header"><td><?php 
    echo $lang['fileperms_check'];
    ?>
</td></tr>
<tr><td class="altbg1"><br /><ul>
<?php 
    $entryarray = array('attachments', 'forumdata', 'customavatars', 'forumdata/threadcaches');
    foreach (array('templates', 'forumdata/cache', 'forumdata/logs', 'forumdata/templates') as $directory) {
        getdirentry($directory);
    }
    $fault = 0;
    foreach ($entryarray as $entry) {
        $fullentry = DISCUZ_ROOT . './' . $entry;
コード例 #13
0
    showtableheader();
    showsetting('cloud_site_id', 'my_siteid', $_G['setting']['my_siteid'], 'text');
    showsetting('cloud_site_key', 'my_sitekey', preg_replace('/(\\w{2})\\w*(\\w{2})/', '\\1****\\2', $_G['setting']['my_sitekey']), 'text');
    showsetting('cloud_site_status', array('cloud_status', array(array('0', $lang['cloud_doctor_status_0']), array('1', $lang['cloud_doctor_status_1']), array('2', $lang['cloud_doctor_status_2']))), $_G['setting']['cloud_status'], 'select');
    showsubmit('setidkeysubmit');
    showtablefooter();
    showformfooter();
    echo '</div>';
    ajaxshowfooter();
} else {
    $appService = Cloud::loadClass('Service_App');
    $doctorService = Cloud::loadClass('Service_Doctor');
    require_once DISCUZ_ROOT . './source/discuz_version.php';
    shownav('navcloud', 'menu_cloud_doctor');
    showsubmenu('menu_cloud_doctor');
    showtips('cloud_doctor_tips');
    echo '<script type="text/javascript">var disallowfloat = "";</script>';
    showtableheader();
    showtagheader('tbody', '', true);
    showtitle('cloud_doctor_title_status');
    showtablerow('', array('class="td24"'), array('<strong>' . cplang('cloud_site_url') . '</strong>', $_G['siteurl']));
    showtablerow('', array('class="td24"'), array('<strong>' . cplang('cloud_site_id') . '</strong>', $_G['setting']['my_siteid']));
    showtablerow('', array('class="td24"'), array('<strong>' . cplang('cloud_site_key') . '</strong>', preg_replace('/(\\w{2})\\w*(\\w{2})/', '\\1****\\2', $_G['setting']['my_sitekey']) . ' ' . $lang['cloud_site_key_safetips']));
    showtablerow('', array('class="td24"'), array('<strong>' . cplang('cloud_site_status') . '</strong>', isfounder() ? $doctorService->showCloudStatus($_G['setting']['cloud_status']) . ' <a href="javascript:;" onClick="showWindow(\'cloudApiIpWin\', \'' . ADMINSCRIPT . '?action=cloud&operation=doctor&op=setidkey\'); return false;">' . $lang['cloud_doctor_modify_siteidkey'] . '</a>' : $doctorService->showCloudStatus($_G['setting']['cloud_status'])));
    showtablerow('', array('class="td24"'), array('<strong>' . cplang('setting_basic_bbclosed') . '</strong>', $_G['setting']['bbclosed'] ? $lang['cloud_doctor_close_yes'] : $lang['no']));
    showtablerow('', array('class="td24"'), array('<strong>' . cplang('cloud_site_version') . '</strong>', DISCUZ_VERSION . ' ' . DISCUZ_RELEASE));
    showtagfooter('tbody');
    showtagheader('tbody', '', true);
    showtitle('cloud_doctor_title_result');
    showtablerow('', array('class="td24"'), array('<strong>' . cplang('cloud_timecheck') . '</strong>', '<span id="cloud_time_check">' . cplang('cloud_doctor_time_check', array('imgdir' => $_G['style']['imgdir'])) . '</span>'));
    showtablerow('', array('class="td24"'), array('<strong>' . cplang('cloud_doctor_gethostbyname_function') . '</strong>', function_exists('gethostbyname') ? $lang['cloud_doctor_result_success'] . ' ' . $lang['available'] : $lang['cloud_doctor_result_failure'] . $lang['cloud_doctor_function_disable']));
コード例 #14
0
ファイル: admincp_pic.php プロジェクト: v998/discuzx-en
$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');
    showsetting('pic_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>");
コード例 #15
0
            if (preg_match('/^((http|https|ftp):\\/\\/|\\.)|(\\/|\\.)$/i', $domain)) {
                cpmsg('setting_domain_http_error', '', 'error');
            }
            if ($_G['setting']['domain']['root'][$idtype] != $domain) {
                $updatetype = $idtype == 'forum' ? array('forum', 'channel') : $idtype;
                C::t('common_domain')->update_by_idtype($updatetype, array('domainroot' => $domain));
            }
            $_G['setting']['domain']['root'][$idtype] = $domain;
        }
        C::t('common_setting')->update('domain', $_G['setting']['domain']);
        updatecache('setting');
        cpmsg('setting_update_succeed', 'action=domain&operation=root', 'succeed');
    }
} else {
    if (!submitcheck('domainsubmit')) {
        showtips('setting_domain_base_tips');
        showformheader("domain");
        showtableheader();
        if ($_G['setting']['homepagestyle']) {
            showsetting('setting_domain_allow_space', 'settingnew[allowspacedomain]', $_G['setting']['allowspacedomain'], 'radio');
        } else {
            showhiddenfields(array('settingnew[allowspacedomain]' => 0));
        }
        if (helper_access::check_module('group')) {
            showsetting('setting_domain_allow_group', 'settingnew[allowgroupdomain]', $_G['setting']['allowgroupdomain'], 'radio');
        } else {
            showhiddenfields(array('settingnew[allowgroupdomain]' => 0));
        }
        showsetting('setting_domain_hold_domain', 'settingnew[holddomain]', $_G['setting']['holddomain'], 'text');
        showsubmit('domainsubmit');
        showtablefooter();
コード例 #16
0
ファイル: admin.inc.php プロジェクト: vanloswang/discuzx-1
if (!$_GET['submit']) {
    $exsel = extc2seled(0, $_G['setting']['extcredits']);
    loadcache('usergroups');
    $usergroups = $_G['cache']['usergroups'];
    $gidsel = usergroups2seled('-1', $usergroups);
    echo '<script type="text/JavaScript">
	var rowtypedata = [[
		[1,"", ""],
		[1,\'<input type="text" class="txt" name="days[]" size="7">\', ""],
		[1,\'' . $gidsel . '\', ""],
		[1,\'' . $exsel . '\', ""],
		[1,\'<input type="text" class="txt" name="reward[]" size="7">\', ""],
	]]
	</script>';
    showformheader('plugins&operation=config&identifier=dsu_amupper&pmod=admin');
    showtips(lang("plugin/dsu_amupper", "admin2_p1"));
    showtableheader(lang("plugin/dsu_amupper", "admin2_h1"));
    showsubtitle(array(lang("plugin/dsu_amupper", "admin2_t0"), lang("plugin/dsu_amupper", "admin2_t1"), lang("plugin/dsu_amupper", "admin2_t4"), lang("plugin/dsu_amupper", "admin2_t2"), lang("plugin/dsu_amupper", "admin2_t3")));
    $arr = DB::fetch_all("SELECT * FROM %t WHERE id>%d LIMIT %d", array('plugin_dsuamupperc', '-1', '100'), 'id');
    if ($arr) {
        $i = 0;
        $data_f2a = dstripslashes($arr);
        foreach ($data_f2a as $id => $result) {
            $exsel = extc2seled($result['extcredits'], $_G['setting']['extcredits']);
            $gidsel = usergroups2seled($result['usergid'], $usergroups);
            showtablerow('', array(' ', ' ', ' ', ' '), array('<input type="checkbox" class="checkbox" name="delete[]" value="' . $i . '" />', '<INPUT TYPE="hidden" NAME="id[]" value="' . $result['id'] . '"><input type="text" class="txt" name="days[]" value="' . $result['days'] . '" size="7" />', '' . $gidsel . '', '' . $exsel . '', '<input type="text" class="txt" name="reward[]" value="' . $result['reward'] . '" size="7" />'));
            $i++;
        }
    }
    echo '<tr><td></td><td colspan="3"><div><a href="#addrow" name="addrow" onclick="addrow(this, 0)" class="addtr">' . lang("plugin/dsu_amupper", "admin2_s1") . '</a></div></td></tr>';
    showsubmit('submit', lang("plugin/dsu_amupper", "admin2_s2"));
コード例 #17
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();
    showtagfooter('div');
コード例 #18
0
if (!submitcheck('settingsubmit')) {
    if ($setting['wsq_siteid']) {
        if (in_array('plugin', $_G['setting']['rewritestatus'])) {
            $url = $_G['siteurl'] . rewriteoutput('plugin', 1, 'wechat', 'access');
        } else {
            $url = $_G['siteurl'] . 'plugin.php?id=wechat:access';
        }
    }
    $apilisturl = ADMINSCRIPT . '?action=plugins&operation=config&do=' . $pluginid . '&identifier=wechat&pmod=wsq_setting&viewapi=yes';
    $setting['wsq_siteurl'] = $setting['wsq_siteurl'] ? $setting['wsq_siteurl'] : $_G['siteurl'];
    $setting['wsq_sitename'] = $setting['wsq_sitename'] ? $setting['wsq_sitename'] : $_G['setting']['bbname'];
    require_once libfile('function/forumlist');
    $forums = '<select name="setting[wsq_fid]"><option value="">' . cplang('plugins_empty') . '</option>' . forumselect(FALSE, 0, $setting['wsq_fid'], TRUE) . '</select>';
    $sitelogo = $setting['wsq_sitelogo'] ? '<img src="' . $setting['wsq_sitelogo'] . '" width="150" />' : '';
    $qrcode = $setting['wechat_qrcode'] ? '<img src="' . $_G['setting']['attachurl'] . 'common/' . $setting['wechat_qrcode'] . '" width="150" />' : '';
    showtips(lang('plugin/wechat', 'wsq_tips', array('ADMINSCRIPT' => ADMINSCRIPT . '?action=', 'apiurl' => $apilisturl)));
    showformheader('plugins&operation=config&do=' . $pluginid . '&identifier=wechat&pmod=wsq_setting', 'enctype');
    showtableheader(lang('plugin/wechat', 'wechat_wsq_setting') . ' ' . ($setting['wsq_status'] ? ' (' . lang('plugin/wechat', 'wsq_status_open') . ')' : ($setting['wsq_siteid'] ? ' (' . lang('plugin/wechat', 'wsq_status_ing') . (TIMESTAMP - $setting['wsq_lastrequest'] > 3600 ? ' <a href="' . ADMINSCRIPT . '?action=plugins&operation=config&do=' . $pluginid . '&identifier=wechat&pmod=wsq_setting&recheck=yes">[' . lang('plugin/wechat', 'wsq_status_try') . ']</a>)' : ')') : ' (' . lang('plugin/wechat', 'wsq_status_close') . ')')));
    showsetting(lang('plugin/wechat', 'wsq_allow'), 'setting[wsq_allow]', $setting['wsq_allow'], 'radio', 0, 0, lang('plugin/wechat', 'wsq_allow_comment'));
    if ($setting['wsq_allow'] && $setting['wsq_siteid']) {
        showtablefooter();
        showtableheader();
        showsetting(lang('plugin/wechat', 'wsq_url'), '', '', '<span style="white-space:nowrap">' . $url . '</span>');
        showtablefooter();
        showtableheader();
        showsetting(lang('plugin/wechat', 'wsq_siteid'), '', '', $setting['wsq_siteid']);
        showsetting(lang('plugin/wechat', 'wsq_sitetoken'), '', '', $setting['wsq_sitetoken']);
    }
    showsetting(lang('plugin/wechat', 'wsq_sitename'), 'setting[wsq_sitename]', $setting['wsq_sitename'], 'text');
    showsetting(lang('plugin/wechat', 'wsq_sitelogo'), 'wsq_sitelogo', $setting['wsq_sitelogo'], 'file', 0, 0, lang('plugin/wechat', 'wsq_sitelogo_comment', array('sitelogo' => $sitelogo)));
    showsetting(lang('plugin/wechat', 'wsq_sitesummary'), 'setting[wsq_sitesummary]', $setting['wsq_sitesummary'], 'textarea');
コード例 #19
0
 *      [Discuz!] (C)2001-2099 Comsenz Inc.
 *      This is NOT a freeware, use is subject to license terms
 *
 *      $Id: response_setting.inc.php 35024 2014-10-14 07:43:43Z nemohou $
 */
if (!defined('IN_DISCUZ') || !defined('IN_ADMINCP')) {
    exit('Access Denied');
}
loadcache('wechat_response');
$response =& $_G['cache']['wechat_response'];
require_once DISCUZ_ROOT . './source/plugin/wechat/wechat.lib.class.php';
require_once DISCUZ_ROOT . './source/plugin/wechat/wsq.class.php';
require_once DISCUZ_ROOT . './source/plugin/wechat/setting.class.php';
WeChatSetting::menu();
if (!submitcheck('menusubmit')) {
    showtips(lang('plugin/wechat', 'response_tips', array('url' => $url)));
    $responsehook = WeChatHook::getResponse();
    if ($_GET['subscribe'] == 'custom') {
        $response['subscribeback'] = $responsehook['receiveEvent::subscribe'];
        $updatedata = array('receiveEvent::subscribe' => array('plugin' => 'wechat', 'include' => 'response.class.php', 'class' => 'WSQResponse', 'method' => 'custom'));
        $responsehook = WeChatHook::updateResponse($updatedata);
        savecache('wechat_response', $response);
        cpmsg(lang('plugin/wechat', 'response_subscribe_custom'), 'action=plugins&operation=config&do=' . $pluginid . '&identifier=wechat&pmod=response_setting', 'succeed');
    } elseif ($_GET['subscribe'] == 'restore') {
        $response['subscribeback'] = $response['subscribeback'] ? $response['subscribeback'] : array('plugin' => 'wechat', 'include' => 'response.class.php', 'class' => 'WSQResponse', 'method' => 'subscribe');
        $updatedata = array('receiveEvent::subscribe' => $response['subscribeback']);
        $responsehook = WeChatHook::updateResponse($updatedata);
        savecache('wechat_response', $response);
        cpmsg(lang('plugin/wechat', 'response_subscribe_plugin'), 'action=plugins&operation=config&do=' . $pluginid . '&identifier=wechat&pmod=response_setting', 'succeed');
    }
    if ($_GET['text'] == 'custom') {
コード例 #20
0
ファイル: managelog.inc.php プロジェクト: pan289091315/Discuz
<?php

/**
 *      [品牌空間] (C)2001-2010 Comsenz Inc.
 *      This is NOT a freeware, use is subject to license terms
 *
 *      $Id: managelog.inc.php 4324 2010-09-04 07:08:16Z fanshengshuai $
 */
if (!defined('IN_ADMIN')) {
    exit('Acess Denied');
}
require_once B_ROOT . './source/adminfunc/tool.func.php';
shownav('oplog', 'managelog_list');
showsubmenu('managelog_list');
showtips('managelog_list_tips');
if (submitcheck('filtersubmit')) {
    showformheader('managelog');
    showtableheader('');
    showsubtitle(array('managelogusername', 'managelogobject', 'managelogedshopname', 'managelogop', 'managelogreason', 'mldateliane'));
    $wheresql = '';
    $wheresql .= !empty($_REQUEST['managelogtype']) ? ' AND type=\'' . trim($_REQUEST['managelogtype']) . '\'' : '';
    $wheresql .= !empty($_REQUEST['shopid']) ? ' AND shopid=\'' . intval($_REQUEST['shopid']) . '\'' : '';
    if (!empty($wheresql)) {
        $wheresql = ' WHERE' . substr($wheresql, 4);
    }
    $managelog = $managelogarr = array();
    $tpp = 15;
    $page = $_GET['page'] > 0 ? intval($_GET['page']) : 1;
    $mlstart = ($page - 1) * $tpp;
    $query = DB::query("SELECT count(mlogid) AS count  FROM " . tname('managelog') . $wheresql . ";");
    $value = DB::fetch($query);
コード例 #21
0
                cpmsg('crons_run_invalid', '', 'error', array('cronfile' => $cronfile));
            } else {
                discuz_cron::run($cron['cronid']);
                cpmsg('crons_run_succeed', 'action=misc&operation=cron', 'succeed');
            }
        }
    }
} elseif ($operation == 'focus') {
    require_once libfile('function/post');
    $focus = C::t('common_setting')->fetch('focus', true);
    $focus_position_array = array(array('portal', cplang('misc_focus_position_portal')), array('home', cplang('misc_focus_position_home')), array('member', cplang('misc_focus_position_member')), array('forum', cplang('misc_focus_position_forum')), array('group', cplang('misc_focus_position_group')), array('search', cplang('misc_focus_position_search')), array('userapp', cplang('misc_focus_position_userapp')));
    if (!$do) {
        if (!submitcheck('focussubmit')) {
            shownav('extended', 'misc_focus');
            showsubmenu('misc_focus', array(array('config', 'misc&operation=focus&do=config', 0), array('admin', 'misc&operation=focus', 1), array('add', 'misc&operation=focus&do=add')));
            showtips('misc_focus_tips');
            showformheader('misc&operation=focus');
            showtableheader('admin', 'fixpadding');
            showsubtitle(array('', 'subject', 'available', ''));
            if (is_array($focus['data'])) {
                foreach ($focus['data'] as $k => $v) {
                    showtablerow('', array('class="td25"', '', 'class="td25"', 'class="td25"'), array("<input type=\"checkbox\" class=\"checkbox\" name=\"delete[]\" value=\"{$k}\">", '<a href="' . $v['url'] . '" target="_blank">' . $v[subject] . '</a>', "<input type=\"checkbox\" class=\"checkbox\" name=\"available[{$k}]\" value=\"1\" " . ($v['available'] ? 'checked' : '') . ">", "<a href=\"" . ADMINSCRIPT . "?action=misc&operation=focus&do=edit&id={$k}\" class=\"act\">{$lang['edit']}</a>"));
                }
            }
            showsubmit('focussubmit', 'submit', 'del');
            showtablefooter();
            showformfooter();
        } else {
            $newfocus = array();
            $newfocus['title'] = $focus['title'];
            $newfocus['data'] = array();
コード例 #22
0
ファイル: moderate_member.php プロジェクト: softhui/discuz
                            $moderate_member_message = lang('email', 'moderate_member_message', array('username' => $member['username'], 'bbname' => $_G['setting']['bbname'], 'regdate' => $member['regdate'], 'submitdate' => $member['submitdate'], 'submittimes' => $member['submittimes'], 'message' => $member['message'], 'modresult' => lang('email', 'moderate_member_' . $member['operation']), 'moddate' => $member['moddate'], 'adminusername' => $_G['member']['username'], 'remark' => $member['remark'], 'siteurl' => $_G['siteurl']));
                            if (!sendmail("{$member['username']} <{$member['email']}>", lang('email', 'moderate_member_subject'), $moderate_member_message)) {
                                runlog('sendmail', "{$member['email']} sendmail failed.");
                            }
                        }
                    }
                }
            }
        }
        cpmsg('moderate_members_op_succeed', "action=moderate&operation=members&page={$page}", 'succeed', array('numvalidated' => $numvalidated, 'numinvalidated' => $numinvalidated, 'numdeleted' => $numdeleted));
    }
} elseif ($do == 'del') {
    if (!submitcheck('prunesubmit', 1)) {
        shownav('user', 'nav_modmembers');
        showsubmenu('nav_moderate_users', array(array('nav_moderate_users_mod', 'moderate&operation=members&do=mod', 0), array('clean', 'moderate&operation=members&do=del', 1)));
        showtips('moderate_members_tips');
        showformheader('moderate&operation=members&do=del');
        showtableheader('moderate_members_prune');
        showsetting('moderate_members_prune_submitmore', 'submitmore', '5', 'text');
        showsetting('moderate_members_prune_regbefore', 'regbefore', '30', 'text');
        showsetting('moderate_members_prune_modbefore', 'modbefore', '15', 'text');
        showsetting('moderate_members_prune_regip', 'regip', '', 'text');
        showsubmit('prunesubmit');
        showtablefooter();
        showformfooter();
    } else {
        $uids = C::t('common_member_validate')->fetch_all_validate_uid($_GET['submitmore'], $_GET['regbefore'], $_GET['modbefore'], $_GET['regip']);
        if (!($membernum = count($uids))) {
            cpmsg('members_search_noresults', '', 'error');
        } elseif (!$_GET['confirmed']) {
            cpmsg('members_delete_confirm', "action=moderate&operation=members&do=del&submitmore=" . rawurlencode($_GET['submitmore']) . "&regbefore=" . rawurlencode($_GET['regbefore']) . "&regip=" . rawurlencode($_GET['regip']) . "&prunesubmit=yes", 'form', array('membernum' => $membernum));
コード例 #23
0
        cpmsg('modifypasswd_error', '', 'error', '', true, true, $checkresults);
    }
    require_once B_ROOT . './uc_client/client.php';
    $ucresult = uc_user_edit($_G['username'], $_POST['password'], $_POST['newpassword1']);
    if ($ucresult == -1) {
        array_push($checkresults, array('password' => $lang['old_password_invalid']));
    } elseif ($ucresult == -7) {
        array_push($checkresults, array('message' => $lang['no_change']));
    } elseif ($ucresult == -8) {
        array_push($checkresults, array('message' => $lang['protection_of_users']));
    }
    if (!empty($checkresults)) {
        cpmsg('modifypasswd_error', '', 'error', '', true, true, $checkresults);
    }
    sclearcookie();
    cpmsg('getpasswd_succeed', 'index.php', 'succeed');
}
shownav('shop', 'nav_modifypasswd');
showsubmenu('nav_modifypasswd');
showtips('modifypasswd_list_tips');
showformheader('modifypasswd');
showtableheader('');
$required = '<span style="color:red">*</span>';
showsetting('modifypasswd_passwd', 'password', '', 'password', '', '', '', '', $required);
showsetting('modifypasswd_newpasswd1', 'newpassword1', '', 'password', '', '', '', '', $required);
showsetting('modifypasswd_newpasswd2', 'newpassword2', '', 'password', '', '', '', '', $required);
showsubmit('valuesubmit');
showtablefooter();
showformfooter();
bind_ajax_form();
exit;
コード例 #24
0
ファイル: admincp_ec.php プロジェクト: v998/discuzx-en
                notification_add($order['uid'], 'system', 'addfunds', array('orderid' => $order['orderid'], 'price' => $order['price'], 'value' => $_G['setting']['extcredits'][$_G['setting']['creditstrans']]['title'] . ' ' . $order['amount'] . ' ' . $_G['setting']['extcredits'][$_G['setting']['creditstrans']]['unit']), 1);
            }
            if ($numvalidate = DB::num_rows($query)) {
                DB::query("UPDATE " . DB::table('forum_order') . " SET status='3', admin='{$_G['username']}', confirmdate='{$_G['timestamp']}' WHERE orderid IN ({$orderids})");
            }
        }
        cpmsg('orders_validate_succeed', "action=ec&operation=orders&searchsubmit=yes&orderstatus={$_G['gp_orderstatus']}&orderid={$_G['gp_orderid']}&users={$_G['gp_users']}&buyer={$_G['gp_buyer']}&admin={$_G['gp_admin']}&sstarttime={$_G['gp_sstarttime']}&sendtime={$_G['gp_sendtime']}&cstarttime={$_G['gp_cstarttime']}&cendtime={$_G['gp_cendtime']}", 'succeed');
    }
} elseif ($operation == 'credit') {
    $defaultrank = array(1 => 4, 2 => 11, 3 => 41, 4 => 91, 5 => 151, 6 => 251, 7 => 501, 8 => 1001, 9 => 2001, 10 => 5001, 11 => 10001, 12 => 20001, 13 => 50001, 14 => 100001, 15 => 200001);
    if (!submitcheck('creditsubmit')) {
        $ec_credit = DB::result_first("SELECT svalue FROM " . DB::table('common_setting') . " WHERE skey='ec_credit'");
        $ec_credit = $ec_credit ? unserialize($ec_credit) : array('maxcreditspermonth' => '6', 'rank' => $defaultrank);
        shownav('extended', 'nav_ec');
        showsubmenu('nav_ec', array(array('nav_ec_config', 'setting&operation=ec', 0), array('nav_ec_tenpay', 'ec&operation=tenpay', 0), array('nav_ec_alipay', 'ec&operation=alipay', 0), array('nav_ec_credit', 'ec&operation=credit', 1), array('nav_ec_orders', 'ec&operation=orders', 0), array('nav_ec_tradelog', 'tradelog', 0), array('nav_ec_inviteorders', 'ec&operation=inviteorders', 0)));
        showtips('ec_credit_tips');
        showformheader('ec&operation=credit');
        showtableheader('ec_credit', 'nobottom');
        showsetting('ec_credit_maxcreditspermonth', 'ec_creditnew[maxcreditspermonth]', $ec_credit['maxcreditspermonth'], 'text');
        showtablefooter('</tbody>');
        showtableheader('ec_credit_rank', 'notop fixpadding');
        showsubtitle(array('ec_credit_rank', 'ec_credit_between', 'ec_credit_sellericon', 'ec_credit_buyericon'));
        foreach ($ec_credit['rank'] as $rank => $mincredits) {
            showtablerow('', '', array($rank, '<input type="text" class="txt" size="6" name="ec_creditnew[rank][' . $rank . ']" value="' . $mincredits . '" /> ~ ' . $ec_credit[rank][$rank + 1], "<img src=\"static/image/traderank/seller/{$rank}.gif\" border=\"0\">", "<img src=\"static/image/traderank/buyer/{$rank}.gif\" border=\"0\">"));
        }
        showsubmit('creditsubmit');
        showtablefooter();
        showformfooter();
    } else {
        $ec_creditnew = $_G['gp_ec_creditnew'];
        $ec_creditnew['maxcreditspermonth'] = intval($ec_creditnew['maxcreditspermonth']);
コード例 #25
0
    $_G['forum']['ismoderator'] = 1;
    foreach (C::t('forum_thread')->fetch_all_by_fid_cover_lastpost($fid, $cover, $starttime, $endtime, $current, $pertask) as $thread) {
        $processed = 1;
        $pid = C::t('forum_post')->fetch_threadpost_by_tid_invisible($thread['tid'], 0);
        $pid = $pid['pid'];
        setthreadcover($pid);
    }
    if ($processed) {
        cpmsg("{$lang['counter_thread_cover']}: " . cplang('counter_processing', array('current' => $current, 'next' => $next)), $nextlink, 'loading');
    } else {
        cpmsg('counter_thread_cover_succeed', 'action=counter', 'succeed');
    }
} else {
    shownav('tools', 'nav_updatecounters');
    showsubmenu('nav_updatecounters');
    showtips('counter_tips');
    showformheader('counter');
    showtableheader();
    showsubtitle(array('', 'counter_amount'));
    showhiddenfields(array('pertask' => ''));
    showtablerow('', array('class="td21"'), array("{$lang['counter_forum']}:", '<input name="pertask1" type="text" class="txt" value="15" /><input type="submit" class="btn" name="forumsubmit" onclick="this.form.pertask.value=this.form.pertask1.value" value="' . $lang['submit'] . '" />'));
    showtablerow('', array('class="td21"'), array("{$lang['counter_digest']}:", '<input name="pertask2" type="text" class="txt" value="1000" /><input type="submit" class="btn" name="digestsubmit" onclick="this.form.pertask.value=this.form.pertask2.value" value="' . $lang['submit'] . '" />'));
    showtablerow('', array('class="td21"'), array("{$lang['counter_member']}:", '<input name="pertask3" type="text" class="txt" value="1000" /><input type="submit" class="btn" name="membersubmit" onclick="this.form.pertask.value=this.form.pertask3.value" value="' . $lang['submit'] . '" />'));
    showtablerow('', array('class="td21"'), array("{$lang['counter_thread']}:", '<input name="pertask4" type="text" class="txt" value="500" /><input type="submit" class="btn" name="threadsubmit" onclick="this.form.pertask.value=this.form.pertask4.value" value="' . $lang['submit'] . '" />'));
    showtablerow('', array('class="td21"'), array("{$lang['counter_special']}:", '<input name="pertask7" type="text" class="txt" value="1" disabled/><input type="submit" class="btn" name="specialarrange" onclick="this.form.pertask.value=this.form.pertask7.value" value="' . $lang['submit'] . '" />'));
    showtablerow('', array('class="td21"'), array("{$lang['counter_groupnum']}:", '<input name="pertask8" type="text" class="txt" value="10" /><input type="submit" class="btn" name="groupnum" onclick="this.form.pertask.value=this.form.pertask8.value" value="' . $lang['submit'] . '" />'));
    showtablerow('', array('class="td21"'), array("{$lang['counter_groupmember_num']}:", '<input name="pertask9" type="text" class="txt" value="100" /><input type="submit" class="btn" name="groupmembernum" onclick="this.form.pertask.value=this.form.pertask9.value" value="' . $lang['submit'] . '" />'));
    showtablerow('', array('class="td21"'), array("{$lang['counter_groupmember_post']}:", '<input name="pertask10" type="text" class="txt" value="100" /><input type="submit" class="btn" name="groupmemberpost" onclick="this.form.pertask.value=this.form.pertask10.value" value="' . $lang['submit'] . '" />'));
    showtablerow('', array('class="td21"'), array("{$lang['counter_blog_replynum']}:", '<input name="pertask11" type="text" class="txt" value="100" /><input type="submit" class="btn" name="blogreplynum" onclick="this.form.pertask.value=this.form.pertask11.value" value="' . $lang['submit'] . '" />'));
    showtablerow('', array('class="td21"'), array("{$lang['counter_friendnum']}:", '<input name="pertask12" type="text" class="txt" value="100" /><input type="submit" class="btn" name="friendnum" onclick="this.form.pertask.value=this.form.pertask12.value" value="' . $lang['submit'] . '" />'));
    showtablerow('', array('class="td21"'), array("{$lang['counter_album_picnum']}:", '<input name="pertask13" type="text" class="txt" value="100" /><input type="submit" class="btn" name="albumpicnum" onclick="this.form.pertask.value=this.form.pertask13.value" value="' . $lang['submit'] . '" />'));
コード例 #26
0
 if (empty($grouplevel)) {
     cpmsg('group_level_noexist', 'action=group&operation=level', 'error');
 }
 if (!($group_creditspolicy = dunserialize($grouplevel['creditspolicy']))) {
     $group_creditspolicy = array();
 }
 if (!($group_postpolicy = dunserialize($grouplevel['postpolicy']))) {
     $group_postpolicy = array();
 }
 if (!($specialswitch = dunserialize($grouplevel['specialswitch']))) {
     $specialswitch = array();
 }
 if (!submitcheck('editgrouplevel')) {
     shownav('group', 'nav_group_level');
     showsubmenu('nav_group_level_editor');
     showtips('group_level_tips');
     showformheader('group&operation=level&levelid=' . $levelid, 'enctype');
     showtableheader();
     showtitle('groups_setting_basic');
     showsetting('group_level_title', 'levelnew[leveltitle]', $grouplevel['leveltitle'], 'text');
     if ($grouplevel['icon']) {
         $valueparse = parse_url($grouplevel['icon']);
         if (isset($valueparse['host'])) {
             $grouplevelicon = $grouplevel['icon'];
         } else {
             $grouplevelicon = $_G['setting']['attachurl'] . 'common/' . $grouplevel['icon'] . '?' . random(6);
         }
         $groupleveliconhtml = '<label><input type="checkbox" class="checkbox" name="deleteicon[{$grouplevel[levelid]}]" value="yes" /> ' . $lang['delete'] . '</label><br /><img src="' . $grouplevelicon . '" />';
     }
     showsetting('group_level_icon', 'iconnew', $grouplevel['icon'], 'filetext', '', 0, $groupleveliconhtml);
     showtitle('group_level_credits');
コード例 #27
0
 */
if (!defined('IN_DISCUZ') || !defined('IN_ADMINCP')) {
    exit('Access Denied');
}
cpheader();
$operation = in_array($operation, array('jscall', 'list', 'perm')) ? $operation : 'list';
shownav('portal', 'block');
loadcache('blockclass');
if ($operation == 'perm') {
    $bid = intval($_G['gp_bid']);
    if (!submitcheck('permsubmit')) {
        loadcache('diytemplatename');
        $block = DB::fetch_first('SELECT * FROM ' . DB::table('common_block') . " WHERE bid='{$bid}'");
        shownav('portal', 'block', 'block_perm');
        showsubmenu(cplang('block_perm_edit') . ' - ' . ($block['name'] ? $block['name'] : cplang('block_name_null')));
        showtips('block_perm_tips');
        showformheader("block&operation=perm&bid={$bid}");
        $inheritance_checked = !$block['notinherited'] ? 'checked' : '';
        showtableheader('<label><input class="checkbox" type="checkbox" name="inheritance" value="1" ' . $inheritance_checked . '/>' . cplang('block_perm_inheritance') . '</label>', 'fixpadding');
        showsubtitle(array('', 'username', '<input class="checkbox" type="checkbox" name="chkallmanage" onclick="checkAll(\'prefix\', this.form, \'allowmanage\', \'chkallmanage\')" id="chkallmanage" /><label for="chkallmanage">' . cplang('block_perm_manage') . '</label>', '<input class="checkbox" type="checkbox" name="chkallrecommend" onclick="checkAll(\'prefix\', this.form, \'allowrecommend\', \'chkallrecommend\')" id="chkallrecommend" /><label for="chkallrecommend">' . cplang('block_perm_recommend') . '</label>', '<input class="checkbox" type="checkbox" name="chkallneedverify" onclick="checkAll(\'prefix\', this.form, \'needverify\', \'chkallneedverify\')" id="chkallneedverify" /><label for="chkallneedverify">' . cplang('block_perm_needverify') . '</label>', 'block_perm_inherited'));
        $query = DB::query("SELECT m.username, cp.* FROM " . DB::table('common_member') . " m ," . DB::table('common_block_permission') . " cp WHERE cp.bid='{$bid}' AND cp.uid=m.uid ORDER BY inheritedtplname");
        $line = '&minus;';
        while ($value = DB::fetch($query)) {
            if (!empty($value['inheritedtplname'])) {
                showtablerow('', array('class="td25"'), array("", "{$value['username']}", $value['allowmanage'] ? '&radic;' : $line, $value['allowrecommend'] ? '&radic;' : $line, $value['needverify'] ? '&radic;' : $line, '<a href="' . ADMINSCRIPT . '?action=diytemplate&operation=perm&targettplname=' . $value['inheritedtplname'] . '">' . $_G['cache']['diytemplatename'][$value['inheritedtplname']] . '</a>'));
            } else {
                showtablerow('', array('class="td25"'), array("<input type=\"checkbox\" class=\"checkbox\" name=\"delete[{$value['uid']}]\" value=\"{$value['uid']}\" />\r\n\t\t\t\t\t<input type=\"hidden\" name=\"perm[{$value['uid']}][allowmanage]\" value=\"{$value['allowmanage']}\" />\r\n\t\t\t\t\t<input type=\"hidden\" name=\"perm[{$value['uid']}][allowrecommend]\" value=\"{$value['allowrecommend']}\" />\r\n\t\t\t\t\t<input type=\"hidden\" name=\"perm[{$value['uid']}][needverify]\" value=\"{$value['needverify']}\" />", "{$value['username']}", "<input type=\"checkbox\" class=\"checkbox\" name=\"allowmanage[{$value['uid']}]\" value=\"1\" " . ($value['allowmanage'] ? 'checked' : '') . ' />', "<input type=\"checkbox\" class=\"checkbox\" name=\"allowrecommend[{$value['uid']}]\" value=\"1\" " . ($value['allowrecommend'] ? 'checked' : '') . ' />', "<input type=\"checkbox\" class=\"checkbox\" name=\"needverify[{$value['uid']}]\" value=\"1\" " . ($value['needverify'] ? 'checked' : '') . ' />', $line));
            }
        }
        showtablerow('', array('class="td25"'), array(cplang('add_new'), '<input type="text" class="txt" name="newuser" value="" size="20" />', '<input type="checkbox" class="checkbox" name="newallowmanage" value="1" />', '<input type="checkbox" class="checkbox" name="newallowrecommend" value="1" />', '<input type="checkbox" class="checkbox" name="newneedverify" value="1" />', ''));
        showsubmit('permsubmit', 'submit', 'del');
コード例 #28
0
ファイル: edit.inc.php プロジェクト: pan289091315/Discuz
     case 'notice':
         showsubmenu('menu_list_' . $_GET['action'] . 'notice');
         break;
     case 'shop':
         if ($_GET['action'] == 'add') {
             showsubmenu('shop_add');
         } else {
             $shopmenu = array(array('shop_edit', 'edit&m=shop&itemid=' . $_GET['itemid'], '1'), array('menu_shop_theme', 'theme&m=shop&itemid=' . $_GET['itemid']), array('menu_modifypasswd', 'modifypasswd&m=shop&itemid=' . $_GET['itemid'], 0));
             if ($_G['setting']['enablemap'] == 1) {
                 array_push($shopmenu, array('menu_shop_map', 'map&m=shop&itemid=' . $_GET['itemid']));
             }
             showsubmenu('shop_edit', $shopmenu);
         }
         break;
 }
 showtips($mname . '_' . $_GET['action'] . '_tips');
 showformheader('edit&m=' . $mname, 'enctype');
 showtableheader();
 if ($_GET['action'] == 'add' && $mname == 'shop') {
     showusernamefield();
     //註冊顯示
 }
 if ($mname == 'shop') {
     $grouplist = getgrouplist();
     showsetting('shop_groupid', array('groupid', $grouplist), $editvalue['groupid'], 'select', '', '', '', '', '<span style="color:red">*</span>');
 }
 showbasicfield($mname, $editvalue, $_SSCONFIG, $categorylist);
 //顯示基本字段
 //讀取自定義字段
 foreach ($cacheinfo['columns'] as $value) {
     if ($mname == "groupbuy" && preg_match('/^user_|^ext_/', $value['fieldname'])) {
コード例 #29
0
ファイル: menu_setting.inc.php プロジェクト: lemonstory/bbs
$setting = C::t('common_setting')->fetch_all(array('wechatmenu'));
$setting = (array) unserialize($setting['wechatmenu']);
require_once DISCUZ_ROOT . './source/plugin/wechat/wechat.lib.class.php';
require_once DISCUZ_ROOT . './source/plugin/wechat/setting.class.php';
WeChatSetting::menu();
if (!$_G['wechat']['setting']['wechat_appId'] || !$_G['wechat']['setting']['wechat_appsecret']) {
    cpmsg(lang('plugin/wechat', 'wsq_menu_at_error'), '', 'error');
}
if (!submitcheck('menusubmit') && !submitcheck('pubsubmit')) {
    $wechat_client = new WeChatClient($_G['wechat']['setting']['wechat_appId'], $_G['wechat']['setting']['wechat_appsecret']);
    if (in_array('plugin', $_G['setting']['rewritestatus'])) {
        $url = $_G['siteurl'] . rewriteoutput('plugin', 1, 'wechat', 'access', '', 'op=access');
    } else {
        $url = $_G['siteurl'] . 'plugin.php?id=wechat:access';
    }
    showtips(lang('plugin/wechat', 'menu_tips', array('url' => $url)));
    showformheader('plugins&operation=config&do=' . $pluginid . '&identifier=wechat&pmod=menu_setting');
    showtableheader();
    echo '<tr class="header"><th class="td25"></th><th>' . $lang['display_order'] . '</th><th style="width:350px">' . lang('plugin/wechat', 'wsq_menu_name') . '</th><th>' . lang('plugin/wechat', 'wsq_menu_keyurl') . '</th></tr>';
    foreach ($setting['button'] as $k => $button) {
        $disabled = !empty($button['sub_button']) ? 'disabled' : '';
        showtablerow('', array('', 'class="td23 td28"', '', 'class="td29"'), array("<input class=\"checkbox\" type=\"checkbox\" name=\"button[{$k}][delete]\" value=\"yes\" {$disabled}>", "<input type=\"text\" class=\"txt\" size=\"3\" name=\"button[{$k}][displayorder]\" value=\"{$button['displayorder']}\">", "<div class=\"parentnode\"><input type=\"text\" class=\"txt\" size=\"30\" name=\"button[{$k}][name]\" value=\"" . dhtmlspecialchars($button['name']) . "\"></div>", "<input type=\"text\" class=\"txt\" size=\"30\" name=\"button[{$k}][keyurl]\" value=\"" . dhtmlspecialchars($button['keyurl']) . "\">"));
        if (!empty($button['sub_button'])) {
            foreach ($button['sub_button'] as $sk => $sub_button) {
                showtablerow('', array('', 'class="td23 td28"', '', 'class="td29"'), array("<input class=\"checkbox\" type=\"checkbox\" name=\"button[{$k}][sub_button][{$sk}][delete]\" value=\"yes\">", "<input type=\"text\" class=\"txt\" size=\"3\" name=\"button[{$k}][sub_button][{$sk}][displayorder]\" value=\"{$sub_button['displayorder']}\">", "<div class=\"node\"><input type=\"text\" class=\"txt\" size=\"30\" name=\"button[{$k}][sub_button][{$sk}][name]\" value=\"" . dhtmlspecialchars($sub_button['name']) . "\"></div>", "<input type=\"text\" class=\"txt\" size=\"30\" name=\"button[{$k}][sub_button][{$sk}][keyurl]\" value=\"" . dhtmlspecialchars($sub_button['keyurl']) . "\">"));
            }
        }
        echo '<tr><td></td><td></td><td colspan="2"><div class="lastnode"><a href="###" onclick="addrow(this, 1, ' . $k . ')" class="addtr">' . lang('plugin/wechat', 'wsq_menu_sub_button') . '</a></div></td></tr>';
    }
    echo '<tr><td></td><td class="td23 td28"></td><td colspan="2"><div><a href="###" onclick="addrow(this, 0, 0)" class="addtr">' . lang('plugin/wechat', 'wsq_menu_button') . '</a></div></td></tr>';
    echo <<<EOT
コード例 #30
0
ファイル: do_setting.inc.php プロジェクト: tanxiniao/bce
<?php

/**
 * DiscuzX Convert
 *
 * $Id: do_setting.inc.php 10469 2010-05-11 09:12:14Z monkey $
 */
showtips('setting_tips');
$sfile = DISCUZ_ROOT . './source/' . $source . '/setting.ini';
if (!submitcheck('submit')) {
    show_form_header();
    show_table_header();
    show_table_row(array(array('colspan="3"', '编辑配置文件 source/' . $source . '/setting.ini')), 'title');
    foreach ($setting as $key => $value) {
        if (is_array($value) && !empty($value)) {
            show_table_row(array(array('colspan="3" align="left"', '<strong>[' . $key . ']<strong>')), 'bg1');
            $disabled = in_array($key, array('program', 'config', 'steps', 'start', 'tablecheck')) ? ' disabled readonly' : '';
            foreach ($value as $k => $v) {
                show_table_row(array(lang($k), array('class="bg2" width="70%"', '<input type="text" size="40" name="newsetting[' . $key . '][' . $k . ']" value="' . htmlspecialchars($v) . '"' . $disabled . '>' . ($disabled ? ' 只读' : ''))), 'bg2');
            }
        }
    }
    show_table_footer();
    show_form_footer('submit', lang('submit'));
} else {
    $newsetting = getgpc('newsetting');
    if (is_array($newsetting)) {
        $lines = file($sfile);
        foreach ($lines as $num => $line) {
            $lines[$num] = $line = trim($line);
            $check = substr($line, 0, 1);