freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

基于php技術(shù)的小型企業(yè)網(wǎng)站開(kāi)發(fā)畢業(yè)論文(編輯修改稿)

2025-07-21 03:58 本頁(yè)面
 

【文章內(nèi)容簡(jiǎn)介】 接退出程序執(zhí)行,這么做保證了文件的安全性, 文件中定義的。function multi($num, $perpage, $curpage, $mpurl, $page = 10) { $curpage = $curpage ? $curpage : 1。 $multipage = 39。39。 $mpurl .= strpos($mpurl, 39。?39。) ? 39。amp。amp。39。 : 39。?39。 $pages = 1。//總頁(yè)數(shù) if($num $perpage) { $offset = $page 1。 $pages = @ceil($num / $perpage)。 if($page $pages) { $from = 1。 $to = $pages。 } else { $from = $curpage $offset。 $to = $from + $page 1。 if($from 1) { $to = $page。//$curpage + 1 $from。 $from = 1。 if($to $from $page) { $to = $page。 } } elseif($to $pages) { $from = $pages $page + 1。 $to = $pages。 } } $curpage = $curpage = $pages ? $curpage : $pages。 $multipage = ($curpage 1 ? 39。lia href=39。.$mpurl.39。page=39。.($curpage 1).39。上一頁(yè)/a/li39。 : 39。39。). ($curpage $offset 1 amp。amp。 $pages $page ? 39。lia href=39。.$mpurl.39。page=1 class=first1/a/li39。 : 39。39。). ($curpage $page+1 ? 39。li class=point.../li39。 : 39。39。)。 for($i = $from。 $i = $to。 $i++) { $multipage .= $i == $curpage ? 39。li class=thisclassa39。.$i.39。/a/li39。 : 39。lia href=39。.$mpurl.39。page=39。.$i.39。39。.$i.39。/a/li39。 } $multipage .= ($curpage $pages1 ? 39。li class=point.../li39。 : 39。39。). ($to $pages ? 39。lia href=39。.$mpurl.39。page=39。.$pages.39。 class=last39。.$pages.39。/ali39。 : 39。39。). ($curpage $pages ? 39。lia href=39。.$mpurl.39。page=39。.($curpage + 1).39。下一頁(yè)/a?li39。 : 39。39。). ($pages $page ? 39。lia轉(zhuǎn)到:/a/liinput type=text name=custompage size=3 onkeydown=if(==13) {=\39。39。.$mpurl.39。page=\39。+。 return false。} /39。 : 39。39。)。 $multipage = $multipage ? 39。div class=pagesul class=pagelist39。.(39。lia共amp。nbsp。39。.$pages.39。amp。nbsp。頁(yè)/a/li39。).$multipage.39。/ul/div39。 : 39。39。 } return $multipage。} 這個(gè)分頁(yè)函數(shù)在使用的時(shí)候只需要傳給它4個(gè)值,分別是:數(shù)據(jù)總數(shù)、每頁(yè)顯示數(shù)、當(dāng)前頁(yè)數(shù)、url地址,此時(shí)這個(gè)函數(shù)會(huì)輸出一個(gè)分頁(yè)的html代碼,只用在程序中輸出就可以,樣式寫(xiě)在頁(yè)面所使用的樣式文件里。示例代碼如下:?php$allnum = 500。$perpage = 25。$curpage = (int)$_GET[39。page39。]。$php_self。$pages = multi($allnum, $perpage, $curpage, $php_self)。echo $pages。?以上幾行簡(jiǎn)單的代碼(css樣式文件省略)將可以產(chǎn)生一個(gè)如下圖所示的分頁(yè)。 分頁(yè)效果 數(shù)據(jù)庫(kù)類class DB_MySQL { var $querycount = 0。 ……// 連接數(shù)據(jù)庫(kù) function connect($dbhost, $dbuser, $dbpass, $dbname, $pconnect=0) { if($pconnect) { if(!@mysql_pconnect($dbhost, $dbuser, $dbpass)) { $thishalt(39。數(shù)據(jù)庫(kù)鏈接失敗39。)。 } } else { if(!@mysql_connect($dbhost, $dbuser, $dbpass)) { $thishalt(39。數(shù)據(jù)庫(kù)鏈接失敗39。)。 } } …… //定義 fetch_array 方法,此函數(shù)返回根據(jù)從結(jié)果集取得的行生成的數(shù)組,如果沒(méi)有返回FALSE function fetch_array($query, $result_type = MYSQL_ASSOC) { return mysql_fetch_array($query, $result_type)。 } //定義 query 方法,用于執(zhí)行一次 SQL 查詢 function query($sql, $type = 39。39。) { $func = $type == 39。UNBUFFERED39。 amp。amp。 @function_exists(39。mysql_unbuffered_query39。) ? 39。mysql_unbuffered_query39。 : 39。mysql_query39。 if(!($query = $func($sql)) amp。amp。 $type != 39。SILENT39。) { $thishalt(39。MySQL Query Error39。, $sql)。 } $thisquerycount++。 return $query。 } ...... //直接執(zhí)行一個(gè) SQL 語(yǔ)句,并返回結(jié)果 function fetch_one_array($query) { $result = $thisquery($query)。 $record = $thisfetch_array($result)。 return $record。 } // 返回結(jié)果集中行的數(shù)目 function num_rows($query) { $query = mysql_num_rows($query)。 return $query。 } ......}這個(gè)數(shù)據(jù)庫(kù)類對(duì)MySQL數(shù)據(jù)庫(kù)的一些方法做了簡(jiǎn)單的封裝,簡(jiǎn)化在程序中操作數(shù)據(jù)庫(kù)的過(guò)程,提高編碼效率。 驗(yàn)證碼類class captcha{ var $folder = 39。../images39。 var $img_type = 39。png39。 var $session_word = 39。code_word39。 …… // 生成圖片并輸出到瀏覽器 function generate_image($word = false) { if (!$word) { $word = $thisgenerate_word()。 } $thisrecord_word($word)。 $letters = strlen($word)。 mt_srand((double) microtime() * 1000000)。 if (function_exists(39。imagecreatefromjpeg39。) amp。amp。 ((imagetypes() amp。 IMG_JPG) 0)) { $theme = $thisthemes_jpg[mt_rand(1, count($thisthemes_jpg))]。 } else { $theme = $thisthemes_gif[mt_rand(1, count($thisthemes_gif))]。 } if (!file_exists($thisfolder . $theme[0])) { return false。 } else { $img_bg = (function_exists(39。imagecreatefromjpeg39。) amp。amp。 ((imagetypes() amp。 IMG_JPG) 0)) ? imagecreatefromjpeg($thisfolder . $theme[0]) : imagecreatefromgif($thisfolder . $theme[0])。 $bg_width = imagesx($img_bg)。 $bg_height = imagesy($img_bg)。 $img_org = ((function_exists(39。imagecreatetruecolor39。)) amp。amp。 PHP_VERSION = 39。39。) ? imagecreatetruecolor($thiswidth, $thisheight) : imagecreate($thiswidth, $thisheight)。 /* 將背景圖象復(fù)制原始圖象并調(diào)整大小 */ if (function_exists(39。imagecopyresampled39。) amp。amp。 PHP_VERSION = 39。39。) // GD { imagecopyresampled($img_org, $img_bg, 0, 0, 0, 0, $thiswidth, $thisheight, $bg_width, $bg_height)。 } else // GD { imagecopyresized($img_org, $img_bg, 0, 0, 0, 0, $thiswidth, $thisheight, $bg_width, $bg_height)。 } imagedestroy($img_bg)。 $clr = imagecolorallocate($img_org, $theme[1], $theme[2], $theme[3])。 $x = ($thiswidth (imagefontwidth(5) * $letters)) / 2。 $y = ($thisheight imagefontheight(5)) / 2。 imagestring($img_org, 5, $x, $y, $word, $clr)。 header(39。Expires: Thu, 01 Jan 1970 00:00:00 GMT39。)。 header(39。CacheControl: private, nostore, nocache, mustrevalidate39。)。 header(39。CacheControl: postcheck=0, precheck=0, maxage=039。, false)。 header(39。Pragma: nocache39。)。 if ($thisimg_type == 39。jpeg39。 amp。amp。 function_exists(39。imagecreatefromjpeg39。)) { header(39。Contenttype: image/jpeg39。)。 imageinterlace($img_org, 1)。 imagejpeg($img_org, false, 95)。
點(diǎn)擊復(fù)制文檔內(nèi)容
高考資料相關(guān)推薦
文庫(kù)吧 www.dybbs8.com
備案圖片鄂ICP備17016276號(hào)-1