function trfield($varpre = '', $noeditstr = '', $ftype = '', $typeid = 0) { if (empty($this->field['ename']) || empty($this->field['available'])) { return; } $trname = ($this->field['notnull'] ? '*' : '') . $this->field['cname'] . $noeditstr; $varname = !$varpre ? $this->field['ename'] : $varpre . '[' . $this->field['ename'] . ']'; $oldstr = $this->isadd ? $this->field['vdefault'] : $this->oldvalue; //多项选择 foreach (array('datatype', 'mode', 'guide', 'min', 'max') as $var) { ${$var} = $this->field[$var]; } if ($datatype == 'cacc') { $setting = empty($this->field['innertext']) ? array() : unserialize($this->field['innertext']); trcacc($trname, $varname, $oldstr, $this->field['length'], @$setting['source'], @$setting['ids'], $mode, $max ? intval($max) : 0, $guide); } else { if (in_array($datatype, array('text', 'int', 'float'))) { $oldstr = mhtmlspecialchars($oldstr); $datatype = 'text'; } elseif ($datatype == 'select') { $sourcearr = select_arr($this->field['innertext'], $this->field['fromcode']); $oldstr = !$mode ? makeoption($sourcearr, $oldstr) : makeradio($varname, $sourcearr, $oldstr); } elseif ($datatype == 'mselect') { $sourcearr = select_arr($this->field['innertext'], $this->field['fromcode']); $oldarr = explode("\t", $oldstr); $oldstr = !$mode ? multiselect($varname . '[]', $sourcearr, $oldarr) : makecheckbox($varname . '[]', $sourcearr, $oldarr); } elseif ($datatype == 'multitext') { $oldstr = mhtmlspecialchars($oldstr); } elseif ($datatype == 'date') { $oldstr = $oldstr ? date('Y-m-d', $oldstr) : ''; } elseif ($datatype == 'map') { !$oldstr && ($oldstr = $this->field['vdefault']); $min = $this->field['length']; } elseif ($datatype == 'vote') { $mode = $ftype; $max = $min; $min = $typeid; } trspecial($trname, $varname, $oldstr, $datatype, $mode, $guide, $min, $max); } $this->make_submitstr($varname); }
<?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('usource'), 'mtagnew[setting][tname]', isset($mtag['setting']['tname']) ? $mtag['setting']['tname'] : '', 'text', lang('agusource')); trbasic(lang('arr_pre'), 'mtagnew[setting][val]', empty($mtag['setting']['val']) ? 'v' : $mtag['setting']['val'], 'text', lang('agarr_pre')); trbasic(lang('plimits'), 'mtagnew[setting][limits]', isset($mtag['setting']['limits']) ? $mtag['setting']['limits'] : '10'); trbasic(lang('imawidlim'), 'mtagnew[setting][maxwidth]', isset($mtag['setting']['maxwidth']) ? $mtag['setting']['maxwidth'] : ''); trbasic(lang('imaheilim'), 'mtagnew[setting][maxheight]', isset($mtag['setting']['maxheight']) ? $mtag['setting']['maxheight'] : ''); trbasic(lang('createthumb'), 'mtagnew[setting][thumb]', isset($mtag['setting']['thumb']) ? $mtag['setting']['thumb'] : 0, 'radio'); trspecial(lang('emptyurl'), 'mtagnew[setting][emptyurl]', isset($mtag['setting']['emptyurl']) ? $mtag['setting']['emptyurl'] : '', 'image'); trbasic(lang('emptytitle'), 'mtagnew[setting][emptytitle]', isset($mtag['setting']['emptytitle']) ? $mtag['setting']['emptytitle'] : ''); tabfooter(); tabheader(lang('ptnaviset')); trbasic(lang('nav_simple'), 'mtagnew[setting][simple]', empty($mtag['setting']['simple']) ? '0' : $mtag['setting']['simple'], 'radio'); trbasic(lang('nav_length'), 'mtagnew[setting][length]', isset($mtag['setting']['length']) ? $mtag['setting']['length'] : ''); tabfooter(); } else { if (empty($mtagnew['template'])) { if (!submitcheck('bmtagcode')) { amessage('input_tag_tpl', M_REFERER); } else { $errormsg = lang('pleinptatem'); } //生成代码出错的提示信息 } $mtagnew['setting']['length'] = $mtagnew['setting']['length'] ? $mtagnew['setting']['length'] : '10'; $mtagnew['setting']['tname'] = trim($mtagnew['setting']['tname']); if (empty($mtagnew['setting']['tname']) || !preg_match("/^[a-zA-Z_\$][a-zA-Z0-9_\\[\\]]*\$/", $mtagnew['setting']['tname'])) { if (!submitcheck('bmtagcode')) {
trbasic(lang('hostname'), 'mconfigsnew[hostname]', $mconfigs['hostname']); trbasic(lang('hosturl'), 'mconfigsnew[hosturl]', $mconfigs['hosturl'], 'text', lang('aghosturl')); trbasic(lang('cmsname'), 'mconfigsnew[cmsname]', $mconfigs['cmsname']); trbasic(lang('cmsurl'), 'mconfigsnew[cmsurl]', $mconfigs['cmsurl'], 'text', lang('agcmsurl')); trbasic(lang('mspacedir'), 'mconfigsnew[mspacedir]', $mconfigs['mspacedir'], 'text', lang('agmspacedir')); trbasic(lang('memberdir'), 'mconfigsnew[memberdir]', $mconfigs['memberdir'], 'text', lang('agmemberdir')); trspecial(lang('cmslogo'), 'mconfigsnew[cmslogo]', $mconfigs['cmslogo'], 'image'); trbasic(lang('sitetitle'), 'mconfigsnew[cmstitle]', $mconfigs['cmstitle'], 'btext'); trbasic(lang('sitekeyword'), 'mconfigsnew[cmskeyword]', $mconfigs['cmskeyword'], 'btext'); trbasic(lang('sitedescrip'), 'mconfigsnew[cmsdescription]', $mconfigs['cmsdescription'], 'textarea'); trbasic(lang('siteicpno'), 'mconfigsnew[cms_icpno]', $mconfigs['cms_icpno'], 'btext'); trbasic(lang('bazscert'), 'mconfigsnew[bazscert]', $mconfigs['bazscert'], 'btext'); trbasic('公共文件目录', 'mconfigsnew[public]', $mconfigs['public'], 'btext'); trbasic(lang('copyrightmessage'), 'mconfigsnew[copyright]', $mconfigs['copyright'], 'textarea'); } else { trspecial(lang('cmslogo'), 'subsitenew[cmslogo]', $subsite['cmslogo'], 'image'); trbasic(lang('subsitetitle'), 'subsitenew[cmstitle]', $subsite['cmstitle'], 'btext'); trbasic(lang('subkeyword'), 'subsitenew[cmskeyword]', $subsite['cmskeyword'], 'btext'); trbasic(lang('subsitedescrip'), 'subsitenew[cmsdescription]', $subsite['cmsdescription'], 'textarea'); } tabfooter('bmconfigs'); a_guide('cfsite'); } else { if (!$sid) { if (empty($mconfigsnew['hosturl']) || !in_str('http://', $mconfigsnew['hosturl'])) { amessage('hosturlillegal', M_REFERER); } $mconfigsnew['hosturl'] = strtolower($mconfigsnew['hosturl']); $mconfigsnew['cmsurl'] = empty($mconfigsnew['cmsurl']) ? '/' : trim(strtolower($mconfigsnew['cmsurl'])); $mconfigsnew['cmsurl'] .= !ereg("/\$", $mconfigsnew['cmsurl']) ? '/' : ''; foreach (array('mspacedir', 'memberdir') as $var) {
} } adminlog(lang('ediusuli')); updatecache('usualurls'); amessage('usuedifin', "?entry=usualurls&action=usualurlsedit{$mc_suffix}"); } } elseif ($action == 'usualurldetail' && $uid) { if (!($usualurl = $db->fetch_one("SELECT * FROM {$tblprefix}usualurls WHERE uid='{$uid}'"))) { amessage('chooseusu'); } if (!submitcheck('busualurldetail')) { tabheader(lang('edit') . $mc_str . lang('usualurl'), 'usualurldetail', "?entry=usualurls&action=usualurldetail&uid={$uid}{$mc_suffix}"); trbasic(lang('usuatitle'), 'usualurlnew[title]', $usualurl['title'], 'text'); trbasic(lang('usualurl'), 'usualurlnew[url]', $usualurl['url'], 'btext'); trbasic(lang('usuorder'), 'usualurlnew[vieworder]', $usualurl['vieworder'], 'text'); trspecial(lang('urlimage'), 'usualurlnew[logo]', $usualurl['logo'], 'image'); trbasic(lang('newwin'), 'usualurlnew[newwin]', $usualurl['newwin'], 'radio'); if (!$ismc) { $sidsarr = array('m' => lang('msite')) + sidsarr(1); trbasic(lang('belsitforuse'), '', makecheckbox('sidsnew[]', $sidsarr, $usualurl['sids'] === '' ? array() : explode(',', $usualurl['sids']), 5), ''); trbasic(lang('inhitatt'), 'usualurlnew[actsid]', $usualurl['actsid'], 'radio'); } else { trbasic(lang('onclick'), 'usualurlnew[onclick]', $usualurl['onclick'], 'btext'); } trbasic(lang('u_permission_set'), 'usualurlnew[pmid]', makeoption(pmidsarr('menu'), $usualurl['pmid']), 'select'); tabfooter('busualurldetail'); a_guide('usualurldetail'); } else { $usualurlnew['title'] = trim(strip_tags($usualurlnew['title'])); $usualurlnew['url'] = trim(strip_tags($usualurlnew['url'])); $usualurlnew['vieworder'] = max(0, intval($usualurlnew['vieworder']));
tabheader(lang('paymesslook')); } trbasic(lang('member_cname'), '', $item['mname'], ''); trbasic(lang('paymode'), '', $pmodearr[$item['pmode']], ''); trbasic(lang('payamourmbi'), 'itemnew[amount]', $item['amount']); trbasic(lang('handrmbi'), '', $item['handfee'], ''); trbasic(lang('payinter'), '', $item['poid'] ? $poids[$item['poid']] : '-', ''); trbasic(lang('payorderidsn'), '', $item['ordersn'] ? $item['ordersn'] : '-', ''); trbasic(lang('messsentim'), '', date("{$dateformat} {$timeformat}", $item['senddate']), ''); trbasic(lang('casarrtim'), '', $item['receivedate'] ? date("{$dateformat} {$timeformat}", $item['receivedate']) : '-', ''); trbasic(lang('currsavtime'), '', $item['transdate'] ? date("{$dateformat} {$timeformat}", $item['transdate']) : '-', ''); trbasic(lang('contaname'), 'itemnew[truename]', $item['truename']); trbasic(lang('contatelep'), 'itemnew[telephone]', $item['telephone']); trbasic(lang('contactemail'), 'itemnew[email]', $item['email']); trbasic(lang('remark'), 'itemnew[remark]', br2nl($item['remark']), 'textarea'); trspecial(lang('paywarrant') . " [" . "<a href=\"" . $item['warrant'] . "\" target=\"_blank\">" . lang('bigimage') . "</a>" . "]", 'itemnew[warrant]', $item['warrant'], 'image'); if ($item['transdate']) { tabfooter(); echo "<input class=\"button\" type=\"submit\" name=\"\" value=\"" . lang('goback') . "\" onclick=\"history.go(-1);\">"; } else { tabfooter('bpaydetail', lang('modify')); } a_guide('paydetail'); } else { include_once M_ROOT . "./include/upload.cls.php"; $itemnew['amount'] = max(0, round(floatval($itemnew['amount']), 2)); empty($itemnew['amount']) && amessage('inppayamo', M_REFERER); $itemnew['truename'] = trim(strip_tags($itemnew['truename'])); $itemnew['telephone'] = trim(strip_tags($itemnew['telephone'])); $itemnew['email'] = trim(strip_tags($itemnew['email'])); $itemnew['remark'] = mnl2br(mhtmlspecialchars($itemnew['remark']));
if (!submitcheck('bmemcertadd')) { tabheader(lang('memcert_add'), 'memcert_add', "?entry={$entry}&action={$action}"); trbasic(lang('memcert_title'), 'memcertadd[title]'); tabfooter('bmemcertadd'); } else { $db->num_rows($db->query("SELECT mcid FROM {$tblprefix}memcerts WHERE title='{$memcertadd['title']}'")) ? amessage('memcert_exists', "?entry={$entry}&action={$action}") : ($db->query("INSERT INTO {$tblprefix}memcerts SET title='{$memcertadd['title']}'") && ($mcid = $db->insert_id()) ? amessage('memcert_add_modify', "?entry={$entry}&action=detail&mcid={$mcid}") : amessage('memcert_add_error', "?entry={$entry}&action={$action}")); } break; case 'detail': //修改类别 (empty($mcid) || !($memcert = $db->fetch_one("SELECT * FROM {$tblprefix}memcerts WHERE mcid='{$mcid}'"))) && amessage('memcert_modify_fail'); if (!submitcheck('bmemcertmodify')) { include_once M_ROOT . "./include/fields.cls.php"; tabheader(lang('memcert_modify'), 'memcert_modify', "?entry={$entry}&action={$action}&mcid={$mcid}"); trbasic(lang('memcert_title'), '', $memcert['title'], ''); trspecial(lang('memcert_icon'), 'memcertnew[icon]', $memcert['icon'], 'image'); trbasic(lang('memcert_remark'), 'memcertnew[remark]', $memcert['remark'], 'textarea'); trbasic(lang('memcert_level'), 'memcertnew[level]', $memcert['level'], 'text', lang('memcert_level_tip')); trbasic(lang('memcert_mchid') . "<br/><input class=\"checkbox\" type=\"checkbox\" id=\"chkall_mchid\" onclick=\"checkall(this.form,'memcertnew[mchids]','chkall_mchid')\"><label for=\"chkall_mchid\">" . lang('selectall') . "</label>", '', makecheckbox('memcertnew[mchids][]', $mchannels, explode(',', $memcert['mchids'])), ''); trbasic(lang('memcert_mobile_field'), 'memcertnew[mobile]', $memcert['mobile'], 'text', lang('memcert_special_tip')); trbasic(lang('memcert_email_field'), 'memcertnew[email]', $memcert['email'], 'text', lang('memcert_special_tip')); trbasic(lang('memcert_fields'), 'memcertnew[fields]', $memcert['fields'], 'textarea', lang('memcert_fields_tip')); // trbasic(lang('memcert_and_checked'), '', makeradio('memcertnew[check]', array(1 => lang('yes'), 0 => lang('no')), $memcert['check']), ''); tabfooter('bmemcertmodify'); } else { !empty($memcertnew['mobile']) && preg_match("/\\W/", $memcertnew['mobile']) && amessage('memcert_mode_fail', "?entry={$entry}&action={$action}&mcid={$mcid}"); !empty($memcertnew['email']) && preg_match("/\\W/", $memcertnew['email']) && amessage('memcert_mode_fail', "?entry={$entry}&action={$action}&mcid={$mcid}"); (empty($memcertnew['mobile']) && empty($memcertnew['email']) && empty($memcertnew['fields']) || !empty($memcertnew['fields']) && !preg_match("/^\\w+(?:,\\w+)*\$/", $memcertnew['fields'])) && amessage('memcert_fields_fail', "?entry={$entry}&action={$action}&mcid={$mcid}"); include_once M_ROOT . "./include/upload.cls.php"; $memcertnew['mchids'] = join(',', array_filter($memcertnew['mchids'])); $db->query("UPDATE {$tblprefix}memcerts SET " . "icon='{$memcertnew['icon']}'," . "remark='{$memcertnew['remark']}'," . "mchids='{$memcertnew['mchids']}'," . "mobile='{$memcertnew['mobile']}'," . "email='{$memcertnew['email']}'," . "fields='{$memcertnew['fields']}'" . " WHERE mcid={$mcid}");
!defined('M_COM') && exit('No Permission'); load_cache('currencys'); include_once M_ROOT . "./include/fields.cls.php"; if (!submitcheck('bpayother')) { if (!($oldmsg = $db->fetch_one("SELECT * FROM {$tblprefix}pays WHERE mid='{$memberid}' ORDER BY pid DESC LIMIT 0,1"))) { $oldmsg = array(); } $pmodearr = array('0' => lang('visitingpay'), '2' => lang('banktransfer'), '3' => lang('postofficeremit')); tabheader(lang('cashpayedmessageadmini'), 'payother', '?action=payother', 2, 1, 1); trbasic(lang('paymode'), '', makeradio('paynew[pmode]', $pmodearr), ''); trbasic(lang('payamountrmbi'), 'paynew[amount]'); trbasic(lang('contactorname'), 'paynew[truename]', empty($oldmsg['truename']) ? '' : $oldmsg['truename'], 'btext'); trbasic(lang('contacttel'), 'paynew[telephone]', empty($oldmsg['telephone']) ? '' : $oldmsg['telephone'], 'btext'); trbasic(lang('contactemail'), 'paynew[email]', empty($oldmsg['email']) ? '' : $oldmsg['email'], 'btext'); trbasic(lang('remark'), 'paynew[remark]', empty($oldmsg['remark']) ? '' : $oldmsg['remark'], 'textarea'); trspecial(lang('paywarrant'), 'paynew[warrant]', '', 'image'); $submitstr = ''; $submitstr .= makesubmitstr('paynew[amount]', 1, 'number', 0, 15); $submitstr .= makesubmitstr('paynew[truename]', 0, 0, 0, 80); $submitstr .= makesubmitstr('paynew[telephone]', 0, 0, 0, 30); $submitstr .= makesubmitstr('paynew[email]', 0, 'email', 0, 100); $submitstr .= makesubmitstr('paynew[remark]', 0, 0, 0, 200); $submitstr .= tr_regcode('payonline'); tabfooter('bpayother'); check_submit_func($submitstr); } else { if (!regcode_pass('payonline', empty($regcode) ? '' : trim($regcode))) { mcmessage('regcodeerror', '?action=payother'); } $paynew['amount'] = max(0, round(floatval($paynew['amount']), 2)); empty($paynew['amount']) && mcmessage('pinputpayamount', '?action=payother');
saveconfig('view'); adminlog(lang('websiteset'), lang('pagandtemset')); amessage('websitesetfinish', "?entry=backparams&action=bkparams{$param_suffix}"); } } elseif ($action == 'mcparams') { backallow('mcconfig') || amessage('no_apermission'); $url_type = 'mcenter'; include 'urlsarr.inc.php'; url_nav(lang('mcenterconfig'), $urlsarr, 'mcparam', 10); if (!submitcheck('bmconfigs')) { tabheader(lang('memcentrelaset'), 'cfview', "?entry=backparams&action=mcparams{$param_suffix}"); trbasic(lang('memcenmsgfor'), 'mconfigsnew[mmsgforwordtime]', $mconfigs['mmsgforwordtime']); trbasic(lang('mrowpp'), 'mconfigsnew[mrowpp]', $mconfigs['mrowpp']); trbasic(lang('uclmaxamolim'), 'mconfigsnew[maxuclassnum]', empty($mconfigs['maxuclassnum']) ? 0 : $mconfigs['maxuclassnum']); trbasic(lang('uclbytlenlim'), 'mconfigsnew[uclasslength]', $mconfigs['uclasslength']); trspecial(lang('memcenterlogo'), 'mconfigsnew[mcenterlogo]', $mconfigs['mcenterlogo'], 'image', 0, lang('agmclogo')); trbasic(lang('enablefloatwin'), 'mconfigsnew[mallowfloatwin]', empty($mconfigs['mallowfloatwin']) ? 0 : $mconfigs['mallowfloatwin'], 'radio'); trbasic(lang('floatwinwidth'), 'mconfigsnew[mfloatwinwidth]', empty($mconfigs['mfloatwinwidth']) ? 0 : $mconfigs['mfloatwinwidth']); trbasic(lang('floathei'), 'mconfigsnew[mfloatwinheight]', empty($mconfigs['mfloatwinheight']) ? 0 : $mconfigs['mfloatwinheight']); tabfooter('bmconfigs'); } else { $mconfigsnew['mmsgforwordtime'] = max(0, intval($mconfigsnew['mmsgforwordtime'])); $mconfigsnew['mrowpp'] = max(5, intval($mconfigsnew['mrowpp'])); $mconfigsnew['uclasslength'] = min(30, max(4, intval($mconfigsnew['uclasslength']))); $mconfigsnew['mfloatwinwidth'] = min(1200, max(400, intval($mconfigsnew['mfloatwinwidth']))); $mconfigsnew['mfloatwinheight'] = min(1000, max(300, intval($mconfigsnew['mfloatwinheight']))); $mconfigsnew['maxuclassnum'] = max(0, intval($mconfigsnew['maxuclassnum'])); $c_upload = new cls_upload(); $mconfigsnew['mcenterlogo'] = upload_s($mconfigsnew['mcenterlogo'], $mconfigs['mcenterlogo'], 'image'); if ($k = strpos($mconfigsnew['mcenterlogo'], '#')) { $mconfigsnew['mcenterlogo'] = substr($mconfigsnew['mcenterlogo'], 0, $k);