请教上面这段登陆后台代码如何改成免登陆
请问下面这段登陆后台代码怎么改成免登陆
请问下面这段登陆后台代码怎么改成免登陆,就是打开这个文件就直接登陆,不用输入管理员帐号密码
- 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>

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics



When logging into iTunesStore using AppleID, this error saying "This AppleID has not been used in iTunesStore" may be thrown on the screen. There are no error messages to worry about, you can fix them by following these solution sets. Fix 1 – Change Shipping Address The main reason why this prompt appears in iTunes Store is that you don’t have the correct address in your AppleID profile. Step 1 – First, open iPhone Settings on your iPhone. Step 2 – AppleID should be on top of all other settings. So, open it. Step 3 – Once there, open the “Payment & Shipping” option. Step 4 – Verify your access using Face ID. step

If you find event ID 55, 50, 140 or 98 in the Event Viewer of Windows 11/10, or encounter an error that the disk file system structure is damaged and cannot be used, please follow the guide below to resolve the issue. What does Event 55, File system structure on disk corrupted and unusable mean? At session 55, the file system structure on the Ntfs disk is corrupted and unusable. Please run the chkMSK utility on the volume. When NTFS is unable to write data to the transaction log, an error with event ID 55 is triggered, which will cause NTFS to fail to complete the operation unable to write the transaction data. This error usually occurs when the file system is corrupted, possibly due to the presence of bad sectors on the disk or the file system's inadequacy of the disk subsystem.

In Alibaba software, once you successfully register an account, the system will assign you a unique ID, which will serve as your identity on the platform. But for many users, they want to query their ID, but don't know how to do it. Then the editor of this website will bring you detailed introduction to the strategy steps below. I hope it can help you! Where can I find the answer to Alibaba ID: [Alibaba]-[My]. 1. First open the Alibaba software. After entering the homepage, we need to click [My] in the lower right corner; 2. Then after coming to the My page, we can see [id] at the top of the page; Alibaba Is the ID the same as Taobao? Alibaba ID and Taobao ID are different, but the two
![Event ID 4660: Object deleted [Fix]](https://img.php.cn/upload/article/000/887/227/168834320512143.png?x-oss-process=image/resize,m_fill,h_207,w_330)
Some of our readers encountered event ID4660. They're often not sure what to do, so we explain it in this guide. Event ID 4660 is usually logged when an object is deleted, so we will also explore some practical ways to fix it on your computer. What is event ID4660? Event ID 4660 is related to objects in Active Directory and will be triggered by any of the following factors: Object Deletion – A security event with Event ID 4660 is logged whenever an object is deleted from Active Directory. Manual changes – Event ID 4660 may be generated when a user or administrator manually changes the permissions of an object. This can happen when changing permission settings, modifying access levels, or adding or removing people or groups

Where can I check the Tencent Video ID? There is an exclusive ID in the Tencent Video APP, but most users do not know how to check the Tencent Video ID. Next is the graphic tutorial on how to check the Tencent Video ID brought by the editor for users who are interested. Users come and take a look! Tencent Video Usage Tutorial Where to check Tencent Video ID 1. First open the Tencent Video APP and enter the special area through [Personal Center] in the lower right corner of the main page; 2. Then enter the Personal Center page and select the [Settings] function; 3. Then go to Settings page, click [Exit Account] at the bottom; 4. Finally, you can view the exclusive ID number on the page shown below.

Uniapp is a cross-platform development framework. Its powerful cross-end capabilities allow developers to develop various applications quickly and easily. It is also very simple to implement drag-and-drop sorting and drag-and-drop operations in Uniapp, and it can support drag-and-drop operations of a variety of components and elements. This article will introduce how to use Uniapp to implement drag-and-drop sorting and drag-and-drop operations, and provide specific code examples. The drag-and-drop sorting function is very common in many applications. For example, it can be used to implement drag-and-drop sorting of lists, drag-and-drop sorting of icons, etc. Below we list

The bottom layer of the C++sort function uses merge sort, its complexity is O(nlogn), and provides different sorting algorithm choices, including quick sort, heap sort and stable sort.

Title: Example of using the Array.Sort function to sort an array in C# Text: In C#, array is a commonly used data structure, and it is often necessary to sort the array. C# provides the Array class, which has the Sort method to conveniently sort arrays. This article will demonstrate how to use the Array.Sort function in C# to sort an array and provide specific code examples. First, we need to understand the basic usage of the Array.Sort function. Array.So
