本文整理汇总了PHP中mhtmlspecialchars函数的典型用法代码示例。如果您正苦于以下问题:PHP mhtmlspecialchars函数的具体用法?PHP mhtmlspecialchars怎么用?PHP mhtmlspecialchars使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了mhtmlspecialchars函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: fieldlist
function fieldlist($fname, $field = array(), $mode = 'ch')
{
global $datatypearr, $chid, $mchid, $matid;
if ($mode == 'ch') {
echo "<tr class=\"txt\">\n" . "<td class=\"txtC w40\"><input class=\"checkbox\" type=\"checkbox\" name=\"delete[{$fname}]\" value=\"{$fname}\"" . (!empty($field['mcommon']) || !empty($field['issystem']) ? ' disabled' : '') . "></td>\n" . "<td class=\"txtC w40\"><input class=\"checkbox\" type=\"checkbox\" name=\"fieldsnew[{$fname}][available]\" value=\"1\"" . ($field['available'] ? ' checked' : '') . (!empty($field['issystem']) ? ' disabled' : '') . "></td>\n" . "<td class=\"txtL\"><input type=\"text\" size=\"25\" name=\"fieldsnew[{$fname}][cname]\" value=\"" . mhtmlspecialchars($field['cname']) . "\"></td>\n" . "<td class=\"txtC w60\"><input class=\"checkbox\" type=\"checkbox\" name=\"fieldsnew[{$fname}][isadmin]\" value=\"1\"" . (!empty($field['issystem']) ? ' disabled' : '') . ($field['isadmin'] ? ' checked' : '') . "></td>\n" . "<td class=\"txtC w60\"><input type=\"text\" size=\"4\" name=\"fieldsnew[{$fname}][vieworder]\" value=\"{$field['vieworder']}\"></td>\n" . "<td class=\"txtC\">" . mhtmlspecialchars($fname) . "</td>\n" . "<td class=\"txtC w100\">" . $datatypearr[$field['datatype']] . "</td>\n" . "<td class=\"txtC w50\"><a href=\"?entry=channels&action=fielddetail&chid={$chid}&fieldename={$fname}\" onclick=\"return floatwin('open_fielddetail',this)\">" . lang('detail') . "</a></td>\n" . "</tr>";
} elseif ($mode == 'fch') {
echo "<tr class=\"txt\">\n" . "<td class=\"txtC w40\"><input class=\"checkbox\" type=\"checkbox\" name=\"delete[{$fname}]\" value=\"{$fname}\"" . (!empty($field['issystem']) ? ' disabled' : '') . "></td>\n" . "<td class=\"txtL\"><input type=\"text\" size=\"25\" name=\"fieldsnew[{$fname}][cname]\" value=\"" . mhtmlspecialchars($field['cname']) . "\"></td>\n" . "<td class=\"txtC w60\"><input class=\"checkbox\" type=\"checkbox\" name=\"fieldsnew[{$fname}][isadmin]\" value=\"1\"" . (!empty($field['issystem']) ? ' disabled' : '') . ($field['isadmin'] ? ' checked' : '') . "></td>\n" . "<td class=\"txtC w60\"><input type=\"text\" size=\"4\" name=\"fieldsnew[{$fname}][vieworder]\" value=\"{$field['vieworder']}\"></td>\n" . "<td class=\"txtC\">" . mhtmlspecialchars($fname) . "</td>\n" . "<td class=\"txtC w100\">" . $datatypearr[$field['datatype']] . "</td>\n" . "<td class=\"txtC w50\"><a href=\"?entry=fchannels&action=fielddetail&chid={$chid}&fieldename={$fname}\" onclick=\"return floatwin('open_fielddetail',this)\">" . lang('detail') . "</a></td>\n" . "</tr>";
} elseif ($mode == 'init') {
echo "<tr class=\"txt\">\n" . "<td class=\"txtC w40\"><input class=\"checkbox\" type=\"checkbox\" name=\"delete[{$fname}]\" value=\"{$fname}\"" . (empty($field['iscustom']) ? ' disabled' : '') . "></td>\n" . "<td class=\"txtL\"><input type=\"text\" size=\"25\" name=\"fieldsnew[{$fname}][cname]\" value=\"" . mhtmlspecialchars($field['cname']) . "\"></td>\n" . "<td class=\"txtC\">" . mhtmlspecialchars($fname) . "</td>\n" . "<td class=\"txtC w100\">" . $datatypearr[$field['datatype']] . "</td>\n" . "<td class=\"txtC w60\"><a href=\"?entry=channels&action=initfielddetail&fieldename={$fname}\" onclick=\"return floatwin('open_fielddetail',this)\">" . lang('detail') . "</a></td>\n" . "</tr>";
} elseif ($mode == 'initm') {
echo "<tr class=\"txt\">\n" . "<td class=\"txtC w40\"><input class=\"checkbox\" type=\"checkbox\" name=\"delete[{$fname}]\" value=\"{$fname}\"" . ($field['issystem'] ? ' disabled' : '') . "></td>\n" . "<td class=\"txtL\"><input type=\"text\" size=\"25\" name=\"fieldsnew[{$fname}][cname]\" value=\"" . mhtmlspecialchars($field['cname']) . "\"></td>\n" . "<td class=\"txtC\">" . mhtmlspecialchars($fname) . "</td>\n" . "<td class=\"txtC w100\">" . $datatypearr[$field['datatype']] . "</td>\n" . "<td class=\"txtC w60\">" . ($field['issystem'] ? lang('system') : "<a href=\"?entry=mchannels&action=initmfielddetail&fieldename={$fname}\" onclick=\"return floatwin('open_fielddetail',this)\">" . lang('detail') . "</a>") . "</td>\n" . "</tr>";
} elseif ($mode == 'member') {
echo "<tr class=\"txt\">\n" . "<td class=\"txtC w40\"><input class=\"checkbox\" type=\"checkbox\" name=\"delete[{$fname}]\" value=\"{$fname}\"" . ($field['mcommon'] ? ' disabled' : '') . "></td>\n" . "<td class=\"txtC w40\"><input class=\"checkbox\" type=\"checkbox\" name=\"fieldsnew[{$fname}][available]\" value=\"1\"" . ($field['available'] ? ' checked' : '') . ($field['issystem'] ? ' disabled' : '') . "></td>\n" . "<td class=\"txtC\"><input type=\"text\" size=\"20\" name=\"fieldsnew[{$fname}][cname]\" value=\"" . mhtmlspecialchars($field['cname']) . "\"></td>\n" . "<td class=\"txtC\">" . mhtmlspecialchars($fname) . "</td>\n" . "<td class=\"txtC w60\"><input class=\"checkbox\" type=\"checkbox\" name=\"fieldsnew[{$fname}][isadmin]\" value=\"1\"" . (!empty($field['issystem']) ? ' disabled' : '') . ($field['isadmin'] ? ' checked' : '') . "></td>\n" . "<td class=\"txtC w60\"><input type=\"text\" size=\"4\" name=\"fieldsnew[{$fname}][vieworder]\" value=\"{$field['vieworder']}\"></td>\n" . "<td class=\"txtC w100\">" . $datatypearr[$field['datatype']] . "</td>\n" . "<td class=\"txtC w50\">" . ($field['issystem'] ? lang('system') : "<a href=\"?entry=mchannels&action=mfielddetail&mchid={$mchid}&fieldename={$fname}\" onclick=\"return floatwin('open_fielddetail',this)\">" . lang('detail') . "</a>") . "</td>\n" . "</tr>";
} elseif ($mode == 'ca') {
echo "<tr class=\"txt\">\n" . "<td class=\"txtC w40\"><input class=\"checkbox\" type=\"checkbox\" name=\"delete[{$fname}]\" value=\"{$fname}\"></td>\n" . "<td class=\"txtL\"><input type=\"text\" size=\"25\" name=\"fieldsnew[{$fname}][cname]\" value=\"" . mhtmlspecialchars($field['cname']) . "\"></td>\n" . "<td class=\"txtC w60\"><input type=\"text\" size=\"4\" name=\"fieldsnew[{$fname}][vieworder]\" value=\"{$field['vieworder']}\"></td>\n" . "<td class=\"txtC\">" . mhtmlspecialchars($fname) . "</td>\n" . "<td class=\"txtC w100\">" . $datatypearr[$field['datatype']] . "</td>\n" . "<td class=\"txtC w60\"><a href=\"?entry=catalogs&action=cafielddetail&fieldename={$fname}\" onclick=\"return floatwin('open_fielddetail',this)\">" . lang('detail') . "</a></td>\n" . "</tr>";
} elseif ($mode == 'cc') {
echo "<tr class=\"txt\">\n" . "<td class=\"txtC w40\"><input class=\"checkbox\" type=\"checkbox\" name=\"delete[{$fname}]\" value=\"{$fname}\"></td>\n" . "<td class=\"txtL\"><input type=\"text\" size=\"25\" name=\"fieldsnew[{$fname}][cname]\" value=\"" . mhtmlspecialchars($field['cname']) . "\"></td>\n" . "<td class=\"txtC w60\"><input type=\"text\" size=\"4\" name=\"fieldsnew[{$fname}][vieworder]\" value=\"{$field['vieworder']}\"></td>\n" . "<td class=\"txtC\">" . mhtmlspecialchars($fname) . "</td>\n" . "<td class=\"txtC w100\">" . $datatypearr[$field['datatype']] . "</td>\n" . "<td class=\"txtC w60\"><a href=\"?entry=cotypes&action=ccfielddetail&fieldename={$fname}\" onclick=\"return floatwin('open_fielddetail',this)\">" . lang('detail') . "</a></td>\n" . "</tr>";
} elseif ($mode == 'ma') {
echo "<tr class=\"txt\">\n" . "<td class=\"txtC w40\"><input class=\"checkbox\" type=\"checkbox\" name=\"delete[{$fname}]\" value=\"{$fname}\"></td>\n" . "<td class=\"txtL\"><input type=\"text\" size=\"25\" name=\"fieldsnew[{$fname}][cname]\" value=\"" . mhtmlspecialchars($field['cname']) . "\"></td>\n" . "<td class=\"txtC\">" . mhtmlspecialchars($fname) . "</td>\n" . "<td class=\"txtC w60\"><input class=\"checkbox\" type=\"checkbox\" name=\"fieldsnew[{$fname}][isadmin]\" value=\"1\"" . (!empty($field['issystem']) ? ' disabled' : '') . ($field['isadmin'] ? ' checked' : '') . "></td>\n" . "<td class=\"txtC w60\"><input type=\"text\" size=\"4\" name=\"fieldsnew[{$fname}][vieworder]\" value=\"{$field['vieworder']}\"></td>\n" . "<td class=\"txtC w100\">" . $datatypearr[$field['datatype']] . "</td>\n" . "<td class=\"txtC w60\"><a href=\"?entry=matypes&action=fielddetail&matid={$matid}&fieldename={$fname}\" onclick=\"return floatwin('open_fielddetail',this)\">" . lang('detail') . "</a></td>\n" . "</tr>";
} elseif (in_array($mode, array('p', 'o', 'r', 'c', 'b'))) {
echo "<tr class=\"txt\">\n" . "<td class=\"txtC w40\"><input class=\"checkbox\" type=\"checkbox\" name=\"delete[{$fname}]\" value=\"{$fname}\"></td>\n" . "<td class=\"txtL\"><input type=\"text\" size=\"25\" name=\"fieldsnew[{$fname}][cname]\" value=\"" . mhtmlspecialchars($field['cname']) . "\"></td>\n" . "<td class=\"txtC w60\"><input class=\"checkbox\" type=\"checkbox\" name=\"fieldsnew[{$fname}][isadmin]\" value=\"1\"" . ($field['isadmin'] ? ' checked' : '') . "></td>\n" . "<td class=\"txtC w60\"><input type=\"text\" size=\"4\" name=\"fieldsnew[{$fname}][vieworder]\" value=\"{$field['vieworder']}\"></td>\n" . "<td class=\"txtC\">" . mhtmlspecialchars($fname) . "</td>\n" . "<td class=\"txtC w100\">" . $datatypearr[$field['datatype']] . "</td>\n" . "<td class=\"txtC w50\"><a href=\"?entry=cufields&action=" . $mode . "fielddetail&fieldename={$fname}\" onclick=\"return floatwin('open_fielddetail',this)\">" . lang('detail') . "</a></td>\n" . "</tr>";
} elseif (in_array($mode, array('mf', 'ml', 'mc', 'mr', 'mb'))) {
$nowarr = array('mf' => 1, 'ml' => 2, 'mc' => 3, 'mr' => 4, 'mb' => 5);
echo "<tr class=\"txt\">\n" . "<td class=\"txtC w40\"><input class=\"checkbox\" type=\"checkbox\" name=\"delete[{$fname}]\" value=\"{$fname}\"></td>\n" . "<td class=\"txtL\"><input type=\"text\" size=\"25\" name=\"fieldsnew[{$fname}][cname]\" value=\"" . mhtmlspecialchars($field['cname']) . "\"></td>\n" . "<td class=\"txtC w60\"><input class=\"checkbox\" type=\"checkbox\" name=\"fieldsnew[{$fname}][isadmin]\" value=\"1\"" . ($field['isadmin'] ? ' checked' : '') . "></td>\n" . "<td class=\"txtC w60\"><input type=\"text\" size=\"4\" name=\"fieldsnew[{$fname}][vieworder]\" value=\"{$field['vieworder']}\"></td>\n" . "<td class=\"txtC\">" . mhtmlspecialchars($fname) . "</td>\n" . "<td class=\"txtC w100\">" . $datatypearr[$field['datatype']] . "</td>\n" . "<td class=\"txtC w50\"><a href=\"?entry=mcufields&action=fielddetail&cu={$nowarr[$mode]}&fieldename={$fname}\" onclick=\"return floatwin('open_fielddetail',this)\">" . lang('detail') . "</a></td>\n" . "</tr>";
}
}
示例2: missionfield
function missionfield($cname, $ename, $setting = array(), $datatype = 'text')
{
global $rprojects;
$mcell = in_array($datatype, array('images', 'files', 'flashs', 'medias')) ? 1 : 0;
//是否是多集模式字段
$noremote = in_array($datatype, array('int', 'float', 'select', 'mselect', 'date')) ? 1 : 0;
//是否不存在附件下载因素的字段
${'clearhtml' . $ename} = isset($setting['clearhtml']) && !$mcell ? explode(',', $setting['clearhtml']) : array();
$rpidsarr = array('0' => lang('notremote'));
foreach ($rprojects as $rpid => $rproject) {
$rpidsarr[$rpid] = $rproject['cname'];
}
$frompagearr = array('0' => lang('based_content_page0'), '1' => lang('netsilistpage'), '2' => lang('content_trace_page0_1'), '3' => lang('content_trace_page0_2'));
echo "<tr class=\"category\"><td><b>[" . mhtmlspecialchars($cname) . "]</b></td><td colspan=\"3\"></td></tr>";
echo "<tr>\n" . "<td width=\"15%\" class=\"item1\">" . lang('contensourcpage') . "</td>\n" . "<td width=\"35%\" class=\"item2\"><select style=\"vertical-align: middle;\" name=\"fsettingsnew[{$ename}][frompage]\">" . makeoption($frompagearr, empty($setting['frompage']) ? 0 : $setting['frompage']) . "</select></td>\n" . "<td width=\"15%\" class=\"item1\">" . lang('resultdealfunc') . "</td>\n" . "<td class=\"item2\"><input type=\"text\" size=\"25\" name=\"fsettingsnew[{$ename}][func]\" value=\"" . (empty($setting['func']) ? '' : mhtmlspecialchars($setting['func'])) . "\"></td>\n" . "</tr>\n";
if (!$mcell) {
echo "<tr>\n" . "<td width=\"15%\" class=\"item1\">" . lang('fiecontgathpatt') . "</td>\n" . "<td class=\"item2\"><textarea rows=\"4\" name=\"fsettingsnew[{$ename}][ftag]\" cols=\"40\">" . (isset($setting['ftag']) ? mhtmlspecialchars($setting['ftag']) : '') . "</textarea></td>\n" . "<td width=\"15%\" class=\"item1\">" . lang('clear') . "Html<br><input class=\"checkbox\" type=\"checkbox\" name=\"chk{$ename}\" onclick=\"checkall(this.form,'clearhtml{$ename}','chk{$ename}')\">" . lang('selectall') . "</td>\n" . "<td class=\"item2\">" . "<input type=\"checkbox\" class=\"checkbox\" name=\"clearhtml{$ename}[]\" value=\"1\"" . (in_array('1', ${'clearhtml' . $ename}) ? " checked" : "") . "><a> \n" . "<input type=\"checkbox\" class=\"checkbox\" name=\"clearhtml{$ename}[]\" value=\"2\"" . (in_array('2', ${'clearhtml' . $ename}) ? " checked" : "") . "><br> \n" . "<input type=\"checkbox\" class=\"checkbox\" name=\"clearhtml{$ename}[]\" value=\"3\"" . (in_array('3', ${'clearhtml' . $ename}) ? " checked" : "") . "><table> \n" . "<input type=\"checkbox\" class=\"checkbox\" name=\"clearhtml{$ename}[]\" value=\"4\"" . (in_array('4', ${'clearhtml' . $ename}) ? " checked" : "") . "><tr> \n" . "<input type=\"checkbox\" class=\"checkbox\" name=\"clearhtml{$ename}[]\" value=\"5\"" . (in_array('5', ${'clearhtml' . $ename}) ? " checked" : "") . "><td> <br>\n" . "<input type=\"checkbox\" class=\"checkbox\" name=\"clearhtml{$ename}[]\" value=\"6\"" . (in_array('6', ${'clearhtml' . $ename}) ? " checked" : "") . "><p> \n" . "<input type=\"checkbox\" class=\"checkbox\" name=\"clearhtml{$ename}[]\" value=\"7\"" . (in_array('7', ${'clearhtml' . $ename}) ? " checked" : "") . "><font> \n" . "<input type=\"checkbox\" class=\"checkbox\" name=\"clearhtml{$ename}[]\" value=\"8\"" . (in_array('8', ${'clearhtml' . $ename}) ? " checked" : "") . "><div> \n" . "<input type=\"checkbox\" class=\"checkbox\" name=\"clearhtml{$ename}[]\" value=\"9\"" . (in_array('9', ${'clearhtml' . $ename}) ? " checked" : "") . "><span> <br>\n" . "<input type=\"checkbox\" class=\"checkbox\" name=\"clearhtml{$ename}[]\" value=\"10\"" . (in_array('10', ${'clearhtml' . $ename}) ? " checked" : "") . "><tbody> \n" . "<input type=\"checkbox\" class=\"checkbox\" name=\"clearhtml{$ename}[]\" value=\"11\"" . (in_array('11', ${'clearhtml' . $ename}) ? " checked" : "") . "><b> \n" . "<input type=\"checkbox\" class=\"checkbox\" name=\"clearhtml{$ename}[]\" value=\"12\"" . (in_array('12', ${'clearhtml' . $ename}) ? " checked" : "") . ">&nbsp; \n" . "<input type=\"checkbox\" class=\"checkbox\" name=\"clearhtml{$ename}[]\" value=\"13\"" . (in_array('13', ${'clearhtml' . $ename}) ? " checked" : "") . "><script> \n" . "</td>\n" . "</tr>\n";
echo "<tr>\n" . "<td width=\"15%\" class=\"item1\">" . lang('replmesssouront') . "</td>\n" . "<td class=\"item2\"><textarea rows=\"4\" name=\"fsettingsnew[{$ename}][fromreplace]\" cols=\"40\">" . (isset($setting['fromreplace']) ? mhtmlspecialchars($setting['fromreplace']) : '') . "</textarea></td>\n" . "<td width=\"15%\" class=\"item1\">" . lang('repmessagresulcont') . "</td>\n" . "<td class=\"item2\"><textarea rows=\"4\" name=\"fsettingsnew[{$ename}][toreplace]\" cols=\"40\">" . (isset($setting['toreplace']) ? mhtmlspecialchars($setting['toreplace']) : '') . "</textarea></td>\n" . "</tr>\n";
} else {
echo "<tr>\n" . "<td width=\"15%\" class=\"item1\">" . lang('lisregigathpatt') . "</td>\n" . "<td class=\"item2\"><textarea rows=\"4\" name=\"fsettingsnew[{$ename}][ftag]\" cols=\"40\">" . (isset($setting['ftag']) ? mhtmlspecialchars($setting['ftag']) : '') . "</textarea></td>\n" . "<td width=\"15%\" class=\"item1\">" . lang('liscellsplitag') . "</td>\n" . "<td class=\"item2\"><textarea rows=\"4\" name=\"fsettingsnew[{$ename}][splittag]\" cols=\"40\">" . (isset($setting['splittag']) ? mhtmlspecialchars($setting['splittag']) : '') . "</textarea></td>\n" . "</tr>\n";
echo "<tr>\n" . "<td width=\"15%\" class=\"item1\">" . lang('cellurlgathpatte') . "</td>\n" . "<td class=\"item2\"><textarea rows=\"4\" name=\"fsettingsnew[{$ename}][remotetag]\" cols=\"40\">" . (isset($setting['remotetag']) ? mhtmlspecialchars($setting['remotetag']) : '') . "</textarea></td>\n" . "<td width=\"15%\" class=\"item1\">" . lang('celltitlgathepatt') . "</td>\n" . "<td class=\"item2\"><textarea rows=\"4\" name=\"fsettingsnew[{$ename}][titletag]\" cols=\"40\">" . (isset($setting['titletag']) ? mhtmlspecialchars($setting['titletag']) : '') . "</textarea></td>\n" . "</tr>\n";
}
if (!$noremote) {
echo "<tr>\n" . "<td width=\"15%\" class=\"item1\">" . lang('remote_download') . "</td>\n" . "<td width=\"35%\" class=\"item2\"><select style=\"vertical-align: middle;\" name=\"fsettingsnew[{$ename}][rpid]\">" . makeoption($rpidsarr, empty($setting['rpid']) ? 0 : $setting['rpid']) . "</select></td>\n" . "<td width=\"15%\" class=\"item1\">" . lang('downjumfilsty') . "</td>\n" . "<td class=\"item2\"><input type=\"text\" size=\"25\" name=\"fsettingsnew[{$ename}][jumpfile]\" value=\"" . (empty($setting['jumpfile']) ? '' : mhtmlspecialchars($setting['jumpfile'])) . "\"></td>\n" . "</tr>\n";
}
}
示例3: trfield
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);
}
示例4: preg_match
$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');
}
}
示例5: mhtmlspecialchars
function mhtmlspecialchars($string)
{
if (is_array($string)) {
foreach ($string as $key => $val) {
$string[$key] = mhtmlspecialchars($val);
}
} else {
$string = preg_replace('/&((#(\\d{3,5}|x[a-fA-F0-9]{4})|[a-zA-Z][a-z0-9]{2,5});)/', '&\\1', str_replace(array('&', '"', '<', '>'), array('&', '"', '<', '>'), $string));
}
return $string;
}
示例6: updatecrids
function updatecrids($crids = array(), $updatedb = 0, $reason = '')
{
//积分能否为负值,及为小数点?
global $currencys, $timestamp;
if (empty($this->info['mid'])) {
return;
}
if (empty($crids) || !is_array($crids)) {
return;
}
if (!$reason) {
$reason = lang('otherreason');
}
$record = array();
foreach ($crids as $crid => $value) {
$this->updatefield('currency' . $crid, $this->info['currency' . $crid] + $value, 'main');
$record[] = mhtmlspecialchars($timestamp . "\t" . $this->info['mid'] . "\t" . $this->info['mname'] . "\t" . (!$crid ? lang('cash') : $currencys[$crid]['cname']) . "\t" . ($value >= 0 ? '+' : '-') . "\t" . abs($value) . "\t" . $reason);
}
!empty($record) && record2file('currencylog', $record);
$updatedb && $this->updatedb();
}
示例7: amessage
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') . " [<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]);
}
}
if (!empty($mtplsnew)) {
foreach ($mtplsnew as $k => $v) {
$v['cname'] = empty($v['cname']) ? $mtpls[$k]['cname'] : $v['cname'];
if ($v['cname'] != $mtpls[$k]['cname']) {
$mtpls[$k]['cname'] = stripslashes($v['cname']);
示例8: lang
if (in_array('enddate', $u_lists)) {
$cy_arr[] = lang('endtime');
}
if (in_array('view', $u_lists)) {
$cy_arr[] = lang('message');
}
if (in_array('admin', $u_lists)) {
$cy_arr[] = lang('admin');
}
trcategory($cy_arr);
$itemstr = '';
while ($row = $db->fetch_array($query)) {
$channel = read_cache('channel', $row['chid']);
$selectstr = "<input class=\"checkbox\" type=\"checkbox\" name=\"selectid[{$row['aid']}]\" value=\"{$row['aid']}\">";
$row['arcurl'] = view_arcurl($row);
$subjectstr = ($row['thumb'] ? lang('imged') : '') . " <a href={$row['arcurl']} target=\"_blank\">" . mhtmlspecialchars($row['subject']) . "</a>";
$catalogstr = @$catalogs[$row['caid']]['title'];
$uclassstr = $row['ucid'] ? $ucidsarr[$row['ucid']] : '-';
$channelstr = @$channel['cname'];
foreach ($cotypes as $k => $v) {
${'ccid' . $k . 'str'} = '';
if (!$v['self_reg'] && in_array('ccid' . $k, $u_lists) && $row['ccid' . $k]) {
$coclasses = read_cache('coclasses', $k);
${'ccid' . $k . 'str'} = cnstitle($row['ccid' . $k], $v['asmode'], $coclasses);
/////////////
}
}
$checkstr = $row['checked'] ? 'Y' : '-';
$validstr = !$row['enddate'] || $row['enddate'] > $timestamp ? 'Y' : '-';
$clicksstr = $row['clicks'];
$commentsstr = $row['comments'];
示例9: array
$tblfields = array();
if ($dbtable) {
$query = $ndb->query("SHOW FULL COLUMNS FROM {$dbtable}", 'SILENT');
while ($row = $ndb->fetch_array($query)) {
$types = explode(' ', $row['Type']);
$tblfields[$row['Field']] = strtolower($types[0]);
}
}
tabheader(lang('create_query_string'), 'dbsqlstr', "?entry=dbsources&action=viewconfigs&dsid={$dsid}&dbtable={$dbtable}", 8);
trcategory(array(lang('sn'), lang('field_name'), lang('field_type'), '<input class="checkbox" type="checkbox" name="chkall" onclick="checkall(this.form)">' . lang('choose'), lang('query_mode'), lang('value'), lang('order'), lang('order_prior')));
$i = 1;
$orderarr = array('' => '', 'ASC' => lang('asc'), 'DESC' => lang('desc'));
$dbtypearr = array(1 => array('text', 'mediumtext', 'longtext', 'char', 'varchar', 'tinytext'), 2 => array('tinyint', 'smallint', 'int', 'mediumint', 'bigint', 'float', 'double', 'decimal', 'bit', 'bool', 'binary'));
$modearr = array('=' => 0, '>' => 1, '>=' => 1, '<' => 1, '<=' => 1, '!=' => 0, 'LIKE' => 0, 'NOT LIKE' => 0, 'LIKE %...%' => 2, 'LIKE %...' => 2, 'LIKE ...%' => 2, 'REGEXP' => 2, 'NOT REGEXP' => 2, 'IS NULL' => 0, 'IS NOT NULL' => 0);
foreach ($tblfields as $k => $v) {
echo "<tr class=\"txt\">" . "<td class=\"txtC w30\">{$i}</td>\n" . "<td class=\"txtL\"><b>{$k}</b></td>\n" . "<td class=\"txtL\">{$v}</td>\n" . "<td class=\"txtC w45\"><input class=\"checkbox\" type=\"checkbox\" name=\"dbnews[{$k}][adopt]\" value=\"1\"" . (empty($dbnews[$k]['adopt']) ? '' : ' checked') . ">\n" . "<td class=\"txtC\"><select style=\"vertical-align: middle;\" name=\"dbnews[{$k}][mode]\">" . makeoption(thismodearr($v), empty($dbnews[$k]['mode']) ? '' : $dbnews[$k]['mode']) . "</select></td>\n" . "<td class=\"txtC\"><input type=\"text\" size=\"20\" name=\"dbnews[{$k}][value]\" value=\"" . (empty($dbnews[$k]['value']) ? '' : mhtmlspecialchars(stripslashes($dbnews[$k]['value']))) . "\"></td>\n" . "<td class=\"txtC w50\"><select style=\"vertical-align: middle;\" name=\"dbnews[{$k}][order]\">" . makeoption($orderarr, empty($dbnews[$k]['order']) ? '' : $dbnews[$k]['order']) . "</select></td>\n" . "<td class=\"txtC w60\"><input type=\"text\" size=\"4\" name=\"dbnews[{$k}][prior]\" value=\"" . (empty($dbnews[$k]['prior']) ? 0 : mhtmlspecialchars(stripslashes($dbnews[$k]['prior']))) . "\"></td>\n" . "</tr>";
$i++;
}
tabfooter('bdbsqlstr', lang('create'));
if (!empty($dbnews) && $dbtable) {
$selectstr = '';
$selectnum = $nprior = 0;
$wherestr = $orderstr = $sqlstr = '';
$orderarr = array();
foreach ($dbnews as $k => $v) {
if (!empty($v['adopt'])) {
$selectstr .= ($selectstr ? ',' : '') . $k;
$selectnum++;
}
if (!empty($v['mode'])) {
if (in_array($v['mode'], array('IS NULL', 'IS NOT NULL'))) {
示例10: mtrbasic
mtrbasic(lang('indays'), 'indays', $indays);
mtrbasic(lang('outdays'), 'outdays', $outdays);
mtabfooter('searchsubmit', lang('search'));
if (submitcheck('searchsubmit')) {
if ($search_repeat) {
empty($m_cookie['08cms_search_time']) ? msetcookie('08cms_search_time', '1', $search_repeat) : mcmessage('searchoverquick');
}
$pagetmp = $page;
do {
$query = $db->query("SELECT a.* {$fromstr} {$wherestr} {$orderstr} LIMIT " . ($pagetmp - 1) * $mrowpp . ",{$mrowpp}");
$pagetmp--;
} while (!$db->num_rows($query) && $pagetmp);
$itemarchive = '';
$no = $pagetmp * $mrowpp;
while ($archive = $db->fetch_array($query)) {
$no++;
$archive['arcurl'] = view_arcurl($archive);
$archive['subject'] = "<a href=\"{$archive['arcurl']}\" target=\"_blank\">" . mhtmlspecialchars($archive['subject']) . "</a>";
$archive['catalog'] = $catalogs[$archive['caid']]['title'];
$archive['createdate'] = date("{$dateformat} {$timeformat}", $archive['createdate']);
$itemarchive .= "<tr><td class=\"item\" width=\"40\">{$no}</td>\n" . "<td class=\"item2\">{$archive['subject']}</td>\n" . "<td align=\"center\" class=\"item\">{$archive['catalog']}</td>\n" . "<td align=\"center\" class=\"item\">{$archive['mname']}</td>\n" . "<td align=\"center\" class=\"item\" width=\"110\">{$archive['createdate']}</td></tr>\n";
}
$archivecount = $db->result_one("SELECT count(*) {$fromstr} {$wherestr}");
$search_max && ($archivecount = min($archivecount, $search_max));
$multi = multi($archivecount, $mrowpp, $page, "adminm.php?action=search&chid={$chid}&{$filterstr}&searchsubmit=1");
mtabheader(lang('searchresultlist'), '', '', 9);
mtrcategory(array(lang('sn'), lang('title'), lang('catalog'), lang('member'), lang('addtime')));
echo $itemarchive;
mtabfooter();
echo $multi;
}
示例11: lang
}
if (in_array('edit', $u_lists)) {
$cy_arr[] = lang('edit');
}
trcategory($cy_arr);
$pagetmp = $page;
do {
$query = $db->query("SELECT * {$fromsql} {$wheresql} ORDER BY aid DESC LIMIT " . ($pagetmp - 1) * $atpp . ",{$atpp}");
$pagetmp--;
} while (!$db->num_rows($query) && $pagetmp);
$itemstr = '';
while ($row = $db->fetch_array($query)) {
$selectstr = "<input class=\"checkbox\" type=\"checkbox\" name=\"selectid[{$row['aid']}]\" value=\"{$row['aid']}\">";
$aidstr = $row['aid'];
$arcurl = view_farcurl($row['aid'], $row['arcurl']);
$subjectstr = "<a href=\"{$arcurl}\" target=\"_blank\">" . mhtmlspecialchars($row['subject']) . "</a>";
$catalogstr = @$fcatalogs[$row['fcaid']]['title'];
$mnamestr = $row['mname'];
$checkstr = $row['checked'] ? 'Y' : '-';
$validstr = $row['startdate'] < $timestamp && (!$row['enddate'] || $row['enddate'] > $timestamp) ? 'Y' : '-';
$qstatestr = @$qstatearr[$row['qstate']];
$orderstr = $row['vieworder'];
$adddatestr = $row['createdate'] ? date('Y-m-d', $row['createdate']) : '-';
$updatedatestr = $row['updatedate'] ? date('Y-m-d', $row['updatedate']) : '-';
$startdatestr = $row['startdate'] ? date('Y-m-d', $row['startdate']) : '-';
$enddatestr = $row['enddate'] ? date('Y-m-d', $row['enddate']) : '-';
$adminstr = empty($fcatalogs[$row['fcaid']]['cumode']) ? '-' : "<a href=\"?entry=farchive&action=fconsult&aid={$row['aid']}\" onclick=\"return floatwin('open_inarchive',this)\">" . lang('admin') . "</a>";
$editstr = "<a href=\"?entry=farchive&action=farchivedetail&aid={$row['aid']}\" onclick=\"return floatwin('open_farchive',this)\">" . lang('detail') . "</a>";
$itemstr .= "<tr class=\"txt\"><td class=\"txtC w40\">{$selectstr}</td><td class=\"txtC w40\">{$aidstr}</td><td class=\"txtL\">{$subjectstr}</td>\n";
if (in_array('catalog', $u_lists)) {
$itemstr .= "<td class=\"txtC\">{$catalogstr}</td>\n";
示例12: lang
echo "<input class=\"btn\" type=\"submit\" name=\"bfilter\" id=\"bfilter\" value=\"" . lang('filter0') . "\">";
echo "</td></tr></table>";
tabheader(lang('album_list'), '', '', 9);
$cy_arr = array(lang('choose'), lang('title'), lang('member'), lang('catalog'), lang('channel'));
trcategory($cy_arr);
$pagetmp = $page;
$atpp = 10;
do {
$query = $db->query("SELECT * {$fromsql} {$wheresql} ORDER BY aid DESC LIMIT " . ($pagetmp - 1) * $atpp . ",{$atpp}");
$pagetmp--;
} while (!$db->num_rows($query) && $pagetmp);
$itemstr = '';
while ($row = $db->fetch_array($query)) {
$channel = read_cache('channel', $row['chid']);
$itemstr .= "<tr class=\"txt\"><td class=\"txtC w50\" ><input class=\"checkbox\" type=\"checkbox\" name=\"selectid[{$row['aid']}]\" value=\"{$row['aid']}\"></td>";
$itemstr .= "<td class=\"txtL\"><a href=\"" . view_arcurl($row) . "\" target=\"_blank\">" . mhtmlspecialchars($row['subject']) . "</a></td>\n";
$itemstr .= "<td class=\"txtC\">{$row['mname']}</td>\n";
$itemstr .= "<td class=\"txtC\">" . @$acatalogs[$row['caid']]['title'] . "</td>\n";
$itemstr .= "<td class=\"txtC\">" . @$channel['cname'] . "</td>\n";
$itemstr .= "</tr>\n";
}
$counts = $db->result_one("SELECT count(*) {$fromsql} {$wheresql}");
$multi = multi($counts, $atpp, $page, "?win_id={$win_id}&field_id={$field_id}&show_id={$show_id}{$filterstr}");
echo $itemstr;
tabfooter();
echo $multi;
echo '</form>';
?>
</div>
<button id="btn_ok" onclick="setretval()" class="btn" style="display:none"><?php
示例13: exit
<?php
(!defined('M_COM') || !defined('M_ADMIN')) && exit('No Permission');
aheader();
$action = empty($action) ? 'rcatalogsedit' : $action;
if ($action == 'rcatalogsedit') {
if (!submitcheck('brcatalogsedit') && !submitcheck('brcatalogadd')) {
tabheader(lang('reply_coclass_manager'), 'rcatalogsedit', '?entry=cucatalogs&action=rcatalogsedit', '4');
trcategory(array(lang('id'), lang('cocname'), lang('order'), lang('delete')));
$query = $db->query("SELECT * FROM {$tblprefix}cucatalogs WHERE cu='1' ORDER BY vieworder,caid");
while ($row = $db->fetch_array($query)) {
$caid = $row['caid'];
echo "<tr class=\"txt\">\n" . "<td class=\"txtC w30\">{$caid}</td>\n" . "<td class=\"txtL\"><input type=\"text\" name=\"rcatalogsnew[{$caid}][title]\" value=\"" . mhtmlspecialchars($row['title']) . "\" size=\"25\"></td>\n" . "<td class=\"txtC w50\"><input type=\"text\" name=\"rcatalogsnew[{$caid}][vieworder]\" value=\"{$row['vieworder']}\" size=\"4\"></td>\n" . "<td class=\"txtC w30\"><a href=\"?entry=cucatalogs&action=rcatalogdel&caid={$caid}\">" . lang('delete') . "</a></td>\n" . "</tr>";
}
tabfooter('brcatalogsedit');
tabheader(lang('add_msg_coclass'), 'rcatalogadd', '?entry=cucatalogs&action=rcatalogsedit');
trbasic(lang('cocname'), 'rcatalognew[title]', '', 'text');
tabfooter('brcatalogadd', lang('add'));
a_guide('rcatalogsedit');
} elseif (submitcheck('brcatalogsedit')) {
if (!empty($rcatalogsnew)) {
foreach ($rcatalogsnew as $caid => $v) {
$v['title'] = trim(strip_tags($v['title']));
$v['vieworder'] = max(0, intval($v['vieworder']));
$sqlstr = "vieworder='{$v['vieworder']}'";
$v['title'] && ($sqlstr .= ",title='{$v['title']}'");
$db->query("UPDATE {$tblprefix}cucatalogs SET {$sqlstr} WHERE caid='{$caid}'");
}
updatecache('rcatalogs');
}
adminlog(lang('e_re_class_mlist'));
示例14: a_guide
a_guide('shipingadd');
} else {
if ($errorstr = shipingmodule(1)) {
amessage($errorstr, '?entry=shipings&action=shipingadd&shipingnew[cclass]=' . $shipingnew['cclass']);
}
$db->query("INSERT INTO {$tblprefix}shipings SET \n\t\t\t\tcname='{$shipingnew['cname']}',\n\t\t\t\tfreetop='{$shipingnew['freetop']}',\n\t\t\t\tbasefee='{$shipingnew['basefee']}',\n\t\t\t\tplus1mode='{$shipingnew['plus1mode']}',\n\t\t\t\tplus1='{$shipingnew['plus1']}',\n\t\t\t\tplus2mode='{$shipingnew['plus2mode']}',\n\t\t\t\tplus2='{$shipingnew['plus2']}',\n\t\t\t\tbase1='{$shipingnew['base1']}',\n\t\t\t\tprice1='{$shipingnew['price1']}',\n\t\t\t\tunit1='{$shipingnew['unit1']}',\n\t\t\t\tbase2='{$shipingnew['base2']}',\n\t\t\t\tprice2='{$shipingnew['price2']}',\n\t\t\t\tunit2='{$shipingnew['unit2']}'\n\t\t\t\t");
updatecache('shipings');
amessage('shiaddfin', '?entry=shipings&action=shipingsedit');
}
} elseif ($action == 'shipingsedit') {
$fcclass = empty($fcclass) ? '' : $fcclass;
if (!submitcheck('bshipingsedit')) {
tabheader(lang('shiiteadm') . ' [<a href="?entry=shipings&action=shipingadd">' . lang('add') . '</a>]', 'shipingsedit', "?entry=shipings&action=shipingsedit", '7');
trcategory(array(lang('delete'), lang('available'), lang('soushipname'), lang('order'), lang('freetop'), lang('edit')));
foreach ($shipings as $shid => $shiping) {
echo "<tr class=\"txt\">" . "<td class=\"txtC w40\"><input class=\"checkbox\" type=\"checkbox\" name=\"delete[{$shid}]\" value=\"{$shid}\"></td>\n" . "<td class=\"txtC w40\"><input class=\"checkbox\" type=\"checkbox\" name=\"shipingsnew[{$shid}][available]\" value=\"1\"" . (empty($shiping['available']) ? '' : ' checked') . "></td>\n" . "<td class=\"txtL\"><input type=\"text\" size=\"50\" maxlength=\"80\" name=\"shipingsnew[{$shid}][cname]\" value=\"" . mhtmlspecialchars($shiping['cname']) . "\"></td>\n" . "<td class=\"txtC w80\"><input type=\"text\" size=\"5\" maxlength=\"5\" name=\"shipingsnew[{$shid}][vieworder]\" value=\"" . mhtmlspecialchars($shiping['vieworder']) . "\"></td>\n" . "<td class=\"txtC w80\"><input type=\"text\" size=\"5\" maxlength=\"10\" name=\"shipingsnew[{$shid}][freetop]\" value=\"" . mhtmlspecialchars($shiping['freetop']) . "\"></td>\n" . "<td class=\"txtC w40\"><a href=\"?entry=shipings&action=shipingsdetail&shid={$shid}\">" . lang('detail') . "</a></td></tr>\n";
}
tabfooter('bshipingsedit', lang('modify'));
a_guide('shipingsedit');
} else {
if (!empty($delete)) {
foreach ($delete as $shid) {
$db->query("DELETE FROM {$tblprefix}shipings WHERE shid='{$shid}'", 'SILENT');
unset($shipingsnew[$shid]);
}
}
if (!empty($shipingsnew)) {
foreach ($shipingsnew as $shid => $shipingnew) {
$shipingnew['cname'] = empty($shipingnew['cname']) ? $shipings[$shid]['cname'] : $shipingnew['cname'];
$shipingnew['available'] = empty($shipingnew['available']) ? 0 : 1;
$shipingnew['vieworder'] = max(0, intval($shipingnew['vieworder']));
示例15: lang
$ftclassarr[] = $tclass == 'sch' ? "<b>-" . lang('tagsearch') . "-</b>" : ">><a href=\"?entry=mtags&action=mtagsedit&ttype={$ttype}{$param_suffix}&tclass=sch\">" . lang('tagsearch') . "</a>";
echo tab_list($ftclassarr, 9, 0);
}
$searchstr = $tclass == 'sch' ? " <input class=\"text\" name=\"keyword\" type=\"text\" value=\"{$keyword}\" size=\"12\" style=\"vertical-align: middle;\"> <input class=\"btn\" type=\"submit\" name=\"bfilter\" id=\"bfilter\" value=\"" . lang('filter0') . "\">" : '';
$helpstr = $ttype == 'rtag' ? '' : " [<a href=\"tools/taghelp.html" . ($tclass ? '#' . str_replace('tag', '', $ttype) . '_' . $tclass : '') . "\" target=\"08cmstaghelp\">" . lang('help') . "</a>]";
tabheader(lang($ttype . '_admin') . ($tclass == 'sch' ? '' : " [<a href=\"?entry=mtags&action=mtagadd&ttype={$ttype}{$param_suffix}&mtagnew[tclass]={$tclass}\">" . lang('add') . '</a>]') . $helpstr . $searchstr, 'mtagsedit', $rsubmiturl, '9');
trcategory(array(lang('sn'), '<input class="checkbox" type="checkbox" name="chkall" onclick="checkall(this.form)">' . lang('del'), array(lang('tagname'), 'txtL'), array(lang('tag_style'), 'txtL'), lang('type'), lang('order'), lang('close'), lang('edit'), lang('copy'), lang('usual'), lang('code')));
$i = 1;
foreach ($mtags as $key => $mtag) {
if ($tclass == $mtag['tclass'] || $tclass == 'sch') {
$vieworder = $mtag['vieworder'];
$mtag = read_cache($ttype, $key, '', $sid);
if (!$keyword || in_str($keyword, $mtag['ename']) || in_str($keyword, $mtag['cname'])) {
$mtagcodestr = $tclass ? "<a href=\"?entry=mtags&action=mtagcode&ttype={$ttype}{$param_suffix}&tname={$key}\" onclick=\"return floatwin('open_mtagsedit',this)\">" . lang('code') . "</a>" : '-';
$setusualstr = "<a href=\"?entry=mtags&action=setusual&ttype={$ttype}{$param_suffix}&tname={$key}\" onclick=\"return floatwin('open_mtagsedit',this)\">" . lang('usual') . "</a>";
echo "<tr class=\"txt\">" . "<td class=\"txtC w30\">{$i}</td>\n" . "<td class=\"txtC w40\"><input class=\"checkbox\" type=\"checkbox\" name=\"delete[{$key}]\" value=\"{$key}\"></td>\n" . "<td class=\"txtL\"><input type=\"text\" size=\"30\" maxlength=\"30\" name=\"mtagsnew[{$key}][cname]\" value=\"" . mhtmlspecialchars($mtag['cname']) . "\"></td>\n" . "<td class=\"txtL\">" . tag_style($key) . "</td>\n" . "<td class=\"txtC w100\">" . @$tclassarr[$mtag['tclass']] . "</td>\n" . "<td class=\"txtC w50\"><input type=\"text\" size=\"4\" name=\"mtagsnew[{$key}][vieworder]\" value=\"{$vieworder}\"></td>\n" . "<td class=\"txtC w40\">" . ($tclass ? "<input class=\"checkbox\" type=\"checkbox\" name=\"mtagsnew[{$key}][disabled]\" value=\"1\"" . (empty($mtag['disabled']) ? '' : ' checked') . ">" : '-') . "</td>\n" . "<td class=\"txtC w30\"><a href=\"?entry=mtags&action=mtagsdetail&ttype={$ttype}{$param_suffix}&tname={$key}\" onclick=\"return floatwin('open_mtagsedit',this)\">" . lang('detail') . "</a></td>\n" . "<td class=\"txtC w30\"><a href=\"?entry=mtags&action=mtagscopy&ttype={$ttype}{$param_suffix}&tname={$key}\" onclick=\"return floatwin('open_mtagsedit',this)\">" . lang('copy') . "</a></td>\n" . "<td class=\"txtC w30\">{$setusualstr}</td>\n" . "<td class=\"txtC w30\">{$mtagcodestr}</td>\n" . "</tr>\n";
$i++;
}
}
}
tabfooter('bmtagsedit', lang('modify'));
a_guide($ttype . 'edit');
} else {
if (!empty($delete)) {
foreach ($delete as $key) {
del_cache($ttype, $key, '', $sid);
unset($mtagsnew[$key], $mtags[$key]);
}
}
if (!empty($mtagsnew)) {
foreach ($mtagsnew as $key => $mtagnew) {