<?php
$userLink=array();
$userLink['Welcome']='index.html';
$userLink['GUI']='Gui.html';
$userLink['UserParameter']='UserParameter.html';
$userLink['Project']='PlanningElements.html#project';
$userLink['Activity']='PlanningElements.html#activity';
$userLink['Milestone']='PlanningElements.html#milestone';
$userLink['Imputation']='RealWorkAllocation.html';
$userLink['Today']='Today.html';
$userLink['DashboardTicket']='TicketDashBoard.html';
$userLink['Planning']='Gantt.html#planning';
$userLink['PortfolioPlanning']='Gantt.html#projects-portfolio';
$userLink['ResourcePlanning']='Gantt.html#resource-planning';
$userLink['GlobalPlanning']='Gantt.html#global-planning';
$userLink['Diary']='Diary.html';
$userLink['Report']='Report.html';
$userLink['Document']='Document.html';
$userLink['Ticket']='Ticket.html#ticket';
$userLink['TicketSimple']='Ticket.html#simple-ticket';
$userLink['Requirement']='RequirementsTest.html#requirement';
$userLink['TestCase']='RequirementsTest.html#test-case';
$userLink['TestSession']='RequirementsTest.html#test-session';
$userLink['Risk']='RiskIssueManagement.html#risk';
$userLink['Opportunity']='RiskIssueManagement.html#opportunity';
$userLink['Issue']='RiskIssueManagement.html#issue';
$userLink['Action']='RiskIssueManagement.html#action';
$userLink['IndividualExpense']='Expenses.html#individual-expense';
$userLink['ProjectExpense']='Expenses.html#project-expense';
$userLink['Quotation']='Order.html#quotation';
$userLink['Command']='Incomes.html#order';
$userLink['Bill']='Incomes.html#bill';
$userLink['Term']='Incomes.html#term';
$userLink['ActivityPrice']='Incomes.html#activity-price';
$userLink['Payment']='Incomes.html#payment';
$userLink['Meeting']='ReviewLogs.html#meeting';
$userLink['PeriodicMeeting']='ReviewLogs.html#periodic-meeting';
$userLink['Decision']='ReviewLogs.html#decision';
$userLink['Question']='ReviewLogs.html#question';
$userLink['Deliverable']='ReviewLogs.html#deliverables';
$userLink['Incoming']='ReviewLogs.html#incomings';
$userLink['Product']='ConfigurationManagement.html#product';
$userLink['ProductVersion']='ConfigurationManagement.html#product-version';
$userLink['Component']='ConfigurationManagement.html#component';
$userLink['ComponentVersion']='ConfigurationManagement.html#component-version';
$userLink['Resource']='Resource.html#resource';
$userLink['ResourceTeam']='Resource.html#pool';
$userLink['User']='User.html#user';
$userLink['Team']='Resource.html#team';
$userLink['CalendarDefinition']='Resource.html#calendar';
$userLink['Client']='Customer.html#customer';
$userLink['Contact']='Customer.html#contact';
$userLink['Provider']='Provider.html';
$userLink['Recipient']='Recipient.html';
$userLink['Context']='Context.html';
$userLink['Affectation']='Affectation.html';
$userLink['DocumentDirectory']='DocumentDirectory.html';
$userLink['Mail']='Tools.html#emails-sent';
$userLink['Alert']='Tools.html#alerts';
$userLink['Message']='Tools.html#message';
$userLink['Import']='Tools.html#import-data';
$userLink['Workflow']='ControlAutomation.html#workflow';
$userLink['EmailTemplate']='ControlAutomation.html#email-template';
$userLink['StatusMail']='ControlAutomation.html#mail-on-event';
$userLink['StatusMailPerProject']='ControlAutomation.html#mail-on-event';
$userLink['TicketDelay']='ControlAutomation.html#delay-for-ticket';
$userLink['TicketDelayPerProject']='ControlAutomation.html#delay-for-ticket';
$userLink['IndicatorDefinition']='ControlAutomation.html#indicator';
$userLink['IndicatorDefinitionPerProject']='ControlAutomation.html#indicator';
$userLink['KpiDefinition']='ControlAutomation.html#kpi-definitions';
$userLink['JoblistDefinition']='ControlAutomation.html#jobList';
//AlainForma
$userLink['Notification']='ControlAutomation.html#notification-system';
$userLink['NotificationDefinition']='ControlAutomation.html#notification-system';
$userLink['DashboardRequirement']='RequirementsDashBoard.html';
$userLink['PredefinedNote']='ControlAutomation.html#predefined-notes';
$userLink['ChecklistDefinition']='ControlAutomation.html#checklist-definition';
$userLink['Profile']='AccessRights.html#profile';
$userLink['AccessProfile']='AccessRights.html#access-mode';
$userLink['Habilitation']='AccessRights.html#access-to-forms';
$userLink['HabilitationReport']='AccessRights.html#access-to-reports';
$userLink['AccessRight']='AccessRights.html#access-mode-to-data-project-dependant';
$userLink['AccessRightNoProject']='AccessRights.html#access-mode-to-data-not-project-dependant';
$userLink['HabilitationOther']='AccessRights.html#specific-access-mode';
$userLink['ProjectType']='ListsOfTypes.html#project-type';
$userLink['TicketType']='ListsOfTypes.html#ticket-type';
$userLink['ActivityType']='ListsOfTypes.html#activity-type';
$userLink['MilestoneType']='ListsOfTypes.html#milestone-type';
$userLink['QuotationType']='ListsOfTypes.html#quotation-type';
$userLink['CommandType']='ListsOfTypes.html#order-type';
$userLink['IndividualExpenseType']='ListsOfTypes.html#individual-expense-type';
$userLink['ProjectExpenseType']='ListsOfTypes.html#project-expense-type';
$userLink['ExpenseDetailType']='ListsOfTypes.html#expense-detail-type';
$userLink['BillType']='ListsOfTypes.html#bill-type';
$userLink['PaymentType']='ListsOfTypes.html#payment-type';
$userLink['RiskType']='ListsOfTypes.html#risk-type';
$userLink['OpportunityType']='ListsOfTypes.html#opportunity-type';
$userLink['ActionType']='ListsOfTypes.html#action-type';
$userLink['IssueType']='ListsOfTypes.html#issue-type';
$userLink['MeetingType']='ListsOfTypes.html#meeting-type';
$userLink['DecisionType']='ListsOfTypes.html#decision-type';
$userLink['QuestionType']='ListsOfTypes.html#question-type';
$userLink['MessageType']='ListsOfTypes.html#message-type';
$userLink['DocumentType']='ListsOfTypes.html#document-type';
$userLink['ContextType']='ListsOfTypes.html#context-type';
$userLink['RequirementType']='ListsOfTypes.html#requirement-type';
$userLink['TestCaseType']='ListsOfTypes.html#test-case-type';
$userLink['TestSessionType']='ListsOfTypes.html#test-session-type';
$userLink['ClientType']='ListsOfTypes.html#customer-type';
$userLink['ProviderType']='ListsOfTypes.html#provider-type';
$userLink['Role']='ListsOfValues.html#function';
$userLink['Status']='ListsOfValues.html#status';
$userLink['Resolution']='ListsOfValues.html#resolution';
$userLink['Quality']='ListsOfValues.html#quality-level';
$userLink['Health']='ListsOfValues.html#health-status'; 
$userLink['OverallProgress']='ListsOfValues.html#overall-progress';
$userLink['Trend']='ListsOfValues.html#trend';
$userLink['Likelihood']='ListsOfValues.html#likelihood';
$userLink['Criticality']='ListsOfValues.html#criticality';
$userLink['Severity']='ListsOfValues.html#severity';
$userLink['Urgency']='ListsOfValues.html#urgency';
$userLink['Priority']='ListsOfValues.html#priority';
$userLink['RiskLevel']='ListsOfValues.html#risk-level';
$userLink['Feasibility']='ListsOfValues.html#feasibility';
$userLink['Efficiency']='ListsOfValues.html#efficiency';
$userLink['PaymentDelay']='ListsOfValues.html#payment-deadline';
$userLink['PaymentMode']='ListsOfValues.html#payment-method';
$userLink['DeliveryMode']='ListsOfValues.html#delivery-mode';
$userLink['MeasureUnit']='ListsOfValues.html#measure-unit';
$userLink['Administration']='Administration.html#administration-console';
$userLink['Plugin']='Plugin.html';
$userLink['Audit']='Administration.html#audit-connections';
$userLink['GlobalParameters']='globalParameters';
$userLink['Gallery']='FinancialGallery.html';
$userLink['Organization']='Organization.html';
$userLink['Tender']='Expenses.html#tenders';
$userLink['CallForTender']='Expenses.html#call-for-tenders';
$userLink['TransverseFeatures']='TransverseFeatures.html';
$userLink['Language']='ListsOfValues.html#languages';
$userLink['DeliverableStatus']='ListsOfValues.html#deliverable-status';
$userLink['IncomingStatus']='ListsOfValues.html#incoming-status';
$userLink['DeliverableWeight']='ListsOfValues.html#deliverabl-eweight';
$userLink['IncomingWeight']='ListsOfValues.html#incoming-weight';
$userLink['VersionsPlanning']='ConfigurationManagement.html#versions-planning';
$userLink['ShortCut']='Gui.html#keyboard-functionality';
$section=null;
if (isset($_REQUEST['section'])) {
  $section=$_REQUEST['section']; // Note: can only be a valid index in $userLink. Value is not echo'ed in HTML.
}
if (substr($section,0,7)=='Plugin_') {
  $plugin=substr($section,7);
  $pluginRoot="../plugin/$plugin/docs";
  if (file_exists("$pluginRoot/$plugin.html")) {
    $url="$pluginRoot/$plugin.html";
    echo $url;
    exit;
  } else if (file_exists("$pluginRoot/$plugin.pdf")) {
    $url="$pluginRoot/$plugin.pdf";
    echo $url;
    exit;
  } else {
    $section="Plugin";
  }
}

$userRoot='../docs/user/html_en/';
$url=$userRoot.$userLink['Welcome'];
if ($section and isset($userLink[$section])) {
  $url=$userRoot.$userLink[$section];
} 
echo $url;
