function admincp_show_simple($setting)
 {
     $setting['startTime'] = $setting['startTime'] ? dgmdate($setting['startTime'], 'd') : '';
     $setting['endTime'] = $setting['endTime'] ? dgmdate($setting['endTime'], 'd') : '';
     $setting['getCountLimit'] = intval($setting['getCountLimit']);
     showsetting('上线时间(日期):', 'startTime', $setting['startTime'], 'calendar', '', '', '勋章开始领取时间,留空表示立即开始');
     showsetting('下线时间(日期):', 'endTime', $setting['endTime'], 'calendar', '', '', '结束后会员将无法领取/申请此勋章,留空表示不限制');
     showsetting('获取人次上限', 'getCountLimit', $setting['getCountLimit'], 'number', '', '', '当领取的人次达到这个数值时,系统将自动拒绝新的领取,0 或留空为不限制。(注:此选项仅对自动发放有效!)');
 }
 /**
  * 设置时显示的内容(直接在函数中输出即可)
  * 此函数先于 admincp_show 调用,一般用于显示无需采用独立table的设置项
  * @param <array> $setting 传入admincp_save方法中保存的信息
  */
 function admincp_show_simple($setting)
 {
     global $_G, $lang;
     $var = array();
     $var['value'] = $setting['ppercon'];
     $var['type'] = '<input name="month_sign" value="' . $var['value'] . '" type="number" class="txt">';
     showsetting('每日签到-月签到次数', '', '', $var['type'], '', '', '允许连续签到到达设置的用户领取勋章。');
     $var2 = array();
     $var2['value'] = $setting['pperaddup'];
     $var2['type'] = '<input name="all_sign" value="' . $var2['value'] . '" type="number" class="txt">';
     showsetting('每日签到-总签到次数', '', '', $var2['type'], '', '', '允许累计签到到达设置的用户领取勋章。');
 }
 function admincp_show_simple($setting)
 {
     global $medalid;
     $setting['preMedalid'] = intval($setting['preMedalid']);
     $varname = array('preMedalid', array());
     $varname[1][] = array(0, '无限制');
     $query = DB::query("SELECT medalid, name FROM " . DB::table('forum_medal') . " ORDER BY displayorder");
     while ($medal = DB::fetch($query)) {
         if ($medalid != $medal['medalid']) {
             $varname[1][] = array($medal['medalid'], $medal['name']);
         }
     }
     showsetting('拥有勋章', $varname, $setting['preMedalid'], 'select', '', '', '在领取此勋章前需要拥有的勋章');
 }
 function admincp_show_simple($setting)
 {
     global $_G, $lang, $medal;
     $medal['permission'] = is_array($medal['permission']) ? $medal['permission'] : unserialize($medal['permission']);
     $medal['usergroups'] = (array) $medal['permission']['usergroups'];
     $var = array();
     $var['value'] = $medal['usergroups'] ? $medal['usergroups'] : $setting['usergroup'];
     $query = DB::query("SELECT type, groupid, grouptitle, radminid FROM " . DB::table('common_usergroup') . " ORDER BY (creditshigher<>'0' || creditslower<>'0'), creditslower, groupid");
     $groupselect = array();
     while ($group = DB::fetch($query)) {
         $group['type'] = $group['type'] == 'special' && $group['radminid'] ? 'specialadmin' : $group['type'];
         $groupselect[$group['type']] .= '<option value="' . $group['groupid'] . '"' . (@in_array($group['groupid'], $var['value']) ? ' selected' : '') . '>' . $group['grouptitle'] . '</option>';
     }
     $var['type'] = '<select name="usergroup[]" size="10" multiple="multiple"><option value=""' . (@in_array('', $var['value']) ? ' selected' : '') . '>' . cplang('plugins_empty') . '</option>';
     $var['type'] .= '<optgroup label="' . $lang['usergroups_member'] . '">' . $groupselect['member'] . '</optgroup>' . ($groupselect['special'] ? '<optgroup label="' . $lang['usergroups_special'] . '">' . $groupselect['special'] . '</optgroup>' : '') . ($groupselect['specialadmin'] ? '<optgroup label="' . $lang['usergroups_specialadmin'] . '">' . $groupselect['specialadmin'] . '</optgroup>' : '') . '<optgroup label="' . $lang['usergroups_system'] . '">' . $groupselect['system'] . '</optgroup></select>';
     showsetting('用户组', '', '', $var['type'], '', '', '允许领取勋章的用户组,留空代表不限制');
 }
Example #5
0
}
</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>");
    $selected[$type] = $type ? 'selected="selected"' : '';
    showsetting('share_search_icon', '', $type, "<select name='type'><option value=''>{$lang['all']}</option><option value='link' {$selected['link']}>{$lang['link']}</option>\r\n\t\t\t<option value='video' {$selected['video']}>{$lang['video']}</option><option value='music' {$selected['music']}>{$lang['music']}</option><option value='flash' {$selected['flash']}>Flash</option>\r\n\t\t\t<option value='blog' {$selected['blog']}>{$lang['blogs']}</option><option value='album' {$selected['album']}>{$lang['albums']}</option><option value='pic' {$selected['pic']}>{$lang['pics']}</option>\r\n\t\t\t<option value='space' {$selected['space']}>{$lang['members']}</option><option value='thread' {$selected['thread']}>{$lang['thread']}</option></select>");
    showsetting('share_search_uid', 'uid', $uid, 'text');
    showsetting('share_search_user', 'users', $users, 'text');
    showsetting('share_search_sid', 'sid', $sid, 'text');
    showsetting('share_search_hot', array('hot1', 'hot2'), array('', ''), 'range');
    showsetting('share_search_time', array('starttime', 'endtime'), array($starttime, $endtime), 'daterange');
    showsubmit('searchsubmit');
    showtablefooter();
    showformfooter();
    showtagfooter('div');
} else {
    $sids = authcode($sids, 'DECODE');
    $sidsadd = $sids ? explode(',', $sids) : $_G['gp_delete'];
    include_once libfile('function/delete');
    $deletecount = count(deleteshares($sidsadd));
    $cpmsg = cplang('share_succeed', array('deletecount' => $deletecount));
    ?>
<script type="text/JavaScript">alert('<?php 
    echo $cpmsg;
    ?>
');parent.$('shareforum').searchsubmit.click();</script>
Example #6
0
function showportalprimaltemplate($pritplname, $type)
{
    include_once libfile('function/portalcp');
    $tpls = array('./template/default:portal/' . $type => getprimaltplname('portal/' . $type . '.htm'));
    foreach ($alltemplate = C::t('common_template')->range() as $template) {
        if ($dir = dir(DISCUZ_ROOT . $template['directory'] . '/portal/')) {
            while (false !== ($file = $dir->read())) {
                $file = strtolower($file);
                if (fileext($file) == 'htm' && substr($file, 0, strlen($type) + 1) == $type . '_') {
                    $key = $template['directory'] . ':portal/' . str_replace('.htm', '', $file);
                    $tpls[$key] = getprimaltplname($template['directory'] . ':portal/' . $file);
                }
            }
        }
    }
    foreach ($tpls as $key => $value) {
        echo "<input name=signs[{$type}][" . dsign($key) . "] value='1' type='hidden' />";
    }
    $pritplvalue = '';
    if (empty($pritplname)) {
        $pritplhide = '';
        $pritplvalue = ' style="display:none;"';
    } else {
        $pritplhide = ' style="display:none;"';
    }
    $catetplselect = '<span' . $pritplhide . '><select id="' . $type . 'select" name="' . $type . 'primaltplname">';
    $selectedvalue = '';
    if ($type == 'view') {
        $catetplselect .= '<option value="">' . cplang('portalcategory_inheritupsetting') . '</option>';
    }
    foreach ($tpls as $k => $v) {
        if ($pritplname === $k) {
            $selectedvalue = $k;
            $selected = ' selected';
        } else {
            $selected = '';
        }
        $catetplselect .= '<option value="' . $k . '"' . $selected . '>' . $v . '</option>';
    }
    $pritplophide = !empty($pritplname) ? '' : ' style="display:none;"';
    $catetplselect .= '</select> <a href="javascript:;"' . $pritplophide . ' onclick="$(\'' . $type . 'select\').value=\'' . $selectedvalue . '\';$(\'' . $type . 'select\').parentNode.style.display=\'none\';$(\'' . $type . 'value\').style.display=\'\';">' . cplang('cancel') . '</a></span>';
    if (empty($pritplname)) {
        showsetting('portalcategory_' . $type . 'primaltplname', '', '', $catetplselect);
    } else {
        $tplname = getprimaltplname($pritplname . '.htm');
        $html = '<span id="' . $type . 'value" ' . $pritplvalue . '> ' . $tplname . '<a href="javascript:;" onclick="$(\'' . $type . 'select\').parentNode.style.display=\'\';$(\'' . $type . 'value\').style.display=\'none\';"> ' . cplang('modify') . '</a></span>';
        showsetting('portalcategory_' . $type . 'primaltplname', '', '', $catetplselect . $html);
    }
}
Example #7
0
    showsubmenu($menustr);
    showtableheader('', 'nobottom');
    $typeclass = array(1, 2);
    showtablerow('', array(), array(shownavmenu($type, $typeclass, $langs)));
    showtablefooter();
    showformheader($thisurl . '&type=' . $type, 'enctype');
    showtableheader($langs['slide'], 'nobottom');
    for ($j = 1; $j < 6; $j++) {
        $grouplogohtml = '';
        $pic = '';
        if ($result['pic' . $j]) {
            $pic = $result['pic' . $j];
            $grouplogohtml = '<label>' . $langs['slideimgtip'] . '<br /><img src="' . fiximage($pic) . '?' . random(6) . '" width="400" height="100" />';
        }
        showsetting($langs['slide_img'] . $j, 'pic' . $j, $pic, 'filetext', '', 0, $grouplogohtml);
        showsetting($langs['slide_link'] . $j, 'movie' . $j, $result['movie' . $j], 'text');
    }
    showsubmit('submit');
    showtablefooter();
    showformfooter();
}
function shownavmenu($type, $typeclass, $langs)
{
    $result = '<ul class="tab1">';
    $typelist = array();
    $typelist[$type] = ' class="current"';
    foreach ($typeclass as $key => $value) {
        $result .= '<li' . $typelist[$value] . '><a href="' . ADMINSCRIPT . '?action=plugins&operation=config&act=slide&identifier=sanree_brand&pmod=admincp&type=' . $value . '"><span>' . $langs['slide' . $value] . '</span></a></li>';
    }
    $result .= '</ul>';
    return $result;
Example #8
0
        if ($imagesizes) {
            $v = $adv['parameters']['width'] . 'x' . $adv['parameters']['height'];
            showsetting('adv_edit_style_image_size', '', '', '<select onchange="setsize(this.value, \'image\')"><option value="x">' . cplang('adv_edit_style_custom') . '</option>' . str_replace('"' . $v . '"', '"' . $v . '" selected="selected"', $imagesizes) . '</select>');
        }
        showsetting('adv_edit_style_image_width', 'advnew[image][width]', $adv['parameters']['width'], 'text', '', 0, '', 'id="imagewidth" onchange="setpreview(\'image\')"');
        showsetting('adv_edit_style_image_height', 'advnew[image][height]', $adv['parameters']['height'], 'text', '', 0, '', 'id="imageheight" onchange="setpreview(\'image\')"');
        showtagfooter('tbody');
        showtagheader('tbody', 'style_flash', $adv['parameters']['style'] == 'flash');
        showtitle('adv_edit_style_flash');
        showsetting('adv_edit_style_flash_url', 'advnewflash', $adv['parameters']['url'], 'filetext');
        if ($imagesizes) {
            $v = $adv['parameters']['flash'] . 'x' . $adv['parameters']['flash'];
            showsetting('adv_edit_style_flash_size', '', '', '<select onchange="setsize(this.value, \'flash\')"><option>' . cplang('adv_edit_style_custom') . '</option>' . str_replace('"' . $v . '"', '"' . $v . '" selected="selected"', $imagesizes) . '</select>');
        }
        showsetting('adv_edit_style_flash_width', 'advnew[flash][width]', $adv['parameters']['width'], 'text', '', 0, '', 'id="flashwidth" onchange="setpreview(\'flash\')"');
        showsetting('adv_edit_style_flash_height', 'advnew[flash][height]', $adv['parameters']['height'], 'text', '', 0, '', 'id="flashheight" onchange="setpreview(\'flash\')"');
        showtagfooter('tbody');
        echo '<tr><td colspan="2">';
        if ($operation == 'edit') {
            echo '<input id="previewbtn" type="button" class="btn" onclick="$(\'advpreview\').style.display=\'\';this.form.preview.value=1;this.form.target=\'preview\';this.form.submit();" name="jspreview" value="' . $lang['preview'] . '">&nbsp; &nbsp;';
        }
        echo '<input type="submit" class="btn" name="advsubmit" onclick="this.form.preview.value=0;this.form.target=\'\'" value="' . $lang['submit'] . '"><input name="preview" type="hidden" value="0"></td></tr>';
        showtablefooter();
        showtableheader();
        echo '<tr><td colspan="2" id="imagesizepreviewtd" style="border:0"><div id="imagesizepreview" style="display:none;border:1px dotted gray"></div></td></tr>';
        echo '<tr><td colspan="2" id="flashsizepreviewtd" style="border:0"><div id="flashsizepreview" style="display:none;border:1px dotted gray"></div></td></tr>';
        showtablefooter();
        showformfooter();
        echo '<script type="text/JavaScript">
		function setsize(v, o) {
			if(v) {
Example #9
0
     require_once libfile('task/' . $task['scriptname'], 'class');
     $taskclass = 'task_' . $task['scriptname'];
     $taskcv = new $taskclass();
     if ($taskvars['complete']) {
         foreach ($taskvars['complete'] as $taskvar) {
             $taskcvar = $taskcv->conditions[$taskvar['variable']];
             if (is_array($taskcvar['value'])) {
                 foreach ($taskcvar['value'] as $k => $v) {
                     $taskcvar['value'][$k][1] = lang('task/' . $task['scriptname'], $taskcvar['value'][$k][1]);
                 }
             }
             $varname = in_array($taskvar['type'], array('mradio', 'mcheckbox', 'select', 'mselect')) ? $taskvar['type'] == 'mselect' ? array($taskvar['variable'] . '[]', $taskcvar['value']) : array($taskvar['variable'], $taskcvar['value']) : $taskvar['variable'];
             if (in_array($taskvar['type'], array('mcheckbox', 'mselect'))) {
                 $taskvar['value'] = unserialize($taskvar['value']);
             }
             showsetting($taskvar['name'], $varname, $taskvar['value'], $taskvar['type'], '', 0, $taskvar['description']);
         }
     } else {
         showtablerow('', 'class="td27" colspan="2"', cplang('nolimit'));
     }
     showsubmit('editsubmit', 'submit');
     showtablefooter();
     showformfooter();
 } else {
     $applyperm = $_G['gp_grouplimit'] == 'special' && is_array($_G['gp_applyperm']) ? implode("\t", $_G['gp_applyperm']) : $_G['gp_grouplimit'];
     $_G['gp_starttime'] = dmktime($_G['gp_starttime']);
     $_G['gp_endtime'] = dmktime($_G['gp_endtime']);
     $reward = $_G['gp_reward'];
     $prize = $_G['gp_prize_' . $reward];
     $bonus = $_G['gp_bonus_' . $reward];
     if (!$_G['gp_name'] || !$_G['gp_description']) {
Example #10
0
 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');
 if (submitcheck('searchsubmit')) {
     require_once DISCUZ_ROOT . './include/attachment.func.php';
     $sql = "a.pid=p.pid";
     $ppp = 100;
     if ($inforum != 'all') {
         $inforum = intval($inforum);
     }
     $sql .= is_numeric($inforum) ? " AND p.fid='{$inforum}'" : '';
     $sql .= $daysold ? " AND p.dateline<='" . ($timestamp - 86400 * $daysold) . "'" : '';
     $sql .= $author ? " AND p.author='{$author}'" : '';
     $sql .= $filename ? " AND a.filename LIKE '%{$filename}%'" : '';
function shownewsletter()
{
    global $lang;
    showtableheader();
    showsetting('members_newsletter_subject', 'subject', '', 'text');
    showsetting('members_newsletter_message', 'message', '', 'textarea');
    if ($_GET['do'] == 'mobile') {
        showsetting('members_newsletter_system', 'system', 0, 'radio');
        showhiddenfields(array('notifymembers' => 'mobile'));
    } else {
        showsetting('members_newsletter_method', array('notifymembers', array(array('email', $lang['email'], array('pmextra' => 'none', 'posttype' => '')), array('notice', $lang['notice'], array('pmextra' => 'none', 'posttype' => '')), array('pm', $lang['grouppm'], array('pmextra' => '', 'posttype' => 'none')))), 'pm', 'mradio');
        showtagheader('tbody', 'posttype', '', 'sub');
        showsetting('members_newsletter_posttype', array('posttype', array(array(0, cplang('members_newsletter_posttype_text')), array(1, cplang('members_newsletter_posttype_html'))), TRUE), '0', 'mradio');
        showtagfooter('tbody');
        showtagheader('tbody', 'pmextra', true, 'sub');
        showsetting('members_newsletter_system', 'system', 0, 'radio');
        showtagfooter('tbody');
    }
    showsetting('members_newsletter_num', 'pertask', 100, 'text');
    showtablefooter();
}
Example #12
0
     if ($operate_type == 'delete') {
         require_once libfile('function/delete');
         foreach ($ctidarray as $ctid) {
             deletecollection($ctid);
         }
     }
     cpmsg('collection_admin_updated', 'action=collection&operation=admin&searchsubmit=yes&perpage=' . $_GET['perpage'] . '&page=' . $_GET['page'], 'succeed');
 }
 if (!submitcheck('searchsubmit', 1)) {
     showformheader('collection&operation=admin');
     showtableheader();
     showsetting('collection_name', 'collection_name', $collection_name, 'text');
     showsetting('collection_ctid', 'collection_ctid', $collection_ctid, 'text');
     showsetting('collection_username', 'collection_username', $collection_username, 'text');
     showsetting('collection_uid', 'collection_uid', $collection_uid, 'text');
     showsetting('feed_search_perpage', '', $_GET['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>");
     showsubmit('searchsubmit');
     showtablefooter();
     showformfooter();
     showtagfooter('div');
 } else {
     $collection_name = trim($_GET['collection_name']);
     $collection_ctid = dintval($_GET['collection_ctid']);
     $collection_username = trim($_GET['collection_username']);
     $collection_uid = dintval($_GET['collection_uid']);
     $ppp = $_GET['perpage'];
     $startlimit = ($page - 1) * $ppp;
     $multipage = '';
     $totalcount = C::t('forum_collection')->fetch_all_for_search($collection_name, $collection_ctid, $collection_username, $collection_uid, -1);
     $multipage = multi($totalcount, $ppp, $page, ADMINSCRIPT . "?action=collection&operation=admin&searchsubmit=yes&collection_name={$collection_name}&collection_ctid={$collection_ctid}&collection_username={$collection_username}&collection_uid={$collection_uid}&perpage={$ppp}&status={$status}");
     $collection = C::t('forum_collection')->fetch_all_for_search($collection_name, $collection_ctid, $collection_username, $collection_uid, $startlimit, $ppp);
Example #13
0
 if ($_GET['op'] == 'edit') {
     showsetting('category_note', 'note', $categorylist[$_GET['catid']]['note'], 'text');
 }
 if ($_GET['op'] == 'edit') {
     showsetting('category_displayorder', 'displayorder', $categorylist[$_GET['catid']]['displayorder'], 'number');
 }
 if ($type == 'shop' && $_GET['upid'] == 0 && $_G['setting']['commentmodel'] == 1) {
     $model = !empty($categorylist[$_GET['catid']]['cmid']) ? 1 : 0;
     $query = DB::query('SELECT * FROM ' . tname('commentmodels') . ' ORDER BY cmid ASC');
     while ($commentmodel = DB::fetch($query)) {
         foreach (unserialize($commentmodel['scorename']) as $scorename) {
             $commentmodel['scorenamestr'] .= '[' . $scorename . ']';
         }
         $commentmodelarr[] = $commentmodel;
     }
     showsetting('category_model', array('commtmodel', array(array(1, lang('yes'), array('catmodel' => '')), array(0, lang('no'), array('catmodel' => 'none'))), true), $model, 'mradio');
     showtagheader('tbody', 'catmodel', $model, 'sub');
     echo "<tr><td colspan='2'>";
     if (!empty($commentmodelarr)) {
         echo "<table width='800' style='margin:10px;'>";
         showsubtitle(array('', 'modelname', 'scorename', 'cmdateline'));
         foreach ($commentmodelarr as $value) {
             $checked = $value['cmid'] == $categorylist[$_GET['catid']]['cmid'] ? 'checked' : '';
             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');
Example #14
0
        }
        echo '<form method="post" action="admincp.php?action=jswizard&function=custom#' . $lang['jswizard_custom'] . '">';
        showtype('jswizard_jstemplate', 'top');
        echo '<tr><td class="altbg1" colspan="2">' . $lang['jswizard_custom_jstemplate_comment'] . '<br />';
        echo '<img src="images/admincp/zoomin.gif" onmouseover="this.style.cursor=\'pointer\'" onclick="zoomtextarea(\'jstemplate\', 1)"> <img src="images/admincp/zoomout.gif" onmouseover="this.style.cursor=\'pointer\'" onclick="zoomtextarea(\'jstemplate\', 0)"><br />';
        jsinsertunit();
        echo '<textarea cols="100" rows="5" id="jstemplate" name="parameter[jstemplate]" style="width: 95%;">' . ($parameter['jstemplate'] != '' ? stripslashes($parameter['jstemplate']) : '') . '</textarea></td></tr>';
        showtype('', 'bottom');
        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>
Example #15
0
    ajaxshowheader();
    echo '
		<h3 class="flb" id="fctrl_showblock" style="cursor: move;">
			<em id="return_showblock" fwin="showblock">' . $lang['cloud_doctor_setidkey'] . '</em>
			<span><a title="' . $lang['close'] . '" onclick="hideWindow(\'cloudApiIpWin\');return false;" class="flbc" href="javascript:;">' . $lang['close'] . '</a></span>
		</h3>
		';
    echo '<div style="margin: 0 10px; width: 700px;">';
    showtips('cloud_doctor_setidkey_tips');
    showformheader('cloud');
    showhiddenfields(array('operation' => $operation));
    showhiddenfields(array('op' => $op));
    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);
Example #16
0
                 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'])) {
         continue;
     }
     if ($mname == "good" && $value['fieldname'] == "intro") {
         continue;
     }
     $temparr = $temparr2 = array();
     $other = $required = $value['required'] = '';
     if ($value['formtype'] == 'select') {
         $temparr2 = array('' => '');
Example #17
0
    }
} 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();
        showformfooter();
    } else {
        $settings = $_GET['settingnew'];
        $settings['allowspacedomain'] = (double) $settings['allowspacedomain'];
        $settings['allowgroupdomain'] = (double) $settings['allowgroupdomain'];
        if ($settings) {
            C::t('common_setting')->update_batch($settings);
            updatecache('setting');
        }
        cpmsg('setting_update_succeed', 'action=domain', 'succeed');
    }
}
function showsearchform($operation = '')
{
    global $_G, $lang;
    $groupselect = array();
    $usergroupid = isset($_G['gp_usergroupid']) && is_array($_G['gp_usergroupid']) ? $_G['gp_usergroupid'] : array();
    $query = DB::query("SELECT type, groupid, grouptitle, radminid FROM " . DB::table('common_usergroup') . " WHERE groupid NOT IN ('6', '7') ORDER BY (creditshigher<>'0' || creditslower<>'0'), creditslower, groupid");
    while ($group = DB::fetch($query)) {
        $group['type'] = $group['type'] == 'special' && $group['radminid'] ? 'specialadmin' : $group['type'];
        $groupselect[$group['type']] .= "<option value=\"{$group['groupid']}\" " . (in_array($group['groupid'], $usergroupid) ? 'selected' : '') . ">{$group['grouptitle']}</option>\n";
    }
    $groupselect = '<optgroup label="' . $lang['usergroups_member'] . '">' . $groupselect['member'] . '</optgroup>' . ($groupselect['special'] ? '<optgroup label="' . $lang['usergroups_special'] . '">' . $groupselect['special'] . '</optgroup>' : '') . ($groupselect['specialadmin'] ? '<optgroup label="' . $lang['usergroups_specialadmin'] . '">' . $groupselect['specialadmin'] . '</optgroup>' : '') . '<optgroup label="' . $lang['usergroups_system'] . '">' . $groupselect['system'] . '</optgroup>';
    showtagheader('div', 'searchmembers', !$_G['gp_submit']);
    echo '<script src="static/js/calendar.js" type="text/javascript"></script>';
    echo '<style type="text/css">#residedistrictbox select, #birthdistrictbox select{width: auto;}</style>';
    showformheader("plugins&operation=config&do=" . $_G['gp_do'] . "&identifier=smstong&pmod=sendsms", "onSubmit=\"if(\$('updatecredittype1') && \$('updatecredittype1').checked && !window.confirm('{$lang['members_reward_clean_alarm']}')){return false;} else {return true;}\"");
    showtableheader();
    showsetting('members_search_user', 'username', $_G['gp_username'], 'text');
    showsetting('members_search_uid', 'uid', $_G['gp_uid'], 'text');
    showsetting('members_search_group', '', '', '<select name="groupid[]" multiple="multiple" size="10">' . $groupselect . '</select>');
    showtablefooter();
    showtableheader();
    $_G['showsetting_multirow'] = 1;
    showtagheader('tbody', 'advanceoption');
    if (!empty($_G['setting']['connect']['allow'])) {
        showsetting('members_search_conisbind', array('conisbind', array(array(1, $lang['yes']), array(0, $lang['no'])), 1), $_G['gp_conisbind'], 'mradio');
        showsetting('members_search_uinblacklist', array('uin_low', array(array(1, $lang['yes']), array(0, $lang['no'])), 1), $_G['gp_uin_low'], 'mradio');
    }
    showsetting('members_search_online', array('sid_noempty', array(array(1, $lang['yes']), array(0, $lang['no'])), 1), $_G['gp_online'], 'mradio');
    showsetting('members_search_lockstatus', array('status', array(array(-1, $lang['yes']), array(0, $lang['no'])), 1), $_G['gp_status'], 'mradio');
    showsetting('members_search_emailstatus', array('emailstatus', array(array(1, $lang['yes']), array(0, $lang['no'])), 1), $_G['gp_emailstatus'], 'mradio');
    showsetting('members_search_avatarstatus', array('avatarstatus', array(array(1, $lang['yes']), array(0, $lang['no'])), 1), $_G['gp_avatarstatus'], 'mradio');
    showsetting('members_search_email', 'email', $_G['gp_email'], 'text');
    showsetting("{$lang['credits']} {$lang['members_search_between']}", array("credits_low", "credits_high"), array($_G['gp_credits_low'], $_G['gp_credtis_high']), 'range');
    if (!empty($_G['setting']['extcredits'])) {
        foreach ($_G['setting']['extcredits'] as $id => $credit) {
            showsetting("{$credit['title']} {$lang['members_search_between']}", array("extcredits{$id}" . "_low", "extcredits{$id}" . "_high"), array($_G['gp_extcredits' . $id . '_low'], $_G['gp_extcredits' . $id . '_high']), 'range');
        }
    }
    showsetting('members_search_friendsrange', array('friends_low', 'friends_high'), array($_G['gp_friends_low'], $_G['gp_friends_high']), 'range');
    showsetting('members_search_postsrange', array('posts_low', 'posts_high'), array($_G['gp_posts_low'], $_G['gp_posts_high']), 'range');
    showsetting('members_search_regip', 'regip', $_G['gp_regip'], 'text');
    showsetting('members_search_lastip', 'lastip', $_G['gp_lastip'], 'text');
    showsetting('members_search_regdaterange', array('regdate_after', 'regdate_before'), array($_G['gp_regdate_after'], $_G['gp_regdate_before']), 'daterange');
    showsetting('members_search_lastvisitrange', array('lastvisit_after', 'lastvisit_before'), array($_G['gp_lastvisit_after'], $_G['gp_lastvisit_before']), 'daterange');
    showsetting('members_search_lastpostrange', array('lastpost_after', 'lastpost_before'), array($_G['gp_lastpost_after'], $_G['gp_lastpost_before']), 'daterange');
    showsetting('members_search_group_fid', 'fid', $_G['gp_fid'], 'text');
    if ($_G['setting']['verify']) {
        $verifydata = array();
        foreach ($_G['setting']['verify'] as $key => $value) {
            if ($value['available']) {
                $verifydata[] = array('verify' . $key, $value['title']);
            }
        }
        if (!empty($verifydata)) {
            showsetting('members_search_verify', array('verify', $verifydata), $_G['gp_verify'], 'mcheckbox');
        }
    }
    $yearselect = $monthselect = $dayselect = "<option value=\"\">" . cplang('nolimit') . "</option>\n";
    $yy = dgmdate(TIMESTAMP, 'Y');
    for ($y = $yy; $y >= $yy - 100; $y--) {
        $y = sprintf("%04d", $y);
        $yearselect .= "<option value=\"{$y}\" " . ($_G['gp_birthyear'] == $y ? 'selected' : '') . ">{$y}</option>\n";
    }
    for ($m = 1; $m <= 12; $m++) {
        $m = sprintf("%02d", $m);
        $monthselect .= "<option value=\"{$m}\" " . ($_G['gp_birthmonth'] == $m ? 'selected' : '') . ">{$m}</option>\n";
    }
    for ($d = 1; $d <= 31; $d++) {
        $d = sprintf("%02d", $d);
        $dayselect .= "<option value=\"{$d}\" " . ($_G['gp_birthday'] == $d ? 'selected' : '') . ">{$d}</option>\n";
    }
    showsetting('members_search_birthday', '', '', '<select class="txt" name="birthyear" style="width:75px; margin-right:0">' . $yearselect . '</select> ' . $lang['year'] . ' <select class="txt" name="birthmonth" style="width:75px; margin-right:0">' . $monthselect . '</select> ' . $lang['month'] . ' <select class="txt" name="birthday" style="width:75px; margin-right:0">' . $dayselect . '</select> ' . $lang['day']);
    loadcache('profilesetting');
    unset($_G['cache']['profilesetting']['uid']);
    unset($_G['cache']['profilesetting']['birthyear']);
    unset($_G['cache']['profilesetting']['birthmonth']);
    unset($_G['cache']['profilesetting']['birthday']);
    require_once libfile('function/profile');
    foreach ($_G['cache']['profilesetting'] as $fieldid => $value) {
        if (!$value['available'] || in_array($fieldid, array('birthprovince', 'birthdist', 'birthcommunity', 'resideprovince', 'residedist', 'residecommunity'))) {
            continue;
        }
        if ($fieldid == 'gender') {
            $select = "<option value=\"\">" . cplang('nolimit') . "</option>\n";
            $select .= "<option value=\"0\">" . cplang('members_edit_gender_secret') . "</option>\n";
            $select .= "<option value=\"1\">" . cplang('members_edit_gender_male') . "</option>\n";
            $select .= "<option value=\"2\">" . cplang('members_edit_gender_female') . "</option>\n";
            showsetting($value['title'], '', '', '<select class="txt" name="gender">' . $select . '</select>');
        } elseif ($fieldid == 'birthcity') {
            $elems = array('birthprovince', 'birthcity', 'birthdist', 'birthcommunity');
            showsetting($value['title'], '', '', '<div id="birthdistrictbox">' . showdistrict(array(0, 0, 0, 0), $elems, 'birthdistrictbox', 1) . '</div>');
        } elseif ($fieldid == 'residecity') {
            $elems = array('resideprovince', 'residecity', 'residedist', 'residecommunity');
            showsetting($value['title'], '', '', '<div id="residedistrictbox">' . showdistrict(array(0, 0, 0, 0), $elems, 'residedistrictbox', 1) . '</div>');
        } elseif ($fieldid == 'constellation') {
            $select = "<option value=\"\">" . cplang('nolimit') . "</option>\n";
            for ($i = 1; $i <= 12; $i++) {
                $name = lang('space', 'constellation_' . $i);
                $select .= "<option value=\"{$name}\">{$name}</option>\n";
            }
            showsetting($value['title'], '', '', '<select class="txt" name="constellation">' . $select . '</select>');
        } elseif ($fieldid == 'zodiac') {
            $select = "<option value=\"\">" . cplang('nolimit') . "</option>\n";
            for ($i = 1; $i <= 12; $i++) {
                $option = lang('space', 'zodiac_' . $i);
                $select .= "<option value=\"{$option}\">{$option}</option>\n";
            }
            showsetting($value['title'], '', '', '<select class="txt" name="zodiac">' . $select . '</select>');
        } elseif ($value['formtype'] == 'select' || $value['formtype'] == 'list') {
            $select = "<option value=\"\">" . cplang('nolimit') . "</option>\n";
            $value['choices'] = explode("\n", $value['choices']);
            foreach ($value['choices'] as $option) {
                $option = trim($option);
                $select .= "<option value=\"{$option}\">{$option}</option>\n";
            }
            showsetting($value['title'], '', '', '<select class="txt" name="' . $fieldid . '">' . $select . '</select>');
        } else {
            showsetting($value['title'], '', '', '<input class="txt" name="' . $fieldid . '" />');
        }
    }
    showtagfooter('tbody');
    $_G['showsetting_multirow'] = 0;
    showsubmit('submit', $operation == 'clean' ? 'members_delete' : 'search', '', 'more_options');
    showtablefooter();
    showformfooter();
    showtagfooter('div');
}
Example #19
0
<?php

/*
	if(file_exists(DISCUZ_ROOT.'./data/dsu_amupper.lock')) {
		cpmsg('dsu_amupper:admin_ed', 'action=plugins&operation=config&identifier=dsu_amupper','succeed');
		exit;
	} 
*/
!defined('IN_DISCUZ') && exit('Access Denied');
!defined('IN_ADMINCP') && exit('Access Denied');
if (!$_GET['submit']) {
    showtableheader(lang("plugin/dsu_amupper", "trans_h1"));
    showformheader("plugins&operation=config&identifier=dsu_amupper&pmod=trans&submit=1", "");
    showsetting(lang('plugin/dsu_amupper', 'trans_f1'), 'reserve', '1', 'radio');
    echo '<input type="hidden" name="formhash" value="' . FORMHASH . '">';
    showsubmit('submit', "OK!");
    showformfooter();
    showtablefooter();
} elseif ($_GET['submit'] && $_GET['reserve'] && $_G['adminid'] == '1' && $_GET['formhash'] == FORMHASH) {
    $formhash = FORMHASH;
    $limit = 400;
    $tablename = DB::table('dsu_paulsign');
    $amuppertable = DB::table('plugin_dsuamupper');
    $query = DB::query("SHOW TABLES LIKE '{$tablename}'");
    $paulsign_exist = 0;
    if (DB::num_rows($query) > 0) {
        $paulsign_exist = 1;
    }
    $query = DB::query("SHOW TABLES LIKE '{$amuppertable}'");
    $amupper_exist = 0;
    if (DB::num_rows($query) > 0) {
Example #20
0
     shownav('plugin');
     showsubmenu($lang['plugins_edit'] . ' - ' . $pluginvar['name'], array(array('plugins_list', 'plugins', 0), array('config', 'plugins&operation=edit&pluginid=' . $pluginid . '&anchor=config', 0), array('plugins_config_module', 'plugins&operation=edit&pluginid=' . $pluginid . '&anchor=modules', 0), array('plugins_config_vars', 'plugins&operation=edit&pluginid=' . $pluginid . '&anchor=vars', 1), array('export', 'plugins&operation=export&pluginid=' . $pluginid, 0)));
     $typeselect = '<select name="typenew" onchange="if(this.value.indexOf(\'select\') != -1) $(\'extra\').style.display=\'\'; else $(\'extra\').style.display=\'none\';">';
     foreach (array('number', 'text', 'radio', 'textarea', 'select', 'selects', 'color', 'date', 'datetime', 'forum', 'forums', 'group', 'groups', 'extcredit', 'forum_text', 'forum_textarea', 'forum_radio', 'forum_select', 'group_text', 'group_textarea', 'group_radio', 'group_select') as $type) {
         $typeselect .= '<option value="' . $type . '" ' . ($pluginvar['type'] == $type ? 'selected' : '') . '>' . $lang['plugins_edit_vars_type_' . $type] . '</option>';
     }
     $typeselect .= '</select>';
     showformheader("plugins&operation=vars&pluginid={$pluginid}&pluginvarid={$pluginvarid}");
     showtableheader();
     showtitle($lang['plugins_edit_vars'] . ' - ' . $pluginvar['title']);
     showsetting('plugins_edit_vars_title', 'titlenew', $pluginvar['title'], 'text');
     showsetting('plugins_edit_vars_description', 'descriptionnew', $pluginvar['description'], 'textarea');
     showsetting('plugins_edit_vars_type', '', '', $typeselect);
     showsetting('plugins_edit_vars_variable', 'variablenew', $pluginvar['variable'], 'text');
     showtagheader('tbody', 'extra', $pluginvar['type'] == 'select' || $pluginvar['type'] == 'selects');
     showsetting('plugins_edit_vars_extra', 'extranew', $pluginvar['extra'], 'textarea');
     showtagfooter('tbody');
     showsubmit('varsubmit');
     showtablefooter();
     showformfooter();
 } else {
     $titlenew = cutstr(dhtmlspecialchars(trim($_G['gp_titlenew'])), 25);
     $descriptionnew = cutstr(dhtmlspecialchars(trim($_G['gp_descriptionnew'])), 255);
     $variablenew = trim($_G['gp_variablenew']);
     $extranew = dhtmlspecialchars(trim($_G['gp_extranew']));
     if (!$titlenew) {
         cpmsg('plugins_edit_var_title_invalid', '', 'error');
     } elseif ($variablenew != $pluginvar['variable']) {
         $query = DB::query("SELECT pluginvarid FROM " . DB::table('common_pluginvar') . " WHERE variable='{$variablenew}'");
         if (DB::num_rows($query) || !$variablenew || strlen($variablenew) > 40 || !ispluginkey($variablenew)) {
             cpmsg('plugins_edit_vars_invalid', '', 'error');
Example #21
0
                }
                $item = array('url' => $_GET['focus_url'], 'tid' => $item['tid'], 'available' => '1', 'subject' => cutstr($_GET['focus_subject'], 80), 'summary' => $_GET['focus_summary'], 'image' => $_GET['focus_image'], 'aid' => 0, 'filename' => $focus_filename, 'position' => $_GET['focus_position']);
                $focus['data'][$id] = $item;
                C::t('common_setting')->update('focus', $focus);
                updatecache(array('setting', 'focus'));
            }
            cpmsg('focus_edit_succeed', 'action=misc&operation=focus', 'succeed');
        }
    } elseif ($do == 'config') {
        if (!submitcheck('confsubmit')) {
            shownav('extended', 'misc_focus');
            showsubmenu('misc_focus', array(array('config', 'misc&operation=focus&do=config', 1), array('admin', 'misc&operation=focus', 0), array('add', 'misc&operation=focus&do=add', 0)));
            showformheader('misc&operation=focus&do=config');
            showtableheader('config', 'fixpadding');
            showsetting('misc_focus_area_title', 'focus_title', empty($focus['title']) ? cplang('misc_focus') : $focus['title'], 'text');
            showsetting('misc_focus_area_cookie', 'focus_cookie', empty($focus['cookie']) ? 0 : $focus['cookie'], 'text');
            showsubmit('confsubmit', 'submit');
            showtablefooter();
            showformfooter();
        } else {
            $focus['title'] = trim($_GET['focus_title']);
            $focus['title'] = empty($focus['title']) ? cplang('misc_focus') : $focus['title'];
            $focus['cookie'] = trim(intval($_GET['focus_cookie']));
            $focus['cookie'] = empty($focus['cookie']) ? 0 : $focus['cookie'];
            C::t('common_setting')->update('focus', $focus);
            updatecache(array('setting', 'focus'));
            cpmsg('focus_conf_succeed', 'action=misc&operation=focus&do=config', 'succeed');
        }
    }
} elseif ($operation == 'checkstat') {
    if ($statid && $statkey) {
         $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 {
     if ($creditstaxnew < 0 || $creditstaxnew >= 1) {
         $creditstaxnew = 0;
     }
     $creditstrans = explode(',', $creditstrans);
     $creditstrans[0] = (double) $creditstransnew;
     $db->query("REPLACE INTO {$tablepre}settings (variable, value) VALUES ('creditstrans', '" . implode(',', $creditstrans) . "')");
     $db->query("REPLACE INTO {$tablepre}settings (variable, value) VALUES ('creditstax', '" . (double) $creditstaxnew . "')");
     $db->query("REPLACE INTO {$tablepre}settings (variable, value) VALUES ('transfermincredits', '" . (double) $transfermincreditsnew . "')");
     $db->query("REPLACE INTO {$tablepre}settings (variable, value) VALUES ('exchangemincredits', '" . (double) $exchangemincreditsnew . "')");
     $db->query("REPLACE INTO {$tablepre}settings (variable, value) VALUES ('maxincperthread', '" . (double) $maxincperthreadnew . "')");
Example #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;
        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');
    showsetting(lang('plugin/wechat', 'wsq_siteurl'), 'setting[wsq_siteurl]', $setting['wsq_siteurl'], 'text', 0, 0, lang('plugin/wechat', 'wsq_siteurl_comment'));
    showsetting(lang('plugin/wechat', 'wsq_fid'), '', '', $forums, 0, 0, lang('plugin/wechat', 'wsq_fid_comment'));
    if (!empty($_G['setting']['domain']['root']['forum'])) {
        showsetting(lang('plugin/wechat', 'wsq_domain'), '', '', 'http://<input type="text" name="setting[wsq_domain]" class="txt" value="' . $setting['wsq_domain'] . '" style="width:100px; margin-right:0px;" >.' . $_G['setting']['domain']['root']['forum'], !function_exists('domain_create'), 0, lang('plugin/wechat', 'wsq_domain_comment'));
    } else {
        showsetting(lang('plugin/wechat', 'wsq_domain'), 'setting[wsq_domain]', '', 'text', 1, 0, lang('plugin/wechat', 'wsq_domain_comment'));
    }
    showsetting(lang('plugin/wechat', 'wechat_float_qrcode'), 'setting[wechat_float_qrcode]', $setting['wechat_float_qrcode'], 'radio');
    showsetting(lang('plugin/wechat', 'wsq_wapdefault'), 'setting[wsq_wapdefault]', $setting['wsq_wapdefault'], 'radio');
    showsubmit('settingsubmit');
    showtablefooter();
    showformfooter();
} else {
    if ($_FILES['wsq_sitelogo']['tmp_name']) {
        $upload = new discuz_upload();
        if (!$upload->init($_FILES['wsq_sitelogo'], 'common', random(3, 1), random(8)) || !$upload->save()) {
            cpmsg($upload->errormessage(), '', 'error');
        }
        $parsev = parse_url($_G['setting']['attachurl']);
        $_GET['setting']['wsq_sitelogo'] = ($parsev['host'] ? '' : $_G['siteurl']) . $_G['setting']['attachurl'] . 'common/' . $upload->attach['attachment'];
    } else {
        $_GET['setting']['wsq_sitelogo'] = $setting['wsq_sitelogo'];
    }
    if (!$_GET['setting']['wsq_fid']) {
        } else {
            $oauth = new HaoDaiOAuth(HD_AKEY, HD_SKEY);
            $auth_url = $oauth->getAuthorizeURL(HD_CALLBACK_URL);
            showtablerow('', array('class="td24"'), array($lang['callback_status'], '<font color="red">' . $lang['callback_expired'] . '</font> <a href="' . $auth_url . '"><img src="source/plugin/dzapp_haodai/images/haodai_login.png" class="vmiddle"></a>'));
        }
    }
    showtablefooter();
} elseif ($_GET['want'] == 'import') {
    if (!submitcheck('ok')) {
        showformheader('plugins&operation=config&identifier=dzapp_haodai&pmod=admincp_callback&want=import');
        showtableheader('import_callback');
        showsetting($lang['appkey'], 'AKEY', defined('HD_AKEY') ? HD_AKEY : '', 'text');
        showsetting($lang['appsecret'], 'SKEY', defined('HD_SKEY') ? HD_SKEY : '', 'text');
        showsetting($lang['ref'], 'REF', defined('HD_REF') ? HD_REF : '', 'text');
        showsetting($lang['callback_url'], 'CALLBACK_URL', defined('HD_CALLBACK_URL') ? HD_CALLBACK_URL : $_G['siteurl'] . 'plugin.php?id=dzapp_haodai:callback', 'text');
        showsetting($lang['host_url'], 'API_HOST', defined('HD_API_HOST') ? HD_API_HOST : 'http://api.haodai.com/', 'text');
        showsubmit('ok', "ok");
        showtablefooter();
        showformfooter();
    } else {
        $config = array();
        $config['HD_REF'] = $_GET['REF'];
        $config['HD_AKEY'] = $_GET['AKEY'];
        $config['HD_SKEY'] = $_GET['SKEY'];
        $config['HD_CALLBACK_URL'] = $_GET['CALLBACK_URL'];
        $config['HD_API_HOST'] = $_GET['API_HOST'];
        $config['HD_CITY'] = defined('HD_CITY') ? HD_CITY : '';
        $config = daddslashes($config);
        $configfile = "<?php \r\n";
        foreach ($config as $key => $value) {
            $configfile .= "define('{$key}', '{$value}');\r\n";
Example #26
0
                }
            }
        }
        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));
        } else {
            $numdeleted = C::t('common_member')->delete_no_validate(array_keys($uids));
            cpmsg('members_delete_succeed', '', 'succeed', array('numdeleted' => $numdeleted));
        }
    }
}
Example #27
0
             $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);
     $maxsize = round(($datasize - ($tableid ? 0 : 300)) / 100);
     $maxi = $maxsize > 10 ? 10 : ($maxsize < 1 ? 1 : $maxsize);
     for ($i = 1; $i <= $maxi; $i++) {
         $movesize = $i == 10 ? 1024 : $i * 100;
         $maxsizestr .= '<option value="' . $movesize . '">' . ($i == 10 ? sizecount($movesize * 1048576) : $movesize . 'MB') . '</option>';
     }
     showsetting('postsplit_move_size', '', '', '<select name="movesize">' . $maxsizestr . '</select>');
     showsubmit('splitsubmit', 'postsplit_manage_submit');
     showtablefooter();
     showformfooter();
 } else {
     $targettable = intval($_G['gp_targettable']);
     $createtable = false;
     if ($targettable == -1) {
         $maxtableid = getmaxposttableid();
         DB::query('SET SQL_QUOTE_SHOW_CREATE=0', 'SILENT');
         $tableinfo = DB::fetch_first("SHOW CREATE TABLE " . DB::table(getposttable()));
         $createsql = $tableinfo['Create Table'];
         $targettable = $maxtableid + 1;
         $newtable = 'forum_post_' . $targettable;
         $createsql = str_replace(getposttable(), $newtable, $createsql);
         DB::query($createsql);
Example #28
0
 $sql = '';
 $sql .= $_G['gp_orderstatus'] != '' ? " AND status='{$_G['gp_orderstatus']}'" : '';
 $sql .= $_G['gp_orderid'] != '' ? " AND orderid='{$_G['gp_orderid']}'" : '';
 $sql .= $_G['gp_email'] != '' ? " AND email='{$_G['gp_email']}'" : '';
 $orderurl = array('alipay' => 'https://www.alipay.com/trade/query_trade_detail.htm?trade_no=', 'tenpay' => 'https://www.tenpay.com/med/tradeDetail.shtml?trans_id=');
 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', 0), array('nav_ec_orders', 'ec&operation=orders', 0), array('nav_ec_tradelog', 'tradelog', 0), array('nav_ec_inviteorders', 'ec&operation=inviteorders', 1)));
 $ordercount = DB::result_first("SELECT COUNT(*) FROM " . DB::table('forum_order') . " WHERE uid='0' {$sql}");
 $multipage = multi($ordercount, $_G['tpp'], $page, ADMINSCRIPT . "?action=ec&operation=inviteorders&orderstatus={$_G['gp_orderstatus']}&orderid={$_G['gp_orderid']}&email={$_G['gp_email']}");
 showtagheader('div', 'orderlist', TRUE);
 showformheader('ec&operation=inviteorders');
 showtableheader('ec_inviteorders_search');
 $_G['showsetting_multirow'] = 1;
 showsetting('ec_orders_search_status', array('orderstatus', array(array('', $lang['ec_orders_search_status_all']), array(1, $lang['ec_orders_search_status_pending']), array(2, $lang['ec_orders_search_status_auto_finished']))), intval($_G['gp_orderstatus']), 'select');
 showsetting('ec_orders_search_id', 'orderid', $_G['gp_orderid'], 'text');
 showsetting('ec_orders_search_email', 'email', $_G['gp_email'], 'text');
 showsubmit('searchsubmit', 'submit');
 showtablefooter();
 showtableheader('result');
 showsubtitle(array('', 'ec_orders_id', 'ec_inviteorders_status', 'ec_inviteorders_buyer', 'ec_orders_amount', 'ec_orders_price', 'ec_orders_submitdate', 'ec_orders_confirmdate'));
 $query = DB::query("SELECT *\r\n\t\t\tFROM " . DB::table('forum_order') . " WHERE uid='0' {$sql} ORDER BY submitdate DESC\r\n\t\t\tLIMIT {$start_limit}, {$_G['tpp']}");
 while ($order = DB::fetch($query)) {
     switch ($order['status']) {
         case 1:
             $order['orderstatus'] = $lang['ec_orders_search_status_pending'];
             break;
         case 2:
             $order['orderstatus'] = '<b>' . $lang['ec_orders_search_status_auto_finished'] . '</b>';
             break;
         case 3:
             $order['orderstatus'] = '<b>' . $lang['ec_orders_search_status_manual_finished'] . '</b><br />(<a href="home.php?mod=space&username='******'admin']) . '" target="_blank">' . $order['admin'] . '</a>)';
Example #29
0
            $cpmsg = cplang('recyclebin_nothread');
        }
        ?>
<script type="text/JavaScript">alert('<?php 
        echo $cpmsg;
        ?>
');parent.$('rbsearchform').searchsubmit.click();</script>
<?php 
    }
} elseif ($operation == 'clean') {
    if (!submitcheck('rbsubmit', 1)) {
        shownav('topic', 'nav_recyclebin');
        showsubmenu('nav_recyclebin', array(array('recyclebin_list', 'recyclebin', 0), array('search', 'recyclebin&operation=search', 0), array('clean', 'recyclebin&operation=clean', 1)));
        showformheader('recyclebin&operation=clean');
        showtableheader('recyclebin_clean');
        showsetting('recyclebin_clean_days', 'days', '30', 'text');
        showsubmit('rbsubmit');
        showtablefooter();
        showformfooter();
    } else {
        $deletetids = array();
        $timestamp = TIMESTAMP;
        $pernum = 500;
        $threadsdel = intval($_GET['threadsdel']);
        $days = intval($_GET['days']);
        foreach (C::t('forum_threadmod')->fetch_all_recyclebin_by_dateline($timestamp - $days * 86400, 0, $pernum) as $thread) {
            $deletetids[] = $thread['tid'];
        }
        if ($deletetids) {
            require_once libfile('function/delete');
            $delcount = deletethread($deletetids);
Example #30
0
function searchgroups($submit)
{
    global $_G;
    require_once libfile('function/group');
    empty($_GET['selectgroupid']) && ($_GET['selectgroupid'] = array());
    $groupselect = get_groupselect(0, $_GET['selectgroupid'], 0);
    $monthselect = $dayselect = $birthmonth = $birthday = '';
    for ($m = 1; $m <= 12; $m++) {
        $m = sprintf("%02d", $m);
        $monthselect .= "<option value=\"{$m}\" " . ($birthmonth == $m ? 'selected' : '') . ">{$m}</option>\n";
    }
    for ($d = 1; $d <= 31; $d++) {
        $d = sprintf("%02d", $d);
        $dayselect .= "<option value=\"{$d}\" " . ($birthday == $d ? 'selected' : '') . ">{$d}</option>\n";
    }
    showtagheader('div', 'searchgroups', !$submit);
    echo '<script src="static/js/calendar.js" type="text/javascript"></script>';
    showformheader("group&operation=manage");
    showtableheader();
    showsetting('groups_manage_name', 'srchname', $srchname, 'text');
    showsetting('groups_manage_id', 'srchfid', $srchfid, 'text');
    showsetting('groups_editgroup_category', '', '', '<select name="selectgroupid[]" multiple="multiple" size="10"><option value="all"' . (in_array('all', $_GET['selectgroupid']) ? ' selected' : '') . '>' . cplang('unlimited') . '</option>' . $groupselect . '</select>');
    showsetting('groups_manage_membercount', array('memberlower', 'memberhigher'), array($_GET['memberlower'], $_GET['memberhigher']), 'range');
    showsetting('groups_manage_threadcount', array('threadshigher', 'threadslower'), array($threadshigher, $threadslower), 'range');
    showsetting('groups_manage_replycount', array('postshigher', 'postslower'), array($postshigher, $postslower), 'range');
    showsetting('groups_manage_createtime', array('datelineafter', 'datelinebefore'), array($datelineafter, $datelinebefore), 'daterange');
    showsetting('groups_manage_updatetime', array('lastupdateafter', 'lastupdatebefore'), array($lastupdateafter, $lastupdatebefore), 'daterange');
    showsetting('groups_manage_founder', 'srchfounder', $srchfounder, 'text');
    showsetting('groups_manage_founder_uid', 'srchfounderid', $srchfounderid, 'text');
    showtagfooter('tbody');
    showsubmit('submit');
    showtablefooter();
    showformfooter();
    showtagfooter('div');
}