Unable to find source-code formatter for language: php. Available languages are: actionscript, html, java, javascript, none, sql, xhtml, xml
<? /* +------------------------------------------------------------------------------ * Filename: class.js.php * Create Day: Tue Nov 30 00:41:06 GMT+08:00 2004 * @Author: xshArp@iZz Studio ( xsharp@justdn.com / http://www.justdn.org) * ============================================================================= * Attention: 禁止未经我们允许的任何个人或商业使用! * @copyright: iZz Studio 2000-2005 +------------------------------------------------------------------------------ */ // @version: $Id: class.js.php 1181 2006-07-25 09:48:39Z xsharp $ include_once(dirname(__FILE__)."/class.list.php"); class tag_js extends tag_list { function main() { $this->template_use = 'js_'; $this->news(); } function news() { // 标题长度 $len = ($this->tag_setting[len])?$this->tag_setting[len]:$this->inews_conf[list_len]; // 简介长度 $summary_len = ($this->tag_setting[summary_len])?$this->tag_setting[summary_len]:0; $rs = $this->build_result(); if($rs){ $rows = $rs->GetRows(); $i = 0; foreach ($rows as $val){ $i++; $val[no] = $i; $cols=($this->tag_setting[cols])?$this->tag_setting[cols]:1; if(($i%$cols)==0){ $val['TR'] = ' </tr><tr> '; $val['BR'] = ' <BR /> '; } $c_url = ($this->c_rows["".$val[c_id].""]['c_url'])?$this->c_rows["".$val[c_id].""]['c_url']:$this->inews_path->htdocs_url.$this->c_rows["".$data_arr[c_id].""]['path']; $file_name = build_file_name($val); $val['link'] = (strlen($val[refresh_url])>7)?$val[refresh_url]:$c_url.'/'.file_page::build_dir($this->c_rows["".$val[c_id].""],$val[datetime]).'/'.$file_name.'.'.$this->inews_conf['file_ext']; $date_format = ($this->tag_setting[date_format])?$this->tag_setting[date_format]:$this->inews_conf['date_js']; $val['date'] = date($date_format,$val['datetime']); // 当日新闻彩色显示 if($this->inews_conf[title_new_is_color] and (date('Y-m-d',$val['datetime']) == date('Y-m-d'))){ $val[style] = 'new_color'; }else{ $val[style] = 'new_normal'; } $val['c_url'] = $c_url; $val['c_title'] = $this->c_rows["".$val[c_id].""]['c_title']; $val['image_width'] = ($this->tag_setting['img_width'])?" width=\"".$this->tag_setting['img_width']."\" ":' '; $val['image_height'] = ($this->tag_setting['img_height'])?" height=\"".$this->tag_setting['img_height']."\" ":' '; if(trim($val[title4index]) == ''){ if($len > 0 && $len < strlen($val[title])){ $val[title4index] = csubstr($val[title],$len); }else{ $val[title4index] = $val[title]; } }else{ if($len > 0 && $len < strlen($val[title4index])){ $val[title4index] = csubstr($val[title4index],$len); } } if(substr($val[title4index],0,2) != '《' and !isset($this->tag_setting[no_space])){ $val[title4index] = ' '.$val[title4index]; } if($summary_len > 0){ $val[summary] = csubstr($val[summary],$summary_len); } if(strlen($val[color]) > 3){ $val[title4index] = "<font color=\"#".$val[color]."\">".$val[title4index]."</font>"; } $val[title] = htmlspecialchars($val[title]); // 输出成 Movie JS // if($this->tag_setting[output] == 'movie'){ // if(!isset($template_movie)){ // //$template_movie = clone($this->template); // $template_movie = $this->template; // $template_movie->copyright = false; // } // $template_movie->destroy(); // $template_movie->assign_block_vars('list',$val); // $movie_row = str_replace(array("\n","\t","\r","\""),array("","","","\\\""),$template_movie->quick_get_from_handle($this->template_use)); // $this->movie_rows[] = preg_replace('/title=(.*?)/','movie="1" title=$1',$movie_row);; // } $this->template->assign_block_vars('list',$val); } } // 输出成JS $output = $this->template->quick_get_from_handle($this->template_use); $this->scrollingString = $output; echo $output; } function topic() { $sql = "SELECT "; } } ?>