DETECT_TABLE_COLUMN = $cur_menu_item . "_HIST_COLUMN"; $thiss->DETECT_TABLE_NAME = $cur_menu_item . "_HIST"; $thiss->DETECT_HIST_FUNCTION = $cur_menu_item . "_HIST"; $thiss->DETECT_EDIT_FUNCTION = $cur_menu_item . "_EDIT"; } else {// 'EDIT' or '' $thiss->DETECT_TABLE_COLUMN = $cur_menu_item . "_COLUMN"; $thiss->DETECT_TABLE_NAME = $cur_menu_item; $thiss->DETECT_HIST_FUNCTION = $cur_menu_item . "_HIST"; $thiss->DETECT_EDIT_FUNCTION = $cur_menu_item . "_EDIT"; } $found_thiss = true; } else { } } if (!$found_thiss) {// old way $found_thiss = true; if(($cur_menu == 'BILLINGS') || ($MENU_INIT=='BILLING_EDIT')) { $thiss->DETECT_TABLE_COLUMN="BILLING_COLUMN" ; $thiss->DETECT_TABLE_NAME="BILLING_LIST" ; $thiss->DETECT_HIST_FUNCTION="BILLING_LIST_HIST"; $thiss->DETECT_EDIT_FUNCTION="BILLING_EDIT"; } else if(($cur_menu == 'EXTRA_SERVICES') || ($MENU_INIT=='EXTRA_SERVICES') || ($MENU_INIT=='EXTRA_SERVICES_EDIT') || ($MENU_INIT=='NEW_EXTRA_SERVICES') ) { $thiss->DETECT_TABLE_COLUMN="EXTRA_SERVICES_COLUMN" ; $thiss->DETECT_TABLE_NAME="EXTRA_SERVICES" ; $thiss->DETECT_HIST_FUNCTION="EXTRA_SERVICES_HIST"; $thiss->DETECT_EDIT_FUNCTION="EXTRA_SERVICES_EDIT"; } else if($cur_menu == 'USERS') { $thiss->DETECT_TABLE_COLUMN="USERS_COLUMN" ; $thiss->DETECT_TABLE_NAME="USERS2" ; $thiss->DETECT_HIST_FUNCTION="USERS_HISTORY"; $thiss->DETECT_EDIT_FUNCTION="USERS_EDIT"; } else if($cur_menu == 'SES_SERWIS_A') { $thiss->DETECT_TABLE_COLUMN="SES_SERWIS_A_COLUMN" ; $thiss->DETECT_TABLE_NAME="SES_SERWIS_A" ; $thiss->DETECT_HIST_FUNCTION="SES_SERWIS_A_HISTORY"; $thiss->DETECT_EDIT_FUNCTION="SES_SERWIS_A_EDIT"; } else if($cur_menu == 'SES_SERWIS_A_HISTORY') { $thiss->DETECT_TABLE_COLUMN="SES_SERWIS_A_COLUMN_HIST" ; $thiss->DETECT_TABLE_NAME="SES_SERWIS_A_HIST" ; $thiss->DETECT_HIST_FUNCTION="SES_SERWIS_A_HISTORY"; $thiss->DETECT_EDIT_FUNCTION="SES_SERWIS_A_EDIT"; } else if($cur_menu == 'USERS_HISTORY') { $thiss->DETECT_TABLE_COLUMN="USERSHIST_COLUMN" ; $thiss->DETECT_TABLE_NAME="USERS2_HIST" ; $thiss->DETECT_HIST_FUNCTION="USERS_HISTORY"; $thiss->DETECT_EDIT_FUNCTION="USERS_EDIT"; } else if($cur_menu == 'USERS_EDIT') { $thiss->DETECT_TABLE_COLUMN="USERS_COLUMN" ; $thiss->DETECT_TABLE_NAME="USERS2" ; $thiss->DETECT_HIST_FUNCTION="USERS_HISTORY"; $thiss->DETECT_EDIT_FUNCTION="USERS_EDIT"; } else if($cur_menu == 'USERS2_MARKETING_OVERWIEV') { $thiss->DETECT_TABLE_COLUMN="USERS2_MARKETING_OVERWIEV_COLUMN" ; $thiss->DETECT_TABLE_NAME="USERS2_MARKETING_OVERWIEV" ; $thiss->DETECT_HIST_FUNCTION="WIEVTABLE_HIST"; $thiss->DETECT_EDIT_FUNCTION="WIEVTABLE"; } else if($cur_menu == 'L_APPOITMENT_OVERWIEV') { $thiss->DETECT_TABLE_COLUMN="L_APPOITMENT_COLUMN" ; $thiss->DETECT_TABLE_NAME="tmp" ; $thiss->DETECT_HIST_FUNCTION=""; $thiss->DETECT_EDIT_FUNCTION=""; //2008-06-03 added by sqix } else if($cur_menu == 'ADMIN_USERS') { $thiss->DETECT_TABLE_COLUMN="ADMIN2_COLUMN" ; $thiss->DETECT_TABLE_NAME="ADMIN_USERS" ; $thiss->DETECT_HIST_FUNCTION="ADMIN_USERS_HIST"; $thiss->DETECT_EDIT_FUNCTION="EDIT_TABLE_RECORD"; } else if($cur_menu == 'ADMIN_USERS_HIST') { $thiss->DETECT_TABLE_COLUMN="ADMIN2_COLUMN" ; $thiss->DETECT_TABLE_NAME="ADMIN_USERS_HIST" ; $thiss->DETECT_HIST_FUNCTION="ADMIN_USERS_HIST"; $thiss->DETECT_EDIT_FUNCTION="EDIT_TABLE_RECORD"; } else { $found_thiss = false;// $thiss not found; fetch last value from session } }// old way if (!$found_thiss) {// $thiss still not set; read from session if($_SESSION['DEBUG']) echo "
ELSE row 594 \n"; // read from session - previous request (przelaczalo nie do tej funkcji) $thiss->DETECT_TABLE_COLUMN = (isset($_SESSION['THIS']['DETECT_TABLE_COLUMN']))? $_SESSION['THIS']['DETECT_TABLE_COLUMN'] : "USERS_COLUMN"; $thiss->DETECT_TABLE_NAME = (isset($_SESSION['THIS']['DETECT_TABLE_NAME']))? $_SESSION['THIS']['DETECT_TABLE_NAME'] : "USERS2"; $thiss->DETECT_HIST_FUNCTION = (isset($_SESSION['THIS']['DETECT_HIST_FUNCTION']))? $_SESSION['THIS']['DETECT_HIST_FUNCTION'] : "USERS_HISTORY"; $thiss->DETECT_EDIT_FUNCTION = (isset($_SESSION['THIS']['DETECT_EDIT_FUNCTION']))? $_SESSION['THIS']['DETECT_EDIT_FUNCTION'] : "USERS_EDIT"; } // save $thiss in session if (isset($thiss->DETECT_TABLE_COLUMN)) $_SESSION['THIS']['DETECT_TABLE_COLUMN'] = $thiss->DETECT_TABLE_COLUMN; if (isset($thiss->DETECT_TABLE_NAME)) $_SESSION['THIS']['DETECT_TABLE_NAME'] = $thiss->DETECT_TABLE_NAME; if (isset($thiss->DETECT_HIST_FUNCTION)) $_SESSION['THIS']['DETECT_HIST_FUNCTION'] = $thiss->DETECT_HIST_FUNCTION; if (isset($thiss->DETECT_EDIT_FUNCTION)) $_SESSION['THIS']['DETECT_EDIT_FUNCTION'] = $thiss->DETECT_EDIT_FUNCTION; if($_SESSION['DEBUG']) echo " *f.DETECT_TABLE_COLUMN detected DTC: $thiss->DETECT_TABLE_COLUMN* DTN: $thiss->DETECT_TABLE_NAME DHF: $thiss->DETECT_HIST_FUNCTION DEF: $thiss->DETECT_EDIT_FUNCTION *"; }