function switch_tool() { global $vars, $event, $step, $tools; extract(gpsa($vars)); pagetop(gTxt('txp_import'), ''); ?> <script type="text/javascript"> <!--// function showHideFields($sel) { if(document.getElementById){ document.getElementById('mtblogid').style.display = ($sel=='mtdb') ? 'block': 'none'; document.getElementById('wponly').style.display = ($sel=='wp') ? 'block': 'none'; document.getElementById('databased').style.display = ($sel=='wp' || $sel=='mtdb' || $sel=='b2')? 'block':'none'; } } //--> </script> <?php $content = startTable('edit'); $content .= tr(tdcs(hed(gTxt('txp_import'), 3), 2)); //Select tool $content .= tr(fLabelCell('select_tool', 'import', 'from') . td(tag(type_options($tools), 'select', " name=\"import_tool\" onchange=\"showHideFields(this.value);\""), '', 'from'), ' class="import-from"'); //Some data we collect $content .= tr(fLabelCell('import_section', 'import_section', 'section') . td(import_section_popup(''), '', 'section'), ' class="import-section"'); $status_options = array(4 => gTxt('live'), 1 => gTxt('draft'), 2 => gTxt('hidden'), 3 => gTxt('pending')); $content .= tr(fLabelCell('import_status', 'import_status', 'status') . td(type_select($status_options), '', 'status'), ' class="import-status"'); $content .= tr(fLabelCell('import_invite', 'import_invite', 'comment-invite') . td(fInput('text', 'comments_invite', gTxt('comments'), 'edit'), '', 'comment-invite'), ' class="import-comment"'); //DataBase imports only $databased = tr(tdcs(hed(gTxt('database_stuff'), 3), 2)) . tr(fLabelCell('import_database', 'import_database', 'database') . td(fInput('text', 'importdb', '', 'edit'), '', 'database'), ' class="import-database"') . tr(fLabelCell('import_login', 'import_login', 'login') . td(fInput('text', 'importdblogin', '', 'edit'), '', 'login'), ' class="import-login"') . tr(fLabelCell('import_password', 'import_password', 'password') . td(fInput('text', 'importdbpass', '', 'edit'), '', 'password'), ' class="import-password"') . tr(fLabelCell('import_host', 'import_host', 'host') . td(fInput('text', 'importdbhost', '', 'edit'), '', 'host'), ' class="import-host"'); //Ugly, but a way to present a clean screen with only required fields //while we keep JavaScript code at minimum $content .= tr(tda(tag($databased, 'table', ' id="databased" style="display: none; border: none;"'), ' colspan="2"')); //MT-DB Specific $mtblogid = tr(fLabelCell('import_blogid', 'import_blogid', 'blog-id') . td(fInput('text', 'blog_id', '', 'edit'), '', 'blog-id'), ' class="import-blog-id"'); $content .= tr(tda(tag($mtblogid, 'table', ' id="mtblogid" style="display: none; border: none;"'), ' colspan="2"')); //WordPress specific option $wponly = tr(fLabelCell('import_wpprefix', 'import_wpprefix', 'wp-prefix') . td(fInput('text', 'wpdbprefix', 'wp_', 'edit'), '', 'wp-prefix'), ' class="import-wp-prefix"'); $content .= tr(tda(tag($wponly, 'table', ' id="wponly" style="display: none; border: none;"'), ' colspan="2"')); $content .= endTable(); $content .= tag(fInput('submit', 'choose', gTxt('continue'), 'publish'), 'p', ' style="text-align:center"'); $content .= sInput('start_import') . eInput('import'); echo '<div id="' . $event . '_container" class="txp-container txp-edit">' . form($content, '', '', 'post', '', '', 'import') . '</div>'; }
echo $forward; ?> "/> <input type="hidden" name="itemid" value="<?php echo $itemid; ?> "/> <div class="tt"><?php echo $action == 'add' ? '添加' : '修改'; ?> 公告</div> <table cellpadding="2" cellspacing="1" class="tb"> <tr> <td class="tl"><span class="f_red">*</span> 公告分类</td> <td><span id="type_box"><?php echo type_select('announce', 1, 'post[typeid]', '请选择分类', $typeid, 'id="typeid"'); ?> </span> <a href="javascript:var type_item='announce',type_name='post[typeid]',type_default='请选择分类',type_id=<?php echo $typeid; ?> ,type_interval=setInterval('type_reload()',500);Dwidget('?file=type&item=<?php echo $file; ?> ', '公告分类');"><img src="<?php echo $MODULE[2]['linkurl']; ?> image/img_add.gif" width="12" height="12" title="管理分类"/></a> <span id="dtypeid" class="f_red"></span></td> </tr> <tr> <td class="tl"><span class="f_red">*</span> 公告标题</td> <td><input name="post[title]" type="text" id="title" size="50" value="<?php
echo $action; ?> "/> <input type="hidden" name="itemid" value="<?php echo $itemid; ?> "/> <input type="hidden" name="forward" value="<?php echo $forward; ?> "/> <table cellpadding="2" cellspacing="1" class="tb"> <tr> <td class="tl"><span class="f_red">*</span> 邮件分类</td> <td><?php echo type_select('mail', 1, 'typeid', '请选择分类', $typeid, 'id="typeid"'); ?> <img src="<?php echo $MODULE[2]['linkurl']; ?> image/img_add.gif" width="12" height="12" title="管理分类" class="c_p" onclick="Dwidget('?file=type&item=<?php echo $file; ?> ', '订阅分类');"/> <span id="dtypeid" class="f_red"></span></td> </tr> <tr> <td class="tl"><span class="f_red">*</span> 邮件标题</td> <td><input type="text" size="60" name="title" id="title" value="<?php echo $title; ?> "/> <span id="dtitle" class="f_red"></span></td>
$itemids = is_array($itemid) ? $itemid : array($itemid); foreach ($itemids as $itemid) { $do->itemid = $itemid; $item = $do->get_one(); if (!$item || $item['username'] != $_username) { message(); } $do->recycle($itemid); } dmsg($L['op_del_success'], $forward); break; default: $status = isset($status) ? intval($status) : 3; in_array($status, array(1, 2, 3)) or $status = 3; $typeid = isset($typeid) ? $typeid === '' ? -1 : intval($typeid) : -1; $type_select = type_select($TYPE, 0, 'typeid', $L['default_type'], $typeid, '', $L['all_type']); $condition = "username='******' AND status={$status}"; if ($keyword) { $condition .= " AND title LIKE '%{$keyword}%'"; } if ($typeid > -1) { $condition .= " AND typeid={$typeid}"; } $lists = $do->get_list($condition); foreach ($lists as $k => $v) { $lists[$k]['type'] = $lists[$k]['typeid'] && isset($TYPE[$lists[$k]['typeid']]) ? set_style($TYPE[$lists[$k]['typeid']]['typename'], $TYPE[$lists[$k]['typeid']]['style']) : $L['default_type']; } $head_title = $L['news_title']; break; } $nums = array();
send_mail($r['email'], $m['title'], $m['content']); $i = true; $num++; } if ($i) { $page++; msg('已发送 ' . $num . ' 封邮件,系统将自动继续,请稍候...', '?moduleid=' . $moduleid . '&file=' . $file . '&action=' . $action . '&page=' . $page . '&itemid=' . $itemid . '&num=' . $num); } else { cache_delete($_username . '_mail.php'); $db->query("UPDATE {$DT_PRE}mail SET sendtime='{$DT_TIME}' WHERE itemid={$itemid}"); msg('邮件发送成功 共发送 ' . $num . ' 封邮件', '?moduleid=' . $moduleid . '&file=' . $file, 5); } break; default: $typeid = isset($typeid) ? $typeid === '' ? -1 : intval($typeid) : -1; $type_select = type_select($TYPE, 1, 'typeid', '请选择分类', $typeid); $condition = '1'; if ($keyword) { $condition .= " AND title LIKE '%{$keyword}%'"; } if ($typeid > 0) { $condition .= " AND typeid={$typeid}"; } if ($page > 1 && $sum) { $items = $sum; } else { $r = $db->get_one("SELECT COUNT(*) AS num FROM {$DT_PRE}mail WHERE {$condition}"); $items = $r['num']; } $pages = pages($items, $page, $pagesize); $mails = array();
break; case 'delete': $itemid or message($L['news_msg_choose']); $do->itemid = $itemid; $r = $do->get_one(); if (!$r || $r['username'] != $_username) { message(); } $do->recycle($itemid); dmsg($L['op_del_success'], $forward); break; default: $status = isset($status) ? intval($status) : 3; in_array($status, array(1, 2, 3)) or $status = 3; $typeid = isset($typeid) ? $typeid === '' ? -1 : intval($typeid) : -1; $type_select = type_select('news-' . $_userid, 0, 'typeid', $L['default_type'], $typeid, '', $L['all_type']); $condition = "username='******' AND status={$status}"; if ($keyword) { $condition .= " AND title LIKE '%{$keyword}%'"; } if ($typeid > -1) { $condition .= " AND typeid={$typeid}"; } $lists = $do->get_list($condition); foreach ($lists as $k => $v) { $lists[$k]['type'] = $lists[$k]['typeid'] && isset($TYPE[$lists[$k]['typeid']]) ? set_style($TYPE[$lists[$k]['typeid']]['typename'], $TYPE[$lists[$k]['typeid']]['style']) : $L['default_type']; } $head_title = $L['news_title']; break; } $nums = array();
$itemid or msg('请选择信息'); $typeid = intval($typeid); $do->type($itemid, $typeid); dmsg('分类设置成功', $forward); break; default: $sfields = array('标题', '简介', '会员名'); $dfields = array('title', 'introduce', 'username'); isset($fields) && isset($dfields[$fields]) or $fields = 0; $level = isset($level) ? intval($level) : 0; $typeid = isset($typeid) ? intval($typeid) : 0; $thumb = isset($thumb) ? intval($thumb) : 0; $itemid or $itemid = ''; $fields_select = dselect($sfields, 'fields', '', $fields); $level_select = level_select('level', '级别', $level); $type_select = type_select($tid, 0, 'typeid', '默认', $typeid); $condition = "specialid={$specialid}"; if ($keyword) { $condition .= " AND {$dfields[$fields]} LIKE '%{$keyword}%'"; } if ($level) { $condition .= " AND level={$level}"; } if ($typeid) { $condition .= " AND typeid={$typeid}"; } if ($thumb) { $condition .= " AND thumb<>''"; } if ($itemid) { $condition .= " AND itemid={$itemid}";
$do->delete($itemid); dmsg('删除成功', $forward); break; case 'level': $itemid or msg('请选择公告'); $level = intval($level); $do->level($itemid, $level); dmsg('级别设置成功', $forward); break; default: $sorder = array('结果排序方式', '添加时间降序', '添加时间升序', '浏览次数降序', '浏览次数升序', '开始时间降序', '开始时间升序', '到期时间降序', '到期时间升序'); $dorder = array('listorder DESC,addtime DESC', 'addtime DESC', 'addtime ASC', 'hits DESC', 'hits ASC', 'fromtime DESC', 'fromtime ASC', 'totime DESC', 'totime ASC'); isset($order) && isset($dorder[$order]) or $order = 0; isset($typeid) or $typeid = 0; $level = isset($level) ? intval($level) : 0; $type_select = type_select('announce', 1, 'typeid', '请选择分类', $typeid); $order_select = dselect($sorder, 'order', '', $order); $level_select = level_select('level', '级别', $level); $condition = '1'; if ($_areaids) { $condition .= " AND areaid IN (" . $_areaids . ")"; } //CITY if ($keyword) { $condition .= " AND title LIKE '%{$keyword}%'"; } if ($typeid) { $condition .= " AND typeid={$typeid}"; } if ($level) { $condition .= " AND level={$level}";
$credit = $s * $MOD['credit_refresh']; credit_add($_username, -$credit); credit_record($_username, -$credit, 'system', lang($L['credit_record_refresh'], array($MOD['name'])), lang($L['refresh_total'], array($s))); } $msg = lang($L['refresh_success'], array($s)); if ($f) { $msg = $msg . ' ' . lang($L['refresh_fail'], array($f)); } dmsg($msg, $forward); break; default: $status = isset($status) ? intval($status) : 3; in_array($status, array(1, 2, 3, 4)) or $status = 3; $typeid = isset($typeid) ? $typeid === '' ? -1 : intval($typeid) : -1; $mycatid = isset($mycatid) ? $mycatid === '' ? -1 : intval($mycatid) : -1; $mycat_select = type_select('product-' . $_userid, 0, 'mycatid', $L['type_default'], $mycatid, '', $L['type_my']); $condition = "username='******' AND status={$status}"; if ($keyword) { $condition .= " AND keyword LIKE '%{$keyword}%'"; } if ($catid) { $condition .= $CAT['child'] ? " AND catid IN (" . $CAT['arrchildid'] . ")" : " AND catid={$catid}"; } if ($typeid >= 0) { $condition .= " AND typeid={$typeid}"; } if ($mycatid >= 0) { $condition .= " AND mycatid IN (" . type_child($mycatid, $MTYPE) . ")"; } $timetype = strpos($MOD['order'], 'add') !== false ? 'add' : ''; $lists = $do->get_list($condition, $MOD['order']);
$itemid or message($L['favorite_msg_choose']); $do->itemid = $itemid; $r = $do->get_one(); if (!$r || $r['userid'] != $_userid) { message(); } $do->delete($itemid); dmsg($L['op_del_success'], $forward); break; default: $sfields = $L['favorite_sfields']; $dfields = array('title', 'title', 'url', 'note'); isset($fields) && isset($dfields[$fields]) or $fields = 0; $typeid = isset($typeid) ? $typeid === '' ? -1 : intval($typeid) : -1; $fields_select = dselect($sfields, 'fields', '', $fields); $type_select = type_select('favorite-' . $_userid, 0, 'typeid', $L['default_type'], $typeid, '', $L['all_type']); $condition = "userid={$_userid}"; if ($keyword) { $condition .= " AND {$dfields[$fields]} LIKE '%{$keyword}%'"; } if ($typeid > -1) { $condition .= " AND typeid={$typeid}"; } $lists = $do->get_list($condition); if ($MG['favorite_limit']) { $r = $db->get_one("SELECT COUNT(*) AS num FROM {$DT_PRE}favorite WHERE userid={$_userid}"); $limit_used = $r['num']; $limit_free = $MG['favorite_limit'] > $limit_used ? $MG['favorite_limit'] - $limit_used : 0; } $head_title = $L['favorite_title']; break;
?> "/> <input type="hidden" name="file" value="<?php echo $file; ?> "/> <input type="hidden" name="action" value="<?php echo $action; ?> "/> <div class="tt">安装模板</div> <table cellpadding="2" cellspacing="1" class="tb"> <tr> <td class="tl"><span class="f_hid">*</span> 模板分类</td> <td><?php echo type_select('style', 1, 'post[typeid]', '请选择分类', 0, 'id="typeid"'); ?> <span id="dtypeid" class="f_red"></span></td> </tr> <tr> <td class="tl"><span class="f_red">*</span> 模板名称</td> <td><input name="post[title]" type="text" id="title" size="30" /> <span id="dtitle" class="f_red"></span></td> </tr> <tr> <td class="tl"><span class="f_red">*</span> 风格目录</td> <td> <select name="post[skin]" id="skin" onchange="if(this.value){Dskin(this.value);}"> <option value="">请选择</option> <?php $d = DT_ROOT . '/' . $MODULE[4]['moduledir'] . '/skin/'; foreach (glob($d . '*') as $v) {
} clear_upload($content); $content = dsafe(addslashes(save_remote(save_local(stripslashes($content))))); $fields = array('typeid' => $typeid, 'title' => $title); $fields = dhtmlspecialchars($fields); $fields['content'] = $content; $sql = ''; foreach ($fields as $k => $v) { $sql .= ",{$k}='{$v}'"; } $sql = substr($sql, 1); $db->query("UPDATE {$DT_PRE}ask SET {$sql} WHERE itemid={$itemid} AND username='******' "); dmsg($L['op_edit_success'], $forward); } else { extract($r); $type_select = type_select('ask', 1, 'typeid', $L['choose_type'], $typeid); $head_title = $L['ask_title_edit']; } break; case 'show': $itemid or message(); $r = $db->get_one("SELECT * FROM {$DT_PRE}ask WHERE itemid={$itemid} AND username='******'"); $r or message(); extract($r); $addtime = timetodate($addtime, 5); $admintime = $admintime ? timetodate($admintime, 5) : ''; $stars = $L['ask_star_type']; $head_title = $L['ask_title_show']; break; case 'star': $itemid or message();
</td> </tr> <?php } } else { ?> <tr> <td colspan="6" class="f_red"> 没有找到可用的信息,请重新筛选</td> </tr> <?php } ?> <tr> <td colspan="6"> <?php echo type_select($tid, 0, 'typeid', '请选择分类', 0, 'id="typeid"'); ?> <?php echo level_select('level', '级别', 0, 'id="level"'); ?> <input type="submit" name="submit" value=" 添 加 " class="btn"/></td> </tr> </table> </form> <div class="pages"><?php echo $pages; ?> </div> <script type="text/javascript">Menuon(1);</script>
break; default: $sfields = array('按条件', '模板名称', '风格目录', '模板目录', '作者'); $dfields = array('title', 'title', 'skin', 'template', 'author'); $sorder = array('结果排序方式', '模板价格降序', '模板价格升序', $DT['money_name'] . '收益降序', $DT['money_name'] . '收益升序', $DT['credit_name'] . '收益降序', $DT['credit_name'] . '收益升序', '使用人数降序', '使用人数升序', '添加时间降序', '添加时间升序'); $dorder = array('listorder DESC,addtime DESC', 'fee DESC', 'fee ASC', 'money DESC', 'money ASC', 'credit DESC', 'credit ASC', 'hits DESC', 'hits ASC', 'addtime DESC', 'addtime ASC'); isset($fields) && isset($dfields[$fields]) or $fields = 0; isset($order) && isset($dorder[$order]) or $order = 0; $groupid = isset($groupid) ? intval($groupid) : 0; $typeid = isset($typeid) ? intval($typeid) : 0; isset($currency) or $currency = ''; isset($minfee) or $minfee = ''; isset($maxfee) or $maxfee = ''; $fields_select = dselect($sfields, 'fields', '', $fields); $order_select = dselect($sorder, 'order', '', $order); $type_select = type_select('style', 1, 'typeid', '请选择分类', $typeid); $condition = '1'; if ($keyword) { $condition .= " AND {$dfields[$fields]} LIKE '%{$keyword}%'"; } if ($groupid) { $condition .= " AND groupid LIKE '%,{$groupid},%'"; } if ($typeid) { $condition .= " AND typeid={$typeid}"; } if ($currency) { $condition .= $currency == 'free' ? " AND fee=0" : " AND currency='{$currency}'"; } if ($minfee) { $condition .= " AND fee>={$minfee}";
$pagesize = 12; $offset = ($page - 1) * $pagesize; $sfields = $L['style_sfields']; $dfields = array('title', 'title', 'author'); $sorder = $L['style_sorder']; $dorder = array('listorder desc,addtime desc', 'addtime DESC', 'addtime ASC', 'hits DESC', 'hits ASC'); isset($fields) && isset($dfields[$fields]) or $fields = 0; isset($order) && isset($dorder[$order]) or $order = 0; $all = isset($all) ? intval($all) : 0; $typeid = isset($typeid) ? intval($typeid) : 0; isset($currency) or $currency = ''; $minfee = isset($minfee) ? dround($minfee) : ''; $maxfee = isset($maxfee) ? dround($maxfee) : ''; $fields_select = dselect($sfields, 'fields', '', $fields); $order_select = dselect($sorder, 'order', '', $order); $type_select = type_select('style', 1, 'typeid', $L['choose_type'], $typeid); $condition = "1"; if ($keyword) { $condition .= " AND {$dfields[$fields]} LIKE '%{$keyword}%'"; } if (!$all) { $condition .= " AND groupid LIKE '%,{$_groupid},%'"; } if ($typeid) { $condition .= " AND typeid={$typeid}"; } if ($currency) { $condition .= $currency == 'free' ? " AND fee=0" : " AND currency='{$currency}'"; } if ($minfee) { $condition .= " AND fee>={$minfee}";
<td class="tl"><span class="f_hid">*</span> 选择信息源</td> <td><select id="s_mid" onchange="if(this.value){select_item(this.value, 'special');$('#s_mid').val(0);}"> <option value="0">请选择</option> <?php foreach ($MODULE as $m) { if (!$m['islink'] && $m['moduleid'] > 3 && $m['moduleid'] != $moduleid) { echo '<option value="' . $m['moduleid'] . '">' . $m['name'] . '</option>'; } } ?> </select></td> </tr> <tr> <td class="tl"><span class="f_hid">*</span> 所属分类</td> <td><span id="type_box"><?php echo type_select($tid, 0, 'post[typeid]', '请选择分类', $typeid, 'id="typeid"'); ?> </span> <a href="javascript:var type_item='<?php echo $tid; ?> ',type_name='post[typeid]',type_default='请选择分类',type_id=<?php echo $typeid; ?> ,type_interval=setInterval('type_reload()',500);Dwidget('?file=type&item=<?php echo $tid; ?> ', '[<?php echo $special['title']; ?> ] 专题信息分类', 550, 250);"><img src="<?php echo $MODULE[2]['linkurl'];
} $lists = $do->item_list($condition, $dorder[$order]); include tpl('poll_item', $module); } break; default: $sfields = array('按条件', '标题', '内容'); $dfields = array('title', 'title', 'content'); $sorder = array('结果排序方式', '添加时间降序', '添加时间升序', '投票总数降序', '投票总数升序', '浏览次数降序', '浏览次数升序', '选项总数降序', '选项总数升序', '开始时间降序', '开始时间升序', '到期时间降序', '到期时间升序'); $dorder = array('itemid DESC', 'addtime DESC', 'addtime ASC', 'polls DESC', 'polls ASC', 'hits DESC', 'hits ASC', 'items DESC', 'items 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; isset($typeid) or $typeid = 0; $level = isset($level) ? intval($level) : 0; $fields_select = dselect($sfields, 'fields', '', $fields); $type_select = type_select('poll', 1, 'typeid', '请选择分类', $typeid); $order_select = dselect($sorder, 'order', '', $order); $level_select = level_select('level', '级别', $level); $condition = '1'; if ($_areaids) { $condition .= " AND areaid IN (" . $_areaids . ")"; } //CITY if ($keyword) { $condition .= " AND {$dfields[$fields]} LIKE '%{$keyword}%'"; } if ($typeid) { $condition .= " AND typeid IN (" . type_child($typeid, $TYPE) . ")"; } if ($level) { $condition .= " AND level={$level}";
echo $action; ?> "/> <input type="hidden" name="itemid" value="<?php echo $itemid; ?> "/> <input type="hidden" name="forward" value="<?php echo $forward; ?> "/> <table cellpadding="2" cellspacing="1" class="tb"> <tr> <td class="tl"><span class="f_red">*</span> 邮件分类</td> <td><span id="type_box"><?php echo type_select($TYPE, 1, 'typeid', '请选择分类', $typeid, 'id="typeid"'); ?> </span> <a href="javascript:var type_item='mail',type_name='post[typeid]',type_default='请选择分类',type_id=<?php echo $typeid; ?> ,type_interval=setInterval('type_reload()',500);Dwidget('?file=type&item=mail', '订阅分类');"><img src="<?php echo $MODULE[2]['linkurl']; ?> image/img_add.gif" width="12" height="12" title="管理分类"/></a> <span id="dtypeid" class="f_red"></span></td> </tr> <tr> <td class="tl"><span class="f_red">*</span> 邮件标题</td> <td><input type="text" size="60" name="title" id="title" value="<?php echo $title; ?> "/> <span id="dtitle" class="f_red"></span></td>
case ACCOUNT_PICK: include_once "lib/callback/account.php"; account_select($SCION, $response); $SCION->status = array_shift($SCION->path); break 1; //go back around //go back around case TYPE_DISP: type_send($SCION, $response); $SCION->status = TYPE_PICK; echo $response; break 2; //break out //break out case TYPE_PICK: type_select($SCION, $response); $SCION->status = array_shift($SCION->path); break 1; //go back around //go back around case DATE_DISP: include_once "lib/callback/date_list.php"; date_send($SCION, $response); $SCION->status = DATE_PICK; echo $response; break 2; //break out //break out case DATE_PICK: include_once "lib/callback/date_list.php"; date_select($SCION, $response);
?> "/> <input type="hidden" name="file" value="<?php echo $file; ?> "/> <input type="hidden" name="action" value="<?php echo $action; ?> "/> <div class="tt">安装模板</div> <table cellpadding="2" cellspacing="1" class="tb"> <tr> <td class="tl"><span class="f_hid">*</span> 模板分类</td> <td><?php echo type_select($TYPE, 1, 'post[typeid]', '请选择分类', 0, 'id="typeid"'); ?> <span id="dtypeid" class="f_red"></span></td> </tr> <tr> <td class="tl"><span class="f_red">*</span> 模板名称</td> <td><input name="post[title]" type="text" id="title" size="30" /> <span id="dtitle" class="f_red"></span></td> </tr> <tr> <td class="tl"><span class="f_red">*</span> 风格目录</td> <td> <select name="post[skin]" id="skin" onchange="if(this.value){Dskin(this.value);}"> <option value="">请选择</option> <?php $d = DT_ROOT . '/' . $MODULE[4]['moduledir'] . '/skin/'; foreach (glob($d . '*') as $v) {
$pagesize = 12; $offset = ($page - 1) * $pagesize; $sfields = $L['style_sfields']; $dfields = array('title', 'title', 'author'); $sorder = $L['style_sorder']; $dorder = array('listorder desc,addtime desc', 'addtime DESC', 'addtime ASC', 'hits DESC', 'hits ASC'); isset($fields) && isset($dfields[$fields]) or $fields = 0; isset($order) && isset($dorder[$order]) or $order = 0; $all = isset($all) ? intval($all) : 0; $typeid = isset($typeid) ? intval($typeid) : 0; isset($currency) or $currency = ''; $minfee = isset($minfee) ? dround($minfee) : ''; $maxfee = isset($maxfee) ? dround($maxfee) : ''; $fields_select = dselect($sfields, 'fields', '', $fields); $order_select = dselect($sorder, 'order', '', $order); $type_select = type_select($TYPE, 1, 'typeid', $L['choose_type'], $typeid); $condition = "1"; if ($keyword) { $condition .= " AND {$dfields[$fields]} LIKE '%{$keyword}%'"; } if (!$all) { $condition .= " AND groupid LIKE '%,{$_groupid},%'"; } if ($typeid) { $condition .= " AND typeid={$typeid}"; } if ($currency) { $condition .= $currency == 'free' ? " AND fee=0" : " AND currency='{$currency}'"; } if ($minfee) { $condition .= " AND fee>={$minfee}";
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']; include template('link', $module); } } else { $head_title = $L['link_title']; if ($typeid) { $head_title = $TYPE[$typeid]['typename'] . $DT['seo_delimiter'] . $head_title; } $head_keywords = $head_description = ''; include template('link', $module); }
send_mail($r['email'], $m['title'], $m['content']); $i = true; $num++; } if ($i) { $page++; msg('已发送 ' . $num . ' 封邮件,系统将自动继续,请稍候...', '?moduleid=' . $moduleid . '&file=' . $file . '&action=' . $action . '&page=' . $page . '&itemid=' . $itemid . '&num=' . $num); } else { cache_delete($_username . '_mail.php'); $db->query("UPDATE {$DT_PRE}mail SET sendtime='{$DT_TIME}' WHERE itemid={$itemid}"); msg('邮件发送成功 共发送 ' . $num . ' 封邮件', '?moduleid=' . $moduleid . '&file=' . $file, 5); } break; default: $typeid = isset($typeid) ? $typeid === '' ? -1 : intval($typeid) : -1; $type_select = type_select('mail', 1, 'typeid', '请选择分类', $typeid); $condition = '1'; if ($keyword) { $condition .= " AND title LIKE '%{$keyword}%'"; } if ($typeid > 0) { $condition .= " AND typeid={$typeid}"; } if ($page > 1 && $sum) { $items = $sum; } else { $r = $db->get_one("SELECT COUNT(*) AS num FROM {$DT_PRE}mail WHERE {$condition}"); $items = $r['num']; } $pages = pages($items, $page, $pagesize); $mails = array();
<?php defined('IN_DESTOON') or exit('Access Denied'); preg_match("/^[a-z0-9_\\-]{2,}\$/", $item) or exit; preg_match("/^[a-z0-9_\\-\\[\\]]{2,}\$/", $name) or exit; echo type_select($item, 0, $name, $default, $itemid, 'id="typeid"');
echo $action; ?> "/> <input type="hidden" name="itemid" value="<?php echo $itemid; ?> "/> <div class="tt"><?php echo $action == 'add' ? '添加' : '修改'; ?> 投票</div> <table cellpadding="2" cellspacing="1" class="tb"> <tr> <td class="tl"><span class="f_red">*</span> 投票分类</td> <td><?php echo type_select('vote', 1, 'post[typeid]', '请选择分类', $typeid, 'id="typeid"'); ?> <img src="<?php echo $MODULE[2]['linkurl']; ?> image/img_add.gif" width="12" height="12" title="管理分类" class="c_p" onclick="Dwidget('?file=type&item=<?php echo $file; ?> ', '投票分类');"/> <span id="dtypeid" class="f_red"></span></td> </tr> <tr> <td class="tl"><span class="f_red">*</span> 投票标题</td> <td><input name="post[title]" type="text" id="title" size="50" value="<?php echo $title; ?> "/> <?php
if ($itemid) { $condition .= " AND o.itemid={$itemid}"; } if ($keyword) { $condition .= " AND {$dfields[$fields]} LIKE '%{$keyword}%'"; } $lists = $do->get_list_order($condition); include tpl('gift_order', $module); } break; default: $sorder = array('结果排序方式', '添加时间降序', '添加时间升序', '礼品次数降序', '礼品次数升序', '浏览次数降序', '浏览次数升序', '开始时间降序', '开始时间升序', '到期时间降序', '到期时间升序'); $dorder = array('itemid DESC', 'addtime DESC', 'addtime ASC', 'gifts DESC', 'gifts ASC', 'hits DESC', 'hits ASC', 'fromtime DESC', 'fromtime ASC', 'totime DESC', 'totime ASC'); isset($order) && isset($dorder[$order]) or $order = 0; isset($typeid) or $typeid = 0; $type_select = type_select('gift', 1, 'typeid', '请选择分类', $typeid); $order_select = dselect($sorder, 'order', '', $order); $condition = '1'; if ($_areaids) { $condition .= " AND areaid IN (" . $_areaids . ")"; } //CITY if ($keyword) { $condition .= " AND title LIKE '%{$keyword}%'"; } if ($typeid) { $condition .= " AND typeid={$typeid}"; } if ($areaid) { $condition .= $ARE['child'] ? " AND areaid IN (" . $ARE['arrchildid'] . ")" : " AND areaid={$areaid}"; }
$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}%'"; } if ($typeid) { $condition .= " AND typeid={$typeid}"; } if ($type) {
$votes[$i] = ${$s}; } } $condition = "itemid={$itemid}"; if ($keyword) { $condition .= " AND (ip LIKE '%{$keyword}%' OR username LIKE '%{$keyword}%')"; } $lists = $do->get_list_record($condition); include tpl('vote_record', $module); break; default: $sorder = array('结果排序方式', '添加时间降序', '添加时间升序', '投票次数降序', '投票次数升序', '浏览次数降序', '浏览次数升序', '开始时间降序', '开始时间升序', '到期时间降序', '到期时间升序'); $dorder = array('itemid DESC', 'addtime DESC', 'addtime ASC', 'votes DESC', 'votes ASC', 'hits DESC', 'hits ASC', 'fromtime DESC', 'fromtime ASC', 'totime DESC', 'totime ASC'); isset($order) && isset($dorder[$order]) or $order = 0; isset($typeid) or $typeid = 0; $type_select = type_select('vote', 1, 'typeid', '请选择分类', $typeid); $order_select = dselect($sorder, 'order', '', $order); $condition = '1'; if ($_areaids) { $condition .= " AND areaid IN (" . $_areaids . ")"; } //CITY if ($keyword) { $condition .= " AND title LIKE '%{$keyword}%'"; } if ($typeid) { $condition .= " AND typeid={$typeid}"; } if ($areaid) { $condition .= $ARE['child'] ? " AND areaid IN (" . $ARE['arrchildid'] . ")" : " AND areaid={$areaid}"; }