<?php
// Error reporting:
error_reporting(E_ALL^E_NOTICE);
// Including the DB connection file:
require 'connect.php';
// Removing notes that are older than an hour:
mysql_query("DELETE FROM notes WHERE id>3 AND dt<SUBTIME(NOW(),'0 1:0:0')");
$query = mysql_query("SELECT * FROM notes ORDER BY id DESC");
$notes = '';
$left='';
$top='';
$zindex='';
while($row=mysql_fetch_assoc($query))
{
// The xyz column holds the position and z-index in the form 200x100x10:
list($left,$top,$zindex) = explode('x',$row['xyz']);
$notes.= '
<div class="note '.$row['color'].'" style="left:'.$left.'px;top:'.$top.'px;z-index:'.$zindex.'">
'.htmlspecialchars($row['text']).'
<div class="author">'.htmlspecialchars($row['name']).'</div>
<span class="data">'.$row['id'].'</span>
</div>';
}
?>
<!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>Sticky Notes With AJAX, PHP & jQuery | Tutorialzine demo</title>
<link rel="stylesheet" type="text/css" href="styles.css" />
<link rel="stylesheet" type="text/css" href="fancybox/jquery.fancybox-1.2.6.css" media="screen" />
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.0/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="fancybox/jquery.fancybox-1.2.6.pack.js"></script>
<script type="text/javascript" src="script.js"></script>
</head>
<body>
<h1>Sticky Notes With AJAX, PHP & jQuery</h1>
<h2>Go back <a href="http://tutorialzine.com/2010/01/sticky-notes-ajax-php-jquery/">to the tutorial »</a></h2>
<div id="main">
<a id="addButton" class="green-button" href="add_note.html">Add a note</a>
<?php echo $notes?>
</div>
<p class="tutInfo">This is a tutorialzine demo. View the <a href="http://tutorialzine.com/2010/01/sticky-notes-ajax-php-jquery/">original tutorial</a>, or download the <a href="demo.zip">source files</a>.</p>
</body>
</html>
没有合适的资源?快使用搜索试试~ 我知道了~
基于PHP的Mysql 老外写的类似祝福墙的Ajax程序.zip
共29个文件
png:16个
php:4个
js:3个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 122 浏览量
2023-07-22
00:06:01
上传
评论
收藏 54KB ZIP 举报
温馨提示
基于PHP的Mysql 老外写的类似祝福墙的Ajax程序.zip
资源推荐
资源详情
资源评论
收起资源包目录
基于PHP的Mysql 老外写的类似祝福墙的Ajax程序.zip (29个子文件)
132676273015242839
likecs.com_132676273018005487
AJAX-enabled Sticky Notes
demo.php 2KB
add_note.html 909B
fancybox
jquery.fancybox-1.2.6.css 4KB
fancy_shadow_w.png 142B
fancy_shadow_n.png 144B
fancy_title_right.png 559B
fancy_shadow_se.png 393B
fancy_shadow_s.png 147B
jquery.fancybox-1.2.6.pack.js 9KB
fancy_right.png 2KB
fancy_shadow_e.png 146B
fancy_shadow_nw.png 374B
fancy_shadow_ne.png 388B
fancy_closebox.png 2KB
fancy_title_main.png 149B
jquery.fancybox-1.2.6.js 17KB
fancy_progress.png 12KB
fancy_title_left.png 556B
fancy_shadow_sw.png 406B
fancy_left.png 2KB
ajax
post.php 1KB
update_position.php 498B
img
ajax_load.gif 1KB
add_a_note_help.gif 6KB
button_green.png 1KB
connect.php 355B
table.sql 1KB
styles.css 4KB
script.js 3KB
共 29 条
- 1
资源评论
助力毕业
- 粉丝: 2182
- 资源: 5146
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功