|
|
@ -31,7 +31,8 @@ if (isset($_POST['activeExtension'])) { |
|
|
|
while($row = Database::fetch_array($rs)){ |
|
|
|
while($row = Database::fetch_array($rs)){ |
|
|
|
if(!empty($_POST['visio_host'])) { |
|
|
|
if(!empty($_POST['visio_host'])) { |
|
|
|
$tool_table = Database::get_course_table(TABLE_TOOL_LIST); |
|
|
|
$tool_table = Database::get_course_table(TABLE_TOOL_LIST); |
|
|
|
$select = "SELECT id FROM $tool_table WHERE c_id =".$row['id']." AND name='".TOOL_VISIO_CONFERENCE."'"; |
|
|
|
$select = "SELECT id FROM $tool_table |
|
|
|
|
|
|
|
WHERE c_id =".$row['id']." AND name='".TOOL_VISIO_CONFERENCE."'"; |
|
|
|
$selectres = Database::query($select); |
|
|
|
$selectres = Database::query($select); |
|
|
|
if (Database::num_rows($selectres)<1) { |
|
|
|
if (Database::num_rows($selectres)<1) { |
|
|
|
$sql = 'INSERT INTO '.$tool_table.' SET |
|
|
|
$sql = 'INSERT INTO '.$tool_table.' SET |
|
|
@ -46,9 +47,10 @@ if (isset($_POST['activeExtension'])) { |
|
|
|
category="interaction"'; |
|
|
|
category="interaction"'; |
|
|
|
Database::query($sql); |
|
|
|
Database::query($sql); |
|
|
|
} |
|
|
|
} |
|
|
|
$select = "SELECT id FROM $tool_table WHERE c_id =".$row['id']." AND name='".TOOL_VISIO_CLASSROOM."'"; |
|
|
|
$select = "SELECT id FROM $tool_table |
|
|
|
|
|
|
|
WHERE c_id =".$row['id']." AND name='".TOOL_VISIO_CLASSROOM."'"; |
|
|
|
$selectres = Database::query($select); |
|
|
|
$selectres = Database::query($select); |
|
|
|
if(Database::num_rows($selectres)<1) { |
|
|
|
if (Database::num_rows($selectres) < 1) { |
|
|
|
$sql = 'INSERT INTO '.$tool_table.' SET |
|
|
|
$sql = 'INSERT INTO '.$tool_table.' SET |
|
|
|
c_id = '.$row['id'].', |
|
|
|
c_id = '.$row['id'].', |
|
|
|
name="'.TOOL_VISIO_CLASSROOM.'", |
|
|
|
name="'.TOOL_VISIO_CLASSROOM.'", |
|
|
@ -90,12 +92,12 @@ if (isset($_POST['activeExtension'])) { |
|
|
|
AND subkey="visio_use_rtmpt"'; |
|
|
|
AND subkey="visio_use_rtmpt"'; |
|
|
|
$rs = Database::query($sql); |
|
|
|
$rs = Database::query($sql); |
|
|
|
|
|
|
|
|
|
|
|
if(empty($message)) { |
|
|
|
if (empty($message)) { |
|
|
|
$message = get_lang('ServiceReconfigured'); |
|
|
|
$message = get_lang('ServiceReconfigured'); |
|
|
|
} |
|
|
|
} |
|
|
|
break; |
|
|
|
break; |
|
|
|
|
|
|
|
|
|
|
|
case 'ppt2lp' : |
|
|
|
case 'ppt2lp': |
|
|
|
$sql = 'UPDATE '.$tbl_settings_current.' SET |
|
|
|
$sql = 'UPDATE '.$tbl_settings_current.' SET |
|
|
|
selected_value="true" |
|
|
|
selected_value="true" |
|
|
|
WHERE variable="service_ppt2lp" |
|
|
|
WHERE variable="service_ppt2lp" |
|
|
@ -142,13 +144,10 @@ if (isset($_POST['activeExtension'])) { |
|
|
|
WHERE variable="service_ppt2lp" |
|
|
|
WHERE variable="service_ppt2lp" |
|
|
|
AND subkey="size"'; |
|
|
|
AND subkey="size"'; |
|
|
|
Database::query($sql); |
|
|
|
Database::query($sql); |
|
|
|
|
|
|
|
|
|
|
|
break; |
|
|
|
break; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$listActiveServices = array(); |
|
|
|
$listActiveServices = array(); |
|
|
|
|
|
|
|
|
|
|
|
// get the list of active services |
|
|
|
// get the list of active services |
|
|
@ -163,14 +162,11 @@ while($row = Database::fetch_array($rs)){ |
|
|
|
// javascript to handle accordion behaviour |
|
|
|
// javascript to handle accordion behaviour |
|
|
|
$javascript_message = ''; |
|
|
|
$javascript_message = ''; |
|
|
|
if(!empty($message)){ |
|
|
|
if(!empty($message)){ |
|
|
|
$javascript_message = |
|
|
|
$javascript_message = ' |
|
|
|
' |
|
|
|
|
|
|
|
document.getElementById("message").style.display = "block"; |
|
|
|
document.getElementById("message").style.display = "block"; |
|
|
|
var timer = setTimeout(hideMessage,5000); |
|
|
|
var timer = setTimeout(hideMessage, 5000);'; |
|
|
|
'; |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
$htmlHeadXtra[]= ' |
|
|
|
$htmlHeadXtra[]= '<script> |
|
|
|
<script type="text/javascript"> |
|
|
|
|
|
|
|
var listeDiv; |
|
|
|
var listeDiv; |
|
|
|
var extensionsHeader = new Array(); |
|
|
|
var extensionsHeader = new Array(); |
|
|
|
var extensionsContent = new Array(); |
|
|
|
var extensionsContent = new Array(); |
|
|
@ -305,56 +301,50 @@ Display::display_header($nameTool); |
|
|
|
<div class="col-md-7"> |
|
|
|
<div class="col-md-7"> |
|
|
|
<form method="POST" class="form-horizontal" action="<?php echo api_get_self(); ?>">
|
|
|
|
<form method="POST" class="form-horizontal" action="<?php echo api_get_self(); ?>">
|
|
|
|
<?php |
|
|
|
<?php |
|
|
|
|
|
|
|
|
|
|
|
$form = new FormValidator('ppt2lp'); |
|
|
|
$form = new FormValidator('ppt2lp'); |
|
|
|
$form -> addElement('text', 'host', get_lang('Host')); |
|
|
|
$form->addElement('text', 'host', get_lang('Host')); |
|
|
|
//$form -> addElement('html','<br /><br />'); |
|
|
|
//$form -> addElement('html','<br /><br />'); |
|
|
|
$form -> addElement('text', 'port', get_lang('Port')); |
|
|
|
$form->addElement('text', 'port', get_lang('Port')); |
|
|
|
//$form -> addElement('html','<br /><br />'); |
|
|
|
//$form -> addElement('html','<br /><br />'); |
|
|
|
$form -> addElement('text', 'user', get_lang('UserOnHost')); |
|
|
|
$form->addElement('text', 'user', get_lang('UserOnHost')); |
|
|
|
//$form -> addElement('html','<br /><br />'); |
|
|
|
//$form -> addElement('html','<br /><br />'); |
|
|
|
$form -> addElement('text', 'ftp_password', get_lang('FtpPassword')); |
|
|
|
$form->addElement('text', 'ftp_password', get_lang('FtpPassword')); |
|
|
|
//$form -> addElement('html','<br /><br />'); |
|
|
|
//$form -> addElement('html','<br /><br />'); |
|
|
|
$form -> addElement('text', 'path_to_lzx', get_lang('PathToLzx')); |
|
|
|
$form->addElement('text', 'path_to_lzx', get_lang('PathToLzx')); |
|
|
|
//$form -> addElement('html','<br /><br />'); |
|
|
|
//$form -> addElement('html','<br /><br />'); |
|
|
|
$options = ChamiloApi::getDocumentConversionSizes(); |
|
|
|
$options = ChamiloApi::getDocumentConversionSizes(); |
|
|
|
$form -> addElement('select', 'size', get_lang('SlideSize'), $options); |
|
|
|
$form->addElement('select', 'size', get_lang('SlideSize'), $options); |
|
|
|
|
|
|
|
$form->addElement('hidden', 'extension_code', 'ppt2lp'); |
|
|
|
|
|
|
|
|
|
|
|
$form -> addElement('hidden', 'extension_code', 'ppt2lp'); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$defaults = array(); |
|
|
|
$defaults = array(); |
|
|
|
$renderer = $form -> defaultRenderer(); |
|
|
|
$renderer = $form->defaultRenderer(); |
|
|
|
$renderer -> setElementTemplate('<div style="text-align:left">{label}</div><div style="text-align:left">{element}</div>'); |
|
|
|
$renderer->setElementTemplate( |
|
|
|
//$form -> addElement('html','<br /><br />'); |
|
|
|
'<div style="text-align:left">{label}</div><div style="text-align:left">{element}</div>' |
|
|
|
if(in_array('service_ppt2lp',$listActiveServices)) |
|
|
|
); |
|
|
|
{ |
|
|
|
if (in_array('service_ppt2lp', $listActiveServices)) { |
|
|
|
$sql = 'SELECT subkey, selected_value FROM '.$tbl_settings_current.' |
|
|
|
$sql = 'SELECT subkey, selected_value FROM '.$tbl_settings_current.' |
|
|
|
WHERE variable = "service_ppt2lp" |
|
|
|
WHERE variable = "service_ppt2lp" |
|
|
|
AND subkey <> "active"'; |
|
|
|
AND subkey <> "active"'; |
|
|
|
$rs = Database::query($sql); |
|
|
|
$rs = Database::query($sql); |
|
|
|
while($row = Database::fetch_array($rs,'ASSOC')) |
|
|
|
while ($row = Database::fetch_array($rs, 'ASSOC')) { |
|
|
|
{ |
|
|
|
|
|
|
|
$defaults[$row['subkey']] = $row['selected_value']; |
|
|
|
$defaults[$row['subkey']] = $row['selected_value']; |
|
|
|
} |
|
|
|
} |
|
|
|
$form->addButtonSave(get_lang('ReconfigureExtension'), 'activeExtension'); |
|
|
|
$form->addButtonSave(get_lang('ReconfigureExtension'), 'activeExtension'); |
|
|
|
} |
|
|
|
} else { |
|
|
|
else { |
|
|
|
|
|
|
|
$defaults['host'] = 'localhost'; |
|
|
|
$defaults['host'] = 'localhost'; |
|
|
|
$defaults['port'] = '2002'; |
|
|
|
$defaults['port'] = '2002'; |
|
|
|
$defaults['size'] = '720x540'; |
|
|
|
$defaults['size'] = '720x540'; |
|
|
|
$form->addButtonSave(get_lang('ActivateExtension'), 'activeExtension'); |
|
|
|
$form->addButtonSave(get_lang('ActivateExtension'), 'activeExtension'); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
$form -> setDefaults($defaults); |
|
|
|
$form->setDefaults($defaults); |
|
|
|
$form -> display(); |
|
|
|
$form->display(); |
|
|
|
echo '<br />'; |
|
|
|
echo '<br />'; |
|
|
|
?> |
|
|
|
?> |
|
|
|
</form> |
|
|
|
</form> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
<?php |
|
|
|
<?php |
|
|
|
/* |
|
|
|
/* |
|
|
|
<!-- EPHORUS --> |
|
|
|
<!-- EPHORUS --> |
|
|
@ -497,6 +487,5 @@ Display::display_header($nameTool); |
|
|
|
*/ ?> |
|
|
|
*/ ?> |
|
|
|
</div><!-- /content --> |
|
|
|
</div><!-- /content --> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<?php |
|
|
|
<?php |
|
|
|
Display::display_footer(); |
|
|
|
Display::display_footer(); |
|
|
|