<?php // if no type asked, exits! if (empty($_REQUEST['type'])) { exit; } define('debug', false); // settare a true per l'output di debug require_once dirname(dirname(__FILE__)) . '/config.php'; require_once 'Common/Fun_FormatText.inc.php'; $type = intval($_REQUEST['type']); $locrules = array(); $tmpLang = SelectLanguage(); $tmpMainLang = explode('-', $tmpLang); $tmpMainLang = $tmpMainLang[0]; $lang = 'default'; if ($type > 0) { // Search for the local setup rules $glob = glob($CFG->DOCUMENT_PATH . 'Modules/Sets/*'); foreach ($glob as $val) { if (is_dir($val) and file_exists($val . '/Setup_' . $type . '_' . basename($val) . '.set')) { $locrules[] = array('code' => basename($val), 'descr' => get_text('Setup-' . basename($val), 'Install')); } } // adds the default FITA rule for that type if (is_file($CFG->DOCUMENT_PATH . 'Modules/Sets/FITA/Setup_' . $type . '.set')) { $locrules[] = array('code' => 'default', 'descr' => get_text('Setup-Default', 'Install')); } // if there is more than 1 choice adds the "select Local rule"... if (count($locrules) > 1) { array_unshift($locrules, array('code' => '', 'descr' => get_text('Setup-Select', 'Install')));
function get_which_menu($on = false) { global $CFG; $ret = array(); // Start with minimal structure if ($on) { /** COMPETITION MENU **/ $ret['COMP'][] = get_text('MenuLM_Competition') . ''; $ret['COMP'][] = get_text('MenuLM_Open') . '|' . $CFG->ROOT_DIR . 'index.php'; $ret['COMP'][] = get_text('MenuLM_Close') . '|' . $CFG->ROOT_DIR . 'Common/TourOff.php'; $ret['COMP'][] = MENU_DIVIDER; $ret['COMP'][] = get_text('MenuLM_Delete') . '|' . $CFG->ROOT_DIR . 'Tournament/TourDelete.php'; $ret['COMP'][] = MENU_DIVIDER; $ret['COMP'][] = get_text('MenuLM_View Competition Info') . '|' . $CFG->ROOT_DIR . 'Main.php'; $ret['COMP']['INFO'][] = get_text('MenuLM_Edit Competition Info'); $ret['COMP']['INFO'][] = get_text('MenuLM_Competition Info') . '|' . $CFG->ROOT_DIR . 'Tournament/index.php'; $ret['COMP']['INFO'][] = get_text('MenuLM_Images') . '|' . $CFG->ROOT_DIR . 'Tournament/ManLogo.php'; $ret['COMP']['INFO'][] = get_text('MenuLM_Session') . '|' . $CFG->ROOT_DIR . 'Tournament/ManSessions_kiss.php'; if (!defined('hideSchedulerAndAdvancedSession')) { $ret['COMP']['INFO'][] = MENU_DIVIDER; $ret['COMP']['INFO'][] = get_text('MenuLM_Scheduling') . '|' . $CFG->ROOT_DIR . 'Scheduler/index.php'; $ret['COMP']['INFO'][] = get_text('MenuLM_Training') . '|' . $CFG->ROOT_DIR . 'Final/ManTraining.php'; $ret['COMP']['INFO'][] = MENU_DIVIDER; } $ret['COMP']['INFO'][] = get_text('MenuLM_Field Crew') . '|' . $CFG->ROOT_DIR . 'Tournament/ManStaffField.php'; $ret['COMP']['INFO'][] = get_text('MenuLM_Divisions and Classes') . '|' . $CFG->ROOT_DIR . 'Tournament/ManDivClass.php'; $ret['COMP']['INFO'][] = get_text('MenuLM_SubClasses') . '|' . $CFG->ROOT_DIR . 'Tournament/ManSubClass.php'; $ret['COMP']['INFO'][] = get_text('MenuLM_Distances') . '|' . $CFG->ROOT_DIR . 'Tournament/ManDistances.php'; $ret['COMP']['INFO'][] = get_text('MenuLM_Targets') . '|' . $CFG->ROOT_DIR . 'Tournament/ManTargets.php'; $ret['COMP'][] = MENU_DIVIDER; $ret['COMP']['FINI'][] = get_text('MenuLM_Individual Final Setup') . ''; $ret['COMP']['FINI'][] = get_text('MenuLM_Manage Events') . '|' . $CFG->ROOT_DIR . 'Final/Individual/ListEvents.php'; $ret['COMP']['FINI'][] = get_text('MenuLM_Archers on Targets') . '|' . $CFG->ROOT_DIR . 'Final/Individual/SetAthForTarget.php'; $ret['COMP']['FINI'][] = get_text('MenuLM_Arr4Set') . '|' . $CFG->ROOT_DIR . 'Final/SetArrForMatch.php'; $ret['COMP']['FINI'][] = get_text("MenuLM_Target's Number") . '|' . $CFG->ROOT_DIR . 'Final/Individual/ManTarget.php'; $ret['COMP']['FINI'][] = get_text('MenuLM_Scheduling') . '|' . $CFG->ROOT_DIR . 'Final/Individual/ManSchedule.php'; $ret['COMP']['FINI'][] = get_text('MenuLM_Training') . '|' . $CFG->ROOT_DIR . 'Final/ManTraining.php'; if (!defined('hideRunning')) { $ret['COMP']['FINI'][] = get_text('MenuLM_RunningEvents') . '|' . $CFG->ROOT_DIR . 'Final/RunningEvent.php'; } $ret['COMP']['FINT'][] = get_text('MenuLM_Team Final Setup') . ''; $ret['COMP']['FINT'][] = get_text('MenuLM_Manage Events') . '|' . $CFG->ROOT_DIR . 'Final/Team/ListEvents.php'; $ret['COMP']['FINT'][] = get_text('MenuLM_Arr4Set') . '|' . $CFG->ROOT_DIR . 'Final/SetArrForMatch.php?Teams=1'; $ret['COMP']['FINT'][] = get_text("MenuLM_Target's Number") . '|' . $CFG->ROOT_DIR . 'Final/Team/ManTarget.php'; $ret['COMP']['FINT'][] = get_text('MenuLM_Scheduling') . '|' . $CFG->ROOT_DIR . 'Final/Team/ManSchedule.php'; $ret['COMP']['FINT'][] = get_text('MenuLM_Training') . '|' . $CFG->ROOT_DIR . 'Final/ManTraining.php'; if (!defined('hideRunning')) { $ret['COMP']['FINT'][] = get_text('MenuLM_RunningEvents') . '|' . $CFG->ROOT_DIR . 'Final/RunningEvent.php'; } $ret['COMP'][] = get_text('MenuLM_Final Field of Play Layout') . '|' . $CFG->ROOT_DIR . 'Final/FopSetup.php|||PrintOut'; $ret['COMP'][] = MENU_DIVIDER; $ret['COMP']['BLOCK'][] = get_text('MenuLM_Lock setup') . '|' . $CFG->ROOT_DIR . 'Tournament/BlockTour.php'; $ret['COMP']['REPT'][] = get_text('MenuLM_Final report') . ''; $ret['COMP']['REPT'][] = get_text('MenuLM_EditFinalReport') . '|' . $CFG->ROOT_DIR . 'Tournament/FinalReport/index.php'; $ret['COMP']['REPT'][] = get_text('MenuLM_PrintFinalReport') . '|' . $CFG->ROOT_DIR . 'Tournament/FinalReport/PDFReport.php|||PrintOut'; $ret['COMP']['REPT'][] = get_text('MenuLM_CheckList') . '|' . $CFG->ROOT_DIR . 'Tournament/FinalReport/PDFCheckList.php|||PrintOut'; $ret['COMP'][] = MENU_DIVIDER; $ret['COMP']['EXPT'][] = get_text('MenuLM_Export') . '|' . $CFG->ROOT_DIR . 'Tournament/TournamentExport.php?Complete=1'; $ret['COMP']['EXPT'][] = get_text('MenuLM_Export Results') . '|' . $CFG->ROOT_DIR . 'Tournament/Export2Fitarco.php'; $ret['COMP']['EXPT'][] = get_text('MenuLM_Export Tournament') . '|' . $CFG->ROOT_DIR . 'Tournament/TournamentExport.php'; $ret['COMP']['EXPT'][] = get_text('MenuLM_Export Tournament Photo') . '|' . $CFG->ROOT_DIR . 'Tournament/TournamentExport.php?Complete=1'; $ret['COMP']['EXPT'][] = get_text('MenuLM_Export BackNumbers') . '|' . $CFG->ROOT_DIR . 'Tournament/BackNumbersExport.php'; $ret['COMP'][] = MENU_DIVIDER; $ret['COMP']['SEND'][] = get_text('MenuLM_Send to ianseo.net') . '|' . $CFG->ROOT_DIR . 'Tournament/UploadResults.php'; $ret['COMP']['SEND'][] = get_text('MenuLM_Set on-line codes') . '|' . $CFG->ROOT_DIR . 'Tournament/SetCredentials.php'; // aggiungere un controllo se c'è il codice di accesso? $ret['COMP']['SEND'][] = get_text('MenuLM_Send') . '|' . $CFG->ROOT_DIR . 'Tournament/UploadResults.php'; $ret['COMP'][] = MENU_DIVIDER; $ret['COMP'][] = get_text('MenuLM_Select Language') . '|' . $CFG->ROOT_DIR . 'Language/index.php'; if (substr(SelectLanguage(), 0, 2) != 'en') { $ret['COMP'][] = 'Select Language|' . $CFG->ROOT_DIR . 'Language/index.php'; } /** PARTICIPANTS MENU **/ $ret['PART'][] = get_text('MenuLM_Participants'); $ret['PART'][] = get_text('MenuLM_List (Simple)') . '|' . $CFG->ROOT_DIR . 'Partecipants/index.php'; $ret['PART'][] = get_text('MenuLM_Partecipant List (Advanced)') . '|' . $CFG->ROOT_DIR . 'Partecipants-exp/index.php'; $ret['PART'][] = get_text('MenuLM_Athlete Status Management') . '|' . $CFG->ROOT_DIR . 'Partecipants/ManStatus.php'; $ret['PART'][] = get_text('MenuLM_Athletes Participation to Ind/Team Event') . '|' . $CFG->ROOT_DIR . 'Partecipants/ManEventAccess.php'; $ret['PART']['TARG'][] = get_text('MenuLM_Target') . ''; $ret['PART']['TARG'][] = get_text('MenuLM_Manual Assignment') . '|' . $CFG->ROOT_DIR . 'Partecipants/SetTarget_default.php?Ses=*'; $ret['PART']['TARG'][] = get_text('MenuLM_Draw') . '|' . $CFG->ROOT_DIR . 'Partecipants/SetTarget_auto.php'; $ret['PART']['TARG'][] = MENU_DIVIDER; $ret['PART']['TARG'][] = get_text('MenuLM_MoveSession') . '|' . $CFG->ROOT_DIR . 'Partecipants/MoveSession.php'; $ret['PART']['TARG'][] = get_text('MenuLM_MoveTarget') . '|' . $CFG->ROOT_DIR . 'Partecipants/MoveTarget.php'; $ret['PART']['TARG'][] = get_text('MenuLM_TargetFromRank') . '|' . $CFG->ROOT_DIR . 'Partecipants/TargetFromRank.php'; $ret['PART']['TARG'][] = get_text('MenuLM_DeleteTarget') . '|' . $CFG->ROOT_DIR . 'Partecipants/DeleteTarget.php'; $ret['PART'][] = MENU_DIVIDER; $ret['PART'][] = get_text('MenuLM_ChangeNationsNames') . '|' . $CFG->ROOT_DIR . 'Partecipants/ChangeNationsNames.php'; $ret['PART'][] = MENU_DIVIDER; $ret['PART']['ACCR'][] = get_text('MenuLM_Accreditation') . ''; $ret['PART']['ACCR'][] = get_text('MenuLM_Accreditation') . '|' . $CFG->ROOT_DIR . 'Accreditation/index.php'; $ret['PART']['ACCR'][] = get_text('TakePicture', 'Tournament') . '|' . $CFG->ROOT_DIR . 'Accreditation/AccreditationPicture.php'; $ret['PART']['ACCR'][] = MENU_DIVIDER; $ret['PART']['ACCR'][] = get_text('MenuLM_Fees setup') . '|' . $CFG->ROOT_DIR . 'Accreditation/ManagePrices.php'; $ret['PART']['ACCR'][] = get_text('MenuLM_Athlets fees status') . '|' . $CFG->ROOT_DIR . 'Accreditation/ManagePays.php'; $ret['PART']['ACCR'][] = get_text('MenuLM_Accreditation colors management') . '|' . $CFG->ROOT_DIR . 'Accreditation/Colors.php'; $ret['PART']['ACCR'][] = MENU_DIVIDER; $ret['PART']['ACCR'][] = get_text('MenuLM_PrintBadges') . '|' . $CFG->ROOT_DIR . 'Accreditation/IdCards.php'; // if($_SESSION['debug']) $ret['PART']['ACCR'][] = get_text('MenuLM_PrintBadges') . '-new|' . $CFG->ROOT_DIR . 'Accreditation/IdCards-new.php'; $ret['PART']['ACCR'][] = get_text('MenuLM_Printout') . '|' . $CFG->ROOT_DIR . 'Accreditation/PrintOut.php'; $ret['PART'][] = MENU_DIVIDER; $ret['PART']['SYNC'][] = get_text('MenuLM_Athletes Sync.') . '|' . $CFG->ROOT_DIR . 'Partecipants/LookupTableLoad.php'; $ret['PART'][] = MENU_DIVIDER; $ret['PART'][] = get_text('MenuLM_Statistics') . '|' . $CFG->ROOT_DIR . 'Partecipants/PrintOutStat.php'; $ret['PART'][] = MENU_DIVIDER; $ret['PART'][] = get_text('MenuLM_Printout') . '|' . $CFG->ROOT_DIR . 'Partecipants/PrintOut.php'; /** QUALIFICATIONS MENU **/ $ret['QUAL'][] = get_text('MenuLM_Qualification') . ''; $ret['QUAL']['SCOR'][] = get_text('MenuLM_Input Score') . '|' . $CFG->ROOT_DIR; $ret['QUAL']['SCOR'][] = get_text('MenuLM_Standard Table') . '|' . $CFG->ROOT_DIR . 'Qualification/index.php'; $ret['QUAL']['SCOR'][] = get_text('MenuLM_Extended Table') . '|' . $CFG->ROOT_DIR . 'Qualification/index_all.php'; $ret['QUAL']['SCOR'][] = get_text('MenuLM_Arrow by Arrow (Advanced user)') . '|' . $CFG->ROOT_DIR . 'Qualification/WriteArrows.php'; $ret['QUAL']['SCOR'][] = get_text('MenuLM_Arrow by Arrow (Scorecards)') . '|' . $CFG->ROOT_DIR . 'Qualification/WriteScoreCard.php'; $ret['QUAL']['SCOR'][] = MENU_DIVIDER; $ret['QUAL']['SCOR'][] = get_text('MenuLM_Check Data Update') . '|' . $CFG->ROOT_DIR . 'Qualification/CheckTargetUpdate.php'; $ret['QUAL'][] = MENU_DIVIDER; $ret['QUAL'][] = get_text('MenuLM_Export Text File') . '|' . $CFG->ROOT_DIR . 'Qualification/ExportTSV.php'; if (!empty($_SESSION['UseApi'])) { $ret['QUAL'][] = MENU_DIVIDER; $ret['QUAL'][] = get_text('API-TargetGrouping', 'Api') . '|' . $CFG->ROOT_DIR . 'Api/ApiGrouping.php'; } $ret['QUAL'][] = MENU_DIVIDER; $ret['QUAL'][] = get_text('MenuLM_Scorecard Printout') . '|' . $CFG->ROOT_DIR . 'Qualification/PrintScore.php'; $ret['QUAL'][] = get_text('MenuLM_Back Number Printout') . '|' . $CFG->ROOT_DIR . 'Qualification/PrintBackNo.php'; $ret['QUAL'][] = get_text('MenuLM_Qualification Field of Play Layout') . '|' . $CFG->ROOT_DIR . 'Qualification/FopSetup.php|||PrintOut'; $ret['QUAL'][] = MENU_DIVIDER; $ret['QUAL'][] = get_text('MenuLM_Personal Rank') . '|' . $CFG->ROOT_DIR . 'Qualification/RankPersonal1.php'; $ret['QUAL'][] = MENU_DIVIDER; $ret['QUAL'][] = get_text('MenuLM_Category Result List') . '|' . $CFG->ROOT_DIR . 'Qualification/PrintOut.php'; $ret['QUAL'][] = get_text('MenuLM_Qualification Round') . '|' . $CFG->ROOT_DIR . 'Qualification/PrintOutAbs.php'; /** ELIMINATION MENU **/ if ($_SESSION['MenuElimDo']) { $ret['ELIM'][] = get_text('MenuLM_Eliminations') . ''; $tmp = get_text('MenuLM_Check shoot-off before eliminations') . ''; if ($_SESSION['MenuElim1']) { $tmp .= ' <b style="color:red">(Round 1: ' . implode('-', $_SESSION['MenuElim1']) . ')</b>'; } if ($_SESSION['MenuElim2']) { $tmp .= ' <b style="color:red">(Round 2: ' . implode('-', $_SESSION['MenuElim2']) . ')</b>'; } $tmp .= '|' . $CFG->ROOT_DIR . 'Elimination/AbsIndividual1.php'; $ret['ELIM'][] = $tmp; $ret['ELIM'][] = MENU_DIVIDER; $ret['ELIM'][] = get_text('MenuLM_Scorecard Printout') . '|' . $CFG->ROOT_DIR . 'Elimination/PrintScore.php'; $ret['ELIM'][] = get_text('MenuLM_Back Number Printout') . '|' . $CFG->ROOT_DIR . 'Elimination/PrintBackNo.php'; $ret['ELIM'][] = MENU_DIVIDER; $ret['ELIM'][] = get_text('MenuLM_Target Assignment') . '|' . $CFG->ROOT_DIR . 'Elimination/SetTarget.php'; if ($_SESSION['MenuElimOn']) { $ret['ELIM'][] = get_text('MenuLM_Input Score') . '|' . $CFG->ROOT_DIR . 'Elimination/index.php'; $ret['ELIM'][] = MENU_DIVIDER; $ret['ELIM'][] = get_text('MenuLM_Printout') . '|' . $CFG->ROOT_DIR . 'Elimination/PrintOut.php'; } } /** INDIVIDUAL FINAL MENU **/ if ($_SESSION['MenuFinIDo']) { $ret['FINI'][] = get_text('MenuLM_Individual Finals') . ''; $tmp = get_text('MenuLM_Check shoot-off before final phases') . ''; if ($_SESSION['MenuFinI']) { $tmp .= ' <b style="color:red">(' . implode('-', $_SESSION['MenuFinI']) . ')</b>'; } $tmp .= '|' . $CFG->ROOT_DIR . 'Final/Individual/AbsIndividual1.php'; $ret['FINI'][] = $tmp; $ret['FINI'][] = get_text('MenuLM_PrnShootOff') . '|' . $CFG->ROOT_DIR . 'Qualification/PrnShootoff.php|||PrintOut'; $ret['FINI'][] = MENU_DIVIDER; $ret['FINI'][] = get_text('MenuLM_Scorecard Printout') . '|' . $CFG->ROOT_DIR . 'Final/Individual/PrintScore.php'; $ret['FINI'][] = get_text('MenuLM_Back Number Printout') . '|' . $CFG->ROOT_DIR . 'Final/Individual/PrintBackNo.php'; if ($_SESSION['MenuFinIOn']) { $ret['FINI'][] = MENU_DIVIDER; $ret['FINI'][] = get_text('MenuLM_Data insert (Bracket view)') . '|' . $CFG->ROOT_DIR . 'Final/Individual/InsertPoint_Bra.php'; $ret['FINI'][] = get_text('MenuLM_Data insert (Table view)') . '|' . $CFG->ROOT_DIR . 'Final/Individual/InsertPoint1.php'; $ret['FINI'][] = get_text('MenuLM_Spotting') . '|' . $CFG->ROOT_DIR . 'Final/WriteScoreCard.php?Team=0'; $ret['FINI'][] = MENU_DIVIDER; $ret['FINI'][] = get_text('MenuLM_Printout') . '|' . $CFG->ROOT_DIR . 'Final/PrintOut.php'; } } /** TEAM FINAL MENU **/ if ($_SESSION['MenuFinTDo']) { $ret['FINT'][] = get_text('MenuLM_Team Finals') . ''; $tmp = get_text('MenuLM_Check shoot-off before final phases') . ''; if ($_SESSION['MenuFinT']) { $tmp .= ' <b style="color:red">(' . implode('-', $_SESSION['MenuFinT']) . ')</b>'; } $tmp .= '|' . $CFG->ROOT_DIR . 'Final/Team/AbsTeam1.php'; $ret['FINT'][] = $tmp; $ret['FINT'][] = get_text('MenuLM_PrnShootOff') . '|' . $CFG->ROOT_DIR . 'Qualification/PrnShootoff.php|||PrintOut'; $ret['FINT'][] = MENU_DIVIDER; $ret['FINT'][] = get_text('MenuLM_Scorecard Printout') . '|' . $CFG->ROOT_DIR . 'Final/Team/PrintScore.php'; $ret['FINT'][] = get_text('MenuLM_Back Number Printout') . '|' . $CFG->ROOT_DIR . 'Final/Team/PrintBackNo.php'; if ($_SESSION['MenuFinTOn']) { $ret['FINT'][] = MENU_DIVIDER; $ret['FINT'][] = get_text('MenuLM_Change Components') . '|' . $CFG->ROOT_DIR . 'Final/Team/ChangeComponents1.php'; $ret['FINT'][] = MENU_DIVIDER; $ret['FINT'][] = get_text('MenuLM_Data insert (Bracket view)') . '|' . $CFG->ROOT_DIR . 'Final/Team/InsertPoint_Bra.php'; $ret['FINT'][] = get_text('MenuLM_Data insert (Table view)') . '|' . $CFG->ROOT_DIR . 'Final/Team/InsertPoint1.php'; $ret['FINT'][] = get_text('MenuLM_Spotting') . '|' . $CFG->ROOT_DIR . 'Final/WriteScoreCard.php?Team=1'; $ret['FINT'][] = MENU_DIVIDER; $ret['FINT'][] = get_text('MenuLM_Printout') . '|' . $CFG->ROOT_DIR . 'Final/PrintOut.php'; } } /** PRINTOUT MENU **/ $ret['PRNT'][] = get_text('MenuLM_Printout') . ''; $ret['PRNT'][] = get_text('MenuLM_Participant Lists') . '|' . $CFG->ROOT_DIR . 'Partecipants/PrintOut.php'; $ret['PRNT'][] = get_text('MenuLM_Statistics') . '|' . $CFG->ROOT_DIR . 'Partecipants/PrintOutStat.php'; $ret['PRNT'][] = MENU_DIVIDER; $ret['PRNT'][] = get_text('MenuLM_Div/Class Result List') . '|' . $CFG->ROOT_DIR . 'Qualification/PrintOut.php'; $ret['PRNT'][] = get_text('MenuLM_Qualification Round') . '|' . $CFG->ROOT_DIR . 'Qualification/PrintOutAbs.php'; $ret['PRNT'][] = get_text('MenuLM_Final Rounds') . '|' . $CFG->ROOT_DIR . 'Final/PrintOut.php'; $ret['PRNT'][] = MENU_DIVIDER; $ret['PRNT'][] = get_text('MenuLM_Header for Result Printouts') . '|' . $CFG->ROOT_DIR . 'Tournament/PrintoutComments.php'; $ret['PRNT'][] = MENU_DIVIDER; $ret['PRNT'][] = get_text('MenuLM_ManAwards') . '|' . $CFG->ROOT_DIR . 'Tournament/ManAwards.php'; $ret['PRNT'][] = get_text('MenuLM_PrintAwards') . '|' . $CFG->ROOT_DIR . 'Tournament/PDFAward.php|||PrintOut'; $ret['PRNT'][] = MENU_DIVIDER; $ret['PRNT'][] = get_text('MenuLM_Print Sign') . '|' . $CFG->ROOT_DIR . 'Common/Sign'; /** HHT MENU **/ if ($_SESSION['MenuHHT']) { $ret['HHT'][] = get_text('MenuLM_HTT') . ''; $ret['HHT'][] = get_text('MenuLM_HTT Communication Setup') . '|' . $CFG->ROOT_DIR . 'HHT/Configuration.php'; $ret['HHT'][] = MENU_DIVIDER; $ret['HHT'][] = get_text('MenuLM_HTT Setup') . '|' . $CFG->ROOT_DIR . 'HHT/InitHTT.php'; $ret['HHT'][] = get_text('MenuLM_Athletes Setup') . '|' . $CFG->ROOT_DIR . 'HHT/InitAthletes.php'; $ret['HHT'][] = get_text('MenuLM_Scores Setup') . '|' . $CFG->ROOT_DIR . 'HHT/InitScores.php'; $ret['HHT'][] = get_text('MenuLM_Setup HTT Sequence') . '|' . $CFG->ROOT_DIR . 'HHT/Sequence.php'; $ret['HHT'][] = get_text('MenuLM_Collect Data') . '|' . $CFG->ROOT_DIR . 'HHT/Collect.php'; $ret['HHT'][] = get_text('MenuLM_Get Info') . '|' . $CFG->ROOT_DIR . 'HHT/GetInfo.php'; } /** OUTPUT MENU **/ $ret['MEDI'][] = get_text('MenuLM_Output') . ''; $ret['MEDI'][] = get_text('MenuLM_TV Output') . '|' . $CFG->ROOT_DIR . 'TV/'; $ret['MEDI'][] = MENU_DIVIDER; $ret['MEDI'][] = get_text('MenuLM_Spotting') . '|' . $CFG->ROOT_DIR . 'Final/Spot/|||_blank'; } else { // MENU OFF!!! $ret['COMP'][] = get_text('MenuLM_Competition'); $ret['COMP'][] = get_text('MenuLM_New') . '|' . $CFG->ROOT_DIR . 'Tournament/index.php?New='; $ret['COMP'][] = get_text('MenuLM_Open') . '|' . $CFG->ROOT_DIR . 'index.php'; $ret['COMP'][] = get_text('MenuLM_Import Tournament') . '|' . $CFG->ROOT_DIR . 'Tournament/TournamentImport.php'; $ret['COMP'][] = MENU_DIVIDER; $ret['COMP'][] = get_text('MenuLM_Select Language') . '|' . $CFG->ROOT_DIR . 'Language/index.php'; if (substr(SelectLanguage(), 0, 2) != 'en') { $ret['COMP'][] = 'Select Language|' . $CFG->ROOT_DIR . 'Language/index.php'; } } $ret['MODS'][] = get_text('MenuLM_Modules'); $ret['MODS'][] = '' . get_text('MenuLM_Update') . '|' . $CFG->ROOT_DIR . 'Update/'; //$ret['MODS'][] = get_text('MenuLM_SearchModules') .'|'.$CFG->ROOT_DIR.'Modules/'; /** Additional Modules Menu **/ $Modules = glob($CFG->DOCUMENT_PATH . 'Modules/*/menu.php'); foreach ($Modules as $Module) { include $Module; } $Modules = glob($CFG->DOCUMENT_PATH . 'Modules/Sets/*/menu.php'); foreach ($Modules as $Module) { include $Module; } $Modules = glob($CFG->DOCUMENT_PATH . 'Modules/Custom/*/menu.php'); foreach ($Modules as $Module) { include $Module; } if (!empty($ret['IANSEO'])) { array_unshift($ret['IANSEO'], get_text('MenuLM_Ianseo')); } // debug_svela(build_menu($ret)); return $ret; }
<!-- BEGIN HEADER SEARCH BOX --> <!-- DOC: Apply "search-form-expanded" right after the "search-form" class to have half expanded search box --> <?php ProductSearchFormShort(); ?> <!-- END HEADER SEARCH BOX --> <?php echo apply_filters("part_header_after_storefront", ""); ?> <!-- BEGIN TOP NAVIGATION MENU --> <div class="top-menu"> <ul class="nav navbar-nav pull-right"> <!-- BEGIN LANGUAGE BAR --> <?php SelectLanguage(); ?> <!-- END LANGUAGE BAR --> <!-- BEGIN USER LOGIN DROPDOWN --> <li class="dropdown dropdown-user"> <a title="<?php Msg('ADMIN_INFO_PAGE_TITLE'); ?> " href="javascript:void(0);" class="dropdown-toggle" data-toggle="dropdown" data-hover="dropdown" data-close-others="true" > <span class="username username-hide-on-mobile"> <?php echo $admin_info['firstname'] . ' ' . $admin_info['lastname']; ?> </span> <i class="fa fa-angle-down"></i> </a>
function get_text($text, $module = 'Common', $a = '', $translate = false, $force = false, $ForceLang = '') { static $_LANG; global $Arr_StrStatus, $CFG; if ($module == 'ReturnLangArray') { return $_LANG; } if ($ForceLang) { $lingua = strtolower($ForceLang); } else { $lingua = strtolower(SelectLanguage($force)); } if (!$module) { $module = 'Common'; } // ingloba anche la funzione langtr! if ($translate) { switch (substr($text, 0, 1)) { case '~': // Devo valutare la variabile contenuta nel nome $text = substr($text, 1); if (substr($text, 0, 3) == "Str") { $text = substr($text, 3); } if (substr($b = get_text($text, $module, $a), 0, 5) == '<b>[[') { return $text; } else { return $b; } case '|': // Devo processare i pezzi di stringa $Tmp = ""; foreach (explode('|', substr($text, 1)) as $Value) { $Tmp .= get_text($Value, $module, $a, true, $force); // rimanda al processore il pezzo estratto } return $Tmp; default: // Devo stampare la stringa dura e pura! return $text; } } // per prima cosa carica i testi del modulo se non � presente if (!isset($_LANG[$lingua][$module])) { $_LANG[$lingua][$module] = array(); if (!verbose) { // carica il fallback (inglese), se esistente! if (file_exists($file = $CFG->LANGUAGE_PATH . "en/{$module}.php")) { include $file; $_LANG[$lingua][$module] = $lang; } } if (file_exists($file = $CFG->LANGUAGE_PATH . "{$lingua}/{$module}.php")) { include $file; $_LANG[$lingua][$module] = array_merge($_LANG[$lingua][$module], $lang); } // se il modulo è Common deve ricreare l'array degli status if ($module == 'Common') { $Arr_StrStatus = array(0 => '', 1 => get_text('Status_1'), 5 => get_text('Status_5'), 6 => get_text('Status_6'), 7 => get_text('Status_7'), 8 => get_text('Status_8'), 9 => get_text('Status_9')); } } if (isset($_LANG[$lingua][$module][$text])) { // se esiste il testo manda il testo con i parametri eval("\$result" . ' = "' . str_replace('"', '\\"', $_LANG[$lingua][$module][$text]) . '";'); return $result; } else { // oppure un avviso che manca il testo e il modulo return "<b>[[{$text}]@[{$lingua}]@[{$module}]]</b>"; } }