if($sid) { $tpl->param(SID => $sid); $tpl->param(SID_PARAM => "sid=$sid"); }