$content) { $template = str_replace("%" . $name . "%", $content, $template); } return $template; } else { die('Cannot find template file «' . $file . '».'); } } function shorten($str) { if (strlen($str) < 50) return $str; return substr($str, 0, 47) . '...'; } function table_body($array) { $html = ""; foreach ($array as $line) { $html .= "