//更新缓存 include_once S_ROOT . './function/cache.func.php'; click_cache(); } showmessage('do_success', CPURL . '?action=click&type=click&gid=' . $click['groupid']); } include template('admin/tpl/click.htm', 1); } else { if (empty($_GET['op'])) { $list = $clickgroup; } elseif ($_GET['op'] == 'add') { $group = array(); } elseif ($_GET['op'] == 'edit') { if ($group['mid']) { include_once S_ROOT . './function/model.func.php'; $modelarr = getmodelinfo($group['mid']); } } elseif ($_GET['op'] == 'delete') { //删除 $query = $_SGLOBAL['db']->query("SELECT * FROM " . tname('click') . " WHERE groupid='{$groupid}'"); if ($click = $_SGLOBAL['db']->fetch_array($query)) { showmessage('click_group_delete', CPURL . '?action=click'); } if ($group) { if ($group['system']) { showmessage('click_group_error_delete_system', CPURL . '?action=click'); } $_SGLOBAL['db']->query("DELETE FROM " . tname('clickgroup') . " WHERE groupid='{$groupid}'"); updatetable('click', array('groupid' => '0'), array('groupid' => $groupid)); //更新缓存 include_once S_ROOT . './function/cache.func.php';
\t<input type="hidden" name="formhash" value="{$formhash}"> \t<div class="buttons"> \t\t<input id="delmodelconfirm" type="submit" name="delmodelconfirm" value="{$alang['delete_model']}"> \t\t<input name="mid" type="hidden" id="mid" value="{$resultmodels['mid']}" /> \t</div> \t</form> EOF; } elseif ($_GET['op'] == 'delfield') { //ɾ³ý×ֶΠ//¼ì²éÄ£ÐÍÊÇ·ñ´æÔÚ $_GET['mid'] = postget('mid'); $_GET['id'] = postget('id'); $_GET['mid'] = !empty($_GET['mid']) ? intval($_GET['mid']) : 0; $_GET['id'] = !empty($_GET['id']) ? intval($_GET['id']) : 0; $resultmodels = array(); $resultmodels = getmodelinfo($_GET['mid']); $resultfield = array(); if ($_GET['mid'] > 0) { $query = $_SGLOBAL['db']->query('SELECT * FROM ' . tname('modelcolumns') . ' WHERE id = \'' . $_GET['id'] . '\''); $resultfield = $_SGLOBAL['db']->fetch_array($query); if (empty($resultfield)) { showmessage('field_not_exists'); } } else { showmessage('field_not_exists'); } print <<<EOF \t<table summary="" id="pagehead" cellpadding="0" cellspacing="0" border="0" width="100%"> \t\t<tr> \t\t\t<td><h1>{$alang['field_del_confirm']}</h1></td> \t\t\t<td class="actions">
} } } $id = empty($_SGET['id']) ? 0 : intval($_SGET['id']); $click = empty($_SGLOBAL['click'][$groupid]) ? array() : $_SGLOBAL['click'][$groupid]; $clickgroup = $clickgroups[$groupid]; if ($clickgroup['idtype'] == 'spaceitems') { $clickgroup['block'] = 'spacenews'; } elseif ($clickgroup['idtype'] == 'postitems') { $clickgroup['block'] = 'postitem'; } elseif ($clickgroup['idtype'] == 'spacecomments') { $clickgroup['block'] = 'spacecomment'; } elseif ($clickgroup['idtype'] == 'models') { $clickgroup['block'] = 'model'; include_once S_ROOT . './function/model.func.php'; $modelarr = getmodelinfo($clickgroup['mid']); } $timearr = array($time => ' class="current"'); } else { include_once S_ROOT . './data/system/category.cache.php'; $time = in_array($_SGET['time'], array('month', 'week')) ? $_SGET['time'] : "total"; $month = date("Ym", $_SGLOBAL['timestamp']); $week = date("YW", $_SGLOBAL['timestamp']); if ($time == "month") { $setwhere = "WHERE month='{$month}'"; } else { if ($time == "week") { $setwhere = "WHERE week='{$week}'"; } else { $setwhere = ""; }