<?php session_start();?>
<html>
<head>
<link href="CSS/style.css" rel="stylesheet">
<script language="javascript">
function checkreader(form){
if(form.barcode.value==""){
alert("请输入读者条形码!");form.barcode.focus();return;
}
form.submit();
}
function checkbook(form){
if(form.barcode.value==""){
alert("请输入读者条形码!");form.barcode.focus();return;
}
if(form.inputkey.value==""){
alert("请输入查询关键字!");form.inputkey.focus();return;
}
if(form.number.value-form.borrowNumber.value<=0){
alert("您不能再借阅其他图书了!");return;
}
form.submit();
}
</script>
</head>
<body>
<?php include("navigation.php");?>
<table width="776" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td valign="top" bgcolor="#FFFFFF"><table width="100%" height="509" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" class="tableBorder_gray">
<tr>
<td align="left" valign="top" style="padding:5px;"> <span class="word_orange"> 当前位置:图书借还 > 图书借阅>>> </span> <table width="100%" border="0" cellpadding="0" cellspacing="0">
<?php
include("conn/conn.php");
//$barcode=$_POST[barcode];
$sql=mysql_query("select r.*,t.name as typename,t.number from tb_reader r left join tb_readerType t on r.typeid=t.id where r.barcode='$barcode'");
//$sql=mysql_query("select r.*,t.name as typename,t.number,book.bookname,book.price,borr.borrowTime,borr.backTime,pub.pubname,bc.name as bookcase from tb_reader r left join tb_readerType t on r.typeid=t.id join tb_borrow as borr on borr.readerid=r.id join tb_bookinfo as book on book.id=borr.bookid join tb_publishing as pub on book.ISBN=pub.ISBN join tb_bookcase as bc on book.bookcase=bc.id where r.barcode='$barcode'");
$info=mysql_fetch_array($sql);
?>
<form name="form1" method="post" action="">
<tr>
<td height="72" align="center" valign="top" background="Images/main_booksort_1.gif" bgcolor="#F8BF73">
<br>
<table width="96%" border="0" cellpadding="0" cellspacing="0" bordercolor="#FFFFFF" bgcolor="#9ECFEE" class="tableBorder_grey">
<tr>
<td height="33" valign="top" background="Images/bookborr.gif">
<table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
<tr>
<td valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="33" background="Images/bookborr.gif"> </td>
</tr>
</table>
<table width="100%" height="21" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="24%" height="18" style="padding-left:7px;padding-top:7px;"><img src="Images/bg_line.gif" width="132" height="20"></td>
<td width="76%" style="padding-top:7px;">读者条形码:
<input name="barcode" type="text" id="barcode" size="24" value="<?php echo $info[barcode];?>">
<input name="Button" type="button" class="btn_grey" value="确定" onClick="checkreader(form1)"></td>
</tr>
</table></td>
</tr>
<tr>
<td height="13" align="left" style="padding-left:7px;"><hr width="90%" size="1"></td>
</tr>
<tr>
<td align="center"><table width="96%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="27">姓 名:
<input name="readername" type="text" id="readername" value="<?php echo $info[name];?>">
<input name="readerid" type="hidden" id="readerid" value="<?php echo $info[id];?>"></td>
<td>性 别:
<input name="sex" type="text" id="sex" value="<?php echo $info[sex];?>"></td>
<td>读者类型:
<input name="readerType" type="text" id="readerType" value="<?php echo $info[typename];?>"></td>
</tr>
<tr>
<td height="27">证件类型:
<input name="paperType" type="text" id="paperType" value="<?php echo $info[paperType];?>"></td>
<td>证件号码:
<input name="paperNo" type="text" id="paperNo" value="<?php echo $info[paperNO];?>"></td>
<td>可借数量:
<input name="number" type="text" id="number" value="<?php echo $info[number];?>" size="17">
册
</td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
<tr>
<td height="32"> 添加的依据:
<input name="f" type="radio" class="noborder" value="barcode" checked>
图书条形码
<input name="f" type="radio" class="noborder" value="bookname">
图书名称
<input name="inputkey" type="text" id="inputkey" size="50">
<input name="Submit" type="button" class="btn_grey" id="Submit" onClick="checkbook(form1);" value="确定">
<input name="operator" type="hidden" id="operator" value="<?php echo $_SESSION[adminname];?>">
<input name="Button2" type="button" class="btn_grey" id="Button2" onClick="window.location.href='bookBorrow.php'" value="完成借阅"> </td>
</tr>
<tr>
<td valign="top" bgcolor="#D2E5F1" style="padding:5px"><table width="99%" border="1" cellpadding="0" cellspacing="0" bordercolor="#FFFFFF" bordercolorlight="#FFFFFF" bordercolordark="#9ECFEE" bgcolor="#FFFFFF">
<tr align="center" bgcolor="#E2F4F6">
<td width="29%" height="25">图书名称</td>
<td width="12%">借阅时间</td>
<td width="14%">应还时间</td>
<td width="17%">出版社</td>
<td width="14%">书架</td>
<td colspan="2">定价(元)</td>
</tr>
<?php
$readerid=$info[id];
$sql1=mysql_query("select r.*,borr.borrowTime,borr.backTime,book.bookname,book.price,pub.pubname,bc.name as bookcase from tb_borrow as borr join tb_bookinfo as book on book.id=borr.bookid join tb_publishing as pub on book.ISBN=pub.ISBN join tb_bookcase as bc on book.bookcase=bc.id join tb_reader as r on borr.readerid=r.id where borr.readerid='$readerid' and borr.ifback=0");
//$sql=mysql_query("select t.days from tb_bookinfo b left join tb_booktype t on b.typeid=t.id where b.barcode='$barcode'");
$info1=mysql_fetch_array($sql1);
$borrowNumber=mysql_num_rows($sql1); //获取结果集中行的数目
do{
?>
<tr>
<td height="25" style="padding:5px;"> <?php echo $info1[bookname];?></td>
<td style="padding:5px;"> <?php echo $info1[borrowTime];?></td>
<td style="padding:5px;"> <?php echo $info1[backTime];?></td>
<td align="center"> <?php echo $info1[pubname];?></td>
<td align="center"> <?php echo $info1[bookcase];?></td>
<td width="14%" align="center"> <?php echo $info1[price];?></td>
没有合适的资源?快使用搜索试试~ 我知道了~
php编写的在线图书馆
共112个文件
php:50个
gif:21个
myi:11个
5星 · 超过95%的资源 需积分: 9 37 下载量 97 浏览量
2009-03-30
10:57:32
上传
评论 1
收藏 504KB RAR 举报
温馨提示
用php写的一个在线图书管理系统 用php写的一个在线图书管理系统 用php写的一个在线图书管理系统
资源推荐
资源详情
资源评论
收起资源包目录
php编写的在线图书馆 (112个子文件)
style.css 3KB
Thumbs.db 53KB
readme.doc 321KB
tb_reader.frm 9KB
tb_bookinfo.frm 9KB
tb_library.frm 9KB
tb_borrow.frm 9KB
tb_purview.frm 9KB
tb_parameter.frm 8KB
tb_booktype.frm 8KB
tb_readertype.frm 8KB
tb_manager.frm 8KB
tb_publishing.frm 8KB
tb_bookcase.frm 8KB
banner.gif 46KB
bg.gif 39KB
main_booksort.gif 8KB
bookxj.gif 6KB
bookborr.gif 6KB
bookgh.gif 6KB
dangan.gif 4KB
bookborrow.gif 4KB
item_over.gif 2KB
item_out.gif 2KB
bg_line.gif 2KB
line.gif 2KB
search.gif 1KB
menu_line.gif 1KB
menu_line1.gif 1KB
borrow_fg.gif 959B
line2.gif 678B
main_booksort_2.gif 674B
main_booksort_1.gif 179B
navigation_bg.gif 133B
Top_flag.gif 48B
subBG.jpg 31KB
reader_checkbg.jpg 15KB
menu.JS 8KB
function.js 1KB
tb_reader.MYD 1KB
tb_bookinfo.MYD 580B
tb_borrow.MYD 448B
tb_manager.MYD 208B
tb_bookcase.MYD 180B
tb_readertype.MYD 168B
tb_library.MYD 148B
tb_booktype.MYD 104B
tb_publishing.MYD 76B
tb_purview.MYD 50B
tb_parameter.MYD 13B
tb_bookinfo.MYI 2KB
tb_borrow.MYI 2KB
tb_readertype.MYI 2KB
tb_purview.MYI 2KB
tb_booktype.MYI 2KB
tb_reader.MYI 2KB
tb_manager.MYI 2KB
tb_bookcase.MYI 2KB
tb_parameter.MYI 2KB
tb_library.MYI 2KB
tb_publishing.MYI 1024B
db.opt 65B
bookBorrow.php 10KB
bookRenew.php 7KB
borrowQuery.php 6KB
bookBack.php 6KB
book_Modify.php 5KB
reader_modify.php 5KB
bookQuery.php 5KB
reader_add.php 4KB
book_add.php 4KB
reader_info.php 4KB
library_modify.php 4KB
manager.php 4KB
book_look.php 4KB
index.php 3KB
pwd_Modify.php 3KB
book.php 3KB
manager_modify.php 3KB
reader.php 3KB
bremind.php 3KB
bookcase.php 2KB
navigation.php 2KB
readerType.php 2KB
manager_add.php 2KB
login.php 2KB
parameter_modify.php 2KB
readerType_add.php 2KB
bookcase_add.php 2KB
chklogin.php 1KB
reader_ok.php 954B
manager_modifyok.php 893B
book_modify_ok.php 806B
library_ok.php 772B
book_ok.php 769B
reader_modifyok.php 714B
copyright.php 656B
readerType_del.php 641B
borrow_oncemore.php 568B
parameterModify_ok.php 521B
共 112 条
- 1
- 2
资源评论
- yuemen2012-12-05还不错。可惜我想要的是在线阅读系统,不是图书馆
- fangyong20082012-08-23很适用的程序代码,多学习交流!
- cmd_hacker2013-10-09通过这个实例,对php有了更深入的了解了!
fockeru
- 粉丝: 0
- 资源: 1
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功