throw new Exception($sMessage); } else { // Note: sNoise is an html output, but so far it was ok for me (e.g. showing the entire call stack) throw new Exception('Syntax error in configuration file: <tt>' . $sNoise . '</tt>'); } } } ///////////////////////////////////////////////////////////////////// // Main program // LoginWebPage::DoLogin(true); // Check user rights and prompt if needed (must be admin) //$sOperation = utils::ReadParam('operation', 'menu'); //$oAppContext = new ApplicationContext(); $oP = new iTopWebPage(Dict::S('config-edit-title')); $oP->set_base(utils::GetAbsoluteUrlAppRoot() . 'pages/'); try { $sOperation = utils::ReadParam('operation', ''); $oP->add("<h1>" . Dict::S('config-edit-title') . "</h1>"); if (MetaModel::GetConfig()->Get('demo_mode')) { $oP->add("<div class=\"header_message message_info\">Sorry, iTop is in <b>demonstration mode</b>: the configuration file cannot be edited.</div>"); } else { $oP->add_style(<<<EOF textarea { \t-webkit-box-sizing: border-box; \t-moz-box-sizing: border-box; \tbox-sizing: border-box; \twidth: 100%; \theight: 550px; }