一個(gè)程序下載的管理程序(三)
更新時(shí)間:2006年10月09日 00:00:00 作者:
//后臺(tái)程序sign.php源代碼如下:
<?require("../opendata.php");?>
<?
if($action=="sign")
{
if($say==""||$title==""||$url==""||$size=="")
{
header("location:../message.php?message=資料不完整&redirect=download/download.php?page=0%26action=publish");
break;
} $say=htmlspecialchars($say);
$title=htmlspecialchars($title);
$say=str_replace(" "," ",$say);
$say=nl2br($say);
$now_time=getdate();
$ttime=$now_time["year"]."-".$now_time["mon"]."-".$now_time["mday"]." ".$now_time["hours"].":".$now_time["minutes"].":".$now_time["seconds"];
$str="insert into download (title,say,click,ttime,url,size,type) values ('".$title."','".$say."',0,'#".$ttime."#','".$url."','".$size."',".$type.")";
mysql_query($str,$cn);
header("location:download.php?page=0&action=show");
}
if($action=="download")
{
mysql_query("update download set click=click+1 where id=".$id,$cn);
?>
<?
header("Content-type: text/html");
if(header("location:$url"))
echo "error";
?>
<html>
<p align="center"><a href="<?=$url?>">如果你的瀏覽器沒有彈出下載窗口,請(qǐng)點(diǎn)這里</a></p>
<p align="center"><a href="javascript:self.close()">關(guān)閉窗口</a></p>
<p> </p>
</html>
<?}?>
<?if($action=="mail")
{
mail("khj99@163.net","該鏈接有問題,請(qǐng)更正","id=$id;程序名=$title;類別=$type","From:khj99@163.netnReply-To:khj99@163.netn");
header("location:download.php?action=show&type=$type");
}
?>
<?require("../opendata.php");?>
<?
if($action=="sign")
{
if($say==""||$title==""||$url==""||$size=="")
{
header("location:../message.php?message=資料不完整&redirect=download/download.php?page=0%26action=publish");
break;
} $say=htmlspecialchars($say);
$title=htmlspecialchars($title);
$say=str_replace(" "," ",$say);
$say=nl2br($say);
$now_time=getdate();
$ttime=$now_time["year"]."-".$now_time["mon"]."-".$now_time["mday"]." ".$now_time["hours"].":".$now_time["minutes"].":".$now_time["seconds"];
$str="insert into download (title,say,click,ttime,url,size,type) values ('".$title."','".$say."',0,'#".$ttime."#','".$url."','".$size."',".$type.")";
mysql_query($str,$cn);
header("location:download.php?page=0&action=show");
}
if($action=="download")
{
mysql_query("update download set click=click+1 where id=".$id,$cn);
?>
<?
header("Content-type: text/html");
if(header("location:$url"))
echo "error";
?>
<html>
<p align="center"><a href="<?=$url?>">如果你的瀏覽器沒有彈出下載窗口,請(qǐng)點(diǎn)這里</a></p>
<p align="center"><a href="javascript:self.close()">關(guān)閉窗口</a></p>
<p> </p>
</html>
<?}?>
<?if($action=="mail")
{
mail("khj99@163.net","該鏈接有問題,請(qǐng)更正","id=$id;程序名=$title;類別=$type","From:khj99@163.netnReply-To:khj99@163.netn");
header("location:download.php?action=show&type=$type");
}
?>
相關(guān)文章
php面向?qū)ο笕ヂ?(十) final static const關(guān)鍵字的使用
這個(gè)關(guān)鍵字只能用來定義類和定義方法,不能使用final 這個(gè)關(guān)鍵字來定義成員屬性,因?yàn)閒inal 是常量的意思,我們?cè)赑HP 里定義常量使用的是define()函數(shù),所以不能使用final 來定義成員屬性。2009-09-09
轉(zhuǎn)PHP手冊(cè)及PHP編程標(biāo)準(zhǔn)
轉(zhuǎn)PHP手冊(cè)及PHP編程標(biāo)準(zhǔn)...2006-12-12
PHP PDOStatement::fetchObject講解
今天小編就為大家分享一篇關(guān)于PHP PDOStatement::fetchObject講解,小編覺得內(nèi)容挺不錯(cuò)的,現(xiàn)在分享給大家,具有很好的參考價(jià)值,需要的朋友一起跟隨小編來看看吧2019-02-02
php for 循環(huán)語句使用方法詳細(xì)說明
for 循環(huán)是 PHP 中最復(fù)雜的循環(huán)結(jié)構(gòu)。它的行為和 C 語言的相似。在PHP中使用的是執(zhí)行相同的代碼集的次數(shù)2010-05-05
php學(xué)習(xí)之 循環(huán)結(jié)構(gòu)實(shí)現(xiàn)代碼
php學(xué)習(xí)之 循環(huán)結(jié)構(gòu)實(shí)現(xiàn)代碼,需要的朋友可以參考下。2011-06-06
利用PHP實(shí)現(xiàn)與ASP Banner組件相似的類
利用PHP實(shí)現(xiàn)與ASP Banner組件相似的類...2006-10-10

