0byt3m1n1
Path:
/
data
/
applications
/
aps
/
tikiwiki
/
7.0-0
/
standard
/
htdocs
/
lib
/
smarty_tiki
/
[
Home
]
File: function.quotabar.php
<?php // (c) Copyright 2002-2011 by authors of the Tiki Wiki CMS Groupware Project // // All Rights Reserved. See copyright.txt for details and a complete list of authors. // Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details. // $Id: function.quotabar.php 33195 2011-03-02 17:43:40Z changi67 $ /* length: length in pixels of the bar (default 50) value: length in pixels to display at the left in red (if not set all length is display in red) */ function smarty_function_quotabar( $params, $smarty ) { extract($params, EXTR_SKIP); if (!isset($length)) { $length = 100; } if (!isset($value)) { $value = $length; } if (empty($value)) { $ret = "<img src='img/leftbarlight.gif' alt='<' /><img alt='-' src='img/mainbarlight.gif' height='14' width='$length' /><img src='img/rightbarlight.gif' alt='>' />"; } elseif ($value >= $length) { $ret = "<img src='img/leftbar.gif' alt='<' /><img alt='-' src='img/mainbar.gif' height='14' width='$length' /><img src='img/rightbar.gif' alt='>' />"; } else { $left = $length - $value; $ret = "<img src='img/leftbar.gif' alt='<' /><img alt='-' src='img/mainbar.gif' height='14' width='$value' /><img alt='-' src='img/mainbarlight.gif' height='14' width='$left' /><img src='img/rightbarlight.gif' alt='>' />"; } return $ret; }