<?php defined('IN_DESTOON') or exit('Access Denied'); $TYPE = get_type('link', 1); require MD_ROOT . '/link.class.php'; $do = new dlink(); $menus = array(array('添加链接', '?moduleid=' . $moduleid . '&file=' . $file . '&action=add'), array('链接列表', '?moduleid=' . $moduleid . '&file=' . $file), array('审核链接', '?moduleid=' . $moduleid . '&file=' . $file . '&action=check'), array('链接分类', 'javascript:Dwidget(\'?file=type&item=' . $file . '\', \'链接分类\');'), array('模块设置', '?moduleid=' . $moduleid . '&file=setting#' . $file)); if ($_catids || $_areaids) { require DT_ROOT . '/admin/admin_check.inc.php'; } $this_forward = '?moduleid=' . $moduleid . '&file=' . $file; if (in_array($action, array('', 'check'))) { $sorder = array('结果排序方式', '更新时间降序', '更新时间升序', '是否文字降序', '是否文字升序', '是否推荐降序', '是否推荐升序'); $dorder = array('listorder DESC,itemid DESC', 'edittime DESC', 'eidttime ASC', 'type DESC', 'type ASC', 'elite DESC', 'elite ASC'); $stype = array('类型', '文字', 'LOGO'); $dtype = array('0', '1', '2'); $level = isset($level) ? intval($level) : 0; $typeid = isset($typeid) ? intval($typeid) : 0; $type = isset($type) ? intval($type) : 0; isset($order) && isset($dorder[$order]) or $order = 0; $type_select = type_select('link', 1, 'typeid', '请选择分类', $typeid); $order_select = dselect($sorder, 'order', '', $order); $level_select = level_select('level', '级别', $level); $_type_select = dselect($stype, 'type', '', $type); $condition = ''; if ($_areaids) { $condition .= " AND areaid IN (" . $_areaids . ")"; } //CITY if ($keyword) { $condition .= " AND title LIKE '%{$keyword}%'";
<?php defined('IN_DESTOON') or exit('Access Denied'); require DT_ROOT . '/module/' . $module . '/common.inc.php'; $MOD['link_enable'] or dheader(DT_PATH); require DT_ROOT . '/include/post.func.php'; $TYPE = get_type('link', 1); require MD_ROOT . '/link.class.php'; $do = new dlink(); $typeid = isset($typeid) ? intval($typeid) : 0; if ($action == 'reg') { $MOD['link_reg'] or message($L['link_reg_close']); if ($submit) { captcha($captcha, 1); $post = dhtmlspecialchars($post); if ($do->pass($post)) { $r = $db->get_one("SELECT itemid FROM {$DT_PRE}link WHERE linkurl='{$post['linkurl']}' AND username=''"); if ($r) { message($L['link_url_repeat']); } $post['status'] = 2; $post['level'] = 0; $post['areaid'] = $cityid; $do->add($post); message($L['link_check'], './'); } else { message($do->errmsg); } } else { $type_select = type_select('link', 1, 'post[typeid]', $L['link_choose_type'], 0, 'id="typeid"'); $head_title = $L['link_reg'] . $DT['seo_delimiter'] . $L['link_title'];
<?php defined('DT_ADMIN') or exit('Access Denied'); require MD_ROOT . '/link.class.php'; $do = new dlink(); $menus = array(array('添加链接', '?moduleid=' . $moduleid . '&file=' . $file . '&action=add'), array('链接列表', '?moduleid=' . $moduleid . '&file=' . $file), array('审核链接', '?moduleid=' . $moduleid . '&file=' . $file . '&action=check')); if (in_array($action, array('', 'check'))) { $sfields = array('按条件', '网站', '链接', '会员名'); $dfields = array('title', 'title', 'linkurl', 'username'); $sorder = array('结果排序方式', '添加时间降序', '添加时间升序', '修改时间降序', '修改时间升序'); $dorder = array('addtime DESC', 'addtime DESC', 'addtime ASC', 'edittime DESC', 'edittime 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); } else { msg($do->errmsg); } } else { $title = $linkurl = $style = $username = '';
<?php defined('IN_DESTOON') or exit('Access Denied'); login(); require DT_ROOT . '/module/' . $module . '/common.inc.php'; $MG['homepage'] && $MG['link_limit'] > -1 or dalert(lang('message->without_permission_and_upgrade'), 'goback'); require DT_ROOT . '/include/post.func.php'; require MD_ROOT . '/link.class.php'; $do = new dlink(); switch ($action) { case 'add': if ($MG['link_limit']) { $r = $db->get_one("SELECT COUNT(*) AS num FROM {$DT_PRE}link WHERE username='******' AND status>0"); if ($r['num'] >= $MG['link_limit']) { dalert(lang($L['limit_add'], array($MG['link_limit'], $r['num'])), 'goback'); } } if ($submit) { $post['username'] = $_username; if ($do->pass($post)) { $need_check = $MOD['link_check'] == 2 ? $MG['check'] : $MOD['link_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} = ''; }