| Server IP : 195.130.67.5 / Your IP : 216.73.216.231 Web Server : Microsoft-IIS/10.0 System : Windows NT WEBSERVER1 10.0 build 17763 (Windows Server 2016) i586 User : IUSR ( 0) PHP Version : 7.4.19 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : C:/Old Sites/moke/modules/mod_php/elements/ |
Upload File : |
<?php
/**
* Code Syntax Highlighting Parameter Element/Field
* @author gabe@fijiwedesign.com
* @link http://www.fijiwebdesign.com/
* @copyright (c) 2010 Fiji Web Design
*/
// no direct access
defined('_JEXEC') or die('Restricted access');
class JFormFieldCode extends JFormField
{
public $type = 'Code';
protected function getInput()
{
$html = '
<script type="text/javascript">
$(window).addEvent("domready", function() {
var element = document.getElementById("' . $this->id . '");
Joomla._submitbutton = Joomla.submitbutton;
Joomla.submitbutton = function(task) {
element.value = encodeURIComponent(element.value);
Joomla._submitbutton(task);
};
element.value = decodeURIComponent(element.value);
});
</script>
<textarea id="' . $this->id . '" name="'. $this->name . '" style="width:99%;height:300px;">' . htmlentities($this->value, ENT_QUOTES, 'UTF-8') . '</textarea>
';
return $html;
}
}