<?php
// Error reporting
error_reporting(E_ALL^E_NOTICE);
// Including file for the DB connection:
define("INCLUDE_CHECK",1);
require 'connect.php';
require 'functions.php';
// Converting the visitor's IP to a long int:
$ip = ip2long($_SERVER['REMOTE_ADDR']);
$today = date("Y-m-d");
// Selecting the quotes and LEFT JOIN-ing them to the votes:
$result = mysql_query("
SELECT q.*, IF(v.id,1,0) AS voted
FROM quotes AS q
LEFT JOIN quotes_votes AS v
ON q.id = v.qid
AND v.ip =".$ip."
AND v.date_submit = '".$today."'
");
$i=1;
$str='';
$script='';
while($row=mysql_fetch_assoc($result))
{
// Looping through all the quotes and generating the list on the right of the page:
$str.= '<div class="thumb" id="q-'.$i.'">'.substr($row['txt'],0,20).
'<span class="points">...</span><div class="star-rating" id="rating-'.$i.'">';
$row['rating'] = round($row['rating']);
for($z=0;$z<5;$z++)
{
$str.='<input type="radio" name="rate-'.$i.'" value="'.($z+1).'" '.($z+1==$row['rating']?'checked="checked"':'').' disabled="disabled" />';
}
$str.='</div></div>';
// Each quote calls the fillData JS function
$script.="fillData(".formatJSON($row).");".PHP_EOL;
$i++;
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Fancy quotes with jQuery AJAX & CSS | Tutorialzine demo</title>
<link rel="stylesheet" type="text/css" href="star-rating/ui.stars.css" />
<link rel="stylesheet" type="text/css" href="demo.css" />
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/jquery-ui.min.js"></script>
<script type="text/javascript" src="star-rating/ui.stars.min.js"></script>
<script type="text/javascript" src="q-tip/jquery.qtip-1.0.0-rc3.min.js"></script>
<script src="cufon/cufon-yui.js" type="text/javascript"></script>
<script src="cufon/ChunkFive_400.font.js" type="text/javascript"></script>
<script type="text/javascript">
Cufon.replace('h1.quote');
</script>
<script type="text/javascript" src="script.js"></script>
<script type="text/javascript">
<!-- Outputting the JS generated on the PHP-side -->
<?php echo $script ?>
</script>
</head>
<body>
<div id="main">
<div id="box">
<div id="topPart">
<div id="quote-content">
<h1 class="quote"></h1>
<span id="author"></span>
</div>
</div>
<div id="botPart"></div>
<div class="clear"></div>
</div>
<div id="quotes-list">
<div id="quotes-hide">
<div id="quotes-slide">
<?php
// Outputting the mouse scroll-ed quote list
echo $str;
?>
</div>
</div>
</div>
<div class="clear"></div>
<p class="tut">This is a tutorialzine demo. View the <a href="http://tutorialzine.com/2009/11/fancy-quotes/" target="_blank">original tutorial</a>, or download the <a href="demo.zip">source files</a></p>
</div>
</body>
</html>
没有合适的资源?快使用搜索试试~ 我知道了~
基于PHP的jQuery + PHP带滚动和背景换色的内容切换特效.zip
共18个文件
js:6个
php:4个
png:3个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 117 浏览量
2023-07-20
23:29:15
上传
评论
收藏 44KB ZIP 举报
温馨提示
基于PHP的jQuery + PHP带滚动和背景换色的内容切换特效.zip
资源推荐
资源详情
资源评论
收起资源包目录
基于PHP的jQuery + PHP带滚动和背景换色的内容切换特效.zip (18个子文件)
132676272367071523
likecs.com_132676272375379487
FancyQuotes
demo.php 3KB
tables.sql 3KB
star-rating
ui.stars.gif 2KB
ui.stars.min.js 6KB
ui.stars.min.css 530B
ui.stars.js 8KB
ui.stars.css 894B
demo.css 3KB
q-tip
jquery.qtip-1.0.0-rc3.min.js 38KB
vote.php 794B
img
mid_part.png 194B
top_part.png 2KB
bot_part.png 563B
connect.php 399B
cufon
ChunkFive_400.font.js 13KB
cufon-yui.js 18KB
functions.php 286B
script.js 4KB
共 18 条
- 1
资源评论
助力毕业
- 粉丝: 2180
- 资源: 5136
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功