| Server IP : 202.61.199.114 / Your IP : 216.73.217.139 Web Server : nginx/1.22.1 System : Linux de.arni-solutions.de 6.1.0-49-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.174-1 (2026-05-26) x86_64 User : web20 ( 1018) PHP Version : 8.4.23 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /var/www/clients/client2/api.pacim.de/web/Codiad/components/fileext_textmode/ |
Upload File : |
<?php
/*
* (c) Codiad & ccvca (https://github.com/ccvca)
* @author ccvca (https://github.com/ccvca)
* This Code is released under the same licence as Codiad (https://github.com/Codiad/Codiad)
* See [root]/license.txt for more. This information must remain intact.
*/
require_once 'class.fileextension_textmode.php';
//check Session is done in constructor
$fileExTM = new fileextension_textmode();
if(!isset($_GET['action'])){
die('Missing $_GET["action"]');
}
switch($_GET['action']){
//////////////////////////////////////////////////////////////////
//The form for edit the assotiations
//////////////////////////////////////////////////////////////////
case 'fileextension_textmode_form':
if(!Common::checkAccess()){
die('You are not allowed to edit the file extensions.');
}
//////////////////////////////////////////////////////////////////
//Reading the current extensions
//////////////////////////////////////////////////////////////////
$ext = false;
//ignore warnings
$ext = @Common::getJSON(fileextension_textmode::storeFilename);
if(!is_array($ext)){
//default extensions
$ext = $fileExTM->getDefaultExtensions();
}
$textModes = $fileExTM->getAvailiableTextModes();
if(!@ksort($ext)){
die(json_encode(array('status' => 'error', 'msg' => 'Internal PHP error.') ));
}
?>
<label><span class="icon-pencil big-icon"></span><?php i18n("Extensions"); ?></label>
<table id="FileExtModeHeader">
<thead>
<tr>
<th><?php i18n("Extension"); ?></th>
<th><?php i18n("Mode"); ?></th>
</tr>
</thead>
</table>
<div id="FileExtTextModeDiv">
<table id="FileExtTextModeTable">
<tbody id="FileExtTextModeTableTbody">
<?php
foreach($ext as $ex => $mode){
//////////////////////////////////////////////////////////////////
//print only valid assotiations
//////////////////////////////////////////////////////////////////
if(!$fileExTM->validTextMode($mode)){
continue;
}?>
<tr>
<td><input class="FileExtension" type="text" name="extension[]" value="<?php echo $ex ?>" /></td>
<td><?php echo $fileExTM->getTextModeSelect($mode)?></td>
</tr>
<?php
}
?>
</tbody>
</table>
</div>
<br>
<button class="btn-left" onClick="codiad.fileext_textmode.addFieldToForm()"><?php i18n("New Extension"); ?></button>
<?php
break;
}
?>