Beispiel #1
0
if (empty($uclass)) {
    $uclass = '';
}
$uclass && ($param_suffix .= "&uclass={$uclass}");
$url_type = 'mcenter';
include 'urlsarr.inc.php';
if ($action == 'murlsedit') {
    url_nav(lang('mcenterconfig'), $urlsarr, 'mu', 10);
    $murls = fetch_arr($uclass);
    if (!submitcheck('bmurlsedit')) {
        $arr = array();
        $uclassarr = array('' => lang('alltype')) + $uclassarr;
        foreach ($uclassarr as $k => $v) {
            $arr[] = $uclass == $k ? "<b>-{$v}-</b>" : "<a href=\"?entry=murls&action=murlsedit&uclass={$k}\">{$v}</a>";
        }
        echo tab_list($arr, 10, 0);
        tabheader(lang('murl_admin') . "&nbsp; <a href=\"?entry=murls&action=murladd{$param_suffix}\">>>" . lang('add') . "</a>", 'murlsedit', "?entry=murls&action=murlsedit{$param_suffix}", '7');
        trcategory(array(lang('delete'), lang('enable'), lang('cname'), lang('type'), lang('remark'), lang('order'), lang('url'), lang('copy'), lang('edit')));
        foreach ($murls as $muid => $murl) {
            echo "<tr class=\"txt\">" . "<td class=\"txtC w30\"><input class=\"checkbox\" type=\"checkbox\" name=\"delete[{$muid}]\" value=\"{$muid}\"" . ($murl['issys'] ? ' disabled' : '') . "></td>\n" . "<td class=\"txtC w30\"><input class=\"checkbox\" type=\"checkbox\" name=\"murlsnew[{$muid}][available]\" value=\"1\"" . ($murl['available'] ? ' checked' : '') . "></td>\n" . "<td class=\"txtC w100\"><input type=\"text\" size=\"10\" name=\"murlsnew[{$muid}][cname]\" value=\"{$murl['cname']}\"></td>\n" . "<td class=\"txtC w80\">" . @$uclassarr[$murl['uclass']] . "</td>\n" . "<td class=\"txtC w160\"><input type=\"text\" size=\"25\" name=\"murlsnew[{$muid}][remark]\" value=\"{$murl['remark']}\"></td>\n" . "<td class=\"txtC w60\"><input type=\"text\" size=\"4\" name=\"murlsnew[{$muid}][vieworder]\" value=\"{$murl['vieworder']}\"></td>\n" . "<td class=\"txtL\">{$murl['url']}</td>\n" . "<td class=\"txtC w30\"><a href=\"?entry=murls&action=murlcopy&muid={$muid}\" onclick=\"return floatwin('open_murlsedit',this)\">" . lang('copy') . "</a></td>\n" . "<td class=\"txtC w30\"><a href=\"?entry=murls&action=murldetail&muid={$muid}\" onclick=\"return floatwin('open_murlsedit',this)\">" . lang('detail') . "</a></td></tr>\n";
        }
        tabfooter('bmurlsedit', lang('modify'));
        a_guide('murlsedit');
    } else {
        if (!empty($delete)) {
            foreach ($delete as $muid) {
                if ($murls[$muid]['issys']) {
                    continue;
                }
                $db->query("DELETE FROM {$tblprefix}murls WHERE muid='{$muid}'");
                unset($murlsnew[$muid]);
Beispiel #2
0
 $checked != '-1' && ($wheresql .= ($wheresql ? ' AND ' : '') . "checked='{$checked}'");
 $mname && ($wheresql .= ($wheresql ? ' AND ' : '') . "mname LIKE '%" . str_replace(array(' ', '*'), '%', addcslashes($mname, '%_')) . "%'");
 $indays && ($wheresql .= ($wheresql ? ' AND ' : '') . "createdate>'" . ($timestamp - 86400 * $indays) . "'");
 $outdays && ($wheresql .= ($wheresql ? ' AND ' : '') . "createdate<'" . ($timestamp - 86400 * $outdays) . "'");
 $filterstr = '';
 foreach (array('viewdetail', 'matid', 'checked', 'mname', 'indays', 'outdays') as $k) {
     $filterstr .= "&{$k}=" . rawurlencode(stripslashes(${$k}));
 }
 $wheresql = $wheresql ? "WHERE " . $wheresql : '';
 if (!submitcheck('barcsedit')) {
     $checkedarr = array('-1' => lang('nolimit'), '0' => lang('nocheck'), '1' => lang('checked'));
     $matidsarr = array();
     foreach ($matypes as $k => $v) {
         $matidsarr[] = $matid == $k ? "<b>{$v['cname']}</b>" : "<a href=\"?entry=marchives&action=marchivesedit{$param_suffix}&matid={$k}\">{$v['cname']}</a>";
     }
     echo tab_list($matidsarr, 6);
     tabheader(lang('filter0') . $matypes[$matid]['cname'] . viewcheck('viewdetail', $viewdetail, $actionid . 'tbodyfilter') . '&nbsp; &nbsp; ' . strbutton('bfilter', 'filter0'), $actionid . 'arcsedit', "?entry=marchives&action=marchivesedit&page={$page}{$param_suffix}");
     echo "<tbody id=\"{$actionid}tbodyfilter\" style=\"display: " . (empty($viewdetail) ? 'none' : '') . "\">";
     trhidden('matid', $matid);
     trbasic(lang('check_state'), '', makeradio('checked', $checkedarr, $checked), '');
     trbasic(lang('search_member'), 'mname', $mname, 'text', lang('agsearchkey'));
     trrange(lang('add_date'), array('outdays', empty($outdays) ? '' : $outdays, '', '&nbsp; ' . lang('day_before') . '&nbsp; -&nbsp; ', 5), array('indays', empty($indays) ? '' : $indays, '', '&nbsp; ' . lang('day_in'), 5));
     echo "</tbody>";
     tabfooter();
     $pagetmp = $page;
     do {
         $query = $db->query("SELECT * {$fromsql} {$wheresql} ORDER BY maid DESC LIMIT " . ($pagetmp - 1) * $atpp . ",{$atpp}");
         $pagetmp--;
     } while (!$db->num_rows($query) && $pagetmp);
     $itemstr = '';
     while ($row = $db->fetch_array($query)) {
Beispiel #3
0
if (empty($action)) {
    url_nav(lang('usualtagsadmin'), $urlsarr, 'usualtags');
    if (!submitcheck('busualtagsedit')) {
        $rsubmiturl = "?entry=usualtags{$param_suffix}" . ($utclass ? "&utclass={$utclass}" : '');
        $tagclass['no_class'] = lang('noclass');
        if (empty($utclass)) {
            foreach ($tagclass as $k => $v) {
                $utclass = $k;
                break;
            }
        }
        $utclassarr = array();
        foreach ($tagclass as $k => $v) {
            $utclassarr[] = $utclass == $k ? "<b>-{$v}-</b>" : "<a href=\"?entry=usualtags&utclass={$k}{$param_suffix}\">{$v}</a>";
        }
        echo tab_list($utclassarr, 9, 0);
        unset($tagclass['no_class']);
        $helpstr = "&nbsp; &nbsp; [<a href=\"tools/taghelp.html\" target=\"08cmstaghelp\">" . lang('help') . "</a>]";
        tabheader(lang('usualtagsadmin') . $helpstr, 'usualtagsedit', $rsubmiturl, '9');
        trcategory(array("<input class=\"checkbox\" type=\"checkbox\" name=\"chkall\" onclick=\"checkall(this.form, 'selectid', 'chkall')\">", array(lang('usualtagremark'), 'txtL'), array(lang('tagname'), 'txtL'), array(lang('tagtype'), 'txtL'), array(lang('tag_style'), 'txtL'), lang('order'), lang('edit')));
        foreach ($usualtags as $key => $tag) {
            $nclasses = empty($tag['class']) ? array() : explode(',', $tag['class']);
            $nclasses = array_intersect($nclasses, array_keys($tagclass));
            if (in_array($utclass, $nclasses) || $utclass == 'no_class' && empty($nclasses)) {
                $ttype = $tag['ttype'];
                $title = $tag['title'];
                $vieworder = $tag['vieworder'];
                $tag = read_cache($ttype, $tag['tname'], '', $sid);
                $tclassstr = fetch_class($ttype, $tag['tclass']);
                $title || ($title = $tag['cname']);
                echo "<tr class=\"txt\">" . "<td class=\"txtC w40\"><input class=\"checkbox\" type=\"checkbox\" name=\"selectid[]\" value=\"{$key}\"></td>\n" . "<td class=\"txtL\"><input type=\"text\" size=\"30\" maxlength=\"30\" name=\"usualtagsnew[{$key}][title]\" value=\"" . mhtmlspecialchars($title) . "\"></td>\n" . "<td class=\"txtL\">" . mhtmlspecialchars($tag['cname']) . "</td>\n" . "<td class=\"txtL\">{$tclassstr}</td>\n" . "<td class=\"txtL\">" . tag_style($tag['ename'], $ttype) . "</td>\n" . "<td class=\"txtC w50\"><input type=\"text\" size=\"4\" name=\"usualtagsnew[{$key}][vieworder]\" value=\"{$vieworder}\"></td>\n" . "<td class=\"txtC w30\"><a href=\"?entry=mtags&action=mtagsdetail&ttype={$ttype}{$param_suffix}&tname={$tag['ename']}\" onclick=\"return floatwin('open_mtagsedit',this)\">" . lang('detail') . "</a></td>\n" . "</tr>\n";
Beispiel #4
0
                    $mtpls[$tplname] = array('cname' => stripslashes($mtplsnew[$tplname]['cname']), 'tpclass' => $mtplsnew[$tplname]['tpclass']);
                }
            }
        }
        cache2file($mtpls, 'mtpls', 'mtpls', $sid);
        adminlog(lang('addnormtemp'));
        amessage('temputfin', "?entry=mtpls&action=mtplsedit{$param_suffix}");
    }
} elseif ($action == 'mtplsedit') {
    url_nav(lang('tplallconfig'), $urlsarr, 'retpl', 12);
    $ftpclass = empty($ftpclass) ? 'index' : $ftpclass;
    $urlsarr_1 = array();
    foreach ($tpclasses as $k => $v) {
        $urlsarr_1[] = $ftpclass == $k ? "<b>-{$v}-</b>" : "<a href=\"?entry=mtpls&action=mtplsedit{$param_suffix}&ftpclass={$k}\">{$v}</a>";
    }
    echo tab_list($urlsarr_1, 7, 0);
    if (!submitcheck('bmtplsedit')) {
        tabheader(lang('norpagtempadm') . "&nbsp;&nbsp;&nbsp;&nbsp;[<a href=\"?entry=mtpls&action=mtpladd{$param_suffix}\">" . lang('add') . '</a>]', 'mtplsedit', "?entry=mtpls&action=mtplsedit{$param_suffix}&ftpclass={$ftpclass}", '9');
        trcategory(array('<input class="checkbox" type="checkbox" name="chkall" onclick="checkall(this.form)">' . lang('del'), lang('templatecname'), lang('type'), lang('templatefile'), lang('copy'), lang('content')));
        foreach ($mtpls as $k => $v) {
            if (empty($ftpclass) || $ftpclass == $v['tpclass']) {
                echo "<tr class=\"txt\">" . "<td class=\"txtC w40\"><input class=\"checkbox\" type=\"checkbox\" name=\"delete[{$k}]\" value=\"{$k}\">\n" . "<td class=\"txtL\"><input type=\"text\" size=\"25\" name=\"mtplsnew[{$k}][cname]\" value=\"" . mhtmlspecialchars($v['cname']) . "\"></td>\n" . "<td class=\"txtC w150\">" . $tpclasses[$v['tpclass']] . "</td>\n" . "<td class=\"txtL\">{$k}</td>\n" . "<td class=\"txtC w30\"><a href=\"?entry=mtpls&action=mtplcopy&tplname={$k}{$param_suffix}\" onclick=\"return floatwin('open_mtplsedit',this)\">" . lang('copy') . "</a></td>\n" . "<td class=\"txtC w30\"><a href=\"?entry=mtpls&action=mtpldetail&tplname={$k}{$param_suffix}\" onclick=\"return floatwin('open_mtplsedit',this)\">" . lang('edit') . "</a></td></tr>\n";
            }
        }
        tabfooter('bmtplsedit', lang('modify'));
        a_guide('mtplsedit');
    } else {
        if (!empty($delete)) {
            foreach ($delete as $k) {
                unset($mtplsnew[$k], $mtpls[$k]);
            }
Beispiel #5
0
 if (empty($matid)) {
     foreach ($matypes as $k => $v) {
         $matid = $k;
         break;
     }
 }
 if (empty($matid)) {
     amessage('no_matype_tplset');
 }
 $matype = read_cache('matype', $matid);
 if (!submitcheck('bmatype')) {
     $arr = array();
     foreach ($matypes as $k => $v) {
         $arr[] = $matid == $k ? "<b>-{$v['cname']}-</b>" : "<a href=\"?entry=tplconfig&action=tplmatype&matid={$k}{$param_suffix}\">{$v['cname']}</a>";
     }
     echo tab_list($arr, 6, 0);
     tabheader("[{$matype['cname']}]" . lang('tpl_set'), 'matype', "?entry=tplconfig&action=tplmatype&matid={$matid}{$param_suffix}");
     trbasic(lang('content_open_tpl'), 'matypenew[arctpl]', makeoption(array('' => lang('noset')) + mtplsarr('marchive'), $matype['arctpl']), 'select');
     trbasic(lang('content_limit_tpl'), 'matypenew[parctpl]', makeoption(array('' => lang('noset')) + mtplsarr('marchive'), $matype['parctpl']), 'select');
     trbasic(lang('search_tpl'), 'matypenew[srhtpl]', makeoption(array('' => lang('noset')) + mtplsarr('marchive'), $matype['srhtpl']), 'select');
     trbasic(lang('add_tpl'), 'matypenew[addtpl]', makeoption(array('' => lang('noset')) + mtplsarr('marchive'), $matype['addtpl']), 'select');
     tabfooter('bmatype');
     a_guide('tplmatype');
 } else {
     $matypenew['arctpl'] = empty($matypenew['arctpl']) ? '' : $matypenew['arctpl'];
     $matypenew['parctpl'] = empty($matypenew['parctpl']) ? '' : $matypenew['parctpl'];
     $matypenew['srhtpl'] = empty($matypenew['srhtpl']) ? '' : $matypenew['srhtpl'];
     $matypenew['addtpl'] = empty($matypenew['addtpl']) ? '' : $matypenew['addtpl'];
     $db->query("UPDATE {$tblprefix}matypes SET \n\t\t\t\t\tarctpl='{$matypenew['arctpl']}',\n\t\t\t\t\tparctpl='{$matypenew['parctpl']}',\n\t\t\t\t\tsrhtpl='{$matypenew['srhtpl']}',\n\t\t\t\t\taddtpl='{$matypenew['addtpl']}'\n\t\t\t\t\tWHERE matid='{$matid}'");
     updatecache('matypes');
     adminlog(lang('demomecomit'));
Beispiel #6
0
    }
}
tabheader(lang('arccomtemset'));
echo '<tr><td class="item2">';
echo tab_list($arr, 5);
echo '</td></tr>';
tabfooter();
if (!$sid) {
    $arr = array();
    foreach ($mcommus as $k => $v) {
        $v = read_cache('mcommu', $k);
        if ($v['addable']) {
            $arr[] = "<a href=\"?entry=mcommus&action=mcommudetail&cuid={$k}\">{$v['cname']}</a>";
        }
    }
    tabheader(lang('memcomtemset'));
    echo '<tr><td class="item2">';
    echo tab_list($arr, 5);
    echo '</td></tr>';
    tabfooter();
}
$arr = array();
$query = $db->query("SELECT cname FROM {$tblprefix}sptpls ORDER BY vieworder");
while ($item = $db->fetch_array($query)) {
    $arr[] = "<a href=\"?entry=sptpls&action=sptplsedit{$param_suffix}\">{$item['cname']}</a>";
}
tabheader(lang('sppagtemset'));
echo '<tr><td class="item2">';
echo tab_list($arr, 5);
echo '</td></tr>';
tabfooter();
Beispiel #7
0
//记录已经操作的步骤
$stepadds = oread_cache('stepadds');
//记录每个步骤中添加的id记录,直接用表名来记录id
$idsmap = oread_cache('idsmap');
//记录新旧id的对应关系
$stepsarr = array('subsites' => lang('newsubset'), 'currencys' => lang('currencytype'), 'mchannels' => lang('mchannel'), 'grouptypes' => lang('grouptype'), 'usergroups' => lang('usergroup'), 'commus' => lang('commuitem'), 'channels' => lang('achannel'), 'altypes' => lang('altype'), 'catalogs' => lang('catalog'), 'cotypes' => lang('cotypem'), 'coclasses' => lang('coclasssetting'), 'cnodes' => lang('catascnode'), 'fchannels' => lang('affixchannel'), 'fcatalogs' => lang('affixcoclass'), 'freeinfos' => lang('isolutepage'), 'templates' => lang('template'));
//显示页面顶部链接
$stepurls = array();
$i = 1;
foreach ($stepsarr as $k => $v) {
    $stepurls[] = "{$i} &nbsp;" . ($k == $action ? "<b>{$v}</b>" : "<a href=\"?entry=subsetup&action={$k}\">{$v}</a>") . (isset($stepeds[$k]) ? 'ok' : '');
    $i++;
}
tabheader(lang('contsubsinst') . '&nbsp; &nbsp; &nbsp; &nbsp; >><a href="?entry=subsetup&action=delupload">' . lang('delinupdatandrec') . '</a>');
echo "<tr class=\"txt\"><td class=\"txtC\" colspan=\"2\">";
echo tab_list($stepurls, 8);
echo "</td></tr>";
tabfooter();
unset($stepurls);
if ($action == 'subsites') {
    $n_operated = empty($nsid) ? false : true;
    load_cache('subsites');
    $do_enable = $n_operated ? false : true;
    $undo_enable = !$n_operated || isset($stepeds['currencys']) ? false : true;
    if (!submitcheck('bdo') && !submitcheck('bundo')) {
        if (!$n_operated) {
            $submitstr = '';
            tabheader(lang('addconsub'), 'subsiteadd', "?entry=subsetup&action=subsites", 2, 1, 1);
            trbasic(lang('subsitecname'), 'subsitenew[sitename]', '', 'text');
            trbasic(lang('subsstadir'), 'subsitenew[dirname]', '', 'text');
            trbasic(lang('substempldir'), 'subsitenew[templatedir]', '', 'text');
Beispiel #8
0
(!defined('M_COM') || !defined('M_ADMIN')) && exit('No Permission');
load_cache('btagnames,channels,fchannels,mchannels');
aheader();
backallow('tpl') || amessage('no_apermission');
$bclasses = array('common' => lang('common_message'), 'archive' => lang('archive_related'), 'cnode' => lang('catas_related'), 'freeinfo' => lang('freeinfo_related'), 'commu' => lang('commu_message'), 'member' => lang('member_related'), 'mcommu' => lang('membercommu'), 'marchive' => lang('marchive'), 'other' => lang('other'));
$datatypearr = array('text' => lang('text'), 'multitext' => lang('multitext'), 'htmltext' => lang('htmltext'), 'image' => lang('image_f'), 'images' => lang('images'), 'flash' => lang('flash'), 'flashs' => lang('flashs'), 'media' => lang('media'), 'medias' => lang('medias'), 'file' => lang('file_f'), 'files' => lang('files_f'), 'select' => lang('select'), 'mselect' => lang('mselect'), 'cacc' => lang('cacc'), 'date' => lang('date_f'), 'int' => lang('int'), 'float' => lang('float'), 'map' => lang('map'), 'vote' => lang('vote'));
$url_type = 'btags';
include 'urlsarr.inc.php';
if (empty($action)) {
    url_nav(lang('originallogo'), $urlsarr, 'btag');
    $bclass = empty($bclass) ? 'common' : $bclass;
    $arr = array();
    foreach ($bclasses as $k => $v) {
        $arr[] = $bclass == $k ? "<b>-{$v}-</b>" : "<a href=\"?entry=btags&bclass={$k}\">{$v}</a>";
    }
    echo tab_list($arr, 9, 0);
    $sclasses = array();
    if ($bclass == 'archive') {
        foreach ($channels as $chid => $channel) {
            $sclasses[$chid] = $channel['cname'];
        }
    } elseif ($bclass == 'cnode') {
        $sclasses = array('catalog' => lang('catalog'), 'coclass' => lang('coclass'));
    } elseif ($bclass == 'freeinfo') {
        foreach ($fchannels as $chid => $channel) {
            $sclasses[$chid] = $channel['cname'];
        }
    } elseif ($bclass == 'member') {
        foreach ($mchannels as $chid => $channel) {
            $sclasses[$chid] = $channel['cname'];
        }