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

📄 read.php

📁 程序安装简便容易
💻 PHP
字号:
<?php
if(empty($_GET['id'])) header("Location: index.php");

define('DUOXUN','OK');
require_once('global.php');

echo "<!--
/******************************************************************************
 *                        程序名称:DuoXun CMS                                 *                                                           
 *                        程序开发:多讯网 http://www.duoxun.com               *                     
 * 帮助中心:                                                                  *
 *         1)QQ:405228655                                                     *
 *         2)E-mail:duoxun@163.com                                        *
 * 更多联系方法请登陆:多讯网 http://www.duoxun.com                            *                        
 ******************************************************************************/
-->";

require_once(R_P.'cache/set.php');
require_once(R_P.'cache/sort_cache.php');

$mainurl=$set['ifhtml']=='1' && file_exists(R_P.'index.html') ? 'index.html' : 'index.php';

!file_exists(R_P.'cache/read_top.php') ? touch(R_P.'cache/read_top.php') : $read_top=readover(R_P.'cache/read_top.php');
!file_exists(R_P.'cache/read_bottom.php') ? touch(R_P.'cache/read_bottom.php') : $read_bottom=readover(R_P.'cache/read_bottom.php');

if(!empty($_GET['type'])) {
	if($_GET['type']==='news') {
		$sql="SELECT * FROM duoxun_news WHERE aid={$_GET['id']}";
		$rs=get_one($sql);
		$subject=$rs['subject'];
		$guide=$subject.' - '.$set['news'].' - ';
		$guidee='<a href="list.php?type=news">'.$set['news'].'</a>&nbsp;&gt;&nbsp;'.$subject;
		$from=$rs['itfrom'];
		$author=$rs['author'];
		$date=getdate($rs['postdate']);
		$date=$date['year'].'年'.$date['mon'].'月'.$date['mday'].'日';
		$hits=$rs['hits'];
		$content=$rs['content'];

		$href_a=$set['ifhtml']=='1' && file_exists("news.html") ? "news.html" : "list.php?type=news";
		$top_title=$set['news'];
		$query=query("SELECT * FROM duoxun_news ORDER BY postdate DESC,aid DESC LIMIT {$set['listright_num']}");
		while($rs=fetch_array($query)) {
			$top_list[]=$rs;
		}
		$href_b="list.php?order=hits";
		$botton_title='全部排行';
		$query=("SELECT * FROM duoxun_subject WHERE ifshow=1 ORDER BY hits DESC,aid DESC LIMIT {$set['listright_num']}");
		while($rs=fetch_array($query)) {
			$botton_list[]=$rs;
		}
	}
} else {
	$sql="SELECT * FROM duoxun_subject WHERE aid={$_GET['id']}";
	$rs=get_one($sql);
	$sid=$rs['sid'];
	$subject=$rs['subject'];
	$from=$rs['itfrom'];
	$author=$rs['author'];
	$date=getdate($rs['postdate']);
	$date=$date['year'].'年'.$date['mon'].'月'.$date['mday'].'日';
	$hits=$rs['hits'];
	$cnum=$rs['cnum'];	
	foreach($sort as $key=>$value) {
		if($value['id']==$sid) {
			$name=$value['name'];
		}
	}
	$guide=$subject.' - '.$name.' - ';
	$guidee='<a href="list.php?id='.$sid.'">'.$name.'</a>&nbsp;&gt;&nbsp;'.$subject;


	$href_a=$set['ifhtml']=='1' && file_exists("list_".$sid.".html") ? "list_".$sid.".html" : "list.php?id=".$sid;
	$top_title=$name;
	$query=query("SELECT * FROM duoxun_subject WHERE sid=$sid AND ifshow=1 ORDER BY postdate DESC,aid DESC LIMIT {$set['listright_num']}");
	while($rs=fetch_array($query)) {
		$top_list[]=$rs;
	}
	$href_b="list.php?order=hits";
	$botton_title='全部排行';
	$query=("SELECT * FROM duoxun_subject WHERE ifshow=1 ORDER BY hits DESC,aid DESC LIMIT {$set['listright_num']}");
	while($rs=fetch_array($query)) {
		$botton_list[]=$rs;
	}

	$sql="SELECT count(*) AS count FROM duoxun_content WHERE aid={$_GET['id']}";
	$rs=get_one($sql);
	$num=$rs['count'];
	if($num>1) {
		empty($_GET['page']) ? $page=1 : $page=$_GET['page'];
		$fenye=fenye($num,1,$page,"read.php?id={$_GET['id']}",0);
		$sql="SELECT * FROM duoxun_content WHERE aid={$_GET['id']} AND pid=$page"; 
	} else {
		$fenye='';
		$sql="SELECT * FROM duoxun_content WHERE aid={$_GET['id']} AND pid=1";
	}
	$rs=get_one($sql);
	$content=$rs['content'];
}

require_once('head.php');

echo "<script for=window event=onload>var clink=document.links[document.links.length-1];clink.innerText='http://www.duoxun.com';clink.href='http://www.duoxun.com/';clink.title='DuoXun CMS(多讯网)';</script>";

require_once template('read');

require_once('foot.php');

?>

⌨️ 快捷键说明

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