assign("gp_id", $gp_id); $smarty->assign("gp_nome", $gp_nome); $smarty->assign("gp_status", $gp_status); $smarty->assign("acaoUser", $acaoUser); $smarty->assign("formAction", FORM_SAVE); $smarty->assign("erro", $msgErro); GetTemplate($smarty, 'seguranca/grupos/gruposCadastro.tpl'); function GetGpValues($db = '') { if (!empty($db)) { $id = $_GET["id"]; $query = "select gp_id, gp_nome, gp_status from pbx_grupo where gp_id = $id"; $result = pg_query($db, $query); if ($result) $row = pg_fetch_array($result, $row); } $GLOBALS["gp_nome"] = mb_strtoupper(RemoveAcentos(empty($db) ? $_POST["gp_nome"] : $row["gp_nome"])); $GLOBALS["gp_status"] = empty($db) ? ($_POST["gp_status"] ? 1 : 0) : $row["gp_status"]; $GLOBALS["gp_id"] = empty($db) ? $_POST["gp_id"] : $row["gp_id"]; } ?>