Container::getRouter()->generate('administration'), 'name' => get_lang('PlatformAdmin')); // 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('ServiceActivated'); } $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 = array(); // 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('ConfigureExtensions'); Display::display_header($nameTool); ?>
*/ ?>
'img-responsive')); ?>
addElement('text', 'host', get_lang('Host')); //$form -> addElement('html','

'); $form -> addElement('text', 'port', get_lang('Port')); //$form -> addElement('html','

'); $form -> addElement('text', 'user', get_lang('UserOnHost')); //$form -> addElement('html','

'); $form -> addElement('text', 'ftp_password', get_lang('FtpPassword')); //$form -> addElement('html','

'); $form -> addElement('text', 'path_to_lzx', get_lang('PathToLzx')); //$form -> addElement('html','

'); $options = array( '540x405'=>'540x405', '640x480'=>'640x480', '720x540'=>'720x540', '800x600'=>'800x600', '1000x750'=>'1000x750' ); $form -> addElement('select', 'size', get_lang('SlideSize'), $options); $form -> addElement('hidden', 'extension_code', 'ppt2lp'); $defaults = array(); $renderer = $form -> defaultRenderer(); $renderer -> setElementTemplate('
{label}
{element}
'); //$form -> addElement('html','

'); if(in_array('service_ppt2lp',$listActiveServices)) { $sql = 'SELECT subkey, selected_value FROM '.$tbl_settings_current.' WHERE variable = "service_ppt2lp" AND subkey <> "active"'; $rs = Database::query($sql); while($row = Database::fetch_array($rs,'ASSOC')) { $defaults[$row['subkey']] = $row['selected_value']; } $form->addButtonSave(get_lang('ReconfigureExtension'), 'activeExtension'); } else { $defaults['host'] = 'localhost'; $defaults['port'] = '2002'; $defaults['size'] = '720x540'; $form->addButtonSave(get_lang('ActivateExtension'), 'activeExtension'); } $form -> setDefaults($defaults); $form -> display(); echo '
'; ?>
*/ /*
*/ ?>