$contents = $gather->gather_guid(0, 1, $item); if ($contents) { $timeout = lang('gather_timeout_err'); $chid = $gmodels[$gmissions[$gsid]['gmid']]['chid']; $fields = read_cache('fields', $chid); foreach ($contents as $k => $v) { trbasic('[' . $fields[$k]['cname'] . ']' . lang('gather_result'), '', $v === false ? $timeout : mhtmlspecialchars($v), ''); } } else { trbasic(lang('gather_result'), '', '', ''); } } else { trbasic('', '', lang('please_gather_netsite'), ''); } tabfooter(); a_guide('contentstest'); } } elseif ($action == 'contentsoption' && $gsid) { empty($gmissions[$gsid]) && amessage('choosegatmis'); $page = !empty($page) ? max(1, intval($page)) : 1; submitcheck('bfilter') && ($page = 1); $viewdetail = empty($viewdetail) ? 0 : $viewdetail; $gathered = isset($gathered) ? $gathered : '-1'; $outputed = isset($outputed) ? $outputed : '-1'; $abover = isset($abover) ? $abover : '-1'; $keyword = empty($keyword) ? '' : $keyword; $filterstr = ''; foreach (array('viewdetail', 'gathered', 'outputed', 'abover', 'keyword') as $k) { $filterstr .= "&{$k}=" . rawurlencode(stripslashes(${$k})); } $wheresql = "WHERE gsid='{$gsid}'";
${$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)); } }
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') . ' : [' . $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); } }
$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"); } }
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']); $temps = explode("\n", $mcommunew['usetting']);
#$addfieldstr = $sid ? '' : (" >><a href=\"?entry=catalogs&action=cafieldsedit\">".lang('iscustom_catalog_field').'</a>'); $allow = array_filter(explode(",", $allow)); tabheader('页面内容设置' . " [{$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)) { $c_upload->rollback(); amessage($a_field->error, $forward);
$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')); amessage('itemmodifyfinish', axaction(6, "?entry=murls&action=murlsedit"));
trbasic($v['cname'], "minfosnew[grouptype{$k}]", makeoption(ugidsarr($k, $mchid), $minfos["grouptype{$k}"]), 'select'); } } foreach ($mfields as $k => $field) { if ($field['available'] && !$field['issystem'] && !$field['isfunc'] && !$field['isadmin'] && in_array($k, $additems)) { $a_field->init(); $a_field->field = $field; $a_field->oldvalue = !isset($minfos[$k]) ? '' : $minfos[$k]; $a_field->trfield('minfosnew', '', 'm', $mchid); $submitstr .= $a_field->submitstr; } } unset($a_field); tabfooter('bmtrandetail'); check_submit_func($submitstr); a_guide('mtrandetail'); } else { if (in_array('mtcid', $additems)) { $minfosnew['mtcid'] = empty($minfosnew['mtcid']) ? 1 : $minfosnew['mtcid']; } foreach ($grouptypes as $k => $v) { if (!$v['mode'] && in_array("grouptype{$k}", $additems)) { $minfosnew["grouptype{$k}"] = empty($minfosnew["grouptype{$k}"]) ? 0 : $minfosnew["grouptype{$k}"]; } } $c_upload = new cls_upload(); $mfields = fields_order($mfields); $a_field = new cls_field(); foreach ($mfields as $k => $v) { if ($v['available'] && !$v['issystem'] && !$v['isfunc'] && !$v['isadmin'] && in_array($k, $additems)) { $a_field->init();
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'])); $usualurlnew['title'] = empty($usualurlnew['title']) ? $usualurl['title'] : $usualurlnew['title']; $usualurlnew['url'] = empty($usualurlnew['url']) ? $usualurl['url'] : $usualurlnew['url']; $c_upload = new cls_upload(); $usualurlnew['logo'] = upload_s($usualurlnew['logo'], $usualurl['logo'], 'image'); $usualurlnew['sids'] = !empty($sidsnew) ? implode(',', $sidsnew) : ''; $usualurlnew['actsid'] = empty($usualurlnew['actsid']) ? 0 : 1; $usualurlnew['onclick'] = empty($usualurlnew['onclick']) ? '' : trim($usualurlnew['onclick']); $db->query("UPDATE {$tblprefix}usualurls SET \n\t\t\t\t\ttitle='{$usualurlnew['title']}', \n\t\t\t\t\turl='{$usualurlnew['url']}', \n\t\t\t\t\tlogo='{$usualurlnew['logo']}', \n\t\t\t\t\tpmid='{$usualurlnew['pmid']}', \n\t\t\t\t\tsids='{$usualurlnew['sids']}', \n\t\t\t\t\tnewwin='{$usualurlnew['newwin']}',\n\t\t\t\t\tonclick='{$usualurlnew['onclick']}',\n\t\t\t\t\tactsid='{$usualurlnew['actsid']}',\n\t\t\t\t\tvieworder='{$usualurlnew['vieworder']}'\n\t\t\t\t\tWHERE uid='{$uid}'"); $c_upload->closure(1, $uid, 'usualurls'); adminlog(lang('edusudet')); updatecache('usualurls');
$dealstr = submitcheck('bdboptimize') ? 'OPTIMIZE' : 'REPAIR'; $tablestr = ''; foreach ($tables as $table) { $tablestr .= ($tablestr ? ',' : '') . $tblprefix . $table; } $tablestr && $db->query("{$dealstr} TABLE {$tablestr}"); adminlog(lang('db_tb_' . submitcheck('bdboptimize') ? 'optimize' : 'repair')); amessage('tableoperatefinish', '?entry=database&action=dboptimize'); } } elseif ($action == 'dbsql') { if (!submitcheck('bdbsql')) { url_nav(lang('dboperate'), $urlsarr, 'dbsql'); tabheader(lang('run_sql_code'), 'dbsql', '?entry=database&action=dbsql'); echo "<tr class=\"txt\"><td class=\"txtL w25B\">" . lang('im_sql_code_content') . "</td><td class=\"txtL\"><textarea rows=\"15\" name=\"sqlcode\" cols=\"100\"></textarea></td></tr>"; tabfooter('bdbsql'); a_guide('dbsql'); } else { empty($sqlcode) && amessage('inputsqlcode', '?entry=database&action=dbsql'); $sqlquery = splitsql(str_replace(array(' cms_', ' {tblprefix}', ' `cms_'), array(' ' . $tblprefix, ' ' . $tblprefix, ' `' . $tblprefix), $sqlcode)); $affected_rows = 0; foreach ($sqlquery as $sql) { if (trim($sql) != '') { $db->query(stripslashes($sql), 'SILENT'); if ($sqlerror = $db->error()) { break; } else { $affected_rows += intval($db->affected_rows()); } } } adminlog(lang('run_sql_code'));
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'])); $c_upload = new cls_upload(); $itemnew['warrant'] = upload_s($itemnew['warrant'], $item['warrant'], 'image'); $c_upload->closure(1, $pid, 'pays'); $c_upload->saveuptotal(1); unset($c_upload); $db->query("UPDATE {$tblprefix}pays SET\n\t\t\t\t\t amount='{$itemnew['amount']}',\n\t\t\t\t\t truename='{$itemnew['truename']}',\n\t\t\t\t\t telephone='{$itemnew['telephone']}',\n\t\t\t\t\t email='{$itemnew['email']}',\n\t\t\t\t\t remark='{$itemnew['remark']}',\n\t\t\t\t\t warrant='{$itemnew['warrant']}' \n\t\t\t\t\t WHERE pid='{$pid}'\n\t\t\t\t\t "); amessage('paymesmodfin', $forward);
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')); amessage('replycoclasseditfinish', '?entry=cucatalogs&action=rcatalogsedit'); } elseif (submitcheck('brcatalogadd')) { if (!$rcatalognew['title']) {
if (!$order['state'] || $order['state'] == 1) { print '<input type="submit" name="borderdetail" value="' . lang('modify_confirm') . '"> <input type="submit" name="borderpay" value="' . lang('orderspayed') . '" onclick="return orderPayedConfirm()"/>'; } elseif ($modify) { print '<input type="submit" name="bordermodify" value="' . lang('modify_payed') . '">'; } echo '</form><div class="clear"></div>'; tabheader(lang('ordemessset'), 'orderdetail', '?entry=orders&action=orderdetail&oid=' . $oid . '&forward=' . urlencode($forward)); $submitstr = ''; if ($order['state'] && $order['state'] != 1) { foreach ($pfields as $k => $field) { trbasic($field['cname'], '', !isset($order[$k]) ? '' : htmlspecialchars($order[$k]), ''); } $order['state'] < 0 ? tabfooter('borderdelete', lang('deleteorders')) : (print '</form>'); } else { $a_field = new cls_field(); foreach ($pfields as $k => $field) { $a_field->init(); $a_field->field = $field; $a_field->oldvalue = !isset($order[$k]) ? '' : $order[$k]; $a_field->trfield('cartnew', '', 'p'); $submitstr .= $a_field->submitstr; } tabfooter(); print '<input type="submit" name="borderinfo" value="' . lang('modify') . '">'; (!$order['state'] || $order['state'] == 1) && (print ' <input type="submit" name="bordercancel" value="' . lang('cancelorders') . '">'); echo '</form>'; check_submit_func($submitstr); } a_guide('orderdetail'); } }
} if (empty($u_operates) || in_array('check', $u_operates)) { $s_arr['check'] = lang('check'); } if (empty($u_operates) || in_array('uncheck', $u_operates)) { $s_arr['uncheck'] = lang('uncheck'); } if ($s_arr) { $soperatestr = ''; foreach ($s_arr as $k => $v) { $soperatestr .= "<input class=\"checkbox\" type=\"checkbox\" name=\"arcdeal[{$k}]\" value=\"1\">{$v} "; } trbasic(lang('choose_item'), '', $soperatestr, ''); } tabfooter('barcsedit'); a_guide(@$u_guide); } else { include M_ROOT . $u_tplname; } } else { if (empty($arcdeal)) { amessage('selectoperateitem', M_REFERER); } if (empty($selectid)) { amessage('confirmselectcomment', M_REFERER); } $uedit = new cls_mcuedit(); foreach ($selectid as $cid) { if ($uedit->read($cid, 'comment')) { continue; }
} if (empty($u_operates) || in_array('check', $u_operates)) { $s_arr['check'] = lang('check'); } if (empty($u_operates) || in_array('uncheck', $u_operates)) { $s_arr['uncheck'] = lang('uncheck'); } if ($s_arr) { $soperatestr = ''; foreach ($s_arr as $k => $v) { $soperatestr .= "<input class=\"checkbox\" type=\"checkbox\" name=\"arcdeal[{$k}]\" value=\"1\">{$v} "; } trbasic(lang('choose_item'), '', $soperatestr, ''); } tabfooter('barcsedit'); a_guide('commentsedit'); } else { include M_ROOT . $u_tplname; } } else { if (empty($arcdeal) && empty($dealstr)) { amessage('selectoperateitem', axaction(1, M_REFERER)); } if (empty($selectid) && empty($select_all)) { amessage('pchoosecontent', axaction(1, M_REFERER)); } if (!empty($select_all)) { if (empty($dealstr)) { $dealstr = implode(',', array_keys(array_filter($arcdeal))); } else { $arcdeal = array();
$forward = empty($forward) ? M_REFERER : $forward; !($ucotype = $ucotypes[$ucoid]) && amessage('chooseucotype'); if (!submitcheck('bucotypedetail')) { tabheader(lang('ucotypem_detail_edit'), 'ucotypedetail', "?entry=ucotypes&action=ucotypedetail&ucoid={$ucoid}&forward=" . rawurlencode($forward)); trbasic(lang('cotype_name'), '', $ucotype['cname'], ''); $umodearr = array('0' => lang('umode0'), '1' => lang('umode1'), '2' => lang('umode2')); trbasic(lang('coclassumode'), '', makeradio('ucotypenew[umode]', $umodearr, empty($ucotype['umode']) ? 0 : $ucotype['umode']), ''); $vmodearr = array('0' => lang('vmode0'), '1' => lang('vmode1')); trbasic(lang('coclassvmode'), '', makeradio('ucotypenew[vmode]', $vmodearr, empty($ucotype['vmode']) ? 0 : $ucotype['vmode']), ''); trbasic(lang('is_notblank_catas'), 'ucotypenew[notblank]', $ucotype['notblank'], 'radio'); if (in_array($ucotype['cclass'], array('comment', 'offer', 'reply'))) { $emodearr = array(0 => lang('emode0'), 1 => lang('emode1'), 2 => lang('emode2')); trbasic(lang('emode'), '', makeradio('ucotypenew[emode]', $emodearr, empty($ucotype['emode']) ? 0 : $ucotype['emode']), '', lang('agemode')); } tabfooter('bucotypedetail'); a_guide('ucotypedetail'); } else { $ucotypenew['notblank'] = empty($ucotypenew['notblank']) ? 0 : 1; $ucotypenew['emode'] = empty($ucotypenew['emode']) ? 0 : max(0, intval($ucotypenew['emode'])); if (!emode_alter($ucotypenew['emode'], @$ucotype['emode'], 'uccid' . $ucoid, $tblprefix . $ucotype['cclass'] . 's')) { $ucotypenew['emode'] = @$ucotype['emode']; } $db->query("UPDATE {$tblprefix}ucotypes SET \n\t\t\tnotblank='{$ucotypenew['notblank']}',\n\t\t\tumode='{$ucotypenew['umode']}',\n\t\t\tvmode='{$ucotypenew['vmode']}',\n\t\t\temode='{$ucotypenew['emode']}'\n\t\t\tWHERE ucoid='{$ucoid}'"); adminlog(lang('det_modify_ucotype')); updatecache('ucotypes'); amessage('cotypemsetfinish', axaction(6, $forward)); } } elseif ($action == 'ucotypesdelete' && $ucoid) { if (!isset($confirm) || $confirm != 'ok') { $message = lang('del_alert') . "<br><br>"; $message .= lang('confirmclick') . ">><a href=?entry=ucotypes&action=ucotypesdelete&ucoid={$ucoid}&confirm=ok>" . lang('delete') . "</a><br>";
$a_field->deal_search($a_field->field['tbl'] == 'main' ? "a." : "c."); $wherestr .= ($wherestr && $a_field->searchstr ? ' AND ' : '') . $a_field->searchstr; $a_field->filterstr && ($filterstr .= ($filterstr ? '&' : '') . $a_field->filterstr); } } unset($a_field); } if (!empty($indays)) { $filterstr .= ($filterstr ? '&' : '') . "indays={$indays}"; //$wherestr .= ($wherestr ? ' AND ' : '')."a.createdate>'".($timestamp - 86400 * $indays)."'"; $wherestr .= ($wherestr ? ' AND ' : '') . "a.createdate>UNIX_TIMESTAMP()-86400*{$indays}"; } if (!empty($outdays)) { $filterstr .= ($filterstr ? '&' : '') . "outdays={$outdays}"; //$wherestr .= ($wherestr ? ' AND ' : '')."a.createdate<'".($timestamp - 86400 * $outdays)."'"; $wherestr .= ($wherestr ? ' AND ' : '') . "a.createdate<UNIX_TIMESTAMP()-86400*{$outdays}"; } $wherestr = "WHERE a.sid='{$sid}' AND a.checked='1'" . ($wherestr ? ' AND ' : '') . $wherestr; $orderstr = "ORDER BY a.{$orderby} " . ($ordermode ? 'ASC' : 'DESC'); $orderby != 'createdate' && ($filterstr .= ($filterstr ? '&' : '') . "orderby={$orderby}"); $ordermode && ($filterstr .= ($filterstr ? '&' : '') . "ordermode={$ordermode}"); $sqlstr = "{$fromstr} {$wherestr} {$orderstr}"; $surlstr = 'search.php' . ($filterstr ? '?' : '') . $filterstr; $rurlstr = 'search.php?searchsubmit=1' . ($filterstr ? '&' : '') . $filterstr; tabheader(lang('seasettres')); trbasic(lang('searformurl'), '', "{\$cms_abs}{$surlstr}", ''); trbasic(lang('searesurl'), '', "<a href=\"{$rurlstr}\" target=\"_blank\">{\$cms_abs}{$rurlstr}</a>", ''); trbasic(lang('ctaquestr'), '', $sqlstr, ''); tabfooter(); a_guide('searchs'); }
amessage('chaoutrelocdel', '?entry=fchannels&action=fchannelsedit'); } $db->query("DROP TABLE IF EXISTS {$tblprefix}farchives_{$chid}"); $db->query("DELETE FROM {$tblprefix}fchannels WHERE chid='{$chid}'"); $db->query("DELETE FROM {$tblprefix}ffields WHERE chid='{$chid}'"); del_cache('ffields', $chid); @unlink(M_ROOT . './dynamic/mguides/free_' . $chid . '.php'); adminlog(lang('delete_freeinfo_channel')); updatecache('fchannels'); amessage('frechadelfin', "?entry=fchannels&action=fchannelsedit"); } elseif ($action == 'fielddetail' && $chid && $fieldename) { !isset($fchannels[$chid]) && amessage('choosechannel', '?entry=fchannels&action=fchannelsedit'); $field = read_cache('ffield', $chid, $fieldename); empty($field) && amessage('choosefield', '?entry=fchannels&action=fchanneldetail&chid=' . $chid); if (!submitcheck('bfielddetail')) { tabheader("[" . $fchannels[$chid]['cname'] . "] " . lang('field_edit') . " [{$field['cname']}]", 'fielddetail', "?entry=fchannels&action=fielddetail&chid={$chid}&fieldename={$fieldename}", 2, 0, 1); $submitstr = ''; list($fmode, $fnew, $fsave) = array('fa', false, false); include_once M_ROOT . "./include/fields/{$field['datatype']}.php"; tabfooter('bfielddetail', lang('submit')); check_submit_func($submitstr); a_guide('ffielddetail'); } else { $fconfigarr = array('altertable' => $tblprefix . 'farchives_' . $chid, 'fieldtable' => $tblprefix . 'ffields', 'wherestr' => "WHERE ename='{$fieldename}' AND chid={$chid}"); list($fmode, $fnew, $fsave) = array('fa', false, true); include_once M_ROOT . "./include/fields/{$field['datatype']}.php"; adminlog(lang('detail0_modify_freeinfo_channel_field')); updatecache('ffields', $chid); amessage('fieldeditfinish', axaction(6, '?entry=fchannels&action=fchanneldetail&chid=' . $chid)); } }
} } 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\"> " . lang('delete'), ''); trbasic(lang('add') . lang('usualtagclass'), '', '<input type="text" name="tagutclass" size="25"> ' . lang('order') . ' <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']; }
$itemstr .= "<tr class=\"txt\">\n" . "<td class=\"txtC w30\"><input class=\"checkbox\" type=\"checkbox\" name=\"selectid[{$maid}]\" value=\"{$maid}\"></td>\n" . "<td class=\"txtL\">" . $matypes[$row['matid']]['cname'] . "</td>\n" . "<td class=\"txtC\">{$row['mid']}</td>\n" . "<td class=\"txtC\">{$row['mname']}</td>\n" . "<td class=\"txtC\">{$lookstr}</td>\n" . "<td class=\"txtC\">{$checkstr}</td>\n" . "<td class=\"txtC\">{$editstr}</td>\n" . "</tr>\n"; } $counts = $db->result_one("SELECT count(*) {$fromsql} {$wheresql}"); $multi = multi($counts, $atpp, $page, "?entry=marchives&action=marchivesedit{$param_suffix}{$filterstr}"); tabheader(lang('marchiveslist') . " <input class=\"checkbox\" type=\"checkbox\" name=\"select_all\" value=\"1\"> " . lang('selectallpage'), '', '', 9); trcategory(array("<input class=\"checkbox\" type=\"checkbox\" name=\"chkall\" class=\"category\" onclick=\"checkall(this.form, 'selectid', 'chkall')\">", lang('matype'), lang('memberid'), lang('member_cname'), lang('look'), lang('check'), lang('edit'))); echo $itemstr; tabfooter(); echo $multi; $checkedarr = array('0' => lang('uncheck'), '1' => lang('check')); tabheader(lang('operate_item')); $itemstr = "<input class=\"checkbox\" type=\"checkbox\" name=\"arcdeal[delete]\" value=\"1\"> " . lang('delete_archive') . ' ' . "<input class=\"checkbox\" type=\"checkbox\" name=\"arcdeal[readd]\" value=\"1\"> " . lang('archive_readd') . " "; trbasic(lang('choose_item'), '', $itemstr, ''); trbasic("<input class=\"checkbox\" type=\"checkbox\" name=\"arcdeal[checked]\" value=\"1\"> " . lang('check_archive'), 'arcchecked', makeradio('arcchecked', $checkedarr, 1), ''); tabfooter('barcsedit'); a_guide('marchivesedit'); } else { if (empty($arcdeal) && empty($dealstr)) { amessage('selectoperateitem', axaction(1, M_REFERER)); } if (empty($selectid) && empty($select_all)) { amessage('selectarchive', axaction(1, M_REFERER)); } if (!empty($select_all)) { if (empty($dealstr)) { $dealstr = implode(',', array_keys(array_filter($arcdeal))); } else { $arcdeal = array(); foreach (array_filter(explode(',', $dealstr)) as $k) { $arcdeal[$k] = 1; }
} if (in_array('adddate', $u_lists)) { $itemstr .= "<td class=\"txtC w100\">{$adddatestr}</td>\n"; } if (in_array('edit', $u_lists)) { $itemstr .= "<td class=\"txtC w35\">{$editstr}</td>\n"; } $itemstr .= "</tr>\n"; } $counts = $db->result_one("SELECT count(*) {$fromsql} {$wheresql}"); $multi = multi($counts, $atpp, $page, "?entry=reports&action=reportsedit{$param_suffix}{$filterstr}"); echo $itemstr; tabfooter(); echo $multi; echo '<br><br>' . strbutton('barcsedit', lang('delete')) . '</form>'; a_guide('reportsedit'); } else { include M_ROOT . $u_tplname; } } else { if (empty($selectid) && empty($select_all)) { amessage('pchoosecontent', axaction(1, M_REFERER)); } if (!empty($select_all)) { $parastr = $dealstr = ""; $selectid = array(); $npage = empty($npage) ? 1 : $npage; if (empty($pages)) { $counts = $db->result_one("SELECT count(*) {$fromsql} {$wheresql}"); $pages = @ceil($counts / $atpp); }
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); } $db->query("INSERT INTO {$tblprefix}subsites SET \n\t\t\t\t\tsitename='{$subsitenew['sitename']}',\n\t\t\t\t\tdirname='{$subsitenew['dirname']}',\n\t\t\t\t\ttemplatedir='{$templatedir}',\n\t\t\t\t\tineedstatic='{$timestamp}'\n\t\t\t\t\t"); if ($nsid = $db->insert_id()) {
echo "<tr class=\"txt\"><td class=\"txt txtright fB borderright\">" . lang('msgcodemode') . "</td>\n" . "<td class=\"txtL\">\n" . "<input class=\"radio\" type=\"radio\" id=\"msgcode_mode2\" name=\"mconfigsnew[msgcode_mode]\" value=\"2\" onclick=\"\$id('msgcode1').style.display = 'none';\$id('msgcode2').style.display = '';\"" . (@$mconfigs['msgcode_mode'] == 2 ? ' checked="checked"' : '') . "><label for=\"msgcode_mode2\">" . lang('msgcode2') . "</label> " . "<input class=\"radio\" type=\"radio\" id=\"msgcode_mode1\" name=\"mconfigsnew[msgcode_mode]\" value=\"1\" onclick=\"\$id('msgcode1').style.display = '';\$id('msgcode2').style.display = 'none';\"" . (@$mconfigs['msgcode_mode'] == 1 ? ' checked="checked"' : '') . "><label for=\"msgcode_mode1\">" . lang('msgcode1') . "</label> " . "<input class=\"radio\" type=\"radio\" id=\"msgcode_mode0\" name=\"mconfigsnew[msgcode_mode]\" value=\"0\" onclick=\"\$id('msgcode1').style.display = 'none';\$id('msgcode2').style.display = 'none';\"" . (@(!$mconfigs['msgcode_mode']) ? ' checked="checked"' : '') . "><label for=\"msgcode_mode0\">" . lang('msgcode0') . "</label> " . "</td></tr>\n"; echo "<tbody id=\"msgcode2\" style=\"display:" . (@$mconfigs['msgcode_mode'] == 2 ? '' : 'none') . "\">"; trbasic(lang('msggate'), '', '<input class="radio" type="radio" id="msgcode_gate1" name="mconfigsnew[msgcode_gate]" value="1"' . (@$mconfigs['msgcode_gate'] == 1 ? ' checked="checked"' : '') . "><label for=\"msgcode_gate1\">" . lang('msggate1') . "</label>", ''); trbasic(lang('msgcode_sp1'), 'mconfigsnew[msgcode_sp1]', @$mconfigs['msgcode_sp1']); trbasic(lang('msgcode_pw1'), 'mconfigsnew[msgcode_pw1]', @$mconfigs['msgcode_pw1']); trbasic(lang('msggate'), '', '<input class="radio" type="radio" id="msgcode_gate2" name="mconfigsnew[msgcode_gate]" value="2"' . (@$mconfigs['msgcode_gate'] != 1 ? ' checked="checked"' : '') . "><label for=\"msgcode_gate2\">" . lang('msggate2') . "</label>", ''); trbasic(lang('msgcode_sp2'), 'mconfigsnew[msgcode_sp2]', @$mconfigs['msgcode_sp2']); trbasic(lang('msgcode_pw2'), 'mconfigsnew[msgcode_pw2]', @$mconfigs['msgcode_pw2']); trbasic(lang('msgcode_sms'), 'mconfigsnew[msgcode_sms]', @$mconfigs['msgcode_sms'], 'textarea', lang('msgcode_sms_tip')); echo "</tbody>"; echo "<tbody id=\"msgcode1\" style=\"display:" . (@$mconfigs['msgcode_mode'] == 1 ? '' : 'none') . "\">"; trbasic(lang('msgcode_msg'), 'mconfigsnew[msgcode_msg]', @$mconfigs['msgcode_msg'], 'textarea', lang('msgcode_msg_tip')); echo "</tbody>"; tabfooter(); echo '<input class="button" type="submit" name="bmconfigs" value="' . lang('submit') . '"/> ' . '<input type="hidden" name="mobmode" value="1"/>' . '</form>'; a_guide('cfmail'); } else { if (empty($mobmode)) { $mconfigsnew['mail_smtp'] = trim($mconfigsnew['mail_smtp']); $mconfigsnew['mail_port'] = trim($mconfigsnew['mail_port']); $mconfigsnew['mail_from'] = trim($mconfigsnew['mail_from']); $mconfigsnew['mail_user'] = trim($mconfigsnew['mail_user']); $mconfigsnew['mail_pwd'] = trim($mconfigsnew['mail_pwd']); unset($mconfigsnew['mail_sign'], $mconfigsnew['mail_to']); } saveconfig('mail'); adminlog(lang('mailset'), lang('upanddownset')); amessage(empty($mobmode) ? 'mailsetfinish' : 'mobilesetfinish', '?entry=mconfigs&action=cfmobmail'); } } function saveconfig($cftype)
$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'); } }
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(); $query = $db->query("SELECT * FROM {$tblprefix}splangs " . ($type ? "WHERE type='{$type}'" : '') . " ORDER BY vieworder,slid");
} 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}")); } }
//收信数量限制分析 $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'])) { $wheresql .= (empty($wheresql) ? "" : " AND ") . "viewed='1'";
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}'")) { amessage('mecocoutmetedel', "?entry=menus&action=menusedit{$sub_suffix}");
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"); } }
$query = $db->query("SELECT * FROM {$tblprefix}utypes WHERE pid!=0 AND ismc={$ismc} ORDER BY pid,vieworder,utid"); while ($row = $db->fetch_array($query)) { $utidsarr[$row['utid']] = $row['title']; } trbasic(lang('belongcocl'), 'userurlnew[utid]', makeoption($utidsarr, $userurl['utid']), 'select'); trbasic(lang('userurlcname'), 'userurlnew[title]', $userurl['title'], 'text'); trbasic(lang('userurl'), 'userurlnew[url]', $userurl['url'], 'btext'); $sidsarr = array('m' => lang('msite')) + sidsarr(1); # trbasic(lang('belsitforuse'),'',makecheckbox('sidsnew[]',$sidsarr,$userurl['sids'] === '' ? array() : explode(',',$userurl['sids']),5),''); trbasic(lang('userurlorder'), 'userurlnew[vieworder]', $userurl['vieworder'], 'text'); trbasic(lang('newwin'), 'userurlnew[newwin]', $userurl['newwin'], 'radio'); $ismc && trbasic(lang('onclick'), 'userurlnew[onclick]', $userurl['onclick'], 'btext'); # trbasic(lang('inhitatt'),'userurlnew[actsid]',$userurl['actsid'],'radio'); trbasic(lang('u_permission_set'), 'userurlnew[pmid]', makeoption(pmidsarr('menu'), $userurl['pmid']), 'select'); tabfooter('buserurldetail'); a_guide('userurldetail'); } else { $userurlnew['title'] = trim(strip_tags($userurlnew['title'])); $userurlnew['url'] = trim(strip_tags($userurlnew['url'])); $userurlnew['vieworder'] = max(0, intval($userurlnew['vieworder'])); $userurlnew['utid'] = empty($userurlnew['utid']) ? 0 : max(0, intval($userurlnew['utid'])); (!$userurlnew['title'] || !$userurlnew['url']) && amessage('inpusetiau'); !$userurlnew['utid'] && amessage('please point userurl belong coclass !'); # $userurlnew['sids'] = !empty($sidsnew) ? implode(',',$sidsnew) : ''; $userurlnew['onclick'] = empty($userurlnew['onclick']) ? '' : trim($userurlnew['onclick']); # sids='$userurlnew[sids]', # actsid='$userurlnew[actsid]', $db->query("UPDATE {$tblprefix}userurls SET \n\t\t\t\t\ttitle='{$userurlnew['title']}', \n\t\t\t\t\turl='{$userurlnew['url']}', \n\t\t\t\t\tutid='{$userurlnew['utid']}', \n\t\t\t\t\tpmid='{$userurlnew['pmid']}', \n\t\t\t\t\tnewwin='{$userurlnew['newwin']}',\n\t\t\t\t\tonclick='{$userurlnew['onclick']}',\n\n\t\t\t\t\tvieworder='{$userurlnew['vieworder']}'\n\t\t\t\t\tWHERE uid='{$uid}'"); adminlog(lang('ediuserdetail')); updatecache('userurls'); amessage('usermodfin', axaction(6, "?entry=userurls&action=userurlsedit{$mc_suffix}"));