function Flgn_iniSrc($url) { try { global $Grot_path; # Fcom_setLogInfo( "debug" , "Flgn_iniSrc:".$Grot_path ); $cont = Frot_getConts($url["type"], $url["cont"], $tgt); if (null === $cont) { Frot_jumpFirst(); return; } Frot_setSession($tgt, true, false); $conts_lst = Frot_getContsList(array(DROT_STT_LGN, DROT_SUBSTT_INI)); $chk_flg = true; foreach ($conts_lst as $key => $val) { $chk_flg = Frot_getSession($val); if (null === $chk_flg) { # Fcom_setLogInfo( "debug" , "null session:".$val ); break; } } if (true === $chk_flg) { Frot_resetSession(); Frot_setSession(DROT_SESROT_STT, DROT_STT_LGN); Frot_setSession(DROT_SESROT_SUBSTT, DROT_SUBSTT_RDY); Fcom_setLogInfo("debug", "ready"); } echo $cont; } catch (Exception $e) { throw new Exception('ERR(File:' . basename(__FILE__) . ',Line:' . __LINE__ . '):' . __FUNCTION__ . '()' . PHP_EOL . $e->getMessage()); } }
function Fapp_iniSrc($url) { try { global $Grot_path; $cont = Frot_getConts($url["type"], $url["cont"], $tgt); if (null === $cont) { Fcom_setLogInfo("debug", "app null conts:" . $Grot_path); #Fapp_jumpFirst(); return; } Frot_setSession($tgt, true, false); # Frot_logSession(); $conts_lst = Frot_getContsList(array(DROT_STT_APP, DROT_SUBSTT_INI)); # Fcom_logObj( "conts_lst" , $conts_lst ); $chk_flg = true; # Fcom_setLogInfo( "debug" , "check ready start" ); foreach ($conts_lst as $key => $val) { $chk_flg = Frot_getSession($val); # Fcom_setLogInfo( "debug" , $key.":".$chk_flg ); if (null === $chk_flg) { # Fcom_setLogInfo( "debug" , "null session:".$val ); break; } } # Fcom_setLogInfo( "debug" , "end check ready" ); if (true === $chk_flg) { $user = Frot_getSession("user"); Frot_resetSession(); Frot_setSession(DROT_SESROT_STT, DROT_STT_APP); Frot_setSession(DROT_SESROT_SUBSTT, DROT_SUBSTT_RDY); Frot_setSession("user", $user, false); Fcom_setLogInfo("debug", "app ready:" . $user); } echo $cont; return; } catch (Exception $e) { throw new Exception('ERR(File:' . basename(__FILE__) . ',Line:' . __LINE__ . '):' . __FUNCTION__ . '()' . PHP_EOL . $e->getMessage()); } }
function Frlg_init($mapper, $path) { try { $mapper->connect('/:app/:action/:type/:target'); $url_param = $mapper->match($path); if (!$url_param) { Fcom_setLogInfo(DCOM_LOGLV_DBG, 'invalid url at init func'); Frlg_jumpFirst(); } else { /* match */ //Fcom_setLogInfo( DCOM_LOGLV_DBG , 'init match path:'.$path ); # Fcom_setLogInfo( DCOM_LOGLV_DBG , 'state:'.$_SESSION["STATE"].'/sub_state:'.$_SESSION["SUBSTATE"] ); $noprm = Frot_getNoprmPath($url_param); $cont = Frot_getConts($noprm); if (null === $cont) { Fcom_setLogInfo(DCOM_LOGLV_DBG, 'null contents at init func'); Frlg_jumpFirst(); } else { Frot_addSesIdx($noprm, true); //$load_cnt = Frot_getSesDat( DROT_SESIDX_LOADCNT ) + 1; //Fcom_setLogInfo( DCOM_LOGLV_DBG , 'load cnt:'.$load_cnt ); //Frot_setSesDat( DROT_SESIDX_LOADCNT , $load_cnt , false ); $conts_lst = Frot_getContsList(array(DROT_STT_LGN, DROT_SUBSTT_INI)); $chk_flg = true; foreach ($conts_lst as $key => $val) { $chk_ses = Frot_getSesDat($key); if (null === $chk_ses) { $chk_flg = false; break; } } if (true === $chk_flg) { Fcom_setLogInfo(DCOM_LOGLV_DBG, 'jump ready:' . $path); $idx = array(DROT_SESIDX_STT => DROT_STT_LGN, DROT_SESIDX_SUBSTT => DROT_SUBSTT_RDY); Frot_resetSession($idx); } echo $cont; } } } catch (Exception $e) { throw new Exception('ERR(File:' . basename(__FILE__) . ',Line:' . __LINE__ . '):' . __FUNCTION__ . '() path:' . $path . PHP_EOL . $e->getMessage()); } }