<?php
function smarty_block_mvc_link($params, $content, &$smarty)
{
if (isset($content)) {
$handler = $params["handler"];
$method = $params["method"];
$id = $params["id"];
$class = $params["class"];
$absolute = $params["absolute"];
$nohtml = $params["nohtml"];
$getBack = $params["getBack"];
if (empty($method)) $method="display";
$returnValue = "";
if ($nohtml != "1")
$returnValue .= "<a href=\"";
if ($absolute == 1)
$returnValue .= "http://".$_SERVER["HTTP_HOST"];
$returnValue .= dirname($_SERVER["SCRIPT_NAME"])."/index.php?handler=$handler&method=$method&id=$id";
//$returnValue .= "index.php?handler=$handler&method=$method&id=$id";
if ($getBack == 1)
$returnValue .= "&nextAction=".$smarty->get_template_vars('currentAction');
if ($nohtml != "1") {
$returnValue .= "\"";
if (!empty($class)) {
$returnValue .= " class=\"$class\"";
}
$returnValue .= ">$content</a>";
}
return $returnValue;
}
}
?>