⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 filewatch.php

📁 一款基于PHP的网络日记程序。WikyBlog支持:多用户的 BLOG
💻 PHP
字号:
<?phpdefined('WikyBlog') or die("Not an entry point...");wbLang::getFile('toolOptions');class watchFile{	function watchFile(){		global $page,$dbObject;				if( empty($_SESSION['username']) ){			message('LOGIN_REQUIRED');			return;		}		if( !$dbObject->exists ){			message('NON_EXISTANT');			return;		}						switch($page->userCmd){			case 'watch':				$this->watch();			break;			case 'unwatch':				$this->unWatch();			break;		}	}	function watch(){		global $wbTables,$dbObject,$lang;				$query = 'REPLACE INTO '.$wbTables['all_watch'];		$query .= ' SET `user_id` = "'.wbDB::escape($_SESSION['user_id']).'" ';		$query .= ' , `file_id` = "'.wbDB::escape($dbObject->file_id).'" ';		if( wbDB::runQuery($query) ){			$link = wbLinks::special('WatchList',false);			message('WATCH_UPDATED',$link);			$dbObject->watching = '1';		}		//otherwise, there will be an error	}	function unwatch(){		global $wbTables,$dbObject,$lang;				$query = 'DELETE FROM '.$wbTables['all_watch'];		$query .= ' WHERE `user_id` = "'.wbDB::escape($_SESSION['user_id']).'" ';		$query .= ' AND `file_id` = "'.wbDB::escape($dbObject->file_id).'" ';		if( wbDB::runQuery($query) ){			$link = wbLinks::special('WatchList',false);			message('WATCH_UPDATED',$link);			$dbObject->watching = '0';		}		//otherwise, there will be an error	}}new watchFile();

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -