<?php defined('DT_ADMIN') or exit('Access Denied'); require MD_ROOT . '/grade.class.php'; $do = new grade(); $menus = array(array('升级记录', '?moduleid=' . $moduleid . '&file=' . $file), array('审核申请', '?moduleid=' . $moduleid . '&file=' . $file . '&action=check'), array('拒绝记录', '?moduleid=' . $moduleid . '&file=' . $file . '&action=reject'), array(VIP . '管理', '?moduleid=4&file=vip')); if (in_array($action, array('', 'check', 'reject'))) { $sfields = array('按条件', '公司名', '会员名', '联系人', '电话', '手机', 'Email', 'MSN', 'QQ', 'IP', '附言', '备注', '优惠码'); $dfields = array('company', 'company', 'username', 'truename', 'telephone', 'mobile', 'email', 'msn', 'qq', 'ip', 'content', 'note', 'promo_code'); $sorder = array('结果排序方式', '申请时间降序', '申请时间升序', '受理时间降序', '受理时间升序', '付款金额降序', '付款金额升序'); $dorder = array('addtime DESC', 'addtime DESC', 'addtime ASC', 'edittime DESC', 'edittime ASC', 'amount DESC', 'amount 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}%'"; } } $menuon = array('4', '2', '1', '0'); switch ($action) { case 'edit': $itemid or msg(); $do->itemid = $itemid; if ($submit) { if ($do->edit($post)) { dmsg('操作成功', $forward); } else { msg($do->errmsg); }
$groupid = isset($groupid) ? intval($groupid) : 0; $valid = isset($valid) ? intval($valid) : 0; $level = isset($level) ? intval($level) : 0; $uid = isset($uid) ? intval($uid) : ''; $username = isset($username) ? trim($username) : ''; isset($fromtime) or $fromtime = ''; isset($totime) or $totime = ''; isset($timetype) or $timetype = 'totime'; $fields_select = dselect($sfields, 'fields', '', $fields); $level_select = level_select('level', '级别', $level); $order_select = dselect($sorder, 'order', '', $order); $valid_select = dselect($svalid, 'valid', '', $valid); $group_select = group_select('groupid', '会员组', $groupid); $mode_select = dselect($modes, 'mode', '', $mode); $type_select = dselect($types, 'type', '', $type); $size_select = dselect($sizes, 'size', '', $size); $condition = 'groupid>5'; if ($_areaids) { $condition .= " AND areaid IN (" . $_areaids . ")"; } //CITY if ($keyword) { $condition .= " AND {$dfields[$fields]} LIKE '%{$keyword}%'"; } if ($groupid) { $condition .= " AND groupid={$groupid}"; } if ($vip > -1) { $condition .= " AND vip={$vip}"; } if ($level) {
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) { $condition .= $type == 1 ? " AND thumb=''" : " AND thumb<>''"; } if ($level) {
dmsg('修改成功', $forward); } else { msg($do->errmsg); } } else { extract($do->get_one()); include tpl('favorite_edit', $module); } break; case 'delete': $itemid or msg('请选择收藏'); $do->delete($itemid); dmsg('删除成功', $forward); break; default: $sfields = array('按条件', '标题', 'URL'); $dfields = array('title', 'title', 'url'); isset($fields) && isset($dfields[$fields]) or $fields = 0; $userid = isset($userid) ? intval($userid) : ''; $fields_select = dselect($sfields, 'fields', '', $fields); $condition = '1'; if ($keyword) { $condition .= " AND {$dfields[$fields]} LIKE '%{$keyword}%'"; } if ($userid) { $condition .= " AND userid={$userid}"; } $lists = $do->get_list($condition); include tpl('favorite', $module); break; }
$fromtime = $fromdate ? strtotime($fromdate . ' 0:0:0') : 0; $todate = isset($todate) && is_date($todate) ? $todate : ''; $totime = $todate ? strtotime($todate . ' 23:59:59') : 0; $sfields = array($L['by_auto'], $L['by_title'], $L['by_content'], $L['by_introduce']); $dfields = array('keyword', 'title', 'content', 'introduce'); $sorder = array($L['order'], $L['order_auto']); $dorder = array($MOD['order'], ''); if (!$MOD['fulltext']) { unset($sfields[2], $dfields[2]); } isset($fields) && isset($dfields[$fields]) or $fields = 0; isset($order) && isset($dorder[$order]) or $order = 0; $category_select = ajax_category_select('catid', $L['all_category'], $catid, $moduleid); $area_select = ajax_area_select('areaid', $L['all_area'], $areaid); $order_select = dselect($sorder, 'order', '', $order); $type_select = dselect($TYPE, 'typeid', $L['all_type'], $typeid); $tags = array(); if ($DT_QST) { if ($kw) { if (strlen($kw) < $DT['min_kw'] || strlen($kw) > $DT['max_kw']) { message(lang($L['word_limit'], array($DT['min_kw'], $DT['max_kw'])), $MOD['linkurl'] . 'search.php'); } if ($DT['search_limit'] && $page == 1) { if ($DT_TIME - $DT['search_limit'] < get_cookie('last_search')) { message(lang($L['time_limit'], array($DT['search_limit'])), $MOD['linkurl'] . 'search.php'); } set_cookie('last_search', $DT_TIME); } } $pptsql = ''; if ($CP) {
function production() { // Orbital Start $sth = mysql_query("select * from o_production where time=1 and pos=1"); if (!$sth) { echo "Database failure!\n"; return 0; } while ($orbital = mysql_fetch_array($sth)) { $sth1 = mysql_query("insert into constructions (pid,prod_id,type) values ('" . $orbital["planet_id"] . "','" . $orbital["prod_id"] . "',1)"); if (!$sth1) { echo "Database failure!"; } $sth1 = mysql_query("select uid from planets where id=" . $orbital["planet_id"]); if (!$sth1) { echo "Datasbe failure!"; } list($uid) = mysql_fetch_row($sth1); $sth1 = mysql_query("select name from production where prod_id=" . $orbital["prod_id"]); if (!$sth1) { echo "Database failure!"; } $blub = mysql_fetch_array($sth1); $planetname = get_planetname($orbital["planet_id"]); ticker($uid, "*lproduction.php?act=build&pid=" . $orbital["planet_id"] . "*" . $planetname . ": " . $blub["name"] . " in orbit constructed.", "w"); $sth1 = mysql_query("delete from o_production where planet_id='" . $orbital["planet_id"] . "' and prod_id='" . $orbital["prod_id"] . "'"); if (!$sth1) { echo "Database failure!"; return 0; } $sth1 = mysql_query("select typ from production where prod_id=" . $orbital["prod_id"] . " and typ='R'"); if (mysql_num_rows($sth1) > 0) { $sth1 = mysql_query("select uid from planets where id=" . $orbital["planet_id"]); list($uid) = mysql_fetch_array($sth1); $sth1 = mysql_query("delete from tradestations where uid={$uid}"); $sth1 = mysql_query("insert into tradestations (metal,energy,mopgas,erkunum,gortium,susebloom,uid,pid) values ('0','0','0','0','0','0','{$uid}','" . $orbital["planet_id"] . "')"); } $sth1 = mysql_query("select prod_id from production where prod_id='" . $orbital["prod_id"] . "' and special='S'"); if (!$sth1) { echo "Database failure!"; } if (mysql_num_rows($sth1) > 0) { $sth1 = mysql_query("select sid from planets where id=" . $orbital["planet_id"]); if (!$sth1) { echo "Database failure!"; } $sid = mysql_fetch_row($sth1); $sth1 = mysql_query("select * from jumpgatevalues where prod_id=" . $orbital["prod_id"]); if (!$sth1) { echo "Databaser failure!"; } if (mysql_num_rows($sth1) > 0) { $password = crypt(md5(uniqid(mt_rand()))); $sth1 = mysql_query("insert into jumpgates (prod_id,password,sid,pid) values ('" . $orbital["prod_id"] . "','" . $password . "','" . $sid[0] . "','" . $orbital["planet_id"] . "')"); if (!$sth1) { echo "Dtasabser failuert!"; } $sth1 = mysql_query("select uid from planets where id=" . $orbital["planet_id"]); if (!$sth1) { echo "Dtasber faileu8r!"; } $uid = mysql_fetch_row($sth1); mail_to_uid($uid[0], "Password for your jumpgate in system " . $sid[0], $password); } } } $sth = mysql_query("update o_production set time=time-'1' where time>1 and pos=1"); if (!$sth) { echo "Database failure!"; return 0; } $sth = mysql_query("select distinct p1.planet_id from o_production as p1 left join o_production as p2 on p2.pos=1 and p2.planet_id=p1.planet_id where p1.pos!=1 and p2.pos is NULL"); if (!$sth) { echo "Database failure!"; } while ($pids = mysql_fetch_row($sth)) { $next_prod_id = next_in_queue(0, $pids[0]); if ($next_prod_id) { $uid = get_uid_by_pid($pids[0]); if (has_ressources($uid, $next_prod_id)) { $sth1 = mysql_query("update o_production set pos=1 where planet_id=" . $pids[0] . " and prod_id={$next_prod_id}"); $sth1 = mysql_query("select metal,energy,mopgas,erkunum,gortium,susebloom from production where prod_id={$next_prod_id}"); list($metal, $energy, $mopgas, $erkunum, $gortium, $susebloom) = mysql_fetch_row($sth1); $sth1 = mysql_query("update ressources set metal=metal-{$metal},energy=energy-{$energy},mopgas=mopgas-{$mopgas},erkunum=erkunum-{$erkunum},gortium=gortium-{$gortium},susebloom=susebloom-{$susebloom} where uid={$uid}"); } } } // Orbital Ende // Planet production $sth = mysql_query("select * from p_production where time=1 and pos=1"); if (!$sth) { echo "Database failure!\n"; return 0; } while ($buildings = mysql_fetch_array($sth)) { $sth1 = mysql_query("select uid,name from planets where id=" . $buildings["planet_id"]); if (!$sth1) { echo "Database failure!"; } $uid = mysql_fetch_array($sth1); if ($uid["name"] == "Unnamed") { $uid["name"] = get_planetname($buildings["planet_id"]); } $sth1 = mysql_query("select name from production where prod_id=" . $buildings["prod_id"]); // Schilde einbauen list($value, $shield) = dselect("CONV(SUBSTRING(special FROM 2),10,10), shield", "shipvalues", "special LIKE 'H%' AND prod_id=" . $buildings["prod_id"]); if ($value) { $janne = mysql_query("REPLACE INTO planetary_shields (pid, prod_id, value, max_value, regeneration, \n regeneration_bonus) VALUES (" . $buildings["planet_id"] . ", " . $buildings["prod_id"] . ", {$shield}, {$shield},\n {$value}, 0)"); } if (!$sth1) { echo "Database failure!"; } $blub = mysql_fetch_array($sth1); ticker($uid["uid"], "*lproduction.php?act=build&pid=" . $buildings["planet_id"] . "*" . $uid["name"] . ": " . $blub["name"] . " constructed.", "w"); $sth1 = mysql_query("insert into constructions (pid,prod_id,type) values ('" . $buildings["planet_id"] . "','" . $buildings["prod_id"] . "',0)"); if (!$sth1) { echo "Database failure! (CREATING BUILDING ON PLANET)"; } $sth1 = mysql_query("delete from p_production where planet_id='" . $buildings["planet_id"] . "' and prod_id='" . $buildings["prod_id"] . "'"); if (!$sth1) { echo "Database failure! (DELETING PLANETAR PRODUCTION)"; } } $sth = mysql_query("update p_production set time=time-'1' where time>1 and pos=1"); if (!$sth) { echo "Database failure!"; return 0; } $sth = mysql_query("select distinct p1.planet_id from p_production as p1 left join p_production as p2 on p2.pos=1 and p2.planet_id=p1.planet_id where p1.pos!=1 and p2.pos is NULL"); if (!$sth) { echo "Database failure!"; } while ($pids = mysql_fetch_row($sth)) { $next_prod_id = next_in_queue(1, $pids[0]); if ($next_prod_id) { $uid = get_uid_by_pid($pids[0]); if (has_ressources($uid, $next_prod_id)) { $sth1 = mysql_query("update p_production set pos=1 where planet_id=" . $pids[0] . " and prod_id={$next_prod_id}"); $sth1 = mysql_query("select metal,energy,mopgas,erkunum,gortium,susebloom from production where prod_id={$next_prod_id}"); list($metal, $energy, $mopgas, $erkunum, $gortium, $susebloom) = mysql_fetch_row($sth1); $sth1 = mysql_query("update ressources set metal=metal-{$metal},energy=energy-{$energy},mopgas=mopgas-{$mopgas},erkunum=erkunum-{$erkunum},gortium=gortium-{$gortium},susebloom=susebloom-{$susebloom} where uid={$uid}"); } } } // Planetar Ende // Fleet Production Start $uids = array(); $sth = mysql_query("select s.planet_id,s.prod_id,s.count,s.time,s.priority,\nr.uid,r.metal as rmetal,r.energy as renergy,r.mopgas as rmopgas,r.erkunum as rerkunum,r.gortium as rgortium,r.susebloom as rsusebloom,\npl.id,p.metal,p.energy,p.mopgas,p.erkunum,p.gortium,p.susebloom,\nsum(ps.tonnage) as slots,\nsv.tonnage,\np.com_time\nfrom s_production s,planets pl,production p,ressources r,production_slots ps,constructions c,shipvalues sv where s.planet_id=pl.id\nand s.prod_id=p.prod_id\nand p.prod_id=sv.prod_id\nand ps.prod_id=c.prod_id\nand c.pid=pl.id\nand r.uid=pl.uid\ngroup by s.planet_id,s.prod_id,s.time\norder by pl.uid,s.priority DESC,s.time DESC"); if (!$sth) { echo "ERR::GET S_PRODUCTION"; } else { while ($data = mysql_fetch_assoc($sth)) { if (!$uids[$data["uid"]]) { $uids[$data["uid"]] = array("production_slots" => $data["slots"], "ressources" => array("metal" => $data["rmetal"], "energy" => $data["renergy"], "mopgas" => $data["rmopgas"], "erkunum" => $data["rerkunum"], "gortium" => $data["rgortium"], "susebloom" => $data["rsusebloom"])); } // mop: maximale anzahl der produzierbaren schiffe ermitteln (durch slots limitiert) $prod_count = floor($uids[$data["uid"]]["production_slots"] / $data["tonnage"]); $real_count = min($data["count"], $prod_count); if ($real_count > 0) { // mop: jetzt koenen uns nur noch die ressourcen aufhalten foreach (array("metal", "energy", "mopgas", "erkunum", "gortium", "susebloom") as $res) { if ($data[$res]) { $real_count = min($real_count, floor($uids[$data["uid"]]["ressources"][$res] / ceil($data[$res] / $data["com_time"]))); } } if ($real_count > 0) { // mop: alle schiffe produzierbar? if ($real_count == $data["count"]) { // mop: alles easy $sth1 = mysql_query("update s_production s,ressources r set s.time=s.time+1,\n r.metal=r.metal-" . ceil($real_count * $data["metal"] / $data["com_time"]) . ",\n r.energy=r.energy-" . ceil($real_count * $data["energy"] / $data["com_time"]) . ",\n r.mopgas=r.mopgas-" . ceil($real_count * $data["mopgas"] / $data["com_time"]) . ",\n r.erkunum=r.erkunum-" . ceil($real_count * $data["erkunum"] / $data["com_time"]) . ",\n r.gortium=r.gortium-" . ceil($real_count * $data["gortium"] / $data["com_time"]) . ",\n r.susebloom=r.susebloom-" . ceil($real_count * $data["susebloom"] / $data["com_time"]) . "\n where s.prod_id=" . $data["prod_id"] . " and s.time=" . $data["time"] . " and s.planet_id=" . $data["planet_id"] . " and r.uid=" . $data["uid"]); if (!$sth1) { echo "ERR::UPDATE S_PROD 1"; } } else { // mop: stress...aufsplitten $sth1 = mysql_query("insert into s_production set prod_id=" . $data["prod_id"] . ",planet_id=" . $data["planet_id"] . ",count=" . $real_count . ",time=" . ($data["time"] + 1) . ",priority=" . $data["priority"] . " on duplicate key update count=count+" . $real_count . ",priority=" . $data["priority"]); if (!$sth1) { echo "ERR::INSERT SPLIT S_PROD"; } // mop: update des rests und der ressourcen $sth1 = mysql_query("update s_production s,ressources r set s.count=s.count-" . $real_count . ",\n r.metal=r.metal-" . ceil($real_count * $data["metal"] / $data["com_time"]) . ",\n r.energy=r.energy-" . ceil($real_count * $data["energy"] / $data["com_time"]) . ",\n r.mopgas=r.mopgas-" . ceil($real_count * $data["mopgas"] / $data["com_time"]) . ",\n r.erkunum=r.erkunum-" . ceil($real_count * $data["erkunum"] / $data["com_time"]) . ",\n r.gortium=r.gortium-" . ceil($real_count * $data["gortium"] / $data["com_time"]) . ",\n r.susebloom=r.susebloom-" . ceil($real_count * $data["susebloom"] / $data["com_time"]) . "\n where s.prod_id=" . $data["prod_id"] . " and s.time=" . $data["time"] . " and s.planet_id=" . $data["planet_id"] . " and r.uid=" . $data["uid"]); if (!$sth1) { echo "ERR::UPDATE REST S_PROD"; } } $uids[$data["uid"]]["production_slots"] -= $real_count * $data["tonnage"]; foreach (array("metal", "energy", "mopgas", "erkunum", "gortium", "susebloom") as $res) { $uids[$data["uid"]]["ressources"][$res] -= ceil($real_count * $data[$res] / $data["com_time"]); } } } } } // mop: rundungsfehler fuer die dinger, die jetzt fertig werden ausgleichen $fragments = array(); foreach (array("metal", "energy", "mopgas", "erkunum", "gortium", "susebloom") as $res) { $fragments[] = "r." . $res . "=r." . $res . "+ceil(p." . $res . "*s.count/p.com_time)*p.com_time-p." . $res . "*s.count"; } $sth = mysql_query("update s_production s,production p,planets pl,ressources r set " . implode($fragments, ",") . " where r.uid=pl.uid and pl.id=s.planet_id and s.prod_id=p.prod_id and p.com_time-s.time=0"); if (!$sth) { echo "ERR::CORRECT CEILINGS\n"; } $sth = mysql_query("select * from s_production sp,production p where p.com_time-sp.time=0 and sp.prod_id=p.prod_id"); if (!$sth) { echo "Database failure!\n"; return 0; } while ($ships = mysql_fetch_assoc($sth)) { $sth1 = mysql_query("select uid,name from planets where id=" . $ships["planet_id"]); if (!$sth1) { echo "Datasbe failure!"; } $uid = mysql_fetch_assoc($sth1); ticker($uid["uid"], "*lproduction.php?pid=" . $ships["planet_id"] . "*" . $uid["name"] . ": " . $ships["count"] . " " . $ships["name"] . "(s) produced.", "w"); $sth1 = mysql_query("select sid from planets where id=" . $ships["planet_id"]); if (!$sth1) { echo "Dtabase failuer!"; } $system = mysql_fetch_array($sth1); $fids = get_fids_by_pid($ships["planet_id"], $uid["uid"]); // Keine Flotte auf dem Planet? if (!$fids) { $new_fleet = new fleet(); $new_fleet->add_ships_arr(array($ships["prod_id"] => array($ships["count"], 0))); $new_fleet->uid = $uid["uid"]; $new_fleet->pid = $ships["planet_id"]; $new_fleet->sid = $system["sid"]; $new_fleet->create_fleet(); } else { $prod_id_in_fid = false; for ($i = 0; $i <= sizeof($fids) - 1; $i++) { $fleet = new fleet($fids[$i]); if ($fleet->ships[$ships["prod_id"]]) { $prod_id_in_fid =& $fleet; // Das is ne referenz :) Irgendwann musste ich die einfach mal benutzen:) break; } } if ($prod_id_in_fid) { $prod_id_in_fid->ships[$ships["prod_id"]][0] += $ships["count"]; $prod_id_in_fid->update_prod_id($ships["prod_id"]); } else { $fleet->add_ships_arr(array($ships["prod_id"] => array($ships["count"], 0))); if (!$fleet->update_prod_id($ships["prod_id"])) { echo "Error assigning new prod id to fleet " . $fleet->fid . "\n"; } } } $sth1 = mysql_query("delete from s_production where planet_id='" . $ships["planet_id"] . "' and prod_id='" . $ships["prod_id"] . "' and count='" . $ships["count"] . "' and time=" . $ships["time"]); if (!$sth1) { echo "Dtaabase failuer!"; } } // Fleet Ende // Infantery Production Start $sth = mysql_query("select * from i_production where time=1"); if (!$sth) { echo "Database failure!\n"; return 0; } while ($soldiers = mysql_fetch_array($sth)) { $sth1 = mysql_query("select uid,name from planets where id=" . $soldiers["planet_id"]); if (!$sth1) { echo "Datasbe failure!"; } $uid = mysql_fetch_array($sth1); $sth1 = mysql_query("select name from production where prod_id=" . $soldiers["prod_id"]); if (!$sth1) { echo "Database failure!"; } $blub = mysql_fetch_array($sth1); ticker($uid["uid"], "*lproduction.php?pid=" . $soldiers["planet_id"] . "*" . $uid["name"] . ": " . $soldiers["count"] . " " . $blub["name"] . "(s) produced.", "w"); $sth1 = mysql_query("select prod_id from infantery where prod_id=" . $soldiers["prod_id"] . " and pid=" . $soldiers["planet_id"]); if (!$sth1) { echo "Dazsu failu!"; } if (mysql_num_rows($sth1) == 0) { $sth1 = mysql_query("insert into infantery (prod_id,pid,count,uid) values ('" . $soldiers["prod_id"] . "','" . $soldiers["planet_id"] . "','" . $soldiers["count"] . "','" . $uid[0] . "')"); if (!$sth1) { echo "Database failuerfleet!"; } } else { $sth1 = mysql_query("update infantery set count=count+" . $soldiers["count"] . " where pid='" . $soldiers["planet_id"] . "' and prod_id='" . $soldiers["prod_id"] . "' and uid='" . $uid["uid"] . "' limit 1"); if (!$sth1) { echo "Database failure!"; } } $sth1 = mysql_query("delete from i_production where planet_id='" . $soldiers["planet_id"] . "' and prod_id='" . $soldiers["prod_id"] . "' and count='" . $soldiers["count"] . "' and time=1"); if (!$sth1) { echo "Dtaabase failuer!"; } } $sth = mysql_query("select * from infbattle" . $soldier["planet_id"]); if ($sth) { $sth = mysql_query("insert into infbattle" . $soldier["planet_id"] . " (prod_id,count,initiative,side) values ('" . $soldier["prod_id"] . "','" . $soldier["count"] . "','0','0')"); } $sth = mysql_query("update i_production set time=time-'1' where time>1"); if (!$sth) { echo "Database failure!"; // return 0; } // Infantery Ende }
$menus = array(array('评论列表', '?moduleid=' . $moduleid . '&file=' . $file), array('评论审核', '?moduleid=' . $moduleid . '&file=' . $file . '&action=check'), array('评论禁止', '?moduleid=' . $moduleid . '&file=' . $file . '&action=ban'), array('模块设置', '?moduleid=' . $moduleid . '&file=setting#' . $file)); $this_forward = '?moduleid=' . $moduleid . '&file=' . $file; if (in_array($action, array('', 'check'))) { $sfields = array('内容', '原文标题', '会员名', 'IP', '原文ID', '评论ID'); $dfields = array('content', 'item_title', 'username', 'ip', 'item_id', 'itemid'); $sorder = array('结果排序方式', '添加时间降序', '添加时间升序', '回复时间降序', '回复时间升序', '引用次数降序', '引用次数升序', '支持次数降序', '支持次数升序', '反对次数降序', '反对次数升序', '评分高低降序', '评分高低升序'); $dorder = array('itemid desc', 'addtime DESC', 'addtime ASC', 'replytime DESC', 'replytime ASC', 'quote DESC', 'quote ASC', 'agree DESC', 'agree ASC', 'against DESC', 'against ASC', 'star DESC', 'star ASC'); $sstar = $L['star_type']; isset($fields) && isset($dfields[$fields]) or $fields = 0; isset($order) && isset($dorder[$order]) or $order = 0; isset($star) && isset($sstar[$star]) or $star = 0; isset($ip) or $ip = ''; $fields_select = dselect($sfields, 'fields', '', $fields); $module_select = module_select('mid', '模块', $mid); $order_select = dselect($sorder, 'order', '', $order); $star_select = dselect($sstar, 'star', '', $star); $condition = ''; if ($keyword) { $condition .= in_array($dfields[$fields], array('item_id', 'itemid', 'ip')) ? " AND {$dfields[$fields]}='{$kw}'" : " AND {$dfields[$fields]} LIKE '%{$keyword}%'"; } if ($mid) { $condition .= " AND item_mid='{$mid}'"; } if ($ip) { $condition .= " AND ip='{$ip}'"; } if ($star) { $condition .= " AND star='{$star}'"; } } switch ($action) {
$money = number_format($money, 2, '.', ''); $forward = urlencode($DT_URL); $head_title = $L['group_order_title']; } else { $sfields = $L['group_sfields']; $dfields = array('title', 'title ', 'amount', 'password', 'buyer', 'buyer_name', 'buyer_address', 'buyer_postcode', 'buyer_mobile', 'buyer_phone', 'send_type', 'send_no', 'note'); $gid = isset($gid) ? intval($gid) : 0; isset($buyer) && check_name($buyer) or $buyer = ''; isset($pass) && preg_match("/^[a-z0-9]{6}\$/", $pass) or $pass = ''; isset($fields) && isset($dfields[$fields]) or $fields = 0; isset($fromtime) or $fromtime = ''; isset($totime) or $totime = ''; $status = isset($status) && isset($dstatus[$status]) ? intval($status) : ''; $nav = isset($nav) ? intval($nav) : -1; $fields_select = dselect($sfields, 'fields', '', $fields); $status_select = dselect($dstatus, 'status', $L['status'], $status, '', 1, '', 1); $condition = "seller='{$_username}'"; if ($keyword) { $condition .= " AND {$dfields[$fields]} LIKE '%{$keyword}%'"; } if ($fromtime) { $condition .= " AND addtime>" . strtotime($fromtime . ' 00:00:00'); } if ($totime) { $condition .= " AND addtime<" . strtotime($totime . ' 23:59:59'); } if ($status !== '') { $condition .= " AND status='{$status}'"; } if ($itemid) { $condition .= " AND itemid={$itemid}";
</span> <span class="f_gray">(最多可选<?php echo $MOD['mode_max']; ?> 种)</span></td> </tr> <tr> <td class="tl"><span class="f_hid">*</span> 公司规模</td> <td><?php echo dselect($COM_SIZE, 'member[size]', '请选择规模', $size, '', 0); ?> </td> </tr> <tr> <td class="tl"><span class="f_hid">*</span> 注册资本</td> <td><?php echo dselect($MONEY_UNIT, 'member[regunit]', '', $regunit, '', 0); ?> <input type="text" size="6" name="member[capital]" id="capital" value="<?php echo $capital; ?> "/> 万</td> </tr> <tr> <td class="tl"><span class="f_red">*</span> 公司成立年份</td> <td><input type="text" size="15" name="member[regyear]" id="regyear" value="<?php echo $regyear; ?> "/> <span id="dregyear" class="f_red"></span> <span class="f_gray">(年份,如:2004)</span></td> </tr> <tr> <td class="tl"><span class="f_red">*</span> 公司地址</td>
$minsms = isset($minsms) ? intval($minsms) : ''; $maxsms = isset($maxsms) ? intval($maxsms) : ''; $mindeposit = isset($mindeposit) ? intval($mindeposit) : ''; $maxdeposit = isset($maxdeposit) ? intval($maxdeposit) : ''; $fields_select = dselect($sfields, 'fields', '', $fields); $order_select = dselect($sorder, 'order', '', $order); $gender_select = dselect($sgender, 'gender', '', $gender); $avatar_select = dselect($savatar, 'avatar', '', $avatar); $group_select = group_select('groupid', '会员组', $groupid); $vprofile_select = dselect($sprofile, 'vprofile', '', $vprofile); $vemail_select = dselect($semail, 'vemail', '', $vemail); $vmobile_select = dselect($smobile, 'vmobile', '', $vmobile); $vtruename_select = dselect($struename, 'vtruename', '', $vtruename); $vbank_select = dselect($sbank, 'vbank', '', $vbank); $vcompany_select = dselect($scompany, 'vcompany', '', $vcompany); $vtrade_select = $DT['trade_nm'] ? dselect($strade, 'vtrade', '', $vtrade) : ''; $condition = $action ? 'groupid=4' : 'groupid!=4'; // if ($_areaids) { $condition .= " AND areaid IN (" . $_areaids . ")"; } //CITY if ($keyword) { $condition .= " AND {$dfields[$fields]} LIKE '%{$keyword}%'"; } if ($gender) { $condition .= " AND gender={$gender}"; } if ($avatar) { $condition .= $avatar == 1 ? " AND avatar=1" : " AND avatar=0"; }
$mincredit = isset($mincredit) ? intval($mincredit) : ''; $maxcredit = isset($maxcredit) ? intval($maxcredit) : ''; $minsms = isset($minsms) ? intval($minsms) : ''; $maxsms = isset($maxsms) ? intval($maxsms) : ''; $fields_select = dselect($sfields, 'fields', '', $fields); $order_select = dselect($sorder, 'order', '', $order); $gender_select = dselect($sgender, 'gender', '', $gender); $avatar_select = dselect($savatar, 'avatar', '', $avatar); $group_select = group_select('groupid', '会员组', $groupid); $vprofile_select = dselect($sprofile, 'vprofile', '', $vprofile); $vemail_select = dselect($semail, 'vemail', '', $vemail); $vmobile_select = dselect($smobile, 'vmobile', '', $vmobile); $vtruename_select = dselect($struename, 'vtruename', '', $vtruename); $vbank_select = dselect($sbank, 'vbank', '', $vbank); $vcompany_select = dselect($scompany, 'vcompany', '', $vcompany); $vtrade_select = dselect($strade, 'vtrade', '', $vtrade); $condition = $action ? 'groupid=4' : 'groupid!=4'; // if ($_areaids) { $condition .= " AND areaid IN (" . $_areaids . ")"; } //CITY if ($keyword) { $condition .= " AND {$dfields[$fields]} LIKE '%{$keyword}%'"; } if ($gender) { $condition .= " AND gender={$gender}"; } if ($avatar) { $condition .= $avatar == 1 ? " AND avatar=1" : " AND avatar=0"; }
} else { if ($all) { dheader('?moduleid=3&file=announce&action=html&all=1&one=' . $one); } dmsg('生成成功', "?moduleid={$_moduleid}&file={$file}"); } msg('ID从' . $fid . '至' . ($aid - 1) . '[广告]生成成功' . progress($sid, $fid, $tid), "?moduleid={$_moduleid}&file={$file}&action={$action}&sid={$sid}&fid={$aid}&tid={$tid}&num={$num}&all={$all}&one={$one}"); break; default: isset($typeid) or $typeid = 0; $width = isset($width) ? intval($width) : ''; $height = isset($height) ? intval($height) : ''; $open = isset($open) ? $open : -1; $thumb = isset($thumb) ? intval($thumb) : 0; $condition = '1'; $type_select = dselect($TYPE, 'typeid', '', $typeid); if ($keyword) { $condition .= " AND name LIKE '%{$keyword}%'"; } if ($typeid) { $condition .= " AND typeid={$typeid}"; } if ($width) { $condition .= " AND width={$width}"; } if ($height) { $condition .= " AND height={$height}"; } if ($thumb) { $condition .= " AND thumb<>''"; }
$maxcapital = isset($maxcapital) ? dround($maxcapital) : ''; $maxcapital or $maxcapital = ''; if (!$areaid && $cityid && strpos($DT_URL, 'areaid') === false) { $areaid = $cityid; $ARE = $AREA[$cityid]; } isset($mode) && isset($modes[$mode]) or $mode = 0; isset($type) && isset($types[$type]) or $type = 0; isset($size) && isset($sizes[$size]) or $size = 0; isset($vip) && isset($vips[$vip]) or $vip = 0; $category_select = ajax_category_select('catid', $L['all_category'], $catid, $moduleid); $area_select = ajax_area_select('areaid', $L['all_area'], $areaid); $mode_select = dselect($modes, 'mode', '', $mode); $type_select = dselect($types, 'type', '', $type); $size_select = dselect($sizes, 'size', '', $size); $vip_select = dselect($vips, 'vip', '', $vip); $tags = array(); if ($DT_QST) { if ($kw) { if (strlen($kw) < $DT['min_kw'] || strlen($kw) > $DT['max_kw']) { message(lang($L['word_limit'], array($DT['min_kw'], $DT['max_kw'])), $MOD['linkurl'] . 'search.php'); } if ($DT['search_limit'] && $page == 1) { if ($DT_TIME - $DT['search_limit'] < get_cookie('last_search')) { message(lang($L['time_limit'], array($DT['search_limit'])), $MOD['linkurl'] . 'search.php'); } set_cookie('last_search', $DT_TIME); } } $fds = $MOD['fields']; $condition = "groupid>5 AND catids<>''";
$item = $do->get_one(); $item or msg(); extract($item); include tpl('message_show', $module); break; default: $sfields = array('标题', '发件人', '收件人', 'IP', '内容'); $dfields = array('title', 'fromuser', 'touser', 'ip', 'content'); $S = array('状态', '草稿箱', '发件箱', '收件箱', '回收站'); isset($fields) && isset($dfields[$fields]) or $fields = 0; $typeid = isset($typeid) ? intval($typeid) : -1; $read = isset($read) ? intval($read) : -1; $send = isset($send) ? intval($send) : -1; $status = isset($status) ? intval($status) : 0; $fields_select = dselect($sfields, 'fields', '', $fields); $status_select = dselect($S, 'status', '', $status); $condition = "groupids=''"; if ($keyword) { $condition .= " AND {$dfields[$fields]} LIKE '%{$keyword}%'"; } if ($status) { $condition .= " AND status={$status}"; } if ($typeid > -1) { $condition .= " AND typeid={$typeid}"; } if ($read > -1) { $condition .= " AND isread={$read}"; } if ($send > -1) { $condition .= " AND issend={$send}";