Please ask below this section of the login code how to change to no landing, is to open this file directly login, do not enter the Administrator account password
PHP Code
Is_admin = true; $fanwe->is_session = false; $fanwe->is_user = false; $fanwe->is_cron = false; $fanwe->cache_list = Array (); $fanwe->initialize (); Include_once import (' Function/cache '); Updatecache (); Cleardir (Fanwe_root. /public/tpl '); Cleardir (Fanwe_root. /admin/runtime '); Cleardir (Fanwe_root. /update/runtime '); Include Fanwe_root. '. /thinkphp/vendor/bbs.php '; Bbsaction::getinstance ()->updatesetting (); $result = Array ("Status" =>1, "info" = "clear Success", "Data" = ""); Include import (' Class/json '); $json = new JSON (); Die ($json->encode ($result));} 2011-01-30 Updateelseif ($action = = ' Updategoods ') {$fanwe = &fanweservice::instance (); $fanwe->is_admin = true; $fanwe->is_session = false; $fanwe->is_user = false; $fanwe->is_cron = false; $fanwe->cache_list = Array (' goods '); $fanwe->initialize (); Set_time_limit (0); Global $_fanwe; $begin = isset ($_fanwe[' request '] ['Begin '])? Intval ($_fanwe[' request ' [' Begin ']): 0; $begin = max ($begin, 0); if ($begin = = 0) {db::query ("DELETE from"). Db::table (' cron '). " WHERE type= ' goods '); Db::query ("TRUNCATE TABLE". Db::table (' Goods_now ')); Db::query (' REPLACE into '. Db::table (' Goods_now '). ' (ID, site_id, site_name, name, City, cate_id, URL, Click_count, Best_count, Collect_count, Shop_price, Market_price, begin _time, End_time, brief, sort, small_img, big_img, score, Is_best, bought, Collect_buy, Ef_time, Post_count, R_sort, Cr_sor T, Add_time) SELECT g.id, g.site_id, site_name, name, g.city, g.cate_id, URL, Click_count, Best_count, Collect_count, shop _price, Market_price, Begin_time, G.end_time, brief, G.sort, Small_img, big_img, score, Is_best, bought, Collect_buy, ef_t IME, Post_count, G.r_sort, G.cr_sort, Add_time from '. Db::table (' Goods_key '). ' As GK INNER JOIN '. Db::table (' goods '). ' As G on g.id = gk.id WHERE g.status = 1 and Gk.end_time > '. TIME_UTC); Db::query ("TruncatE TABLE ". Db::table (' Goods_now_key ')); Db::query (' REPLACE into '. Db::table (' Goods_now_key '). ' SELECT id,site_id,city,cate_id,sort,r_sort,cr_sort,0,0,0,0,end_time from '. Db::table (' Goods_now ')); Db::query (' DELETE from '). Db::table (' Goods_now_match '). ' WHERE ID not in (SELECT ID from '. Db::table (' Goods_now_key ') '); Db::query (' INSERT into '). Db::table (' Goods_now_match '). ' SELECT gm.id,gm.content from '. Db::table (' Goods_key '). ' As GK INNER JOIN '. Db::table (' Goods_match '). ' As GM on gm.id = Gk.id left JOIN '. Db::table (' Goods_now_match '). ' As GNM on gnm.id = gk.id WHERE gk.end_time > '. Time_utc. ' And Gnm.id is NULL '); $begin = 0; } $sort _sites = Array (); $res = Db::query (' SELECT site_id from '. Db::table (' Goods_key '). ' WHERE end_time > '. Gettodaytime (). ' GROUP by site_id '); while ($sid = Db::fetch ($res)) {$sort _sites[] = $sid [' site_id ']; } $data _num = count ($sort _sites); echo "". " \ r \ n "; Flush (); Ob_flush (); if ($data _num > $begin) {$site _id = $sort _sites[$begin]; echo "". " \ r \ n "; Flush (); Ob_flush (); Db::query (' TRUNCATE TABLE '. Db::table (' goods_temp ')); Db::query (' REPLACE into '. Db::table (' goods_temp '). ' SELECT ID, site_id, city, cate_id, Sort, @sort: [email protected] + 1 as R_sort,0,0,0,0,0,end_time from '. Db::table (' Goods_now_key '). ' Force INDEX (site), (SELECT @sort: =0) as t WHERE site_id = '. $site _id. ' ORDER by sort asc,id DESC '); if (db::affectedrows () > 0) {$goods _cate_citys = array (); $goods _cates = Array (); $goods _citys = Array (); $sql = "; $sql _JG = "; $res = Db::query (' SELECT * from '. Db::table (' goods_temp '). ' ORDER by sort asc,id DESC '); while ($goods = Db::fetch ($res)) {$CR _sort = 0; $d _sort = 0; $DC _sort = 0; $e _sort = 0; $ec _sort = 0; $city = $goods [' City ']; if (!isset ($goods _citys[$city])) $goods _citys[$city] = 0; $goods _citys[$city]++; $CR _sort = $goods _citys[$city]; $cate _id = $goods [' cate_id ']; $cate = $_fanwe[' cache ' [' goods '] [' Cats '] [$cate _id]; if (!isset ($goods _cates[$cate _id])) $goods _cates[$cate _id] = 0; $goods _cates[$cate _id]++; if (!isset ($goods _cate_citys[$cate _id][$city])) $goods _cate_citys[$cate _id][$city] = 0; $goods _cate_citys[$cate _id][$city]++; $parent _id = $cate [' pid ']; if ($parent _id > 0) {$e _sort = $goods _cates[$cate _id]; $ec _sort = $goods _cate_citys[$cate _id][$city]; if (!isset ($goods _cates[$parent _id])) $goods _cates[$parent _id] = 0; $goods _cates[$parent _id]++; $d _sort = $goods _cates[$parent _id]; if (!isset ($goods _cate_citys[$parent _id][$city])) $goods _cate_citys[$parent _id][$city] = 0; $goods _cate_citys[$parent _id][$city]++; $DC _sort = $goods _cate_citys[$parent _id][$city]; } else {$d _sort = $goods _cates[$cate _id]; $DC _sort = $goods _cate_citys[$cate _id][$city]; } $sql. = "$sql _JG ($goods [id], $goods [site_id], ' $city ', $cate _id, $goods [sort], $goods [R_sort], $CR _sort, $ D_sort, $dc _sort, $e _sort, $ec _sort, $goods [end_time]) "; $sql _JG = ', '; } if ($sql! = ") {db::query (' REPLACE into '). Db::table (' goods_temp '). ' VALUES '. $sql); Db::query (' REPLACE INTO '. Db::table (' Goods_now_key '). ' SELECT * from '. Db::table (' goods_temp ')); }} usleep (10); Db::query (' TRUNCATE TABLE '. Db::table (' goods_temp ')); Db::query (' REPLACE into '. Db::table (' goods_temp '). ' SELECT ID, site_id, city, cate_id, Sort, @sort: [email protected] + 1 as R_sort,0,0,0,0,0,end_time from '. Db::table (' Goods_key '). ' Force INDEX (site), (SELECT @sort: =0) as t WHERE site_id = '. $site _id. ' and End_time > '. Gettodaytime (). ' ORDER by sort asc,id DESC '); if (db::affectedrows () > 0) {$goods _cate_citys = array (); $goods _cates = Array (); $goods _citys = Array (); $sql = "; $sql _JG = "; $res = Db::query (' SELECT * from '. Db::table (' goods_temp '). ' ORDER by sort asc,id DESC '); while ($goods = Db::fetch ($res)) {$CR _sort = 0; $d _sort = 0; $DC _sort = 0; $e _sort = 0; $ec _sort = 0; $city = $goods [' City ']; if (!isset ($goods _citys[$city])) $goods _citys[$city] = 0; $goods _citys[$city]++; $CR _sort = $goods _citys[$city]; $cate _id = $goods [' cate_id ']; $cate = $_fanwe[' cache ' [' goods '] [' Cats '] [$cate _id]; if (!isset ($goods _cates[$cate _id])) $goods _cates[$cate _id] = 0; $goods _cates[$cate _id]++; if (!isset ($goods _cate_citys[$cate _id][$city])) $goods _cate_citys[$cate _id][$city] = 0; $goods _cate_citys[$cate _id][$city]++; $parent _id = $cate [' pid ']; if ($parent _id > 0) {$e _sort = $goods _cates[$cate _id]; $ec _sort = $goods _cate_citys[$cate _id][$city]; if (!isset ($goods _cates[$parent _id])) $goods _cates[$parent _id] = 0; $goods _cates[$parent _id]++; $d _sort = $goods _cates[$parent _id]; if (!isset ($goods _cate_citys[$parent _id][$city])) $goods _cate_citys[$parent _id][$city] = 0; $goods _cate_citys[$parent _id][$city]++; $DC _sort = $goods _cate_citys[$parent _id][$city]; }