whatlinkshere.php

来自「一款基于PHP的网络日记程序。WikyBlog支持:多用户的 BLOG」· PHP 代码 · 共 70 行

PHP
70
字号
<?phpdefined('WikyBlog') or die("Not an entry point...");global $pageOwner,$dbObject,$lang;$page->displayTitle = $lang['what_links_here'];$dbObject->links['?'] = $lang['what_links_here'];includeFile('search/all.php');	class queryWhatLinks extends query{	var $tempObject;		function queryWhatLinks(){		global $page,$dbInfo,$pageOwner;		global $lang,$wbTables;		$page->css2 =true;		$this->rowLimit = 50;				if( !isset($_GET['to']) ){			message('Invalid Request');			return;		}		$page->displayTitle = $lang['what_links_here']. ' > '. str_replace('_',' ',$_GET['to']);				$this->searchUrl = '/Special/'.$pageOwner['username'].'/WhatLinksHere';				$this->selectFrom = $wbTables['all_links'].' INNER JOIN '.$wbTables['all_files'].'  ON '.$wbTables['all_files'].'.`file_id` =  '.$wbTables['all_links'].'.`file_id` ';		$this->selectFrom .= ' AND !FIND_IN_SET("hidden", '.$wbTables['all_files'].'.`flags`) ';		$this->selectFrom .= ' AND !FIND_IN_SET("deleted", '.$wbTables['all_files'].'.`flags`) ';				$this->joinAllTo = $wbTables['all_links'];		$this->allSelect = array();				$owner = ' IF( '.$wbTables['all_files'].'.`owner_id` = "'.wbDB::escape($pageOwner['user_id']).'", 1, 0) ';		$this->allSelect = array($owner=>'is_owner');				$this->queryAllFiles();		$this->query .= ' AND `to_link` = "'.wbDB::escape($_GET['to']).'" ';				browseSearch3($this,$page->displayTitle);	}		function abbrevOutput(&$row,$i){		global $pageOwner;		$this->queryAllResult($row);				echo '<li>';		if( $row['is_owner'] == '0'){			echo wbLinks::local('/'.$row['owner'],$row['owner']).' :: ';		}		echo wbLinks::local($row['uniqLink'],toDisplay($row['dTitle']),' title="'.toDisplay($row['dTitle']).'"');		echo '</li>';	}	function displayPre(){		echo '<ol>';	}	function displayPost(&$prev,&$pages,&$next){		echo '</ol>';		parent::displayPost($prev,$pages,$next);	}}new queryWhatLinks();

⌨️ 快捷键说明

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