Пример #1
0
function m_sites($urlpre = '', $num = 5)
{
    global $sid, $infloat, $handlekey;
    $sidsarr = array(0 => lang('msite')) + sidsarr(1);
    $i = 0;
    tabheader(lang('selectsite'), '', '', $num);
    foreach ($sidsarr as $k => $v) {
        if (!($i % $num)) {
            echo "<tr>";
        }
        echo "<td class=\"item2\" width=\"" . intval(100 / $num) . "%\">>>" . ($sid == $k ? "<b>{$v}</b>" : "<a href=\"{$urlpre}" . ($k ? "&sid={$k}" : '') . "\"" . ($infloat ? " onclick=\"floatwin('open_{$handlekey}',this)\"" : '') . ">{$v}</a>") . "</td>\n";
        $i++;
        if (!($i % $num)) {
            echo "</tr>\n";
        }
    }
    if ($i % $num) {
        while ($i % $num) {
            echo "<td class=\"item2\" width=\"" . intval(100 / $num) . "%\"></td>\n";
            $i++;
        }
        echo "</tr>\n";
    }
    tabfooter();
}
Пример #2
0
function view_cucatalogurls()
{
    global $action;
    tabheader(lang('co_class_manager'), '', '', 4);
    echo "<tr class=\"txt\">\n";
    echo "<td class=\"txtL w25B\">" . (in_str('rcatalog', $action) ? "<b>" . lang('reply_class_manager') . "</b>" : "<a href=\"?entry=cucatalogs&action=rcatalogsedit\">" . lang('reply_class_manager') . "</a>") . "</td>\n";
    echo "<td class=\"txtL w25B\"></td>\n";
    echo "<td class=\"txtL w25B\"></td>\n";
    echo "<td class=\"txtL w25B\"></td>\n";
    echo "</tr>\n";
    tabfooter();
}
Пример #3
0
            amessage('enameillegal', '?entry=alangs&action=alangsedit');
        }
        $alangnew['ename'] = strtolower(trim(strip_tags($alangnew['ename'])));
        if (in_array($alangnew['ename'], array_keys($alangs))) {
            amessage('enamerepeat', '?entry=alangs&action=alangsedit');
        }
        $alangnew['content'] = trim($alangnew['content']);
        $db->query("INSERT INTO {$tblprefix}alangs SET \n\t\t\t\t\tename='{$alangnew['ename']}', \n\t\t\t\t\tcontent='{$alangnew['content']}',\n\t\t\t\t\tcreatedate='{$timestamp}'\n\t\t\t\t\t");
        adminlog(lang('add_alang'));
        updatecache('alangs');
        amessage('alangaddfin', "?entry=alangs&action=alangsedit");
    }
} elseif ($action == 'alangdetail' && $ename) {
    if (!($alang = $db->fetch_one("SELECT * FROM {$tblprefix}alangs WHERE ename='{$ename}'"))) {
        amessage('chooseclang');
    }
    if (!submitcheck('balangdetail')) {
        tabheader(lang('edit_alang'), 'alangdetail', "?entry=alangs&action=alangdetail&ename={$ename}");
        trbasic(lang('alang_ename'), '', $alang['ename'], '');
        trbasic(lang('alang_content'), 'alangnew[content]', $alang['content'], 'textarea');
        tabfooter('balangdetail');
        a_guide('alangdetail');
    } else {
        $alangnew['content'] = trim($alangnew['content']);
        $sql = $alangnew['content'] != $alang['content'] ? ",createdate='{$timestamp}'" : '';
        $db->query("UPDATE {$tblprefix}alangs SET \n\t\t\t\t\tcontent='{$alangnew['content']}'\n\t\t\t\t\t{$sql}\n\t\t\t\t\tWHERE ename='{$ename}'");
        adminlog(lang('edit_alang_detail'));
        updatecache('alangs');
        amessage('alangmodfin', "?entry=alangs&action=alangsedit");
    }
}
Пример #4
0
        check_submit_func($submitstr);
        a_guide('memberdetail');
    } else {
        foreach ($grouptypes as $gtid => $grouptype) {
            if ($grouptype['mode'] < 2 && !in_array($mchid, explode(',', $grouptype['mchids'])) && ($gtid != 2 || $backamember)) {
                $minfosnew['grouptype' . $gtid . 'date'] = !$minfosnew['grouptype' . $gtid] || !isdate($minfosnew['grouptype' . $gtid . 'date']) ? '0' : strtotime($minfosnew['grouptype' . $gtid . 'date']);
                $actuser->handgrouptype($gtid, $minfosnew['grouptype' . $gtid], $minfosnew['grouptype' . $gtid . 'date']);
            }
        }
        $actuser->updatedb();
        adminlog(lang('detail_edit_member'));
        amessage('membermodifyfinish', M_REFERER);
    }
} elseif ($action == 'allowance' && $mid) {
    if (!submitcheck('bmemberdetail')) {
        $a_field = new cls_field();
        $submitstr = '';
        tabheader(lang('issue_allowance_manager') . '&nbsp;:&nbsp;[' . $mchannel['cname'] . ']' . $actuser->info['mname'], 'memberdetail', "?entry=member&action=allowance&mid={$mid}", 2, 1, 1);
        trbasic(lang('aw_arc_issue_limit'), 'minfosnew[arcallowance]', $actuser->info['arcallowance']);
        trbasic(lang('aw_commu_issue_limit'), 'minfosnew[cuallowance]', $actuser->info['cuallowance']);
        tabfooter('bmemberdetail');
        check_submit_func($submitstr);
        a_guide('memberdetail');
    } else {
        $actuser->updatefield('arcallowance', empty($minfosnew['arcallowance']) ? 0 : max(0, intval($minfosnew['arcallowance'])), 'main');
        $actuser->updatefield('cuallowance', empty($minfosnew['cuallowance']) ? 0 : max(0, intval($minfosnew['cuallowance'])), 'main');
        $actuser->updatedb();
        adminlog(lang('detail_edit_member'));
        amessage('membermodifyfinish', M_REFERER);
    }
}
Пример #5
0
<?php

!defined('M_COM') && exit('No Permission');
if (!submitcheck('bmemberpwd')) {
    tabheader(lang('memberpwdsetting'), 'memberpwd', '?action=memberpwd', 2, 0, 1);
    trbasic(lang('membercname'), '', $curuser->info['mname'], '');
    trbasic(lang('oldpwd'), 'opassword', '', 'password');
    trbasic(lang('newpwd'), 'npassword', '', 'password');
    trbasic(lang('repwd'), 'npassword2', '', 'password');
    $submitstr = '';
    $submitstr .= makesubmitstr('opassword', 1, 0, 0, 15);
    $submitstr .= makesubmitstr('npassword', 1, 0, 0, 15);
    $submitstr .= makesubmitstr('npassword2', 1, 0, 0, 15);
    $submitstr .= tr_regcode('login');
    tabfooter('bmemberpwd');
    check_submit_func($submitstr);
} else {
    if (!regcode_pass('login', empty($regcode) ? '' : trim($regcode))) {
        mcmessage('regcodeerror', '?action=memberpwd');
    }
    $opassword = trim($opassword);
    $npassword = trim($npassword);
    $npassword2 = trim($npassword2);
    if (md5(md5($opassword)) != $curuser->info['password']) {
        mcmessage('oldpasserror', '?action=memberpwd');
    }
    if ($npassword != $npassword2) {
        mcmessage('notsamepwd', '?action=memberpwd');
    }
    if (!$npassword || strlen($npassword) > 15 || $npassword != addslashes($npassword)) {
        mcmessage('memberpwdillegal', '?action=memberpwd');
Пример #6
0
        ${$var . 'arr'} = explode(',', $cnode[$var]);
    }
    if (!submitcheck('bcnodedetail')) {
        tabheader(lang('cnode_detail_set'), 'cnodedetail', "?entry={$entry}&action={$action}{$param_suffix}&cnid={$cnid}&forward=" . urlencode($forward));
        trbasic(lang('cnode_name'), '', cnode_cname($cnode['ename']), '');
        trbasic(lang('cnode_alias'), 'cnodenew[alias]', $cnode['alias']);
        trbasic(lang('cnode_url'), 'cnodenew[appurl]', $cnode['appurl'], 'btext', lang('agappurl'));
        for ($i = 0; $i <= $cnode['addnum']; $i++) {
            $pvar = $i ? lang('addp') . $i : lang('index');
            trbasic($pvar . lang('template'), 'tplsnew[]', makeoption(array('' => lang('noset')) + mtplsarr('cindex'), empty($tplsarr[$i]) ? '' : $tplsarr[$i]), 'select');
            trbasic($pvar . lang('wtemplate'), 'wtplsnew[]', makeoption(array('' => lang('noset')) + mtplsarr('wap'), empty($wtplsarr[$i]) ? '' : $wtplsarr[$i]), 'select');
            trbasic($pvar . lang('staticfomart'), 'urlsnew[]', empty($urlsarr[$i]) ? '' : $urlsarr[$i], 'btext', !$i ? lang('agcnstaticfomart') : '');
            trbasic($pvar . lang('ifstatic'), "staticsnew[{$i}]", makeoption(array(0 => lang('staticsys'), 1 => lang('keepdnc'), 2 => lang('create_static')), empty($staticsarr[$i]) ? 0 : $staticsarr[$i]), 'select');
            trbasic($pvar . lang('staticperiod'), 'periodsnew[]', empty($periodsarr[$i]) ? '' : $periodsarr[$i], 'text');
        }
        tabfooter('bcnodedetail');
        a_guide('cnodedetail');
    } else {
        $cnodenew['alias'] = trim(strip_tags($cnodenew['alias']));
        $cnodenew['appurl'] = trim($cnodenew['appurl']);
        $sqlstr = "alias='{$cnodenew['alias']}',appurl='{$cnodenew['appurl']}'";
        foreach (array('tpls', 'wtpls', 'urls', 'statics', 'periods') as $var) {
            $cnodenew[$var] = empty(${$var . 'new'}) ? '' : implode(',', ${$var . 'new'});
            $sqlstr .= ",{$var}='{$cnodenew[$var]}'";
        }
        $db->query("UPDATE {$tblprefix}cnodes SET {$sqlstr} WHERE cnid={$cnid}");
        adminlog(lang('detail_catas_cnode'));
        updatecache('cnodes', '', $sid);
        amessage('cnodesetfinish', axaction(6, $forward));
    }
}
Пример #7
0
                $sn++;
                echo "<tr class=\"txt\">" . "<td class=\"txtC w40\">{$sn}</td>\n" . "<td class=\"txtL\">" . $splang['cname'] . "</td>\n" . "<td class=\"txtC w120\">" . $types[$splang['type']] . "</td>\n" . "<td class=\"txtC w40\"><a href=\"?entry=splangs&action=splangdetail&slid={$slid}\">" . lang('edit') . "</a></td></tr>\n";
            }
        }
        tabfooter();
        a_guide('splangsedit');
    }
} elseif ($action == 'splangdetail' && $slid) {
    $forward = empty($forward) ? M_REFERER : $forward;
    $splang = fetch_one($slid);
    if (!submitcheck('bsplangdetail')) {
        tabheader(lang('splangset'), 'splangsdetail', '?entry=splangs&action=splangdetail&slid=' . $slid . '&forward=' . urlencode($forward));
        trbasic(lang('splangcname'), '', $splang['cname'], '');
        trbasic(lang('splangtype'), '', $types[$splang['type']], '');
        trbasic(lang('splangcontent'), 'splangnew[content]', $splang['content'], 'btextarea');
        tabfooter('bsplangdetail');
        a_guide('splangdetail');
    } else {
        if (empty($splangnew['content'])) {
            amessage('datamissing', M_REFERER);
        }
        $db->query("UPDATE {$tblprefix}splangs SET content='{$splangnew['content']}' WHERE slid='{$slid}'");
        updatecache('splangs');
        adminlog(lang('detaimodifysplang'));
        amessage('splmodfin', $forward);
    }
}
function fetch_arr($type)
{
    global $db, $tblprefix;
    $items = array();
Пример #8
0
 $mcommu = fetch_one($cuid);
 empty($mcommu) && amessage('chooseitem');
 if (!submitcheck('bmcommudetail')) {
     tabheader(lang('memcomitset'), 'mcommudetail', "?entry=mcommus&action=mcommudetail&cuid={$cuid}", 2, 0, 0, 1);
     trbasic(lang('item_type'), '', $cclassarr[$mcommu['cclass']], '');
     trbasic(lang('item_name'), 'mcommunew[cname]', $mcommu['cname']);
     if (!empty($mcommu['usetting'])) {
         $str = '';
         foreach ($mcommu['usetting'] as $k => $v) {
             $str .= $k . '=' . $v . "\n";
         }
         $mcommu['usetting'] = $str;
         unset($str);
     }
     include M_ROOT . './include/mcommus/' . $mcommu['cclass'] . '.php';
     tabfooter('bmcommudetail', lang('modify'));
     a_guide('mcommudetail');
 } else {
     $submitmode = true;
     @(include M_ROOT . './include/mcommus/' . $mcommu['cclass'] . '.php');
     $mcommunew['cname'] = empty($mcommunew['cname']) ? $mcommu['cname'] : $mcommunew['cname'];
     $mcommunew['cutpl'] = empty($mcommunew['cutpl']) ? '' : $mcommunew['cutpl'];
     $mcommunew['addtpl'] = empty($mcommunew['addtpl']) ? '' : $mcommunew['addtpl'];
     $mcommunew['func'] = empty($mcommunew['func']) ? '' : $mcommunew['func'];
     $mcommunew['setting'] = !empty($mcommunew['setting']) ? addslashes(serialize($mcommunew['setting'])) : '';
     $mcommunew['ucadd'] = empty($mcommunew['ucadd']) ? '' : trim($mcommunew['ucadd']);
     $mcommunew['ucvote'] = empty($mcommunew['ucvote']) ? '' : trim($mcommunew['ucvote']);
     $mcommunew['uadetail'] = empty($mcommunew['uadetail']) ? '' : trim($mcommunew['uadetail']);
     $mcommunew['umdetail'] = empty($mcommunew['umdetail']) ? '' : trim($mcommunew['umdetail']);
     if (!empty($mcommunew['usetting'])) {
         $mcommunew['usetting'] = str_replace("\r", "", $mcommunew['usetting']);
Пример #9
0
         }
     }
     $a_field = new cls_field();
     foreach ($fields as $k => $v) {
         if (!$v['isfunc']) {
             $a_field->init();
             $a_field->field = $v;
             $a_field->oldvalue = $oldrow[$k];
             if ($curuser->pmbypmids('field', $v['pmid'])) {
                 $a_field->trfield('commentnew', '', 'c');
                 $submitstr .= $a_field->submitstr;
             }
         }
     }
     unset($a_field);
     tabfooter('bcommentdetail');
     check_submit_func($submitstr);
 } else {
     $c_upload = new cls_upload();
     $fields = fields_order($fields);
     $a_field = new cls_field();
     foreach ($ucotypes as $k => $v) {
         if (in_array('uccid' . $k, $citems) && $v['umode'] != 1) {
             $uedit->updatefield('uccid' . $k, $commentnew['uccid' . $k]);
             if ($v['emode']) {
                 $commentnew["uccid{$k}date"] = !isdate($commentnew["uccid{$k}date"]) ? 0 : strtotime($commentnew["uccid{$k}date"]);
                 if ($uedit->info["uccid{$k}"] && !$commentnew["uccid{$k}date"] && $v['emode'] == 2) {
                     amessage('setcoclass', axaction(2, M_REFERER), $v['cname']);
                 }
                 !$uedit->info["uccid{$k}"] && ($commentnew["uccid{$k}date"] = 0);
                 $uedit->updatefield("uccid{$k}date", $commentnew["uccid{$k}date"]);
Пример #10
0
             $a_field->field = $field;
             $a_field->isadd = 1;
             $a_field->trfield('farchiveadd', '', 'f', $chid);
             $submitstr .= $a_field->submitstr;
         }
     }
     unset($a_field);
     if (empty($fcatalog['nodurat'])) {
         foreach (array('startdate', 'enddate') as $var) {
             trbasic(lang($var), "farchiveadd[{$var}]", '', 'calendar');
             $submitstr .= makesubmitstr("farchiveadd[{$var}]", 0, 0, 0, 0, 'date');
         }
     }
     $submitstr .= tr_regcode('farchive');
     //显示验证码
     tabfooter('bfarchiveadd');
     check_submit_func($submitstr);
 } else {
     if (!regcode_pass('farchive', empty($regcode) ? '' : trim($regcode))) {
         mcmessage('safecodeerr', axaction(2, M_REFERER));
     }
     $c_upload = new cls_upload();
     $fields = fields_order($fields);
     $a_field = new cls_field();
     $sqlcommon = "fcaid='{$fcaid}',chid='{$chid}',mid='" . $curuser->info['mid'] . "',mname='" . $curuser->info['mname'] . "',createdate='{$timestamp}',updatedate='{$timestamp}'";
     $sqlcustom = "";
     foreach ($fields as $k => $v) {
         if (!$v['isadmin'] && !$v['isfunc']) {
             $a_field->init();
             $a_field->field = $v;
             $a_field->deal('farchiveadd');
Пример #11
0
i = 1;
{$a_field->submitstr}
if(i && !empty(mob.value) && ({$mobile} || mob.defaultValue != mob.value)){
\ti = _i;
\trmsg = checktext('msgcode',1,'','/^\\\\d{6}\$/');
\tif(dom=\$id('alert_msgcode'))dom.innerHTML = rmsg ? rmsg : '';
\tif(rmsg)i = false;
}
//<?

EOT;
                } else {
                    $submitstr .= $a_field->submitstr;
                }
            }
            tabfooter('barchivedetail');
            check_submit_func($submitstr);
            break;
        } else {
            $email = '';
            foreach ($fields as $k) {
                empty($memcertnew[$k]) && mcmessage('memcert_empty_field', M_REFERER);
            }
            $certdata = array('values' => $memcertnew, 'flags' => $flags);
            foreach ($fields as $k) {
                if (empty($flags[$k]) || stripslashes($memcertnew[$k]) != $curuser->info[$k]) {
                    if ($k == $memcert['mobile'] && ($msgcode_mode == 1 || $msgcode_mode == 2)) {
                        $curuser->detail_data();
                        @(list($inittime, $initcode) = maddslashes(explode("\t", authcode($m_cookie['08cms_msgcode'], 'DECODE')), 1));
                        if ($msgcode_mode == 1) {
                            $certdata['codes'][$k] = $initcode;
Пример #12
0
} elseif ($action == 'menudetail' && $mnid) {
    if (!($menu = $db->fetch_one("SELECT * FROM {$tblprefix}menus WHERE mnid='{$mnid}'"))) {
        amessage('choosemeit');
    }
    if (!submitcheck('bmenudetail')) {
        tabheader(lang('edit_' . ($issub ? 'subsite' : 'msite') . '_menu_item'), 'menudetail', "?entry=menus&action=menudetail&mnid={$mnid}{$sub_suffix}");
        $mtidsarr = array();
        $query = $db->query("SELECT * FROM {$tblprefix}mtypes WHERE fixed=0 AND issub={$issub} ORDER BY vieworder,mtid");
        while ($row = $db->fetch_array($query)) {
            $mtidsarr[$row['mtid']] = $row['title'];
        }
        trbasic(lang('belongcocl'), 'menunew[mtid]', makeoption($mtidsarr, $menu['mtid']), 'select');
        trbasic(lang('menuitemcname'), 'menunew[title]', $menu['title'], 'text');
        trbasic(lang('menuitemurl'), 'menunew[url]', $menu['url'], 'btext');
        trbasic(lang('meniteord'), 'menunew[vieworder]', $menu['vieworder'], 'text');
        tabfooter('bmenudetail');
        a_guide('menudetail');
    } else {
        $menunew['title'] = trim(strip_tags($menunew['title']));
        $menunew['url'] = trim(strip_tags($menunew['url']));
        $menunew['vieworder'] = max(0, intval($menunew['vieworder']));
        $menunew['mtid'] = empty($menunew['mtid']) ? 0 : max(0, intval($menunew['mtid']));
        (!$menunew['title'] || !$menunew['url']) && amessage('pleinpmetitandurl');
        !$menunew['mtid'] && amessage('pombecoc');
        $db->query("UPDATE {$tblprefix}menus SET \n\t\t\t\t\ttitle='{$menunew['title']}', \n\t\t\t\t\turl='{$menunew['url']}', \n\t\t\t\t\tmtid='{$menunew['mtid']}', \n\t\t\t\t\tvieworder='{$menunew['vieworder']}'\n\t\t\t\t\tWHERE mnid='{$mnid}'");
        adminlog(lang('edimenitdet'));
        updatecache('menus', $issub);
        amessage('menitemodfin', axaction(6, "?entry=menus&action=menusedit{$sub_suffix}"));
    }
} elseif ($action == 'mtypedel' && $mtid) {
    if ($db->result_one("SELECT COUNT(*) FROM {$tblprefix}menus WHERE mtid='{$mtid}'")) {
Пример #13
0
    }
} elseif ($action == 'gmodeldetail' && $gmid) {
    $gmodel = read_cache('gmodel', $gmid, '', $sid);
    empty($gmodel) && amessage('choosegatmod');
    empty($channels[$gmodel['chid']]) && amessage('modrelarcmodnoe');
    $gfields = empty($gmodel['gfields']) ? array() : $gmodel['gfields'];
    $fields = read_cache('fields', $gmodel['chid']);
    if (!submitcheck('bfieldsedit')) {
        $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'));
        tabheader($gmodel['cname'] . '-' . lang('gather_field_set'), 'gmodeldetail', "?entry=gmodels&action=gmodeldetail&gmid={$gmid}{$param_suffix}", '5');
        trcategory(array(lang('gather'), lang('onlylink'), array(lang('field_name'), 'txtL'), lang('field_ename'), lang('field_type')));
        foreach ($fields as $k => $field) {
            $islinkstr = $field['datatype'] != 'text' ? '-' : "<input class=\"checkbox\" type=\"checkbox\" name=\"fieldsnew[{$k}][islink]\" value=\"1\"" . (!empty($gfields[$k]) ? ' checked' : '') . ">";
            echo "<tr class=\"txt\">\n" . "<td class=\"txtC w40\"><input class=\"checkbox\" type=\"checkbox\" name=\"fieldsnew[{$k}][available]\" value=\"1\"" . (isset($gfields[$k]) ? ' checked' : '') . "></td>\n" . "<td class=\"txtC w50\">{$islinkstr}</td>\n" . "<td class=\"txtL\">{$field['cname']}</td>\n" . "<td class=\"txtC\">{$k}</td>\n" . "<td class=\"txtC w80\">" . $datatypearr[$field['datatype']] . "</td>\n" . "</tr>";
        }
        tabfooter('bfieldsedit');
        a_guide('gmodeldetail');
    } else {
        foreach ($fields as $k => $v) {
            if (!empty($fieldsnew[$k]['available'])) {
                $islink = empty($fieldsnew[$k]['islink']) ? 0 : 1;
                in_array($v['datatype'], array('image', 'flash', 'file', 'media')) && ($islink = 1);
                $newgfields[$k] = $islink;
            }
        }
        $gfieldsnew = empty($newgfields) ? '' : addslashes(serialize($newgfields));
        $db->query("UPDATE {$tblprefix}gmodels SET gfields='{$gfieldsnew}' WHERE gmid='{$gmid}'");
        updatecache('gmodels', '', $sid);
        adminlog(lang('det_modify_gather_model'));
        amessage('gathmodedifin', axaction(6, "?entry=gmodels&action=gmodeledit{$param_suffix}"));
    }
Пример #14
0
            $playernew['exts'] = preg_match("/[^a-z,A-Z0-9]+/", $playernew['exts']) ? $players[$plid]['exts'] : strtolower($playernew['exts']);
            $playernew['available'] = empty($playernew['available']) ? 0 : $playernew['available'];
            $db->query("UPDATE {$tblprefix}players SET \n\t\t\t\t\t\tcname='{$playernew['cname']}',\n\t\t\t\t\t\texts='{$playernew['exts']}',\n\t\t\t\t\t\tavailable='{$playernew['available']}',\n\t\t\t\t\t\tvieworder='{$playernew['vieworder']}' \n\t\t\t\t\t\tWHERE plid='{$plid}'");
        }
        updatecache('players');
        adminlog(lang('edimed'), lang('edimedplalis'));
        amessage('playedifin', '?entry=players&action=playersedit');
    }
} elseif ($action == 'playerdetail' && !empty($plid)) {
    empty($players[$plid]) && amessage('choosepla', '?entry=players&action=playersedit');
    $player = read_cache('player', $plid);
    if (!submitcheck('bplayerdetail')) {
        tabheader(lang('playerset'), 'playerdetail', '?entry=players&action=playerdetail&plid=' . $plid);
        trbasic(lang('playercname'), 'playernew[cname]', $player['cname'], 'text');
        trbasic(lang('playertype'), '', $ptypearr[$player['ptype']], '');
        trbasic(lang('defplayfileformat'), 'playernew[exts]', $player['exts'], 'text');
        echo "<tr class=\"txt\"><td class=\"txtL\">" . lang('playertemplate') . "</td><td class=\"txtL\"><textarea rows=\"25\" name=\"playernew[template]\" id=\"playernew[template]\" cols=\"100\">" . mhtmlspecialchars(str_replace("\t", "    ", $player['template'])) . "</textarea></td></tr>";
        tabfooter('bplayerdetail');
        a_guide('playerdetail');
    } else {
        if (!$playernew['template']) {
            amessage('inpplatem', '?entry=players&action=playerdetail&plid=' . $plid);
        }
        $playernew['cname'] = empty($playernew['cname']) ? $players[$plid]['cname'] : $playernew['cname'];
        $playernew['exts'] = preg_match("/[^a-z,A-Z0-9]+/", $playernew['exts']) ? $players[$plid]['exts'] : strtolower($playernew['exts']);
        $db->query("UPDATE {$tblprefix}players SET \n\t\t\t\t\tcname='{$playernew['cname']}',\n\t\t\t\t\texts='{$playernew['exts']}',\n\t\t\t\t\ttemplate='{$playernew['template']}' \n\t\t\t\t\tWHERE plid='{$plid}'");
        updatecache('players');
        adminlog(lang('detmodmedpla'), lang('detmodmedpla'));
        amessage('playmodfin', '?entry=players&action=playersedit');
    }
}
Пример #15
0
            }
        }
        updatecache('subsites');
        adminlog(lang('subsitemanager'), lang('sublisadmope'));
        amessage('subopefin', "?entry=subsites&action=subsitesedit");
    }
} elseif ($action == 'tosubsite') {
    if (!submitcheck('btosubsite')) {
        url_nav(lang('subsitemanager'), $urlsarr, 'tosub');
        $submitstr = '';
        tabheader(lang('newsubset'), 'tosubsite', "?entry=subsites&action=tosubsite", 2, 1, 1);
        trbasic(lang('subsitecname'), 'subsitenew[sitename]', '', 'text');
        trbasic(lang('subsstadir'), 'subsitenew[dirname]', '', 'text');
        $submitstr .= makesubmitstr('subsitenew[sitename]', 1, 0, 0, 80);
        $submitstr .= makesubmitstr('subsitenew[dirname]', 1, 'tagtype', 0, 15);
        tabfooter('btosubsite');
        check_submit_func($submitstr);
        a_guide('tosubsite');
    } else {
        $subsitenew['sitename'] = trim(strip_tags($subsitenew['sitename']));
        $subsitenew['dirname'] = trim(strip_tags($subsitenew['dirname']));
        if (!$subsitenew['sitename'] || !$subsitenew['dirname']) {
            amessage('subdatamiss', M_REFERER);
        }
        if (preg_match("/[^a-zA-Z_0-9]+/", $subsitenew['dirname'])) {
            amessage('substadirill', M_REFERER);
        }
        $subsitenew['dirname'] = strtolower($subsitenew['dirname']);
        if (!mmkdir(M_ROOT . $subsitenew['dirname'], 0)) {
            anmessage('nowcresubstadir', M_REFERER);
        }
Пример #16
0
         if (!in_array('fsalecp', $citems) && !in_array('fsalecp', $additems)) {
             trbasic(lang('annex_price'), 'archiveadd[fsalecp]', makeoption(array('' => lang('freesale')) + $vcps['fsale']), 'select');
         }
         if (!in_array('ucid', $citems) && !in_array('ucid', $additems)) {
             //关于文档的个人分类
             $uclasses = loaduclasses($curuser->info['mid']);
             $ucidsarr = array(0 => lang('p_choose'));
             foreach ($uclasses as $k => $v) {
                 if (!$v['cuid']) {
                     $ucidsarr[$k] = $v['title'];
                 }
             }
             trbasic(lang('mycoclass'), 'archiveadd[ucid]', makeoption($ucidsarr), 'select');
         }
         $submitstr .= tr_regcode('archive');
         tabfooter('barchiveadd', lang('add'));
         check_submit_func($submitstr);
         _footer();
     } else {
         include_once M_ROOT . './include/common.fun.php';
         parse_str($_SERVER['QUERY_STRING'], $_da);
         _aenter($_da, 1);
         @extract($btags);
         extract($_da, EXTR_OVERWRITE);
         tpl_refresh($tplname);
         @(include M_ROOT . "template/{$templatedir}/pcache/{$tplname}.php");
         $_content = ob_get_contents();
         ob_clean();
         mexit($_content);
     }
 } else {
Пример #17
0
        $cmsgnew['ename'] = strtolower(trim(strip_tags($cmsgnew['ename'])));
        if (in_array($cmsgnew['ename'], array_keys($cmsgs))) {
            amessage('enamerepeat', '?entry=cmsgs&action=cmsgsedit');
        }
        $cmsgnew['content'] = trim($cmsgnew['content']);
        $db->query("INSERT INTO {$tblprefix}cmsgs SET \n\t\t\t\t\tename='{$cmsgnew['ename']}', \n\t\t\t\t\tcontent='{$cmsgnew['content']}',\n\t\t\t\t\tcreatedate='{$timestamp}'\n\t\t\t\t\t");
        adminlog(lang('add_cmsg'));
        updatecache('cmsgs');
        amessage('cmsgaddfinish', "?entry=cmsgs&action=cmsgsedit");
    }
} elseif ($action == 'cmsgdetail' && $ename) {
    if (!($cmsg = $db->fetch_one("SELECT * FROM {$tblprefix}cmsgs WHERE ename='{$ename}'"))) {
        amessage('confirmchoosecmsg');
    }
    if (!submitcheck('bcmsgdetail')) {
        tabheader(lang('edit_cmsg'), 'cmsgdetail', "?entry=cmsgs&action=cmsgdetail&ename={$ename}");
        trbasic(lang('cmsg_ename'), '', $cmsg['ename'], '');
        trbasic(lang('cmsg_content'), 'cmsgnew[content]', $cmsg['content'], 'textarea');
        //trbasic(lang('cmsg_jump_url'),'cmsgnew[jump]',$cmsg['jump'],'btext');
        //trbasic(lang('cmsg_view_url'),'cmsgnew[urls]',$cmsg['urls'],'textarea');
        tabfooter('bcmsgdetail');
        a_guide('cmsgdetail');
    } else {
        $cmsgnew['content'] = trim($cmsgnew['content']);
        $sql = $cmsgnew['content'] != $cmsg['content'] ? ",createdate='{$timestamp}'" : '';
        $db->query("UPDATE {$tblprefix}cmsgs SET \n\t\t\t\t\tcontent='{$cmsgnew['content']}'\n\t\t\t\t\t{$sql}\n\t\t\t\t\tWHERE ename='{$ename}'");
        adminlog(lang('edit_cmsg_detail'));
        updatecache('cmsgs');
        amessage('cmsgmodifyfinish', "?entry=cmsgs&action=cmsgsedit");
    }
}
Пример #18
0
     } while (!$db->num_rows($query) && $pagetmp);
     $itemstr = '';
     while ($item = $db->fetch_array($query)) {
         $createdatestr = date("{$dateformat}", $item['createdate']);
         $itemstr .= "<tr><td class=\"item\" width=\"30\"><input class=\"checkbox\" type=\"checkbox\" name=\"selectid[{$item['cid']}]\" value=\"{$item['cid']}\"></td>\n" . "<td align=\"center\" class=\"item2\" width=\"30\">{$item['mid']}</td>\n" . "<td class=\"item\"><a href=\"{$mspaceurl}index.php?mid={$item['mid']}\" target=\"_blank\">{$item['mname']}</a></td>\n" . "<td class=\"item\" width=\"60\">{$createdatestr}</td>\n" . "<td class=\"item\" width=\"60\"><a href=\"?action=mreport&mid={$item['mid']}&cid={$item['cid']}\">" . lang('edit') . "</a> <a href=\"?action={$action}&deal=delete&cid={$item['cid']}\">" . lang('delete') . "</a></td></tr>\n";
     }
     $counts = $db->result_one("SELECT COUNT(*) {$fromsql} {$wheresql}");
     $multi = multi($counts, $mrowpp, $page, "?action=mreports{$filterstr}");
     tabheader($listname . lang('list'), '', '', 11);
     trcategory(array("<input class=\"checkbox\" type=\"checkbox\" name=\"chkall\" class=\"category\" onclick=\"checkall(this.form, 'selectid', 'chkall')\">", lang('id'), lang('member'), lang('add time'), lang('operate')));
     echo $itemstr;
     tabfooter();
     echo $multi;
     tabheader(lang('operateitem'));
     trbasic(lang('choose_item'), '', "<input class=\"checkbox\" type=\"checkbox\" name=\"reportdeal[delete]\" value=\"1\">&nbsp;" . lang('delete') . $listname, '');
     tabfooter('breportsedit');
 } else {
     if (empty($reportdeal)) {
         mcmessage('selectoperateitem', M_REFERER);
     }
     if (empty($selectid)) {
         mcmessage('confirmselectreport', M_REFERER);
     }
     if (!empty($reportdeal['delete'])) {
         $db->query("DELETE FROM {$tblprefix}mreports WHERE cid in (" . join(',', $selectid) . ") AND fromid={$memberid}");
     } else {
         if (!empty($reportdeal['ucid'])) {
             $db->query("UPDATE {$tblprefix}mreports SET ucid='{$reportucid}' WHERE cid in (" . join(',', $selectid) . ") AND fromid={$memberid}");
         }
     }
     mcmessage('reportadminfin', M_REFERER);
Пример #19
0
$fields = read_cache('mafields', $matid);
if (!submitcheck('bmarchive')) {
    $a_field = new cls_field();
    $submitstr = '';
    tabheader($aedit->matype['cname'] . '&nbsp; -&nbsp; ' . lang('contentsetting'), 'marchive', "?matid={$matid}&maid={$maid}&action=marchive{$param_suffix}{$forwardstr}", 2, 1, 1, 1);
    foreach ($fields as $k => $field) {
        if ($field['available'] && !$field['isadmin'] && !$field['isfunc']) {
            $a_field->init();
            $a_field->field = $field;
            $a_field->oldvalue = isset($aedit->archive[$k]) ? $aedit->archive[$k] : '';
            $a_field->trfield('marchivenew', '', 'ma', $matid);
            $submitstr .= $a_field->submitstr;
        }
    }
    unset($a_field);
    tabfooter('bmarchive');
    check_submit_func($submitstr);
} else {
    $c_upload = new cls_upload();
    $fields = fields_order($fields);
    $a_field = new cls_field();
    foreach ($fields as $k => $v) {
        if ($v['available'] && !$v['isadmin'] && !$v['isfunc']) {
            $a_field->init();
            $a_field->field = $v;
            $a_field->oldvalue = isset($aedit->archive[$k]) ? $aedit->archive[$k] : '';
            $a_field->deal('marchivenew');
            if (!empty($a_field->error)) {
                $c_upload->rollback();
                mcmessage($a_field->error, M_REFERER);
            }
Пример #20
0
    $submitstr = '';
    $a_field = new cls_field();
    #$addfieldstr = $sid ? '' : ("&nbsp; &nbsp; >><a href=\"?entry=catalogs&action=cafieldsedit\">".lang('iscustom_catalog_field').'</a>');
    $allow = array_filter(explode(",", $allow));
    tabheader('页面内容设置' . "&nbsp;&nbsp;[{$catalog['title']}]", 'catalogdetail', "", 2, 1, 1);
    foreach ($cafields as $field) {
        if (!in_array($field['ename'], $allow)) {
            continue;
        }
        $a_field->init();
        $a_field->field = $field;
        $a_field->oldvalue = isset($catalog[$field['ename']]) ? $catalog[$field['ename']] : '';
        $a_field->trfield('catalognew', '', 'ca');
        $submitstr .= $a_field->submitstr;
    }
    tabfooter('bcatalogdetail');
    check_submit_func($submitstr);
    a_guide('catalogdetail');
} else {
    $forward = empty($forward) ? M_REFERER : $forward;
    $catalognew['dirname'] = strtolower($catalognew['dirname']);
    $c_upload = new cls_upload();
    $cafields = fields_order($cafields);
    $a_field = new cls_field();
    $sqlstr = "";
    foreach ($cafields as $k => $v) {
        $a_field->init();
        $a_field->field = $v;
        $a_field->oldvalue = isset($catalog[$k]) ? $catalog[$k] : '';
        $a_field->deal('catalognew');
        if (!empty($a_field->error)) {
Пример #21
0
         $a_field = new cls_field();
         foreach ($mlfields as $k => $v) {
             if (!$v['isadmin'] && !$v['isfunc'] && in_array($k, $fieldsarr)) {
                 $a_field->init();
                 $a_field->field = $v;
                 if (isset($oldmsg[$k])) {
                     $a_field->oldvalue = $oldmsg[$k];
                 } else {
                     $a_field->isadd = 1;
                 }
                 $a_field->trfield('communew', '', 'ml');
                 $submitstr .= $a_field->submitstr;
             }
         }
         unset($a_field);
         tabfooter('newcommu');
         check_submit_func($submitstr);
         _footer();
     } else {
         $_da =& $actuser->info;
         _aenter($_da, 1);
         @extract($btags);
         extract($_da, EXTR_OVERWRITE);
         tpl_refresh($tplname);
         @(include M_ROOT . "template/{$templatedir}/pcache/{$tplname}.php");
         $_content = ob_get_contents();
         ob_clean();
         mexit($_content);
     }
 } else {
     load_cache('mlfields');
Пример #22
0
        amessage('tagmodfin', axaction(1, M_REFERER));
    }
} elseif ($action == 'tagclasses') {
    url_nav(lang('usualtagsadmin'), $urlsarr, 'tagclasses');
    if (!submitcheck('btagclassesedit')) {
        tabheader(lang('tagclassesadmin'), 'tagclassesedit', "?entry=usualtags&action=tagclasses{$param_suffix}", '9');
        trcategory(array("<input class=\"checkbox\" type=\"checkbox\" name=\"chkall\" onclick=\"checkall(this.form, 'selectid', 'chkall')\">", array(lang('usualtagclass'), 'txtL'), lang('order')));
        foreach ($tagclasses as $key => $cls) {
            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=\"utclassnew[{$key}][cname]\" value=\"" . mhtmlspecialchars($cls['cname']) . "\"></td>\n" . "<td class=\"txtC w50\"><input type=\"text\" size=\"4\" name=\"utclassnew[{$key}][vieworder]\" value=\"{$cls['vieworder']}\"></td>\n" . "</tr>\n";
        }
        tabfooter();
        //操作区
        tabheader(lang('operate_item'));
        trbasic(lang('choose_item'), '', "<input class=\"checkbox\" type=\"checkbox\" name=\"clsdeal[delete]\" value=\"1\">&nbsp;" . lang('delete'), '');
        trbasic(lang('add') . lang('usualtagclass'), '', '<input type="text" name="tagutclass" size="25">&nbsp;&nbsp;' . lang('order') . '&nbsp;<input type="text" name="tagutclassorder" size="4">', '');
        tabfooter('btagclassesedit');
        a_guide('tagclasses_edit');
    } else {
        if (!empty($selectid)) {
            foreach ($selectid as $key) {
                if (!empty($clsdeal['delete'])) {
                    unset($tagclasses['data'][$key]);
                    continue;
                }
            }
        }
        #		$clsindex = array();
        $clscname = array();
        foreach ($tagclasses as $key => $clsnew) {
            #			$clsindex[] = substr($key, $utclen);
            $clscname[] = $clsnew['cname'];
Пример #23
0
        while ($user = $db->fetch_array($query)) {
            //收信数量限制分析
            $db->query("INSERT INTO {$tblprefix}pms SET\n\t\t\t\t\t\ttitle = '{$pmnew['title']}',\n\t\t\t\t\t\tcontent = '{$pmnew['content']}',\n\t\t\t\t\t\ttoid = '{$user['mid']}',\n\t\t\t\t\t\tfromid = '{$memberid}',\n\t\t\t\t\t\tfromuser = '******'mname'] . "',\n\t\t\t\t\t\tpmdate = '{$timestamp}'\n\t\t\t\t\t\t");
        }
        amessage('pmsendfin', '?entry=pms&action=batchpms');
    }
} elseif ($action == 'clearpms') {
    $enable_uc && amessage('goucpmadmin', '', "<a href=\"{$uc_api}\" target=\"_blank\">" . lang('gotopage') . '</a>');
    if (!submitcheck('bclearpms')) {
        url_nav(lang('insitepm'), $urlsarr, 'clear');
        tabheader(lang('pmclearfilter'), 'clearpms', '?entry=pms&action=clearpms');
        trbasic(lang('pmfromids'), 'pmnew[fromids]');
        trbasic(lang('mnamestxt'), 'pmnew[fromnames]');
        trbasic(lang('onlyclearreadpm'), 'pmnew[viewed]', '0', 'radio');
        trbasic(lang('indays'), 'pmnew[days]');
        tabfooter('bclearpms');
        a_guide('pmsclear');
    } else {
        $wheresql = '';
        if (!empty($pmnew['fromids'])) {
            $fromids = array_filter(explode(',', $pmnew['fromids']));
            $fromids = mimplode($fromids);
            $wheresql = empty($fromids) ? "" : "fromid IN ({$fromids})";
        }
        if (!empty($pmnew['fromnames'])) {
            $fromnames = array_filter(explode(',', $pmnew['fromnames']));
            $fromnames = mimplode($fromnames);
            $wheresql .= empty($fromnames) ? "" : (empty($wheresql) ? "" : " OR ") . "fromuser IN ({$fromnames})";
        }
        !empty($wheresql) && ($wheresql = "(" . $wheresql . ")");
        if (!empty($pmnew['viewed'])) {
Пример #24
0
        $db->query("INSERT INTO {$tblprefix}murls SET {$sqlstr}");
        $muid = $db->insert_id();
        updatecache('murls');
        adminlog(lang('copy_url_item'));
        amessage('urlcopyfinish', "?entry=murls&action=murldetail&muid={$muid}");
    }
} elseif ($action == 'murldetail' && $muid) {
    $murl = fetch_one($muid);
    empty($murl) && amessage('choosemurl');
    if (!submitcheck('bmurldetail')) {
        tabheader(lang('murl_item_set'), 'murldetail', "?entry=murls&action=murldetail&muid={$muid}");
        trbasic(lang('murl_name'), 'murlnew[cname]', $murl['cname']);
        trbasic(lang('murl_remark'), 'murlnew[remark]', $murl['remark'], 'btext');
        trbasic(lang('murl_type'), '', $uclassarr[$murl['uclass']], '');
        include M_ROOT . './include/murls/' . $murl['uclass'] . '.php';
        tabfooter('bmurldetail', lang('modify'));
        a_guide('murldetail');
    } else {
        $murlnew['cname'] = empty($murlnew['cname']) ? $murl['cname'] : $murlnew['cname'];
        $submitmode = true;
        include M_ROOT . './include/murls/' . $murl['uclass'] . '.php';
        $murlnew['tplname'] = empty($murlnew['tplname']) ? '' : trim(strip_tags($murlnew['tplname']));
        $murlnew['onlyview'] = empty($murlnew['onlyview']) ? 0 : 1;
        $murlnew['mtitle'] = empty($murlnew['mtitle']) ? '' : trim($murlnew['mtitle']);
        $murlnew['otitle'] = empty($murlnew['otitle']) ? '' : trim($murlnew['otitle']);
        $murlnew['guide'] = empty($murlnew['guide']) ? '' : trim($murlnew['guide']);
        $murlnew['remark'] = trim(strip_tags($murlnew['remark']));
        $murlnew['setting'] = !empty($murlnew['setting']) ? addslashes(serialize($murlnew['setting'])) : '';
        $db->query("UPDATE {$tblprefix}murls SET \n\t\t\t\t\tcname='{$murlnew['cname']}',\n\t\t\t\t\tremark='{$murlnew['remark']}',\n\t\t\t\t\ttplname='{$murlnew['tplname']}',\n\t\t\t\t\tonlyview='{$murlnew['onlyview']}',\n\t\t\t\t\tmtitle='{$murlnew['mtitle']}',\n\t\t\t\t\totitle='{$murlnew['otitle']}',\n\t\t\t\t\tguide='{$murlnew['guide']}',\n\t\t\t\t\turl='{$murlnew['url']}',\n\t\t\t\t\tsetting='{$murlnew['setting']}'\n\t\t\t\t\tWHERE muid='{$muid}'");
        updatecache('murls');
        adminlog(lang('detail_modify_citem'));
Пример #25
0
             mexit($html);
         } else {
             include_once M_ROOT . "./include/cheader.inc.php";
             _header(lang('memberlogin'));
             $cookiedef = '1m';
             $cookiearr = array('0' => lang('inbrowser'), '1h' => '1' . lang('hours'), '1d' => '1' . lang('days'), '1w' => '1' . lang('weeks'), '1m' => '1' . lang('month'), '-1' => lang('saveforever'));
             echo '<form name="cmslogin" id="cmslogin" method="post" action="?forward=' . rawurlencode($forward) . ($infloat ? "&infloat={$infloat}&handlekey={$handlekey}" : '') . '" onsubmit="return checklogin(this)">';
             tabheader_e();
             echo '<tr class="header"><td colspan="2"><b>' . lang('memberlogin') . '&nbsp; &nbsp; >><a href="tools/lostpwd.php"' . (empty($infloat) ? '' : " onclick=\"return floatwin('open_{$handlekey}',this)\"") . '>' . lang('getpwd') . '</a></b></td></tr>';
             trbasic(lang('membercname'), 'username');
             trbasic(lang('loginpwd'), 'password', '', 'password');
             tr_regcode('login');
             trbasic('Cookie', 'expires', makeoption($cookiearr, $cookiedef), 'select');
             trhidden('client_t', '');
             $infloat && trhidden('infloat', 1);
             tabfooter('cmslogin', lang('login'));
             mexit('</div></body></html>');
         }
     }
 } else {
     switch (empty($expires) ? '0' : strtolower($expires)) {
         case '-1':
             $expires = 3650 * 86400;
             break;
         case '1m':
             $expires = 30 * 86400;
             break;
         case '1w':
             $expires = 7 * 86400;
             break;
         case '1d':
Пример #26
0
     $itemstr = '';
     while ($item = $db->fetch_array($query)) {
         $createdatestr = date("{$dateformat}", $item['createdate']);
         $checkedstr = $item['checked'] ? 'Y' : '-';
         $itemstr .= "<tr><td class=\"item\" width=\"30\"><input class=\"checkbox\" type=\"checkbox\" name=\"selectid[{$item['cid']}]\" value=\"{$item['cid']}\"></td>\n" . "<td class=\"item\" width=\"30\">{$item['fromid']}</td>\n" . "<td class=\"item\"><a href=\"{$mspaceurl}index.php?mid={$item['fromid']}\" target=\"_blank\">{$item['fromname']}</a></td>\n" . "<td class=\"item\" width=\"60\">{$createdatestr}</td>\n" . "<td class=\"item\" width=\"100\"><a href=\"?action={$action}&deal=agree&cid={$item['cid']}\">" . lang('agree') . "</a> <a href=\"?action={$action}&deal=delete&cid={$item['cid']}\">" . lang('delete') . "</a></td></tr>\n";
     }
     $counts = $db->result_one("SELECT COUNT(*) {$fromsql} {$wheresql}");
     $multi = multi($counts, $mrowpp, $page, "?action=mfriends{$filterstr}");
     tabheader(lang('needlist'), '', '', 11);
     trcategory(array("<input class=\"checkbox\" type=\"checkbox\" name=\"chkall\" class=\"category\" onclick=\"checkall(this.form, 'selectid', 'chkall')\">", lang('id'), lang('membercname'), lang('needtime'), lang('operate')));
     echo $itemstr;
     tabfooter();
     echo $multi;
     tabheader(lang('operateitem'));
     trbasic(lang('choose_item'), '', "<input class=\"checkbox\" type=\"checkbox\" name=\"frienddeal[delete]\" value=\"1\">&nbsp;" . lang('delete') . $listname . "&nbsp;<input class=\"checkbox\" type=\"checkbox\" name=\"frienddeal[pass]\" value=\"1\">&nbsp;" . lang('check') . $listname, '');
     tabfooter('bfriendsedit');
 } else {
     if (empty($frienddeal)) {
         mcmessage('selectoperateitem', M_REFERER);
     }
     if (empty($selectid)) {
         mcmessage('chooseoperatemember', M_REFERER);
     }
     if (!empty($frienddeal['delete'])) {
         $db->query("DELETE FROM {$tblprefix}mfriends WHERE cid in (" . join(',', $selectid) . ") AND mid={$memberid}");
     } else {
         if (!empty($frienddeal['pass'])) {
             $db->query("UPDATE {$tblprefix}mfriends SET checked='1' WHERE cid in (" . join(',', $selectid) . ") AND mid={$memberid}");
         }
     }
     mcmessage('friendneedadminok', M_REFERER);
Пример #27
0
             $s_arr['readd'] = lang('readd');
         }
         if (empty($u_operates) || in_array('delete', $u_operates)) {
             $s_arr['delete'] = lang('delete');
         }
         if ($s_arr) {
             $soperatestr = '';
             foreach ($s_arr as $k => $v) {
                 $soperatestr .= "<input class=\"checkbox\" type=\"checkbox\" name=\"arcdeal[{$k}]\" value=\"1\">{$v} &nbsp;";
             }
             trbasic(lang('choose_item'), '', $soperatestr, '');
         }
         if (empty($u_operates) || in_array('uclass', $u_operates)) {
             trbasic("<input class=\"checkbox\" type=\"checkbox\" name=\"arcdeal[ucid]\" value=\"1\">&nbsp;" . lang('set') . lang('mycoclass'), 'arcucid', makeoption(array('0' => lang('cancelcoclass')) + $ucidsarr), 'select');
         }
         tabfooter('barcsedit');
         m_guide(@$u_guide);
     } else {
         include M_ROOT . $u_tplname;
     }
 } else {
     if (empty($arcdeal) && empty($itemsnew)) {
         mcmessage('selectopeitem', M_REFERER);
     }
     if (empty($selectid)) {
         mcmessage('conoffer', M_REFERER);
     }
     $uedit = new cls_cuedit();
     foreach ($selectid as $cid) {
         if ($errno = $uedit->read($cid, 'offer')) {
             continue;
Пример #28
0
     trbasic(lang('addtime'), '', date('Y-m-d H:i', $reportold['createdate']), '');
     tabfooter();
     $submitstr .= tr_regcode('report');
     $a_field = new cls_field();
     tabheader($mcommu['cname'] . '&nbsp; -&nbsp; ' . lang('submitmessage'));
     foreach ($mbfields as $k => $v) {
         if (!$v['isadmin'] && !$v['isfunc'] && in_array($k, $fieldsarr)) {
             $a_field->init();
             $a_field->field = $v;
             $a_field->oldvalue = isset($reportold[$k]) ? $reportold[$k] : '';
             $a_field->trfield('reportnew', '', 'mb');
             $submitstr .= $a_field->submitstr;
         }
     }
     unset($a_field);
     tabfooter('breportdetail', '', strbutton('', 'goback', "redirect('{$forward}');"));
     check_submit_func($submitstr);
 } else {
     $c_upload = new cls_upload();
     $mbfields = fields_order($mbfields);
     $sqlstr = '';
     $a_field = new cls_field();
     foreach ($mbfields as $k => $v) {
         if (!$v['isadmin'] && !$v['isfunc'] && in_array($k, $fieldsarr)) {
             $a_field->init();
             $a_field->field = $v;
             $a_field->oldvalue = isset($reportold[$k]) ? $reportold[$k] : '';
             $a_field->deal('reportnew');
             if (!empty($a_field->error)) {
                 $c_upload->rollback();
                 mcmessage($a_field->error, M_REFERER);
Пример #29
0
<?php

(!defined('M_COM') || !defined('M_ADMIN')) && exit('No Permission');
if (!submitcheck('bmtagadd') && !submitcheck('bmtagsdetail') && !submitcheck('bmtagcode')) {
    templatebox(lang('tagtemplate'), 'mtagnew[template]', empty($mtag['template']) ? '' : $mtag['template'], 10, 110);
    trbasic(lang('arr_pre'), 'mtagnew[setting][val]', empty($mtag['setting']['val']) ? 'v' : $mtag['setting']['val'], 'text', lang('agarr_pre'));
    $nextarr = array('0' => lang('pre'), '1' => lang('next'));
    trbasic(lang('context_choose'), '', makeradio('mtagnew[setting][next]', $nextarr, isset($mtag['setting']['next']) ? $mtag['setting']['next'] : '0'), '');
    trbasic(lang('limitin_current_channel'), 'mtagnew[setting][chid]', empty($mtag['setting']['chid']) ? '0' : $mtag['setting']['chid'], 'radio');
    trbasic(lang('limitin_current_catalog'), 'mtagnew[setting][caid]', empty($mtag['setting']['caid']) ? '0' : $mtag['setting']['caid'], 'radio');
    foreach ($cotypes as $k => $cotype) {
        if ($cotype['sortable']) {
            trbasic(lang('limitin_current_coclass') . "&nbsp;[{$cotype['cname']}]", 'mtagnew[setting][ccid' . $k . ']', empty($mtag['setting']['ccid' . $k]) ? '0' : $mtag['setting']['ccid' . $k], 'radio');
        }
    }
    trbasic(lang('limitin_active_member'), 'mtagnew[setting][mid]', empty($mtag['setting']['mid']) ? '0' : $mtag['setting']['mid'], 'radio');
    trbasic(lang('nocp'), 'mtagnew[setting][nocp]', empty($mtag['setting']['nocp']) ? 0 : $mtag['setting']['nocp'], 'radio', lang('agnocp'));
    trbasic(lang('tagjspick'), 'mtagnew[setting][js]', empty($mtag['setting']['js']) ? 0 : $mtag['setting']['js'], 'radio');
    tabfooter();
} else {
    if (empty($mtagnew['template'])) {
        if (!submitcheck('bmtagcode')) {
            amessage('input_tag_tpl', M_REFERER);
        } else {
            $errormsg = lang('input_tag_tpl');
        }
        //生成代码出错的提示信息
    }
}
Пример #30
0
        mcmessage('chooseanswer');
    }
    $aedit = new cls_arcedit();
    $aedit->set_aid($answer['aid']);
    $aedit->basic_data();
    if (!$aedit->aid) {
        mcmessage('choosearchive');
    }
    if ($memberid != ($amode ? $aedit->archive['mid'] : $answer['mid'])) {
        mcmessage('chooseanswer');
    }
    $forward = empty($forward) ? M_REFERER : $forward;
    $forwardstr = '&forward=' . rawurlencode($forward);
    if (!submitcheck('banswerdetail')) {
        tabheader(lang('editanswer'), 'answerdetail', "?action=answer&cid={$cid}{$forwardstr}");
        trbasic(lang('questiontitle'), '', $aedit->archive['subject'], '');
        trbasic(lang('answercontent'), 'answernew[answer]', br2nl($answer['answer']), 'btextarea');
        tabfooter($amode ? '' : 'banswerdetail');
    } else {
        $commu = read_cache('commu', $aedit->channel['cuid']);
        ($aedit->archive['closed'] || $aedit->archive['finishdate'] < $timestamp) && mcmessage('questionclose', axaction(2, M_REFERER));
        $answernew['answer'] = empty($answernew['answer']) ? '' : trim($answernew['answer']);
        empty($answernew['answer']) && mcmessage('inputanswer', axaction(2, M_REFERER));
        !empty($commu['setting']['minlength']) && strlen($answernew['answer']) < $commu['setting']['minlength'] && mcmessage('answerlength', axaction(2, M_REFERER));
        !empty($commu['setting']['maxlength']) && ($answernew['answer'] = cutstr($answernew['answer'], $commu['setting']['maxlength']));
        $db->query("UPDATE {$tblprefix}answers SET answer='{$answernew['answer']}' WHERE cid='{$cid}'");
        mcmessage('answereditfinish', axaction(6, $forward));
    }
} else {
    include M_ROOT . $commu['umdetail'];
}