请教上面这段登陆后台代码如何改成免登陆
请问下面这段登陆后台代码怎么改成免登陆
请问下面这段登陆后台代码怎么改成免登陆,就是打开这个文件就直接登陆,不用输入管理员帐号密码
- PHP code
<!-- Code highlighting produced by Actipro CodeHighlighter (freeware) http://www.CodeHighlighter.com/ --><?php define('SUB_DIR','/services'); session_start(); error_reporting(E_ALL ^ E_NOTICE); if(!isset($_SESSION['adm_name']) || empty($_SESSION['adm_name'])) exit; //2011-01-30 update $actions = array('clear','getuser','updategoods','updatesite'); if(isset($_REQUEST['action'])) { $action = strtolower($_REQUEST['action']); if(!in_array($action,$actions)) exit; } else exit; set_time_limit(3600); if(function_exists('ini_set')) ini_set('max_execution_time',3600); require '../core/service/fanwe.service.php'; if($action == 'clear') { $fanwe = &FanweService::instance(); //2011-01-30 update $fanwe->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"=>'清除成功',"data"=>""); include import('class/json'); $json = new JSON(); die($json->encode($result)); } //2011-01-30 update elseif($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_sort, 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_time, 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 "<script type='\"text/javascript\"'>document.write('数据表 goods_now 共 ".$data_num." 个站点<br/>');</script>"."\r\n"; flush(); ob_flush(); if($data_num > $begin) { $site_id = $sort_sites[$begin]; echo "<script type='\"text/javascript\"'>document.write('开始更新数据表 goods_now 站点 ".($begin + 1)."<br/>');</script>"."\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:=@sort + 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:=@sort + 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]; } <div class="clear"> </div>

熱AI工具

Undresser.AI Undress
人工智慧驅動的應用程序,用於創建逼真的裸體照片

AI Clothes Remover
用於從照片中去除衣服的線上人工智慧工具。

Undress AI Tool
免費脫衣圖片

Clothoff.io
AI脫衣器

Video Face Swap
使用我們完全免費的人工智慧換臉工具,輕鬆在任何影片中換臉!

熱門文章

熱工具

記事本++7.3.1
好用且免費的程式碼編輯器

SublimeText3漢化版
中文版,非常好用

禪工作室 13.0.1
強大的PHP整合開發環境

Dreamweaver CS6
視覺化網頁開發工具

SublimeText3 Mac版
神級程式碼編輯軟體(SublimeText3)

若您在Windows11/10的事件檢視器中發現事件ID55、50、140或98,或遇到磁碟檔案系統結構損壞且無法使用的錯誤,請依照下列指南解決此問題。什麼是事件55,磁碟上的檔案系統結構損壞和不可用的意思?第55屆會議,Ntfs磁碟上的檔案系統結構損壞且無法使用。請在磁碟區上執行chkMSK實用程式當NTFS無法將資料寫入交易日誌時,會觸發事件ID55的錯誤,這將導致NTFS無法完成無法寫入交易資料的操作。這種錯誤通常發生在檔案系統損壞的情況下,可能是由於磁碟上存在壞磁區或檔案系統對磁碟子系統的不

使用AppleID登入iTunesStore時,可能會在螢幕上拋出此錯誤提示「此AppleID尚未在iTunesStore中使用」。沒有什麼可擔心的錯誤提示,您可以按照這些解決方案集進行修復。修正1–更改送貨地址此提示出現在iTunesStore中的主要原因是您的AppleID個人資料中沒有正確的地址。步驟1–首先,開啟iPhone上的iPhone設定。步驟2–AppleID應位於所有其他設定的頂部。所以,打開它。步驟3–在那裡,打開“付款和運輸”選項。步驟4–使用面容ID驗證您的存取權限。步驟

在阿里巴巴軟體中,一旦您成功註冊帳號,系統就會為您指派一個獨特的ID,這個ID將作為您在平台上的身分識別。但是對於許多用戶來說,他們會想要查詢自己的ID,但是卻不知道該如何操作。那麼本站小編帶來下文中,就將為大家帶來詳細的攻略步驟介紹,希望能幫助大家!阿里巴巴id在哪裡看答案:【阿里巴巴】-【我的】。 1.首先打開阿里巴巴軟體,進入到首頁中後我們需要點擊右下角的【我的】;2、然後來到我的頁面中後我們在頁面的上方就可以看到【id】了;阿里巴巴id跟淘寶一樣嗎阿里巴巴id和淘寶id不一樣,但二
![事件 ID 4660:已刪除物件 [修復]](https://img.php.cn/upload/article/000/887/227/168834320512143.png?x-oss-process=image/resize,m_fill,h_207,w_330)
我們的一些讀者遇到了事件ID4660。他們通常不確定該怎麼做,所以我們在本指南中解釋。刪除物件時通常會記錄事件ID4660,因此我們還將探索一些實用的方法在您的電腦上修復它。什麼是事件ID4660?事件ID4660與活動目錄中的物件相關,將由下列任一因素觸發:物件刪除–每當從ActiveDirectory中刪除物件時,都會記錄事件ID為4660的安全事件。手動變更–當使用者或管理員手動變更物件的權限時,可能會產生事件ID4660。變更權限設定、修改存取等級或新增或刪除人員或群組時,可能會發生這種情

C++sort函數底層採用歸併排序,其複雜度為O(nlogn),並提供不同的排序演算法選擇,包括快速排序、堆排序和穩定排序。

Uniapp是一款跨平台的開發框架,其強大的跨端能力使得開發者可以快速方便地開發出各種應用。在Uniapp中實現拖曳排序和拖曳操作也是非常簡單的,並且可以支援多種組件和元素的拖曳操作。本文將介紹如何使用Uniapp實作拖曳排序和拖曳操作,並提供具體的程式碼範例。拖曳排序功能在許多應用中都非常常見,例如可以用於實現清單的拖曳排序,圖示的拖曳排序等。下面我們以列表

騰訊視頻id在哪裡查看?騰訊視頻APP中是有專屬的id,但是多數的用戶不知道如何查看騰訊視頻id,接下來就是小編為用戶帶來的騰訊視頻id查看方法圖文教程,感興趣的用戶快來一起看看吧!騰訊影片使用教學騰訊影片id在哪裡查看1、先開啟騰訊影片APP,主頁右下角【個人中心】進入專區;2、之後進入到個人中心頁面,選擇【設定】功能;3、然後在設定頁面,點選最下方【退出帳號】;4、最後在下圖所示的頁面即可查看到專屬的id號。

vue取得不到id屬性是因為將getElementById用在了「created()」鉤子函數中,而Vue尚未完成掛載;其解決方法就是將「created() {let serachBox = document.getElementById('searchBox') ;...}」程式碼遷移到「mounted()」鉤子函數中即可。
