showsetting('feed_search_icon', '', $icon, "<select name='icon'><option value=''>{$lang['all']}</option><option value='blog' {$selected['blog']}>{$lang['feed_blog']}</option>\n\t\t\t<option value='thread' {$selected['thread']}>{$lang['feed_thread']}</option><option value='album' {$selected['album']}>{$lang['feed_album']}</option><option value='doing' {$selected['doing']}>{$lang['doing']}</option>\n\t\t\t<option value='share' {$selected['share']}>{$lang['shares']}</option><option value='friend' {$selected['friend']}>{$lang['feed_friend']}</option><option value='poll' {$selected['poll']}>{$lang['feed_poll']}</option>\n\t\t\t<option value='comment' {$selected['comment']}>{$lang['feed_comment']}</option><option value='click' {$selected['click']}>{$lang['feed_click']}</option>\n\t\t\t<option value='show' {$selected['show']}>{$lang['feed_show']}</option><option value='profile' {$selected['profile']}>{$lang['feed_profile']}</option><option value='sitefeed' {$selected['sitefeed']}>{$lang['feed_sitefeed']}</option></select>"); showsetting('feed_search_uid', 'uid', $uid, 'text'); showsetting('feed_search_user', 'users', $users, 'text'); showsetting('feed_search_feedid', 'feedid', $feedid, 'text'); showsetting('feed_search_hot', array('hot1', 'hot2'), array('', ''), 'range'); showsetting('feed_search_time', array('starttime', 'endtime'), array($starttime, $endtime), 'daterange'); echo '<input type="hidden" name="fromumanage" value="' . $fromumanage . '">'; showsubmit('searchsubmit'); showtablefooter(); showformfooter(); showtagfooter('div'); } else { $feedids = authcode($feedids, 'DECODE'); $feedidsadd = $feedids ? explode(',', $feedids) : $_GET['delete']; include_once libfile('function/delete'); $deletecount = count(deletefeeds($feedidsadd)); $cpmsg = cplang('feed_succeed', array('deletecount' => $deletecount)); ?> <script type="text/JavaScript">alert('<?php echo $cpmsg; ?> ');parent.$('feedforum').searchsubmit.click();</script> <?php } if (submitcheck('searchsubmit', 1)) { $feedids = $feedcount = '0'; $sql = $error = ''; $users = trim($users); if ($users != '') { $uids = array(-1); $query = C::t('home_feed')->fetch_uid_by_username(explode(',', $users));
$setarr['image_1_link'] = trim($_POST['image_1_link']); $setarr['image_2'] = trim($_POST['image_2']); $setarr['image_2_link'] = trim($_POST['image_2_link']); $setarr['image_3'] = trim($_POST['image_3']); $setarr['image_3_link'] = trim($_POST['image_3_link']); $setarr['image_4'] = trim($_POST['image_4']); $setarr['image_4_link'] = trim($_POST['image_4_link']); $setarr['dateline'] = $_SGLOBAL['timestamp']; updatetable('feed', $setarr, array('feedid' => $feedid, 'uid' => 0)); } cpmessage('do_success', 'admincp.php?ac=sitefeed', 0); } elseif (submitcheck('deletesubmit')) { if ($_POST['ids']) { $_SGLOBAL['usergroup'][$space['groupid']]['managefeed'] = 1; include_once S_ROOT . './source/function_delete.php'; deletefeeds($_POST['ids']); } cpmessage('do_success', 'admincp.php?ac=sitefeed', 0); } if ($_GET['op'] == 'add') { $feed = array(); $feed['dateline'] = sgmdate('Y-m-d H:i', $_SGLOBAL['timestamp']); } elseif ($_GET['op'] == 'edit') { $_GET['feedid'] = intval($_GET['feedid']); $query = $_SGLOBAL['db']->query("SELECT * FROM " . tname('feed') . " WHERE uid='0' AND feedid='{$_GET['feedid']}'"); $feed = $_SGLOBAL['db']->fetch_array($query); $feed = shtmlspecialchars($feed); if ($feed['dateline'] < $_SGLOBAL['timestamp']) { $feed['dateline'] = $_SGLOBAL['timestamp']; } $feed['dateline'] = sgmdate('Y-m-d H:i', $feed['dateline']);
showmessage('non_normal_operation'); } if ($feed['idtype'] == 'doid') { $_GET['id'] = intval($_POST['cid']); $_GET['doid'] = $feed['id']; require_once libfile('spacecp/doing', 'include'); } else { $_POST['id'] = $feed['id']; $_POST['idtype'] = $feed['idtype']; require_once libfile('spacecp/comment', 'include'); } } if ($_GET['op'] == 'delete') { if (submitcheck('feedsubmit')) { require_once libfile('function/delete'); if (deletefeeds(array($feedid))) { showmessage('do_success', dreferer(), array('feedid' => $feedid)); } else { showmessage('no_privilege_feed_del'); } } } elseif ($_GET['op'] == 'ignore') { $icon = empty($_GET['icon']) ? '' : preg_replace("/[^0-9a-zA-Z\\_\\-\\.]/", '', $_GET['icon']); if (submitcheck('feedignoresubmit')) { $uid = empty($_POST['uid']) ? 0 : intval($_POST['uid']); if ($icon) { $icon_uid = $icon . '|' . $uid; if (empty($space['privacy']['filter_icon']) || !is_array($space['privacy']['filter_icon'])) { $space['privacy']['filter_icon'] = array(); } $space['privacy']['filter_icon'][$icon_uid] = $icon_uid;
} $_GET['feedid'] = intval($_GET['feedid']); $query = $_SGLOBAL['db']->query("SELECT * FROM " . tname('feed') . " WHERE feedid='{$_GET['feedid']}'"); $feed = $_SGLOBAL['db']->fetch_array($query); if ($feed['uid']) { realname_set($feed['uid'], $feed['username']); realname_get(); $feed = mkfeed($feed); } $feed['title_template'] = shtmlspecialchars($feed['title_template']); $feed['body_general'] = shtmlspecialchars($feed['body_general']); $feed['dateline'] = sgmdate('Y-m-d H:i', $feed['dateline']); } elseif ($_GET['op'] == 'delete') { $_GET['feedid'] = intval($_GET['feedid']); include_once S_ROOT . './source/function_delete.php'; if (deletefeeds(array($_GET['feedid']))) { cpmessage('do_success', 'admincp.php?ac=feed'); } else { cpmessage('choose_to_delete_events'); } } else { $mpurl = 'admincp.php?ac=feed'; //处理搜索 $intkeys = array('uid', 'feedid'); $strkeys = array('username', 'icon'); $randkeys = array(array('sstrtotime', 'dateline'), array('intval', 'hot')); $likekeys = array(); $results = getwheres($intkeys, $strkeys, $randkeys, $likekeys); $wherearr = $results['wherearr']; $wheresql = empty($wherearr) ? '1' : implode(' AND ', $wherearr); $mpurl .= '&' . implode('&', $results['urls']);