function smarty_block_listTR($params, $content, &$smarty) { /* Create list style row(TR) parameter type(text,required): Can be either of "header" or "body" "header" creates a header style TR and "body" creates a body style TR parameter cycle_color(boolean,optional): if set to "TRUE", call getTRColor with true argument so new color is generated, only should be used with "body" type if type is "body" this arguments can be used too parameter hover_color(string,optional): new color that will be set when mouse is over TR parameter hover_location(string,optional): location of onClick attribute */ if (!is_null($content)) { if ($params["type"] == "header") { return "<tr class=\"List_Head\">" . $content . "</tr>"; } else { if ($params["type"] == "body") { $cycle_color = (isset($params["cycle_color"]) and $params["cycle_color"] == "TRUE") ? True : False; $color = getTRColor($cycle_color); $hover = ""; if (isset($params["hover_location"])) { $hover_color = isset($params["hover_color"]) ? $params["hover_color"] : "#FFAA00"; $hover = TRHover($hover_color, $params["hover_location"]); } return "<tr class=\"List_Row_{$color}Color\" {$hover}>" . $content . "</tr>"; } } } }
function smarty_block_layerTR($params, $content, &$smarty) { /* Create an Layer TR parameter cycle_color(boolean,optional): if set to "TRUE", call getTRColor with true argument so new color is generated, only should be used with "body" type */ if (!is_null($content)) { $cycle_color = (isset($params["cycle_color"]) and $params["cycle_color"] == "TRUE") ? True : False; $color = getTRColor($cycle_color, "layer_last_color"); return <<<END \t\t <tr class='Layer_Row_{$color}Color'> \t\t\t{$content} \t\t </tr> END; } }
function smarty_function_listTableBodyIcon($params, &$smarty) { /* return a string, an image that will show the action return an empty string if action argument is not valid parameter action(string,required): action that will be showed in header options: "add","delete","edit","view", "details", "active", "deactive", "kick", "clear" parameter close_tr(boolean,optional): optionally add an </tr> at the end. Useful when it's the last icon in row parameter cycle_color(boolean,optional): if set to "TRUE", call getTRColor with true argument so new color is generated */ $action = $params["action"]; if (!in_array($action, array("add", "delete", "edit", "view", "active", "deactive", "details", "kick", "clear"))) { return ""; } $cycle_color = (isset($params["cycle_color"]) and $params["cycle_color"] == "TRUE") ? TRUE : FALSE; $color = getTRColor($cycle_color); $link = "/IBSng/images/list/list_body_{$action}_{$color}.gif"; return <<<EOF <img border="0" src="{$link}" width="25" height="20" title="{$action}"> EOF; }
function smarty_block_userInfoTD($params, $content, &$smarty, &$repeat) { /* Create an userinfo style column. Also TR s are created when needed parameter comment(boolean,optional): if set to "TRUE", create a td suitable for comments, both "user_left" and "user_right" and "group" tds should have this flag set parameter type("string",required): can be one of "user_left" , "user_right" and "group" */ if (!is_null($content)) { $type = $params["type"]; if (isset($params["comment"]) and $params["comment"] == "TRUE") { if ($type == "user_left") { $color = getTRColor(TRUE); return <<<END \t<tr> \t\t<!-- Form Text Area userinfo --> \t\t<td class="Form_Content_Row_Left_textarea_userinfo" colspan="2" valign="Top"> \t\t<table border="0" width="100%" cellspacing="0" cellpadding="0"> \t\t\t<tr> \t\t\t\t<td class="Form_Content_Row_Begin"><img border="0" src="/IBSng/images/row/begin_of_row_{$color}.gif"></td> \t\t\t\t<td class="Form_Content_Row_Left_Textarea_Td_{$color}"><nobr>{$content}</nobr></td> \t\t\t\t<td class="Form_Content_Row_End"><img border="0" src="/IBSng/images/row/end_of_row_{$color}.gif"></td> \t\t\t</tr> \t\t</table> \t\t</td> \t\t END; } else { if ($type == "user_right") { $color = getTRColor(); return <<<END \t\t<td class="Form_Content_Row_Right_textarea_userinfo" colspan="2"> \t\t<table border="0" width="100%" cellspacing="0" cellpadding="0" height="100%"> \t\t\t\t \t\t\t<tr> \t\t\t\t<td class="Form_Content_Row_Textarea_corner"><img border="0" src="/IBSng/images/comment/top_left_of_comment_{$color}.gif"></td> \t\t\t\t<td class="Form_Content_Row_Top_textarea_line_{$color}"></td> \t\t\t\t<td class="Form_Content_Row_Textarea_corner"><img border="0" src="/IBSng/images/comment/top_right_of_comment_{$color}.gif"></td> \t\t\t\t<td width=1 rowspan=3><font style="font-size:8pt"> </font></td> \t\t\t</tr> \t\t\t</tr> \t\t\t<tr> \t\t\t\t<td colspan="3" class="Form_Content_Row_Right_textarea_td_{$color}" style="height: 100%"> \t\t\t\t{$content}</td> \t\t\t</tr> \t\t\t \t\t\t<tr> \t\t\t\t<td class="Form_Content_Row_Textarea_corner"><img border="0" src="/IBSng/images/comment/bottom_left_of_comment_{$color}.gif"></td> \t\t\t\t<td class="Form_Content_Row_Bottom_textarea_line_{$color}"> </td> \t\t\t\t<td class="Form_Content_Row_Textarea_corner"><img border="0" src="/IBSng/images/comment/bottom_right_of_comment_{$color}.gif"></td> \t\t\t</tr> \t\t\t\t \t\t</table> \t\t</td> END; } else { if ($type == "group") { $color = getTRColor(); return <<<END \t\t<td class="Form_Content_Row_Right_textarea_groupinfo" colspan="3"> \t\t\t<table border="0" width="100%" height="100%" cellspacing="0" cellpadding="0" > \t\t<tr> \t\t\t\t<td class="Form_Content_Row_Textarea_corner"><img border="0" src="/IBSng/images/comment/top_left_of_comment_{$color}.gif"></td> \t\t\t\t<td class="Form_Content_Row_Top_textarea_line_{$color}"></td> \t\t\t\t<td class="Form_Content_Row_Textarea_corner"><img border="0" src="/IBSng/images/comment/top_right_of_comment_{$color}.gif"></td> \t\t\t</tr> \t\t\t<tr> \t\t\t\t<td colspan="3" class="Form_Content_Row_Right_textarea_td_{$color}"><nobr>{$content}</td> \t\t\t</tr> \t\t\t<tr> \t\t\t<td class="Form_Content_Row_Textarea_corner"><img border="0" src="/IBSng/images/comment/bottom_left_of_comment_{$color}.gif"></td> \t\t\t<td class="Form_Content_Row_Bottom_textarea_line_{$color}"> </td> \t\t\t<td class="Form_Content_Row_Textarea_corner"><img border="0" src="/IBSng/images/comment/bottom_right_of_comment_{$color}.gif"></td> \t\t\t</tr> \t\t</table> \t\t<!-- End Form Text Area userinfo--> </td> \t</tr> <tr> \t\t<td colspan="7" class="Form_Content_Row_Space"></td> \t</tr> END; } } } } else { if ($type == "user_left") { $color = getTRColor(TRUE); return <<<END \t<tr> \t\t<td class="Form_Content_Row_Begin"><img border="0" src="/IBSng/images/row/begin_of_row_{$color}.gif"></td> \t\t<td class="Form_Content_Row_Left_userinfo_{$color}"><nobr>{$content}</nobr></td> END; } else { if ($type == "user_right") { $color = getTRColor(); return <<<END \t\t<td class="Form_Content_Row_Right_userinfo_{$color}">{$content}</td> \t\t<td class="Form_Content_Row_End"><img border="0" src="/IBSng/images/row/end_of_row_{$color}.gif"></td> \t\t<td class="Form_Content_Row_Begin"><img border="0" src="/IBSng/images/row/begin_of_row_{$color}.gif"></td> END; } else { if ($type == "group") { $color = getTRColor(); return <<<END \t\t<td class="Form_Content_Row_groupinfo_{$color}" align=center>{$content}</td> \t\t<td class="Form_Content_Row_End"><img border="0" src="/IBSng/images/row/end_of_row_{$color}.gif"></td> \t<tr> \t\t<td colspan="7" class="Form_Content_Row_Space"></td> \t</tr> END; } } } } } }
function smarty_block_addEditTD($params, $content, &$smarty, &$repeat) { /* Create an Add edit style column. Also TR s are created when needed parameter type("string",required): show td type, for 1 column table can be "left" and "right" and for 2 column tables can be "left1" "right1" "left2" "right2" parameter double(boolean,optional): if true, create a td suitable for double column tables all of "left1" "left2" "right1" "right2" td s should have this flag set parameter comment(boolean,optional): if true, create a td suitable for comments, both "left" and "right" tds should have this flag set parameter id("string",optional): set optional id tag of td WARNING XXX: not set for all type parameter err(string,optional) */ if (!is_null($content)) { if (in_array($params["type"], array("left", "left1", "left2")) and trim($content) != "") { $content .= " :"; } $ret = ""; $err_star_img_link = "<img src='/IBSng/images/msg/error.gif'> "; if (isset($params["err"]) and $smarty->is_assigned($params["err"]) and $smarty->get_assigned_value($params["err"]) == TRUE) { $err_star = $err_star_img_link; } else { $err_star = ""; } $id = isset($params["id"]) ? "id={$params["id"]}" : ""; if (isset($params["double"]) and $params["double"] == "TRUE" and isset($params["comment"]) and $params["comment"] == "TRUE") { if ($params["type"] == "left") { $color = getTRColor(TRUE); $ret = <<<END \t<tr> \t\t<!-- Form Text Area --> \t\t<td class="Form_Content_Row_Left_Textarea_2col" valign="top" colspan="2"> \t\t<table border="0" width="100%" cellspacing="0" cellpadding="0"> \t\t\t<tr> \t\t\t\t<td class="Form_Content_Row_Begin"><img border="0" src="/IBSng/images/row/begin_of_row_{$color}.gif"></td> \t\t\t\t<td class="Form_Content_Row_Left_textarea_td_{$color}">{$content}</td> \t\t\t\t<td class="Form_Content_Row_End"><img border="0" src="/IBSng/images/row/end_of_row_{$color}.gif"></td> \t\t\t</tr> \t\t</table> \t\t</td> END; } else { if ($params["type"] == "right") { $color = getTRColor(); $ret = <<<END \t\t<td colspan="7" class="Form_Content_Row_Right_Textarea_2col"> \t\t<table border="0" width="100%" cellspacing="0" cellpadding="0" > \t\t\t<tr> \t\t\t\t<td class="Form_Content_Row_Textarea_corner"><img border="0" src="/IBSng/images/comment/top_left_of_comment_{$color}.gif"></td> \t\t\t\t<td class="Form_Content_Row_Top_textarea_line_{$color}"></td> \t\t\t\t<td class="Form_Content_Row_Textarea_corner"><img border="0" src="/IBSng/images/comment/top_right_of_comment_{$color}.gif"></td> \t\t\t</tr> \t\t\t<tr> \t\t\t\t<td class="Form_Content_Row_Left_textarea_line_{$color}"> </td> \t\t\t\t<td class="Form_Content_Row_Right_textarea_td_{$color}">{$content}</td> \t\t\t\t<td class="Form_Content_Row_Right_textarea_line_{$color}"> </td> \t\t\t</tr> \t\t\t<tr> \t\t\t\t<td class="Form_Content_Row_Textarea_corner"><img border="0" src="/IBSng/images/comment/bottom_left_of_comment_{$color}.gif"></td> \t\t\t\t<td class="Form_Content_Row_Bottom_textarea_line_{$color}"> </td> \t\t\t\t<td class="Form_Content_Row_Textarea_corner"><img border="0" src="/IBSng/images/comment/bottom_right_of_comment_{$color}.gif"></td> \t\t\t</tr> \t\t</table> \t\t</td> \t\t<!-- End Form Text Area --> \t\t<tr> \t\t <td colspan="9" class="Form_Content_Row_Space"></td> \t\t</tr> END; } } } else { if (isset($params["double"]) and $params["double"] == "TRUE") { if ($params["type"] == "left1") { $color = getTRColor(TRUE); $ret = <<<END \t<tr> \t\t<td class="Form_Content_Row_Begin"><img border="0" src="/IBSng/images/row/begin_of_row_{$color}.gif"></td> \t\t<td class="Form_Content_Row_Left_2col_{$color}">{$err_star}{$content}</td> END; } else { if ($params["type"] == "right1") { $color = getTRColor(); $ret = <<<END \t\t<td class="Form_Content_Row_Right_2col_{$color}">{$content}</td> \t\t<td class="Form_Content_Row_End"><img border="0" src="/IBSng/images/row/end_of_row_{$color}.gif"></td> END; } else { if ($params["type"] == "left2") { $color = getTRColor(); $ret = <<<END \t\t<td class="Form_Content_Col_Space"> </td> \t\t \t\t<td class="Form_Content_Row_Begin"><img border="0" src="/IBSng/images/row/begin_of_row_{$color}.gif"></td> \t\t<td class="Form_Content_Row_Left_2col_{$color}">{$err_star} {$content}</td> END; } else { if ($params["type"] == "right2") { $color = getTRColor(); $ret = <<<END \t\t<td class="Form_Content_Row_Right_2col_{$color}">{$content}</td> \t\t<td class="Form_Content_Row_End"><img border="0" src="/IBSng/images/row/end_of_row_{$color}.gif"></td> \t\t \t</tr> \t\t<tr> \t\t <td colspan="9" class="Form_Content_Row_Space"></td> \t\t</tr> END; } } } } } else { if (isset($params["comment"]) and $params["comment"] == "TRUE") { if ($params["type"] == "left") { $color = getTRColor(TRUE); $ret = <<<END <tr> \t\t<!-- Form Text Area --> \t\t<td class="Form_Content_Row_Left_Textarea" valign="top" colspan="2"> \t\t<table border="0" width="100%" cellspacing="0" cellpadding="0"> \t\t\t<tr> \t\t\t\t<td class="Form_Content_Row_Begin"><img border="0" src="/IBSng/images/row/begin_of_row_{$color}.gif"></td> \t\t\t\t<td class="Form_Content_Row_Left_textarea_td_{$color}">{$content}</td> \t\t\t\t<td class="Form_Content_Row_End"><img border="0" src="/IBSng/images/row/end_of_row_{$color}.gif"></td> \t\t\t</tr> \t\t</table> \t\t</td> END; } else { $color = getTRColor(); $ret = <<<END \t\t<td colspan="2" class="Form_Content_Row_Right_Textarea"> \t\t<table border="0" width="100%" cellspacing="0" cellpadding="0" > \t\t\t<tr> \t\t\t\t<td class="Form_Content_Row_Textarea_corner"><img border="0" src="/IBSng/images/comment/top_left_of_comment_{$color}.gif"></td> \t\t\t\t<td class="Form_Content_Row_Top_textarea_line_{$color}"></td> \t\t\t\t<td class="Form_Content_Row_Textarea_corner"><img border="0" src="/IBSng/images/comment/top_right_of_comment_{$color}.gif"></td> \t\t\t</tr> \t\t\t<tr> \t\t\t\t<td class="Form_Content_Row_Left_textarea_line_{$color}"> </td> \t\t\t\t<td class="Form_Content_Row_Right_textarea_td_{$color}">{$content}</td> \t\t\t\t<td class="Form_Content_Row_Right_textarea_line_{$color}"> </td> \t\t\t</tr> \t\t\t<tr> \t\t\t\t<td class="Form_Content_Row_Textarea_corner"><img border="0" src="/IBSng/images/comment/bottom_left_of_comment_{$color}.gif"></td> \t\t\t\t<td class="Form_Content_Row_Bottom_textarea_line_{$color}"> </td> \t\t\t\t<td class="Form_Content_Row_Textarea_corner"><img border="0" src="/IBSng/images/comment/bottom_right_of_comment_{$color}.gif"></td> \t\t\t</tr> \t\t</table> \t\t</td> \t\t<!-- End Form Text Area --> \t\t<tr> \t\t<td colspan="4" class="Form_Content_Row_Space"></td> \t</tr> END; } } else { if ($params["type"] == "left") { $color = getTRColor(TRUE); $ret = <<<END \t<tr {$id}> \t\t<td class="Form_Content_Row_Begin"><img border="0" src="/IBSng/images/row/begin_of_row_{$color}.gif"></td> \t\t<td class="Form_Content_Row_Left_{$color}">{$err_star} {$content}</td> END; } else { $color = getTRColor(); $ret = <<<END \t\t<td class="Form_Content_Row_Right_{$color}">{$content}</td> \t\t<td class="Form_Content_Row_End"><img border="0" src="/IBSng/images/row/end_of_row_{$color}.gif"></td> \t</tr> \t<tr> \t\t<td colspan="4" class="Form_Content_Row_Space"></td> \t</tr> END; } } } } return $ret; } }