??織夢網(wǎng)站系統(tǒng)自帶的搜索頁面的分頁碼樣式,不太美觀,需要二次開發(fā)修改,才能達到美觀的效果,下面為全寶鑫技術(shù)員,講述一下怎樣修改。
上圖為原代碼顯示圖
需要修改的文件,include目錄下的
arc.searchview.class.php
查找
獲取動態(tài)的分頁列表
大約在809行
原代碼為:
/** * 獲取動態(tài)的分頁列表 * * @access public * @param string $list_len 列表寬度 * @return string */ function GetPageListDM($list_len) { global $oldkeyword; $prepage=""; $nextpage=""; $prepagenum = $this->PageNo - 1; $nextpagenum = $this->PageNo + 1; if($list_len=="" || preg_match("/[^0-9]/", $list_len)) { $list_len=3; } $totalpage = ceil($this->TotalResult / $this->PageSize); if($totalpage<=1 && $this->TotalResult>0) { return "共1頁/".$this->TotalResult."條記錄"; } if($this->TotalResult == 0) { return "共0頁/".$this->TotalResult."條記錄"; } $purl = $this->GetCurUrl(); $oldkeyword = (empty($oldkeyword) ? $this->Keyword : $oldkeyword); //當結(jié)果超過限制時,重設(shè)結(jié)果頁數(shù) if($this->TotalResult > $this->SearchMaxRc) { $totalpage = ceil($this->SearchMaxRc/$this->PageSize); } $infos = "<td>共找到<b>".$this->TotalResult."</b>條記錄/最大顯示<b>{$totalpage}</b>頁 </td> "; $geturl = "keyword=".urlencode($oldkeyword)."&searchtype=".$this->SearchType; $hidenform = "<input type='hidden' name='keyword' value='".rawurldecode($oldkeyword)."'> "; $geturl .= "&channeltype=".$this->ChannelType."&orderby=".$this->OrderBy; $hidenform .= "<input type='hidden' name='channeltype' value='".$this->ChannelType."'> "; $hidenform .= "<input type='hidden' name='orderby' value='".$this->OrderBy."'> "; $geturl .= "&kwtype=".$this->KType."&pagesize=".$this->PageSize; $hidenform .= "<input type='hidden' name='kwtype' value='".$this->KType."'> "; $hidenform .= "<input type='hidden' name='pagesize' value='".$this->PageSize."'> "; $geturl .= "&typeid=".$this->TypeID."&TotalResult=".$this->TotalResult."&"; $hidenform .= "<input type='hidden' name='typeid' value='".$this->TypeID."'> "; $hidenform .= "<input type='hidden' name='TotalResult' value='".$this->TotalResult."'> "; $purl .= "?".$geturl; //獲得上一頁和下一頁的鏈接 if($this->PageNo != 1) { $prepage.="<td width='50'><a href='".$purl."PageNo=$prepagenum'>上一頁</a></td> "; $indexpage="<td width='30'><a href='".$purl."PageNo=1'>首頁</a></td> "; } else { $indexpage="<td width='30'>首頁</td> "; } if($this->PageNo!=$totalpage && $totalpage>1) { $nextpage.="<td width='50'><a href='".$purl."PageNo=$nextpagenum'>下一頁</a></td> "; $endpage="<td width='30'><a href='".$purl."PageNo=$totalpage'>末頁</a></td> "; } else { $endpage="<td width='30'>末頁</td> "; } //獲得數(shù)字鏈接 $listdd=""; $total_list = $list_len * 2 + 1; if($this->PageNo >= $total_list) { $j = $this->PageNo - $list_len; $total_list = $this->PageNo + $list_len; if($total_list > $totalpage) { $total_list = $totalpage; } } else { $j=1; if($total_list > $totalpage) { $total_list = $totalpage; } } for($j; $j<=$total_list; $j++) { if($j == $this->PageNo) { $listdd.= "<td>$j </td> "; } else { $listdd.="<td><a href='".$purl."PageNo=$j'>[".$j."]</a> </td> "; } } $plist = "<table border='0' cellpadding='0' cellspacing='0'> "; $plist .= "<tr align='center' style='font-size:10pt'> "; $plist .= "<form name='pagelist' action='".$this->GetCurUrl()."'>$hidenform"; $plist .= $infos; $plist .= $indexpage; $plist .= $prepage; $plist .= $listdd; $plist .= $nextpage; $plist .= $endpage; if($totalpage>$total_list) { $plist.="<td width='38'><input type='text' name='PageNo' style='width:28px;height:14px' value='".$this->PageNo."' /></td> "; $plist.="<td width='30'><input type='submit' name='plistgo' value='GO' style='width:30px;height:22px;font-size:9pt' /></td> "; } $plist .= "</form> </tr> </table> "; return $plist; }
修改為如下代碼:
/** * 獲取動態(tài)的分頁列表 * * @access public * @param string $list_len 列表寬度 * @return string */ function GetPageListDM($list_len) { global $oldkeyword; $prepage=""; $nextpage=""; $prepagenum = $this->PageNo - 1; $nextpagenum = $this->PageNo + 1; if($list_len=="" || preg_match("/[^0-9]/", $list_len)) { $list_len=3; } $totalpage = ceil($this->TotalResult / $this->PageSize); if($totalpage<=1 && $this->TotalResult>0) { return "共1頁/".$this->TotalResult."條記錄"; } if($this->TotalResult == 0) { return "共0頁/".$this->TotalResult."條記錄"; } $purl = $this->GetCurUrl(); $oldkeyword = (empty($oldkeyword) ? $this->Keyword : $oldkeyword); //當結(jié)果超過限制時,重設(shè)結(jié)果頁數(shù) if($this->TotalResult > $this->SearchMaxRc) { $totalpage = ceil($this->SearchMaxRc/$this->PageSize); } //$infos = "<td>共找到<b>".$this->TotalResult."</b>條記錄/最大顯示<b>{$totalpage}</b>頁 </td> "; $infos = "<b>共".$this->TotalResult."條記錄</b> "; $geturl = "keyword=".urlencode($oldkeyword)."&searchtype=".$this->SearchType; $hidenform = "<input type='hidden' name='keyword' value='".rawurldecode($oldkeyword)."'> "; $geturl .= "&channeltype=".$this->ChannelType."&orderby=".$this->OrderBy; $hidenform .= "<input type='hidden' name='channeltype' value='".$this->ChannelType."'> "; $hidenform .= "<input type='hidden' name='orderby' value='".$this->OrderBy."'> "; $geturl .= "&kwtype=".$this->KType."&pagesize=".$this->PageSize; $hidenform .= "<input type='hidden' name='kwtype' value='".$this->KType."'> "; $hidenform .= "<input type='hidden' name='pagesize' value='".$this->PageSize."'> "; $geturl .= "&typeid=".$this->TypeID."&TotalResult=".$this->TotalResult."&"; $hidenform .= "<input type='hidden' name='typeid' value='".$this->TypeID."'> "; $hidenform .= "<input type='hidden' name='TotalResult' value='".$this->TotalResult."'> "; $purl .= "?".$geturl; //獲得上一頁和下一頁的鏈接 if($this->PageNo != 1) { //$prepage.="<td width='50'><a href='".$purl."PageNo=$prepagenum'>上一頁</a></td> "; //$indexpage="<td width='30'><a href='".$purl."PageNo=1'>首頁</a></td> "; $prepage.="<a href='".$purl."PageNo=$prepagenum'>上一頁</a> "; $indexpage="<a href='".$purl."PageNo=1'>首頁</a> "; } else { //$indexpage="<td width='30'>首頁</td> "; $indexpage="<a>首頁</a> "; } if($this->PageNo!=$totalpage && $totalpage>1) { //$nextpage.="<td width='50'><a href='".$purl."PageNo=$nextpagenum'>下一頁</a></td> "; //$endpage="<td width='30'><a href='".$purl."PageNo=$totalpage'>末頁</a></td> "; $nextpage.="<a href='".$purl."PageNo=$nextpagenum'>下一頁</a> "; $endpage="<a href='".$purl."PageNo=$totalpage'>末頁</a> "; } else { //$endpage="<td width='30'>末頁</td> "; $endpage="<a>末頁</a "; } //獲得數(shù)字鏈接 $listdd=""; $total_list = $list_len * 2 + 1; if($this->PageNo >= $total_list) { $j = $this->PageNo - $list_len; $total_list = $this->PageNo + $list_len; if($total_list > $totalpage) { $total_list = $totalpage; } } else { $j=1; if($total_list > $totalpage) { $total_list = $totalpage; } } for($j; $j<=$total_list; $j++) { if($j == $this->PageNo) { //$listdd.= "<td>$j </td> "; $listdd.= "<a class='thisclass'>$j</a> "; } else { //$listdd.="<td><a href='".$purl."PageNo=$j'>[".$j."]</a> </td> ";[搜索頁分頁樣式] $listdd.="<a href='".$purl."PageNo=$j'>".$j."</a> "; } } $plist = "<table border='0' cellpadding='0' cellspacing='0'> "; $plist .= "<tr align='center' style='font-size:10pt'> "; $plist .= "<form name='pagelist' action='".$this->GetCurUrl()."'>$hidenform"; $plist .= $indexpage; $plist .= $prepage; $plist .= $listdd; $plist .= $nextpage; $plist .= $endpage; $plist .= $infos; if($totalpage>$total_list) { $plist.="<td width='38'><input type='text' name='PageNo' style='width:28px;height:14px' value='".$this->PageNo."' /></td> "; $plist.="<td width='30'><input type='submit' name='plistgo' value='GO' style='width:30px;height:22px;font-size:9pt' /></td> "; } $plist .= "</form> </tr> </table> "; return $plist; }
CSS 代碼如下:
/*搜索頁面頁碼top*/ #pageNum ,#pageNum b { font-size: 14px; padding: 25px 0; text-align: center } #pageNum a ,#pageNum b { text-decoration: none; padding: 8px 9px; border: 1px solid #ccc; background: #fff; color: #333; -webkit-transition: all linear .2s; -moz-transition: all linear .2s; -ms-transition: all linear .2s; transition: all linear .2s; margin-right:5px; } #pageNum a:hover,#pageNum a.thisclass { background: #1592E5; color: #fff; border: 1px solid #1592E5 } /*搜索頁面頁碼end*/
上圖為修改后的效果
1、按客戶要求訂制,專業(yè)技術(shù)員做到客戶滿意為止。
2、網(wǎng)頁欄目和網(wǎng)頁數(shù)不限,用戶可通過網(wǎng)站后臺增加和修改。
3、網(wǎng)站電腦版和移動版同時開發(fā),同一網(wǎng)址,電腦打開是電腦版網(wǎng)頁,手機打開自適應(yīng)手機版網(wǎng)頁。
4、網(wǎng)站美工和客戶相互配合,客戶提供產(chǎn)品相關(guān)的圖片資料,美工排版,上傳到網(wǎng)站。
5、網(wǎng)站搭建完成后,配網(wǎng)站操作說明書,和操作視頻教學。
6、配相關(guān)網(wǎng)站優(yōu)化排名資料,和網(wǎng)頁圖片處理軟件,管理操作資料推送給客戶。
7、根據(jù)搜索引擎規(guī)則編寫網(wǎng)站代碼,自然排名和競價排名,容易被搜索引擎收錄。
8、交一次搭建網(wǎng)站制作費用,獲得終身網(wǎng)站使用權(quán)。
1、從專業(yè)拍攝產(chǎn)品圖片;
2、到美工處理產(chǎn)品圖片;
3、到上傳產(chǎn)品資料圖片;
4、到網(wǎng)店旺鋪排版裝修;
5、到優(yōu)化管理網(wǎng)店旺鋪。
同時網(wǎng)店經(jīng)營商家只需要每天上班時間,按時登錄網(wǎng)店的在線客服溝通工具,等待與詢盤過來的客戶及時溝通,也就是開始等待接訂單。