1<?php 2// (c) Copyright by authors of the Tiki Wiki CMS Groupware Project 3// 4// All Rights Reserved. See copyright.txt for details and a complete list of authors. 5// Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details. 6// $Id$ 7 8//this script may only be included - so its better to die if called directly. 9if (strpos($_SERVER["SCRIPT_NAME"], basename(__FILE__)) !== false) { 10 header("location: index.php"); 11 exit; 12} 13 14/** 15 function norecords 16 17 Param list : 18 _colspan : How much column need to be covered 19 _text : text to display, bu default => No records found. 20*/ 21 22function smarty_function_norecords($params, $smarty) 23{ 24 $html = '<tr class="even">'; 25 if (is_int($params["_colspan"])) { 26 $html .= '<td colspan="' . $params["_colspan"] . '" class="norecords">'; 27 } else { 28 $html .= '<td class="norecords">'; 29 } 30 if (isset($params["_text"])) { 31 $html .= tra($params["_text"]); 32 } else { 33 $html .= tra("No records found."); 34 } 35 $html .= "</td></tr>"; 36 return $html; 37} 38