'index.php', 'name' => get_lang('Administration')]; // Database Table Definitions $tbl_settings_current = Database::get_main_table(TABLE_MAIN_SETTINGS_CURRENT); $message = ''; if (isset($_POST['activeExtension'])) { switch ($_POST['extension_code']) { case 'ppt2lp': $sql = 'UPDATE '.$tbl_settings_current.' SET selected_value="true" WHERE variable="service_ppt2lp" AND subkey="active"'; $rs = Database::query($sql); if (Database::affected_rows($rs) > 0) { $message = get_lang('Service activated'); } $sql = 'UPDATE '.$tbl_settings_current.' SET selected_value="'.addslashes($_POST['host']).'" WHERE variable="service_ppt2lp" AND subkey="host"'; Database::query($sql); $sql = 'UPDATE '.$tbl_settings_current.' SET selected_value="'.addslashes($_POST['port']).'" WHERE variable="service_ppt2lp" AND subkey="port"'; Database::query($sql); $sql = 'UPDATE '.$tbl_settings_current.' SET selected_value="'.addslashes($_POST['ftp_password']).'" WHERE variable="service_ppt2lp" AND subkey="ftp_password"'; Database::query($sql); $sql = 'UPDATE '.$tbl_settings_current.' SET selected_value="'.addslashes($_POST['user']).'" WHERE variable="service_ppt2lp" AND subkey="user"'; Database::query($sql); $sql = 'UPDATE '.$tbl_settings_current.' SET selected_value="'.addslashes($_POST['path_to_lzx']).'" WHERE variable="service_ppt2lp" AND subkey="path_to_lzx"'; Database::query($sql); $sql = 'UPDATE '.$tbl_settings_current.' SET selected_value="'.addslashes($_POST['size']).'" WHERE variable="service_ppt2lp" AND subkey="size"'; Database::query($sql); break; } } $listActiveServices = []; // get the list of active services $sql = 'SELECT variable FROM '.$tbl_settings_current.' WHERE variable LIKE "service_%" AND subkey="active" and selected_value="true"'; $rs = Database::query($sql); while ($row = Database::fetch_array($rs)) { $listActiveServices[] = $row['variable']; } // javascript to handle accordion behaviour $javascript_message = ''; if (!empty($message)) { $javascript_message = ' document.getElementById("message").style.display = "block"; var timer = setTimeout(hideMessage, 5000);'; } $htmlHeadXtra[] = ''; $nameTool = get_lang('Configure extensions'); Display::display_header($nameTool); ?>