public function gen_show_html() { if ($this->value == "") { return '尚未上传'; } return '<a href="' . static_url('duploads/' . $this->value) . '" target="_blank">文件下载:' . $this->value . '</a>'; }
public function gen_show_html() { if ($this->value != "") { return '<img width="100%" src="' . static_url('uploads/' . $this->value) . '"/>'; } else { return '尚未上传'; } }
public function rewiteData(&$data) { if (isset($data['cover'])) { $data['cover'] = static_url($data['cover']); } else { for ($i = 0, $j = count($data); $i < $j; $i++) { $data[$i]['cover'] = static_url($data[$i]['cover']); } } }
public function gen_show_value() { $files = ""; foreach ($this->value as $value) { if ($value == "") { continue; } $files .= static_url($this->uploadDir . '/' . $value) . ';'; } return $files; }
public function index() { $this->load->model('samsung/movie_model', 'mMovie'); //$this->load->model('api/banner_model','mBanner'); /*$banners = $this->mBanner->getBanners(1,1); for($i=0,$j=sizeof($banners);$i<$j;$i++){ $banners[$i] = array( 'id'=>$banners[$i]['banner_id'], 'type'=>'web', 'title'=>$banners[$i]['title'], 'description'=>$banners[$i]['description'], 'icon'=>static_url($banners[$i]['cover']), 'nextTo'=>'web', 'url'=>$banners[$i]['link'] ); } */ $banners[] = array('id' => '1', 'type' => '', 'title' => '', 'description' => '', 'icon' => static_url('/img/samsung_banner_1080x540.jpg'), 'nextTo' => '', 'url' => ''); $item[] = array('id' => 1, 'type' => 'category', 'title' => 'PREMIUM (PAID)', 'description' => 'พบซีรี่ย์ดังจาก Holywood ที่เยอะที่สุด', 'icon' => static_url('/img/samsung-premium3.png'), 'nextTo' => 'contentGrid', 'url' => base_url('/samsung/movie/premium')); $item[] = array('id' => 2, 'type' => 'category', 'title' => 'SAMSUNG PRIVILEGE (FREE)', 'description' => 'ดูซีรี่ย์ดัง 2ตอนแรกฟรี', 'icon' => static_url('/img/samsung-free.png'), 'nextTo' => 'contentGrid', 'url' => base_url('/samsung/movie/free')); if ($this->geoip_lib->InfoIP($this->input->ip_address())) { if ($this->geoip_lib->result_country_code() != "TH") { $item = array(); $item[] = array('id' => 0, 'type' => 'category', 'title' => 'Available in thailand only', 'description' => '', 'icon' => '', 'nextTo' => '', 'url' => ''); } } else { $item = array(); $item[] = array('id' => 0, 'type' => 'category', 'title' => 'Available in thailand only', 'description' => '', 'icon' => '', 'nextTo' => '', 'url' => ''); } //$item = array(); //if($this->page==1){ //First page is hot movie //$movie = $this->mMovie->getMoviesHotFirst($this->page,$this->limit); //}else{ // $movie = $this->mMovie->getNotHotMovies($this->page,$this->limit); //} /* $countItem = $this->mMovie->getMovieCount(); $movie = $movie['items']; for($i=0,$j=sizeof($movie);$i<$j;$i++){ $item[] = array( 'id'=>$movie[$i]['movie_id'], 'type'=>'movie', 'title'=>($movie[$i]['is_hot']=='YES'?'[HOT]':'').$movie[$i]['title'], 'description'=>$movie[$i]['summary'], 'icon'=>static_url($movie[$i]['cover']), 'nextTo'=>($movie[$i]['is_series']=='YES')?'ContentGrid':'movieDetail', 'url'=>samsung_api_url('/movie/'.$movie[$i]['movie_id']) ); } */ $data = array('item' => &$item); $this->response($data); }
public function gen_show_html() { $_html = '<ul class="list-group">'; foreach ($this->value as $key => $value) { $_html .= '<li class="list-group-item">'; $_html .= $this->names[$key] . ':'; if ($value == "") { $_html .= " - "; } else { $_html .= "<img src='" . static_url($value) . "' width='200px'/>"; } $_html .= '</li>'; } $_html .= "</ul>"; return $_html; }
function wrong_url_redirect($url) { /** * Wrong URL Redirect * * Redirects the request to proper URL * * Arguments ( $url ) * ------------------------------------- * * $url -> Requested URL * **/ $qurrey = mysql_query("select * from data where LOWER(LINK)='{$url}'"); $data = mysql_fetch_array($qurrey); $location = "Location:" . static_url('main', 1) . $data['LINK']; header('HTTP/1.1 301 Moved Permanently'); header($location); }
function wrong_category_redirect($url) { /** * Wrong URL redirect * * Redirects the traffic to Proper URL * * Arguments ( $url ) * ------------------------------------- * * $article_url -> URL to be inspected * **/ $url = strtolower($url); $qurrey = mysql_query("select * from categories where LOWER(URL)='{$url}'"); $row = mysql_fetch_array($qurrey); $location = "Location:" . static_url('main', 1) . $row['URL']; header('HTTP/1.1 301 Moved Permanently'); header($location); }
function main_search_box($q) { /** * Main search * * Prints the FUll width search box * **/ if ($GLOBALS['search'] == false) { ?> <div id="search-container"> <div class="inner-container"> <div class="row"> <div class="column-small-11 center"> <div class="top-search"> <form action="<?php echo static_url('main') . "/search.php"; ?> " class="search"> <div class="row"> <div class="column-xsmall-10 padd0"><input type="search" class="search-box" name="q" placeholder="<?php if ($q != false) { echo $q; } else { echo "Type to seach"; } ?> " ></div> <div class="column-xsmall-2 padd0-xsmall"><input type="submit" value="search" class="search-button"></div> </div> </form> </div> </div> </div> </div> </div><!-- end of id="search-container" --> <?php $GLOBALS['search'] = true; } }
?> <img alt="<?php echo $movie['title_en']; ?> " src="<?php echo static_url($movie['cover']); ?> "> <?php } else { ?> <img alt="<?php echo $movie['title_en']; ?> " class="lazy" src="img/blank.gif" data-src="<?php echo static_url($movie['cover']); ?> "> <?php } ?> <h3><?php echo $movie['title']; ?> </h3> <?php if ($movie['is_soon'] == 'YES') { ?> <span class="type soon">coming soon</span> <?php
"></script> <script src="<?php echo static_url('/js/jquery.mousewheel-3.0.6.pack.js'); ?> "></script> <!--<script src="<?php echo static_url('/js/jquery.fancybox.js?v=2.1.5'); ?> "></script>--> <script src="<?php echo static_url('/js/perfect-scrollbar.js'); ?> "></script> <script src="<?php echo static_url('/js/jquery.lazy.1.9.min.js'); ?> "></script> <script> /* Header scroll */ $(document).ready(function(){ var headerSmallHeight = 140; $(window).scroll(function(){ st = $(this).scrollTop(); if(st>headerSmallHeight){ $('#header').addClass('small'); }else{ $('#header').removeClass('small'); } });
<link rel="stylesheet" href="<?php echo static_url('theme/admin/css/password.css'); ?> " /> <?php echo ace_header('用户', $item->agentid); echo ace_form_open('', '', array('id' => $item->agentid)); $options = array('label_text' => '代理账号', 'datatype' => '*', 'nullmsg' => "请输入代理账号!", 'errormsg' => "请输入代理账号", 'help' => '代理登录后台的账号'); echo ace_input_m($options, 'agentid', $item->agentid, 'maxlength="45" disabled="disabled"'); $options = array('label_text' => '代理全称', 'datatype' => '*', 'help' => '代理全称'); echo ace_input_m($options, 'agentname', $item->agentname, 'maxlength="45" disabled="disabled"'); $options = array('label_text' => '代理简称', 'datatype' => '*', 'help' => '代理简称'); echo ace_input_m($options, 'shortname', $item->shortname, 'maxlength="45" disabled="disabled"'); $options = array('label_text' => '手机号', 'datatype' => '*11-11', 'nullmsg' => "请输入手机号!", 'errormsg' => "请输入手机号", 'help' => '代理联系人手机号'); echo ace_input_m($options, 'mobilenum', $item->mobilenum, 'maxlength="11" disabled="disabled"'); $options = array('label_text' => '联系人', 'datatype' => '*1-15', 'nullmsg' => "请输入联系人!", 'errormsg' => "请输入联系人", 'help' => '联系人'); echo ace_input_m($options, 'contact', $item->contact, 'maxlength="15" disabled="disabled"'); $options = array('label_text' => 'QQ', 'help' => '代理联系人的QQ'); // echo ace_input_m($options,'qq',$item->qq,'maxlength="45" disabled="disabled"'); ?> <div class="clearfix form-actions"> <div class="col-md-offset-3 col-md-9"> <a href="<?php echo base_url('agent/agent'); ?> " class="btn btn-info"> <i class="icon-list"></i>返回列表 </a> </div> </div>
<h6>For those who make websites.</h6> <a href="<?php static_url('main'); ?> Web-Design" class="details-link">all work</a> </div> </div> </li> <li> <div class="row"> <div class="column-xxsmall-3 sections-list-icon"><i class="fa fa-html5"></i></div> <div class="column-xxsmall-9 sections-list-description"> <h3 class="post-list-title">Web Development</h3> <h6>For those who code the web.</h6> <a href="<?php static_url('main'); ?> Web-Development" class="details-link">all work</a> </div> </div> </li> </ul> </div> <div class="column-small-8 padd0"> <h3 class="section-heading"><i class="fa fa-eye"></i> Most Read</h3> <div class="row"> <div class="column-xsmall-7 most-read-post"> <ul class="sections-list"> <li><?php post_list(122, 2); ?>
<div class="panel panel-default"> <div class="panel-heading"> 文件名:<span id="file_name_<?php echo $key; ?> "><?php echo $value; ?> </span> </div> <div class="panel-body"> <?php if ($value != "") { ?> <a href="<?php echo static_url('duploads/' . $value); ?> " target="_blank">文件下载:<?php echo $value; ?> </a> <div> *注意!!新文件上传将替换旧有文件! </div> <?php } ?> </div> <div class="panel-footer"> <a href="javascript:void(0);" class="btn btn-danger ajax_input_holder"> <span class="glyphicon glyphicon-paperclip"></span> 上传
public function export_peijian_use($store = 'all', $from = '', $to = '') { $this->store = $store; $this->from = $from; $this->to = $to; $this->load_org_info(); $this->load->model('lists/Org_list', "allOrgList"); $this->allOrgList->load_data(); $storeName = '全部'; if ($store != 'all' && isset($this->allOrgList->record_list[$store])) { $storeName = $this->allOrgList->record_list[$store]->field_list['name']->value; } $this->load->model('lists/Peijianflow_list', "listInfo"); $this->listInfo->is_only_brief_fields = true; if ($this->store != '' || $from != '' || $to != '') { if ($this->store != 'all') { $this->listInfo->add_where(WHERE_TYPE_WHERE, 'orgId', $this->store); } if ($from != '') { $beginTS = $this->utility->getTSFromDateString($from); $this->listInfo->add_where(WHERE_TYPE_WHERE_GTE, 'beginTS', $beginTS); } if ($to != '') { $endTS = $this->utility->getTSFromDateString($to) + 86400 - 1; $this->listInfo->add_where(WHERE_TYPE_WHERE_LT, 'beginTS', $endTS); } } /* $this->field_list['typ']->setEnum(array(0=>'其他', 1=>"入库", 2=>"出库", 3=>"快速入库", 5=>"出库回库", 6=>"退货", )); */ $this->listInfo->add_where(WHERE_TYPE_IN, 'typ', array(0, 2, 5)); $this->listInfo->load_data_with_where(); $this->templateFile = "template_peijianxiaohao.xlsx"; $this->exportFilePrefix = "配件流水-消耗-" . $storeName . '-'; $fileName = BASEPATH . "../wwwroot/templates/" . $this->templateFile; $exportName = "exports/" . $this->exportFilePrefix . date('Y') . "-" . date('m') . "-" . date('d') . '-' . substr(md5(time()), 2, 6) . '.xlsx'; $exportFileName = BASEPATH . "../wwwroot/misc/" . $exportName; $this->load->library("excel"); $this->excel->init($fileName); $objWorksheet = $this->excel->excel->getActiveSheet(); // 汽车品牌 类别 配件名称 品牌 标识 型号 保修 卖价 是否常用件 进价 $title = $this->exportFilePrefix . date('Y') . "-" . date('m') . "-" . date('d') . ' 时间区间:' . $from . '-' . $to; $objWorksheet->getCell('A1')->setValue($title); $i = 3; foreach ($this->listInfo->record_list as $this_record) { //'bookShowId','peijianId','peijiantyp','peijianming','orgId','beginTS','typ','counter','chengben','uid' //门店 配件数据库ID 配件类型 配件名 数量 时间 操作人 行为 成本 订单号 $objWorksheet->getCell('A' . $i)->setValue($this_record->field_list['orgId']->gen_show_value()); $objWorksheet->getCell('B' . $i)->setValue($this_record->field_list['peijianId']->gen_show_value()); $objWorksheet->getCell('C' . $i)->setValue($this_record->field_list['peijiantyp']->gen_show_value()); $objWorksheet->getCell('D' . $i)->setValue($this_record->field_list['peijianming']->gen_show_value()); $objWorksheet->getCell('E' . $i)->setValue($this_record->field_list['counter']->gen_show_value()); $objWorksheet->getCell('F' . $i)->setValue($this_record->field_list['beginTS']->gen_show_html()); $objWorksheet->getCell('G' . $i)->setValue($this_record->field_list['uid']->gen_show_value()); $objWorksheet->getCell('H' . $i)->setValue($this_record->field_list['typ']->gen_show_value()); $objWorksheet->getCell('I' . $i)->setValue($this_record->field_list['chengben']->gen_show_value()); $objWorksheet->getCell('J' . $i)->setValue($this_record->field_list['bookShowId']->gen_show_value()); $i++; } $objWriter = $this->excel->initWriter(); $objWriter->save($exportFileName); header('Location: ' . static_url($exportName)); }
"></script> <!-- 自动补全输入框 js --> <script src="<?php echo static_url('theme/ace/js/typeahead-bs2.min.js'); ?> "></script> <!-- page specific plugin scripts --> <script src="<?php echo static_url('theme/ace/js/jquery-ui-1.10.3.custom.min.js'); ?> "></script> <script src="<?php echo static_url('theme/ace/js/jquery.ui.touch-punch.min.js'); ?> "></script> <!-- ace scripts --> <script src="<?php echo static_url('theme/ace/js/ace-elements.min.js'); ?> "></script> <script src="<?php echo static_url('theme/ace/js/ace.min.js'); ?> "></script> <!-- inline scripts related to this page --> </body> </html>
</td> </tr> <script type="text/javascript" src="<?php echo static_url('markitup/jquery.markitup.js'); ?> "></script> <script type="text/javascript" src="<?php echo static_url('markitup/sets/html/set.js'); ?> "></script> <link rel="stylesheet" type="text/css" href="<?php echo static_url('markitup/skins/simple/style.css'); ?> " /> <link rel="stylesheet" type="text/css" href="<?php echo static_url('markitup/sets/html/style.css'); ?> " /> <script language="javascript"> $(document).ready(function() { $('#original').markItUp(mySettings); }); </script> <tr> <td>Картинка к обзору:</td> <td><input name="preview" type="file" class="size90p" /></td> </tr>
echo $maxsize; ?> MB</span> <ul id="upload-attach-data" class="clearfix"> </ul> </div> </td> </tr> <tr> <th> </th> <td> <input type="button" value="立即发布" id="posted" class="input-item-submit btn btn-default btn-xs" /> <input type="button" value="暂存草稿" id="drafted" class="input-item-button btn btn-default btn-xs" /> <input type="button" value="返回" class="input-item-button btn btn-default btn-xs" onClick="history.back()" /> <input type="hidden" id="draftid" name="draftid" value="0" /> <img src="<?php echo static_url('images/ajaxing.gif'); ?> " class="ajax-load-wait hide" title="loading..." /> <span class="ajax-save-draft hide"></span> </td> </tr> </table> </form> </div> <?php $this->load->view('admin_menu'); ?>
<p class="title"> <a href="<?php echo site_url('article/' . $v->aid); ?> " title="<?php echo $v->title; ?> " target="_blank"><?php echo substring($v->title, 46); ?> </a> <?php if ($v->image == 1) { ?> <img src="<?php echo static_url('images/image.png'); ?> " class="image" title="有图有真相" /> <?php } ?> </p> <p class="author">由 <a href="javascript:;"><?php echo $this->plus->get_username_by_uid($v->uid); ?> </a> 发布于 <?php echo date('Y/m/d', $v->created); ?> ,被阅读 <?php echo $v->views; ?>
function soundTha(){ jwplayer().getPlugin("dock").setButton("sound",soundEng,'<?php echo static_url('/img/soundTha.png'); ?> ','<?php echo static_url('/img/soundTha.png'); ?> '); var position = jwplayer().getPosition(); var playlist = jwplayer().getPlaylist()[0]; playlist.file = playlist.file.replace('th','en'); jwplayer().load(playlist).seek(position); console.log(jwplayer().getPlaylist()); } function soundEng(){ jwplayer().getPlugin("dock").setButton("sound",soundTha,'<?php echo static_url('/img/soundEng.png'); ?> ','<?php echo static_url('/img/soundEng.png'); ?> '); var position = jwplayer().getPosition(); var playlist = jwplayer().getPlaylist()[0]; playlist.file = playlist.file.replace('en','th'); jwplayer().load(playlist).seek(position); console.log(jwplayer().getPlaylist()); } </script> </body> </html>
"></script> <!-- The File Upload validation plugin --> <script src="<?php echo static_url('theme/common/jqueryUpload/js/jquery.fileupload-validate.js'); ?> "></script> <!-- The File Upload user interface plugin --> <script src="<?php echo static_url('theme/common/jqueryUpload/js/jquery.fileupload-ui.js'); ?> "></script> <!-- The XDomainRequest Transport is included for cross-domain file deletion for IE 8 and IE 9 --> <!--[if (gte IE 8)&(lt IE 10)]> <script src="<?php echo static_url('theme/common/jqueryUpload/js/cors/jquery.xdr-transport.js'); ?> "></script> <![endif]--> <script> $(function () { 'use strict'; // Initialize the jQuery File Upload widget: $('#fileupload').fileupload({ // Uncomment the following to send cross-domain cookies: //xhrFields: {withCredentials: true}, url: '/admin/upload/index/upload_image/<?php echo $dir; ?> ',
echo base_url('/member/favorite'); ?> " title="ดูทั้งหมด">ดูทั้งหมด</a></p>--> </li> </ul> </section> <?php } ?> <div class="bar"> <div class="container"> <h2 class="ft-logo"><a href="<?php echo home_url(); ?> " title="DooneeTV"><img src="<?php echo static_url('/img/logo.png'); ?> " alt="Doonee TV" /></a></h2> <nav> <span class="copy"><b class="txt-red">DooneeTV</b> © 2014</span> | <a href="<?php echo base_url('/conditions'); ?> " title="ข้อกำหนดและเงื่อนไข">ข้อกำหนดและเงื่อนไข</a> | <a href="<?php echo base_url('/privacy'); ?> " title="นโยบายความเป็นส่วนตัว">นโยบายความเป็นส่วนตัว</a> | <a href="<?php echo base_url('/contactus'); ?>
?> '>"+"<"+"/script>"); </script> <![endif]--> <!-- inline scripts related to this page --> <script src="<?php echo static_url('theme/admin/js/admin.js'); ?> "></script> <script src="<?php echo static_url('theme/common/layer/layer.min.js'); ?> "></script> <script src="<?php echo static_url('theme/common/common.js'); ?> "></script> <script type="text/javascript"> if (self != top) { top.window.location = window.location; } function show_box(id) { jQuery('.widget-box.visible').removeClass('visible'); jQuery('#'+id).addClass('visible'); } var img_list = [];
public function episode($type = '', $lang = '', $quality = '', $movieID = '') { if (empty($type) || empty($movieID) || empty($lang)) { redirect(samsung_api_url('')); } $movie = $this->mMovie->getMovie($movieID); $this->head['title'] = "เลือกตอน"; $this->head['text'] = $movie['title'] . ' ' . strtoupper($lang); $series = array(); if ($type == 'free') { $episodes = $this->mMovie->getMovieEpisode($movieID, 0, 2); } else { $episodes = $this->mMovie->getMovieEpisode($movieID, $this->page, $this->limit); } if ($quality == 'HD') { $screen = "720"; } else { $screen = "480"; } foreach ($episodes['items'] as $episode) { $hash = $this->videoUrlHash("/series/" . $episode['path'] . $lang . $screen); if (!isset($_GET['debug'])) { $hash['rawhash'] = ""; } $series[] = array('id' => $episode['movie_id'], 'type' => 'movie', 'title' => $episode['title'] . ' ' . ($lang == 'en' ? 'Eng' : 'Thai') . ' ' . $quality, 'description' => $movie['summary'], 'icon' => static_url($movie['cover']), 'nextTo' => 'playNow', 'url' => $this->config->item('samsung_cdn_url') . "series/" . $episode['path'] . $lang . $screen . "/" . $episode['path'] . $lang . $screen . ".m3u8" . $hash['hash'], 'rawhash' => $hash['rawhash']); //series/7c64132d62480.m3u8 //str_replace(array('vods','mp4:','rtmp'),array('vod','','rtsp'),series_stream_url($episode['path'],'480',$lang)) } $data = array(); if ($type != 'free') { $purchase = $this->isPurchased($movie['movie_id']); $data = $this->isPurchased($movie['movie_id']); } $data['item'] =& $series; if ($type == 'free') { $data['total'] = count($episodes['items']); } else { $data['total'] = $episodes['pageing']['allItem']; } $this->response($data); }
" title="ข่าว/โปรโมชั่น">ข่าว/<span class="txt-red">โปรโมชั่น</span> <i class="icon-double-angle-right"></i></a></h2> <?php } else { ?> <h2 class="big"><a href="<?php echo base_url('/' . $this->uri->segment(1)); ?> " title="วิธีการรับชม">ข่าว/<span class="txt-red">วิธีการรับชม</span></a></h2> <?php } ?> <div id="toc" class="mask-col"> <article class="contents-auto reader"> <figure><img src="<?php echo static_url($article['cover']); ?> " alt=""><figcaption class="hid"><?php echo $article['title']; ?> </figcaption></figure> <h1><?php echo $article['title']; ?> </h1> <?php echo nl2br($article['description']); ?> </article> <!-- <aside id="aside" class="aside">
function less_include() { global $bbb; return isset($bbb->config['javascript']['less']) ? "<script src='" . static_url($bbb->config['javascript']['less']) . "'></script>" : null; }
<article> <a title="<?php echo $relate['title']; ?> " <?php echo $popup; ?> href="<?php echo base_url('/movie/' . $relate['movie_id']); ?> "> <img alt="<?php echo $relate['title_en']; ?> " src="<?php echo static_url($relate['cover']); ?> "> <h3><?php echo $relate['title']; ?> </h3> <?php if ($relate['is_soon'] == 'YES') { ?> <span class="type soon">coming soon</span> <?php } elseif ($relate['is_free'] == 'YES') { ?> <span class="type free">Free</span> <?php
<?php include_once 'common/header.php'; echo link_tag(static_url('css/login2.css')); ?> <body class="<?php echo $this->pageClass; ?> "> <div class="container-fluid"> <div class="row"> <div class="col-lg-4 col-md-4 col-sm-3 col-xs-12"></div> <div class="col-lg-4 col-md-4 col-sm-6 col-xs-12"><div class="logo"> <a href="<?php echo site_url(); ?> "> 后台登录 </a> </div></div> <div class="col-lg-4 col-md-4 col-sm-3 col-xs-12"></div> </div> <div class="row"> <div class="col-lg-4 col-md-4 col-sm-3 col-xs-12"></div> <div class="col-lg-4 col-md-4 col-sm-6 col-xs-12 login_contents"> <?php echo $contents; ?> </div> <div class="col-lg-4 col-md-4 col-sm-3 col-xs-12"></div> </div>
echo third_party_url("bootstrap/js/html5shiv.min.js?v=" . STATIC_CONTENT_VERSION); ?> "></script> <script type="text/javascript" src="<?php echo third_party_url("bootstrap/js/respond.min.js?v=" . STATIC_CONTENT_VERSION); ?> "></script> <![endif]--> <script> var $BASE_URL = "<?php echo base_url(); ?> "; var $STATIC_URL = "<?php echo static_url(); ?> "; var $IMAGES_PATH = "<?php echo images_url(); ?> "; var $TOKEN_ID = "<?php echo csrf_token_id(); ?> "; var $TOKEN = "<?php echo csrf_token(); ?> "; var $TOKEN_URL_QSTRING = "<?php
function print_news_static_page($content, $symbol = 'fck_pageindex') { $page_count = get_fck_page_count($content); if ($page_count <= 1) { return; } $page_index = intval($_REQUEST[$symbol]); $page_index = $page_index >= 1 ? $page_index : 1; $page_prev = $page_index - 1; $page_next = $page_index + 1; if ($_GET['page_type'] != 'static') { function static_url($index) { $url = $_SERVER['PHP_SELF']; $pattern = '/(.+)\\/page\\/(\\d+)/'; if (preg_match($pattern, $url)) { $url = preg_replace($pattern, '$1', $url); } return $url . "/page/{$index}"; } } else { function static_url($index) { global $news; return get_news_url($news, 'static', $index); } } $page_str = ""; if ($page_prev <= 0) { $page_str .= "<span class='paginate_botton'>上页</span>"; } else { $url = static_url($page_prev); $page_str .= "<span class='paginate_botton'><a href='{$url}'>上页</a></span>"; } for ($i = 1; $i <= $page_count; $i++) { $url = static_url($i); $page_str .= "<span class='page_span"; if ($i == $page_index) { $page_str .= "2"; } $page_str .= "'><a href='{$url}'>{$i}</a></span>"; } if ($page_next > $page_count) { $page_str .= "<span class='paginate_botton'>下页</span>"; } else { $url = static_url($page_next); $page_str .= "<span class='paginate_botton'><a href='{$url}'>下页</a></span>"; } echo $page_str; }