function pratiche_element_1() { if (check_perm_mod("pratiche", "r") == 1) { $thislist = load_fwobject("lists", "pratiche", 1); //print_r ($thislist); $output = draw_list($thislist, "pratiche"); return $output; } else { return ""; } }
function render_submenu($level, $menu, $module) { global $CONF, $CUR_TEMPLATE, $MODULES, $MENU, $point; if (check_perm_mod($module, $menu[perm]) == 1 && isset($menu[perm]) || !isset($menu[perm])) { foreach ($menu as $k => $v2) { if (is_int($k)) { $string_menu2 .= render_submenu($level + 1, $v2, $module); } } $string_menu = $point[$level] . "|" . $menu[title] . "|" . $menu[page] . "||" . $menu[icon] . "\n" . $string_menu2; } return $string_menu; }
function contact_element_1($link_type = 0) { if (check_perm_mod("contact", "r") == 1) { $thissearch = load_fwobject("search", "contact", 1); $output = draw_form($thissearch[form]); if ($_GET[form_id] == $thissearch[form][name]) { $output .= menage_search($thissearch[search]); } return $output; } else { return ""; } }
function calendar_element_2() { if ($_GET[scad_type] == 1) { $list_type = 5; } elseif ($_GET[scad_type] == 2) { $list_type = 4; } else { $list_type = 2; } if (check_perm_mod("calendar", "r") == 1) { $thislist = load_fwobject("lists", "calendar", $list_type); //print_r ($thislist); $output = draw_list($thislist, "calendar"); return $output; } else { return ""; } }
} } } } $res_del[title] = FW_DEL_OK; print draw_response($res_del); } else { $res_del[title] = FW_DEL_KO; print draw_response($res_del); } } else { $res_del[title] = FW_ERROR_NO_PERM_DEL; print draw_response($res_del); } } if (check_perm_mod($module, "r") == 1) { $thissearch = load_fwobject("search", "document", 0); //Check for parent Perm $perm_parent = perm_sql_read("%[PERM]%", "pratiche"); $perm_parent = str_replace("permessi", "p.permessi", $perm_parent); $perm_parent = str_replace("id", "p.id", $perm_parent); $true_sql = "SELECT m.* FROM document m, pratiche p WHERE {$perm_parent} AND p.id=m.ref_id "; //Dati della pratica $qP = "SELECT * FROM pratiche WHERE Id = " . $_GET[ref_prat][realval][0]; $rsP = $DB->Execute($qP); $ThisPrat = $rsP->FetchRow(); $p = $ThisPrat[pr_ref_idcliente]; $titPrat = $ThisPrat[pr_codice]; //Dati del contatto $qC = "SELECT * FROM contact WHERE Id = " . $p; $rsC = $DB->Execute($qC);
$thisform[Fields][pr_data_mod][content] = "hidden||" . date(Y - m - d) . "||"; $response[title] = PRATICHE_UPD_DONE; $response[text] = PRATICHE_UPD_DONE_TXT . "<br><br>" . make_button("pratiche_view.php", PRATICHE_BACK_LIST); $thisform[onpost] = str_replace("type::add", "type::upd", $thisform[onpost]); $thisform[Fields][send][content] = "submit||" . PRATICHE_UPD . "||"; } else { $response[title] = FW_ERROR_NO_PERM; $response[text] = FW_ERROR_NO_PERM_TXT; $iserror = 1; print draw_response($response); } } else { $PAGE[PAGE_INTITLE] = PRATICHE_ADD; $PAGE[TXT_TITLE] = PRATICHE_ADD; $ad = "add"; if (check_perm_mod($module, "c") == 1 && ($_SESSION[user][admin] == 1 || $_SESSION[user][pratiche_add] == 1)) { if ($_POST[form_id] == $thisform["name"]) { $result = $_POST; } else { $result[permessi] = "U" . $_SESSION[fw_userid] . "=66666"; } $thisform[Fields][pr_numero][content] = "hidden||" . get_first_prat() . "||"; $thisform[Fields][pr_data_ins][content] = "hidden||" . date("Y-m-d") . "||"; $thisform[Fields][pr_data_mod][content] = "hidden||" . date("Y-m-d") . "||"; $thisform[Fields][send][content] = "submit||" . PRATICHE_ADD . "||"; $response[title] = PRATICHE_ADD_DONE; $response[text] = PRATICHE_ADD_DONE_TXT . "<br><br>" . make_button("pratiche_view.php", PRATICHE_BACK_LIST); } else { $response[title] = FW_ERROR_NO_PERM; $response[text] = FW_ERROR_NO_PERM_TXT; $iserror = 1;