<?php defined('IN_DESTOON') or exit('Access Denied'); login(); require DT_ROOT . '/module/' . $module . '/common.inc.php'; $MG['homepage'] && $MG['honor_limit'] > -1 or dalert(lang('message->without_permission_and_upgrade'), 'goback'); require DT_ROOT . '/include/post.func.php'; require MD_ROOT . '/honor.class.php'; $do = new honor(); switch ($action) { case 'add': if ($MG['honor_limit']) { $r = $db->get_one("SELECT COUNT(*) AS num FROM {$DT_PRE}honor WHERE username='******' AND status>0"); if ($r['num'] >= $MG['honor_limit']) { dalert(lang($L['limit_add'], array($MG['honor_limit'], $r['num'])), 'goback'); } } if ($submit) { if ($do->pass($post)) { $post['username'] = $_username; $post['addtime'] = 0; $need_check = $MOD['credit_check'] == 2 ? $MG['check'] : $MOD['credit_check']; $post['status'] = get_status(3, $need_check); $do->add($post); dmsg($L['op_add_success'], '?status=' . $post['status']); } else { message($do->errmsg); } } else { foreach ($do->fields as $v) { ${$v} = '';
<?php defined('DT_ADMIN') or exit('Access Denied'); require MD_ROOT . '/honor.class.php'; $do = new honor(); $menus = array(array('添加证书', '?moduleid=' . $moduleid . '&file=' . $file . '&action=add'), array('证书列表', '?moduleid=' . $moduleid . '&file=' . $file), array('审核证书', '?moduleid=' . $moduleid . '&file=' . $file . '&action=check'), array('过期证书', '?moduleid=' . $moduleid . '&file=' . $file . '&action=expire'), array('未通过证书', '?moduleid=' . $moduleid . '&file=' . $file . '&action=reject'), array('回收站', '?moduleid=' . $moduleid . '&file=' . $file . '&action=recycle')); if (in_array($action, array('', 'check', 'expire', 'reject', 'recycle'))) { $sfields = array('按条件', '证书名称', '发证机构', '会员名'); $dfields = array('title', 'title', 'authority', 'username'); $sorder = array('结果排序方式', '添加时间降序', '添加时间升序', '修改时间降序', '修改时间升序', '发证时间降序', '发证时间升序', '到期时间降序', '到期时间升序'); $dorder = array('addtime DESC', 'addtime DESC', 'addtime ASC', 'edittime DESC', 'edittime ASC', 'fromtime DESC', 'fromtime ASC', 'totime DESC', 'totime ASC'); isset($fields) && isset($dfields[$fields]) or $fields = 0; isset($order) && isset($dorder[$order]) or $order = 0; $fields_select = dselect($sfields, 'fields', '', $fields); $order_select = dselect($sorder, 'order', '', $order); $condition = ''; if ($keyword) { $condition .= " AND {$dfields[$fields]} LIKE '%{$keyword}%'"; } } switch ($action) { case 'add': if ($submit) { if ($do->pass($post)) { $do->add($post); dmsg('添加成功', '?moduleid=' . $moduleid . '&file=' . $file . '&action=' . $action . '&catid=' . $post['catid']); } else { msg($do->errmsg); } } else { foreach ($do->fields as $v) {