[ Index ] |
|
Code source de b2evolution 2.1.0-beta |
1 <?php 2 /** 3 * This file implements the UI view for the browser hits summary. 4 * 5 * This file is part of the evoCore framework - {@link http://evocore.net/} 6 * See also {@link http://sourceforge.net/projects/evocms/}. 7 * 8 * @copyright (c)2003-2007 by Francois PLANQUE - {@link http://fplanque.net/} 9 * 10 * {@internal License choice 11 * - If you have received this file as part of a package, please find the license.txt file in 12 * the same folder or the closest folder above for complete license terms. 13 * - If you have received this file individually (e-g: from http://evocms.cvs.sourceforge.net/) 14 * then you must choose one of the following licenses before using the file: 15 * - GNU General Public License 2 (GPL) - http://www.opensource.org/licenses/gpl-license.php 16 * - Mozilla Public License 1.1 (MPL) - http://www.opensource.org/licenses/mozilla1.1.php 17 * }} 18 * 19 * {@internal Open Source relicensing agreement: 20 * }} 21 * 22 * @package admin 23 * 24 * @version $Id: _stats_view.funcs.php,v 1.1 2007/06/25 11:01:10 fplanque Exp $ 25 */ 26 if( !defined('EVO_MAIN_INIT') ) die( 'Please, do not access this page directly.' ); 27 28 /** 29 * Return a formatted percentage (should probably go to _misc.funcs) 30 */ 31 function percentage( $hit_count, $hit_total, $decimals = 1, $dec_point = '.' ) 32 { 33 return number_format( $hit_count * 100 / $hit_total, $decimals, $dec_point, '' ).' %'; 34 } 35 36 37 /** 38 * Helper function for "Requested URI" column 39 * @param integer Blog ID 40 * @param string Requested URI 41 * @return string 42 */ 43 function stats_format_req_URI( $hit_blog_ID, $hit_uri, $max_len = 40 ) 44 { 45 if( !empty( $hit_blog_ID ) ) 46 { 47 $BlogCache = & get_Cache( 'BlogCache' ); 48 $tmp_Blog = & $BlogCache->get_by_ID( $hit_blog_ID ); 49 $full_url = $tmp_Blog->get('baseurlroot').$hit_uri; 50 } 51 else 52 { 53 $full_url = $hit_uri; 54 } 55 56 if( strlen($hit_uri) > $max_len ) 57 { 58 $hit_uri = '...'.substr( $hit_uri, -$max_len ); 59 } 60 61 return '<a href="'.$full_url.'">'.$hit_uri.'</a>'; 62 } 63 64 65 /* 66 * $Log: _stats_view.funcs.php,v $ 67 * Revision 1.1 2007/06/25 11:01:10 fplanque 68 * MODULES (refactored MVC) 69 * 70 * Revision 1.2 2007/04/26 00:11:13 fplanque 71 * (c) 2007 72 * 73 * Revision 1.1 2007/03/20 09:53:26 fplanque 74 * Letting boggers view their own stats. 75 * + Letthing admins view the aggregate by default. 76 */ 77 ?>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Thu Nov 29 23:58:50 2007 | par Balluche grâce à PHPXref 0.7 |
![]() |