📄 files.php
字号:
<?php//$lang checkeddefined('WikyBlog') or die("Not an entry point...");includeFile('search/all.php'); class queryFiles extends query{ var $classes; var $info; function queryFiles($space='page',$plural='pages'){ global $dbInfo,$pageOwner,$page,$lang,$wbTables; $page->displayTitle = $lang['browse'].' > '.$lang[$dbInfo[$space]['class']]; $label = $lang['browse'].' '.$lang[$dbInfo[$space]['class']]; //$this->searchUrl = '/Special/'.$pageOwner['username'].'/Browse'.wbUcwords($lang[$dbInfo[$space]['class']]); //$this->searchUrl = '/Special/'.$pageOwner['username'].'/Browse'.wbUcwords($dbInfo[$space]['dbTable']); $this->searchUrl = '/Special/'.$pageOwner['username'].'/Browse'.wbUcwords($plural); $this->rowLimit = 5; //dbInfo $this->info = $dbInfo[$space]; //$this->fields[--shown to user--] = --database column-- $this->fields[$lang['posted']] = 'posted'; $this->fields[$lang['modified']] = 'modified'; $this->fields[$lang['created']] = $this->info['dbTable'].'.`file_id`';//'created'; $this->query .= 'SELECT SQL_CALC_FOUND_ROWS '.wbData::dbInfo($space,'querySelect'); $this->query .= ' ,'.wbData::dbInfo($space,'uniqLink').' as uniqLink '; $this->query .= ' ,'.$this->getDTitle($space); $this->query .= ' , `modified`, `posted`, `created`,`flags` '; $this->query .= ' FROM '; // $this->query .= $this->info['dbTable']; // $this->query .= ' LEFT JOIN '.$wbTables['all_files']; $this->query .= $wbTables['all_files']; $this->query .= ' INNER JOIN '.$this->info['dbTable']; $this->query .= ' ON '.$wbTables['all_files'].'.`file_id` = '.$this->info['dbTable'].'.`file_id` '; $this->query .= ' WHERE owner_id = "'.$pageOwner['user_id'].'" '; $this->query .= ' AND !FIND_IN_SET("hidden", '.$wbTables['all_files'].'.flags) '; $this->query .= ' AND !FIND_IN_SET("deleted", '.$wbTables['all_files'].'.flags) '; $this->query .= ' AND !FIND_IN_SET("redirect", '.$wbTables['all_files'].'.flags) '; $this->orderBy(); //message($this->query.'<p>'); browseSearch3($this,$label); } function mysqlFetch(&$result){ return mysql_fetch_object($result); } function displayPre(){} function abbrevOutput(&$row,$i){ global $lang,$page; $this->links[$lang['file']] = $row->uniqLink; echo '<h2 class="heading">'.toDisplay($row->dTitle).'</h2>'; echo '<div class="underline"></div>'; echo ' <div class="fileInfo">'; echo '<span>'.implode(' :: ', $page->pageTabs($this->links,$this,true) ).'</span>'; echo '<span>'.$lang['modified'].': '.dbFromDate($row->modified,3).'</span>'; echo '<span>'.$lang['created'].': '. dbFromDate($row->created,3).'</span>'; echo ' </div>'; echo '<div class="desc">'; $bool = wikiToHtml($row->content,400,$row->flags); echo $row->content; if($bool == true){ echo '... '; echo wbLinks::local($row->uniqLink,$lang['read_more']); echo '<span class="sm">('.$bool.' '.$lang['words'].')</span>'; } if( wbStrlen($row->content) < 100 ){ echo '<p> <br/> </p>'; } echo showKeywords($row->keywords,$row->owner,'',' ... '.$lang['tags'].': '); echo '</div>'; echo '<br />'; }}// QUERY CLASS////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// CONTROL FLOWglobal $dbInfo,$page,$pageOwner,$dbObject;$dbObject->links['?'] = 'Browse';switch($dbObject->title){ case 'browsecomments': $space = 'comment'; $plural = 'comments'; break; case 'browsetemplates': $space = 'template'; $plural = 'templates'; break; default: case 'recentlymodified': case 'browsepages'; $space = 'page'; $plural = 'pages'; break;}new queryFiles($space,$plural);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -