//栏目 $field = $_SGLOBAL['profield'][$mtag['fieldid']]; //提交处理 if(submitcheck('basesubmit')) { $setarr = array(); if($mtag['grade'] == 9) { //群主 $setarr['joinperm'] = $field['manualmember']?intval($_POST['joinperm']):0; $setarr['viewperm'] = intval($_POST['viewperm']); $setarr['threadperm'] = intval($_POST['threadperm']); $setarr['postperm'] = intval($_POST['postperm']); $setarr['closeapply'] = intval($_POST['closeapply']); } $setarr['pic'] = picurl_get($_POST['pic'], 150); $setarr['announcement'] = getstr($_POST['announcement'], 5000, 1, 1, 1, 1); updatetable('mtag', $setarr, array('tagid'=>$tagid)); showmessage('do_success', "cp.php?ac=mtag&op=manage&tagid=$tagid&subop=$_GET[subop]"); } elseif (submitcheck('memberssubmit')) { //人员管理 mtag_managemember($mtag, $_POST['ids'], $_POST['newgrade']); showmessage('do_success', "cp.php?ac=mtag&op=manage&tagid=$tagid&subop=$_GET[subop]&grade=$_GET[grade]"); } elseif (submitcheck('invitesubmit')) { //邀请 $ids = empty($_POST['ids'])?array():$_POST['ids'];
$pid = empty($_POST['pid']) ? 0 : intval($_POST['pid']); $query = $_SGLOBAL['db']->query("SELECT * FROM " . tname('post') . " WHERE pid='{$pid}'"); if (!($post = $_SGLOBAL['db']->fetch_array($query))) { showmessage('no_privilege'); } //检查权限 $tagid = $post['tagid']; $mtag = ckmtagspace($post['tagid']); if ($mtag['grade'] < 8 && $post['uid'] != $_SGLOBAL['supe_uid'] && $userevent['status'] < 3) { showmessage('no_privilege'); } $message = $_POST['message']; //处理网络图片 if (!empty($_POST['pics'])) { foreach ($_POST['pics'] as $key => $pic) { $picurl = picurl_get($pic); if (!empty($picurl)) { $message .= "\n[img]" . $picurl . "[/img]"; } } } $message = getstr($message, 0, 1, 1, 1, 2); if (strlen($message) < 2) { showmessage('content_is_too_short'); } //开启编辑记录 if (checkperm('edittrail') || $post['uid'] && $post['uid'] != $space['uid']) { $message = $message . saddslashes(cplang('thread_edit_trail', array($_SN[$_SGLOBAL['supe_uid']], sgmdate('Y-m-d H:i:s')))); } //内容 updatetable('post', array('message' => $message), array('pid' => $pid));