本文整理汇总了PHP中forumselect函数的典型用法代码示例。如果您正苦于以下问题:PHP forumselect函数的具体用法?PHP forumselect怎么用?PHP forumselect使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了forumselect函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: showmagic
function showmagic()
{
global $tid, $lang;
require_once DISCUZ_ROOT . './include/forum.func.php';
magicshowtype($lang['option'], 'top');
magicshowsetting($lang['target_tid'], 'tid', $tid, 'text');
magicshowsetting($lang['MVK_target'], '', '', '<select name="moveto">' . forumselect() . '</select>');
magicshowtype('', 'bottom');
}
示例2: virtualdata_set
function virtualdata_set()
{
global $head_url, $header_config;
if (!submitcheck('submit')) {
require_once libfile('function/forumlist');
$info = pick_common_get();
$info['vir_cache_time'] = $info['vir_cache_time'] ? $info['vir_cache_time'] : 10;
$info['vir_data_forum'] = unserialize($info['vir_data_forum']);
$info['vir_data_usergroup'] = unserialize($info['vir_data_usergroup']);
$info['forumselect'] = '<select name="set[vir_data_forum][]" size="10" multiple="multiple"><option value="">' . cplang('plugins_empty') . '</option>' . forumselect(FALSE, 0, $info['vir_data_forum'], TRUE) . '</select>';
return $info;
} else {
$set = $_GET['set'];
if (!$set['vir_data_forum'][0] && count($set['vir_data_forum']) == 1) {
$set['vir_data_forum'] = '';
}
pick_common_set($set);
save_syscache('milu_pick_vir_postdata', '');
save_syscache('milu_pick_vir_data', '');
save_syscache('milu_pick_vir_online', '');
cpmsg(milu_lang('op_success'), PICK_GO . "virtual_data", 'succeed');
}
}
示例3: forumleftside
function forumleftside()
{
global $_G;
$leftside = array('favorites' => array(), 'forums' => array());
$leftside['forums'] = forumselect(FALSE, 1);
if ($_G['uid']) {
foreach (C::t('home_favorite')->fetch_all_by_uid_idtype($_G['uid'], 'fid') as $id => $forum) {
if ($_G['fid'] == $forum['id']) {
$_G['forum_fidinfav'] = $forum['favid'];
}
$leftside['favorites'][$forum['id']] = array($forum['title'], $forum['favid']);
}
}
$_G['leftsidewidth_mwidth'] = $_G['setting']['leftsidewidth'] + 15;
return $leftside;
}
示例4: exit
*/
if (!defined('IN_DISCUZ') || !defined('IN_ADMINCP')) {
exit('Access Denied');
}
cpheader();
if (!submitcheck('deletesubmit')) {
require_once DISCUZ_ROOT . './include/forum.func.php';
$anchor = in_array($anchor, array('search', 'admin')) ? $anchor : 'search';
shownav('topic', 'nav_attaches');
showsubmenusteps('nav_attaches', array(array('search', !$searchsubmit), array('admin', $searchsubmit)));
showtips('attach_tips', 'attach_tips', $searchsubmit);
showtagheader('div', 'search', !$searchsubmit);
showformheader('attach');
showtableheader();
showsetting('attach_nomatched', 'nomatched', 0, 'radio');
showsetting('attach_forum', '', '', '<select name="inforum"><option value="all"> >' . lang('all') . '</option><option value=""> </option>' . forumselect(FALSE, 0, 0, TRUE) . '</select>');
showsetting('attach_sizerange', array('sizeless', 'sizemore'), array('', ''), 'range');
showsetting('attach_dlcountrange', array('dlcountless', 'dlcountmore'), array('', ''), 'range');
showsetting('attach_daysold', 'daysold', '', 'text');
showsetting('filename', 'filename', '', 'text');
showsetting('attach_keyword', 'keywords', '', 'text');
showsetting('attach_author', 'author', '', 'text');
showsubmit('searchsubmit', 'search');
showtablefooter();
showformfooter();
showtagfooter('div');
if (submitcheck('searchsubmit')) {
require_once DISCUZ_ROOT . './include/attachment.func.php';
$sql = "a.pid=p.pid";
$ppp = 100;
if ($inforum != 'all') {
示例5: array
$settings = array('mobilewechat' => serialize($setting));
C::t('common_setting')->update_batch($settings);
}
if (!submitcheck('settingsubmit')) {
if ($setting['wsq_siteid']) {
if (in_array('plugin', $_G['setting']['rewritestatus'])) {
$url = $_G['siteurl'] . rewriteoutput('plugin', 1, 'wechat', 'access');
} else {
$url = $_G['siteurl'] . 'plugin.php?id=wechat:access';
}
}
$apilisturl = ADMINSCRIPT . '?action=plugins&operation=config&do=' . $pluginid . '&identifier=wechat&pmod=wsq_setting&viewapi=yes';
$setting['wsq_siteurl'] = $setting['wsq_siteurl'] ? $setting['wsq_siteurl'] : $_G['siteurl'];
$setting['wsq_sitename'] = $setting['wsq_sitename'] ? $setting['wsq_sitename'] : $_G['setting']['bbname'];
require_once libfile('function/forumlist');
$forums = '<select name="setting[wsq_fid]"><option value="">' . cplang('plugins_empty') . '</option>' . forumselect(FALSE, 0, $setting['wsq_fid'], TRUE) . '</select>';
$sitelogo = $setting['wsq_sitelogo'] ? '<img src="' . $setting['wsq_sitelogo'] . '" width="150" />' : '';
$qrcode = $setting['wechat_qrcode'] ? '<img src="' . $_G['setting']['attachurl'] . 'common/' . $setting['wechat_qrcode'] . '" width="150" />' : '';
showtips(lang('plugin/wechat', 'wsq_tips', array('ADMINSCRIPT' => ADMINSCRIPT . '?action=', 'apiurl' => $apilisturl)));
showformheader('plugins&operation=config&do=' . $pluginid . '&identifier=wechat&pmod=wsq_setting', 'enctype');
showtableheader(lang('plugin/wechat', 'wechat_wsq_setting') . ' ' . ($setting['wsq_status'] ? ' (' . lang('plugin/wechat', 'wsq_status_open') . ')' : ($setting['wsq_siteid'] ? ' (' . lang('plugin/wechat', 'wsq_status_ing') . (TIMESTAMP - $setting['wsq_lastrequest'] > 3600 ? ' <a href="' . ADMINSCRIPT . '?action=plugins&operation=config&do=' . $pluginid . '&identifier=wechat&pmod=wsq_setting&recheck=yes">[' . lang('plugin/wechat', 'wsq_status_try') . ']</a>)' : ')') : ' (' . lang('plugin/wechat', 'wsq_status_close') . ')')));
showsetting(lang('plugin/wechat', 'wsq_allow'), 'setting[wsq_allow]', $setting['wsq_allow'], 'radio', 0, 0, lang('plugin/wechat', 'wsq_allow_comment'));
if ($setting['wsq_allow'] && $setting['wsq_siteid']) {
showtablefooter();
showtableheader();
showsetting(lang('plugin/wechat', 'wsq_url'), '', '', '<span style="white-space:nowrap">' . $url . '</span>');
showtablefooter();
showtableheader();
showsetting(lang('plugin/wechat', 'wsq_siteid'), '', '', $setting['wsq_siteid']);
showsetting(lang('plugin/wechat', 'wsq_sitetoken'), '', '', $setting['wsq_sitetoken']);
}
示例6: foreach
}
if (!empty($gids)) {
$gforumnames = C::t('forum_forum')->fetch_all_name_by_fid(array_keys($gids));
foreach ($gids as $fid => $tid) {
$list[$tid]['forumname'] = $gforumnames[$fid]['name'];
$forums[$fid] = $gforumnames[$fid]['name'];
}
}
$threads =& $list;
if ($_GET['view'] != 'all') {
$listcount = count($list) + $hiddennum;
$multi = simplepage($listcount, $perpage, $page, $theurl);
}
}
require_once libfile('function/forumlist');
$forumlist = forumselect(FALSE, 0, intval($_GET['fid']));
dsetcookie('home_diymode', $diymode);
if ($_G['uid']) {
$_GET['view'] = !$_GET['view'] ? 'we' : $_GET['view'];
$navtitle = lang('core', 'title_' . $_GET['view'] . '_thread');
} else {
$navtitle = lang('core', 'title_thread');
}
if ($space['username']) {
$navtitle = lang('space', 'sb_thread', array('who' => $space['username']));
}
$metakeywords = $navtitle;
$metadescription = $navtitle;
if (!$_G['follow']) {
include_once template("diy:home/space_thread");
}
示例7: jsforumselect
function jsforumselect($function)
{
global $parameter, $lang, $db, $tablepre;
if (empty($function) || in_array($function, array('forums', 'threads', 'images'))) {
$forumselect = '<select name="parameter[' . $function . '_forums][]" size="5" multiple="multiple">' . '<option value="all" ' . (is_array($parameter[$function . '_forums']) && in_array('all', $parameter[$function . '_forums']) ? 'selected="selected"' : '') . '> ' . $lang['jswizard_all_forums'] . '</option>' . '<option value=""> </option>';
if ($function == 'forums') {
$query = $db->query("SELECT fid, name FROM {$tablepre}forums WHERE type='group' AND status>0 ORDER BY displayorder");
while ($category = $db->fetch_array($query)) {
$forumselect .= '<option value="' . $category['fid'] . '">' . strip_tags($category['name']) . '</option>';
}
} else {
require_once DISCUZ_ROOT . './include/forum.func.php';
$forumselect .= forumselect();
}
$forumselect .= '</select>';
if (is_array($parameter[$function . '_forums'])) {
foreach ($parameter[$function . '_forums'] as $key => $value) {
if (!$value) {
unset($parameter[$function . '_forums'][$key]);
}
}
if (!in_array('all', $parameter[$function . '_forums'])) {
$forumselect = preg_replace("/(\\<option value=\"(" . implode('|', $parameter[$function . '_forums']) . ")\")(\\>)/", "\\1 selected=\"selected\"\\3", $forumselect);
}
}
return $forumselect;
}
}
示例8: updatemembercount
}
updatemembercount($_G['uid'], array($fromcredits => -$netamount), 1, 'ECU', $_G['uid']);
$netamount = $amount;
$amount = $tocredits = 0;
}
showmessage('credits_transaction_succeed', 'home.php?mod=spacecp&ac=credit&op=exchange', array(), array('showdialog' => 1, 'showmsg' => true, 'locationtime' => true));
}
} else {
$wheresql = '';
$list = array();
$rid = intval($_GET['rid']);
if ($_GET['rid']) {
$wheresql = " AND rid='{$rid}'";
}
require_once libfile('function/forumlist');
$select = forumselect(false, 0, $_GET['fid']);
$keys = array_keys($_G['setting']['extcredits']);
foreach (C::t('common_credit_rule')->fetch_all_by_rid($rid) as $value) {
if (!helper_access::check_module('doing') && $value['action'] == 'doing') {
continue;
} elseif (!helper_access::check_module('blog') && $value['action'] == 'publishblog') {
continue;
} elseif (!helper_access::check_module('wall') && in_array($value['action'], array('guestbook', 'getguestbook'))) {
continue;
}
if (empty($_GET['fid']) || in_array($value['action'], array('digest', 'post', 'reply', 'getattach', 'postattach'))) {
if (checkvalue($value, $keys)) {
$list[$value['action']] = $value;
}
}
}
示例9: showformfooter
showformfooter();
} elseif ($ac == 'del') {
if (submitcheck('submit')) {
foreach ($_GET['delete'] as $delete) {
unset($setting['showactivity']['tids'][$delete]);
C::t('forum_thread')->delete($delete);
}
$settings = array('mobilewechat' => serialize($setting));
C::t('common_setting')->update_batch($settings);
updatecache(array('plugin', 'setting'));
cpmsg(lang('plugin/wechat', 'show_delthread_succeed'), 'action=plugins&operation=config&do=' . $pluginid . '&identifier=wechat&pmod=showactivity_setting', 'succeed');
}
} elseif ($ac == 'add') {
if (!submitcheck('submit')) {
echo '<script type="text/javascript" src="static/js/calendar.js"></script>';
$forumselect = "<select name=\"fid\">\n<option value=\"\"> > " . cplang('select') . "</option><option value=\"\"> </option>" . str_replace('%', '%%', forumselect(FALSE, 0, 0, TRUE)) . '</select>';
showformheader('plugins&operation=config&do=' . $pluginid . '&identifier=wechat&pmod=showactivity_setting&ac=add', 'enctype');
showtableheader();
showsetting(lang('plugin/wechat', 'show_title'), 'subject', '', 'text');
showsetting(lang('plugin/wechat', 'show_starttime'), 'starttimefrom', '', 'calendar', '', 0, '', 1);
showsetting(lang('plugin/wechat', 'show_expiration'), 'activityexpiration', '', 'calendar', '', 0, '', 1);
showsetting(lang('plugin/wechat', 'show_endtime'), 'starttimeto', '', 'calendar', '', 0, '', 1);
showsetting(lang('plugin/wechat', 'show_memo'), 'message', '', 'textarea');
showsetting(lang('plugin/wechat', 'show_forum'), '', '', $forumselect);
showsubmit('submit');
showtablefooter();
showformfooter();
} else {
$_GET['activityclass'] = lang('plugin/wechat', 'show_thread_class');
$_GET['activityplace'] = lang('plugin/wechat', 'show_thread_place');
if (!$_GET['subject'] || !$_GET['starttimefrom'] || !$_GET['activityexpiration'] || !$_GET['message'] || !$_GET['fid']) {
示例10: foreach
foreach ($_G['setting']['extcredits'] as $key => $value) {
if ($value['allowexchangein'] || $value['allowexchangeout']) {
$extcredits_exchange['extcredits' . $key] = array('title' => $value['title'], 'unit' => $value['unit']);
}
}
}
$navtitle = lang('core', 'title_credit');
} else {
$wheresql = '';
$list = array();
if ($_G['gp_rid']) {
$rid = intval($_G['gp_rid']);
$wheresql = " WHERE rid='{$rid}'";
}
require_once libfile('function/forumlist');
$select = forumselect(false, 0, $_G['gp_fid']);
$query = DB::query("SELECT * FROM " . DB::table('common_credit_rule') . " {$wheresql} ORDER BY rid DESC");
while ($value = DB::fetch($query)) {
if (empty($_G['gp_fid']) || in_array($value['action'], array('digest', 'post', 'reply', 'getattach', 'postattach'))) {
$list[$value['action']] = $value;
}
}
if (!empty($_G['gp_fid'])) {
$_G['gp_fid'] = intval($_G['gp_fid']);
$flist = unserialize(DB::result_first("SELECT creditspolicy FROM " . DB::table('forum_forumfield') . " WHERE fid='{$_G['gp_fid']}'"));
foreach ($flist as $action => $value) {
$list[$value['action']] = $value;
}
}
}
include_once template("home/spacecp_credit_base");
示例11: _adminTopic
//.........这里部分代码省略.........
}
if ($errorMsg == '') {
if ($updatemodlog) {
if ($operation != 'delete') {
updatemodlog($moderatetids, $modaction, $expiration);
} else {
updatemodlog($moderatetids, $modaction, $expiration, 0, $reason);
}
}
updatemodworks($modaction, $modpostsnum);
foreach ($threadlist as $thread) {
modlog($thread, $modaction);
}
if ($sendreasonpm) {
$modactioncode = lang('forum/modaction');
$modtype = $modaction;
$modaction = $modactioncode[$modaction];
foreach ($threadlist as $thread) {
if ($operation == 'move') {
sendreasonpm($thread, 'reason_move', array('tid' => $thread['tid'], 'subject' => $thread['subject'], 'modaction' => $modaction, 'reason' => $reason, 'tofid' => $toforum['fid'], 'toname' => $toforum['name'], 'from_id' => 0, 'from_idtype' => 'movethread'));
} else {
sendreasonpm($thread, 'reason_moderate', array('tid' => $thread['tid'], 'subject' => $thread['subject'], 'modaction' => $modaction, 'reason' => $reason, 'from_id' => 0, 'from_idtype' => 'moderate_' . $modtype));
}
}
}
if ($stampstatus) {
set_stamp($stampstatus, $stampaction, $threadlist, $expiration);
}
$this->getController()->redirect(WebUtils::createUrl_oldVersion('index/returnmobileview'));
}
} else {
if ($act == 'move') {
require_once libfile('function/forumlist');
$forumselect = forumselect(FALSE, 0, $threadlist[$_G['tid']]['fid'], $_G['adminid'] == 1 ? TRUE : FALSE);
}
}
}
} else {
if ($type == 'post') {
if ($act == 'band') {
$resultarray = $this->_topicAdmin_band($fid, $tid, $pid, $act, $type, array('sendreasonpm' => $sendreasonpm, 'thread' => $_G['forum_thread']));
} else {
// 在DISCUZ_ROOT/source/include/topicadmin/topicadmin_delpost.php基础上进行二次开发
$resultarray = array();
$thread = $_G['forum_thread'];
$topiclist = array($pid);
$modpostsnum = 1;
$pids = $posts = $authors = array();
$posttable = getposttablebytid($_G['tid']);
foreach (C::t('forum_post')->fetch_all('tid:' . $_G['tid'], $topiclist, false) as $post) {
if ($post['tid'] != $_G['tid']) {
continue;
}
if ($post['first'] == 1) {
dheader("location: {$_G['siteurl']}forum.php?mod=topicadmin&action=moderate&operation=delete&optgroup=3&fid={$_G['fid']}&moderate[]={$thread['tid']}&inajax=yes" . ($_GET['infloat'] ? "&infloat=yes&handlekey={$_GET['handlekey']}" : ''));
} else {
$authors[$post['authorid']] = 1;
$pids[] = $post['pid'];
$posts[] = $post;
}
}
if (!empty($_POST)) {
$reason = checkreasonpm();
$uidarray = $puidarray = $auidarray = array();
$losslessdel = $_G['setting']['losslessdel'] > 0 ? TIMESTAMP - $_G['setting']['losslessdel'] * 86400 : 0;
if ($pids) {
示例12: exit
<?php
/**
* [Discuz!] (C)2001-2099 Comsenz Inc.
* This is NOT a freeware, use is subject to license terms
*
* $Id: modcp_forumaccess.php 7421 2010-04-07 07:16:34Z monkey $
*/
if (!defined('IN_DISCUZ') || !defined('IN_MODCP')) {
exit('Access Denied');
}
$list = $logids = array();
include_once libfile('function/forumlist');
$forumlistall = forumselect(false, false, $_G['fid']);
$adderror = $successed = 0;
$new_user = isset($_G['gp_new_user']) ? trim($_G['gp_new_user']) : '';
if ($_G['fid'] && $_G['forum']['ismoderator'] && $new_user != '' && submitcheck('addsubmit')) {
$deleteaccess = isset($_G['gp_deleteaccess']) ? 1 : 0;
foreach (array('view', 'post', 'reply', 'getattach', 'postattach', 'postimage') as $key) {
${'new_' . $key} = isset($_G['gp_new_' . $key]) ? intval($_G['gp_new_' . $key]) : '';
}
if ($new_user != '') {
$user = DB::fetch_first("SELECT uid, adminid FROM " . DB::table('common_member') . " WHERE username='{$new_user}'");
$uid = $user['uid'];
if (empty($user)) {
$adderror = 1;
} elseif ($user['adminid'] && $_G['adminid'] != 1) {
$adderror = 2;
} else {
$access = DB::fetch_first("SELECT * FROM " . DB::table('forum_access') . " WHERE fid='{$_G['fid']}' AND uid='{$uid}'");
if ($deleteaccess) {
示例13: showsetting
showsetting('settings_functions_other_pwdsafety', 'settingsnew[pwdsafety]', $settings['pwdsafety'], 'radio');
showsetting('settings_functions_other_rssstatus', 'settingsnew[rssstatus]', $settings['rssstatus'], 'radio');
showsetting('settings_functions_other_rssttl', 'settingsnew[rssttl]', $settings['rssttl'], 'text');
showsetting('settings_functions_other_send_birthday', 'settingsnew[bdaystatus]', $settings['bdaystatus'], 'radio');
showsetting('settings_functions_other_debug', 'settingsnew[debug]', $settings['debug'], 'radio');
showsetting('settings_functions_other_activity_type', 'settingsnew[activitytype]', $settings['activitytype'], 'textarea');
showtablefooter();
showtableheader('', 'notop');
showsubmit('settingsubmit');
showtablefooter();
showformfooter();
cpfooter();
exit;
} elseif ($operation == 'permissions') {
include_once DISCUZ_ROOT . './include/forum.func.php';
$forumselect = '<select name="settingsnew[allowviewuserthread][fids][]" multiple="multiple" size="10">' . forumselect(FALSE, 0, 0, TRUE) . '</select>';
$settings['allowviewuserthread'] = unserialize($settings['allowviewuserthread']);
if ($settings['allowviewuserthread']['fids']) {
foreach ($settings['allowviewuserthread']['fids'] as $v) {
$forumselect = str_replace('<option value="' . $v . '">', '<option value="' . $v . '" selected>', $forumselect);
}
}
showtableheader();
showsetting('settings_permissions_allowviewuserthread', 'settingsnew[allowviewuserthread][allow]', $settings['allowviewuserthread']['allow'], 'radio', 0, 1);
showsetting('settings_permissions_allowviewuserthread_fids', '', '', $forumselect);
showtagfooter('tbody');
showsetting('settings_permissions_memliststatus', 'settingsnew[memliststatus]', $settings['memliststatus'], 'radio');
showsetting('settings_permissions_reportpost', 'settingsnew[reportpost]', $settings['reportpost'], 'radio');
showsetting('settings_permissions_minpostsize', 'settingsnew[minpostsize]', $settings['minpostsize'], 'text');
showsetting('settings_permissions_maxpostsize', 'settingsnew[maxpostsize]', $settings['maxpostsize'], 'text');
showsetting('settings_permissions_favorite_storage', 'settingsnew[maxfavorites]', $settings['maxfavorites'], 'text');
示例14: exit
* This is NOT a freeware, use is subject to license terms
*
* $Id: admincp_prune.php 20479 2011-02-24 09:06:10Z congyushuai $
*/
if (!defined('IN_DISCUZ') || !defined('IN_ADMINCP')) {
exit('Access Denied');
}
cpheader();
$searchsubmit = $_G['gp_searchsubmit'];
$fromumanage = $_G['gp_fromumanage'] ? 1 : 0;
require_once libfile('function/misc');
loadcache('forums');
if (!submitcheck('prunesubmit')) {
require_once libfile('function/forumlist');
if ($_G['adminid'] == 1 || $_G['adminid'] == 2) {
$forumselect = '<select name="forums"><option value=""> > ' . $lang['select'] . '</option>' . '<option value=""> </option>' . forumselect(FALSE, 0, 0, TRUE) . '</select>';
if ($_G['gp_forums']) {
$forumselect = preg_replace("/(\\<option value=\"{$_G['gp_forums']}\")(\\>)/", "\\1 selected=\"selected\" \\2", $forumselect);
}
} else {
$forumselect = $comma = '';
$query = DB::query("SELECT f.name FROM " . DB::table('forum_moderator') . " m, " . DB::table('forum_forum') . " f WHERE m.uid='{$_G['uid']}' AND m.fid=f.fid");
while ($forum = DB::fetch($query)) {
$forumselect .= $comma . $forum['name'];
$comma = ', ';
}
$forumselect = $forumselect ? $forumselect : $lang['none'];
}
if ($fromumanage) {
$starttime = !preg_match("/^(0|\\d{4}\\-\\d{1,2}\\-\\d{1,2})\$/", $_G['gp_starttime']) ? '' : $_G['gp_starttime'];
$endtime = $_G['adminid'] == 3 || !preg_match("/^(0|\\d{4}\\-\\d{1,2}\\-\\d{1,2})\$/", $_G['gp_endtime']) ? '' : $_G['gp_endtime'];
示例15: showtableheader
showtableheader('add', 'fixpadding');
showsetting('threads_forumstick_threadurl', 'forumstick_url', '', 'text');
$targetsselect = '<select name="forumsticktargets[]" size="10" multiple="multiple">' . forumselect(FALSE, 0, 0, TRUE) . '</select>';
require_once libfile('function/group');
$groupselect = '<select name="forumsticktargets[]" size="10" multiple="multiple">' . get_groupselect(0, 0, 0) . '</select>';
showsetting('threads_forumstick_targets', '', '', $targetsselect);
showsetting('threads_forumstick_targetgroups', '', '', $groupselect);
echo '<input type="hidden" value="add" name="do" />';
showsubmit('forumsticksubmit', 'submit');
showtablefooter();
showformfooter();
} elseif ($do == 'edit') {
require_once libfile('function/forumlist');
showformheader("threads&operation=forumstick&do=edit&id={$_G['gp_id']}");
showtableheader('edit', 'fixpadding');
$targetsselect = '<select name="forumsticktargets[]" size="10" multiple="multiple">' . forumselect(FALSE, 0, 0, TRUE) . '</select>';
require_once libfile('function/group');
$groupselect = '<select name="forumsticktargets[]" size="10" multiple="multiple">' . get_groupselect(0, 0, 0) . '</select>';
foreach ($forumstickthreads[$_G['gp_id']]['forums'] as $target) {
$targetsselect = preg_replace("/(\\<option value=\"{$target}\")([^\\>]*)(\\>)/", "\\1 \\2 selected=\"selected\" \\3", $targetsselect);
$groupselect = preg_replace("/(\\<option value=\"{$target}\")([^\\>]*)(\\>)/", "\\1 \\2 selected=\"selected\" \\3", $groupselect);
}
showsetting('threads_forumstick_targets', '', '', $targetsselect);
showsetting('threads_forumstick_targetgroups', '', '', $groupselect);
echo '<input type="hidden" value="edit" name="do" />';
echo "<input type=\"hidden\" value=\"{$_G['gp_id']}\" name=\"id\" />";
showsubmit('forumsticksubmit', 'submit');
showtablefooter();
showformfooter();
}
} else {