www.gusucode.com > Tatter Tools 0.961 SE GB2312 简体中文版 > upload/admin/reader_center1.php

    <?
	include("../inc_global.php");
	include("../inc_function.php");
	check_authority();

	if ($rc) $onload = "all_read_submit();"; admin_pop_header($onload);

	$uri_info = parse_url($REQUEST_URI);
	if ($rnum) $add_query .= " and rno = $rnum ";
	if ($gnum) $add_query .= " and rno in ($gnum) ";
	if ($stext) $add_query .= " and (title like ('%$stext%') or description like ('%$stext%')) ";
	if ($nr) $add_query .= " and is_read = '0' ";
	if ($sc) $add_query .= " and is_scrap = '1' ";
	if ($nr) $limit = "";
	else $limit = "limit 21";

	$sql = "
		select
			no, title, link, description, subject, creator, date, regdate, is_read, is_scrap
		from
			t3_".$dbid."_rss_item
		where
			regdate between $tw1 and ".(time()+300)."
			$add_query
		order by
			regdate desc
		$limit
	";
	// print $sql;
 	$result = @mysql_query($sql);
	$count = mysql_num_rows($result);
?>

<script type="text/javascript">

	function all_read_submit() {
		var all_read = parent.parent.reader_left.document.all_read;
		if (all_read) all_read.submit();
		else setTimeout("all_read_submit();", 1000)
	}

	function onclick_more(target, action, cval) {
		if (cval == 1) {
			document.action_add.target.value = target;
			document.action_add.action.value = action;
			document.action_add.add_query.value = '<?=addslashes($add_query)?>';
			document.action_add.submit();
		} else {
			document.getElementById(target).innerHTML = '';
		}
	}

	function onclick_link(num) {
		document.action_right.num.value = num;
		document.action_right.submit();
	}

	var tar1 = parent;
	var tar2 = parent.parent.reader_right;

</script>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=GB2312">
<meta name="keywords" content="TT,TatterTools,Skin,php">
<meta name="description" content="Meyu,梦游,华人中文网">
<meta name="generator" content="TatterTools中文BLOG">
<meta name="MSSmartTagsPreventParsing" content="TRUE">
<meta http-equiv="MSThemeCompatible" content="Yes">
</head>
<table width="100%" height="100%" cellpadding="0" cellspacing="0" onclick="parent.parent.reader_right.focus();"><tr>
<td valign=top style="padding:5 10 5 5">
<div id="div_clt2"></div>
<?
 	$count = 0;
	while(list(
		$no, $title, $link, $description, $subject, $creator, $date, $regdate, $is_read, $is_scrap
	) = @mysql_fetch_array($result)) {
	 	$count++;
		if ($count == 21 && !$nr) { ?><div id="tw_more"><div align="right" style="padding:5 12 0 0"><a href="#" onclick="onclick_more('tw_more','2', 1); return false;" alt="">本周所有文章</a></div></div><? break; }
		$title = str_cut($title,26,0);
	 	if (trim($stext)) $title = str_replace($stext, "<b style=\"color:red;background-color:#FFFF00\">".$stext."</b>", $title);
	 	if (!trim($title)) $title = "[尚无资料]";

		?>
		<div id="fc<?=$no?>"></div>
		<table width="100%" cellpadding="0" cellspacing="0"><tr>
		<td width="17"><img class="ib" id="scc_<?=$no?>_00" src="../images/star_<? if ($is_scrap) print "on"; else print "off"; ?>.gif" width="15" height="15" onclick="onclick_scrap_star2(this, '<?=$no?>')"></td>
		<td style="padding:3 0 0 4; line-height:11pt;"><a id="item<?=$no?>" onclick="this.style.color='#000030';" style="color:<? if ($is_read) print "#000030"; else print "#0000D0"; ?>" href="reader_right.php?num=<?=$no?>&amp;rnum=<?=$rnum?>&amp;gnum=<?=$gnum?>&amp;stext=<?=urlencode($stext)?>&amp;nr=<?=$nr?>&amp;sc=<?=$sc?>" target="reader_right"><?=$title?></a></td>
		<td class="rowdate" width="35" valign="top" style="padding:3 0 0 0;"><?=get_timevalue0($regdate,2)?></td>
		</tr></table>
		<?
	}

	if (!$count) { ?><div style="margin-left:5;">读取新发表文章完毕</div><? }
?>
</td>
</tr></table>

<form name="ritem_scrap" action="reader_center_add.php" target="exe_frame">
<input type="hidden" name="mode" value="scrap">
<input type="hidden" name="num">
<input type="hidden" name="flag">
</form>

<form method="post" name="action_add" action="reader_center_add.php" target="exe_frame">
<input type="hidden" name="target">
<input type="hidden" name="action">
<input type="hidden" name="add_query">
<input type="hidden" name="stext" value="<?=$stext?>">
<input type="hidden" name="nr" value="<?=$nr?>">
<input type="hidden" name="sc" value="<?=$sc?>">
<input type="hidden" name="rnum" value="<?=$rnum?>">
<input type="hidden" name="gnum" value="<?=$gnum?>">
</form>

<iframe name="exe_frame" style="display:none"></iframe>

<? admin_pop_footer(""); ?>