<?php @session_start();?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<?php if($_SESSION["uid"]==""){echo "<script>alert('對(duì)不起,您還沒有登陸!');window.location.href='../login.php';</script>";exit;}
require_once('../../func/dbase.php');
error_reporting(E_ALL ^ E_NOTICE);
?>
<title>下載中心管理</title>
<?php
$end= 0;
$countPage = 0;
$count = 0;
$page = 0;
$result =0;
$end = 0;
$classid = 0;
$page = $_GET['page'];
if($page==''){$page=1;}
$torul = 20;
$start = $page * $torul - $torul;
$id = '';
$re = 0;
$id = $_GET['id'];
$key = $_POST['key'];
$lei = $_POST['lei'];
if($id!=''){
$sql="select id,url from down where id=".$id;
$result = $mysqli->query($sql);
while($rs=mysqli_fetch_array($result)){unlink("../../down/$rs[1]");}
$sql = "delete from down where id =".$id;
$result = $mysqli->query($sql);
if($re!=0){
echo "<script>window.location =index.php?page=".$page."</script>";
}
}
if($_REQUEST['act']=='delall'){
$yy=$_REQUEST['xx'];
for($i=0;$i<count($yy);$i++){
$sql="select id,url from down where id=".$yy[$i];
$result = $mysqli->query($sql);
while($rs=mysqli_fetch_array($result)){unlink("../../down/$rs[1]");}
$sql= "delete from down where id=".$yy[$i];
$result = $mysqli->query($sql);}
echo "<script>window.location.href='index.php?page=$page';</script>";
exit;}?>
<style type="text/css">
<!--
td {
font-size: 12px;
}
-->
</style>
<link href="../css.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
body {
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
background-color: #007EC0;
}
-->
</style>
<script language="javascript">
function CheckAll(form)
{
for (var i=0;i<form.elements.length;i++)
{
var e = form.elements[i];
if (e.name != 'chkall')
e.checked = form.chkall.checked;
}
}
</script>
</head>
<body>
<table width="0" height="28" border="0" cellpadding="0" cellspacing="0">
<tr>
<td></td>
</tr>
</table>
<table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="10" height="48"><img src="../images/44_1.jpg" width="10" height="48" alt="" /></td>
<td background="../images/44_2.jpg"><span style="font-size:16px">下載中心管理>></span></td>
<td width="11"><img src="../images/44_4.jpg" width="11" height="48" alt="" /></td>
</tr>
</table>
<table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="10" height="36"><img src="../images/44_5.jpg" width="10" height="36" alt="" /></td>
<td background="../images/44_6.jpg"> </td>
<td width="11"><img src="../images/44_8.jpg" width="11" height="36" alt="" /></td>
</tr>
</table>
<table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="10" height="450" background="../images/44_9.jpg"> </td>
<td valign="top" bgcolor="#FFFFFF">
<form name="form1" method="post" action="index1.php">
<table width="560" height="5" border="0" align="center" cellpadding="0" cellspacing="0">
<tr><td></td></tr></table>
<table width="560" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="193" height="25"> 關(guān)鍵字
<input name="key" type="text" id="key" value="<?php echo $key?>" size="20" maxlength="30"></td>
<td width="214" align="center"><select name="lei">
<option value="0">---所有分類---</option>
<option value="1">軟件</option>
<option value="2">用戶手冊(cè)</option>
<option value="3">產(chǎn)品圖冊(cè)</option>
</select>
</td>
<td width="153" valign="bottom">
<input type="submit" name="Submit" value="搜 索" style="width:60px; height:25px;"></td>
</tr>
</table>
</form>
<table width="90%" border="0" align="center" cellpadding="2" cellspacing="1" bgcolor="#f8f8f8" style="border:1px solid #3366dd">
<form name="form1" action="index.php" method="post">
<tr>
<td width="94" height="30" align="center" >選/否
<input type="checkbox" id="chkall" name="chkall" value="on" onClick="CheckAll(this.form)"></td>
<td width="555" align="left" > 名稱</td>
<td width="98" align="center" >類別</td>
<td width="101" align="center" >時(shí)間</td>
<td colspan="2" align="center" >操作</td>
</tr>
<?php
$sql = "select id,title,left(sdate,10) sdate,lei from down";
if($key!=''){
$sql= $sql." and title like '%".$key."%'";
}
if($lei>0){
$sql = $sql." and lei = ".$lei;
}
$sql = $sql." order by id desc";
$sql = $sql." limit ".$start.",".$torul;
$result = $mysqli->query($sql);
while($ar=mysqli_fetch_row($result)){$count = $ar[0];}
$result = $mysqli->query($sql);
if($count<$torul&&$count>0){$page = 1;}
if(($count%$torul)==0){
$countPage = intval($count/$torul);
} else {
$countPage = intval($count/$torul) +1;
}
if($result!=0){
while($arr=mysqli_fetch_array($result)){
$i++;
if($i%2==0){$bg="#f5f5f5";}
else{$bg="#ffffff";}?>
<tr>
<td width="94" height="22" align="center" bgcolor="<?php echo $bg;?>"><input type="checkbox" name="xx[]" value="<?php echo $arr[0];?>"></td>
<td height="22" align="left" bgcolor="<?php echo $bg;?>"> <?php echo $arr[1]?></td>
<td height="22" align="center" bgcolor="<?php echo $bg;?>">
<?php if($arr[3]==1){?>軟件<?php }?>
<?php if($arr[3]==2){?>用戶手冊(cè)<?php }?>
<?php if($arr[3]==3){?>產(chǎn)品圖冊(cè)<?php }?></td>
<td align="center" bgcolor="<?php echo $bg;?>"> <?php echo $arr[2];?></td>
<td width="53" height="22" align="center" bgcolor="<?php echo $bg;?>"><a href="add.php?id=<?php echo $arr[0]?>">修改</a></td>
<td width="60" height="22" align="center" bgcolor="<?php echo $bg;?>"><a href="?id=<?php echo $arr[0]?>&page=<?php echo $page?>" onClick="return confirm('確定刪除嗎?')">刪除</a></td>
</tr>
<?php }}if($count==0){?>
<tr>
<td height="300" colspan="6" align="center" bgcolor="#FFFFFF" class="zz" >暫無(wú)相關(guān)信息!</td>
</tr>
<?php }?>
<tr align="center">
<td height="25" colspan="7" bgcolor="#f7f7f7">
<a href="?page=1">首頁(yè)</a>
<?php if($page>1){?>
<a href="?page=<?php echo ($page - 1)?>">上一頁(yè)</a><?php }?>
- <?php echo $page?> -
<?php if($countPage>$page){?>
<a href="?page=<?php echo ($page+1)?>">下一頁(yè)</a><?php }?>
<a href="?page=<?php echo $countPage?>">尾頁(yè)</a> 共<?php echo $countPage?>頁(yè), 共<?php echo $count?>條文章
<input type="submit" onClick="return confirm('是否刪除選擇的信息?')" name="Submit2" value="刪 除">
(刪除所選)
<input name="act" type="hidden" id="act" value="delall"></td>
</tr>
</form>
</table>
</td>
<td width="11" background="../images/44_11.jpg"> </td>
</tr>
</table>
<table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="10" height="26"><img src="../images/44_12.jpg" width="10" height="26" alt="" /></td>
<td background="../images/44_13.jpg"> </td>
<td width="11"><img src="../images/44_15.jpg" width="11" height="26" alt="" /></td>
</tr>
</table>
</body>
</html>
現(xiàn)在就是統(tǒng)計(jì)條數(shù)那不準(zhǔn),哪位大蝦幫下忙
while($ar=mysqli_fetch_row($result)){$count = $ar[0];}
北大青鳥APTECH成立于1999年。依托北京大學(xué)優(yōu)質(zhì)雄厚的教育資源和背景,秉承“教育改變生活”的發(fā)展理念,致力于培養(yǎng)中國(guó)IT技能型緊缺人才,是大數(shù)據(jù)專業(yè)的國(guó)家
北大青鳥中博軟件學(xué)院創(chuàng)立于2003年,作為華東區(qū)著名互聯(lián)網(wǎng)學(xué)院和江蘇省首批服務(wù)外包人才培訓(xùn)基地,中博成功培育了近30000名軟件工程師走向高薪崗位,合作企業(yè)超4
中公教育集團(tuán)創(chuàng)建于1999年,經(jīng)過(guò)二十年潛心發(fā)展,已由一家北大畢業(yè)生自主創(chuàng)業(yè)的信息技術(shù)與教育服務(wù)機(jī)構(gòu),發(fā)展為教育服務(wù)業(yè)的綜合性企業(yè)集團(tuán),成為集合面授教學(xué)培訓(xùn)、網(wǎng)
達(dá)內(nèi)教育集團(tuán)成立于2002年,是一家由留學(xué)海歸創(chuàng)辦的高端職業(yè)教育培訓(xùn)機(jī)構(gòu),是中國(guó)一站式人才培養(yǎng)平臺(tái)、一站式人才輸送平臺(tái)。2014年4月3日在美國(guó)成功上市,融資1
曾工作于聯(lián)想擔(dān)任系統(tǒng)開發(fā)工程師,曾在博彥科技股份有限公司擔(dān)任項(xiàng)目經(jīng)理從事移動(dòng)互聯(lián)網(wǎng)管理及研發(fā)工作,曾創(chuàng)辦藍(lán)懿科技有限責(zé)任公司從事總經(jīng)理職務(wù)負(fù)責(zé)iOS教學(xué)及管理工作。
浪潮集團(tuán)項(xiàng)目經(jīng)理。精通Java與.NET 技術(shù), 熟練的跨平臺(tái)面向?qū)ο箝_發(fā)經(jīng)驗(yàn),技術(shù)功底深厚。 授課風(fēng)格 授課風(fēng)格清新自然、條理清晰、主次分明、重點(diǎn)難點(diǎn)突出、引人入勝。
精通HTML5和CSS3;Javascript及主流js庫(kù),具有快速界面開發(fā)的能力,對(duì)瀏覽器兼容性、前端性能優(yōu)化等有深入理解。精通網(wǎng)頁(yè)制作和網(wǎng)頁(yè)游戲開發(fā)。
具有10 年的Java 企業(yè)應(yīng)用開發(fā)經(jīng)驗(yàn)。曾經(jīng)歷任德國(guó)Software AG 技術(shù)顧問(wèn),美國(guó)Dachieve 系統(tǒng)架構(gòu)師,美國(guó)AngelEngineers Inc. 系統(tǒng)架構(gòu)師。