示例#1
0
	function showbody(){
		$submenu = array();
		foreach($this->anchors as $anchor){
			$submenu[] = array('setting_'.$anchor, $anchor, $this->dxanchor == $anchor);
		}

		$hookselect = '<select name="varsnew[hookid]">';
		for($i = 1; $i <= 3; $i++){
			$hookselect .= '<option value="'.$i.'"'.($this->settings['hookid'] == $i ? ' selected' : '').'>'.$this->lang('setting_hookid_'.$i).'</option>';
		}
		$hookselect .= '</select>';
				
		$this->formheader();
		$this->subanchors($submenu);

		$this->anchorheader('basic');
		$this->showsetting('setting_hookid', '', '', $hookselect);
		$this->showsetting('setting_cityid', 'varsnew[cityid]', $this->settings['cityid'], 'text');
		$this->showsetting('setting_loadingstr', 'varsnew[loadingstr]', $this->settings['loadingstr'], 'text');
		$this->showsetting('setting_linkreplace', 'varsnew[linkreplace]', $this->settings['linkreplace'], 'text');
		showsubmit('dxsubmit');
		$this->anchorfooter();

		$this->anchorheader('navstyle');
		$this->showsetting('setting_fontcolor', 'varsnew[dx_fontcolor]', $this->settings['dx_fontcolor'], 'color', '', 0, $this->lang('setting_color_comment'));
		$this->showsetting('setting_citycolor', 'varsnew[dx_citycolor]', $this->settings['dx_citycolor'], 'color', '', 0, $this->lang('setting_color_comment'));
		$this->showsetting('setting_highcolor', 'varsnew[dx_highcolor]', $this->settings['dx_highcolor'], 'color', '', 0, $this->lang('setting_color_comment'));
		$this->showsetting('setting_lowcolor', 'varsnew[dx_lowcolor]', $this->settings['dx_lowcolor'], 'color', '', 0, $this->lang('setting_color_comment'));
		$this->showsetting('setting_weekcolor', 'varsnew[dx_weekcolor]', $this->settings['dx_weekcolor'], 'color', '', 0, $this->lang('setting_color_comment'));
		$this->showsetting('setting_stacolor', 'varsnew[dx_stacolor]', $this->settings['dx_stacolor'], 'color', '', 0, $this->lang('setting_color_comment'));
		$this->showsetting('setting_suncolor', 'varsnew[dx_suncolor]', $this->settings['dx_suncolor'], 'color', '', 0, $this->lang('setting_color_comment'));
		$this->showsetting('setting_lineheight', 'varsnew[height]', intval($this->settings['height']), 'text');
		$this->showsetting('setting_popleft', 'varsnew[left]', intval($this->settings['left']), 'text');
		$this->showsetting('setting_poptop', 'varsnew[top]', intval($this->settings['top']), 'text');
		showsubmit('dxsubmit');
		$this->anchorfooter();

		$this->anchorheader('customstyle');
		$this->showsetting('setting_fontcolor', 'varsnew[dx_fontcolor3]', $this->settings['dx_fontcolor3'], 'color', '', 0, $this->lang('setting_color_comment'));
		$this->showsetting('setting_citycolor', 'varsnew[dx_citycolor3]', $this->settings['dx_citycolor3'], 'color', '', 0, $this->lang('setting_color_comment'));
		$this->showsetting('setting_highcolor', 'varsnew[dx_highcolor3]', $this->settings['dx_highcolor3'], 'color', '', 0, $this->lang('setting_color_comment'));
		$this->showsetting('setting_lowcolor', 'varsnew[dx_lowcolor3]', $this->settings['dx_lowcolor3'], 'color', '', 0, $this->lang('setting_color_comment'));
		$this->showsetting('setting_glcolor', 'varsnew[dx_glcolor3]', $this->settings['dx_glcolor3'], 'color', '', 0, $this->lang('setting_color_comment'));
		$this->showsetting('setting_llcolor', 'varsnew[dx_llcolor3]', $this->settings['dx_llcolor3'], 'color', '', 0, $this->lang('setting_color_comment'));
		$this->showsetting('setting_weekcolor', 'varsnew[dx_weekcolor3]', $this->settings['dx_weekcolor3'], 'color', '', 0, $this->lang('setting_color_comment'));
		$this->showsetting('setting_stacolor', 'varsnew[dx_stacolor3]', $this->settings['dx_stacolor3'], 'color', '', 0, $this->lang('setting_color_comment'));
		$this->showsetting('setting_suncolor', 'varsnew[dx_suncolor3]', $this->settings['dx_suncolor3'], 'color', '', 0, $this->lang('setting_color_comment'));
		$this->showsetting('setting_popleft', 'varsnew[left3]', intval($this->settings['left3']), 'text');
		$this->showsetting('setting_poptop', 'varsnew[top3]', intval($this->settings['top3']), 'text');
		showsubmit('dxsubmit');
		$this->anchorfooter();

		showformfooter();
	}
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');
}
示例#3
0
            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
<script type="text/JavaScript">
var rowtypedata = [
[[1,''], [1,'<input name="newbutton[displayorder][]" value="" size="3" type="text" class="txt">', 'td23 td28'], [1, '<input name="newbutton[name][]" value="" size="30" type="text" class="txt">'], [1, '<input name="newbutton[keyurl][]" value="" size="30" type="text" class="txt">', 'td29']],
[[1,''], [1,'<input name="newsub_button[{1}][displayorder][]" value="" size="3" type="text" class="txt">', 'td23 td28'], [1, '<div class=\\"node\\"><input name="newsub_button[{1}][name][]" value="" size="30" type="text" class="txt"></div>'], [1, '<input name="newsub_button[{1}][keyurl][]" value="" size="30" type="text" class="txt">', 'td29']],
];
</script>
EOT;
    showsubmit('menusubmit', lang('plugin/wechat', 'wsq_menu_save'), 'del', '<input type="submit" class="btn" name="pubsubmit" value="' . lang('plugin/wechat', 'wsq_menu_pub') . '" />');
    showtablefooter();
    showformfooter();
} else {
    if (!empty($_GET['newbutton'])) {
        foreach ($_GET['newbutton']['name'] as $k => $name) {
            $button = array('displayorder' => $_GET['newbutton']['displayorder'][$k], 'name' => $name, 'keyurl' => $_GET['newbutton']['keyurl'][$k]);
            $setting['button'][] = $button;
        }
    }
    foreach ($_GET['button'] as $k => $value) {
        if ($value['sub_button']) {
            foreach ($value['sub_button'] as $sk => $v) {
                if ($v['delete']) {
                    unset($value['sub_button'][$sk]);
                }
示例#4
0
        } else {
            $sharecount = 0;
            $query = DB::query("SELECT s.sid FROM " . DB::table('home_share') . " s WHERE 1 {$sql}");
            while ($share = DB::fetch($query)) {
                $sids .= ',' . $share['sid'];
                $sharecount++;
            }
            $multi = '';
        }
        if (!$sharecount) {
            $error = 'share_post_nonexistence';
        }
    }
    showtagheader('div', 'postlist', $searchsubmit || $newlist);
    showformheader('share&frame=no', 'target="shareframe"');
    showhiddenfields(array('sids' => authcode($sids, 'ENCODE')));
    showtableheader(cplang('share_result') . ' ' . $sharecount . (empty($newlist) ? ' <a href="###" onclick="$(\'searchposts\').style.display=\'\';$(\'postlist\').style.display=\'none\';$(\'shareforum\').pp.value=\'\';$(\'shareforum\').page.value=\'\';" class="act lightlink normal">' . cplang('research') . '</a>' : ''), 'fixpadding');
    if ($error) {
        echo "<tr><td class=\"lineheight\" colspan=\"15\">{$lang[$error]}</td></tr>";
    } else {
        if ($detail) {
            showsubtitle(array('', 'author', 'share_title', 'share_body', 'share_type', 'time'));
            echo $shares;
        }
    }
    showsubmit('sharesubmit', 'delete', $detail ? 'del' : '', '', $multi);
    showtablefooter();
    showformfooter();
    echo '<iframe name="shareframe" style="display:none"></iframe>';
    showtagfooter('div');
}
示例#5
0
             $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);
         $posttable_info[$targettable]['memo'] = $_G['gp_memo'];
示例#6
0
    param.top = Math.round((maxHeight - param.height) / 2);
    return param;
}
\t\t\t\t\t</script>
\t\t\t<tr><td><div id="preview">
\t\t\t</div></td></tr>
    \t\t<br/>
    \t\t<tr><td><input type="file" name='upfile' onchange="previewImage(this)" />
\t\t\t</td></tr>
INPUT;
        showsetting('所属目的地', 'area', cplang($area), 'text');
        showsetting('名称', 'name', $result['name'], 'text');
        showsetting('area', 'areaid', $maparea[$area], 'text');
        showsetting('简介', 'introduction', $result['introduction'], 'textarea');
        showsetting('级别划分', 'level', $result['level'], 'text');
        showsubmit('detailsubmit');
        showtablefooter();
        showformfooter();
    } else {
        $file = $_FILES["upfile"];
        $destination = '/var/www/yiiframework-cms/data/attachment/yuexiamen';
        $filename = $file["tmp_name"];
        $image_size = getimagesize($filename);
        $pinfo = pathinfo($file["name"]);
        $ftype = $pinfo['extension'];
        $destination = $destination_folder . time() . "." . $ftype;
        move_uploaded_file($filename, $destination);
        $editcat = array('area' => $_GET['area'], 'introduction' => $_GET['introduction'], 'name' => $_GET['name'], 'areaid' => $_GET['areaid'], 'level' => $_GET['level'], 'pic' => $destination);
        $editcat['dateline'] = TIMESTAMP;
        $editcat['username'] = $_G['username'];
        if ($operation == 'add') {
示例#7
0
    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;
}
示例#8
0
$operation = empty($operation) ? 'admin' : $operation;
if ($operation == 'admin') {
    if (!submitcheck('tplsubmit')) {
        $templates = '';
        $query = DB::query("SELECT * FROM " . DB::table('common_template') . "");
        while ($tpl = DB::fetch($query)) {
            $templates .= showtablerow('', array('class="td25"', '', 'class="td29"'), array("<input class=\"checkbox\" type=\"checkbox\" name=\"delete[]\" " . ($tpl['templateid'] == 1 ? 'disabled ' : '') . "value=\"{$tpl['templateid']}\">", "<input type=\"text\" class=\"txt\" size=\"8\" name=\"namenew[{$tpl['templateid']}]\" value=\"{$tpl['name']}\">", "<input type=\"text\" class=\"txt\" size=\"20\" name=\"directorynew[{$tpl['templateid']}]\" value=\"{$tpl['directory']}\">", !empty($tpl['copyright']) ? $tpl['copyright'] : "<input type=\"text\" class=\"txt\" size=\"8\" name=\"copyrightnew[{$tpl['templateid']}]\" value=>"), TRUE);
        }
        shownav('style', 'templates_admin');
        showsubmenu('templates_admin');
        showformheader('templates');
        showtableheader();
        showsubtitle(array('', 'templates_admin_name', 'dir', 'copyright', ''));
        echo $templates;
        echo '<tr><td>' . $lang['add_new'] . '</td><td><input type="text" class="txt" size="8" name="newname"></td><td class="td29"><input type="text" class="txt" size="20" name="newdirectory"></td><td><input type="text" class="txt" size="25" name="newcopyright"></td><td>&nbsp;</td></tr>';
        showsubmit('tplsubmit', 'submit', 'del');
        showtablefooter();
        showformfooter();
    } else {
        if ($_G['gp_newname']) {
            if (!$_G['gp_newdirectory']) {
                cpmsg('tpl_new_directory_invalid', '', 'error');
            } elseif (!istpldir($_G['gp_newdirectory'])) {
                $directory = $_G['gp_newdirectory'];
                cpmsg('tpl_directory_invalid', '', 'error', array('directory' => $directory));
            }
            DB::insert('common_template', array('name' => $_G['gp_newname'], 'directory' => $_G['gp_newdirectory'], 'copyright' => $_G['gp_newcopyright']));
        }
        foreach ($_G['gp_directorynew'] as $id => $directory) {
            if (!$_G['gp_delete'] || $_G['gp_delete'] && !in_array($id, $_G['gp_delete'])) {
                if (!istpldir($directory)) {
示例#9
0
                    $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>)';
                    break;
            }
            $order['submitdate'] = dgmdate($order['submitdate']);
            $order['confirmdate'] = $order['confirmdate'] ? dgmdate($order['confirmdate']) : 'N/A';
            list($orderid, $apitype) = explode("\t", $order['buyer']);
            $apitype = $apitype ? $apitype : 'alipay';
            $orderid = '<a href="' . $orderurl[$apitype] . $orderid . '" target="_blank">' . $orderid . '</a>';
            showtablerow('', '', array("<input class=\"checkbox\" type=\"checkbox\" name=\"validate[]\" value=\"{$order['orderid']}\" " . ($order['status'] != 1 ? 'disabled' : '') . ">", "{$order['orderid']}<br />{$orderid}", $order['orderstatus'], "{$order['email']}<br>{$order['ip']}", $order['amount'], "{$lang['rmb']} {$order['price']} {$lang['rmb_yuan']}", $order['submitdate'], $order['confirmdate']));
        }
        showtablerow('', array('colspan="7"'), array($multipage));
        showsubmit('ordersubmit', 'ec_orders_validate', '<input type="checkbox" name="chkall" id="chkall" class="checkbox" onclick="checkAll(\'prefix\', this.form, \'validate\')" />');
        showtablefooter();
        showformfooter();
        showtagfooter('div');
    } else {
        if ($_G['gp_validate']) {
            $query = DB::query("SELECT * FROM " . DB::table('forum_order') . " WHERE orderid IN (" . dimplode($_G['gp_validate']) . ") AND status='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 (" . dimplode($_G['gp_validate']) . ")");
            }
        }
        cpmsg('orders_validate_succeed', "action=ec&operation=inviteorders&orderstatus={$_G['gp_orderstatus']}&orderid={$_G['gp_orderid']}&email={$_G['gp_email']}", 'succeed');
    }
}
示例#10
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));
        }
    }
}
示例#11
0
!defined('IN_DISCUZ') && exit('Access Denied');
!defined('IN_ADMINCP') && exit('Access Denied');
$setting = $_G['cache']['plugin']['k_gaiming'];
if (!submitcheck('submit')) {
    $count = $start = 0;
    $perpage = 20;
    $page = max(1, intval($_GET['page']));
    $start = ($page - 1) * $perpage;
    $count = DB::result_first("SELECT count(*) FROM " . DB::table("plugin_k_gaiming_log"));
    $query = DB::query("SELECT * FROM " . DB::table("plugin_k_gaiming_log") . " ORDER BY dateline DESC LIMIT " . $start . "," . $perpage);
    $logs = '';
    while ($log = DB::fetch($query)) {
        $log['dateline'] = dgmdate($log['dateline'], 'u');
        $log['username'] = getuserbyuid($log['uid']);
        $logs .= showtablerow('', array('class="td25"', 'class="td29"', 'class="td28"', 'class="td29"'), array("<input class=\"checkbox\" type=\"checkbox\" name=\"delete[]\" value=\"" . $log['lid'] . "\">", "<a href=\"home.php?mod=space&uid=" . $log['uid'] . "\" target=\"_blank\">" . $log['username']['username'] . "</a>&nbsp;(UID:&nbsp;" . $log['uid'] . ")", "<font color=\"#2366A8\">" . $log['username']['username'] . "</font>&nbsp;" . lang('plugin/k_gaiming', 'logcp_1') . "&nbsp;<font color=\"#2366A8\">" . $log['dateline'] . "</font>&nbsp;" . lang('plugin/k_gaiming', 'logcp_2') . "&nbsp;<font color=\"#2366A8\">" . $log['oldname'] . "</font>&nbsp;" . lang('plugin/k_gaiming', 'logcp_3') . "&nbsp;<font color=\"#2366A8\">" . $log['newname'] . "</font>", $log['creditnum'] . "&nbsp;" . $_G['setting']['extcredits'][$log['creditunit']]['unit'] . $_G['setting']['extcredits'][$log['creditunit']]['title'], $log['dateline']), TRUE);
    }
    $multi = multi($count, $perpage, $page, ADMINSCRIPT . "?action=plugins&operation=config&do=" . $pluginid . "&identifier=k_gaiming&pmod=logcp");
    showformheader("plugins&operation=config&identifier=k_gaiming&pmod=logcp&page=" . $page, "enctype");
    showtableheader('');
    showsubtitle(array('', lang('plugin/k_gaiming', 'logcp_6'), lang('plugin/k_gaiming', 'logcp_5'), lang('plugin/k_gaiming', 'logcp_4'), lang('plugin/k_gaiming', 'logcp_7')));
    echo $logs;
    showsubmit('submit', lang('plugin/k_gaiming', 'submit'), 'del', '', $multi);
    showtablefooter();
    showformfooter();
} else {
    if (is_array($_GET['delete'])) {
        $ids = dimplode($_GET['delete']);
        DB::query("DELETE FROM " . DB::table('plugin_k_gaiming_log') . " WHERE lid IN ({$ids})");
    }
    cpmsg(lang('plugin/k_gaiming', 'success'), 'action=plugins&operation=config&identifier=k_gaiming&pmod=logcp&page=' . $page, 'succeed');
}
        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']) {
        cpmsg(lang('plugin/wechat', 'wsq_fid_empty'), '', 'error');
示例#13
0
    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"));
    showtablefooter();
    showformfooter();
} elseif ($_G['adminid'] == '1' && $_GET['formhash'] == FORMHASH) {
    $mrcs = array();
    $max_i = max(count($_GET['days']), count($_GET['usergid']), count($_GET['extcredits']), count($_GET['reward']));
    for ($i = 0; $i < $max_i; $i++) {
        if (intval($_GET['days'][$i]) && intval($_GET['extcredits'][$i]) && intval($_GET['usergid'][$i]) && intval($_GET['reward'][$i] * 100) && !in_array($i, $_GET['delete'])) {
            $mrcs[$i]['days'] = intval($_GET['days'][$i]);
            $mrcs[$i]['usergid'] = intval($_GET['usergid'][$i]);
            $mrcs[$i]['extcredits'] = intval($_GET['extcredits'][$i]);
            $mrcs[$i]['reward'] = intval($_GET['reward'][$i] * 100) / 100;
            $mrcs[$i]['id'] = intval($i);
        }
    }
    DB::query('DELETE FROM %t', array('plugin_dsuamupperc'));
         if ($pdnovelcategory[$catid]['children']) {
             cpmsg('category_chlidren_error', 'action=pdnovel&operation=category', 'error');
         } else {
             DB::query('DELETE FROM ' . DB::table('pdnovel_category') . (' WHERE catid = ' . $catid . ';'));
             pdnovelcache('pdnovelcategory', 'pdnovel');
             cpmsg('category_delete_succeed', 'action=pdnovel&operation=category', 'succeed');
         }
     } else {
         $pdnovel_count = DB::result_first('SELECT COUNT(*) FROM ' . DB::table('pdnovel_view') . (' WHERE catid = ' . $catid));
         if ($pdnovel_count) {
             shownav('pdnovel', 'category');
             showsubmenu('category', array(array('delete', 'pdnovel&operation=category&do=delete&catid=' . $catid, 1)));
             showformheader('pdnovel&operation=category&do=mdelete&catid=' . $catid);
             showtableheader();
             echo "<tr><td colspan=\"2\" class=\"td27\">" . cplang('delete') . $pdnovelcategory[$catid]['catname'] . ":</td></tr>\r\n\t\t\t\t\t<tr class=\"noborder\">\r\n\t\t\t\t\t\t<td class=\"vtop rowform\">\r\n\t\t\t\t\t\t\t<ul class=\"nofloat\" onmouseover=\"altStyle(this);\">\r\n\t\t\t\t\t\t\t<li class=\"checked\"><input class=\"radio\" type=\"radio\" name=\"pdnovelop\" value=\"move\" checked /> " . cplang('category_moveto') . '   ' . category_showselect('toid', $catid) . "</li>\r\n\t\t\t\t\t\t\t<li><input class=\"radio\" type=\"radio\" name=\"pdnovelop\" value=\"delete\" /> " . cplang('category_delete') . "</li>\r\n\t\t\t\t\t\t\t</ul></td>\r\n\t\t\t\t\t\t<td class=\"vtop tips2\"></td>\r\n\t\t\t\t\t</tr>";
             showsubmit('deletesubmit');
             showtablefooter();
             showformfooter();
         } else {
             DB::query('DELETE FROM ' . DB::table('pdnovel_category') . (' WHERE catid = ' . $catid . ';'));
             pdnovelcache('pdnovelcategory', 'pdnovel');
             cpmsg('category_delete_succeed', 'action=pdnovel&operation=category', 'succeed');
         }
     }
 } else {
     if ($do = 'mdelete') {
         $catid = $_G['gp_catid'];
         $pdnovelop = $_G['gp_pdnovelop'];
         if ($pdnovelop == 'move') {
             $toid = $_G['gp_toid'];
             if (empty($toid)) {
示例#15
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');
         }
     }
示例#16
0
\t\t\t[1,'', 'td25'],
\t\t\t[1,'<input type="text" class="txt" name="newdisplayorder[]" size="3">', 'td28'],
\t\t\t[1,'<input type="text" class="txt" name="newtitle[]" size="25">'],
\t\t\t[1,'<input type="text" class="txt" name="newurl[]" size="40">', 'td26']
\t\t]
\t];
</script>
EOT;
            shownav('tools', 'nav_custommenu');
            showsubmenu('nav_custommenu');
            showformheader('misc&operation=custommenu');
            showtableheader();
            showsubtitle(array('', 'display_order', 'name', 'URL'));
            echo $optionlist;
            echo '<tr><td></td><td colspan="3"><div><a href="###" onclick="addrow(this, 0)" class="addtr">' . $lang['custommenu_add'] . '</a></div></td></tr>';
            showsubmit('optionsubmit', 'submit', 'del', '', $multipage);
            showtablefooter();
            showformfooter();
        } else {
            if ($ids = dimplode($_GET['delete'])) {
                C::t('common_admincp_cmenu')->delete($_GET['delete'], $_G['uid']);
            }
            if (is_array($_GET['titlenew'])) {
                foreach ($_GET['titlenew'] as $id => $title) {
                    $_GET['urlnew'][$id] = rawurlencode($_GET['urlnew'][$id]);
                    $title = dhtmlspecialchars($_GET['langnew'][$id] && cplang($_GET['langnew'][$id], false) ? $_GET['langnew'][$id] : $title);
                    $ordernew = intval($_GET['displayordernew'][$id]);
                    C::t('common_admincp_cmenu')->update($id, array('title' => $title, 'displayorder' => $ordernew, 'url' => dhtmlspecialchars($_GET['urlnew'][$id])));
                }
            }
            if (is_array($_GET['newtitle'])) {
示例#17
0
        showsubmit('advsubmit', 'submit', 'del', $type ? '<input type="button" class="btn" onclick="location.href=\'' . ADMINSCRIPT . '?action=adv&operation=add&type=' . $_G['gp_type'] . ($_G['gp_type'] != 'custom' ? '' : '&customid=' . $_G['gp_customid']) . '\'" value="' . cplang('add') . '" />' : '', $multipage . '
<input type="text" class="txt" name="title" value="' . $title . '" size="15" onkeyup="if(event.keyCode == 13) this.form.searchsubmit.click()" onclick="this.value=\'\'"> &nbsp;&nbsp;
<select name="starttime">
<option value=""> ' . cplang('start_time') . '</option>
<option value="0" ' . $starttimecheck['0'] . '> ' . cplang('all') . '</option>
<option value="-1" ' . $starttimecheck['-1'] . '> ' . cplang('nolimit') . '</option>
<option value="86400" ' . $starttimecheck['86400'] . '> ' . cplang('1_day') . '</option>
<option value="604800" ' . $starttimecheck['604800'] . '> ' . cplang('7_day') . '</option>
<option value="2592000" ' . $starttimecheck['2592000'] . '> ' . cplang('30_day') . '</option>
<option value="7776000" ' . $starttimecheck['7776000'] . '> ' . cplang('90_day') . '</option>
<option value="15552000" ' . $starttimecheck['15552000'] . '> ' . cplang('180_day') . '</option>
<option value="31536000" ' . $starttimecheck['31536000'] . '> ' . cplang('365_day') . '</option>
</select> &nbsp;&nbsp;
<select name="endtime">
<option value=""> ' . cplang('end_time') . '</option>
<option value="0" ' . $endtimecheck['0'] . '> ' . cplang('all') . '</option>
<option value="-1" ' . $endtimecheck['-1'] . '> ' . cplang('nolimit') . '</option>
<option value="86400" ' . $endtimecheck['86400'] . '> ' . cplang('1_day') . '</option>
<option value="604800" ' . $endtimecheck['604800'] . '> ' . cplang('7_day') . '</option>
<option value="2592000" ' . $endtimecheck['2592000'] . '> ' . cplang('30_day') . '</option>
<option value="7776000" ' . $endtimecheck['7776000'] . '> ' . cplang('90_day') . '</option>
<option value="15552000" ' . $endtimecheck['15552000'] . '> ' . cplang('180_day') . '</option>
<option value="31536000" ' . $endtimecheck['31536000'] . '> ' . cplang('365_day') . '</option>
</select> &nbsp;&nbsp;
<select name="orderby">
<option value=""> ' . cplang('adv_orderby') . '</option>
<option value="starttime" ' . $orderbycheck['starttime'] . '> ' . cplang('adv_addtime') . '</option>
' . (!$type ? '<option value="type" ' . $orderbycheck['type'] . '> ' . cplang('adv_type') . '</option>' : '') . '
<option value="displayorder" ' . $orderbycheck['displayorder'] . '> ' . cplang('display_order') . '</option>
</select> &nbsp;&nbsp;
<input type="button" class="btn" name="searchsubmit" value="' . cplang('search') . '" onclick="if(this.form.title.value==\'' . cplang('adv_inputtitle') . '\'){this.form.title.value=\'\'}location.href=\'' . ADMINSCRIPT . '?action=adv&operation=ad' . ($type ? '&type=' . rawurlencode($type) : '') . '&title=\'+this.form.title.value+\'&starttime=\'+this.form.starttime.value+\'&endtime=\'+this.form.endtime.value+\'&orderby=\'+this.form.orderby.value;"> &nbsp;
		');
示例#18
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');
}
示例#19
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;
示例#20
0
            $editvalue['groupid'] = getgroupid($mname, $editvalue['itemid']);
            showrelatedinfojs($mname, $editvalue['groupid'], $editvalue['itemid'], $editvalue['shopid'], 'admin');
        }
    }
    if (!empty($_SGLOBAL['panelinfo'])) {
        showhiddenfields(array('shopid' => $_SGLOBAL['panelinfo']['itemid']));
    } elseif ($editvalue['shopid']) {
        showhiddenfields(array('shopid' => $editvalue['shopid']));
    }
    showhiddenfields(array('itemid' => $editvalue['itemid']));
    showhiddenfields(array('nid' => $editvalue['nid']));
    if ($_GET['action'] == 'edit') {
        showhiddenfields(array('nocheckcatid' => 1));
    }
    showhiddenfields(array('valuesubmit' => 'yes'));
    showsubmit('settingsubmit', 'submit', '');
    showtablefooter();
    showformfooter();
    bind_ajax_form();
    echo '<script type="text/javascript" charset="' . $_G['charset'] . '">loadcalendar();</script>';
    if ($editvalue['catid']) {
        echo '<script type="text/javascript" charset="' . $_G['charset'] . '">getattributes();</script>';
    }
}
function getgrouplist()
{
    global $_G, $_SGLOBAL;
    $grouplist = array(array(0, lang('shop_group')));
    foreach ($_SGLOBAL['shopgrouparr'] as $groupid => $group) {
        $grouplist[] = array($groupid, $group['title']);
    }
            $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";
        }
示例#22
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');
    }
}
示例#23
0
            case 'album':
                $shareurl = "home.php?mod=space&uid={$share['fromuid']}&do=album&id={$share['itemid']}&modalbumkey={$share['modkey']}";
                $sharetitle = lang('admincp', 'share_type_album');
                break;
            case 'article':
                $shareurl = "portal.php?mod=view&aid={$share['itemid']}&modarticlekey={$share['modkey']}";
                $sharetitle = lang('admincp', 'share_type_article');
                break;
        }
        showtagheader('tbody', '', true, 'hover');
        showtablerow("id=\"mod_{$share['sid']}_row1\"", array("id=\"mod_{$share['sid']}_row1_op\" rowspan=\"3\" class=\"rowform threadopt\" style=\"width:80px;\"", '', 'width="120"', 'width="120"', 'width="55"', 'width="55"'), array("<ul class=\"nofloat\"><li><input class=\"radio\" type=\"radio\" name=\"moderate[{$share['sid']}]\" id=\"mod_{$share['sid']}_1\" value=\"validate\" onclick=\"mod_setbg({$share['sid']}, 'validate');\"><label for=\"mod_{$share['sid']}_1\">{$lang['validate']}</label></li><li><input class=\"radio\" type=\"radio\" name=\"moderate[{$share['sid']}]\" id=\"mod_{$share['sid']}_2\" value=\"delete\" onclick=\"mod_setbg({$share['sid']}, 'delete');\"><label for=\"mod_{$share['sid']}_2\">{$lang['delete']}</label></li><li><input class=\"radio\" type=\"radio\" name=\"moderate[{$share['sid']}]\" id=\"mod_{$doing['doid']}_3\" value=\"ignore\" onclick=\"mod_setbg({$share['sid']}, 'ignore');\"><label for=\"mod_{$share['sid']}_3\">{$lang['ignore']}</label></li></ul>", "<h3><a href=\"javascript:;\" onclick=\"display_toggle({$share[sid]});\">{$short_desc} {$share_censor_text}</a></h3>", $sharetitle, "<p><a target=\"_blank\" href=\"" . ADMINSCRIPT . "?action=members&operation=search&uid={$share['uid']}&submit=yes\">{$share['username']}</a></p> <p>{$share['dateline']}</p>", "<a target=\"_blank\" href=\"{$shareurl}\">{$lang['view']}</a>"));
        showtablerow("id=\"mod_{$share['sid']}_row2\"", 'colspan="4" style="padding: 10px; line-height: 180%;"', '<div style="overflow: auto; overflow-x: hidden; max-height:120px; height:auto !important; height:100px; word-break: break-all;">' . $share['body_general'] . '</div>');
        showtablerow("id=\"mod_{$share['sid']}_row3\"", 'class="threadopt threadtitle" colspan="4"', "<a href=\"?action=moderate&operation=shares&fast=1&sid={$share['sid']}&moderate[{$share['sid']}]=validate&page={$page}&frame=no\" target=\"fasthandle\">{$lang['validate']}</a> | <a href=\"?action=moderate&operation=shares&fast=1&sid={$share['sid']}&moderate[{$share['sid']}]=delete&page={$page}&frame=no\" target=\"fasthandle\">{$lang['delete']}</a> | <a href=\"?action=moderate&operation=shares&fast=1&sid={$share['sid']}&moderate[{$share['sid']}]=ignore&page={$page}&frame=no\" target=\"fasthandle\">{$lang['ignore']}</a>");
        showtagfooter('tbody');
    }
    showsubmit('modsubmit', 'submit', '', '<a href="#all" onclick="mod_setbg_all(\'validate\')">' . cplang('moderate_all_validate') . '</a> &nbsp;<a href="#all" onclick="mod_setbg_all(\'delete\')">' . cplang('moderate_all_delete') . '</a> &nbsp;<a href="#all" onclick="mod_setbg_all(\'ignore\')">' . cplang('moderate_all_ignore') . '</a> &nbsp;<a href="#all" onclick="mod_cancel_all();">' . cplang('moderate_all_cancel') . '</a>', $multipage, false);
    showtablefooter();
    showformfooter();
} else {
    $moderation = array('validate' => array(), 'delete' => array(), 'ignore' => array());
    $validates = $deletes = $ignores = 0;
    if (is_array($moderate)) {
        foreach ($moderate as $sid => $act) {
            $moderation[$act][] = $sid;
        }
    }
    if (!empty($moderation['validate'])) {
        require_once libfile('function/feed');
        $validates = C::t('home_share')->update($moderation['validate'], array('status' => 0));
        foreach (C::t('home_share')->fetch_all($moderation['validate']) as $share) {
            switch ($share['type']) {
示例#24
0
\tfunction page(number) {
\t\t\$('attachmentforum').page.value=number;
\t\t\$('attachmentforum').searchsubmit.click();
\t}
</script>
EOT;
        showtagheader('div', 'admin', $searchsubmit);
        showformheader('attach', '', 'attachmentforum');
        showhiddenfields(array('page' => $page, 'nomatched' => $nomatched, 'inforum' => $inforum, 'sizeless' => $sizeless, 'sizemore' => $sizemore, 'dlcountless' => $dlcountless, 'dlcountmore' => $dlcountmore, 'daysold' => $daysold, 'filename' => $filename, 'keywords' => $keywords, 'author' => $author));
        echo '<input type="submit" name="searchsubmit" value="' . lang('submit') . '" class="btn" style="display: none" />';
        showformfooter();
        showformheader('attach&frame=no', 'target="attachmentframe"');
        showtableheader();
        showsubtitle(array('', 'filename', 'attach_path', 'author', 'attach_thread', 'size', 'attach_downloadnums', ''));
        echo $attachments;
        showsubmit('deletesubmit', 'submit', 'del', '<a href="###" onclick="$(\'admin\').style.display=\'none\';$(\'search\').style.display=\'\';" class="act lightlink normal">' . lang('research') . '</a>', $multipage);
        showtablefooter();
        showformfooter();
        echo '<iframe name="attachmentframe" style="display:none"></iframe>';
        showtagfooter('div');
    }
} else {
    if ($ids = implodeids($delete)) {
        $tids = $pids = 0;
        $query = $db->query("SELECT tid, pid, attachment, thumb, remote FROM {$tablepre}attachments WHERE aid IN ({$ids})");
        while ($attach = $db->fetch_array($query)) {
            dunlink($attach['attachment'], $attach['thumb'], $attach['remote']);
            $tids .= ',' . $attach['tid'];
            $pids .= ',' . $attach['pid'];
        }
        $db->query("DELETE FROM {$tablepre}attachments WHERE aid IN ({$ids})");
示例#25
0
            showformfooter();
        } else {
            showsubtitle(array('block_name', 'block_script', 'block_style', 'block_dateline', 'block_page', 'operation'));
            $multipage = '';
            $count = DB::result(DB::query("SELECT COUNT(*) FROM " . DB::table('common_block') . " b LEFT JOIN " . DB::table('common_template_block') . " tb ON tb.bid=b.bid WHERE {$wheresql}"), 0);
            if ($count) {
                $query = DB::query("SELECT b.*, tb.targettplname FROM " . DB::table('common_block') . " b LEFT JOIN " . DB::table('common_template_block') . " tb ON b.bid=tb.bid WHERE {$wheresql} {$ordersql} LIMIT {$start},{$perpage}");
                while ($value = DB::fetch($query)) {
                    if ($value['targettplname']) {
                        $diyurl = block_getdiyurl($value['targettplname']);
                        $diyurl = $diyurl['url'];
                        $tplname = isset($_G['cache']['diytemplatename'][$value['targettplname']]) ? $_G['cache']['diytemplatename'][$value['targettplname']] : $value['targettplname'];
                        $diypage[$value['bid']][$value['targettplname']] = $diyurl ? '<a href="' . $diyurl . '" target="_blank">' . $tplname . '</a>' : $tplname;
                    }
                    $list[$value['bid']] = $value;
                }
                if ($list) {
                    foreach ($list as $bid => $value) {
                        $inpage = empty($diypage[$bid]) ? cplang('block_page_unused') : implode('<br/>', $diypage[$bid]);
                        $theclass = block_getclass($value['blockclass'], true);
                        showtablerow('', '', array($value['name'] ? $value['name'] : cplang('block_name_null'), $theclass['script'][$value['script']], $value['styleid'] ? $theclass['style'][$value['styleid']]['name'] : lang('portalcp', 'blockstyle_diy'), !empty($value['dateline']) ? dgmdate($value['dateline']) : cplang('block_dateline_null'), $inpage, "<a href=\"portal.php?mod=portalcp&ac=block&op=block&bid={$value['bid']}&from=cp\" target=\"_blank\" onclick=\"showWindow('showblock',this.href);return false;\">" . cplang('block_setting') . "</a> &nbsp;&nbsp" . "<a href=\"portal.php?mod=portalcp&ac=block&op=data&bid={$value['bid']}&from=cp\" target=\"_blank\" onclick=\"showWindow('showblock',this.href);return false;\">" . cplang('block_data') . "</a> &nbsp;&nbsp" . $diyop . "&nbsp;&nbsp;<a href=\"" . ADMINSCRIPT . "?action=block&operation=perm&bid={$value['bid']}\">" . cplang('portalcategory_perm') . '</a>'));
                    }
                }
                $multipage = multi($count, $perpage, $page, $mpurl);
            }
            showsubmit('', '', '', '<input type="submit" class="btn" name="clearsubmit" value="' . cplang('block_clear_unused') . '" />', $multipage);
            showtablefooter();
            showformfooter();
        }
    }
}
        showtablerow('class="header"', array('', 'class="td23 td28"', '', 'class="td29"'), array("", lang('plugin/wechat', 'response_message'), "<p class=\"mbn\">" . lang('plugin/wechat', 'response_custom') . " " . ($response['textback'] ? "<a class=\"normal\" href=\"" . ADMINSCRIPT . "?action=plugins&operation=config&do={$pluginid}&identifier=wechat&pmod=response_setting&text=restore\">[" . lang('plugin/wechat', 'response_switch_plugin_mode', array('plugin' => $response['textback']['plugin'])) . "]</a></p>" : '')));
        foreach ($response['text'] as $k => $text) {
            showtablerow('', array('', 'class="td23 td28"', 'class="td29"'), array("<input class=\"checkbox\" type=\"checkbox\" name=\"response[text][{$k}][delete]\" value=\"yes\">", "<div class=\"parentnode\"><input type=\"text\" class=\"txt\" size=\"30\" name=\"response[text][{$k}][keyword]\" value=\"" . dhtmlspecialchars($text['keyword']) . "\"></div>", "<textarea class=\"tarea\" name=\"response[text][{$k}][response]\" rows=\"5\" id=\"res_text_{$k}\" cols=\"40\">" . dhtmlspecialchars($text['response']) . "</textarea>" . "<br /><a href=\"javascript:;\" id=\"rsel\" onclick=\"showResource('res_text_{$k}')\">" . lang('plugin/wechat', 'resource_select') . "</a>"));
        }
        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', 'response_add_message') . '</a></div></td></tr>';
        echo <<<EOT
<script type="text/JavaScript">
var rowtypedata = [
[[1,''], [1, '<input name="newresponse[keyword][]" value="" size="30" type="text" class="txt">'], [1, '<textarea class="tarea" name="newresponse[response][]" rows="5" cols="40"></textarea>', 'td29']],
];
</script>
EOT;
    } else {
        showtablerow('class="header"', array('', 'class="td23 td28"', '', 'class="td29"'), array("", lang('plugin/wechat', 'response_message'), "<p>" . lang('plugin/wechat', 'response_plugin_mode', array('plugin' => $responsehook['receiveMsg::text']['plugin'])) . " <a class=\"normal\" href=\"" . ADMINSCRIPT . "?action=plugins&operation=config&do={$pluginid}&identifier=wechat&pmod=response_setting&text=custom\">[" . lang('plugin/wechat', 'response_switch_custom_mode') . "]</a></p>"));
    }
    showsubmit('menusubmit', 'submit', 'del');
    showtablefooter();
    showformfooter();
} else {
    if (!empty($_GET['newresponse'])) {
        foreach ($_GET['newresponse']['keyword'] as $k => $keyword) {
            $item = array('keyword' => $keyword, 'response' => $_GET['newresponse']['response'][$k]);
            $response['text'][] = $item;
        }
    }
    foreach ($_GET['response']['text'] as $k => $value) {
        if ($value['delete']) {
            unset($response['text'][$k]);
            continue;
        }
        $response['text'][$k] = $value;
示例#27
0
            $multi = str_replace("window.location='" . ADMINSCRIPT . "?action=recyclebinpost&amp;page='+this.value", "page(this.value)", $multi);
        }
        showsubmit('rbsubmit', 'submit', '', '<a href="#rb" onclick="checkAll(\'option\', $(\'rbform\'), \'delete\')">' . cplang('recyclebin_all_delete') . '</a> &nbsp;<a href="#rb" onclick="checkAll(\'option\', $(\'rbform\'), \'undelete\')">' . cplang('recyclebin_all_undelete') . '</a> &nbsp;<a href="#rb" onclick="checkAll(\'option\', $(\'rbform\'), \'ignore\')">' . cplang('recyclebin_all_ignore') . '</a> &nbsp;', $multi);
        showtablefooter();
        showformfooter();
        echo '<iframe name="rbframe" style="display:none"></iframe>';
        showtagfooter('div');
    }
} elseif ($operation == 'clean') {
    if (!submitcheck('cleanrbsubmit', 1)) {
        shownav('topic', 'nav_recyclebinpost');
        showsubmenu('nav_recyclebinpost', array(array('recyclebinpost_list', 'recyclebinpost', 0), array('search', 'recyclebinpost&operation=search', 0), array('clean', 'recyclebinpost&operation=clean', 1)));
        showformheader('recyclebinpost&operation=clean');
        showtableheader('recyclebinpost_clean');
        showsetting('recyclebinpost_clean_days', 'days', '30', 'text');
        showsubmit('cleanrbsubmit');
        showtablefooter();
        showformfooter();
    } else {
        $deletetids = array();
        $pernum = 200;
        $postsdel = intval($_GET['postsdel']);
        $days = intval($_GET['days']);
        $timestamp = TIMESTAMP - max(0, $days * 86400);
        $postlist = array();
        loadcache('posttableids');
        $posttables = !empty($_G['cache']['posttableids']) ? $_G['cache']['posttableids'] : array(0);
        foreach ($posttables as $ptid) {
            foreach (C::t('forum_post')->fetch_all_pid_by_invisible_dateline($ptid, -5, $timestamp, 0, $pernum) as $post) {
                $postlist[$ptid][] = $post['pid'];
            }
示例#28
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) {
示例#29
0
        }
        ?>
<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);
            $threadsdel += $delcount;
示例#30
0
             $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']) {
         cpmsg('tasks_basic_invalid', '', 'error');
     } elseif (($_G['gp_starttime'] != $task['starttime'] || $_G['gp_endtime'] != $task['endtime']) && ($_G['gp_endtime'] && $_G['gp_endtime'] <= TIMESTAMP || $_G['gp_starttime'] && $_G['gp_endtime'] && $_G['gp_endtime'] <= $_G['gp_starttime'])) {
         cpmsg('tasks_time_invalid', '', 'error');
     } elseif ($reward && (!$prize || $reward == 'credit' && !$bonus)) {
         cpmsg('tasks_reward_invalid', '', 'error');