[ Index ] |
|
Code source de phpMyVisites 2.3 |
1 <?php 2 function smarty_compiler_pmv_data_array($tag_attrs, &$compiler) 3 { 4 static $stack_rank = -1; 5 $output = ""; 6 if ($stack_rank < 0) 7 { 8 $stack_rank = 0; 9 $output = '$_tplvars_stack = array(); $_tplvars_stack_rank = '.$stack_rank.';'."\n"; 10 } 11 12 $_params = $compiler->_parse_attrs($tag_attrs); 13 14 $output .= "\n /*** pmv_data_array ***/ \n"; 15 $output .= '$_tplvars_stack_rank++;'."\n"; 16 17 // Save template context 18 $output .= ' $_tplvars_stack[$_tplvars_stack_rank] = $this->_tpl_vars; '."\n"; 19 20 $headline = null; 21 $img_path = null; 22 $xref = null; 23 $template_file = 'common/data_array.tpl'; 24 $data = array(); 25 26 if ( isset($_params['template']) ) 27 { 28 $template_file = $compiler->_dequote( $_params['template'] ); 29 } 30 31 // id used for interest or other limits/sorting/etc 32 if(!isset($_params['id'])) 33 { 34 $_params['id'] = "'int'"; 35 $id = "int"; 36 } 37 else 38 { 39 $id = $compiler->_dequote( $_params['id'] ); 40 } 41 42 43 foreach( $_params as $key => $varname) 44 { 45 $output .= "\$this->assign('{$key}', ".$varname.");\n"; 46 } 47 $output .= '?>'.$compiler->_compile_include_tag( "file='$template_file'" ); 48 49 // restore the real context 50 $output .= "\n".'<?php $this->_tpl_vars = $_tplvars_stack[$_tplvars_stack_rank]; unset($_tplvars_stack[$_tplvars_stack_rank]); '; 51 $output .= '$_tplvars_stack--;'."\n"; 52 return $output; 53 } 54 ?>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Mon Nov 26 14:10:01 2007 | par Balluche grâce à PHPXref 0.7 |
![]() |