├── .gitignore ├── .htaccess ├── LySystem ├── LyCore │ ├── LyCookie.php │ ├── LyCore.php │ ├── LyFile.php │ ├── LyGet.php │ ├── LyPost.php │ ├── LyRequest.php │ ├── LySafe.php │ ├── LyTime.php │ ├── LyUrl.php │ ├── helper │ │ ├── mime.php │ │ └── system.php │ ├── library │ │ ├── CLibMail.php │ │ ├── phpmailer.php │ │ └── smtp.php │ └── page │ │ ├── 404.php │ │ └── error.php ├── LyLib │ ├── LibFile.php │ ├── LibFilter.php │ ├── LibLogin.php │ ├── LibMenu.php │ └── LibTemplate.php ├── LyPage │ ├── About.php │ ├── Api.php │ ├── Help.php │ ├── Login.php │ └── Welcome.php └── LyView │ ├── about.php │ ├── api_list.php │ ├── footer.php │ ├── header.php │ ├── help.php │ ├── index.php │ ├── login.php │ └── menu.php ├── README.md ├── config.php ├── css ├── colorbox.css ├── images │ ├── border.png │ ├── controls.png │ ├── ie6 │ │ ├── borderBottomCenter.png │ │ ├── borderBottomLeft.png │ │ ├── borderBottomRight.png │ │ ├── borderMiddleLeft.png │ │ ├── borderMiddleRight.png │ │ ├── borderTopCenter.png │ │ ├── borderTopLeft.png │ │ └── borderTopRight.png │ ├── loading.gif │ ├── loading_background.png │ ├── overlay.png │ └── uploadify-cancel.png ├── style.css └── uploadify.css ├── edit_area ├── autocompletion.js ├── edit_area.css ├── edit_area.js ├── edit_area_compressor.php ├── edit_area_full.gz ├── edit_area_full.js ├── edit_area_functions.js ├── edit_area_loader.js ├── elements_functions.js ├── highlight.js ├── images │ ├── autocompletion.gif │ ├── close.gif │ ├── fullscreen.gif │ ├── go_to_line.gif │ ├── help.gif │ ├── highlight.gif │ ├── load.gif │ ├── move.gif │ ├── newdocument.gif │ ├── opacity.png │ ├── processing.gif │ ├── redo.gif │ ├── reset_highlight.gif │ ├── save.gif │ ├── search.gif │ ├── smooth_selection.gif │ ├── spacer.gif │ ├── statusbar_resize.gif │ ├── undo.gif │ └── word_wrap.gif ├── keyboard.js ├── langs │ ├── bg.js │ ├── cs.js │ ├── de.js │ ├── dk.js │ ├── en.js │ ├── eo.js │ ├── es.js │ ├── fi.js │ ├── fr.js │ ├── hr.js │ ├── it.js │ ├── ja.js │ ├── mk.js │ ├── nl.js │ ├── pl.js │ ├── pt.js │ ├── ru.js │ ├── sk.js │ └── zh.js ├── license_apache.txt ├── license_bsd.txt ├── license_lgpl.txt ├── manage_area.js ├── plugins │ ├── charmap │ │ ├── charmap.js │ │ ├── css │ │ │ └── charmap.css │ │ ├── images │ │ │ └── charmap.gif │ │ ├── jscripts │ │ │ └── map.js │ │ ├── langs │ │ │ ├── bg.js │ │ │ ├── cs.js │ │ │ ├── de.js │ │ │ ├── dk.js │ │ │ ├── en.js │ │ │ ├── eo.js │ │ │ ├── es.js │ │ │ ├── fr.js │ │ │ ├── hr.js │ │ │ ├── it.js │ │ │ ├── ja.js │ │ │ ├── mk.js │ │ │ ├── nl.js │ │ │ ├── pl.js │ │ │ ├── pt.js │ │ │ ├── ru.js │ │ │ ├── sk.js │ │ │ └── zh.js │ │ └── popup.html │ └── test │ │ ├── css │ │ └── test.css │ │ ├── images │ │ └── test.gif │ │ ├── langs │ │ ├── bg.js │ │ ├── cs.js │ │ ├── de.js │ │ ├── dk.js │ │ ├── en.js │ │ ├── eo.js │ │ ├── es.js │ │ ├── fr.js │ │ ├── hr.js │ │ ├── it.js │ │ ├── ja.js │ │ ├── mk.js │ │ ├── nl.js │ │ ├── pl.js │ │ ├── pt.js │ │ ├── ru.js │ │ ├── sk.js │ │ └── zh.js │ │ ├── test.js │ │ └── test2.js ├── reg_syntax.js ├── reg_syntax │ ├── basic.js │ ├── brainfuck.js │ ├── c.js │ ├── coldfusion.js │ ├── cpp.js │ ├── css.js │ ├── html.js │ ├── java.js │ ├── js.js │ ├── pas.js │ ├── perl.js │ ├── php.js │ ├── python.js │ ├── robotstxt.js │ ├── ruby.js │ ├── sql.js │ ├── tsql.js │ ├── vb.js │ └── xml.js ├── regexp.js ├── resize_area.js ├── search_replace.js └── template.html ├── images ├── LyFM.png ├── alipay_pay.png ├── audio_ico.png ├── file_ico.png ├── folder_ico.png ├── img_ico.png ├── pdf_ico.png ├── text_ico.png ├── video_ico.png └── zip_ico.png ├── index.php ├── js ├── LyApi.js ├── LyCode.js ├── LyEdit.js ├── LyUpload.js ├── LyUpload2.js ├── full.js ├── full.min.js ├── jquery-1.8.2.min.js ├── jquery.colorbox-min.js ├── jquery.md5.js ├── jquery.uploadify.min.js └── load.js ├── license.txt ├── nginx.conf └── swf └── uploadify.swf /.gitignore: -------------------------------------------------------------------------------- 1 | ################# 2 | ## Eclipse 3 | ################# 4 | 5 | *.pydevproject 6 | .project 7 | .metadata 8 | bin/ 9 | tmp/ 10 | *.tmp 11 | *.bak 12 | *.swp 13 | *~.nib 14 | local.properties 15 | .classpath 16 | .settings/ 17 | .loadpath 18 | 19 | # External tool builders 20 | .externalToolBuilders/ 21 | 22 | # Locally stored "Eclipse launch configurations" 23 | *.launch 24 | 25 | # CDT-specific 26 | .cproject 27 | 28 | # PDT-specific 29 | .buildpath 30 | 31 | 32 | ################# 33 | ## Visual Studio 34 | ################# 35 | 36 | ## Ignore Visual Studio temporary files, build results, and 37 | ## files generated by popular Visual Studio add-ons. 38 | 39 | # User-specific files 40 | *.suo 41 | *.user 42 | *.sln.docstates 43 | 44 | # Build results 45 | [Dd]ebug/ 46 | [Rr]elease/ 47 | *_i.c 48 | *_p.c 49 | *.ilk 50 | *.meta 51 | *.obj 52 | *.pch 53 | *.pdb 54 | *.pgc 55 | *.pgd 56 | *.rsp 57 | *.sbr 58 | *.tlb 59 | *.tli 60 | *.tlh 61 | *.tmp 62 | *.vspscc 63 | .builds 64 | *.dotCover 65 | 66 | ## TODO: If you have NuGet Package Restore enabled, uncomment this 67 | #packages/ 68 | 69 | # Visual C++ cache files 70 | ipch/ 71 | *.aps 72 | *.ncb 73 | *.opensdf 74 | *.sdf 75 | 76 | # Visual Studio profiler 77 | *.psess 78 | *.vsp 79 | 80 | # ReSharper is a .NET coding add-in 81 | _ReSharper* 82 | 83 | # Installshield output folder 84 | [Ee]xpress 85 | 86 | # DocProject is a documentation generator add-in 87 | DocProject/buildhelp/ 88 | DocProject/Help/*.HxT 89 | DocProject/Help/*.HxC 90 | DocProject/Help/*.hhc 91 | DocProject/Help/*.hhk 92 | DocProject/Help/*.hhp 93 | DocProject/Help/Html2 94 | DocProject/Help/html 95 | 96 | # Click-Once directory 97 | publish 98 | 99 | # Others 100 | [Bb]in 101 | [Oo]bj 102 | sql 103 | TestResults 104 | *.Cache 105 | ClientBin 106 | stylecop.* 107 | ~$* 108 | *.dbmdl 109 | Generated_Code #added for RIA/Silverlight projects 110 | 111 | # Backup & report files from converting an old project file to a newer 112 | # Visual Studio version. Backup files are not needed, because we have git ;-) 113 | _UpgradeReport_Files/ 114 | Backup*/ 115 | UpgradeLog*.XML 116 | 117 | 118 | 119 | ############ 120 | ## Windows 121 | ############ 122 | 123 | # Windows image file caches 124 | Thumbs.db 125 | 126 | # Folder config file 127 | Desktop.ini 128 | 129 | 130 | ############# 131 | ## Python 132 | ############# 133 | 134 | *.py[co] 135 | 136 | # Packages 137 | *.egg 138 | *.egg-info 139 | dist 140 | build 141 | eggs 142 | parts 143 | bin 144 | var 145 | sdist 146 | develop-eggs 147 | .installed.cfg 148 | 149 | # Installer logs 150 | pip-log.txt 151 | 152 | # Unit test / coverage reports 153 | .coverage 154 | .tox 155 | 156 | #Translations 157 | *.mo 158 | 159 | #Mr Developer 160 | .mr.developer.cfg 161 | 162 | # Mac crap 163 | .DS_Store 164 | 165 | .idea 166 | -------------------------------------------------------------------------------- /.htaccess: -------------------------------------------------------------------------------- 1 | RewriteEngine On 2 | RewriteBase /file/ 3 | RewriteCond %{REQUEST_FILENAME} !-f 4 | RewriteRule ^(.*)$ /file/index.php/$1 [L] 5 | 6 | #禁止访问系统目录和配置目录 7 | RewriteCond %{REQUEST_URI} ^(\/file\/LySystem\/).* [NC] 8 | RewriteRule ^(.*)$ /file/index.php [L] -------------------------------------------------------------------------------- /LySystem/LyCore/LyCookie.php: -------------------------------------------------------------------------------- 1 | 6 | */ 7 | class LyCookie{ 8 | private $domain; 9 | private $hash; 10 | private $prefix; 11 | function __construct(){ 12 | $this->domain = get_config('system','cookie_domain'); 13 | $this->hash = get_config('system','cookie_hash'); 14 | $this->prefix = get_config('system','cookie_prefix'); 15 | $this->_array = &$_COOKIE; 16 | } 17 | public function get(){ 18 | $arr = func_get_args(); 19 | $array = $_COOKIE; 20 | foreach($arr as $v){ 21 | if(isset($array[$this->prefix.$v])){ 22 | $array = $array[$this->prefix.$v]; 23 | }else{ 24 | return false; 25 | } 26 | } 27 | $this->decode_array($array); 28 | return $array; 29 | } 30 | public function set($name,$value,$expire=0,$path='',$domain='',$secure=false,$httponly=false){ 31 | setcookie($this->prefix.$name,$this->encode($value),$expire,$this->get_path($path),$this->get_domain($domain),$secure,$httponly); 32 | } 33 | public function del($name,$path='',$domain=''){ 34 | setcookie($this->prefix.$name,"",0,$this->get_path($path),$this->get_domain($domain),''); 35 | } 36 | private function get_path($path){ 37 | if(''==$path){ 38 | $path = URL_PATH; 39 | }else{ 40 | $path = trim($path); 41 | } 42 | $path= str_replace('\\',"/",$path); 43 | return $path; 44 | } 45 | private function get_domain($domain){ 46 | $host = $_SERVER['HTTP_HOST']; 47 | $i = strpos($host,":"); 48 | if($i>0){ 49 | $host = substr($host,0,$i); 50 | } 51 | if(strpos($host,".")===false){ 52 | return $host; 53 | } 54 | if(strlen($host) >3 && is_numeric(str_replace(".","",substr($host,-3)))){ 55 | //排除HOST为IP的情形 56 | return $domain; 57 | } 58 | if(''==$domain){ 59 | if(!$this->domain){ 60 | if(strpos($host,'www.')===0){ 61 | return substr($host,3); 62 | }else{ 63 | return ".".$host; 64 | } 65 | }else{ 66 | return $this->domain; 67 | } 68 | }else{ 69 | return $domain; 70 | } 71 | } 72 | private function encode($cookie){ 73 | if($this->hash){ 74 | return get_core('LySafe')->encrypt($cookie,$this->hash); 75 | }else{ 76 | return $cookie; 77 | } 78 | } 79 | private function decode($cookie){ 80 | if($this->hash){ 81 | return get_core('LySafe')->decrypt($cookie,$this->hash); 82 | }else{ 83 | return $cookie; 84 | } 85 | } 86 | private function decode_array(&$array){ 87 | if($this->hash){ 88 | if(is_array($array)){ 89 | foreach($array as $id => $v){ 90 | if(is_array($v)){ 91 | $this->decode_array($array[$id]); 92 | }else{ 93 | $array[$id] = $this->decode($array[$id]); 94 | } 95 | } 96 | }else{ 97 | $array = $this->decode($array); 98 | } 99 | } 100 | } 101 | } 102 | ?> -------------------------------------------------------------------------------- /LySystem/LyCore/LyGet.php: -------------------------------------------------------------------------------- 1 | 6 | */ 7 | class LyGet extends LyRequest{ 8 | function __construct(){ 9 | $this->_array = &$_GET; 10 | } 11 | public function is_get(){ 12 | return 'GET'==$_SERVER['REQUEST_METHOD']; 13 | } 14 | } 15 | ?> -------------------------------------------------------------------------------- /LySystem/LyCore/LyPost.php: -------------------------------------------------------------------------------- 1 | 6 | */ 7 | class LyPost extends LyRequest{ 8 | function __construct(){ 9 | $this->_array = &$_POST; 10 | } 11 | public function is_post(){ 12 | return 'POST'==$_SERVER['REQUEST_METHOD']; 13 | } 14 | } 15 | ?> -------------------------------------------------------------------------------- /LySystem/LyCore/LyRequest.php: -------------------------------------------------------------------------------- 1 | 6 | */ 7 | class LyRequest{ 8 | public $_array; 9 | function __construct(){ 10 | $this->_array = array(); 11 | } 12 | public function get(){ 13 | $arr = func_get_args(); 14 | $array = $this->_array; 15 | foreach($arr as $v){ 16 | if(isset($array[$v])){ 17 | $array = $array[$v]; 18 | }else{ 19 | return false; 20 | } 21 | } 22 | return $array; 23 | } 24 | public function get_s(){ 25 | $args = func_get_args(); 26 | $rt = call_user_func_array(array($this,'get'),$args); 27 | if(is_array($rt)){ 28 | foreach($rt as $id => $v){ 29 | if(is_array($v)){ 30 | get_core('LySafe')->escape_array($rt[$id]); 31 | }else{ 32 | $rt[$id] = get_core('LySafe')->escape($rt[$id]); 33 | } 34 | } 35 | return $rt; 36 | }else{ 37 | return get_core('LySafe')->escape($rt); 38 | } 39 | } 40 | } 41 | ?> -------------------------------------------------------------------------------- /LySystem/LyCore/LySafe.php: -------------------------------------------------------------------------------- 1 | 6 | */ 7 | class LySafe 8 | { 9 | function __construct() 10 | { 11 | if(version_compare(PHP_VERSION, '5.3.0', "<")) { 12 | set_magic_quotes_runtime(0); 13 | } 14 | if(version_compare(PHP_VERSION, '7.0.0', "<") && get_magic_quotes_gpc()) { 15 | $this->tescape_array($_GET); 16 | $this->tescape_array($_POST); 17 | $this->tescape_array($_COOKIE); 18 | } 19 | } 20 | 21 | public function encrypt($encrypt, $key = '') 22 | { 23 | if(!function_exists('mcrypt_encrypt') || version_compare(PHP_VERSION, '7.1.0', ">=")) { 24 | return self::encrypt_self($encrypt, $key); 25 | } 26 | $passcrypt = mcrypt_encrypt(MCRYPT_RIJNDAEL_256, md5($key), $encrypt, MCRYPT_MODE_ECB); 27 | $encode = base64_encode($passcrypt); 28 | return $encode; 29 | } 30 | 31 | public function encrypt_self($txt, $key = '') 32 | { 33 | //当不存在mcrypt函数库时的加密方法 34 | srand((double)microtime() * 1000000); 35 | $encrypt_key = md5(rand(0, 32000)); 36 | $ctr = 0; 37 | $tmp = ''; 38 | for($i = 0; $i < strlen($txt); $i++) { 39 | $ctr = $ctr == strlen($encrypt_key) ? 0 : $ctr; 40 | $tmp .= $encrypt_key[$ctr].($txt[$i] ^ $encrypt_key[$ctr++]); 41 | } 42 | return base64_encode(self::passport_key($tmp, $key)); 43 | } 44 | 45 | public function decrypt_self($txt, $key) 46 | { 47 | //当不存在mcrypt函数库时的解密方法 48 | $txt = self::passport_key(base64_decode($txt), $key); 49 | $tmp = ''; 50 | for($i = 0; $i < strlen($txt); $i++) { 51 | $md5 = $txt[$i]; 52 | $tmp .= $txt[++$i] ^ $md5; 53 | } 54 | return $tmp; 55 | } 56 | 57 | function passport_key($txt, $encrypt_key) 58 | { 59 | $encrypt_key = md5($encrypt_key); 60 | $ctr = 0; 61 | $tmp = ''; 62 | for($i = 0; $i < strlen($txt); $i++) { 63 | $ctr = $ctr == strlen($encrypt_key) ? 0 : $ctr; 64 | $tmp .= $txt[$i] ^ $encrypt_key[$ctr++]; 65 | } 66 | return $tmp; 67 | } 68 | 69 | public function decrypt($decrypt, $key = '') 70 | { 71 | if(!function_exists('mcrypt_decrypt') || version_compare(PHP_VERSION, '7.1.0', ">=")) { 72 | return self::decrypt_self($decrypt, $key); 73 | } 74 | $decoded = base64_decode($decrypt); 75 | $decrypted = mcrypt_decrypt(MCRYPT_RIJNDAEL_256, md5($key), $decoded, MCRYPT_MODE_ECB); 76 | return $decrypted; 77 | } 78 | 79 | public function escape($string) 80 | { 81 | return mysql_real_escape_string($string); 82 | } 83 | 84 | public function tescape($string) 85 | { 86 | return stripslashes($string); 87 | } 88 | 89 | private function tescape_array(&$array) 90 | { 91 | //数组数据反转义 92 | foreach($array as $id => $v) { 93 | if(is_array($v)) { 94 | $this->tescape_array($array[$id]); 95 | } else { 96 | $array[$id] = $this->tescape($array[$id]); 97 | } 98 | } 99 | } 100 | 101 | private function escape_array(&$array) 102 | { 103 | //数组转义 104 | foreach($array as $id => $v) { 105 | if(is_array($v)) { 106 | $this->escape_array($array[$id]); 107 | } else { 108 | $array[$id] = $this->escape($array[$id]); 109 | } 110 | } 111 | } 112 | 113 | public function text($content) 114 | { 115 | return htmlspecialchars($content); 116 | } 117 | } 118 | 119 | ?> -------------------------------------------------------------------------------- /LySystem/LyCore/LyTime.php: -------------------------------------------------------------------------------- 1 | 6 | */ 7 | class LyTime{ 8 | private $begin_time; 9 | private $end_time; 10 | function __construct(){ 11 | $this->start(); 12 | } 13 | public function start(){ 14 | $this->begin_time = $this->get_microtime(); 15 | $this->end_time = 0; 16 | } 17 | public function get_microtime() 18 | { 19 | list($usec, $sec) = explode(' ', microtime()); 20 | return ((float)$usec + (float)$sec); 21 | } 22 | public function stop(){ 23 | $this->end_time = $this->begin = $this->get_microtime(); 24 | } 25 | public function get_second(){ 26 | if($this->end_time==0)$this->stop(); 27 | return round($this->end_time-$this->begin_time,5); 28 | } 29 | public function get_minute(){ 30 | if($this->end_time==0)$this->stop(); 31 | return round(($this->end_time-$this->begin_time)/60,5); 32 | } 33 | public function get_Millisecond(){ 34 | if($this->end_time==0)$this->stop(); 35 | return round(($this->end_time-$this->begin_time)*1000,5); 36 | } 37 | } 38 | ?> -------------------------------------------------------------------------------- /LySystem/LyCore/LyUrl.php: -------------------------------------------------------------------------------- 1 | 6 | */ 7 | class LyUrl{ 8 | private $path; 9 | private $url_list; 10 | function __construct() { 11 | if(!isset( $_SERVER['REQUEST_URI'])){ 12 | $_SERVER['REQUEST_URI'] = $_SERVER['PHP_SELF']; 13 | if(isset($_SERVER['QUERY_STRING'])){ 14 | $_SERVER['REQUEST_URI'] .= '?'.$_SERVER['QUERY_STRING']; 15 | } 16 | } 17 | $this->init_param(); 18 | } 19 | private function make_list(){ 20 | if($this->path=='' || '/'==$this->path || $_SERVER['SCRIPT_NAME']==$this->path)return array(); 21 | if(substr($this->path,0,1)!='/'){ 22 | $this->path = "/".$this->path; 23 | } 24 | if(substr($this->path,-1)=='/'){ 25 | return explode("/",substr($this->path,1,-1)); 26 | }else{ 27 | return explode("/",substr($this->path,1)); 28 | } 29 | } 30 | public function get_req_list(){ 31 | return $this->url_list; 32 | } 33 | private function init_param(){ 34 | $this->make_req(); 35 | $this->url_list = $this->make_list(); 36 | $is_https = isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off' && !empty($_SERVER['HTTPS']); 37 | define('NOW_URL',($is_https?'https://':'http://').$_SERVER["HTTP_HOST"].$_SERVER['REQUEST_URI']); 38 | define('URL_PATH',dirname($_SERVER['SCRIPT_NAME'])); 39 | $i = strpos($_SERVER['REQUEST_URI'],$_SERVER['SCRIPT_NAME']); 40 | if($i==0 && $i!==false){ 41 | define('WEB_URL',($is_https?'https://':'http://').$_SERVER["HTTP_HOST"].$this->clean_url_more_char($_SERVER['SCRIPT_NAME']."/")); 42 | define('WEB_FILE_URL',($is_https?'https://':'http://').$this->clean_url_more_char($_SERVER["HTTP_HOST"].dirname($_SERVER['SCRIPT_NAME'])."/")); 43 | }else{ 44 | define('WEB_URL',($is_https?'https://':'http://').$_SERVER["HTTP_HOST"].$this->clean_url_more_char(dirname($_SERVER['SCRIPT_NAME'])."/")); 45 | define('WEB_FILE_URL',WEB_URL); 46 | } 47 | } 48 | private function clean_url_more_char($url){ 49 | return preg_replace("/[\\/\\\\]+/","/",$url); 50 | } 51 | private function make_req(){ 52 | if(isset($_SERVER['SERVER_SOFTWARE']) && strtolower($_SERVER['SERVER_SOFTWARE'])=="microsoft-iis/5.1" &&!isset($_SERVER['PATH_INFO']) && isset($_SERVER['HTTP_X_ORIGINAL_URL'])){ 53 | $pos = strpos($_SERVER['HTTP_X_ORIGINAL_URL'],'?'); 54 | $len = strlen($_SERVER["PHP_SELF"]); 55 | if($pos===false){ 56 | $_SERVER['PATH_INFO'] = substr($_SERVER['HTTP_X_ORIGINAL_URL'],$len); 57 | }else{ 58 | $_SERVER['PATH_INFO'] = substr($_SERVER['HTTP_X_ORIGINAL_URL'],$len,$pos-$len); 59 | } 60 | } 61 | if(!isset($_SERVER['PATH_INFO']) || $_SERVER['PATH_INFO']===""){ 62 | $i = strpos($_SERVER['REQUEST_URI'],'?'); 63 | if($i===false){ 64 | $this->path = $_SERVER['REQUEST_URI']; 65 | }else{ 66 | $this->path = substr($_SERVER['REQUEST_URI'],0,$i); 67 | } 68 | $dir = dirname($_SERVER['SCRIPT_NAME']); 69 | $j = strpos($this->path,$dir); 70 | if($j===0){ 71 | $this->path = substr($this->path,strlen($dir)); 72 | } 73 | }else{ 74 | $this->path = $_SERVER['PATH_INFO']; 75 | } 76 | $this->path = trim($this->path); 77 | } 78 | } 79 | ?> -------------------------------------------------------------------------------- /LySystem/LyCore/helper/system.php: -------------------------------------------------------------------------------- 1 | 6 | */ 7 | function get_core($name = ''){ 8 | $r_core = LyCore::$core; 9 | if($name!='' && isset($r_core->$name)){ 10 | return $r_core->$name; 11 | }else{ 12 | return $r_core; 13 | } 14 | } 15 | function get_lib($name=''){ 16 | $r_core = LyCore::$core; 17 | if($name=='')return $r_core->lib; 18 | if(isset($r_core->lib[$name])){ 19 | return $r_core->lib[$name]; 20 | }else{ 21 | return get_core()->load_lib($name); 22 | } 23 | } 24 | function get_config(){ 25 | $args = func_get_args(); 26 | return call_user_func_array(array(get_core(),'get_config'),$args); 27 | } 28 | function get_url($param=''){ 29 | if(is_array($param))return WEB_URL.implode("/",$param); 30 | return WEB_URL.$param; 31 | } 32 | function get_file_url($param=''){ 33 | if(is_array($param))return WEB_URL.implode("/",$param); 34 | return WEB_FILE_URL.$param; 35 | } 36 | 37 | /** 38 | * 打印调试信息 39 | * @return string 40 | */ 41 | function print_stack_trace() 42 | { 43 | $array =debug_backtrace(); 44 | //print_r($array);//信息很齐全 45 | unset($array[0]); 46 | $html = ""; 47 | foreach($array as $row) 48 | { 49 | $html .="

".(isset($row['file'])?$row['file']:"__").':'. 50 | (isset($row['line'])?$row['line']:"__").' line, call:'. 51 | (isset($row['function'])?$row['function']:"__")."

\n"; 52 | } 53 | return $html; 54 | } 55 | function redirect($uri = '', $method = 'location', $http_response_code = 302){ 56 | if ( ! preg_match('#^https?://#i', $uri)){ 57 | $uri = get_url($uri); 58 | } 59 | switch($method){ 60 | case 'refresh' : header("Refresh:0;url=".$uri); 61 | break; 62 | default : header("Location: ".$uri, TRUE, $http_response_code); 63 | break; 64 | } 65 | exit; 66 | } 67 | function system_path($path){ 68 | static $convert = null; 69 | if($convert === null) { 70 | $convert = ((PHP_OS == 'WIN32' || PHP_OS == 'WINNT') && version_compare(PHP_VERSION, '7.1.0', '<')); 71 | } 72 | if($convert) 73 | return rtrim(mb_convert_encoding($path,"GBK","UTF-8")); 74 | else 75 | return rtrim($path); 76 | } 77 | function porgram_path($path){ 78 | static $convert = null; 79 | if($convert === null) { 80 | $convert = ((PHP_OS == 'WIN32' || PHP_OS == 'WINNT') && version_compare(PHP_VERSION, '7.1.0', '<')); 81 | } 82 | if($convert) { 83 | return rtrim(mb_convert_encoding($path, "UTF-8", "GBK")); 84 | }else { 85 | return rtrim($path); 86 | } 87 | } 88 | 89 | /** 90 | * 输出错误信息 91 | * @param $error 92 | * @param $message 93 | * @param $file 94 | * @param $line 95 | */ 96 | function php_error_log($error=null, $message=null, $file=null, $line=null){ 97 | $type = NULL; 98 | switch($error){ 99 | case E_COMPILE_ERROR: 100 | $type = "E_COMPILE_ERROR"; 101 | break; 102 | case E_ERROR: 103 | $type = "E_ERROR"; 104 | break; 105 | case E_WARNING: 106 | $type = "E_WARNING"; 107 | break; 108 | case E_NOTICE: 109 | $type = "E_NOTICE"; 110 | break; 111 | default: 112 | $type = "UNKNOWN"; 113 | } 114 | echo @"\n
\n{$type}: {$message} in {$file} on line {$line}
\n"; 115 | echo print_stack_trace(); 116 | } 117 | 118 | function shutdown_error_log(){ 119 | if ( ( $e = error_get_last() ) && $e['type'] == E_ERROR || $e['type'] == E_COMPILE_ERROR ) { 120 | call_user_func_array( 'php_error_log', $e ); 121 | } 122 | } -------------------------------------------------------------------------------- /LySystem/LyCore/library/CLibMail.php: -------------------------------------------------------------------------------- 1 | 6 | */ 7 | class CLibMail{ 8 | private $mailer; 9 | private $status; 10 | public function __construct(){ 11 | require_once(CORE_PATH."library/phpmailer.php"); 12 | require_once(CORE_PATH."library/smtp.php"); 13 | $this->mailer = new PHPMailer(); 14 | $this->status = false; 15 | } 16 | public function set_config($config){ 17 | if(is_array($config)){ 18 | foreach($config as $name => $value){ 19 | if(isset($this->mailer->$name)){ 20 | $this->mailer->$name = $value; 21 | } 22 | } 23 | } 24 | } 25 | public function set_from($add,$name=''){ 26 | $this->mailer->SetFrom($add,$name); 27 | } 28 | public function AddAddress($add,$name=''){ 29 | $this->mailer->AddAddress($add,$name); 30 | } 31 | public function get_mailer(){ 32 | return $this->mailer; 33 | } 34 | public function set_method($arg){ 35 | switch(strtolower($arg)){ 36 | case 'smtp': 37 | $this->mailer->IsSMTP(); 38 | break; 39 | case 'mail': 40 | $this->mailer->IsMail(); 41 | break; 42 | case 'sendmail': 43 | $this->mailer->IsSendmail(); 44 | break; 45 | case 'qmail': 46 | $this->mailer->IsQmail(); 47 | break; 48 | } 49 | } 50 | public function body($content){ 51 | $this->mailer->MsgHTML($content); 52 | } 53 | public function send(){ 54 | try { 55 | if($this->mailer->send()){ 56 | return true; 57 | }else{ 58 | return false; 59 | } 60 | }catch (phpmailerException $e) { 61 | return $e->errorMessage(); 62 | }catch (Exception $e) { 63 | return $e->getMessage(); 64 | } 65 | } 66 | public function status(){ 67 | return $this->status; 68 | } 69 | public function AddAttachment($file_list,$max_size=0){ 70 | 71 | $size = 0; 72 | if(!is_array($file_list)){ 73 | $file_list = array($file_list); 74 | } 75 | foreach($file_list as $v){ 76 | if(!is_file($v) || !is_readable($v)){ 77 | return false; 78 | }else{ 79 | $s = filesize($v); 80 | if($s<0){ 81 | return false; 82 | }else{ 83 | $size += $s; 84 | if($max_size>0 && $size>$max_size){ 85 | return false; 86 | } 87 | } 88 | } 89 | } 90 | foreach($file_list as $v){ 91 | $this->mailer->AddAttachment($v); 92 | } 93 | return true; 94 | } 95 | } 96 | ?> -------------------------------------------------------------------------------- /LySystem/LyCore/page/404.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 404 Not Found 7 | 8 | 9 | 10 |

404 Not Found

11 | 12 | -------------------------------------------------------------------------------- /LySystem/LyCore/page/error.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 系统核心错误 7 | 8 | 9 | 10 |

错误信息:

11 |

12 | 13 | -------------------------------------------------------------------------------- /LySystem/LyLib/LibFilter.php: -------------------------------------------------------------------------------- 1 | setTimeZone(); 5 | /** 6 | * @var $login LibLogin 7 | */ 8 | $login = get_core()->load_lib('LibLogin'); 9 | $url_list = get_core('LyUrl')->get_req_list(); 10 | if($login->is_login()){ 11 | return true; 12 | }else{ 13 | if(isset($url_list[0]) && in_array($url_list[0],array('Login','Help','About'))){ 14 | return true; 15 | } 16 | redirect(get_url('Login?redirect='.urlencode(NOW_URL))); 17 | return false; 18 | } 19 | } 20 | public function LIB(){ 21 | get_core()->load_lib('LibTemplate'); 22 | return true; 23 | } 24 | private function setTimeZone(){ 25 | date_default_timezone_set('Asia/Shanghai'); 26 | } 27 | } 28 | ?> -------------------------------------------------------------------------------- /LySystem/LyLib/LibLogin.php: -------------------------------------------------------------------------------- 1 | is_login = false; 7 | $this->auto_login(); 8 | } 9 | public function set_password($pwd,$md5=false){ 10 | if($md5)$this->password = $pwd; 11 | else $this->password = md5($pwd); 12 | } 13 | public function is_login(){ 14 | return $this->is_login; 15 | } 16 | public function v(){ 17 | if(get_config('password')==$this->password){ 18 | $this->set_cookie(); 19 | $this->is_login = true; 20 | } 21 | return $this->is_login(); 22 | } 23 | private function set_cookie(){ 24 | get_core('LyCookie')->set('LyFileManage',$this->password."\n".$_SERVER['HTTP_USER_AGENT']); 25 | } 26 | private function delete_cookie(){ 27 | get_core('LyCookie')->del('LyFileManage'); 28 | } 29 | public function logout(){ 30 | $this->delete_cookie(); 31 | } 32 | private function auto_login(){ 33 | $pass = get_core('LyCookie')->get('LyFileManage'); 34 | if($pass){ 35 | $pass = explode("\n",$pass); 36 | $this->set_password(trim($pass[0]),true); 37 | if(get_config('password')==$this->password && $_SERVER['HTTP_USER_AGENT']==trim($pass[1])){ 38 | $this->is_login = true; 39 | }else{ 40 | $this->delete_cookie(); 41 | } 42 | } 43 | } 44 | } 45 | ?> -------------------------------------------------------------------------------- /LySystem/LyLib/LibMenu.php: -------------------------------------------------------------------------------- 1 | menu = array(); 6 | } 7 | public function set(){ 8 | $args = func_get_args(); 9 | $this->menu = array_merge($args,$this->menu); 10 | } 11 | public function the_menu($begin,$end,$all_class,$page_class,$now){ 12 | foreach($this->get_menu() as $v){ 13 | echo $begin,"",$v['name'],"$end"; 14 | } 15 | } 16 | public function get_menu(){ 17 | $path = array_values(get_core('LyUrl')->get_req_list()); 18 | if(empty($path))$path = array('/'); 19 | $rt = array(); 20 | $i = 0; 21 | foreach($this->menu as $m_id => $v){ 22 | if(!isset($v['url']) && !isset($v['page'])){ 23 | unset($this->menu[$m_id]); 24 | continue; 25 | } 26 | $rt[$i]['name'] = $v['name']; 27 | $rt[$i]['url'] = (isset($v['url'])?$v['url']:get_url($v['page'])); 28 | $rt[$i]['page_select'] = false; 29 | $rt[$i]['now_select'] = false; 30 | $v['page'] = array_values($v['page']); 31 | $flag = false; 32 | foreach($v['page'] as $id => $v2){ 33 | if(isset($path[$id]) && $v2==$path[$id]){ 34 | $flag = true; 35 | }else{ 36 | $flag = false; 37 | break; 38 | } 39 | } 40 | if($flag){ 41 | $rt[$i]['page_select'] = true; 42 | if(count($v['page'])==count($path)){ 43 | $rt[$i]['now_select'] = true; 44 | } 45 | } 46 | $i++; 47 | } 48 | return $rt; 49 | } 50 | } 51 | ?> -------------------------------------------------------------------------------- /LySystem/LyLib/LibTemplate.php: -------------------------------------------------------------------------------- 1 | title = get_config('title'); 6 | } 7 | public function set_title($title){ 8 | $this->title = $title; 9 | } 10 | public function get_title(){ 11 | return $this->title; 12 | } 13 | public function the_title(){ 14 | if($this->title==get_config('title'))echo $this->title; 15 | else echo $this->title," - ",get_config('title'); 16 | } 17 | public function is_home(){ 18 | return count(get_core('LyUrl')->get_req_list())==0; 19 | } 20 | } 21 | ?> -------------------------------------------------------------------------------- /LySystem/LyPage/About.php: -------------------------------------------------------------------------------- 1 | set_title('关于'); 5 | get_core()->view('header'); 6 | get_core()->view('about'); 7 | get_core()->view('footer'); 8 | } 9 | } 10 | ?> -------------------------------------------------------------------------------- /LySystem/LyPage/Help.php: -------------------------------------------------------------------------------- 1 | set_title('帮助文档'); 5 | get_core()->view('header'); 6 | get_core()->view('help'); 7 | get_core()->view('footer'); 8 | } 9 | } 10 | ?> -------------------------------------------------------------------------------- /LySystem/LyPage/Login.php: -------------------------------------------------------------------------------- 1 | lib = get_lib('LibLogin'); 12 | } 13 | public function main(){ 14 | 15 | get_lib('LibTemplate')->set_title('用户密码验证'); 16 | get_core()->view('header'); 17 | get_core()->view('login'); 18 | get_core()->view('footer'); 19 | } 20 | public function logout(){ 21 | $this->lib->logout(); 22 | redirect('Login'); 23 | } 24 | public function post(){ 25 | $this->lib->set_password(get_core('LyPost')->get('password'),true); 26 | if($this->lib->v()){ 27 | if(get_core('LyPost')->get('redirect')) 28 | redirect(get_core('LyPost')->get('redirect')); 29 | else 30 | redirect(get_url()); 31 | }else{ 32 | if(get_core('LyPost')->get('redirect')) 33 | redirect(get_url('Login?status=error&redirect='.urlencode(get_core('LyPost')->get('redirect')))); 34 | else 35 | redirect(get_url('Login?status=error')); 36 | 37 | } 38 | } 39 | } 40 | ?> -------------------------------------------------------------------------------- /LySystem/LyPage/Welcome.php: -------------------------------------------------------------------------------- 1 | core = get_core(); 6 | } 7 | public function main(){ 8 | $this->core->view('header'); 9 | $this->core->view('index'); 10 | $this->core->view('footer'); 11 | } 12 | } 13 | ?> -------------------------------------------------------------------------------- /LySystem/LyView/about.php: -------------------------------------------------------------------------------- 1 |
2 |

关于 LyFM PHP文件管理器

3 |
4 |

首先,请谨慎使用该程序,当你对其有任何怀疑,或觉得有任何不妥时,请立即停止使用,或许你的感觉是对的。

5 |

作者博客:http://www.loveyu.org,这绝对是一个不错的反馈地址。

6 |

程序主页:http://www.loveyu.net/LyFm

7 |

免责:作者不对你所做的任何失误操作进行负责,不会要求搜集使用则的任何信息,但会对程序版本进行统计。

8 |
9 |
10 |

The MIT License (MIT)

11 |

Copyright (c) 2013 Loveyu

12 |

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

13 |

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

14 |

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

15 |
16 |
-------------------------------------------------------------------------------- /LySystem/LyView/api_list.php: -------------------------------------------------------------------------------- 1 |
2 |

Api List

3 | '获取文件夹内文件和文件夹列表', 7 | 'url' => 'Api/file_list', 8 | 'param' => 'path', 9 | ), 10 | array( 11 | 'name' => '文件或文件夹重命名', 12 | 'url' => 'Api/rename', 13 | 'param' => 'path,name', 14 | ), 15 | array( 16 | 'name' => '删除文件或文件夹', 17 | 'url' => 'Api/delete', 18 | 'param' => 'path', 19 | ), 20 | array( 21 | 'name' => '移动文件或文件夹', 22 | 'url' => 'Api/move_file', 23 | 'param' => 'path,new_path,type={file,dir}', 24 | ), 25 | array( 26 | 'name' => '复制文件或文件夹', 27 | 'url' => 'Api/copy_file', 28 | 'param' => 'path,new_path,type={file,dir}', 29 | ), 30 | array( 31 | 'name' => '在当前目录递归创建文件夹', 32 | 'url' => 'Api/mkdir', 33 | 'param' => 'path,name', 34 | ), 35 | array( 36 | 'name' => '修改文件或目录单级权限', 37 | 'url' => 'Api/change_perms', 38 | 'param' => 'path,new_perms', 39 | ), 40 | array( 41 | 'name' => '对文件系统的多个文件进行文件权限批量或递归修改', 42 | 'url' => 'Api/chmod_more', 43 | 'param' => '[POST]:path,list[],file_mode,dir_mode,r', 44 | ), 45 | array( 46 | 'name' => 'zip压缩单个文件或目录到指定文件', 47 | 'url' => 'Api/zip_file', 48 | 'param' => 'path,zip_path', 49 | ), 50 | array( 51 | 'name' => '压缩多个文件或文件夹到当前目录的指定文件名', 52 | 'url' => 'Api/zip_more', 53 | 'param' => 'path,list[],zip_name', 54 | ), 55 | array( 56 | 'name' => '解压zip文件到指定已存在的目录', 57 | 'url' => 'Api/unzip_file', 58 | 'param' => 'path,unzip_path', 59 | ), 60 | array( 61 | 'name' => '读取zip文件内容列表(非绝对准确)', 62 | 'url' => 'Api/read_zip_file', 63 | 'param' => 'path', 64 | ), 65 | array( 66 | 'name' => '指定编码返回文件内容', 67 | 'url' => 'Api/get_file', 68 | 'param' => 'path,char_set', 69 | ), 70 | array( 71 | 'name' => '将内容写入文件', 72 | 'url' => 'Api/put_file', 73 | 'param' => '[POST]:path,char_set,content', 74 | ), 75 | array( 76 | 'name' => '创建一个空文件', 77 | 'url' => 'Api/mk_file', 78 | 'param' => 'path,name', 79 | ), 80 | array( 81 | 'name' => '获取window的驱动器列表', 82 | 'url' => 'Api/window_dirve', 83 | 'param' => '无', 84 | ), 85 | array( 86 | 'name' => '文件编码转换', 87 | 'url' => 'Api/change_charset', 88 | 'param' => 'path,old_char,new_char', 89 | ), 90 | array( 91 | 'name' => '邮件发送文件', 92 | 'url' => 'Api/mail_file', 93 | 'param' => '[POST]:path,list[],more,email,method', 94 | ), 95 | array( 96 | 'name' => '获取一个媒体文件,图片音频等,二进制数据', 97 | 'url' => 'Api/get_media', 98 | 'param' => 'path', 99 | ), 100 | array( 101 | 'name' => '获取一个能够展示的html5多媒体页面,音频和视频', 102 | 'url' => 'Api/get_ajax_media', 103 | 'param' => 'path,type', 104 | ), 105 | array( 106 | 'name' => '执行任意代码,返回输出数据', 107 | 'url' => 'Api/run_code', 108 | 'param' => '[POST]:code', 109 | ), 110 | array( 111 | 'name' => 'URL远程下载文件到网站', 112 | 'url' => 'Api/url_download', 113 | 'param' => 'path,url,name', 114 | ), 115 | array( 116 | 'name' => '下载网站任意文件到计算机', 117 | 'url' => 'Api/file_download', 118 | 'param' => 'path', 119 | ), 120 | array( 121 | 'name' => '单个文件上传', 122 | 'url' => 'Api/upload_file', 123 | 'param' => '[POST]:path,[FILES]:Filedata', 124 | ), 125 | ); 126 | ?> 127 | 136 |
-------------------------------------------------------------------------------- /LySystem/LyView/footer.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 7 | 8 | 9 | is_login() && $_LibTemplate->is_home()):?> 10 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /LySystem/LyView/header.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | <?php $_LibTemplate->the_title();?> 7 | 8 | 9 | 10 | 20 | 21 | 22 | 23 |
24 | 34 |
35 | 36 | -------------------------------------------------------------------------------- /LySystem/LyView/help.php: -------------------------------------------------------------------------------- 1 | 'DefaultPassword', 5 | 'name' => '默认密码修改', 6 | 'reason' => '单用户管理密码默认值未修改', 7 | 'answer' => '修改根目录config.php中password的值,密码为md5值' 8 | ), 9 | array( 10 | 'id' => 'BoxDrag', 11 | 'name' => '对话框拖动不正常', 12 | 'reason' => 'js对对话框拖动支持不好', 13 | 'answer' => '忍着,或者你提交一个可行的解决方案' 14 | ), 15 | array( 16 | 'id' => 'VersionUpdate', 17 | 'name' => '版本更新', 18 | 'reason' => '采用ajax获取数据,使用HTML5的 localStorage进行存储24小时', 19 | 'answer' => '注释掉js/load.js 初始化中的check_update()函数' 20 | ), 21 | array( 22 | 'id' => 'SendSMTPMail', 23 | 'name' => 'SMTP邮件发送失败', 24 | 'reason' => '在SMTP失败,提示框显示状态信息', 25 | 'answer' => '请检查发送人邮箱地址是否与SMPT账号一致,其余问题自己百度' 26 | ), 27 | array( 28 | 'id' => 'MailConfig', 29 | 'name' => '邮件发送配置问题', 30 | 'reason' => '邮件发送采用PHPmailer类', 31 | 'answer' => '相应的数组会对PHPmailer类中的变量进行赋值操作' 32 | ), 33 | array( 34 | 'id' => 'MailTimeOut', 35 | 'name' => '邮件发送时间过长', 36 | 'reason' => '在邮件发送API中,PHP执行时间设置为无限长', 37 | 'answer' => '在邮件发送成功后将会返回状态进行提示,关闭或刷新当前窗口会导致发送操作取消' 38 | ), 39 | array( 40 | 'id' => 'UrlDownload', 41 | 'name' => '远程文件下载无效', 42 | 'reason' => '文件下载无效出错', 43 | 'answer' => '检测下载地址是否需要COOKIE等,检测配置文件中的最大下载值' 44 | ), 45 | array( 46 | 'id' => 'LoginError', 47 | 'name' => '登录成功却无法进入首页', 48 | 'reason' => '该问题由cookie域名出错引起', 49 | 'answer' => '修改config.php中的cookie域名的值,可以使用ip地址,但如localhost之类的会失效,请更换其他' 50 | ), 51 | array( 52 | 'id' => 'UrlDownloadTimeOut', 53 | 'name' => '远程下载超时', 54 | 'reason' => '脚本执行时间为无限', 55 | 'answer' => '载文件脚本的执行时间为永久,可以通过刷新文件查看下载进度' 56 | ), 57 | array( 58 | 'id' => 'UploadError', 59 | 'name' => '无法进行文件上传', 60 | 'reason' => '程序使用了一个flash的文件上传组件,请检查是否支持flash', 61 | 'answer' => '安装新版本的Flash,之后重启浏览器' 62 | ), 63 | array( 64 | 'id' => 'HtmlError', 65 | 'name' => '网页错位', 66 | 'reason' => '程序未进行兼容性测试,在Chrome 25下进行调试', 67 | 'answer' => '请安装新版支持html5的浏览器' 68 | ), 69 | array( 70 | 'id' => 'SeeSourceCode', 71 | 'name' => '能否查看实现的源代码', 72 | 'reason' => '看下程序实现这些接口的代码', 73 | 'answer' => '可以通过查看LySystem/LyPage/Api.php,和LySystem/LyLi/LyFile.php' 74 | ), 75 | array( 76 | 'id' => 'Nginx', 77 | 'name' => 'nginx下无法使用', 78 | 'reason' => '由于nginx需要修改的配置文件不一样', 79 | 'answer' => '参考程序跟目录下的nginx.conf配置文件' 80 | ), 81 | array( 82 | 'id' => 'Apache', 83 | 'name' => 'Apache的访问方式', 84 | 'reason' => '程序使用PHPINFO和Query解析请求路径', 85 | 'answer' => '在未配置伪静态的情况下使用 index.php/Login的形式进行访问' 86 | ), 87 | array( 88 | 'id' => 'License', 89 | 'name' => '程序使用协议问题', 90 | 'reason' => '免费程序带来的一系列问题我无法对你的失误操作进行赔偿,捐助仅仅是支持', 91 | 'answer' => '不要使用该程序对商业性质网站进行管理,否则出事,后果自负。个人性质请谨慎使用,程序作者不对数据和安全负责。' 92 | ), 93 | ); 94 | ?> 95 |
96 |

帮助文档

97 |
    98 | 99 |
  • 100 |

    101 |

    原因:

    102 |

    解决:

    103 |
  • 104 | 105 |
106 |
-------------------------------------------------------------------------------- /LySystem/LyView/index.php: -------------------------------------------------------------------------------- 1 |
2 |
3 |

当前路径:

4 | 10 | get_os()=='Win'){?>选择驱动器 还原 刷新 14 |
15 |
16 |
17 | 18 | 19 | get_os()=='Linux'){?> 20 | 21 | 22 | 23 |
类型名称大小权限操作修改时间创建时间用户用户组选择
24 |
25 |
26 | 27 | 28 | 29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |

选择:全选全不选反选文件

39 |
40 |
41 |

选中项:

42 |

删除复制移动

43 |

修改权限压缩

44 |

邮件发送文本打开

45 |

文件编码转换 (针对文本文件)

46 |
47 | 50 | 54 |
55 |

Bug及更新动态(本地存储 24小时更新一次)

56 |
    57 |
58 |
59 |
60 | ' /> 61 |
62 |
63 |
64 |
65 |
66 | 67 | 68 |
69 |
70 | 71 | 72 | 73 | 74 |
75 |
76 |
77 |
78 |
79 | -------------------------------------------------------------------------------- /LySystem/LyView/login.php: -------------------------------------------------------------------------------- 1 |
2 |
3 |

个人账户密码认证

4 |
5 | get('status')=='error'):?> 6 |

登录失败,密码错误!

7 | 8 | 12 | 13 | 14 |
15 |
16 |
17 | -------------------------------------------------------------------------------- /LySystem/LyView/menu.php: -------------------------------------------------------------------------------- 1 | load_lib('LibMenu'); 3 | $menu->set( 4 | array( 5 | 'name' => '首页', 6 | 'url' => get_url(), 7 | 'page' => array('/') 8 | ), 9 | array( 10 | 'name' => 'Api', 11 | 'page' => array('Api') 12 | ), 13 | array( 14 | 'name' => '帮助文档', 15 | 'page' => array('Help') 16 | ), 17 | array( 18 | 'name' => '关于', 19 | 'page' => array('About') 20 | ), 21 | array( 22 | 'name' => (get_lib('LibLogin')->is_login()?"登出":'登录'), 23 | 'page' => (get_lib('LibLogin')->is_login()?array('Login','logout'):array('Login')) 24 | ) 25 | ); 26 | $menu->the_menu("\t\t
  • ","
  • \n","","","select"); 27 | ?> -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | LyFM PHP文件管理器 2 | ================================================= 3 | 4 | LyFM 是一个基于PHP的个人网站文件管理器,采用完全Ajax操作,实现高效的在线文件管理。 5 | 6 | __任何因程序使用不当照成的损失概不负责,请不要用于生产环境,程序难免有漏洞,请谨慎__ 7 | 8 | ## 使用说明 9 | 10 | * 首次使用请配置config.php文件 11 | * 修改默认密码 12 | * 建议将程序放在file目录下,nginx和apache伪静态配置请参考范例,IIS请使用PATH_INFO访问。 13 | * 默认访问形式为 http://127.0.0.1/file/index.php/ 请主动添加后缀 14 | * 如果需要修改程序目录请相应修改伪静态规则 15 | * 如果需要增加对其他文本格式的编辑支持,可手动修改js目录下的`LyApi.js`的第一个`TextFileExtenName`数组 16 | * 如果访问首页跳转到404页面的,如果支持PATH_INFO请主动添加`/index.php/`来访问,否则节哀。 17 | 18 | ## 功能说明 19 | 20 | 1. 无刷新访问页面,多操作同时进行 21 | 1. 文件管理基础操作,重命名、删除、移动、复制、文件夹创建、文件创建 22 | 1. ZIP压缩操作,解压、打包、查看 23 | 1. 权限操作,文件、文件夹及递归 24 | 1. 文件在线编辑,高亮各种代码,多文件同时操作 25 | 1. 远程文件下载,直接下载文件到服务器 26 | 1. 邮件发送网站文件,支持SMTP 27 | 1. 文件编码转换,提供常用编码文件格式转换 28 | 1. 多文件上传,使用FLASH控件上传多文件 29 | 1. 代码执行,用自己的代码进行简单管理 30 | 1. 多媒体文件在线预览,图片,音频,视频(HTML5支持格式) 31 | 1. 网站文件任意下载 32 | 1. 定时检测新版本,获得更加安全的程序 33 | 1. Linux 与 Window 良好兼容 34 | 35 | ## 问题说明 36 | 37 | * 第一次访问可能会跳转到`/Help#DefaultPassword`页面,表示你需要修改默认密码,通过修改配置文件搞定,可以使用MD5形式的函数将`'94a5f0635f5e7163fc23346870d55b52'` 修改为 `md5('123456')` 的形式 38 | * 默认开启出错输出模式,如果有警告或者其他错误信息会详细输出。如果成功良好的运行,你可以忽略它。并将`define('_Debug_', true);`修改为`define('_Debug_', false);` 39 | 40 | ## 在IIS 5.1下的配置 41 | 42 | 由于IIS5.1实在奇葩,PATH_INFO各种不好实现,所以用字符串拼了一个,前提是需要ReWrite的支持 43 | 44 | 1. 下载 http://www.helicontech.com/isapi_rewrite/download.html 进行配置 45 | 2. 打开ISAPI_Rewrite Manager 添加如下内容,配置而选一 46 | 47 | #在二级目录 48 | RewriteRule /file/index.php/(.*) /file/index\.php 49 | 50 | #根目录 51 | RewriteRule /index.php/(.*) /index\.php 52 | 53 | 3. 修改php.ini 文件必须开启mb_string模块 54 | 4. 重启IIS服务 55 | 56 | net stop iisadmin /y 57 | net start iisadmin 58 | net start w3svc 59 | 60 | ## 关于升级的说明 61 | 62 | 1. 如果不能直接通过PathInfo方式来访问,升级可采取如下操作,否者忽略下面内容,直接访问新文件夹 63 | 2. 下载文件到与文件管理所在文件夹的相同目录并解压,并进入修改配置文件。 64 | 3. 如果当前文件夹为file,新的文件夹为LyFM-new 65 | 4. 运行任意代码执行工具,输入如下代码 66 | 67 | rename("../file", "../file2"); 68 | rename("../LyFM-new", "../file"); 69 | 70 | 5. 此时返回结果为空 71 | 6. 刷新页面即可,然后删除file2旧的文件夹 72 | 73 | ## LyFM主页 74 | 75 | http://www.loveyu.net/LyFm 76 | 77 | ## 反馈地址 78 | 79 | http://www.loveyu.org/2429.html -------------------------------------------------------------------------------- /config.php: -------------------------------------------------------------------------------- 1 | 'LY PHP 文件管理器', 5 | 'password' => isset($_SERVER['ENV_DEFINE_LYFM_PASSWORD']) ? 6 | $_SERVER['ENV_DEFINE_LYFM_PASSWORD'] : //这里如果定义一个环境变量则以环境变量的值为准 7 | '94a5f0635f5e7163fc23346870d55b52',//default 94a5f0635f5e7163fc23346870d55b52 使用密码的MD5值 8 | 'system' => array( 9 | '404_page' => '',//404页面,留空默认系统 10 | 'cookie_prefix' => 'fm_',//COOKIE前缀,留空为空 11 | 'cookie_domain' => '',//COOKIE域名,留空为默认包含全部子域 12 | 'cookie_hash' => '68468gt579*&)&tgluik',//COOKIE加密字符串,留空不加密 13 | ), 14 | 'mail' => array(//PHPmailer配置文件 15 | 'SMTPDebug' => '2', 16 | 'SMTPAuth' => true, 17 | 'SMTPSecure' => 'ssl', 18 | 'Host' => 'smtp.qq.com', 19 | 'Port' => '465', 20 | 'Username' => '', 21 | 'Password' => '', 22 | 'CharSet' => 'utf-8', 23 | ), 24 | 'mailForm' => array(//邮件发送配置 25 | 'add' => '', 26 | 'name' => '', 27 | ), 28 | 'MaxDlSize' => '52428800',//B 最大下载文件 29 | ); 30 | /** 31 | * 是否使用调试模式,启用后会输出错误信息 32 | */ 33 | define('_Debug_', false); 34 | if(_Debug_){ 35 | ini_set('display_errors','on'); 36 | error_reporting(E_ALL | E_STRICT); 37 | } else{ 38 | ini_set('display_errors','off'); 39 | error_reporting(0); 40 | } 41 | ?> -------------------------------------------------------------------------------- /css/colorbox.css: -------------------------------------------------------------------------------- 1 | /* 2 | ColorBox Core Style: 3 | The following CSS is consistent between example themes and should not be altered. 4 | */ 5 | #colorbox, #cboxOverlay, #cboxWrapper{position:absolute; top:0; left:0; z-index:9999; overflow:hidden;} 6 | #cboxOverlay{position:fixed; width:100%; height:100%;} 7 | #cboxMiddleLeft, #cboxBottomLeft{clear:left;} 8 | #cboxContent{position:relative;} 9 | #cboxLoadedContent{overflow:auto; -webkit-overflow-scrolling: touch;} 10 | #cboxTitle{margin:0;} 11 | #cboxLoadingOverlay, #cboxLoadingGraphic{position:absolute; top:0; left:0; width:100%; height:100%;} 12 | #cboxPrevious, #cboxNext, #cboxClose, #cboxSlideshow{cursor:pointer;} 13 | .cboxPhoto{float:left; margin:auto; border:0; display:block; max-width:none;} 14 | .cboxIframe{width:100%; height:100%; display:block; border:0;} 15 | #colorbox, #cboxContent, #cboxLoadedContent{box-sizing:content-box; -moz-box-sizing:content-box; -webkit-box-sizing:content-box;} 16 | 17 | /* 18 | User Style: 19 | Change the following styles to modify the appearance of ColorBox. They are 20 | ordered & tabbed in a way that represents the nesting of the generated HTML. 21 | */ 22 | #cboxOverlay{background:url(images/overlay.png) repeat 0 0;} 23 | #colorbox{outline:0;} 24 | #cboxTopLeft{width:21px; height:21px; background:url(images/controls.png) no-repeat -101px 0;} 25 | #cboxTopRight{width:21px; height:21px; background:url(images/controls.png) no-repeat -130px 0;} 26 | #cboxBottomLeft{width:21px; height:21px; background:url(images/controls.png) no-repeat -101px -29px;} 27 | #cboxBottomRight{width:21px; height:21px; background:url(images/controls.png) no-repeat -130px -29px;} 28 | #cboxMiddleLeft{width:21px; background:url(images/controls.png) left top repeat-y;} 29 | #cboxMiddleRight{width:21px; background:url(images/controls.png) right top repeat-y;} 30 | #cboxTopCenter{height:21px; background:url(images/border.png) 0 0 repeat-x;} 31 | #cboxBottomCenter{height:21px; background:url(images/border.png) 0 -29px repeat-x;} 32 | #cboxContent{background:#fff; overflow:hidden;} 33 | .cboxIframe{background:#fff;} 34 | #cboxError{padding:50px; border:1px solid #ccc;} 35 | #cboxLoadedContent{margin-bottom:28px;} 36 | #cboxTitle{position:absolute; bottom:4px; left:0; text-align:center; width:100%; color:#949494;} 37 | #cboxCurrent{position:absolute; bottom:4px; left:58px; color:#949494;} 38 | #cboxLoadingOverlay{background:url(images/loading_background.png) no-repeat center center;} 39 | #cboxLoadingGraphic{background:url(images/loading.gif) no-repeat center center;} 40 | 41 | /* these elements are buttons, and may need to have additional styles reset to avoid unwanted base styles */ 42 | #cboxPrevious, #cboxNext, #cboxSlideshow, #cboxClose {border:0; padding:0; margin:0; overflow:visible; width:auto; background:none; } 43 | 44 | /* avoid outlines on :active (mouseclick), but preserve outlines on :focus (tabbed navigating) */ 45 | #cboxPrevious:active, #cboxNext:active, #cboxSlideshow:active, #cboxClose:active {outline:0;} 46 | 47 | #cboxSlideshow{position:absolute; bottom:4px; right:30px; color:#0092ef;} 48 | #cboxPrevious{position:absolute; bottom:0; left:0; background:url(images/controls.png) no-repeat -75px 0; width:25px; height:25px; text-indent:-9999px;} 49 | #cboxPrevious:hover{background-position:-75px -25px;} 50 | #cboxNext{position:absolute; bottom:0; left:27px; background:url(images/controls.png) no-repeat -50px 0; width:25px; height:25px; text-indent:-9999px;} 51 | #cboxNext:hover{background-position:-50px -25px;} 52 | #cboxClose{position:absolute; bottom:0; right:0; background:url(images/controls.png) no-repeat -25px 0; width:25px; height:25px; text-indent:-9999px;} 53 | #cboxClose:hover{background-position:-25px -25px;} 54 | 55 | /* 56 | The following fixes a problem where IE7 and IE8 replace a PNG's alpha transparency with a black fill 57 | when an alpha filter (opacity change) is set on the element or ancestor element. This style is not applied to or needed in IE9. 58 | See: http://jacklmoore.com/notes/ie-transparency-problems/ 59 | */ 60 | .cboxIE #cboxTopLeft, 61 | .cboxIE #cboxTopCenter, 62 | .cboxIE #cboxTopRight, 63 | .cboxIE #cboxBottomLeft, 64 | .cboxIE #cboxBottomCenter, 65 | .cboxIE #cboxBottomRight, 66 | .cboxIE #cboxMiddleLeft, 67 | .cboxIE #cboxMiddleRight { 68 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#00FFFFFF,endColorstr=#00FFFFFF); 69 | } 70 | 71 | /* 72 | The following provides PNG transparency support for IE6 73 | Feel free to remove this and the /ie6/ directory if you have dropped IE6 support. 74 | */ 75 | .cboxIE6 #cboxTopLeft{background:url(images/ie6/borderTopLeft.png);} 76 | .cboxIE6 #cboxTopCenter{background:url(images/ie6/borderTopCenter.png);} 77 | .cboxIE6 #cboxTopRight{background:url(images/ie6/borderTopRight.png);} 78 | .cboxIE6 #cboxBottomLeft{background:url(images/ie6/borderBottomLeft.png);} 79 | .cboxIE6 #cboxBottomCenter{background:url(images/ie6/borderBottomCenter.png);} 80 | .cboxIE6 #cboxBottomRight{background:url(images/ie6/borderBottomRight.png);} 81 | .cboxIE6 #cboxMiddleLeft{background:url(images/ie6/borderMiddleLeft.png);} 82 | .cboxIE6 #cboxMiddleRight{background:url(images/ie6/borderMiddleRight.png);} 83 | 84 | .cboxIE6 #cboxTopLeft, 85 | .cboxIE6 #cboxTopCenter, 86 | .cboxIE6 #cboxTopRight, 87 | .cboxIE6 #cboxBottomLeft, 88 | .cboxIE6 #cboxBottomCenter, 89 | .cboxIE6 #cboxBottomRight, 90 | .cboxIE6 #cboxMiddleLeft, 91 | .cboxIE6 #cboxMiddleRight { 92 | _behavior: expression(this.src = this.src ? this.src : this.currentStyle.backgroundImage.split('"')[1], this.style.background = "none", this.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src=" + this.src + ", sizingMethod='scale')"); 93 | } 94 | -------------------------------------------------------------------------------- /css/images/border.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loveyu/LyFM/892f83a33a8dc54bcf669f4693c7b8b5b395c061/css/images/border.png -------------------------------------------------------------------------------- /css/images/controls.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loveyu/LyFM/892f83a33a8dc54bcf669f4693c7b8b5b395c061/css/images/controls.png -------------------------------------------------------------------------------- /css/images/ie6/borderBottomCenter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loveyu/LyFM/892f83a33a8dc54bcf669f4693c7b8b5b395c061/css/images/ie6/borderBottomCenter.png -------------------------------------------------------------------------------- /css/images/ie6/borderBottomLeft.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loveyu/LyFM/892f83a33a8dc54bcf669f4693c7b8b5b395c061/css/images/ie6/borderBottomLeft.png -------------------------------------------------------------------------------- /css/images/ie6/borderBottomRight.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loveyu/LyFM/892f83a33a8dc54bcf669f4693c7b8b5b395c061/css/images/ie6/borderBottomRight.png -------------------------------------------------------------------------------- /css/images/ie6/borderMiddleLeft.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loveyu/LyFM/892f83a33a8dc54bcf669f4693c7b8b5b395c061/css/images/ie6/borderMiddleLeft.png -------------------------------------------------------------------------------- /css/images/ie6/borderMiddleRight.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loveyu/LyFM/892f83a33a8dc54bcf669f4693c7b8b5b395c061/css/images/ie6/borderMiddleRight.png -------------------------------------------------------------------------------- /css/images/ie6/borderTopCenter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loveyu/LyFM/892f83a33a8dc54bcf669f4693c7b8b5b395c061/css/images/ie6/borderTopCenter.png -------------------------------------------------------------------------------- /css/images/ie6/borderTopLeft.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loveyu/LyFM/892f83a33a8dc54bcf669f4693c7b8b5b395c061/css/images/ie6/borderTopLeft.png -------------------------------------------------------------------------------- /css/images/ie6/borderTopRight.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loveyu/LyFM/892f83a33a8dc54bcf669f4693c7b8b5b395c061/css/images/ie6/borderTopRight.png -------------------------------------------------------------------------------- /css/images/loading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loveyu/LyFM/892f83a33a8dc54bcf669f4693c7b8b5b395c061/css/images/loading.gif -------------------------------------------------------------------------------- /css/images/loading_background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loveyu/LyFM/892f83a33a8dc54bcf669f4693c7b8b5b395c061/css/images/loading_background.png -------------------------------------------------------------------------------- /css/images/overlay.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loveyu/LyFM/892f83a33a8dc54bcf669f4693c7b8b5b395c061/css/images/overlay.png -------------------------------------------------------------------------------- /css/images/uploadify-cancel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loveyu/LyFM/892f83a33a8dc54bcf669f4693c7b8b5b395c061/css/images/uploadify-cancel.png -------------------------------------------------------------------------------- /css/uploadify.css: -------------------------------------------------------------------------------- 1 | /* 2 | Uploadify 3 | Copyright (c) 2012 Reactive Apps, Ronnie Garcia 4 | Released under the MIT License 5 | */ 6 | 7 | .uploadify { 8 | position: relative; 9 | margin-bottom: 1em; 10 | } 11 | .uploadify-button { 12 | background-color: #505050; 13 | background-image: linear-gradient(bottom, #505050 0%, #707070 100%); 14 | background-image: -o-linear-gradient(bottom, #505050 0%, #707070 100%); 15 | background-image: -moz-linear-gradient(bottom, #505050 0%, #707070 100%); 16 | background-image: -webkit-linear-gradient(bottom, #505050 0%, #707070 100%); 17 | background-image: -ms-linear-gradient(bottom, #505050 0%, #707070 100%); 18 | background-image: -webkit-gradient( 19 | linear, 20 | left bottom, 21 | left top, 22 | color-stop(0, #505050), 23 | color-stop(1, #707070) 24 | ); 25 | background-position: center top; 26 | background-repeat: no-repeat; 27 | -webkit-border-radius: 30px; 28 | -moz-border-radius: 30px; 29 | border-radius: 30px; 30 | border: 2px solid #808080; 31 | color: #FFF; 32 | font: bold 12px Arial, Helvetica, sans-serif; 33 | text-align: center; 34 | text-shadow: 0 -1px 0 rgba(0,0,0,0.25); 35 | width: 100%; 36 | } 37 | .uploadify:hover .uploadify-button { 38 | background-color: #606060; 39 | background-image: linear-gradient(top, #606060 0%, #808080 100%); 40 | background-image: -o-linear-gradient(top, #606060 0%, #808080 100%); 41 | background-image: -moz-linear-gradient(top, #606060 0%, #808080 100%); 42 | background-image: -webkit-linear-gradient(top, #606060 0%, #808080 100%); 43 | background-image: -ms-linear-gradient(top, #606060 0%, #808080 100%); 44 | background-image: -webkit-gradient( 45 | linear, 46 | left bottom, 47 | left top, 48 | color-stop(0, #606060), 49 | color-stop(1, #808080) 50 | ); 51 | background-position: center bottom; 52 | } 53 | .uploadify-button.disabled { 54 | background-color: #D0D0D0; 55 | color: #808080; 56 | } 57 | .uploadify-queue { 58 | margin-bottom: 1em; 59 | } 60 | .uploadify-queue-item { 61 | background-color: #F5F5F5; 62 | -webkit-border-radius: 3px; 63 | -moz-border-radius: 3px; 64 | border-radius: 3px; 65 | font: 11px Verdana, Geneva, sans-serif; 66 | margin-top: 5px; 67 | max-width: 350px; 68 | padding: 10px; 69 | } 70 | .uploadify-error { 71 | background-color: #FDE5DD !important; 72 | } 73 | .uploadify-queue-item .cancel a { 74 | background: url('images/uploadify-cancel.png') 0 0 no-repeat; 75 | float: right; 76 | height: 16px; 77 | text-indent: -9999px; 78 | width: 16px; 79 | } 80 | .uploadify-queue-item.completed { 81 | background-color: #E5E5E5; 82 | } 83 | .uploadify-progress { 84 | background-color: #E5E5E5; 85 | margin-top: 10px; 86 | width: 100%; 87 | } 88 | .uploadify-progress-bar { 89 | background-color: #0099FF; 90 | height: 3px; 91 | width: 1px; 92 | } -------------------------------------------------------------------------------- /edit_area/autocompletion.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loveyu/LyFM/892f83a33a8dc54bcf669f4693c7b8b5b395c061/edit_area/autocompletion.js -------------------------------------------------------------------------------- /edit_area/edit_area_full.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loveyu/LyFM/892f83a33a8dc54bcf669f4693c7b8b5b395c061/edit_area/edit_area_full.gz -------------------------------------------------------------------------------- /edit_area/images/autocompletion.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loveyu/LyFM/892f83a33a8dc54bcf669f4693c7b8b5b395c061/edit_area/images/autocompletion.gif -------------------------------------------------------------------------------- /edit_area/images/close.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loveyu/LyFM/892f83a33a8dc54bcf669f4693c7b8b5b395c061/edit_area/images/close.gif -------------------------------------------------------------------------------- /edit_area/images/fullscreen.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loveyu/LyFM/892f83a33a8dc54bcf669f4693c7b8b5b395c061/edit_area/images/fullscreen.gif -------------------------------------------------------------------------------- /edit_area/images/go_to_line.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loveyu/LyFM/892f83a33a8dc54bcf669f4693c7b8b5b395c061/edit_area/images/go_to_line.gif -------------------------------------------------------------------------------- /edit_area/images/help.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loveyu/LyFM/892f83a33a8dc54bcf669f4693c7b8b5b395c061/edit_area/images/help.gif -------------------------------------------------------------------------------- /edit_area/images/highlight.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loveyu/LyFM/892f83a33a8dc54bcf669f4693c7b8b5b395c061/edit_area/images/highlight.gif -------------------------------------------------------------------------------- /edit_area/images/load.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loveyu/LyFM/892f83a33a8dc54bcf669f4693c7b8b5b395c061/edit_area/images/load.gif -------------------------------------------------------------------------------- /edit_area/images/move.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loveyu/LyFM/892f83a33a8dc54bcf669f4693c7b8b5b395c061/edit_area/images/move.gif -------------------------------------------------------------------------------- /edit_area/images/newdocument.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loveyu/LyFM/892f83a33a8dc54bcf669f4693c7b8b5b395c061/edit_area/images/newdocument.gif -------------------------------------------------------------------------------- /edit_area/images/opacity.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loveyu/LyFM/892f83a33a8dc54bcf669f4693c7b8b5b395c061/edit_area/images/opacity.png -------------------------------------------------------------------------------- /edit_area/images/processing.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loveyu/LyFM/892f83a33a8dc54bcf669f4693c7b8b5b395c061/edit_area/images/processing.gif -------------------------------------------------------------------------------- /edit_area/images/redo.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loveyu/LyFM/892f83a33a8dc54bcf669f4693c7b8b5b395c061/edit_area/images/redo.gif -------------------------------------------------------------------------------- /edit_area/images/reset_highlight.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loveyu/LyFM/892f83a33a8dc54bcf669f4693c7b8b5b395c061/edit_area/images/reset_highlight.gif -------------------------------------------------------------------------------- /edit_area/images/save.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loveyu/LyFM/892f83a33a8dc54bcf669f4693c7b8b5b395c061/edit_area/images/save.gif -------------------------------------------------------------------------------- /edit_area/images/search.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loveyu/LyFM/892f83a33a8dc54bcf669f4693c7b8b5b395c061/edit_area/images/search.gif -------------------------------------------------------------------------------- /edit_area/images/smooth_selection.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loveyu/LyFM/892f83a33a8dc54bcf669f4693c7b8b5b395c061/edit_area/images/smooth_selection.gif -------------------------------------------------------------------------------- /edit_area/images/spacer.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loveyu/LyFM/892f83a33a8dc54bcf669f4693c7b8b5b395c061/edit_area/images/spacer.gif -------------------------------------------------------------------------------- /edit_area/images/statusbar_resize.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loveyu/LyFM/892f83a33a8dc54bcf669f4693c7b8b5b395c061/edit_area/images/statusbar_resize.gif -------------------------------------------------------------------------------- /edit_area/images/undo.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loveyu/LyFM/892f83a33a8dc54bcf669f4693c7b8b5b395c061/edit_area/images/undo.gif -------------------------------------------------------------------------------- /edit_area/images/word_wrap.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loveyu/LyFM/892f83a33a8dc54bcf669f4693c7b8b5b395c061/edit_area/images/word_wrap.gif -------------------------------------------------------------------------------- /edit_area/keyboard.js: -------------------------------------------------------------------------------- 1 | var EA_keys = {8:"Retour arriere",9:"Tabulation",12:"Milieu (pave numerique)",13:"Entrer",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"Verr Maj",27:"Esc",32:"Space",33:"Page up",34:"Page down",35:"End",36:"Begin",37:"Left",38:"Up",39:"Right",40:"Down",44:"Impr ecran",45:"Inser",46:"Suppr",91:"Menu Demarrer Windows / touche pomme Mac",92:"Menu Demarrer Windows",93:"Menu contextuel Windows",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"Verr Num",145:"Arret defil"}; 2 | 3 | 4 | 5 | function keyDown(e){ 6 | if(!e){ // if IE 7 | e=event; 8 | } 9 | 10 | // send the event to the plugins 11 | for(var i in editArea.plugins){ 12 | if(typeof(editArea.plugins[i].onkeydown)=="function"){ 13 | if(editArea.plugins[i].onkeydown(e)===false){ // stop propaging 14 | if(editArea.isIE) 15 | e.keyCode=0; 16 | return false; 17 | } 18 | } 19 | } 20 | 21 | var target_id=(e.target || e.srcElement).id; 22 | var use=false; 23 | if (EA_keys[e.keyCode]) 24 | letter=EA_keys[e.keyCode]; 25 | else 26 | letter=String.fromCharCode(e.keyCode); 27 | 28 | var low_letter= letter.toLowerCase(); 29 | 30 | if(letter=="Page up" && !AltPressed(e) && !editArea.isOpera){ 31 | editArea.execCommand("scroll_page", {"dir": "up", "shift": ShiftPressed(e)}); 32 | use=true; 33 | }else if(letter=="Page down" && !AltPressed(e) && !editArea.isOpera){ 34 | editArea.execCommand("scroll_page", {"dir": "down", "shift": ShiftPressed(e)}); 35 | use=true; 36 | }else if(editArea.is_editable==false){ 37 | // do nothing but also do nothing else (allow to navigate with page up and page down) 38 | return true; 39 | }else if(letter=="Tabulation" && target_id=="textarea" && !CtrlPressed(e) && !AltPressed(e)){ 40 | if(ShiftPressed(e)) 41 | editArea.execCommand("invert_tab_selection"); 42 | else 43 | editArea.execCommand("tab_selection"); 44 | 45 | use=true; 46 | if(editArea.isOpera || (editArea.isFirefox && editArea.isMac) ) // opera && firefox mac can't cancel tabulation events... 47 | setTimeout("editArea.execCommand('focus');", 1); 48 | }else if(letter=="Entrer" && target_id=="textarea"){ 49 | if(editArea.press_enter()) 50 | use=true; 51 | }else if(letter=="Entrer" && target_id=="area_search"){ 52 | editArea.execCommand("area_search"); 53 | use=true; 54 | }else if(letter=="Esc"){ 55 | editArea.execCommand("close_all_inline_popup", e); 56 | use=true; 57 | }else if(CtrlPressed(e) && !AltPressed(e) && !ShiftPressed(e)){ 58 | switch(low_letter){ 59 | case "f": 60 | editArea.execCommand("area_search"); 61 | use=true; 62 | break; 63 | case "r": 64 | editArea.execCommand("area_replace"); 65 | use=true; 66 | break; 67 | case "q": 68 | editArea.execCommand("close_all_inline_popup", e); 69 | use=true; 70 | break; 71 | case "h": 72 | editArea.execCommand("change_highlight"); 73 | use=true; 74 | break; 75 | case "g": 76 | setTimeout("editArea.execCommand('go_to_line');", 5); // the prompt stop the return false otherwise 77 | use=true; 78 | break; 79 | case "e": 80 | editArea.execCommand("show_help"); 81 | use=true; 82 | break; 83 | case "z": 84 | use=true; 85 | editArea.execCommand("undo"); 86 | break; 87 | case "y": 88 | use=true; 89 | editArea.execCommand("redo"); 90 | break; 91 | default: 92 | break; 93 | } 94 | } 95 | 96 | // check to disable the redo possibility if the textarea content change 97 | if(editArea.next.length > 0){ 98 | setTimeout("editArea.check_redo();", 10); 99 | } 100 | 101 | setTimeout("editArea.check_file_changes();", 10); 102 | 103 | 104 | if(use){ 105 | // in case of a control that sould'nt be used by IE but that is used => THROW a javascript error that will stop key action 106 | if(editArea.isIE) 107 | e.keyCode=0; 108 | return false; 109 | } 110 | //alert("Test: "+ letter + " ("+e.keyCode+") ALT: "+ AltPressed(e) + " CTRL "+ CtrlPressed(e) + " SHIFT "+ ShiftPressed(e)); 111 | 112 | return true; 113 | 114 | }; 115 | 116 | 117 | // return true if Alt key is pressed 118 | function AltPressed(e) { 119 | if (window.event) { 120 | return (window.event.altKey); 121 | } else { 122 | if(e.modifiers) 123 | return (e.altKey || (e.modifiers % 2)); 124 | else 125 | return e.altKey; 126 | } 127 | }; 128 | 129 | // return true if Ctrl key is pressed 130 | function CtrlPressed(e) { 131 | if (window.event) { 132 | return (window.event.ctrlKey); 133 | } else { 134 | return (e.ctrlKey || (e.modifiers==2) || (e.modifiers==3) || (e.modifiers>5)); 135 | } 136 | }; 137 | 138 | // return true if Shift key is pressed 139 | function ShiftPressed(e) { 140 | if (window.event) { 141 | return (window.event.shiftKey); 142 | } else { 143 | return (e.shiftKey || (e.modifiers>3)); 144 | } 145 | }; 146 | -------------------------------------------------------------------------------- /edit_area/langs/bg.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Bulgarian translation 3 | * Author: Valentin Hristov 4 | * Company: SOFTKIT Bulgarian 5 | * Site: http://www.softkit-bg.com 6 | */ 7 | editAreaLoader.lang["bg"]={ 8 | new_document: "нов документ", 9 | search_button: "търсене и замяна", 10 | search_command: "търси следващия / отвори прозорец с търсачка", 11 | search: "търсене", 12 | replace: "замяна", 13 | replace_command: "замяна / отвори прозорец с търсачка", 14 | find_next: "намери следващия", 15 | replace_all: "замени всички", 16 | reg_exp: "реголярни изрази", 17 | match_case: "чуствителен към регистъра", 18 | not_found: "няма резултат.", 19 | occurrence_replaced: "замяната е осъществена.", 20 | search_field_empty: "Полето за търсене е празно", 21 | restart_search_at_begin: "До края на документа. Почни с началото.", 22 | move_popup: "премести прозореца с търсачката", 23 | font_size: "--Размер на шрифта--", 24 | go_to_line: "премени към реда", 25 | go_to_line_prompt: "премени към номера на реда:", 26 | undo: "отмени", 27 | redo: "върни", 28 | change_smooth_selection: "включи/изключи някой от функциите за преглед (по красиво, но повече натоварва)", 29 | highlight: "превключване на оцветяване на синтаксиса включена/изключена", 30 | reset_highlight: "въстанови оцветяване на синтаксиса (ако не е синхронизиран с текста)", 31 | word_wrap: "режим на пренасяне на дълги редове", 32 | help: "за програмата", 33 | save: "съхрани", 34 | load: "зареди", 35 | line_abbr: "Стр", 36 | char_abbr: "Стлб", 37 | position: "Позиция", 38 | total: "Всичко", 39 | close_popup: "затвори прозореца", 40 | shortcuts: "Бързи клавиши", 41 | add_tab: "добави табулация в текста", 42 | remove_tab: "премахни табулацията в текста", 43 | about_notice: "Внимание: използвайте функцията оцветяване на синтаксиса само за малки текстове", 44 | toggle: "Превключи редактор", 45 | accesskey: "Бърз клавиш", 46 | tab: "Tab", 47 | shift: "Shift", 48 | ctrl: "Ctrl", 49 | esc: "Esc", 50 | processing: "Зареждане...", 51 | fullscreen: "на цял екран", 52 | syntax_selection: "--Синтаксис--", 53 | close_tab: "Затвори файла" 54 | }; 55 | -------------------------------------------------------------------------------- /edit_area/langs/cs.js: -------------------------------------------------------------------------------- 1 | editAreaLoader.lang["cs"]={ 2 | new_document: "Nový dokument", 3 | search_button: "Najdi a nahraď", 4 | search_command: "Hledej další / otevři vyhledávací pole", 5 | search: "Hledej", 6 | replace: "Nahraď", 7 | replace_command: "Nahraď / otevři vyhledávací pole", 8 | find_next: "Najdi další", 9 | replace_all: "Nahraď vše", 10 | reg_exp: "platné výrazy", 11 | match_case: "vyhodnocené výrazy", 12 | not_found: "nenalezené.", 13 | occurrence_replaced: "výskyty nahrazené.", 14 | search_field_empty: "Pole vyhledávání je prázdné", 15 | restart_search_at_begin: "Dosažen konec souboru, začínám od začátku.", 16 | move_popup: "Přesuň vyhledávací okno", 17 | font_size: "--Velikost textu--", 18 | go_to_line: "Přejdi na řádek", 19 | go_to_line_prompt: "Přejdi na řádek:", 20 | undo: "krok zpět", 21 | redo: "znovu", 22 | change_smooth_selection: "Povolit nebo zakázat některé ze zobrazených funkcí (účelnější zobrazení požaduje větší zatížení procesoru)", 23 | highlight: "Zvýrazňování syntaxe zap./vyp.", 24 | reset_highlight: "Obnovit zvýraznění (v případě nesrovnalostí)", 25 | word_wrap: "toggle word wrapping mode", 26 | help: "O programu", 27 | save: "Uložit", 28 | load: "Otevřít", 29 | line_abbr: "Ř.", 30 | char_abbr: "S.", 31 | position: "Pozice", 32 | total: "Celkem", 33 | close_popup: "Zavřít okno", 34 | shortcuts: "Zkratky", 35 | add_tab: "Přidat tabulování textu", 36 | remove_tab: "Odtsranit tabulování textu", 37 | about_notice: "Upozornění! Funkce zvýrazňování textu je k dispozici pouze pro malý text", 38 | toggle: "Přepnout editor", 39 | accesskey: "Přístupová klávesa", 40 | tab: "Záložka", 41 | shift: "Shift", 42 | ctrl: "Ctrl", 43 | esc: "Esc", 44 | processing: "Zpracovávám ...", 45 | fullscreen: "Celá obrazovka", 46 | syntax_selection: "--vyber zvýrazňovač--", 47 | close_tab: "Close file" 48 | }; 49 | -------------------------------------------------------------------------------- /edit_area/langs/de.js: -------------------------------------------------------------------------------- 1 | editAreaLoader.lang["de"]={ 2 | new_document: "Neues Dokument", 3 | search_button: "Suchen und Ersetzen", 4 | search_command: "Weitersuchen / öffne Suchfeld", 5 | search: "Suchen", 6 | replace: "Ersetzen", 7 | replace_command: "Ersetzen / öffne Suchfeld", 8 | find_next: "Weitersuchen", 9 | replace_all: "Ersetze alle Treffer", 10 | reg_exp: "reguläre Ausdrücke", 11 | match_case: "passt auf den Begriff
    ", 12 | not_found: "Nicht gefunden.", 13 | occurrence_replaced: "Die Vorkommen wurden ersetzt.", 14 | search_field_empty: "Leeres Suchfeld", 15 | restart_search_at_begin: "Ende des zu durchsuchenden Bereiches erreicht. Es wird die Suche von Anfang an fortgesetzt.", //find a shorter translation 16 | move_popup: "Suchfenster bewegen", 17 | font_size: "--Schriftgröße--", 18 | go_to_line: "Gehe zu Zeile", 19 | go_to_line_prompt: "Gehe zu Zeilennummmer:", 20 | undo: "Rückgängig", 21 | redo: "Wiederherstellen", 22 | change_smooth_selection: "Aktiviere/Deaktiviere einige Features (weniger Bildschirmnutzung aber mehr CPU-Belastung)", 23 | highlight: "Syntax Highlighting an- und ausschalten", 24 | reset_highlight: "Highlighting zurücksetzen (falls mit Text nicht konform)", 25 | word_wrap: "Toggle word wrapping mode", 26 | help: "Info", 27 | save: "Speichern", 28 | load: "Öffnen", 29 | line_abbr: "Ln", 30 | char_abbr: "Ch", 31 | position: "Position", 32 | total: "Gesamt", 33 | close_popup: "Popup schließen", 34 | shortcuts: "Shortcuts", 35 | add_tab: "Tab zum Text hinzufügen", 36 | remove_tab: "Tab aus Text entfernen", 37 | about_notice: "Bemerkung: Syntax Highlighting ist nur für kurze Texte", 38 | toggle: "Editor an- und ausschalten", 39 | accesskey: "Accesskey", 40 | tab: "Tab", 41 | shift: "Shift", 42 | ctrl: "Ctrl", 43 | esc: "Esc", 44 | processing: "In Bearbeitung...", 45 | fullscreen: "Full-Screen", 46 | syntax_selection: "--Syntax--", 47 | close_tab: "Close file" 48 | }; 49 | -------------------------------------------------------------------------------- /edit_area/langs/dk.js: -------------------------------------------------------------------------------- 1 | editAreaLoader.lang["dk"]={ 2 | new_document: "nyt tomt dokument", 3 | search_button: "søg og erstat", 4 | search_command: "find næste / åben søgefelt", 5 | search: "søg", 6 | replace: "erstat", 7 | replace_command: "erstat / åben søgefelt", 8 | find_next: "find næste", 9 | replace_all: "erstat alle", 10 | reg_exp: "regular expressions", 11 | match_case: "forskel på store/små bogstaver
    ", 12 | not_found: "not found.", 13 | occurrence_replaced: "occurences replaced.", 14 | search_field_empty: "Search field empty", 15 | restart_search_at_begin: "End of area reached. Restart at begin.", 16 | move_popup: "flyt søgepopup", 17 | font_size: "--Skriftstørrelse--", 18 | go_to_line: "gå til linie", 19 | go_to_line_prompt: "gå til linienummer:", 20 | undo: "fortryd", 21 | redo: "gentag", 22 | change_smooth_selection: "slå display funktioner til/fra (smartere display men mere CPU krævende)", 23 | highlight: "slå syntax highlight til/fra", 24 | reset_highlight: "nulstil highlight (hvis den er desynkroniseret fra teksten)", 25 | word_wrap: "toggle word wrapping mode", 26 | help: "om", 27 | save: "gem", 28 | load: "hent", 29 | line_abbr: "Ln", 30 | char_abbr: "Ch", 31 | position: "Position", 32 | total: "Total", 33 | close_popup: "luk popup", 34 | shortcuts: "Genveje", 35 | add_tab: "tilføj tabulation til tekst", 36 | remove_tab: "fjern tabulation fra tekst", 37 | about_notice: "Husk: syntax highlight funktionen bør kun bruge til små tekster", 38 | toggle: "Slå editor til / fra", 39 | accesskey: "Accesskey", 40 | tab: "Tab", 41 | shift: "Skift", 42 | ctrl: "Ctrl", 43 | esc: "Esc", 44 | processing: "Processing...", 45 | fullscreen: "fullscreen", 46 | syntax_selection: "--Syntax--", 47 | close_tab: "Close file" 48 | }; 49 | -------------------------------------------------------------------------------- /edit_area/langs/en.js: -------------------------------------------------------------------------------- 1 | editAreaLoader.lang["en"]={ 2 | new_document: "new empty document", 3 | search_button: "search and replace", 4 | search_command: "search next / open search area", 5 | search: "search", 6 | replace: "replace", 7 | replace_command: "replace / open search area", 8 | find_next: "find next", 9 | replace_all: "replace all", 10 | reg_exp: "regular expressions", 11 | match_case: "match case", 12 | not_found: "not found.", 13 | occurrence_replaced: "occurences replaced.", 14 | search_field_empty: "Search field empty", 15 | restart_search_at_begin: "End of area reached. Restart at begin.", 16 | move_popup: "move search popup", 17 | font_size: "--Font size--", 18 | go_to_line: "go to line", 19 | go_to_line_prompt: "go to line number:", 20 | undo: "undo", 21 | redo: "redo", 22 | change_smooth_selection: "enable/disable some display features (smarter display but more CPU charge)", 23 | highlight: "toggle syntax highlight on/off", 24 | reset_highlight: "reset highlight (if desyncronized from text)", 25 | word_wrap: "toggle word wrapping mode", 26 | help: "about", 27 | save: "save", 28 | load: "load", 29 | line_abbr: "Ln", 30 | char_abbr: "Ch", 31 | position: "Position", 32 | total: "Total", 33 | close_popup: "close popup", 34 | shortcuts: "Shortcuts", 35 | add_tab: "add tabulation to text", 36 | remove_tab: "remove tabulation to text", 37 | about_notice: "Notice: syntax highlight function is only for small text", 38 | toggle: "Toggle editor", 39 | accesskey: "Accesskey", 40 | tab: "Tab", 41 | shift: "Shift", 42 | ctrl: "Ctrl", 43 | esc: "Esc", 44 | processing: "Processing...", 45 | fullscreen: "fullscreen", 46 | syntax_selection: "--Syntax--", 47 | close_tab: "Close file" 48 | }; 49 | -------------------------------------------------------------------------------- /edit_area/langs/eo.js: -------------------------------------------------------------------------------- 1 | editAreaLoader.lang["eo"]={ 2 | new_document: "nova dokumento (vakigas la enhavon)", 3 | search_button: "serĉi / anstataŭigi", 4 | search_command: "pluserĉi / malfermi la serĉo-fenestron", 5 | search: "serĉi", 6 | replace: "anstataŭigi", 7 | replace_command: "anstataŭigi / malfermi la serĉo-fenestron", 8 | find_next: "serĉi", 9 | replace_all: "anstataŭigi ĉion", 10 | reg_exp: "regula esprimo", 11 | match_case: "respekti la usklecon", 12 | not_found: "ne trovita.", 13 | occurrence_replaced: "anstataŭigoj plenumitaj.", 14 | search_field_empty: "La kampo estas malplena.", 15 | restart_search_at_begin: "Fino de teksto ĝisrirata, ĉu daŭrigi el la komenco?", 16 | move_popup: "movi la serĉo-fenestron", 17 | font_size: "--Tipara grando--", 18 | go_to_line: "iri al la linio", 19 | go_to_line_prompt: "iri al la linio numero:", 20 | undo: "rezigni", 21 | redo: "refari", 22 | change_smooth_selection: "ebligi/malebligi la funkcioj de vidigo (pli bona vidigo, sed pli da ŝarĝo de la ĉeforgano)", 23 | highlight: "ebligi/malebligi la sintaksan kolorigon", 24 | reset_highlight: "repravalorizi la sintaksan kolorigon (se malsinkronigon de la teksto)", 25 | word_wrap: "toggle word wrapping mode", 26 | help: "pri", 27 | save: "registri", 28 | load: "ŝarĝi", 29 | line_abbr: "Ln", 30 | char_abbr: "Sg", 31 | position: "Pozicio", 32 | total: "Sumo", 33 | close_popup: "fermi la ŝprucfenestron", 34 | shortcuts: "Fulmoklavo", 35 | add_tab: "aldoni tabon en la tekston", 36 | remove_tab: "forigi tablon el la teksto", 37 | about_notice: "Noto: la sintaksa kolorigo estas nur prikalkulita por mallongaj tekstoj.", 38 | toggle: "baskuligi la redaktilon", 39 | accesskey: "Fulmoklavo", 40 | tab: "Tab", 41 | shift: "Maj", 42 | ctrl: "Ktrl", 43 | esc: "Esk", 44 | processing: "ŝargante...", 45 | fullscreen: "plenekrane", 46 | syntax_selection: "--Sintakso--", 47 | close_tab: "Fermi la dosieron" 48 | }; -------------------------------------------------------------------------------- /edit_area/langs/es.js: -------------------------------------------------------------------------------- 1 | editAreaLoader.lang["es"]={ 2 | new_document: "nuevo documento vacío", 3 | search_button: "buscar y reemplazar", 4 | search_command: "buscar siguiente / abrir área de búsqueda", 5 | search: "buscar", 6 | replace: "reemplazar", 7 | replace_command: "reemplazar / abrir área de búsqueda", 8 | find_next: "encontrar siguiente", 9 | replace_all: "reemplazar todos", 10 | reg_exp: "expresiones regulares", 11 | match_case: "coincidir capitalización", 12 | not_found: "no encontrado.", 13 | occurrence_replaced: "ocurrencias reemplazadas.", 14 | search_field_empty: "Campo de búsqueda vacío", 15 | restart_search_at_begin: "Se ha llegado al final del área. Se va a seguir desde el principio.", 16 | move_popup: "mover la ventana de búsqueda", 17 | font_size: "--Tamaño de la fuente--", 18 | go_to_line: "ir a la línea", 19 | go_to_line_prompt: "ir a la línea número:", 20 | undo: "deshacer", 21 | redo: "rehacer", 22 | change_smooth_selection: "activar/desactivar algunas características de visualización (visualización más inteligente pero más carga de CPU)", 23 | highlight: "intercambiar resaltado de sintaxis", 24 | reset_highlight: "reinicializar resaltado (si no esta sincronizado con el texto)", 25 | word_wrap: "toggle word wrapping mode", 26 | help: "acerca", 27 | save: "guardar", 28 | load: "cargar", 29 | line_abbr: "Ln", 30 | char_abbr: "Ch", 31 | position: "Posición", 32 | total: "Total", 33 | close_popup: "recuadro de cierre", 34 | shortcuts: "Atajos", 35 | add_tab: "añadir tabulado al texto", 36 | remove_tab: "borrar tabulado del texto", 37 | about_notice: "Aviso: el resaltado de sintaxis sólo funciona para texto pequeño", 38 | toggle: "Cambiar editor", 39 | accesskey: "Tecla de acceso", 40 | tab: "Tab", 41 | shift: "Mayúsc", 42 | ctrl: "Ctrl", 43 | esc: "Esc", 44 | processing: "Procesando...", 45 | fullscreen: "pantalla completa", 46 | syntax_selection: "--Syntax--", 47 | close_tab: "Close file" 48 | }; 49 | -------------------------------------------------------------------------------- /edit_area/langs/fi.js: -------------------------------------------------------------------------------- 1 | editAreaLoader.lang["fi"]={ 2 | new_document: "uusi tyhjä dokumentti", 3 | search_button: "etsi ja korvaa", 4 | search_command: "etsi seuraava / avaa etsintävalikko", 5 | search: "etsi", 6 | replace: "korvaa", 7 | replace_command: "korvaa / avaa etsintävalikko", 8 | find_next: "etsi seuraava", 9 | replace_all: "korvaa kaikki", 10 | reg_exp: "säännölliset lausekkeet", 11 | match_case: "täsmää kirjainkokoon", 12 | not_found: "ei löytynyt.", 13 | occurrence_replaced: "esiintymää korvattu.", 14 | search_field_empty: "Haettava merkkijono on tyhjä", 15 | restart_search_at_begin: "Alueen loppu saavutettiin. Aloitetaan alusta.", 16 | move_popup: "siirrä etsintävalikkoa", 17 | font_size: "--Fontin koko--", 18 | go_to_line: "siirry riville", 19 | go_to_line_prompt: "mene riville:", 20 | undo: "peruuta", 21 | redo: "tee uudelleen", 22 | change_smooth_selection: "kytke/sammuta joitakin näyttötoimintoja (Älykkäämpi toiminta, mutta suurempi CPU kuormitus)", 23 | highlight: "kytke syntaksikorostus päälle/pois", 24 | reset_highlight: "resetoi syntaksikorostus (jos teksti ei ole synkassa korostuksen kanssa)", 25 | word_wrap: "toggle word wrapping mode", 26 | help: "tietoja", 27 | save: "tallenna", 28 | load: "lataa", 29 | line_abbr: "Rv", 30 | char_abbr: "Pos", 31 | position: "Paikka", 32 | total: "Yhteensä", 33 | close_popup: "sulje valikko", 34 | shortcuts: "Pikatoiminnot", 35 | add_tab: "lisää sisennys tekstiin", 36 | remove_tab: "poista sisennys tekstistä", 37 | about_notice: "Huomautus: syntaksinkorostus toimii vain pienelle tekstille", 38 | toggle: "Kytke editori", 39 | accesskey: "Pikanäppäin", 40 | tab: "Tab", 41 | shift: "Shift", 42 | ctrl: "Ctrl", 43 | esc: "Esc", 44 | processing: "Odota...", 45 | fullscreen: "koko ruutu", 46 | syntax_selection: "--Syntaksi--", 47 | close_tab: "Sulje tiedosto" 48 | }; -------------------------------------------------------------------------------- /edit_area/langs/fr.js: -------------------------------------------------------------------------------- 1 | editAreaLoader.lang["fr"]={ 2 | new_document: "nouveau document (efface le contenu)", 3 | search_button: "rechercher / remplacer", 4 | search_command: "rechercher suivant / ouvrir la fenêtre de recherche", 5 | search: "rechercher", 6 | replace: "remplacer", 7 | replace_command: "remplacer / ouvrir la fenêtre de recherche", 8 | find_next: "rechercher", 9 | replace_all: "tout remplacer", 10 | reg_exp: "expr. régulière", 11 | match_case: "respecter la casse", 12 | not_found: "pas trouvé.", 13 | occurrence_replaced: "remplacements éffectués.", 14 | search_field_empty: "Le champ de recherche est vide.", 15 | restart_search_at_begin: "Fin du texte atteint, poursuite au début.", 16 | move_popup: "déplacer la fenêtre de recherche", 17 | font_size: "--Taille police--", 18 | go_to_line: "aller à la ligne", 19 | go_to_line_prompt: "aller a la ligne numero:", 20 | undo: "annuler", 21 | redo: "refaire", 22 | change_smooth_selection: "activer/désactiver des fonctions d'affichage (meilleur affichage mais plus de charge processeur)", 23 | highlight: "activer/désactiver la coloration syntaxique", 24 | reset_highlight: "réinitialiser la coloration syntaxique (si désyncronisée du texte)", 25 | word_wrap: "activer/désactiver les retours à la ligne automatiques", 26 | help: "à propos", 27 | save: "sauvegarder", 28 | load: "charger", 29 | line_abbr: "Ln", 30 | char_abbr: "Ch", 31 | position: "Position", 32 | total: "Total", 33 | close_popup: "fermer le popup", 34 | shortcuts: "Racourcis clavier", 35 | add_tab: "ajouter une tabulation dans le texte", 36 | remove_tab: "retirer une tabulation dans le texte", 37 | about_notice: "Note: la coloration syntaxique n'est prévue que pour de courts textes.", 38 | toggle: "basculer l'éditeur", 39 | accesskey: "Accesskey", 40 | tab: "Tab", 41 | shift: "Maj", 42 | ctrl: "Ctrl", 43 | esc: "Esc", 44 | processing: "chargement...", 45 | fullscreen: "plein écran", 46 | syntax_selection: "--Syntaxe--", 47 | close_tab: "Fermer le fichier" 48 | }; 49 | -------------------------------------------------------------------------------- /edit_area/langs/hr.js: -------------------------------------------------------------------------------- 1 | editAreaLoader.lang["hr"]={ 2 | new_document: "Novi dokument", 3 | search_button: "Traži i izmijeni", 4 | search_command: "Traži dalje / Otvori prozor za traženje", 5 | search: "Traži", 6 | replace: "Izmijeni", 7 | replace_command: "Izmijeni / Otvori prozor za traženje", 8 | find_next: "Traži dalje", 9 | replace_all: "Izmjeni sve", 10 | reg_exp: "Regularni izrazi", 11 | match_case: "Bitna vel. slova", 12 | not_found: "nije naðeno.", 13 | occurrence_replaced: "izmjenjenih.", 14 | search_field_empty: "Prazno polje za traženje!", 15 | restart_search_at_begin: "Došao do kraja. Poèeo od poèetka.", 16 | move_popup: "Pomakni prozor", 17 | font_size: "--Velièina teksta--", 18 | go_to_line: "Odi na redak", 19 | go_to_line_prompt: "Odi na redak:", 20 | undo: "Vrati natrag", 21 | redo: "Napravi ponovo", 22 | change_smooth_selection: "Ukljuèi/iskljuèi neke moguænosti prikaza (pametniji prikaz, ali zagušeniji CPU)", 23 | highlight: "Ukljuèi/iskljuèi bojanje sintakse", 24 | reset_highlight: "Ponovi kolorizaciju (ako je nesinkronizirana s tekstom)", 25 | word_wrap: "toggle word wrapping mode", 26 | help: "O edit_area", 27 | save: "Spremi", 28 | load: "Uèitaj", 29 | line_abbr: "Ln", 30 | char_abbr: "Zn", 31 | position: "Pozicija", 32 | total: "Ukupno", 33 | close_popup: "Zatvori prozor", 34 | shortcuts: "Kratice", 35 | add_tab: "Dodaj tabulaciju", 36 | remove_tab: "Makni tabulaciju", 37 | about_notice: "Napomena: koloriziranje sintakse je samo za kratke kodove", 38 | toggle: "Prebaci naèin ureðivanja", 39 | accesskey: "Accesskey", 40 | tab: "Tab", 41 | shift: "Shift", 42 | ctrl: "Ctrl", 43 | esc: "Esc", 44 | processing: "Procesiram...", 45 | fullscreen: "Cijeli prozor", 46 | syntax_selection: "--Syntax--", 47 | close_tab: "Close file" 48 | }; 49 | -------------------------------------------------------------------------------- /edit_area/langs/it.js: -------------------------------------------------------------------------------- 1 | editAreaLoader.lang["it"]={ 2 | new_document: "nuovo documento vuoto", 3 | search_button: "cerca e sostituisci", 4 | search_command: "trova successivo / apri finestra di ricerca", 5 | search: "cerca", 6 | replace: "sostituisci", 7 | replace_command: "sostituisci / apri finestra di ricerca", 8 | find_next: "trova successivo", 9 | replace_all: "sostituisci tutti", 10 | reg_exp: "espressioni regolari", 11 | match_case: "confronta maiuscole/minuscole
    ", 12 | not_found: "non trovato.", 13 | occurrence_replaced: "occorrenze sostituite.", 14 | search_field_empty: "Campo ricerca vuoto", 15 | restart_search_at_begin: "Fine del testo raggiunta. Ricomincio dall'inizio.", 16 | move_popup: "sposta popup di ricerca", 17 | font_size: "-- Dimensione --", 18 | go_to_line: "vai alla linea", 19 | go_to_line_prompt: "vai alla linea numero:", 20 | undo: "annulla", 21 | redo: "ripeti", 22 | change_smooth_selection: "abilita/disabilita alcune caratteristiche della visualizzazione", 23 | highlight: "abilita/disabilita colorazione della sintassi", 24 | reset_highlight: "aggiorna colorazione (se non sincronizzata)", 25 | word_wrap: "toggle word wrapping mode", 26 | help: "informazioni su...", 27 | save: "salva", 28 | load: "carica", 29 | line_abbr: "Ln", 30 | char_abbr: "Ch", 31 | position: "Posizione", 32 | total: "Totale", 33 | close_popup: "chiudi popup", 34 | shortcuts: "Scorciatoie", 35 | add_tab: "aggiungi tabulazione", 36 | remove_tab: "rimuovi tabulazione", 37 | about_notice: "Avviso: la colorazione della sintassi vale solo con testo piccolo", 38 | toggle: "Abilita/disabilita editor", 39 | accesskey: "Accesskey", 40 | tab: "Tab", 41 | shift: "Shift", 42 | ctrl: "Ctrl", 43 | esc: "Esc", 44 | processing: "In corso...", 45 | fullscreen: "fullscreen", 46 | syntax_selection: "--Syntax--", 47 | close_tab: "Close file" 48 | }; 49 | -------------------------------------------------------------------------------- /edit_area/langs/ja.js: -------------------------------------------------------------------------------- 1 | editAreaLoader.lang["ja"]={ 2 | new_document: "新規作成", 3 | search_button: "検索・置換", 4 | search_command: "次を検索 / 検索窓を表示", 5 | search: "検索", 6 | replace: "置換", 7 | replace_command: "置換 / 置換窓を表示", 8 | find_next: "次を検索", 9 | replace_all: "全置換", 10 | reg_exp: "正規表現", 11 | match_case: "大文字小文字の区別", 12 | not_found: "見つかりません。", 13 | occurrence_replaced: "置換しました。", 14 | search_field_empty: "検索対象文字列が空です。", 15 | restart_search_at_begin: "終端に達しました、始めに戻ります", 16 | move_popup: "検索窓を移動", 17 | font_size: "--フォントサイズ--", 18 | go_to_line: "指定行へ移動", 19 | go_to_line_prompt: "指定行へ移動します:", 20 | undo: "元に戻す", 21 | redo: "やり直し", 22 | change_smooth_selection: "スムース表示の切り替え(CPUを使います)", 23 | highlight: "構文強調表示の切り替え", 24 | reset_highlight: "構文強調表示のリセット", 25 | word_wrap: "toggle word wrapping mode", 26 | help: "ヘルプを表示", 27 | save: "保存", 28 | load: "読み込み", 29 | line_abbr: "行", 30 | char_abbr: "文字", 31 | position: "位置", 32 | total: "合計", 33 | close_popup: "ポップアップを閉じる", 34 | shortcuts: "ショートカット", 35 | add_tab: "タブを挿入する", 36 | remove_tab: "タブを削除する", 37 | about_notice: "注意:構文強調表示は短いテキストでしか有効に機能しません。", 38 | toggle: "テキストエリアとeditAreaの切り替え", 39 | accesskey: "アクセスキー", 40 | tab: "Tab", 41 | shift: "Shift", 42 | ctrl: "Ctrl", 43 | esc: "Esc", 44 | processing: "処理中です...", 45 | fullscreen: "fullscreen", 46 | syntax_selection: "--Syntax--", 47 | close_tab: "Close file" 48 | }; 49 | -------------------------------------------------------------------------------- /edit_area/langs/mk.js: -------------------------------------------------------------------------------- 1 | editAreaLoader.lang["mk"]={ 2 | new_document: "Нов документ", 3 | search_button: "Најди и замени", 4 | search_command: "Барај следно / Отвори нов прозорец за пребарување", 5 | search: "Барај", 6 | replace: "Замени", 7 | replace_command: "Замени / Отвори прозорец за пребарување", 8 | find_next: "најди следно", 9 | replace_all: "Замени ги сите", 10 | reg_exp: "Регуларни изрази", 11 | match_case: "Битна е големината на буквите", 12 | not_found: "не е пронајдено.", 13 | occurrence_replaced: "замени.", 14 | search_field_empty: "Полето за пребарување е празно", 15 | restart_search_at_begin: "Крај на областа. Стартувај од почеток.", 16 | move_popup: "Помести го прозорецот", 17 | font_size: "--Големина на текстот--", 18 | go_to_line: "Оди на линија", 19 | go_to_line_prompt: "Оди на линија со број:", 20 | undo: "Врати", 21 | redo: "Повтори", 22 | change_smooth_selection: "Вклучи/исклучи некои карактеристики за приказ (попаметен приказ, но поголемо оптеретување за процесорот)", 23 | highlight: "Вклучи/исклучи осветлување на синтакса", 24 | reset_highlight: "Ресетирај го осветлувањето на синтакса (доколку е десинхронизиранo со текстот)", 25 | word_wrap: "toggle word wrapping mode", 26 | help: "За", 27 | save: "Зачувај", 28 | load: "Вчитај", 29 | line_abbr: "Лн", 30 | char_abbr: "Зн", 31 | position: "Позиција", 32 | total: "Вкупно", 33 | close_popup: "Затвори го прозорецот", 34 | shortcuts: "Кратенки", 35 | add_tab: "Додај табулација на текстот", 36 | remove_tab: "Отстрани ја табулацијата", 37 | about_notice: "Напомена: Осветлувањето на синтанса е само за краток текст", 38 | toggle: "Смени начин на уредување", 39 | accesskey: "Accesskey", 40 | tab: "Tab", 41 | shift: "Shift", 42 | ctrl: "Ctrl", 43 | esc: "Esc", 44 | processing: "Обработувам...", 45 | fullscreen: "Цел прозорец", 46 | syntax_selection: "--Синтакса--", 47 | close_tab: "Избери датотека" 48 | }; 49 | -------------------------------------------------------------------------------- /edit_area/langs/nl.js: -------------------------------------------------------------------------------- 1 | editAreaLoader.lang["nl"]={ 2 | new_document: "nieuw leeg document", 3 | search_button: "zoek en vervang", 4 | search_command: "zoek volgende / zoekscherm openen", 5 | search: "zoek", 6 | replace: "vervang", 7 | replace_command: "vervang / zoekscherm openen", 8 | find_next: "volgende vinden", 9 | replace_all: "alles vervangen", 10 | reg_exp: "reguliere expressies", 11 | match_case: "hoofdletter gevoelig", 12 | not_found: "niet gevonden.", 13 | occurrence_replaced: "object vervangen.", 14 | search_field_empty: "Zoek veld leeg", 15 | restart_search_at_begin: "Niet meer instanties gevonden, begin opnieuw", 16 | move_popup: "versleep zoek scherm", 17 | font_size: "--Letter grootte--", 18 | go_to_line: "Ga naar regel", 19 | go_to_line_prompt: "Ga naar regel nummer:", 20 | undo: "Ongedaan maken", 21 | redo: "Opnieuw doen", 22 | change_smooth_selection: "zet wat schermopties aan/uit (kan langzamer zijn)", 23 | highlight: "zet syntax highlight aan/uit", 24 | reset_highlight: "reset highlight (indien gedesynchronizeerd)", 25 | word_wrap: "toggle word wrapping mode", 26 | help: "informatie", 27 | save: "opslaan", 28 | load: "laden", 29 | line_abbr: "Ln", 30 | char_abbr: "Ch", 31 | position: "Positie", 32 | total: "Totaal", 33 | close_popup: "Popup sluiten", 34 | shortcuts: "Snelkoppelingen", 35 | add_tab: "voeg tabs toe in tekst", 36 | remove_tab: "verwijder tabs uit tekst", 37 | about_notice: "Notitie: syntax highlight functie is alleen voor kleine tekst", 38 | toggle: "geavanceerde bewerkingsopties", 39 | accesskey: "Accessknop", 40 | tab: "Tab", 41 | shift: "Shift", 42 | ctrl: "Ctrl", 43 | esc: "Esc", 44 | processing: "Verwerken...", 45 | fullscreen: "fullscreen", 46 | syntax_selection: "--Syntax--", 47 | close_tab: "Close file" 48 | }; 49 | -------------------------------------------------------------------------------- /edit_area/langs/pl.js: -------------------------------------------------------------------------------- 1 | editAreaLoader.lang["pl"]={ 2 | new_document: "nowy dokument", 3 | search_button: "znajdź i zamień", 4 | search_command: "znajdź następny", 5 | search: "znajdź", 6 | replace: "zamień", 7 | replace_command: "zamień", 8 | find_next: "następny", 9 | replace_all: "zamień wszystko", 10 | reg_exp: "wyrażenie regularne", 11 | match_case: "uwzględnij wielkość liter
    ", 12 | not_found: "nie znaleziono.", 13 | occurrence_replaced: "wystąpień zamieniono.", 14 | search_field_empty: "Nie wprowadzono tekstu", 15 | restart_search_at_begin: "Koniec dokumentu. Wyszukiwanie od początku.", 16 | move_popup: "przesuń okienko wyszukiwania", 17 | font_size: "Rozmiar", 18 | go_to_line: "idź do linii", 19 | go_to_line_prompt: "numer linii:", 20 | undo: "cofnij", 21 | redo: "przywróć", 22 | change_smooth_selection: "włącz/wyłącz niektóre opcje wyglądu (zaawansowane opcje wyglądu obciążają procesor)", 23 | highlight: "włącz/wyłącz podświetlanie składni", 24 | reset_highlight: "odśwież podświetlanie składni (jeśli rozsynchronizowało się z tekstem)", 25 | word_wrap: "toggle word wrapping mode", 26 | help: "o programie", 27 | save: "zapisz", 28 | load: "otwórz", 29 | line_abbr: "Ln", 30 | char_abbr: "Zn", 31 | position: "Pozycja", 32 | total: "W sumie", 33 | close_popup: "zamknij okienko", 34 | shortcuts: "Skróty klawiaturowe", 35 | add_tab: "dodaj wcięcie do zaznaczonego tekstu", 36 | remove_tab: "usuń wcięcie", 37 | about_notice: "Uwaga: podświetlanie składni nie jest zalecane dla długich tekstów", 38 | toggle: "Włącz/wyłącz edytor", 39 | accesskey: "Alt+", 40 | tab: "Tab", 41 | shift: "Shift", 42 | ctrl: "Ctrl", 43 | esc: "Esc", 44 | processing: "Przetwarzanie...", 45 | fullscreen: "fullscreen", 46 | syntax_selection: "--Syntax--", 47 | close_tab: "Close file" 48 | }; 49 | -------------------------------------------------------------------------------- /edit_area/langs/pt.js: -------------------------------------------------------------------------------- 1 | editAreaLoader.lang["pt"]={ 2 | new_document: "Novo documento", 3 | search_button: "Localizar e substituir", 4 | search_command: "Localizar próximo", 5 | search: "Localizar", 6 | replace: "Substituir", 7 | replace_command: "Substituir", 8 | find_next: "Localizar", 9 | replace_all: "Subst. tudo", 10 | reg_exp: "Expressões regulares", 11 | match_case: "Diferenciar maiúsculas e minúsculas", 12 | not_found: "Não encontrado.", 13 | occurrence_replaced: "Ocorrências substituidas", 14 | search_field_empty: "Campo localizar vazio.", 15 | restart_search_at_begin: "Fim das ocorrências. Recomeçar do inicio.", 16 | move_popup: "Mover janela", 17 | font_size: "--Tamanho da fonte--", 18 | go_to_line: "Ir para linha", 19 | go_to_line_prompt: "Ir para a linha:", 20 | undo: "Desfazer", 21 | redo: "Refazer", 22 | change_smooth_selection: "Opções visuais", 23 | highlight: "Cores de sintaxe", 24 | reset_highlight: "Resetar cores (se não sincronizado)", 25 | word_wrap: "toggle word wrapping mode", 26 | help: "Sobre", 27 | save: "Salvar", 28 | load: "Carregar", 29 | line_abbr: "Ln", 30 | char_abbr: "Ch", 31 | position: "Posição", 32 | total: "Total", 33 | close_popup: "Fechar", 34 | shortcuts: "Shortcuts", 35 | add_tab: "Adicionar tabulação", 36 | remove_tab: "Remover tabulação", 37 | about_notice: "Atenção: Cores de sintaxe são indicados somente para textos pequenos", 38 | toggle: "Exibir editor", 39 | accesskey: "Accesskey", 40 | tab: "Tab", 41 | shift: "Shift", 42 | ctrl: "Ctrl", 43 | esc: "Esc", 44 | processing: "Processando...", 45 | fullscreen: "fullscreen", 46 | syntax_selection: "--Syntax--", 47 | close_tab: "Close file" 48 | }; 49 | -------------------------------------------------------------------------------- /edit_area/langs/ru.js: -------------------------------------------------------------------------------- 1 | editAreaLoader.lang["ru"]={ 2 | new_document: "новый пустой документ", 3 | search_button: "поиск и замена", 4 | search_command: "искать следующий / открыть панель поиска", 5 | search: "поиск", 6 | replace: "замена", 7 | replace_command: "заменить / открыть панель поиска", 8 | find_next: "найти следующее", 9 | replace_all: "заменить все", 10 | reg_exp: "регулярное выражение", 11 | match_case: "учитывать регистр", 12 | not_found: "не найдено.", 13 | occurrence_replaced: "вхождение заменено.", 14 | search_field_empty: "Поле поиска пустое", 15 | restart_search_at_begin: "Достигнут конец документа. Начинаю с начала.", 16 | move_popup: "переместить окно поиска", 17 | font_size: "--Размер шрифта--", 18 | go_to_line: "перейти к строке", 19 | go_to_line_prompt: "перейти к строке номер:", 20 | undo: "отменить", 21 | redo: "вернуть", 22 | change_smooth_selection: "включить/отключить некоторые функции просмотра (более красиво, но больше использует процессор)", 23 | highlight: "переключить подсветку синтаксиса включена/выключена", 24 | reset_highlight: "восстановить подсветку (если разсинхронизирована от текста)", 25 | word_wrap: "toggle word wrapping mode", 26 | help: "о программе", 27 | save: "сохранить", 28 | load: "загрузить", 29 | line_abbr: "Стр", 30 | char_abbr: "Стлб", 31 | position: "Позиция", 32 | total: "Всего", 33 | close_popup: "закрыть всплывающее окно", 34 | shortcuts: "Горячие клавиши", 35 | add_tab: "добавить табуляцию в текст", 36 | remove_tab: "убрать табуляцию из текста", 37 | about_notice: "Внимание: функция подсветки синтаксиса только для небольших текстов", 38 | toggle: "Переключить редактор", 39 | accesskey: "Горячая клавиша", 40 | tab: "Tab", 41 | shift: "Shift", 42 | ctrl: "Ctrl", 43 | esc: "Esc", 44 | processing: "Обработка...", 45 | fullscreen: "полный экран", 46 | syntax_selection: "--Синтакс--", 47 | close_tab: "Закрыть файл" 48 | }; 49 | -------------------------------------------------------------------------------- /edit_area/langs/sk.js: -------------------------------------------------------------------------------- 1 | editAreaLoader.lang["sk"]={ 2 | new_document: "nový prázdy dokument", 3 | search_button: "vyhľadaj a nahraď", 4 | search_command: "hľadaj ďalsšie / otvor vyhľadávacie pole", 5 | search: "hľadaj", 6 | replace: "nahraď", 7 | replace_command: "nahraď / otvor vyhľadávacie pole", 8 | find_next: "nájdi ďalšie", 9 | replace_all: "nahraď všetko", 10 | reg_exp: "platné výrazy", 11 | match_case: "zhodujúce sa výrazy", 12 | not_found: "nenájdené.", 13 | occurrence_replaced: "výskyty nahradené.", 14 | search_field_empty: "Pole vyhľadávanie je prádzne", 15 | restart_search_at_begin: "End of area reached. Restart at begin.", 16 | move_popup: "presuň vyhľadávacie okno", 17 | font_size: "--Veľkosť textu--", 18 | go_to_line: "prejdi na riadok", 19 | go_to_line_prompt: "prejdi na riadok:", 20 | undo: "krok späť", 21 | redo: "prepracovať", 22 | change_smooth_selection: "povoliť/zamietnúť niektoré zo zobrazených funkcií (účelnejšie zobrazenie vyžaduje väčšie zaťaženie procesora CPU)", 23 | highlight: "prepnúť zvýrazňovanie syntaxe zap/vyp", 24 | reset_highlight: "zrušiť zvýrazňovanie (ak je nesynchronizované s textom)", 25 | word_wrap: "toggle word wrapping mode", 26 | help: "o programe", 27 | save: "uložiť", 28 | load: "načítať", 29 | line_abbr: "Ln", 30 | char_abbr: "Ch", 31 | position: "Pozícia", 32 | total: "Spolu", 33 | close_popup: "zavrieť okno", 34 | shortcuts: "Skratky", 35 | add_tab: "pridať tabulovanie textu", 36 | remove_tab: "odstrániť tabulovanie textu", 37 | about_notice: "Upozornenie: funkcia zvýrazňovania syntaxe je dostupná iba pre malý text", 38 | toggle: "Prepnúť editor", 39 | accesskey: "Accesskey", 40 | tab: "Záložka", 41 | shift: "Shift", 42 | ctrl: "Ctrl", 43 | esc: "Esc", 44 | processing: "Spracúvam...", 45 | fullscreen: "cel=a obrazovka", 46 | syntax_selection: "--Vyber Syntax--", 47 | close_tab: "Close file" 48 | }; 49 | -------------------------------------------------------------------------------- /edit_area/langs/zh.js: -------------------------------------------------------------------------------- 1 | editAreaLoader.lang["zh"]={ 2 | new_document: "新建空白文档", 3 | search_button: "查找与替换", 4 | search_command: "查找下一个 / 打开查找框", 5 | search: "查找", 6 | replace: "替换", 7 | replace_command: "替换 / 打开查找框", 8 | find_next: "查找下一个", 9 | replace_all: "全部替换", 10 | reg_exp: "正则表达式", 11 | match_case: "匹配大小写", 12 | not_found: "未找到.", 13 | occurrence_replaced: "处被替换.", 14 | search_field_empty: "查找框没有内容", 15 | restart_search_at_begin: "已到到文档末尾. 从头重新查找.", 16 | move_popup: "移动查找对话框", 17 | font_size: "--字体大小--", 18 | go_to_line: "转到行", 19 | go_to_line_prompt: "转到行:", 20 | undo: "恢复", 21 | redo: "重做", 22 | change_smooth_selection: "启用/禁止一些显示特性(更好看但更耗费资源)", 23 | highlight: "启用/禁止语法高亮", 24 | reset_highlight: "重置语法高亮(当文本显示不同步时)", 25 | word_wrap: "toggle word wrapping mode", 26 | help: "关于", 27 | save: "保存", 28 | load: "加载", 29 | line_abbr: "行", 30 | char_abbr: "字符", 31 | position: "位置", 32 | total: "总计", 33 | close_popup: "关闭对话框", 34 | shortcuts: "快捷键", 35 | add_tab: "添加制表符(Tab)", 36 | remove_tab: "移除制表符(Tab)", 37 | about_notice: "注意:语法高亮功能仅用于较少内容的文本(文件内容太大会导致浏览器反应慢)", 38 | toggle: "切换编辑器", 39 | accesskey: "快捷键", 40 | tab: "Tab", 41 | shift: "Shift", 42 | ctrl: "Ctrl", 43 | esc: "Esc", 44 | processing: "正在处理中...", 45 | fullscreen: "全屏编辑", 46 | syntax_selection: "--语法--", 47 | close_tab: "关闭文件" 48 | }; 49 | -------------------------------------------------------------------------------- /edit_area/license_apache.txt: -------------------------------------------------------------------------------- 1 | Copyright 2008 Christophe Dolivet 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at 4 | 5 | http://www.apache.org/licenses/LICENSE-2.0 6 | 7 | Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. -------------------------------------------------------------------------------- /edit_area/license_bsd.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) 2008, Christophe Dolivet 2 | All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 5 | 6 | * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 7 | * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 8 | * Neither the name of EditArea nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. 9 | 10 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -------------------------------------------------------------------------------- /edit_area/plugins/charmap/charmap.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Charmap plugin 3 | * by Christophe Dolivet 4 | * v0.1 (2006/09/22) 5 | * 6 | * 7 | * This plugin allow to use a visual keyboard allowing to insert any UTF-8 characters in the text. 8 | * 9 | * - plugin name to add to the plugin list: "charmap" 10 | * - plugin name to add to the toolbar list: "charmap" 11 | * - possible parameters to add to EditAreaLoader.init(): 12 | * "charmap_default": (String) define the name of the default character range displayed on popup display 13 | * (default: "arrows") 14 | * 15 | * 16 | */ 17 | 18 | var EditArea_charmap= { 19 | /** 20 | * Get called once this file is loaded (editArea still not initialized) 21 | * 22 | * @return nothing 23 | */ 24 | init: function(){ 25 | this.default_language="Arrows"; 26 | } 27 | 28 | /** 29 | * Returns the HTML code for a specific control string or false if this plugin doesn't have that control. 30 | * A control can be a button, select list or any other HTML item to present in the EditArea user interface. 31 | * Language variables such as {$lang_somekey} will also be replaced with contents from 32 | * the language packs. 33 | * 34 | * @param {string} ctrl_name: the name of the control to add 35 | * @return HTML code for a specific control or false. 36 | * @type string or boolean 37 | */ 38 | ,get_control_html: function(ctrl_name){ 39 | switch(ctrl_name){ 40 | case "charmap": 41 | // Control id, button img, command 42 | return parent.editAreaLoader.get_button_html('charmap_but', 'charmap.gif', 'charmap_press', false, this.baseURL); 43 | } 44 | return false; 45 | } 46 | /** 47 | * Get called once EditArea is fully loaded and initialised 48 | * 49 | * @return nothing 50 | */ 51 | ,onload: function(){ 52 | if(editArea.settings["charmap_default"] && editArea.settings["charmap_default"].length>0) 53 | this.default_language= editArea.settings["charmap_default"]; 54 | } 55 | 56 | /** 57 | * Is called each time the user touch a keyboard key. 58 | * 59 | * @param (event) e: the keydown event 60 | * @return true - pass to next handler in chain, false - stop chain execution 61 | * @type boolean 62 | */ 63 | ,onkeydown: function(e){ 64 | 65 | } 66 | 67 | /** 68 | * Executes a specific command, this function handles plugin commands. 69 | * 70 | * @param {string} cmd: the name of the command being executed 71 | * @param {unknown} param: the parameter of the command 72 | * @return true - pass to next handler in chain, false - stop chain execution 73 | * @type boolean 74 | */ 75 | ,execCommand: function(cmd, param){ 76 | // Handle commands 77 | switch(cmd){ 78 | case "charmap_press": 79 | win= window.open(this.baseURL+"popup.html", "charmap", "width=500,height=270,scrollbars=yes,resizable=yes"); 80 | win.focus(); 81 | return false; 82 | } 83 | // Pass to next handler in chain 84 | return true; 85 | } 86 | 87 | }; 88 | 89 | // Adds the plugin class to the list of available EditArea plugins 90 | editArea.add_plugin("charmap", EditArea_charmap); 91 | -------------------------------------------------------------------------------- /edit_area/plugins/charmap/css/charmap.css: -------------------------------------------------------------------------------- 1 | body{ 2 | background-color: #F0F0EE; 3 | font: 12px monospace, sans-serif; 4 | } 5 | 6 | select{ 7 | background-color: #F9F9F9; 8 | border: solid 1px #888888; 9 | } 10 | 11 | h1, h2, h3, h4, h5, h6{ 12 | margin: 0; 13 | padding: 0; 14 | color: #2B6FB6; 15 | } 16 | 17 | h1{ 18 | font-size: 1.5em; 19 | } 20 | 21 | div#char_list{ 22 | height: 200px; 23 | overflow: auto; 24 | padding: 1px; 25 | border: 1px solid #0A246A; 26 | background-color: #F9F9F9; 27 | clear: both; 28 | margin-top: 5px; 29 | } 30 | 31 | a.char{ 32 | display: block; 33 | float: left; 34 | width: 20px; 35 | height: 20px; 36 | line-height: 20px; 37 | margin: 1px; 38 | border: solid 1px #888888; 39 | text-align: center; 40 | cursor: pointer; 41 | } 42 | 43 | a.char:hover{ 44 | background-color: #CCCCCC; 45 | } 46 | 47 | .preview{ 48 | border: solid 1px #888888; 49 | width: 50px; 50 | padding: 2px 5px; 51 | height: 35px; 52 | line-height: 35px; 53 | text-align:center; 54 | background-color: #CCCCCC; 55 | font-size: 2em; 56 | float: right; 57 | font-weight: bold; 58 | margin: 0 0 5px 5px; 59 | } 60 | 61 | #preview_code{ 62 | font-size: 1.1em; 63 | width: 70px; 64 | } 65 | -------------------------------------------------------------------------------- /edit_area/plugins/charmap/images/charmap.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loveyu/LyFM/892f83a33a8dc54bcf669f4693c7b8b5b395c061/edit_area/plugins/charmap/images/charmap.gif -------------------------------------------------------------------------------- /edit_area/plugins/charmap/langs/bg.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Bulgarian translation 3 | * Author: Valentin Hristov 4 | * Company: SOFTKIT Bulgarian 5 | * Site: http://www.softkit-bg.com 6 | */ 7 | editArea.add_lang("bg",{ 8 | charmap_but: "Виртуална клавиатура", 9 | charmap_title: "Виртуална клавиатура", 10 | charmap_choose_block: "избери езиков блок", 11 | charmap_insert:"постави този символ" 12 | }); 13 | -------------------------------------------------------------------------------- /edit_area/plugins/charmap/langs/cs.js: -------------------------------------------------------------------------------- 1 | editArea.add_lang("cs",{ 2 | charmap_but: "Visual keyboard", 3 | charmap_title: "Visual keyboard", 4 | charmap_choose_block: "select language block", 5 | charmap_insert:"insert this character" 6 | }); 7 | -------------------------------------------------------------------------------- /edit_area/plugins/charmap/langs/de.js: -------------------------------------------------------------------------------- 1 | editArea.add_lang("de",{ 2 | charmap_but: "Sonderzeichen", 3 | charmap_title: "Sonderzeichen", 4 | charmap_choose_block: "Bereich auswählen", 5 | charmap_insert: "dieses Zeichen einfügen" 6 | }); 7 | -------------------------------------------------------------------------------- /edit_area/plugins/charmap/langs/dk.js: -------------------------------------------------------------------------------- 1 | editArea.add_lang("dk",{ 2 | charmap_but: "Visual keyboard", 3 | charmap_title: "Visual keyboard", 4 | charmap_choose_block: "select language block", 5 | charmap_insert:"insert this character" 6 | }); 7 | -------------------------------------------------------------------------------- /edit_area/plugins/charmap/langs/en.js: -------------------------------------------------------------------------------- 1 | editArea.add_lang("en",{ 2 | charmap_but: "Visual keyboard", 3 | charmap_title: "Visual keyboard", 4 | charmap_choose_block: "select language block", 5 | charmap_insert:"insert this character" 6 | }); 7 | -------------------------------------------------------------------------------- /edit_area/plugins/charmap/langs/eo.js: -------------------------------------------------------------------------------- 1 | editArea.add_lang("eo",{ 2 | charmap_but: "Ekranklavaro", 3 | charmap_title: "Ekranklavaro", 4 | charmap_choose_block: "Elekto de lingvo", 5 | charmap_insert:"enmeti tiun signaron" 6 | }); 7 | -------------------------------------------------------------------------------- /edit_area/plugins/charmap/langs/es.js: -------------------------------------------------------------------------------- 1 | editArea.add_lang("es",{ 2 | charmap_but: "Visual keyboard", 3 | charmap_title: "Visual keyboard", 4 | charmap_choose_block: "select language block", 5 | charmap_insert:"insert this character" 6 | }); 7 | -------------------------------------------------------------------------------- /edit_area/plugins/charmap/langs/fr.js: -------------------------------------------------------------------------------- 1 | editArea.add_lang("fr",{ 2 | charmap_but: "Clavier visuel", 3 | charmap_title: "Clavier visuel", 4 | charmap_choose_block: "choix du language", 5 | charmap_insert:"insérer ce caractère" 6 | }); 7 | -------------------------------------------------------------------------------- /edit_area/plugins/charmap/langs/hr.js: -------------------------------------------------------------------------------- 1 | editArea.add_lang("hr",{ 2 | charmap_but: "Virtualna tipkovnica", 3 | charmap_title: "Virtualna tipkovnica", 4 | charmap_choose_block: "Odaberi blok s jezikom", 5 | charmap_insert:"Ubaci taj znak" 6 | }); 7 | -------------------------------------------------------------------------------- /edit_area/plugins/charmap/langs/it.js: -------------------------------------------------------------------------------- 1 | editArea.add_lang("it",{ 2 | charmap_but: "Tastiera visuale", 3 | charmap_title: "Tastiera visuale", 4 | charmap_choose_block: "seleziona blocco", 5 | charmap_insert:"inserisci questo carattere" 6 | }); 7 | -------------------------------------------------------------------------------- /edit_area/plugins/charmap/langs/ja.js: -------------------------------------------------------------------------------- 1 | editArea.add_lang("ja",{ 2 | charmap_but: "Visual keyboard", 3 | charmap_title: "Visual keyboard", 4 | charmap_choose_block: "select language block", 5 | charmap_insert:"insert this character" 6 | }); 7 | -------------------------------------------------------------------------------- /edit_area/plugins/charmap/langs/mk.js: -------------------------------------------------------------------------------- 1 | editArea.add_lang("mkn",{ 2 | charmap_but: "Visual keyboard", 3 | charmap_title: "Visual keyboard", 4 | charmap_choose_block: "select language block", 5 | charmap_insert:"insert this character" 6 | }); 7 | -------------------------------------------------------------------------------- /edit_area/plugins/charmap/langs/nl.js: -------------------------------------------------------------------------------- 1 | editArea.add_lang("nl",{ 2 | charmap_but: "Visueel toetsenbord", 3 | charmap_title: "Visueel toetsenbord", 4 | charmap_choose_block: "Kies een taal blok", 5 | charmap_insert:"Voeg dit symbool in" 6 | }); 7 | -------------------------------------------------------------------------------- /edit_area/plugins/charmap/langs/pl.js: -------------------------------------------------------------------------------- 1 | editArea.add_lang("pl",{ 2 | charmap_but: "Klawiatura ekranowa", 3 | charmap_title: "Klawiatura ekranowa", 4 | charmap_choose_block: "wybierz grupę znaków", 5 | charmap_insert:"wstaw ten znak" 6 | }); 7 | -------------------------------------------------------------------------------- /edit_area/plugins/charmap/langs/pt.js: -------------------------------------------------------------------------------- 1 | editArea.add_lang("pt",{ 2 | charmap_but: "Visual keyboard", 3 | charmap_title: "Visual keyboard", 4 | charmap_choose_block: "select language block", 5 | charmap_insert:"insert this character" 6 | }); 7 | -------------------------------------------------------------------------------- /edit_area/plugins/charmap/langs/ru.js: -------------------------------------------------------------------------------- 1 | editArea.add_lang("ru",{ 2 | charmap_but: "Визуальная клавиатура", 3 | charmap_title: "Визуальная клавиатура", 4 | charmap_choose_block: "выбрать языковой блок", 5 | charmap_insert:"вставить этот символ" 6 | }); 7 | -------------------------------------------------------------------------------- /edit_area/plugins/charmap/langs/sk.js: -------------------------------------------------------------------------------- 1 | editArea.add_lang("sk",{ 2 | charmap_but: "Vizuálna klávesnica", 3 | charmap_title: "Vizuálna klávesnica", 4 | charmap_choose_block: "vyber jazykový blok", 5 | charmap_insert: "vlož tento znak" 6 | }); 7 | -------------------------------------------------------------------------------- /edit_area/plugins/charmap/langs/zh.js: -------------------------------------------------------------------------------- 1 | editArea.add_lang("zh",{ 2 | charmap_but: "软键盘", 3 | charmap_title: "软键盘", 4 | charmap_choose_block: "选择一个语言块", 5 | charmap_insert:"插入此字符" 6 | }); 7 | -------------------------------------------------------------------------------- /edit_area/plugins/charmap/popup.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {$charmap_title} 6 | 7 | 8 | 10 | 11 | 12 |
    13 |
    14 |

    {$charmap_title}:

    15 | 17 |
    18 | 19 |
    20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /edit_area/plugins/test/css/test.css: -------------------------------------------------------------------------------- 1 | select#test_select{ 2 | background-color: #FF0000; 3 | } 4 | -------------------------------------------------------------------------------- /edit_area/plugins/test/images/test.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loveyu/LyFM/892f83a33a8dc54bcf669f4693c7b8b5b395c061/edit_area/plugins/test/images/test.gif -------------------------------------------------------------------------------- /edit_area/plugins/test/langs/bg.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Bulgarian translation 3 | * Author: Valentin Hristov 4 | * Company: SOFTKIT Bulgarian 5 | * Site: http://www.softkit-bg.com 6 | */ 7 | editArea.add_lang("bg",{ 8 | test_select: "избери таг", 9 | test_but: "тествай копието" 10 | }); 11 | -------------------------------------------------------------------------------- /edit_area/plugins/test/langs/cs.js: -------------------------------------------------------------------------------- 1 | editArea.add_lang("cs",{ 2 | test_select: "select tag", 3 | test_but: "test button" 4 | }); 5 | -------------------------------------------------------------------------------- /edit_area/plugins/test/langs/de.js: -------------------------------------------------------------------------------- 1 | editArea.add_lang("de",{ 2 | test_select: "Tag auswählen", 3 | test_but: "Test Button" 4 | }); 5 | -------------------------------------------------------------------------------- /edit_area/plugins/test/langs/dk.js: -------------------------------------------------------------------------------- 1 | editArea.add_lang("dk",{ 2 | test_select: "select tag", 3 | test_but: "test button" 4 | }); 5 | -------------------------------------------------------------------------------- /edit_area/plugins/test/langs/en.js: -------------------------------------------------------------------------------- 1 | editArea.add_lang("en",{ 2 | test_select: "select tag", 3 | test_but: "test button" 4 | }); 5 | -------------------------------------------------------------------------------- /edit_area/plugins/test/langs/eo.js: -------------------------------------------------------------------------------- 1 | editArea.add_lang("eo",{ 2 | test_select:"elekto de marko", 3 | test_but: "provo-butono" 4 | }); 5 | -------------------------------------------------------------------------------- /edit_area/plugins/test/langs/es.js: -------------------------------------------------------------------------------- 1 | editArea.add_lang("es",{ 2 | test_select: "select tag", 3 | test_but: "test button" 4 | }); 5 | -------------------------------------------------------------------------------- /edit_area/plugins/test/langs/fr.js: -------------------------------------------------------------------------------- 1 | editArea.add_lang("fr",{ 2 | test_select:"choix balise", 3 | test_but: "bouton de test" 4 | }); 5 | -------------------------------------------------------------------------------- /edit_area/plugins/test/langs/hr.js: -------------------------------------------------------------------------------- 1 | editArea.add_lang("hr",{ 2 | test_select: "Odaberi tag", 3 | test_but: "Probna tipka" 4 | }); 5 | -------------------------------------------------------------------------------- /edit_area/plugins/test/langs/it.js: -------------------------------------------------------------------------------- 1 | editArea.add_lang("it",{ 2 | test_select: "seleziona tag", 3 | test_but: "pulsante di test" 4 | }); 5 | -------------------------------------------------------------------------------- /edit_area/plugins/test/langs/ja.js: -------------------------------------------------------------------------------- 1 | editArea.add_lang("ja",{ 2 | test_select: "select tag", 3 | test_but: "test button" 4 | }); 5 | -------------------------------------------------------------------------------- /edit_area/plugins/test/langs/mk.js: -------------------------------------------------------------------------------- 1 | editArea.add_lang("mk",{ 2 | test_select: "select tag", 3 | test_but: "test button" 4 | }); 5 | -------------------------------------------------------------------------------- /edit_area/plugins/test/langs/nl.js: -------------------------------------------------------------------------------- 1 | editArea.add_lang("nl",{ 2 | test_select: "select tag", 3 | test_but: "test button" 4 | }); 5 | -------------------------------------------------------------------------------- /edit_area/plugins/test/langs/pl.js: -------------------------------------------------------------------------------- 1 | editArea.add_lang("pl",{ 2 | test_select: "wybierz tag", 3 | test_but: "test" 4 | }); 5 | -------------------------------------------------------------------------------- /edit_area/plugins/test/langs/pt.js: -------------------------------------------------------------------------------- 1 | editArea.add_lang("pt",{ 2 | test_select: "select tag", 3 | test_but: "test button" 4 | }); 5 | -------------------------------------------------------------------------------- /edit_area/plugins/test/langs/ru.js: -------------------------------------------------------------------------------- 1 | editArea.add_lang("ru",{ 2 | test_select: "выбрать тэг", 3 | test_but: "тестировать кнопку" 4 | }); 5 | -------------------------------------------------------------------------------- /edit_area/plugins/test/langs/sk.js: -------------------------------------------------------------------------------- 1 | editArea.add_lang("sk",{ 2 | test_select: "vyber tag", 3 | test_but: "testovacie tlačidlo" 4 | }); 5 | -------------------------------------------------------------------------------- /edit_area/plugins/test/langs/zh.js: -------------------------------------------------------------------------------- 1 | editArea.add_lang("zh",{ 2 | test_select: "选择标签", 3 | test_but: "测试按钮" 4 | }); 5 | -------------------------------------------------------------------------------- /edit_area/plugins/test/test.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Plugin designed for test prupose. It add a button (that manage an alert) and a select (that allow to insert tags) in the toolbar. 3 | * This plugin also disable the "f" key in the editarea, and load a CSS and a JS file 4 | */ 5 | var EditArea_test= { 6 | /** 7 | * Get called once this file is loaded (editArea still not initialized) 8 | * 9 | * @return nothing 10 | */ 11 | init: function(){ 12 | // alert("test init: "+ this._someInternalFunction(2, 3)); 13 | editArea.load_css(this.baseURL+"css/test.css"); 14 | editArea.load_script(this.baseURL+"test2.js"); 15 | } 16 | /** 17 | * Returns the HTML code for a specific control string or false if this plugin doesn't have that control. 18 | * A control can be a button, select list or any other HTML item to present in the EditArea user interface. 19 | * Language variables such as {$lang_somekey} will also be replaced with contents from 20 | * the language packs. 21 | * 22 | * @param {string} ctrl_name: the name of the control to add 23 | * @return HTML code for a specific control or false. 24 | * @type string or boolean 25 | */ 26 | ,get_control_html: function(ctrl_name){ 27 | switch(ctrl_name){ 28 | case "test_but": 29 | // Control id, button img, command 30 | return parent.editAreaLoader.get_button_html('test_but', 'test.gif', 'test_cmd', false, this.baseURL); 31 | case "test_select": 32 | html= ""; 41 | return html; 42 | } 43 | return false; 44 | } 45 | /** 46 | * Get called once EditArea is fully loaded and initialised 47 | * 48 | * @return nothing 49 | */ 50 | ,onload: function(){ 51 | alert("test load"); 52 | } 53 | 54 | /** 55 | * Is called each time the user touch a keyboard key. 56 | * 57 | * @param (event) e: the keydown event 58 | * @return true - pass to next handler in chain, false - stop chain execution 59 | * @type boolean 60 | */ 61 | ,onkeydown: function(e){ 62 | var str= String.fromCharCode(e.keyCode); 63 | // desactivate the "f" character 64 | if(str.toLowerCase()=="f"){ 65 | return true; 66 | } 67 | return false; 68 | } 69 | 70 | /** 71 | * Executes a specific command, this function handles plugin commands. 72 | * 73 | * @param {string} cmd: the name of the command being executed 74 | * @param {unknown} param: the parameter of the command 75 | * @return true - pass to next handler in chain, false - stop chain execution 76 | * @type boolean 77 | */ 78 | ,execCommand: function(cmd, param){ 79 | // Handle commands 80 | switch(cmd){ 81 | case "test_select_change": 82 | var val= document.getElementById("test_select").value; 83 | if(val!=-1) 84 | parent.editAreaLoader.insertTags(editArea.id, "<"+val+">", ""); 85 | document.getElementById("test_select").options[0].selected=true; 86 | return false; 87 | case "test_cmd": 88 | alert("user clicked on test_cmd"); 89 | return false; 90 | } 91 | // Pass to next handler in chain 92 | return true; 93 | } 94 | 95 | /** 96 | * This is just an internal plugin method, prefix all internal methods with a _ character. 97 | * The prefix is needed so they doesn't collide with future EditArea callback functions. 98 | * 99 | * @param {string} a Some arg1. 100 | * @param {string} b Some arg2. 101 | * @return Some return. 102 | * @type unknown 103 | */ 104 | ,_someInternalFunction : function(a, b) { 105 | return a+b; 106 | } 107 | }; 108 | 109 | // Adds the plugin class to the list of available EditArea plugins 110 | editArea.add_plugin("test", EditArea_test); 111 | -------------------------------------------------------------------------------- /edit_area/plugins/test/test2.js: -------------------------------------------------------------------------------- 1 | alert("test2.js is loaded from test plugin"); 2 | -------------------------------------------------------------------------------- /edit_area/reg_syntax/basic.js: -------------------------------------------------------------------------------- 1 | editAreaLoader.load_syntax["basic"] = { 2 | 'DISPLAY_NAME' : 'Basic' 3 | ,'COMMENT_SINGLE' : {1 : "'", 2 : 'rem'} 4 | ,'COMMENT_MULTI' : { } 5 | ,'QUOTEMARKS' : {1: '"'} 6 | ,'KEYWORD_CASE_SENSITIVE' : false 7 | ,'KEYWORDS' : { 8 | 'statements' : [ 9 | 'if','then','for','wend','while', 10 | 'else','elseif','select','case','end select', 11 | 'until','next','step','to','end if', 'call' 12 | ] 13 | ,'keywords' : [ 14 | 'sub', 'end sub', 'function', 'end function', 'exit', 15 | 'exit function', 'dim', 'redim', 'shared', 'const', 16 | 'is', 'absolute', 'access', 'any', 'append', 'as', 17 | 'base', 'beep', 'binary', 'bload', 'bsave', 'chain', 18 | 'chdir', 'circle', 'clear', 'close', 'cls', 'color', 19 | 'com', 'common', 'data', 'date', 'declare', 'def', 20 | 'defdbl', 'defint', 'deflng', 'defsng', 'defstr', 21 | 'double', 'draw', 'environ', 'erase', 'error', 'field', 22 | 'files', 'fn', 'get', 'gosub', 'goto', 'integer', 'key', 23 | 'kill', 'let', 'line', 'list', 'locate', 'lock', 'long', 24 | 'lprint', 'lset', 'mkdir', 'name', 'off', 'on', 'open', 25 | 'option', 'out', 'output', 'paint', 'palette', 'pcopy', 26 | 'poke', 'preset', 'print', 'pset', 'put', 'random', 27 | 'randomize', 'read', 'reset', 'restore', 'resume', 28 | 'return', 'rmdir', 'rset', 'run', 'screen', 'seg', 29 | 'shell', 'single', 'sleep', 'sound', 'static', 'stop', 30 | 'strig', 'string', 'swap', 'system', 'time', 'timer', 31 | 'troff', 'tron', 'type', 'unlock', 'using', 'view', 32 | 'wait', 'width', 'window', 'write' 33 | ] 34 | ,'functions' : [ 35 | 'abs', 'asc', 'atn', 'cdbl', 'chr', 'cint', 'clng', 36 | 'cos', 'csng', 'csrlin', 'cvd', 'cvdmbf', 'cvi', 'cvl', 37 | 'cvs', 'cvsmbf', 'eof', 'erdev', 'erl', 'err', 'exp', 38 | 'fileattr', 'fix', 'fre', 'freefile', 'hex', 'inkey', 39 | 'inp', 'input', 'instr', 'int', 'ioctl', 'lbound', 40 | 'lcase', 'left', 'len', 'loc', 'lof', 'log', 'lpos', 41 | 'ltrim', 'mid', 'mkd', 'mkdmbf', 'mki', 'mkl', 'mks', 42 | 'mksmbf', 'oct', 'peek', 'pen', 'play', 'pmap', 'point', 43 | 'pos', 'right', 'rnd', 'rtrim', 'seek', 'sgn', 'sin', 44 | 'space', 'spc', 'sqr', 'stick', 'str', 'tab', 'tan', 45 | 'ubound', 'ucase', 'val', 'varptr', 'varseg' 46 | ] 47 | ,'operators' : [ 48 | 'and', 'eqv', 'imp', 'mod', 'not', 'or', 'xor' 49 | ] 50 | } 51 | ,'OPERATORS' :[ 52 | '+', '-', '/', '*', '=', '<', '>', '!', '&' 53 | ] 54 | ,'DELIMITERS' :[ 55 | '(', ')', '[', ']', '{', '}' 56 | ] 57 | ,'STYLES' : { 58 | 'COMMENTS': 'color: #99CC00;' 59 | ,'QUOTESMARKS': 'color: #333399;' 60 | ,'KEYWORDS' : { 61 | 'keywords' : 'color: #3366FF;' 62 | ,'functions' : 'color: #0000FF;' 63 | ,'statements' : 'color: #3366FF;' 64 | ,'operators' : 'color: #FF0000;' 65 | } 66 | ,'OPERATORS' : 'color: #FF0000;' 67 | ,'DELIMITERS' : 'color: #0000FF;' 68 | 69 | } 70 | }; 71 | -------------------------------------------------------------------------------- /edit_area/reg_syntax/brainfuck.js: -------------------------------------------------------------------------------- 1 | editAreaLoader.load_syntax["brainfuck"] = { 2 | 'DISPLAY_NAME' : 'Brainfuck' 3 | ,'COMMENT_SINGLE' : {} 4 | ,'COMMENT_MULTI' : {} 5 | ,'QUOTEMARKS' : {} 6 | ,'KEYWORD_CASE_SENSITIVE' : true 7 | ,'OPERATORS' :[ 8 | '+', '-' 9 | ] 10 | ,'DELIMITERS' :[ 11 | '[', ']' 12 | ] 13 | ,'REGEXPS' : { 14 | 'bfispis' : { 15 | 'search' : '()(\\.)()' 16 | ,'class' : 'bfispis' 17 | ,'modifiers' : 'g' 18 | ,'execute' : 'before' 19 | } 20 | ,'bfupis' : { 21 | 'search' : '()(\\,)()' 22 | ,'class' : 'bfupis' 23 | ,'modifiers' : 'g' 24 | ,'execute' : 'before' 25 | } 26 | ,'bfmemory' : { 27 | 'search' : '()([<>])()' 28 | ,'class' : 'bfmemory' 29 | ,'modifiers' : 'g' 30 | ,'execute' : 'before' 31 | } 32 | } 33 | ,'STYLES' : { 34 | 'COMMENTS': 'color: #AAAAAA;' 35 | ,'QUOTESMARKS': 'color: #6381F8;' 36 | ,'OPERATORS' : 'color: #88AA00;' 37 | ,'DELIMITERS' : 'color: #00C138;' 38 | ,'REGEXPS' : { 39 | 'bfispis' : 'color: #EE0000;' 40 | ,'bfupis' : 'color: #4455ee;' 41 | ,'bfmemory' : 'color: #DD00DD;' 42 | } 43 | } 44 | }; 45 | 46 | -------------------------------------------------------------------------------- /edit_area/reg_syntax/c.js: -------------------------------------------------------------------------------- 1 | editAreaLoader.load_syntax["c"] = { 2 | 'DISPLAY_NAME' : 'C' 3 | ,'COMMENT_SINGLE' : {1 : '//'} 4 | ,'COMMENT_MULTI' : {'/*' : '*/'} 5 | ,'QUOTEMARKS' : {1: "'", 2: '"'} 6 | ,'KEYWORD_CASE_SENSITIVE' : true 7 | ,'KEYWORDS' : { 8 | 'constants' : [ 9 | 'NULL', 'false', 'stdin', 'stdout', 'stderr', 'true' 10 | ] 11 | ,'types' : [ 12 | 'FILE', 'auto', 'char', 'const', 'double', 13 | 'extern', 'float', 'inline', 'int', 'long', 'register', 14 | 'short', 'signed', 'size_t', 'static', 'struct', 15 | 'time_t', 'typedef', 'union', 'unsigned', 'void', 16 | 'volatile' 17 | ] 18 | ,'statements' : [ 19 | 'do', 'else', 'enum', 'for', 'goto', 'if', 'sizeof', 20 | 'switch', 'while' 21 | ] 22 | ,'keywords' : [ 23 | 'break', 'case', 'continue', 'default', 'delete', 24 | 'return' 25 | ] 26 | } 27 | ,'OPERATORS' :[ 28 | '+', '-', '/', '*', '=', '<', '>', '%', '!', '?', ':', '&' 29 | ] 30 | ,'DELIMITERS' :[ 31 | '(', ')', '[', ']', '{', '}' 32 | ] 33 | ,'REGEXPS' : { 34 | 'precompiler' : { 35 | 'search' : '()(#[^\r\n]*)()' 36 | ,'class' : 'precompiler' 37 | ,'modifiers' : 'g' 38 | ,'execute' : 'before' 39 | } 40 | /* ,'precompilerstring' : { 41 | 'search' : '(#[\t ]*include[\t ]*)([^\r\n]*)([^\r\n]*[\r\n])' 42 | ,'class' : 'precompilerstring' 43 | ,'modifiers' : 'g' 44 | ,'execute' : 'before' 45 | }*/ 46 | } 47 | ,'STYLES' : { 48 | 'COMMENTS': 'color: #AAAAAA;' 49 | ,'QUOTESMARKS': 'color: #6381F8;' 50 | ,'KEYWORDS' : { 51 | 'constants' : 'color: #EE0000;' 52 | ,'types' : 'color: #0000EE;' 53 | ,'statements' : 'color: #60CA00;' 54 | ,'keywords' : 'color: #48BDDF;' 55 | } 56 | ,'OPERATORS' : 'color: #FF00FF;' 57 | ,'DELIMITERS' : 'color: #0038E1;' 58 | ,'REGEXPS' : { 59 | 'precompiler' : 'color: #009900;' 60 | ,'precompilerstring' : 'color: #994400;' 61 | } 62 | } 63 | }; 64 | -------------------------------------------------------------------------------- /edit_area/reg_syntax/coldfusion.js: -------------------------------------------------------------------------------- 1 | editAreaLoader.load_syntax["coldfusion"] = { 2 | 'DISPLAY_NAME' : 'Coldfusion' 3 | ,'COMMENT_SINGLE' : {1 : '//', 2 : '#'} 4 | ,'COMMENT_MULTI' : {''} 5 | ,'COMMENT_MULTI2' : {''} 6 | ,'QUOTEMARKS' : {1: "'", 2: '"'} 7 | ,'KEYWORD_CASE_SENSITIVE' : false 8 | ,'KEYWORDS' : { 9 | 'statements' : [ 10 | 'include', 'require', 'include_once', 'require_once', 11 | 'for', 'foreach', 'as', 'if', 'elseif', 'else', 'while', 'do', 'endwhile', 12 | 'endif', 'switch', 'case', 'endswitch', 13 | 'return', 'break', 'continue' 14 | ] 15 | ,'reserved' : [ 16 | 'AND', 'break', 'case', 'CONTAIN', 'CONTAINS', 'continue', 'default', 'do', 17 | 'DOES', 'else', 'EQ', 'EQUAL', 'EQUALTO', 'EQV', 'FALSE', 'for', 'GE', 18 | 'GREATER', 'GT', 'GTE', 'if', 'IMP', 'in', 'IS', 'LE', 'LESS', 'LT', 'LTE', 19 | 'MOD', 'NEQ', 'NOT', 'OR', 'return', 'switch', 'THAN', 'TO', 'TRUE', 'var', 20 | 'while', 'XOR' 21 | ] 22 | ,'functions' : [ 23 | 'Abs', 'ACos', 'ArrayAppend', 'ArrayAvg', 'ArrayClear', 'ArrayDeleteAt', 'ArrayInsertAt', 24 | 'ArrayIsEmpty', 'ArrayLen', 'ArrayMax', 'ArrayMin', 'ArrayNew', 'ArrayPrepend', 'ArrayResize', 25 | 'ArraySet', 'ArraySort', 'ArraySum', 'ArraySwap', 'ArrayToList', 'Asc', 'ASin', 'Atn', 'AuthenticatedContext', 26 | 'AuthenticatedUser', 'BitAnd', 'BitMaskClear', 'BitMaskRead', 'BitMaskSet', 'BitNot', 'BitOr', 27 | 'BitSHLN', 'BitSHRN', 'BitXor', 'Ceiling', 'Chr', 'CJustify', 'Compare', 'CompareNoCase', 'Cos', 28 | 'CreateDate', 'CreateDateTime', 'CreateODBCDate', 'CreateODBCDateTime', 'CreateODBCTime', 29 | 'CreateTime', 'CreateTimeSpan', 'DateAdd', 'DateCompare', 'DateConvert', 'DateDiff', 30 | 'DateFormat', 'DatePart', 'Day', 'DayOfWeek', 'DayOfWeekAsString', 'DayOfYear', 'DaysInMonth', 31 | 'DaysInYear', 'DE', 'DecimalFormat', 'DecrementValue', 'Decrypt', 'DeleteClientVariable', 32 | 'DirectoryExists', 'DollarFormat', 'Duplicate', 'Encrypt', 'Evaluate', 'Exp', 'ExpandPath', 33 | 'FileExists', 'Find', 'FindNoCase', 'FindOneOf', 'FirstDayOfMonth', 'Fix', 'FormatBaseN', 34 | 'GetBaseTagData', 'GetBaseTagList', 'GetBaseTemplatePath', 'GetClientVariablesList', 35 | 'GetCurrentTemplatePath', 'GetDirectoryFromPath', 'GetException', 'GetFileFromPath', 36 | 'GetFunctionList', 'GetHttpTimeString', 'GetHttpRequestData', 'GetLocale', 'GetMetricData', 37 | 'GetProfileString', 'GetTempDirectory', 'GetTempFile', 'GetTemplatePath', 'GetTickCount', 38 | 'GetTimeZoneInfo', 'GetToken', 'Hash', 'Hour', 'HTMLCodeFormat', 'HTMLEditFormat', 'IIf', 39 | 'IncrementValue', 'InputBaseN', 'Insert', 'Int', 'IsArray', 'IsAuthenticated', 'IsAuthorized', 40 | 'IsBoolean', 'IsBinary', 'IsCustomFunction', 'IsDate', 'IsDebugMode', 'IsDefined', 'IsLeapYear', 41 | 'IsNumeric', 'IsNumericDate', 'IsProtected', 'IsQuery', 'IsSimpleValue', 'IsStruct', 'IsWDDX', 42 | 'JavaCast', 'JSStringFormat', 'LCase', 'Left', 'Len', 'ListAppend', 'ListChangeDelims', 43 | 'ListContains', 'ListContainsNoCase', 'ListDeleteAt', 'ListFind', 'ListFindNoCase', 'ListFirst', 44 | 'ListGetAt', 'ListInsertAt', 'ListLast', 'ListLen', 'ListPrepend', 'ListQualify', 'ListRest', 45 | 'ListSetAt', 'ListSort', 'ListToArray', 'ListValueCount', 'ListValueCountNoCase', 'LJustify', 46 | 'Log', 'Log10', 'LSCurrencyFormat', 'LSDateFormat', 'LSEuroCurrencyFormat', 'LSIsCurrency', 47 | 'LSIsDate', 'LSIsNumeric', 'LSNumberFormat', 'LSParseCurrency', 'LSParseDateTime', 'LSParseNumber', 48 | 'LSTimeFormat', 'LTrim', 'Max', 'Mid', 'Min', 'Minute', 'Month', 'MonthAsString', 'Now', 'NumberFormat', 49 | 'ParagraphFormat', 'ParameterExists', 'ParseDateTime', 'Pi', 'PreserveSingleQuotes', 'Quarter', 50 | 'QueryAddRow', 'QueryNew', 'QuerySetCell', 'QuotedValueList', 'Rand', 'Randomize', 'RandRange', 51 | 'REFind', 'REFindNoCase', 'RemoveChars', 'RepeatString', 'Replace', 'ReplaceList', 'ReplaceNoCase', 52 | 'REReplace', 'REReplaceNoCase', 'Reverse', 'Right', 'RJustify', 'Round', 'RTrim', 'Second', 'SetLocale', 53 | 'SetProfileString', 'SetVariable', 'Sgn', 'Sin', 'SpanExcluding', 'SpanIncluding', 'Sqr', 'StripCR', 54 | 'StructAppend', 'StructClear', 'StructCopy', 'StructCount', 'StructDelete', 'StructFind', 'StructFindKey', 55 | 'StructFindValue', 'StructGet', 'StructInsert', 'StructIsEmpty', 'StructKeyArray', 'StructKeyExists', 56 | 'StructKeyList', 'StructNew', 'StructSort', 'StructUpdate', 'Tan', 'TimeFormat', 'ToBase64', 'ToBinary', 57 | 'ToString', 'Trim', 'UCase', 'URLDecode', 'URLEncodedFormat', 'Val', 'ValueList', 'Week', 'WriteOutput', 58 | 'XMLFormat', 'Year', 'YesNoFormat' 59 | ] 60 | } 61 | ,'OPERATORS' :[ 62 | '+', '-', '/', '*', '%', '!', '&&', '||' 63 | ] 64 | ,'DELIMITERS' :[ 65 | '(', ')', '[', ']', '{', '}' 66 | ] 67 | ,'REGEXPS' : { 68 | 'doctype' : { 69 | 'search' : '()(]*>)()' 70 | ,'class' : 'doctype' 71 | ,'modifiers' : '' 72 | ,'execute' : 'before' // before or after 73 | } 74 | ,'cftags' : { 75 | 'search' : '(<)(/cf[a-z][^ \r\n\t>]*)([^>]*>)' 76 | ,'class' : 'cftags' 77 | ,'modifiers' : 'gi' 78 | ,'execute' : 'before' // before or after 79 | } 80 | ,'cftags2' : { 81 | 'search' : '(<)(cf[a-z][^ \r\n\t>]*)([^>]*>)' 82 | ,'class' : 'cftags2' 83 | ,'modifiers' : 'gi' 84 | ,'execute' : 'before' // before or after 85 | } 86 | ,'tags' : { 87 | 'search' : '(<)(/?[a-z][^ \r\n\t>]*)([^>]*>)' 88 | ,'class' : 'tags' 89 | ,'modifiers' : 'gi' 90 | ,'execute' : 'before' // before or after 91 | } 92 | ,'attributes' : { 93 | 'search' : '( |\n|\r|\t)([^ \r\n\t=]+)(=)' 94 | ,'class' : 'attributes' 95 | ,'modifiers' : 'g' 96 | ,'execute' : 'before' // before or after 97 | } 98 | } 99 | ,'STYLES' : { 100 | 'COMMENTS': 'color: #AAAAAA;' 101 | ,'QUOTESMARKS': 'color: #6381F8;' 102 | ,'KEYWORDS' : { 103 | 'reserved' : 'color: #48BDDF;' 104 | ,'functions' : 'color: #0000FF;' 105 | ,'statements' : 'color: #60CA00;' 106 | } 107 | ,'OPERATORS' : 'color: #E775F0;' 108 | ,'DELIMITERS' : '' 109 | ,'REGEXPS' : { 110 | 'attributes': 'color: #990033;' 111 | ,'cftags': 'color: #990033;' 112 | ,'cftags2': 'color: #990033;' 113 | ,'tags': 'color: #000099;' 114 | ,'doctype': 'color: #8DCFB5;' 115 | ,'test': 'color: #00FF00;' 116 | } 117 | } 118 | }; 119 | 120 | 121 | -------------------------------------------------------------------------------- /edit_area/reg_syntax/cpp.js: -------------------------------------------------------------------------------- 1 | editAreaLoader.load_syntax["cpp"] = { 2 | 'DISPLAY_NAME' : 'CPP' 3 | ,'COMMENT_SINGLE' : {1 : '//'} 4 | ,'COMMENT_MULTI' : {'/*' : '*/'} 5 | ,'QUOTEMARKS' : {1: "'", 2: '"'} 6 | ,'KEYWORD_CASE_SENSITIVE' : true 7 | ,'KEYWORDS' : { 8 | 'constants' : [ 9 | 'NULL', 'false', 'std', 'stdin', 'stdout', 'stderr', 10 | 'true' 11 | ] 12 | ,'types' : [ 13 | 'FILE', 'auto', 'char', 'class', 'const', 'double', 14 | 'extern', 'float', 'friend', 'inline', 'int', 15 | 'iterator', 'long', 'map', 'operator', 'queue', 16 | 'register', 'short', 'signed', 'size_t', 'stack', 17 | 'static', 'string', 'struct', 'time_t', 'typedef', 18 | 'union', 'unsigned', 'vector', 'void', 'volatile' 19 | ] 20 | ,'statements' : [ 21 | 'catch', 'do', 'else', 'enum', 'for', 'goto', 'if', 22 | 'sizeof', 'switch', 'this', 'throw', 'try', 'while' 23 | ] 24 | ,'keywords' : [ 25 | 'break', 'case', 'continue', 'default', 'delete', 26 | 'namespace', 'new', 'private', 'protected', 'public', 27 | 'return', 'using' 28 | ] 29 | } 30 | ,'OPERATORS' :[ 31 | '+', '-', '/', '*', '=', '<', '>', '%', '!', '?', ':', '&' 32 | ] 33 | ,'DELIMITERS' :[ 34 | '(', ')', '[', ']', '{', '}' 35 | ] 36 | ,'REGEXPS' : { 37 | 'precompiler' : { 38 | 'search' : '()(#[^\r\n]*)()' 39 | ,'class' : 'precompiler' 40 | ,'modifiers' : 'g' 41 | ,'execute' : 'before' 42 | } 43 | /* ,'precompilerstring' : { 44 | 'search' : '(#[\t ]*include[\t ]*)([^\r\n]*)([^\r\n]*[\r\n])' 45 | ,'class' : 'precompilerstring' 46 | ,'modifiers' : 'g' 47 | ,'execute' : 'before' 48 | }*/ 49 | } 50 | ,'STYLES' : { 51 | 'COMMENTS': 'color: #AAAAAA;' 52 | ,'QUOTESMARKS': 'color: #6381F8;' 53 | ,'KEYWORDS' : { 54 | 'constants' : 'color: #EE0000;' 55 | ,'types' : 'color: #0000EE;' 56 | ,'statements' : 'color: #60CA00;' 57 | ,'keywords' : 'color: #48BDDF;' 58 | } 59 | ,'OPERATORS' : 'color: #FF00FF;' 60 | ,'DELIMITERS' : 'color: #0038E1;' 61 | ,'REGEXPS' : { 62 | 'precompiler' : 'color: #009900;' 63 | ,'precompilerstring' : 'color: #994400;' 64 | } 65 | } 66 | }; 67 | -------------------------------------------------------------------------------- /edit_area/reg_syntax/css.js: -------------------------------------------------------------------------------- 1 | editAreaLoader.load_syntax["css"] = { 2 | 'DISPLAY_NAME' : 'CSS' 3 | ,'COMMENT_SINGLE' : {1 : '@'} 4 | ,'COMMENT_MULTI' : {'/*' : '*/'} 5 | ,'QUOTEMARKS' : ['"', "'"] 6 | ,'KEYWORD_CASE_SENSITIVE' : false 7 | ,'KEYWORDS' : { 8 | 'attributes' : [ 9 | 'aqua', 'azimuth', 'background-attachment', 'background-color', 10 | 'background-image', 'background-position', 'background-repeat', 11 | 'background', 'border-bottom-color', 'border-bottom-style', 12 | 'border-bottom-width', 'border-left-color', 'border-left-style', 13 | 'border-left-width', 'border-right', 'border-right-color', 14 | 'border-right-style', 'border-right-width', 'border-top-color', 15 | 'border-top-style', 'border-top-width','border-bottom', 'border-collapse', 16 | 'border-left', 'border-width', 'border-color', 'border-spacing', 17 | 'border-style', 'border-top', 'border', 'caption-side', 18 | 'clear', 'clip', 'color', 'content', 'counter-increment', 'counter-reset', 19 | 'cue-after', 'cue-before', 'cue', 'cursor', 'direction', 'display', 20 | 'elevation', 'empty-cells', 'float', 'font-family', 'font-size', 21 | 'font-size-adjust', 'font-stretch', 'font-style', 'font-variant', 22 | 'font-weight', 'font', 'height', 'letter-spacing', 'line-height', 23 | 'list-style', 'list-style-image', 'list-style-position', 'list-style-type', 24 | 'margin-bottom', 'margin-left', 'margin-right', 'margin-top', 'margin', 25 | 'marker-offset', 'marks', 'max-height', 'max-width', 'min-height', 26 | 'min-width', 'opacity', 'orphans', 'outline', 'outline-color', 'outline-style', 27 | 'outline-width', 'overflow', 'padding-bottom', 'padding-left', 28 | 'padding-right', 'padding-top', 'padding', 'page', 'page-break-after', 29 | 'page-break-before', 'page-break-inside', 'pause-after', 'pause-before', 30 | 'pause', 'pitch', 'pitch-range', 'play-during', 'position', 'quotes', 31 | 'richness', 'right', 'size', 'speak-header', 'speak-numeral', 'speak-punctuation', 32 | 'speak', 'speech-rate', 'stress', 'table-layout', 'text-align', 'text-decoration', 33 | 'text-indent', 'text-shadow', 'text-transform', 'top', 'unicode-bidi', 34 | 'vertical-align', 'visibility', 'voice-family', 'volume', 'white-space', 'widows', 35 | 'width', 'word-spacing', 'z-index', 'bottom', 'left' 36 | ] 37 | ,'values' : [ 38 | 'above', 'absolute', 'always', 'armenian', 'aural', 'auto', 'avoid', 39 | 'baseline', 'behind', 'below', 'bidi-override', 'black', 'blue', 'blink', 'block', 'bold', 'bolder', 'both', 40 | 'capitalize', 'center-left', 'center-right', 'center', 'circle', 'cjk-ideographic', 41 | 'close-quote', 'collapse', 'condensed', 'continuous', 'crop', 'crosshair', 'cross', 'cursive', 42 | 'dashed', 'decimal-leading-zero', 'decimal', 'default', 'digits', 'disc', 'dotted', 'double', 43 | 'e-resize', 'embed', 'extra-condensed', 'extra-expanded', 'expanded', 44 | 'fantasy', 'far-left', 'far-right', 'faster', 'fast', 'fixed', 'fuchsia', 45 | 'georgian', 'gray', 'green', 'groove', 'hebrew', 'help', 'hidden', 'hide', 'higher', 46 | 'high', 'hiragana-iroha', 'hiragana', 'icon', 'inherit', 'inline-table', 'inline', 47 | 'inset', 'inside', 'invert', 'italic', 'justify', 'katakana-iroha', 'katakana', 48 | 'landscape', 'larger', 'large', 'left-side', 'leftwards', 'level', 'lighter', 'lime', 'line-through', 'list-item', 'loud', 'lower-alpha', 'lower-greek', 'lower-roman', 'lowercase', 'ltr', 'lower', 'low', 49 | 'maroon', 'medium', 'message-box', 'middle', 'mix', 'monospace', 50 | 'n-resize', 'narrower', 'navy', 'ne-resize', 'no-close-quote', 'no-open-quote', 'no-repeat', 'none', 'normal', 'nowrap', 'nw-resize', 51 | 'oblique', 'olive', 'once', 'open-quote', 'outset', 'outside', 'overline', 52 | 'pointer', 'portrait', 'purple', 'px', 53 | 'red', 'relative', 'repeat-x', 'repeat-y', 'repeat', 'rgb', 'ridge', 'right-side', 'rightwards', 54 | 's-resize', 'sans-serif', 'scroll', 'se-resize', 'semi-condensed', 'semi-expanded', 'separate', 'serif', 'show', 'silent', 'silver', 'slow', 'slower', 'small-caps', 'small-caption', 'smaller', 'soft', 'solid', 'spell-out', 'square', 55 | 'static', 'status-bar', 'super', 'sw-resize', 56 | 'table-caption', 'table-cell', 'table-column', 'table-column-group', 'table-footer-group', 'table-header-group', 'table-row', 'table-row-group', 'teal', 'text', 'text-bottom', 'text-top', 'thick', 'thin', 'transparent', 57 | 'ultra-condensed', 'ultra-expanded', 'underline', 'upper-alpha', 'upper-latin', 'upper-roman', 'uppercase', 'url', 58 | 'visible', 59 | 'w-resize', 'wait', 'white', 'wider', 60 | 'x-fast', 'x-high', 'x-large', 'x-loud', 'x-low', 'x-small', 'x-soft', 'xx-large', 'xx-small', 61 | 'yellow', 'yes' 62 | ] 63 | ,'specials' : [ 64 | 'important' 65 | ] 66 | } 67 | ,'OPERATORS' :[ 68 | ':', ';', '!', '.', '#' 69 | ] 70 | ,'DELIMITERS' :[ 71 | '{', '}' 72 | ] 73 | ,'STYLES' : { 74 | 'COMMENTS': 'color: #AAAAAA;' 75 | ,'QUOTESMARKS': 'color: #6381F8;' 76 | ,'KEYWORDS' : { 77 | 'attributes' : 'color: #48BDDF;' 78 | ,'values' : 'color: #2B60FF;' 79 | ,'specials' : 'color: #FF0000;' 80 | } 81 | ,'OPERATORS' : 'color: #FF00FF;' 82 | ,'DELIMITERS' : 'color: #60CA00;' 83 | 84 | } 85 | }; 86 | -------------------------------------------------------------------------------- /edit_area/reg_syntax/html.js: -------------------------------------------------------------------------------- 1 | /* 2 | * last update: 2006-08-24 3 | */ 4 | 5 | editAreaLoader.load_syntax["html"] = { 6 | 'DISPLAY_NAME' : 'HTML' 7 | ,'COMMENT_SINGLE' : {} 8 | ,'COMMENT_MULTI' : {''} 9 | ,'QUOTEMARKS' : {1: "'", 2: '"'} 10 | ,'KEYWORD_CASE_SENSITIVE' : false 11 | ,'KEYWORDS' : { 12 | } 13 | ,'OPERATORS' :[ 14 | ] 15 | ,'DELIMITERS' :[ 16 | ] 17 | ,'REGEXPS' : { 18 | 'doctype' : { 19 | 'search' : '()(]*>)()' 20 | ,'class' : 'doctype' 21 | ,'modifiers' : '' 22 | ,'execute' : 'before' // before or after 23 | } 24 | ,'tags' : { 25 | 'search' : '(<)(/?[a-z][^ \r\n\t>]*)([^>]*>)' 26 | ,'class' : 'tags' 27 | ,'modifiers' : 'gi' 28 | ,'execute' : 'before' // before or after 29 | } 30 | ,'attributes' : { 31 | 'search' : '( |\n|\r|\t)([^ \r\n\t=]+)(=)' 32 | ,'class' : 'attributes' 33 | ,'modifiers' : 'g' 34 | ,'execute' : 'before' // before or after 35 | } 36 | } 37 | ,'STYLES' : { 38 | 'COMMENTS': 'color: #AAAAAA;' 39 | ,'QUOTESMARKS': 'color: #6381F8;' 40 | ,'KEYWORDS' : { 41 | } 42 | ,'OPERATORS' : 'color: #E775F0;' 43 | ,'DELIMITERS' : '' 44 | ,'REGEXPS' : { 45 | 'attributes': 'color: #B1AC41;' 46 | ,'tags': 'color: #E62253;' 47 | ,'doctype': 'color: #8DCFB5;' 48 | ,'test': 'color: #00FF00;' 49 | } 50 | } 51 | }; 52 | -------------------------------------------------------------------------------- /edit_area/reg_syntax/java.js: -------------------------------------------------------------------------------- 1 | editAreaLoader.load_syntax["java"] = { 2 | 'DISPLAY_NAME' : 'Java' 3 | ,'COMMENT_SINGLE': { 1: '//', 2: '@' } 4 | , 'COMMENT_MULTI': { '/*': '*/' } 5 | , 'QUOTEMARKS': { 1: "'", 2: '"' } 6 | , 'KEYWORD_CASE_SENSITIVE': true 7 | , 'KEYWORDS': { 8 | 'constants': [ 9 | 'null', 'false', 'true' 10 | ] 11 | , 'types': [ 12 | 'String', 'int', 'short', 'long', 'char', 'double', 'byte', 13 | 'float', 'static', 'void', 'private', 'boolean', 'protected', 14 | 'public', 'const', 'class', 'final', 'abstract', 'volatile', 15 | 'enum', 'transient', 'interface' 16 | ] 17 | , 'statements': [ 18 | 'this', 'extends', 'if', 'do', 'while', 'try', 'catch', 'finally', 19 | 'throw', 'throws', 'else', 'for', 'switch', 'continue', 'implements', 20 | 'break', 'case', 'default', 'goto' 21 | ] 22 | , 'keywords': [ 23 | 'new', 'return', 'import', 'native', 'super', 'package', 'assert', 'synchronized', 24 | 'instanceof', 'strictfp' 25 | ] 26 | } 27 | , 'OPERATORS': [ 28 | '+', '-', '/', '*', '=', '<', '>', '%', '!', '?', ':', '&' 29 | ] 30 | , 'DELIMITERS': [ 31 | '(', ')', '[', ']', '{', '}' 32 | ] 33 | , 'REGEXPS': { 34 | 'precompiler': { 35 | 'search': '()(#[^\r\n]*)()' 36 | , 'class': 'precompiler' 37 | , 'modifiers': 'g' 38 | , 'execute': 'before' 39 | } 40 | } 41 | , 'STYLES': { 42 | 'COMMENTS': 'color: #AAAAAA;' 43 | , 'QUOTESMARKS': 'color: #6381F8;' 44 | , 'KEYWORDS': { 45 | 'constants': 'color: #EE0000;' 46 | , 'types': 'color: #0000EE;' 47 | , 'statements': 'color: #60CA00;' 48 | , 'keywords': 'color: #48BDDF;' 49 | } 50 | , 'OPERATORS': 'color: #FF00FF;' 51 | , 'DELIMITERS': 'color: #0038E1;' 52 | , 'REGEXPS': { 53 | 'precompiler': 'color: #009900;' 54 | , 'precompilerstring': 'color: #994400;' 55 | } 56 | } 57 | }; 58 | -------------------------------------------------------------------------------- /edit_area/reg_syntax/js.js: -------------------------------------------------------------------------------- 1 | editAreaLoader.load_syntax["js"] = { 2 | 'DISPLAY_NAME' : 'Javascript' 3 | ,'COMMENT_SINGLE' : {1 : '//'} 4 | ,'COMMENT_MULTI' : {'/*' : '*/'} 5 | ,'QUOTEMARKS' : {1: "'", 2: '"'} 6 | ,'KEYWORD_CASE_SENSITIVE' : false 7 | ,'KEYWORDS' : { 8 | 'statements' : [ 9 | 'as', 'break', 'case', 'catch', 'continue', 'decodeURI', 'delete', 'do', 10 | 'else', 'encodeURI', 'eval', 'finally', 'for', 'if', 'in', 'is', 'item', 11 | 'instanceof', 'return', 'switch', 'this', 'throw', 'try', 'typeof', 'void', 12 | 'while', 'write', 'with' 13 | ] 14 | ,'keywords' : [ 15 | 'class', 'const', 'default', 'debugger', 'export', 'extends', 'false', 16 | 'function', 'import', 'namespace', 'new', 'null', 'package', 'private', 17 | 'protected', 'public', 'super', 'true', 'use', 'var', 'window', 'document', 18 | // the list below must be sorted and checked (if it is a keywords or a function and if it is not present twice 19 | 'Link ', 'outerHeight ', 'Anchor', 'FileUpload', 20 | 'location', 'outerWidth', 'Select', 'Area', 'find', 'Location', 'Packages', 'self', 21 | 'arguments', 'locationbar', 'pageXoffset', 'Form', 22 | 'Math', 'pageYoffset', 'setTimeout', 'assign', 'Frame', 'menubar', 'parent', 'status', 23 | 'blur', 'frames', 'MimeType', 'parseFloat', 'statusbar', 'Boolean', 'Function', 'moveBy', 24 | 'parseInt', 'stop', 'Button', 'getClass', 'moveTo', 'Password', 'String', 'callee', 'Hidden', 25 | 'name', 'personalbar', 'Submit', 'caller', 'history', 'NaN', 'Plugin', 'sun', 'captureEvents', 26 | 'History', 'navigate', 'print', 'taint', 'Checkbox', 'home', 'navigator', 'prompt', 'Text', 27 | 'Image', 'Navigator', 'prototype', 'Textarea', 'clearTimeout', 'Infinity', 28 | 'netscape', 'Radio', 'toolbar', 'close', 'innerHeight', 'Number', 'ref', 'top', 'closed', 29 | 'innerWidth', 'Object', 'RegExp', 'toString', 'confirm', 'isFinite', 'onBlur', 'releaseEvents', 30 | 'unescape', 'constructor', 'isNan', 'onError', 'Reset', 'untaint', 'Date', 'java', 'onFocus', 31 | 'resizeBy', 'unwatch', 'defaultStatus', 'JavaArray', 'onLoad', 'resizeTo', 'valueOf', 'document', 32 | 'JavaClass', 'onUnload', 'routeEvent', 'watch', 'Document', 'JavaObject', 'open', 'scroll', 'window', 33 | 'Element', 'JavaPackage', 'opener', 'scrollbars', 'Window', 'escape', 'length', 'Option', 'scrollBy' 34 | ] 35 | ,'functions' : [ 36 | // common functions for Window object 37 | 'alert', 'Array', 'back', 'blur', 'clearInterval', 'close', 'confirm', 'eval ', 'focus', 'forward', 'home', 38 | 'name', 'navigate', 'onblur', 'onerror', 'onfocus', 'onload', 'onmove', 39 | 'onresize', 'onunload', 'open', 'print', 'prompt', 'scroll', 'scrollTo', 'setInterval', 'status', 40 | 'stop' 41 | ] 42 | } 43 | ,'OPERATORS' :[ 44 | '+', '-', '/', '*', '=', '<', '>', '%', '!' 45 | ] 46 | ,'DELIMITERS' :[ 47 | '(', ')', '[', ']', '{', '}' 48 | ] 49 | ,'STYLES' : { 50 | 'COMMENTS': 'color: #AAAAAA;' 51 | ,'QUOTESMARKS': 'color: #6381F8;' 52 | ,'KEYWORDS' : { 53 | 'statements' : 'color: #60CA00;' 54 | ,'keywords' : 'color: #48BDDF;' 55 | ,'functions' : 'color: #2B60FF;' 56 | } 57 | ,'OPERATORS' : 'color: #FF00FF;' 58 | ,'DELIMITERS' : 'color: #0038E1;' 59 | 60 | } 61 | ,'AUTO_COMPLETION' : { 62 | "default": { // the name of this definition group. It's posisble to have different rules inside the same definition file 63 | "REGEXP": { "before_word": "[^a-zA-Z0-9_]|^" // \\s|\\.| 64 | ,"possible_words_letters": "[a-zA-Z0-9_]+" 65 | ,"letter_after_word_must_match": "[^a-zA-Z0-9_]|$" 66 | ,"prefix_separator": "\\." 67 | } 68 | ,"CASE_SENSITIVE": true 69 | ,"MAX_TEXT_LENGTH": 100 // the maximum length of the text being analyzed before the cursor position 70 | ,"KEYWORDS": { 71 | '': [ // the prefix of thoses items 72 | /** 73 | * 0 : the keyword the user is typing 74 | * 1 : (optionnal) the string inserted in code ("{@}" being the new position of the cursor, "§" beeing the equivalent to the value the typed string indicated if the previous ) 75 | * If empty the keyword will be displayed 76 | * 2 : (optionnal) the text that appear in the suggestion box (if empty, the string to insert will be displayed) 77 | */ 78 | ['Array', '§()', ''] 79 | ,['alert', '§({@})', 'alert(String message)'] 80 | ,['document'] 81 | ,['window'] 82 | ] 83 | ,'window' : [ 84 | ['location'] 85 | ,['document'] 86 | ,['scrollTo', 'scrollTo({@})', 'scrollTo(Int x,Int y)'] 87 | ] 88 | ,'location' : [ 89 | ['href'] 90 | ] 91 | } 92 | } 93 | } 94 | }; 95 | -------------------------------------------------------------------------------- /edit_area/reg_syntax/pas.js: -------------------------------------------------------------------------------- 1 | editAreaLoader.load_syntax["pas"] = { 2 | 'DISPLAY_NAME' : 'Pascal' 3 | ,'COMMENT_SINGLE' : {} 4 | ,'COMMENT_MULTI' : {'{' : '}', '(*':'*)'} 5 | ,'QUOTEMARKS' : {1: '"', 2: "'"} 6 | ,'KEYWORD_CASE_SENSITIVE' : false 7 | ,'KEYWORDS' : { 8 | 'constants' : [ 9 | 'Blink', 'Black', 'Blue', 'Green', 'Cyan', 'Red', 10 | 'Magenta', 'Brown', 'LightGray', 'DarkGray', 11 | 'LightBlue', 'LightGreen', 'LightCyan', 'LightRed', 12 | 'LightMagenta', 'Yellow', 'White', 'MaxSIntValue', 13 | 'MaxUIntValue', 'maxint', 'maxLongint', 'maxSmallint', 14 | 'erroraddr', 'errorcode', 'LineEnding' 15 | ] 16 | ,'keywords' : [ 17 | 'in', 'or', 'div', 'mod', 'and', 'shl', 'shr', 'xor', 18 | 'pow', 'is', 'not','Absolute', 'And_then', 'Array', 19 | 'Begin', 'Bindable', 'Case', 'Const', 'Do', 'Downto', 20 | 'Else', 'End', 'Export', 'File', 'For', 'Function', 21 | 'Goto', 'If', 'Import', 'Implementation', 'Inherited', 22 | 'Inline', 'Interface', 'Label', 'Module', 'Nil', 23 | 'Object', 'Of', 'Only', 'Operator', 'Or_else', 24 | 'Otherwise', 'Packed', 'Procedure', 'Program', 25 | 'Protected', 'Qualified', 'Record', 'Repeat', 26 | 'Restricted', 'Set', 'Then', 'To', 'Type', 'Unit', 27 | 'Until', 'Uses', 'Value', 'Var', 'Virtual', 'While', 28 | 'With' 29 | ] 30 | ,'functions' : [ 31 | 'Abs', 'Addr', 'Append', 'Arctan', 'Assert', 'Assign', 32 | 'Assigned', 'BinStr', 'Blockread', 'Blockwrite', 33 | 'Break', 'Chdir', 'Chr', 'Close', 'CompareByte', 34 | 'CompareChar', 'CompareDWord', 'CompareWord', 'Concat', 35 | 'Continue', 'Copy', 'Cos', 'CSeg', 'Dec', 'Delete', 36 | 'Dispose', 'DSeg', 'Eof', 'Eoln', 'Erase', 'Exclude', 37 | 'Exit', 'Exp', 'Filepos', 'Filesize', 'FillByte', 38 | 'Fillchar', 'FillDWord', 'Fillword', 'Flush', 'Frac', 39 | 'Freemem', 'Getdir', 'Getmem', 'GetMemoryManager', 40 | 'Halt', 'HexStr', 'Hi', 'High', 'Inc', 'Include', 41 | 'IndexByte', 'IndexChar', 'IndexDWord', 'IndexWord', 42 | 'Insert', 'IsMemoryManagerSet', 'Int', 'IOresult', 43 | 'Length', 'Ln', 'Lo', 'LongJmp', 'Low', 'Lowercase', 44 | 'Mark', 'Maxavail', 'Memavail', 'Mkdir', 'Move', 45 | 'MoveChar0', 'New', 'Odd', 'OctStr', 'Ofs', 'Ord', 46 | 'Paramcount', 'Paramstr', 'Pi', 'Pos', 'Power', 'Pred', 47 | 'Ptr', 'Random', 'Randomize', 'Read', 'Readln', 48 | 'Real2Double', 'Release', 'Rename', 'Reset', 'Rewrite', 49 | 'Rmdir', 'Round', 'Runerror', 'Seek', 'SeekEof', 50 | 'SeekEoln', 'Seg', 'SetMemoryManager', 'SetJmp', 51 | 'SetLength', 'SetString', 'SetTextBuf', 'Sin', 'SizeOf', 52 | 'Sptr', 'Sqr', 'Sqrt', 'SSeg', 'Str', 'StringOfChar', 53 | 'Succ', 'Swap', 'Trunc', 'Truncate', 'Upcase', 'Val', 54 | 'Write', 'WriteLn' 55 | ] 56 | ,'types' : [ 57 | 'Integer', 'Shortint', 'SmallInt', 'Longint', 58 | 'Longword', 'Int64', 'Byte', 'Word', 'Cardinal', 59 | 'QWord', 'Boolean', 'ByteBool', 'LongBool', 'Char', 60 | 'Real', 'Single', 'Double', 'Extended', 'Comp', 61 | 'String', 'ShortString', 'AnsiString', 'PChar' 62 | ] 63 | } 64 | ,'OPERATORS' :[ 65 | '@', '*', '+', '-', '/', '^', ':=', '<', '=', '>' 66 | ] 67 | ,'DELIMITERS' :[ 68 | '(', ')', '[', ']' 69 | ] 70 | ,'STYLES' : { 71 | 'COMMENTS': 'color: #AAAAAA;' 72 | ,'QUOTESMARKS': 'color: #6381F8;' 73 | ,'KEYWORDS' : { 74 | 'specials' : 'color: #EE0000;' 75 | ,'constants' : 'color: #654321;' 76 | ,'keywords' : 'color: #48BDDF;' 77 | ,'functions' : 'color: #449922;' 78 | ,'types' : 'color: #2B60FF;' 79 | } 80 | ,'OPERATORS' : 'color: #FF00FF;' 81 | ,'DELIMITERS' : 'color: #60CA00;' 82 | } 83 | }; 84 | -------------------------------------------------------------------------------- /edit_area/reg_syntax/perl.js: -------------------------------------------------------------------------------- 1 | /*************************************************************************** 2 | * (c) 2008 - file created by Christoph Pinkel, MTC Infomedia OHG. 3 | * 4 | * You may choose any license of the current release or any future release 5 | * of editarea to use, modify and/or redistribute this file. 6 | * 7 | * This language specification file supports for syntax checking on 8 | * a large subset of Perl 5.x. 9 | * The basic common syntax of Perl is fully supported, but as for 10 | * the highlighting of built-in operations, it's mainly designed 11 | * to support for hightlighting Perl code in a Safe environment (compartment) 12 | * as used by CoMaNet for evaluation of administrative scripts. This Safe 13 | * compartment basically allows for all of Opcode's :default operations, 14 | * but little others. See http://perldoc.perl.org/Opcode.html to learn 15 | * more. 16 | ***************************************************************************/ 17 | 18 | editAreaLoader.load_syntax["perl"] = { 19 | 'DISPLAY_NAME' : 'Perl', 20 | 'COMMENT_SINGLE' : {1 : '#'}, 21 | 'QUOTEMARKS' : {1: "'", 2: '"'}, 22 | 'KEYWORD_CASE_SENSITIVE' : true, 23 | 'KEYWORDS' : 24 | { 25 | 'core' : 26 | [ "if", "else", "elsif", "while", "for", "each", "foreach", 27 | "next", "last", "goto", "exists", "delete", "undef", 28 | "my", "our", "local", "use", "require", "package", "keys", "values", 29 | "sub", "bless", "ref", "return" ], 30 | 'functions' : 31 | [ 32 | //from :base_core 33 | "int", "hex", "oct", "abs", "substr", "vec", "study", "pos", 34 | "length", "index", "rindex", "ord", "chr", "ucfirst", "lcfirst", 35 | "uc", "lc", "quotemeta", "chop", "chomp", "split", "list", "splice", 36 | "push", "pop", "shift", "unshift", "reverse", "and", "or", "dor", 37 | "xor", "warn", "die", "prototype", 38 | //from :base_mem 39 | "concat", "repeat", "join", "range", 40 | //none from :base_loop, as we'll see them as basic statements... 41 | //from :base_orig 42 | "sprintf", "crypt", "tie", "untie", "select", "localtime", "gmtime", 43 | //others 44 | "print", "open", "close" 45 | ] 46 | }, 47 | 'OPERATORS' : 48 | [ '+', '-', '/', '*', '=', '<', '>', '!', '||', '.', '&&', 49 | ' eq ', ' ne ', '=~' ], 50 | 'DELIMITERS' : 51 | [ '(', ')', '[', ']', '{', '}' ], 52 | 'REGEXPS' : 53 | { 54 | 'packagedecl' : { 'search': '(package )([^ \r\n\t#;]*)()', 55 | 'class' : 'scopingnames', 56 | 'modifiers' : 'g', 'execute' : 'before' }, 57 | 'subdecl' : { 'search': '(sub )([^ \r\n\t#]*)()', 58 | 'class' : 'scopingnames', 59 | 'modifiers' : 'g', 'execute' : 'before' }, 60 | 'scalars' : { 'search': '()(\\\$[a-zA-Z0-9_:]*)()', 61 | 'class' : 'vars', 62 | 'modifiers' : 'g', 'execute' : 'after' }, 63 | 'arrays' : { 'search': '()(@[a-zA-Z0-9_:]*)()', 64 | 'class' : 'vars', 65 | 'modifiers' : 'g', 'execute' : 'after' }, 66 | 'hashs' : { 'search': '()(%[a-zA-Z0-9_:]*)()', 67 | 'class' : 'vars', 68 | 'modifiers' : 'g', 'execute' : 'after' }, 69 | }, 70 | 71 | 'STYLES' : 72 | { 73 | 'COMMENTS': 'color: #AAAAAA;', 74 | 'QUOTESMARKS': 'color: #DC0000;', 75 | 'KEYWORDS' : 76 | { 77 | 'core' : 'color: #8aca00;', 78 | 'functions' : 'color: #2B60FF;' 79 | }, 80 | 'OPERATORS' : 'color: #8aca00;', 81 | 'DELIMITERS' : 'color: #0038E1;', 82 | 'REGEXPS': 83 | { 84 | 'scopingnames' : 'color: #ff0000;', 85 | 'vars' : 'color: #00aaaa;', 86 | } 87 | } //'STYLES' 88 | }; 89 | -------------------------------------------------------------------------------- /edit_area/reg_syntax/robotstxt.js: -------------------------------------------------------------------------------- 1 | editAreaLoader.load_syntax["robotstxt"] = { 2 | 'DISPLAY_NAME' : 'Robots txt', 3 | 'COMMENT_SINGLE' : {1 : '#'}, 4 | 'COMMENT_MULTI' : {}, 5 | 'QUOTEMARKS' : [], 6 | 'KEYWORD_CASE_SENSITIVE' : false, 7 | 'KEYWORDS' : { 8 | 'attributes' : ['User-agent', 'Disallow', 'Allow', 'Crawl-delay'], 9 | 'values' : ['*'], 10 | 'specials' : ['*'] 11 | }, 12 | 'OPERATORS' :[':'], 13 | 'DELIMITERS' :[], 14 | 'STYLES' : { 15 | 'COMMENTS': 'color: #AAAAAA;', 16 | 'QUOTESMARKS': 'color: #6381F8;', 17 | 'KEYWORDS' : { 18 | 'attributes' : 'color: #48BDDF;', 19 | 'values' : 'color: #2B60FF;', 20 | 'specials' : 'color: #FF0000;' 21 | }, 22 | 'OPERATORS' : 'color: #FF00FF;', 23 | 'DELIMITERS' : 'color: #60CA00;' 24 | } 25 | }; 26 | -------------------------------------------------------------------------------- /edit_area/reg_syntax/ruby.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Ruby syntax v 1.0 3 | * 4 | * v1.0 by Patrice De Saint Steban (2007/01/03) 5 | * 6 | **/ 7 | editAreaLoader.load_syntax["ruby"] = { 8 | 'DISPLAY_NAME' : 'Ruby' 9 | ,'COMMENT_SINGLE' : {1 : '#'} 10 | ,'COMMENT_MULTI' : {} 11 | ,'QUOTEMARKS' : {1: "'", 2: '"'} 12 | ,'KEYWORD_CASE_SENSITIVE' : true 13 | ,'KEYWORDS' : { 14 | 'reserved' : [ 15 | 'alias', 'and', 'BEGIN', 'begin', 'break', 'case', 'class', 'def', 'defined', 'do', 'else', 16 | 'elsif', 'END', 'end', 'ensure', 'false', 'for', 'if', 17 | 'in', 'module', 'next', 'not', 'or', 'redo', 'rescue', 'retry', 18 | 'return', 'self', 'super', 'then', 'true', 'undef', 'unless', 'until', 'when', 'while', 'yield' 19 | ] 20 | } 21 | ,'OPERATORS' :[ 22 | '+', '-', '/', '*', '=', '<', '>', '%', '!', '&', ';', '?', '`', ':', ',' 23 | ] 24 | ,'DELIMITERS' :[ 25 | '(', ')', '[', ']', '{', '}' 26 | ] 27 | ,'REGEXPS' : { 28 | 'constants' : { 29 | 'search' : '()([A-Z]\\w*)()' 30 | ,'class' : 'constants' 31 | ,'modifiers' : 'g' 32 | ,'execute' : 'before' 33 | } 34 | ,'variables' : { 35 | 'search' : '()([\$\@\%]+\\w+)()' 36 | ,'class' : 'variables' 37 | ,'modifiers' : 'g' 38 | ,'execute' : 'before' 39 | } 40 | ,'numbers' : { 41 | 'search' : '()(-?[0-9]+)()' 42 | ,'class' : 'numbers' 43 | ,'modifiers' : 'g' 44 | ,'execute' : 'before' 45 | } 46 | ,'symbols' : { 47 | 'search' : '()(:\\w+)()' 48 | ,'class' : 'symbols' 49 | ,'modifiers' : 'g' 50 | ,'execute' : 'before' 51 | } 52 | } 53 | ,'STYLES' : { 54 | 'COMMENTS': 'color: #AAAAAA;' 55 | ,'QUOTESMARKS': 'color: #660066;' 56 | ,'KEYWORDS' : { 57 | 'reserved' : 'font-weight: bold; color: #0000FF;' 58 | } 59 | ,'OPERATORS' : 'color: #993300;' 60 | ,'DELIMITERS' : 'color: #993300;' 61 | ,'REGEXPS' : { 62 | 'variables' : 'color: #E0BD54;' 63 | ,'numbers' : 'color: green;' 64 | ,'constants' : 'color: #00AA00;' 65 | ,'symbols' : 'color: #879EFA;' 66 | } 67 | } 68 | }; 69 | -------------------------------------------------------------------------------- /edit_area/reg_syntax/sql.js: -------------------------------------------------------------------------------- 1 | editAreaLoader.load_syntax["sql"] = { 2 | 'DISPLAY_NAME' : 'SQL' 3 | ,'COMMENT_SINGLE' : {1 : '--'} 4 | ,'COMMENT_MULTI' : {'/*' : '*/'} 5 | ,'QUOTEMARKS' : {1: "'", 2: '"', 3: '`'} 6 | ,'KEYWORD_CASE_SENSITIVE' : false 7 | ,'KEYWORDS' : { 8 | 'statements' : [ 9 | 'select', 'SELECT', 'where', 'order', 'by', 10 | 'insert', 'from', 'update', 'grant', 'left join', 'right join', 11 | 'union', 'group', 'having', 'limit', 'alter', 'LIKE','IN','CASE' 12 | ] 13 | ,'reserved' : [ 14 | 'null', 'enum', 'int', 'boolean', 'add', 'varchar' 15 | 16 | ] 17 | ,'functions' : [ 18 | 'ABS','ACOS','ADDDATE','ADDTIME','AES_DECRYPT','AES_ENCRYPT','ASCII','ASIN','ATAN2 ATAN','ATAN','AVG','BENCHMARK','DISTINCT','BIN','BIT_AND','BIT_COUNT','BIT_LENGTH','BIT_OR','BIT_XOR','CAST','CEILING CEIL','CHAR_LENGTH','CHAR', 19 | 'CHARACTER_LENGTH','CHARSET','COALESCE','COERCIBILITY','COLLATION','COMPRESS','CONCAT_WS','CONCAT','CONNECTION_ID','CONV','CONVERT_TZ','COS','COT','COUNT','CRC32','CURDATE','CURRENT_DATE','CURRENT_TIME','CURRENT_TIMESTAMP','CURRENT_USER','CURTIME','DATABASE','DATE_ADD','DATE_FORMAT','DATE_SUB','DATE','DATEDIFF','DAY','DAYNAME','DAYOFMONTH', 20 | 'DAYOFWEEK','DAYOFYEAR','DECODE','DEFAULT','DEGREES','DES_DECRYPT','DES_ENCRYPT','ELT','ENCODE','ENCRYPT','EXP','EXPORT_SET','EXTRACT','FIELD','FIND_IN_SET','FLOOR','FORMAT','FOUND_ROWS','FROM_DAYS','FROM_UNIXTIME','GET_FORMAT','GET_LOCK','GREATEST','GROUP_CONCAT','HEX','HOUR','IF','IFNULL','INET_ATON','INET_NTOA', 21 | 'INSERT','INSTR','INTERVAL','IS_FREE_LOCK','IS_USED_LOCK','ISNULL','LAST_DAY','LAST_INSERT_ID','LCASE','LEAST','LEFT','LENGTH','LN','LOAD_FILE','LOCALTIME','LOCALTIMESTAMP','LOCATE','LOG10','LOG2','LOG','LOWER','LPAD','LTRIM','MAKE_SET','MAKEDATE','MAKETIME','MASTER_POS_WAIT','MAX','MD5','MICROSECOND', 22 | 'MID','MIN','MINUTE','MOD','MONTH','MONTHNAME','NOW','NULLIF','OCT','OCTET_LENGTH','OLD_PASSWORD','ORD','PASSWORD','PERIOD_ADD','PERIOD_DIFF','PI','POSITION','POW','POWER','PROCEDURE ANALYSE','QUARTER','QUOTE','RADIANS','RAND','RELEASE_LOCK','REPEAT','REPLACE','REVERSE','RIGHT','ROUND', 23 | 'RPAD','RTRIM','SEC_TO_TIME','SECOND','SESSION_USER','SHA1','SHA','SIGN','SIN','SOUNDEX','SOUNDS LIKE','SPACE','SQRT','STD','STDDEV','STR_TO_DATE','STRCMP','SUBDATE','SUBSTRING_INDEX','SUBSTRING','SUBSTR','SUBTIME','SUM','SYSDATE','SYSTEM_USER','TAN','TIME_FORMAT','TIME_TO_SEC','TIME','TIMEDIFF', 24 | 'TIMESTAMP','TO_DAYS','TRIM','TRUNCATE','UCASE','UNCOMPRESS','UNCOMPRESSED_LENGTH','UNHEX','UNIX_TIMESTAMP','UPPER','USER','UTC_DATE','UTC_TIME','UTC_TIMESTAMP','UUID','VALUES','VARIANCE','WEEK','WEEKDAY','WEEKOFYEAR','YEAR','YEARWEEK' 25 | ] 26 | } 27 | ,'OPERATORS' :[ 28 | 'AND','&&','BETWEEN','BINARY','&','|','^','/','DIV','<=>','=','>=','>','<<','>>','IS','NULL','<=','<','-','%','!=','<>','!','||','OR','+','REGEXP','RLIKE','XOR','~','*' 29 | ] 30 | ,'DELIMITERS' :[ 31 | '(', ')', '[', ']', '{', '}' 32 | ] 33 | ,'REGEXPS' : { 34 | // highlight all variables (@...) 35 | 'variables' : { 36 | 'search' : '()(\\@\\w+)()' 37 | ,'class' : 'variables' 38 | ,'modifiers' : 'g' 39 | ,'execute' : 'before' // before or after 40 | } 41 | } 42 | ,'STYLES' : { 43 | 'COMMENTS': 'color: #AAAAAA;' 44 | ,'QUOTESMARKS': 'color: #879EFA;' 45 | ,'KEYWORDS' : { 46 | 'reserved' : 'color: #48BDDF;' 47 | ,'functions' : 'color: #0040FD;' 48 | ,'statements' : 'color: #60CA00;' 49 | } 50 | ,'OPERATORS' : 'color: #FF00FF;' 51 | ,'DELIMITERS' : 'color: #2B60FF;' 52 | ,'REGEXPS' : { 53 | 'variables' : 'color: #E0BD54;' 54 | } 55 | } 56 | }; 57 | -------------------------------------------------------------------------------- /edit_area/reg_syntax/tsql.js: -------------------------------------------------------------------------------- 1 | editAreaLoader.load_syntax["tsql"] = { 2 | 'DISPLAY_NAME' : 'T-SQL' 3 | ,'COMMENT_SINGLE' : {1 : '--'} 4 | ,'COMMENT_MULTI' : {'/*' : '*/'} 5 | ,'QUOTEMARKS' : {1: "'" } 6 | ,'KEYWORD_CASE_SENSITIVE' : false 7 | ,'KEYWORDS' : { 8 | 'statements': [ 9 | 'ADD', 'EXCEPT', 'PERCENT', 'EXEC', 'PLAN', 'ALTER', 'EXECUTE', 'PRECISION', 10 | 'PRIMARY', 'EXIT', 'PRINT', 'AS', 'FETCH', 'PROC', 'ASC', 11 | 'FILE', 'PROCEDURE', 'AUTHORIZATION', 'FILLFACTOR', 'PUBLIC', 'BACKUP', 'FOR', 'RAISERROR', 12 | 'BEGIN', 'FOREIGN', 'READ', 'FREETEXT', 'READTEXT', 'BREAK', 'FREETEXTTABLE', 13 | 'RECONFIGURE', 'BROWSE', 'FROM', 'REFERENCES', 'BULK', 'FULL', 'REPLICATION', 'BY', 14 | 'FUNCTION', 'RESTORE', 'CASCADE', 'GOTO', 'RESTRICT', 'CASE', 'GRANT', 'RETURN', 15 | 'CHECK', 'GROUP', 'REVOKE', 'CHECKPOINT', 'HAVING', 'RIGHT', 'CLOSE', 'HOLDLOCK', 'ROLLBACK', 16 | 'CLUSTERED', 'IDENTITY', 'ROWCOUNT', 'IDENTITY_INSERT', 'ROWGUIDCOL', 'COLLATE', 17 | 'IDENTITYCOL', 'RULE', 'COLUMN', 'IF', 'SAVE', 'COMMIT', 'SCHEMA', 'COMPUTE', 'INDEX', 18 | 'SELECT', 'CONSTRAINT', 'CONTAINS', 'INSERT', 'SET', 19 | 'CONTAINSTABLE', 'INTERSECT', 'SETUSER', 'CONTINUE', 'INTO', 'SHUTDOWN', 'SOME', 20 | 'CREATE', 'STATISTICS', 'KEY', 'CURRENT', 'KILL', 'TABLE', 21 | 'CURRENT_DATE', 'TEXTSIZE', 'CURRENT_TIME', 'THEN', 'LINENO', 22 | 'TO', 'LOAD', 'TOP', 'CURSOR', 'NATIONAL', 'TRAN', 'DATABASE', 'NOCHECK', 23 | 'TRANSACTION', 'DBCC', 'NONCLUSTERED', 'TRIGGER', 'DEALLOCATE', 'TRUNCATE', 24 | 'DECLARE', 'TSEQUAL', 'DEFAULT', 'UNION', 'DELETE', 'OF', 'UNIQUE', 25 | 'DENY', 'OFF', 'UPDATE', 'DESC', 'OFFSETS', 'UPDATETEXT', 'DISK', 'ON', 'USE', 'DISTINCT', 'OPEN', 26 | 'DISTRIBUTED', 'OPENDATASOURCE', 'VALUES', 'DOUBLE', 'OPENQUERY', 'VARYING', 'DROP', 27 | 'OPENROWSET', 'VIEW', 'DUMMY', 'OPENXML', 'WAITFOR', 'DUMP', 'OPTION', 'WHEN', 'ELSE', 'WHERE', 28 | 'END', 'ORDER', 'WHILE', 'ERRLVL', 'WITH', 'ESCAPE', 'OVER', 'WRITETEXT' 29 | ], 30 | 'functions': [ 31 | 'COALESCE', 'SESSION_USER', 'CONVERT', 'SYSTEM_USER', 'CURRENT_TIMESTAMP', 'CURRENT_USER', 'NULLIF', 'USER', 32 | 'AVG', 'MIN', 'CHECKSUM', 'SUM', 'CHECKSUM_AGG', 'STDEV', 'COUNT', 'STDEVP', 'COUNT_BIG', 'VAR', 'GROUPING', 'VARP', 'MAX', 33 | '@@DATEFIRST', '@@OPTIONS', '@@DBTS', '@@REMSERVER', '@@LANGID', '@@SERVERNAME', '@@LANGUAGE', '@@SERVICENAME', '@@LOCK_TIMEOUT', 34 | '@@SPID', '@@MAX_CONNECTIONS', '@@TEXTSIZE', '@@MAX_PRECISION', '@@VERSION', '@@NESTLEVEL', 35 | '@@CURSOR_ROWS', 'CURSOR_STATUS', '@@FETCH_STATUS', 36 | 'DATEADD', 'DATEDIFF', 'DATENAME', 'DATEPART', 'DAY', 'GETDATE', 'GETUTCDATE', 'MONTH', 'YEAR', 37 | 'ABS', 'DEGREES', 'RAND', 'ACOS', 'EXP', 'ROUND', 'ASIN', 'FLOOR', 'SIGN', 'ATAN', 'LOG', 'SIN', 'ATN2', 'LOG10', 'SQRT', 38 | 'CEILING', 'PI ', 'SQUARE', 'COS', 'POWER', 'TAN', 'COT', 'RADIANS', 39 | '@@PROCID', 'COL_LENGTH', 'FULLTEXTCATALOGPROPERTY', 'COL_NAME', 'FULLTEXTSERVICEPROPERTY', 'COLUMNPROPERTY', 'INDEX_COL', 40 | 'DATABASEPROPERTY', 'INDEXKEY_PROPERTY', 'DATABASEPROPERTYEX', 'INDEXPROPERTY', 'DB_ID', 'OBJECT_ID', 'DB_NAME', 'OBJECT_NAME', 41 | 'FILE_ID', 'OBJECTPROPERTY', 'OBJECTPROPERTYEX', 'FILE_NAME', 'SQL_VARIANT_PROPERTY', 'FILEGROUP_ID', 'FILEGROUP_NAME', 42 | 'FILEGROUPPROPERTY', 'TYPEPROPERTY', 'FILEPROPERTY', 43 | 'CURRENT_USER', 'SUSER_ID', 'SUSER_SID', 'IS_MEMBER', 'SUSER_SNAME', 'IS_SRVROLEMEMBER', 'PERMISSIONS', 'SYSTEM_USER', 44 | 'SUSER_NAME', 'USER_ID', 'SESSION_USER', 'USER_NAME', 'ASCII', 'SOUNDEX', 'PATINDEX', 'SPACE', 'CHARINDEX', 'QUOTENAME', 45 | 'STR', 'DIFFERENCE', 'REPLACE', 'STUFF', 'REPLICATE', 'SUBSTRING', 'LEN', 'REVERSE', 'UNICODE', 'LOWER', 46 | 'UPPER', 'LTRIM', 'RTRIM', 'APP_NAME', 'CAST', 'CONVERT', 'COALESCE', 'COLLATIONPROPERTY', 'COLUMNS_UPDATED', 'CURRENT_TIMESTAMP', 47 | 'CURRENT_USER', 'DATALENGTH', '@@ERROR', 'FORMATMESSAGE', 'GETANSINULL', 'HOST_ID', 'HOST_NAME', 'IDENT_CURRENT', 'IDENT_INCR', 48 | 'IDENT_SEED', '@@IDENTITY', 'ISDATE', 'ISNULL', 'ISNUMERIC', 'NEWID', 'NULLIF', 'PARSENAME', '@@ROWCOUNT', 49 | 'SCOPE_IDENTITY', 'SERVERPROPERTY', 'SESSIONPROPERTY', 'SESSION_USER', 'STATS_DATE', 'SYSTEM_USER', '@@TRANCOUNT', 'USER_NAME', 50 | '@@CONNECTIONS', '@@PACK_RECEIVED', '@@CPU_BUSY', '@@PACK_SENT', '@@TIMETICKS', '@@IDLE', '@@TOTAL_ERRORS', '@@IO_BUSY', '@@TOTAL_READ', 51 | '@@PACKET_ERRORS', '@@TOTAL_WRITE', 'PATINDEX', 'TEXTVALID', 'TEXTPTR' 52 | ], 53 | 'reserved': [ 54 | 'RIGHT', 'INNER', 'IS', 'JOIN', 'CROSS', 'LEFT', 'NULL', 'OUTER' 55 | ] 56 | } 57 | ,'OPERATORS' :[ 58 | '+', '-', '*', '/', '%', '=', '&' ,'|', '^', '>', '<', '>=', '<=', '<>', '!=', '!<', '!>', 'ALL', 'AND', 'ANY', 'BETWEEN', 'EXISTS', 'IN', 'LIKE', 'NOT', 'OR', '~' 59 | ] 60 | ,'DELIMITERS' :[ 61 | '(', ')', '[', ']', '{', '}' 62 | ] 63 | ,'REGEXPS' : { 64 | // highlight all variables (@...) 65 | 'variables' : { 66 | 'search' : '()(\\@\\w+)()' 67 | ,'class' : 'variables' 68 | ,'modifiers' : 'g' 69 | ,'execute' : 'before' // before or after 70 | } 71 | } 72 | ,'STYLES' : { 73 | 'COMMENTS': 'color: #008000;' 74 | ,'QUOTESMARKS': 'color: #FF0000;' 75 | ,'KEYWORDS' : { 76 | 'reserved' : 'color: #808080;' 77 | ,'functions' : 'color: #FF00FF;' 78 | ,'statements' : 'color: #0000FF;' 79 | } 80 | ,'OPERATORS' : 'color: #808080;' 81 | ,'DELIMITERS' : 'color: #FF8000;' 82 | ,'REGEXPS' : { 83 | 'variables' : 'color: #E0BD54;' 84 | } 85 | } 86 | }; 87 | 88 | 89 | -------------------------------------------------------------------------------- /edit_area/reg_syntax/vb.js: -------------------------------------------------------------------------------- 1 | editAreaLoader.load_syntax["vb"] = { 2 | 'DISPLAY_NAME' : 'Visual Basic' 3 | ,'COMMENT_SINGLE' : {1 : "'"} 4 | ,'COMMENT_MULTI' : { } 5 | ,'QUOTEMARKS' : {1: '"'} 6 | ,'KEYWORD_CASE_SENSITIVE' : false 7 | ,'KEYWORDS' : { 8 | 'statements' : [ 9 | 'if','then','for','each','while','do','loop', 10 | 'else','elseif','select','case','end select', 11 | 'until','next','step','to','in','end if' 12 | ] 13 | ,'keywords' : [ 14 | 'empty','isempty','nothing','null','isnull','true','false', 15 | 'set','call', 16 | 'sub','end sub','function','end function','exit','exit function', 17 | 'dim','Mod','In','private','public','shared','const' 18 | ] 19 | 20 | ,'functions' : [ 21 | 'CDate','Date','DateAdd','DateDiff','DatePart','DateSerial','DateValue','Day','FormatDateTime', 22 | 'Hour','IsDate','Minute','Month', 23 | 'MonthName','Now','Second','Time','Timer','TimeSerial','TimeValue','Weekday','WeekdayName ','Year', 24 | 'Asc','CBool','CByte','CCur','CDate','CDbl','Chr','CInt','CLng','CSng','CStr','Hex','Oct','FormatCurrency', 25 | 'FormatDateTime','FormatNumber','FormatPercent','Abs','Atn','Cos','Exp','Hex','Int','Fix','Log','Oct', 26 | 'Rnd','Sgn','Sin','Sqr','Tan', 27 | 'Array','Filter','IsArray','Join','LBound','Split','UBound', 28 | 'InStr','InStrRev','LCase','Left','Len','LTrim','RTrim','Trim','Mid','Replace','Right','Space','StrComp', 29 | 'String','StrReverse','UCase', 30 | 'CreateObject','Eval','GetLocale','GetObject','GetRef','InputBox','IsEmpty','IsNull','IsNumeric', 31 | 'IsObject','LoadPicture','MsgBox','RGB','Round','ScriptEngine','ScriptEngineBuildVersion','ScriptEngineMajorVersion', 32 | 'ScriptEngineMinorVersion','SetLocale','TypeName','VarType' 33 | ] 34 | } 35 | ,'OPERATORS' :[ 36 | '+', '-', '/', '*', '=', '<', '>', '!', '&' 37 | ] 38 | ,'DELIMITERS' :[ 39 | '(', ')', '[', ']', '{', '}' 40 | ] 41 | ,'STYLES' : { 42 | 'COMMENTS': 'color: #99CC00;' 43 | ,'QUOTESMARKS': 'color: #333399;' 44 | ,'KEYWORDS' : { 45 | 'keywords' : 'color: #3366FF;' 46 | ,'functions' : 'color: #0000FF;' 47 | ,'statements' : 'color: #3366FF;' 48 | } 49 | ,'OPERATORS' : 'color: #FF0000;' 50 | ,'DELIMITERS' : 'color: #0000FF;' 51 | 52 | } 53 | }; 54 | -------------------------------------------------------------------------------- /edit_area/reg_syntax/xml.js: -------------------------------------------------------------------------------- 1 | /* 2 | * last update: 2006-08-24 3 | */ 4 | 5 | editAreaLoader.load_syntax["xml"] = { 6 | 'DISPLAY_NAME' : 'XML' 7 | ,'COMMENT_SINGLE' : {} 8 | ,'COMMENT_MULTI' : {''} 9 | ,'QUOTEMARKS' : {1: "'", 2: '"'} 10 | ,'KEYWORD_CASE_SENSITIVE' : false 11 | ,'KEYWORDS' : { 12 | } 13 | ,'OPERATORS' :[ 14 | ] 15 | ,'DELIMITERS' :[ 16 | ] 17 | ,'REGEXPS' : { 18 | 'xml' : { 19 | 'search' : '()(<\\?[^>]*?\\?>)()' 20 | ,'class' : 'xml' 21 | ,'modifiers' : 'g' 22 | ,'execute' : 'before' // before or after 23 | } 24 | ,'cdatas' : { 25 | 'search' : '()()()' 26 | ,'class' : 'cdata' 27 | ,'modifiers' : 'g' 28 | ,'execute' : 'before' // before or after 29 | } 30 | ,'tags' : { 31 | 'search' : '(<)(/?[a-z][^ \r\n\t>]*)([^>]*>)' 32 | ,'class' : 'tags' 33 | ,'modifiers' : 'gi' 34 | ,'execute' : 'before' // before or after 35 | } 36 | ,'attributes' : { 37 | 'search' : '( |\n|\r|\t)([^ \r\n\t=]+)(=)' 38 | ,'class' : 'attributes' 39 | ,'modifiers' : 'g' 40 | ,'execute' : 'before' // before or after 41 | } 42 | } 43 | ,'STYLES' : { 44 | 'COMMENTS': 'color: #AAAAAA;' 45 | ,'QUOTESMARKS': 'color: #6381F8;' 46 | ,'KEYWORDS' : { 47 | } 48 | ,'OPERATORS' : 'color: #E775F0;' 49 | ,'DELIMITERS' : '' 50 | ,'REGEXPS' : { 51 | 'attributes': 'color: #B1AC41;' 52 | ,'tags': 'color: #E62253;' 53 | ,'xml': 'color: #8DCFB5;' 54 | ,'cdata': 'color: #50B020;' 55 | } 56 | } 57 | }; 58 | -------------------------------------------------------------------------------- /edit_area/regexp.js: -------------------------------------------------------------------------------- 1 | /*EditArea.prototype.comment_or_quotes= function(v0, v1, v2, v3, v4,v5,v6,v7,v8,v9, v10){ 2 | new_class="quotes"; 3 | if(v6 && v6 != undefined && v6!="") 4 | new_class="comments"; 5 | return "µ__"+ new_class +"__µ"+v0+"µ_END_µ"; 6 | 7 | };*/ 8 | 9 | /* EditArea.prototype.htmlTag= function(v0, v1, v2, v3, v4,v5,v6,v7,v8,v9, v10){ 10 | res=""+v2; 11 | alert("v2: "+v2+" v3: "+v3); 12 | tab=v3.split("="); 13 | attributes=""; 14 | if(tab.length>1){ 15 | attributes=""+tab[0]+"="; 16 | for(i=1; i"; 19 | attributes+=""+tab[i].substr(cut)+"="; 20 | } 21 | attributes+=""+tab[tab.length-1]+""; 22 | } 23 | res+=attributes+v5+""; 24 | return res; 25 | };*/ 26 | 27 | // determine if the selected text if a comment or a quoted text 28 | EditArea.prototype.comment_or_quote= function(){ 29 | var new_class="", close_tag="", sy, arg, i; 30 | sy = parent.editAreaLoader.syntax[editArea.current_code_lang]; 31 | arg = EditArea.prototype.comment_or_quote.arguments[0]; 32 | 33 | for( i in sy["quotes"] ){ 34 | if(arg.indexOf(i)==0){ 35 | new_class="quotesmarks"; 36 | close_tag=sy["quotes"][i]; 37 | } 38 | } 39 | if(new_class.length==0) 40 | { 41 | for(var i in sy["comments"]){ 42 | if( arg.indexOf(i)==0 ){ 43 | new_class="comments"; 44 | close_tag=sy["comments"][i]; 45 | } 46 | } 47 | } 48 | // for single line comment the \n must not be included in the span tags 49 | if(close_tag=="\n"){ 50 | return "µ__"+ new_class +"__µ"+ arg.replace(/(\r?\n)?$/m, "µ_END_µ$1"); 51 | }else{ 52 | // the closing tag must be set only if the comment or quotes is closed 53 | reg= new RegExp(parent.editAreaLoader.get_escaped_regexp(close_tag)+"$", "m"); 54 | if( arg.search(reg)!=-1 ) 55 | return "µ__"+ new_class +"__µ"+ arg +"µ_END_µ"; 56 | else 57 | return "µ__"+ new_class +"__µ"+ arg; 58 | } 59 | }; 60 | 61 | /* 62 | // apply special tags arround text to highlight 63 | EditArea.prototype.custom_highlight= function(){ 64 | res= EditArea.prototype.custom_highlight.arguments[1]+"µ__"+ editArea.reg_exp_span_tag +"__µ" + EditArea.prototype.custom_highlight.arguments[2]+"µ_END_µ"; 65 | if(EditArea.prototype.custom_highlight.arguments.length>5) 66 | res+= EditArea.prototype.custom_highlight.arguments[ EditArea.prototype.custom_highlight.arguments.length-3 ]; 67 | return res; 68 | }; 69 | */ 70 | 71 | // return identication that allow to know if revalidating only the text line won't make the syntax go mad 72 | EditArea.prototype.get_syntax_trace= function(text){ 73 | if(this.settings["syntax"].length>0 && parent.editAreaLoader.syntax[this.settings["syntax"]]["syntax_trace_regexp"]) 74 | return text.replace(parent.editAreaLoader.syntax[this.settings["syntax"]]["syntax_trace_regexp"], "$3"); 75 | }; 76 | 77 | 78 | EditArea.prototype.colorize_text= function(text){ 79 | //text="
    "; 80 | /* 81 | if(this.isOpera){ 82 | // opera can't use pre element tabulation cause a tab=6 chars in the textarea and 8 chars in the pre 83 | text= this.replace_tab(text); 84 | }*/ 85 | 86 | text= " "+text; // for easier regExp 87 | 88 | /*if(this.do_html_tags) 89 | text= text.replace(/(<[a-z]+ [^>]*>)/gi, '[__htmlTag__]$1[_END_]');*/ 90 | if(this.settings["syntax"].length>0) 91 | text= this.apply_syntax(text, this.settings["syntax"]); 92 | 93 | // remove the first space added 94 | return text.substr(1).replace(/&/g,"&").replace(//g,">").replace(/µ_END_µ/g,"").replace(/µ__([a-zA-Z0-9]+)__µ/g,""); 95 | }; 96 | 97 | EditArea.prototype.apply_syntax= function(text, lang){ 98 | var sy; 99 | this.current_code_lang=lang; 100 | 101 | if(!parent.editAreaLoader.syntax[lang]) 102 | return text; 103 | 104 | sy = parent.editAreaLoader.syntax[lang]; 105 | if(sy["custom_regexp"]['before']){ 106 | for( var i in sy["custom_regexp"]['before']){ 107 | var convert="$1µ__"+ sy["custom_regexp"]['before'][i]['class'] +"__µ$2µ_END_µ$3"; 108 | text= text.replace(sy["custom_regexp"]['before'][i]['regexp'], convert); 109 | } 110 | } 111 | 112 | if(sy["comment_or_quote_reg_exp"]){ 113 | //setTimeout("_$('debug_area').value=editArea.comment_or_quote_reg_exp;", 500); 114 | text= text.replace(sy["comment_or_quote_reg_exp"], this.comment_or_quote); 115 | } 116 | 117 | if(sy["keywords_reg_exp"]){ 118 | for(var i in sy["keywords_reg_exp"]){ 119 | text= text.replace(sy["keywords_reg_exp"][i], 'µ__'+i+'__µ$2µ_END_µ'); 120 | } 121 | } 122 | 123 | if(sy["delimiters_reg_exp"]){ 124 | text= text.replace(sy["delimiters_reg_exp"], 'µ__delimiters__µ$1µ_END_µ'); 125 | } 126 | 127 | if(sy["operators_reg_exp"]){ 128 | text= text.replace(sy["operators_reg_exp"], 'µ__operators__µ$1µ_END_µ'); 129 | } 130 | 131 | if(sy["custom_regexp"]['after']){ 132 | for( var i in sy["custom_regexp"]['after']){ 133 | var convert="$1µ__"+ sy["custom_regexp"]['after'][i]['class'] +"__µ$2µ_END_µ$3"; 134 | text= text.replace(sy["custom_regexp"]['after'][i]['regexp'], convert); 135 | } 136 | } 137 | 138 | return text; 139 | }; 140 | -------------------------------------------------------------------------------- /edit_area/resize_area.js: -------------------------------------------------------------------------------- 1 | 2 | EditAreaLoader.prototype.start_resize_area= function(){ 3 | var d=document,a,div,width,height,father; 4 | 5 | d.onmouseup= editAreaLoader.end_resize_area; 6 | d.onmousemove= editAreaLoader.resize_area; 7 | editAreaLoader.toggle(editAreaLoader.resize["id"]); 8 | 9 | a = editAreas[editAreaLoader.resize["id"]]["textarea"]; 10 | div = d.getElementById("edit_area_resize"); 11 | if(!div){ 12 | div= d.createElement("div"); 13 | div.id="edit_area_resize"; 14 | div.style.border="dashed #888888 1px"; 15 | } 16 | width = a.offsetWidth -2; 17 | height = a.offsetHeight -2; 18 | 19 | div.style.display = "block"; 20 | div.style.width = width+"px"; 21 | div.style.height = height+"px"; 22 | father= a.parentNode; 23 | father.insertBefore(div, a); 24 | 25 | a.style.display="none"; 26 | 27 | editAreaLoader.resize["start_top"]= calculeOffsetTop(div); 28 | editAreaLoader.resize["start_left"]= calculeOffsetLeft(div); 29 | }; 30 | 31 | EditAreaLoader.prototype.end_resize_area= function(e){ 32 | var d=document,div,a,width,height; 33 | 34 | d.onmouseup=""; 35 | d.onmousemove=""; 36 | 37 | div = d.getElementById("edit_area_resize"); 38 | a= editAreas[editAreaLoader.resize["id"]]["textarea"]; 39 | width = Math.max(editAreas[editAreaLoader.resize["id"]]["settings"]["min_width"], div.offsetWidth-4); 40 | height = Math.max(editAreas[editAreaLoader.resize["id"]]["settings"]["min_height"], div.offsetHeight-4); 41 | if(editAreaLoader.isIE==6){ 42 | width-=2; 43 | height-=2; 44 | } 45 | a.style.width = width+"px"; 46 | a.style.height = height+"px"; 47 | div.style.display = "none"; 48 | a.style.display = "inline"; 49 | a.selectionStart = editAreaLoader.resize["selectionStart"]; 50 | a.selectionEnd = editAreaLoader.resize["selectionEnd"]; 51 | editAreaLoader.toggle(editAreaLoader.resize["id"]); 52 | 53 | return false; 54 | }; 55 | 56 | EditAreaLoader.prototype.resize_area= function(e){ 57 | var allow,newHeight,newWidth; 58 | allow = editAreas[editAreaLoader.resize["id"]]["settings"]["allow_resize"]; 59 | if(allow=="both" || allow=="y") 60 | { 61 | newHeight = Math.max(20, getMouseY(e)- editAreaLoader.resize["start_top"]); 62 | document.getElementById("edit_area_resize").style.height= newHeight+"px"; 63 | } 64 | if(allow=="both" || allow=="x") 65 | { 66 | newWidth= Math.max(20, getMouseX(e)- editAreaLoader.resize["start_left"]); 67 | document.getElementById("edit_area_resize").style.width= newWidth+"px"; 68 | } 69 | 70 | return false; 71 | }; 72 | 73 | editAreaLoader.waiting_loading["resize_area.js"]= "loaded"; 74 | -------------------------------------------------------------------------------- /edit_area/search_replace.js: -------------------------------------------------------------------------------- 1 | EditArea.prototype.show_search = function(){ 2 | if(_$("area_search_replace").style.visibility=="visible"){ 3 | this.hidden_search(); 4 | }else{ 5 | this.open_inline_popup("area_search_replace"); 6 | var text= this.area_get_selection(); 7 | var search= text.split("\n")[0]; 8 | _$("area_search").value= search; 9 | _$("area_search").focus(); 10 | } 11 | }; 12 | 13 | EditArea.prototype.hidden_search= function(){ 14 | /*_$("area_search_replace").style.visibility="hidden"; 15 | this.textarea.focus(); 16 | var icon= _$("search"); 17 | setAttribute(icon, "class", getAttribute(icon, "class").replace(/ selected/g, "") );*/ 18 | this.close_inline_popup("area_search_replace"); 19 | }; 20 | 21 | EditArea.prototype.area_search= function(mode){ 22 | 23 | if(!mode) 24 | mode="search"; 25 | _$("area_search_msg").innerHTML=""; 26 | var search=_$("area_search").value; 27 | 28 | this.textarea.focus(); 29 | this.textarea.textareaFocused=true; 30 | 31 | var infos= this.get_selection_infos(); 32 | var start= infos["selectionStart"]; 33 | var pos=-1; 34 | var pos_begin=-1; 35 | var length=search.length; 36 | 37 | if(_$("area_search_replace").style.visibility!="visible"){ 38 | this.show_search(); 39 | return; 40 | } 41 | if(search.length==0){ 42 | _$("area_search_msg").innerHTML=this.get_translation("search_field_empty"); 43 | return; 44 | } 45 | // advance to the next occurence if no text selected 46 | if(mode!="replace" ){ 47 | if(_$("area_search_reg_exp").checked) 48 | start++; 49 | else 50 | start+= search.length; 51 | } 52 | 53 | //search 54 | if(_$("area_search_reg_exp").checked){ 55 | // regexp search 56 | var opt="m"; 57 | if(!_$("area_search_match_case").checked) 58 | opt+="i"; 59 | var reg= new RegExp(search, opt); 60 | pos= infos["full_text"].substr(start).search(reg); 61 | pos_begin= infos["full_text"].search(reg); 62 | if(pos!=-1){ 63 | pos+=start; 64 | length=infos["full_text"].substr(start).match(reg)[0].length; 65 | }else if(pos_begin!=-1){ 66 | length=infos["full_text"].match(reg)[0].length; 67 | } 68 | }else{ 69 | if(_$("area_search_match_case").checked){ 70 | pos= infos["full_text"].indexOf(search, start); 71 | pos_begin= infos["full_text"].indexOf(search); 72 | }else{ 73 | pos= infos["full_text"].toLowerCase().indexOf(search.toLowerCase(), start); 74 | pos_begin= infos["full_text"].toLowerCase().indexOf(search.toLowerCase()); 75 | } 76 | } 77 | 78 | // interpret result 79 | if(pos==-1 && pos_begin==-1){ 80 | _$("area_search_msg").innerHTML=""+search+" "+this.get_translation("not_found"); 81 | return; 82 | }else if(pos==-1 && pos_begin != -1){ 83 | begin= pos_begin; 84 | _$("area_search_msg").innerHTML=this.get_translation("restart_search_at_begin"); 85 | }else 86 | begin= pos; 87 | 88 | //_$("area_search_msg").innerHTML+=""+search+" found at "+begin+" strat at "+start+" pos "+pos+" curs"+ infos["indexOfCursor"]+"."; 89 | if(mode=="replace" && pos==infos["indexOfCursor"]){ 90 | var replace= _$("area_replace").value; 91 | var new_text=""; 92 | if(_$("area_search_reg_exp").checked){ 93 | var opt="m"; 94 | if(!_$("area_search_match_case").checked) 95 | opt+="i"; 96 | var reg= new RegExp(search, opt); 97 | new_text= infos["full_text"].substr(0, begin) + infos["full_text"].substr(start).replace(reg, replace); 98 | }else{ 99 | new_text= infos["full_text"].substr(0, begin) + replace + infos["full_text"].substr(begin + length); 100 | } 101 | this.textarea.value=new_text; 102 | this.area_select(begin, length); 103 | this.area_search(); 104 | }else 105 | this.area_select(begin, length); 106 | }; 107 | 108 | 109 | 110 | 111 | EditArea.prototype.area_replace= function(){ 112 | this.area_search("replace"); 113 | }; 114 | 115 | EditArea.prototype.area_replace_all= function(){ 116 | /* this.area_select(0, 0); 117 | _$("area_search_msg").innerHTML=""; 118 | while(_$("area_search_msg").innerHTML==""){ 119 | this.area_replace(); 120 | }*/ 121 | 122 | var base_text= this.textarea.value; 123 | var search= _$("area_search").value; 124 | var replace= _$("area_replace").value; 125 | if(search.length==0){ 126 | _$("area_search_msg").innerHTML=this.get_translation("search_field_empty"); 127 | return ; 128 | } 129 | 130 | var new_text=""; 131 | var nb_change=0; 132 | if(_$("area_search_reg_exp").checked){ 133 | // regExp 134 | var opt="mg"; 135 | if(!_$("area_search_match_case").checked) 136 | opt+="i"; 137 | var reg= new RegExp(search, opt); 138 | nb_change= infos["full_text"].match(reg).length; 139 | new_text= infos["full_text"].replace(reg, replace); 140 | 141 | }else{ 142 | 143 | if(_$("area_search_match_case").checked){ 144 | var tmp_tab=base_text.split(search); 145 | nb_change= tmp_tab.length -1 ; 146 | new_text= tmp_tab.join(replace); 147 | }else{ 148 | // case insensitive 149 | var lower_value=base_text.toLowerCase(); 150 | var lower_search=search.toLowerCase(); 151 | 152 | var start=0; 153 | var pos= lower_value.indexOf(lower_search); 154 | while(pos!=-1){ 155 | nb_change++; 156 | new_text+= this.textarea.value.substring(start , pos)+replace; 157 | start=pos+ search.length; 158 | pos= lower_value.indexOf(lower_search, pos+1); 159 | } 160 | new_text+= this.textarea.value.substring(start); 161 | } 162 | } 163 | if(new_text==base_text){ 164 | _$("area_search_msg").innerHTML=""+search+" "+this.get_translation("not_found"); 165 | }else{ 166 | this.textarea.value= new_text; 167 | _$("area_search_msg").innerHTML=""+nb_change+" "+this.get_translation("occurrence_replaced"); 168 | // firefox and opera doesn't manage with the focus if it's done directly 169 | //editArea.textarea.focus();editArea.textarea.textareaFocused=true; 170 | setTimeout("editArea.textarea.focus();editArea.textarea.textareaFocused=true;", 100); 171 | } 172 | 173 | 174 | }; 175 | -------------------------------------------------------------------------------- /edit_area/template.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | EditArea 6 | 7 | 8 | [__CSSRULES__] 9 | [__JSCODE__] 10 | 11 | 12 |
    13 |
    [__TOOLBAR__]
    14 |
    15 |
    16 |
    17 |
    18 |
     
    19 |
     
    20 |
    21 |
    22 |
    23 |
    24 |
    25 | 27 | 28 |
    29 |
    30 |
    31 | 32 | 33 | 34 | 37 | 38 | 41 | 44 | 45 |
    {$position}: 35 | {$line_abbr} 0, {$char_abbr} 0 36 | {$total}: 39 | {$line_abbr} 0, {$char_abbr} 0 40 | 42 | resize 43 |
    46 |
    47 |
    48 |
    49 |
    50 | {$processing} 51 |
    52 |
    53 | 54 |
    55 | 56 | 57 | 58 | 59 | 62 | 63 | 64 | 65 | 66 |
    {$search} 60 | {$close_popup}
    61 |
    {$replace}{$move_popup}
    67 |
    68 | 69 | 70 |
    71 | {$find_next} 72 | {$replace} 73 | {$replace_all}
    74 |
    75 |
    76 |
    77 |
    78 |
    79 | {$close_popup} 80 |
    81 |

    Editarea [__EA_VERSION__]


    82 |

    {$shortcuts}:

    83 | {$tab}: {$add_tab}
    84 | {$shift}+{$tab}: {$remove_tab}
    85 | {$ctrl}+f: {$search_command}
    86 | {$ctrl}+r: {$replace_command}
    87 | {$ctrl}+h: {$highlight}
    88 | {$ctrl}+g: {$go_to_line}
    89 | {$ctrl}+z: {$undo}
    90 | {$ctrl}+y: {$redo}
    91 | {$ctrl}+e: {$help}
    92 | {$ctrl}+q, {$esc}: {$close_popup}
    93 | {$accesskey} E: {$toggle}
    94 |
    95 | {$about_notice} 96 |
    97 |
    98 |
    99 | 100 | 101 | -------------------------------------------------------------------------------- /images/LyFM.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loveyu/LyFM/892f83a33a8dc54bcf669f4693c7b8b5b395c061/images/LyFM.png -------------------------------------------------------------------------------- /images/alipay_pay.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loveyu/LyFM/892f83a33a8dc54bcf669f4693c7b8b5b395c061/images/alipay_pay.png -------------------------------------------------------------------------------- /images/audio_ico.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loveyu/LyFM/892f83a33a8dc54bcf669f4693c7b8b5b395c061/images/audio_ico.png -------------------------------------------------------------------------------- /images/file_ico.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loveyu/LyFM/892f83a33a8dc54bcf669f4693c7b8b5b395c061/images/file_ico.png -------------------------------------------------------------------------------- /images/folder_ico.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loveyu/LyFM/892f83a33a8dc54bcf669f4693c7b8b5b395c061/images/folder_ico.png -------------------------------------------------------------------------------- /images/img_ico.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loveyu/LyFM/892f83a33a8dc54bcf669f4693c7b8b5b395c061/images/img_ico.png -------------------------------------------------------------------------------- /images/pdf_ico.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loveyu/LyFM/892f83a33a8dc54bcf669f4693c7b8b5b395c061/images/pdf_ico.png -------------------------------------------------------------------------------- /images/text_ico.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loveyu/LyFM/892f83a33a8dc54bcf669f4693c7b8b5b395c061/images/text_ico.png -------------------------------------------------------------------------------- /images/video_ico.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loveyu/LyFM/892f83a33a8dc54bcf669f4693c7b8b5b395c061/images/video_ico.png -------------------------------------------------------------------------------- /images/zip_ico.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loveyu/LyFM/892f83a33a8dc54bcf669f4693c7b8b5b395c061/images/zip_ico.png -------------------------------------------------------------------------------- /index.php: -------------------------------------------------------------------------------- 1 | load_config("config"); 6 | if(_Debug_) { 7 | set_error_handler('php_error_log'); 8 | register_shutdown_function('shutdown_error_log'); 9 | } 10 | $LyFile->load_filter("LibFilter");//加载过滤器,任意一过滤方法返回false后结束执行 11 | //URL()//页面解析之后 12 | //LIB()//页面加载之前 13 | $LyFile->default_load('Welcome');//设置默认页面,对应页面文件夹中Welcome文件Welcome类的main, 14 | //指定其他类和参数使用 文件夹,...,文件夹(文件夹留空为默认文件夹),文件名(类名),函数名,参数1,参数2,.... 的内容 15 | //当类名(文件)和文件夹冲突时优先取类 -------------------------------------------------------------------------------- /js/LyCode.js: -------------------------------------------------------------------------------- 1 | /* 2 | LyFM 3 | Copyright (c) 2013 loveyu 4 | Released under the MIT License 5 | */ 6 | function LyCode() { 7 | $("body").append('
    '); 8 | $("#" + LyCode.ID + " .run_code").click(function () { 9 | LyCode.prototype.run_code() 10 | }); 11 | $("#" + LyCode.ID + " .min").click(function () { 12 | LyCode.prototype.min_box() 13 | }); 14 | $("#" + LyCode.ID + " .close").click(function () { 15 | LyCode.prototype.close_box() 16 | }); 17 | $("#" + LyCode.ID + " .clear").click(function () { 18 | LyCode.prototype.clear_box() 19 | }); 20 | editAreaLoader.init({ 21 | id: "RUN_CODE_TEXTAREA" // id of the textarea to transform 22 | , start_highlight: true // if start with highlight 23 | , font_size: "10", allow_resize: "yes", allow_toggle: false, language: "zh", syntax: "php", EA_load_callback: "LyCode.prototype.edit_load_ok", replace_tab_by_spaces: 4 24 | }); 25 | }; 26 | LyCode.ID = "RUN_CODE_BOX"; 27 | LyCode.prototype = { 28 | open_box: function () { 29 | $("#" + LyCode.ID).css("display", "block"); 30 | this.center_box(); 31 | }, 32 | min_box: function () { 33 | $("#" + LyCode.ID).css("display", "none"); 34 | }, 35 | edit_load_ok: function () { 36 | $(window.frames["frame_RUN_CODE_TEXTAREA"].document).keydown(function () { 37 | LyCode.prototype.key_down() 38 | }); 39 | }, 40 | close_box: function () { 41 | this.clear_box(); 42 | this.min_box(); 43 | }, 44 | run_code: function () { 45 | $.post(URL + 'Api/run_code', {code: editAreaLoader.getValue("RUN_CODE_TEXTAREA")}, function (data) { 46 | if (data == "") { 47 | $("#" + LyCode.ID + " .content pre").text("代码返回结果为空"); 48 | } else { 49 | $("#" + LyCode.ID + " .content pre").text(data); 50 | } 51 | }); 52 | }, 53 | clear_box: function () { 54 | $("#" + LyCode.ID + " .content pre").html(""); 55 | $("#RUN_CODE_TEXTAREA").val(""); 56 | editAreaLoader.setValue("RUN_CODE_TEXTAREA", ""); 57 | }, 58 | key_down: function () { 59 | if (document.frame_RUN_CODE_TEXTAREA.event.ctrlKey && document.frame_RUN_CODE_TEXTAREA.event.keyCode == 13) { 60 | this.run_code(); 61 | } 62 | }, 63 | center_box: function () { 64 | $("#" + LyCode.ID).css("top", (($(window).height() - $("#" + LyCode.ID).height()) / 2.7) + 'px'); 65 | $("#" + LyCode.ID).css("left", (($(window).width() - $("#" + LyCode.ID).width()) / 2.7) + 'px'); 66 | $("#" + LyCode.ID + " .code").height($("#" + LyCode.ID).height() - $("#" + LyCode.ID + " .title").height()); 67 | $("#" + LyCode.ID + " .run").height($("#" + LyCode.ID).height() - $("#" + LyCode.ID + " .title").height()); 68 | $("#" + LyCode.ID + " .code").width($("#" + LyCode.ID).width() / 2); 69 | $("#" + LyCode.ID + " .run").width($("#" + LyCode.ID).width() / 2-5); 70 | } 71 | }; -------------------------------------------------------------------------------- /js/LyUpload.js: -------------------------------------------------------------------------------- 1 | /* 2 | LyFM 3 | Copyright (c) 2013 loveyu 4 | Released under the MIT License 5 | */ 6 | function LyUpload() { 7 | $("body").append(''); 16 | $('#file_upload').uploadify({ 17 | 'auto': false, 18 | 'formData': {'path': NOW_PATH}, 19 | 'buttonText': '选择文件集', 20 | 'queueID': 'Upload_Box_QueueID', 21 | 'swf': FILE_URL + 'swf/uploadify.swf', 22 | 'uploader': 'Api/upload_file', 23 | 'removeCompleted': false, 24 | 'onUploadSuccess': function (file, data, response) { 25 | LyUpload.prototype.upLoad(file, data, response); 26 | } 27 | }); 28 | } 29 | LyUpload.prototype = { 30 | open_box: function () { 31 | $("#Upload_Box").css("display", "block"); 32 | $("#Upload_Box").css("max-height", ($(window).height() - (($(window).height() - $("#Upload_Box").height()) / 5.7) * 2) + 'px'); 33 | this.center(); 34 | }, 35 | center: function () { 36 | $("#Upload_Box").css("top", (($(window).height() - $("#Upload_Box").height()) / 5.7) + 'px'); 37 | $("#Upload_Box").css("left", (($(window).width() - $("#Upload_Box").width()) / 1.7) + 'px'); 38 | }, 39 | upload: function () { 40 | $("#file_upload").uploadify("settings", "formData", {'path': NOW_PATH}); 41 | $('#file_upload').uploadify('upload', '*'); 42 | }, 43 | min_box: function () { 44 | $("#Upload_Box").css("display", "none"); 45 | $("#Upload_Button").html('还原上传对话框'); 46 | }, 47 | clear: function () { 48 | $('#file_upload').uploadify('cancel', '*'); 49 | }, 50 | upLoad: function (file, data, response) { 51 | data = eval('(' + data + ')'); 52 | if (data['status']) { 53 | $("#" + file.id).find(".data").html(" - 上传完成"); 54 | refresh_file(); 55 | } else { 56 | $("#" + file.id).find(".data").html(" - " + data['error'] + ""); 57 | } 58 | } 59 | }; -------------------------------------------------------------------------------- /js/LyUpload2.js: -------------------------------------------------------------------------------- 1 | /* 2 | LyFM 3 | Copyright (c) 2013 loveyu 4 | Released under the MIT License 5 | */ 6 | function LyUpload() { 7 | if (typeof(window.FileReader) == 'undefined') { 8 | alert('当前浏览器不支持HTML5上传,所以请你更换浏览器。'); 9 | } 10 | LyUpload.instance = this; 11 | $("body").append(''); 20 | } 21 | LyUpload.files = {list: {}, count: 0, index: []}; 22 | LyUpload.index = '0'; 23 | LyUpload.upload_index = 0; 24 | LyUpload.instance = null; 25 | LyUpload.prototype = { 26 | fileSelected: function () { 27 | if (LyUpload.files.count === 0) { 28 | $("#Upload_Box_QueueID").html(""); 29 | } 30 | var fs = $("#file_upload").get(0).files; 31 | var html = ''; 32 | for (var i = 0; i < fs.length; i++) { 33 | var file = fs[i]; 34 | var count = LyUpload.files.count; 35 | this.add_queue(file, count); 36 | ++LyUpload.files.count; 37 | } 38 | $("#file_upload").val(""); 39 | $("#Upload_Box_QueueID").append(html); 40 | }, 41 | open_box: function () { 42 | $("#Upload_Box").css("display", "block"); 43 | $("#Upload_Box").css("max-height", ($(window).height() - (($(window).height() - $("#Upload_Box").height()) / 5.7) * 2) + 'px'); 44 | this.center(); 45 | }, 46 | center: function () { 47 | $("#Upload_Box").css("top", (($(window).height() - $("#Upload_Box").height()) / 5.7) + 'px'); 48 | $("#Upload_Box").css("left", (($(window).width() - $("#Upload_Box").width()) / 1.7) + 'px'); 49 | }, 50 | add_queue: function (file, index) { 51 | LyUpload.files.list[index] = file; 52 | this.create_index(); 53 | $("table#Upload_Box_QueueID").append("0%" + file.name + "" + 54 | "" + fm.get_size(file.size) + "取消"); 55 | }, 56 | cancel_item: function (id) { 57 | LyUpload.files.list[id] = null; 58 | this.create_index(); 59 | $("#FileUploadQueue_" + id).hide('slow', function () { 60 | $(this).remove(); 61 | }); 62 | }, 63 | create_index: function () { 64 | LyUpload.files.index = []; 65 | for (var index in LyUpload.files.list) { 66 | if (LyUpload.files.list.hasOwnProperty(index) && LyUpload.files.list[index] !== null) { 67 | LyUpload.files.index.push(index); 68 | } 69 | } 70 | }, 71 | upload: function () { 72 | if (LyUpload.files.count === 0) { 73 | alert("请先选择文件来上传。或者当前文件已全部上传完成"); 74 | return; 75 | } 76 | LyUpload.index = LyUpload.files.index[LyUpload.upload_index]; 77 | if (LyUpload.files.list.hasOwnProperty(LyUpload.index)) { 78 | var xhr = new XMLHttpRequest(); 79 | xhr.upload.addEventListener("progress", this.progress, false); 80 | xhr.addEventListener("load", this.complete, false); 81 | xhr.addEventListener("error", this.failed, false); 82 | xhr.addEventListener("abort", this.canceled, false); 83 | xhr.open("POST", URL + "Api/upload_file", true); 84 | var fd = new FormData(); 85 | fd.append("Filedata", LyUpload.files.list[LyUpload.index]); 86 | fd.append("path", NOW_PATH); 87 | xhr.send(fd); 88 | } else { 89 | alert("上传出现异常,尝试刷新页面后重试"); 90 | } 91 | }, 92 | progress: function (evt) { 93 | if (evt.lengthComputable) { 94 | var percentComplete = Math.round(evt.loaded * 100 / evt.total) + '%'; 95 | $("tr#FileUploadQueue_" + LyUpload.index + " td.progress").html(percentComplete); 96 | } 97 | }, 98 | complete: function (evt) { 99 | var data = $.parseJSON(this.response); 100 | if (!data.status) { 101 | $("tr#FileUploadQueue_" + LyUpload.index + " td.size").html("出错:" + data['error'] + ""); 102 | } else { 103 | $("tr#FileUploadQueue_" + LyUpload.index + " td.progress").html("成功"); 104 | refresh_file(); 105 | } 106 | if (LyUpload.upload_index === LyUpload.files.index.length - 1) { 107 | LyUpload.files = {list: {}, count: 0, index: []}; 108 | LyUpload.upload_index = 0; 109 | LyUpload.index = '0'; 110 | return; 111 | } 112 | ++LyUpload.upload_index; 113 | //必须使用实例来上传下一个 114 | LyUpload.instance.upload(); 115 | }, 116 | failed: function (evt) { 117 | $("tr#FileUploadQueue_" + LyUpload.index + " td.progress").html("" + 118 | "出错:" + this.status + " - " + this.statusText + ""); 119 | }, 120 | canceled: function (evt) { 121 | $("tr#FileUploadQueue_" + LyUpload.index + " td.progress").html("" + 122 | "被取消:" + this.status + " - " + this.statusText + ""); 123 | }, 124 | min_box: function () { 125 | $("#Upload_Box").css("display", "none"); 126 | $("#Upload_Button").html('还原上传对话框'); 127 | }, 128 | clear: function () { 129 | $("table#Upload_Box_QueueID").html(""); 130 | LyUpload.files = {list: {}, count: 0, index: []}; 131 | LyUpload.upload_index = 0; 132 | LyUpload.index = '0'; 133 | } 134 | }; -------------------------------------------------------------------------------- /js/load.js: -------------------------------------------------------------------------------- 1 | /* 2 | LyFM 3 | Copyright (c) 2013 loveyu 4 | Released under the MIT License 5 | */ 6 | var fm = new LyFM("#file_list"); 7 | var edit = null; 8 | var upload = null; 9 | var run_code_box = null; 10 | $(document).ready(function () { 11 | if ("undefined" == typeof ROOT)return; 12 | load_FM_UI(); 13 | $(window).resize(load_FM_UI); 14 | $(window).resize(fm.fix_width); 15 | load_file_list(LyFM.get_path()); 16 | add_func_event(); 17 | check_update(); 18 | }); 19 | function check_update() { 20 | fm.check_update(); 21 | } 22 | function check_up_now() { 23 | fm.check_up_now(); 24 | } 25 | function edit_file(path, name) { 26 | if (edit == null)edit = new LyEdit(); 27 | edit.add(path, name); 28 | return false; 29 | } 30 | function file_upload() { 31 | if (upload == null) { 32 | upload = new LyUpload(); 33 | } 34 | upload.open_box(); 35 | } 36 | function email_more() { 37 | fm.email_more(); 38 | return false; 39 | } 40 | function run_code() { 41 | if (run_code_box == null) { 42 | run_code_box = new LyCode(); 43 | } 44 | run_code_box.open_box(); 45 | } 46 | function add_func_event() { 47 | $("#make_dir").submit(make_dir); 48 | $("#make_file").submit(make_file); 49 | } 50 | function char_set_change_more() { 51 | fm.char_set_change_more(); 52 | return false; 53 | } 54 | function make_dir() { 55 | fm.mkdir(NOW_PATH, $("#make_dir input[name=\"name\"]").val()); 56 | return false; 57 | } 58 | function make_file() { 59 | fm.mkfile(NOW_PATH, $("#make_file input[name=\"name\"]").val(), $("#make_file select[name=\"char_set\"]").val()); 60 | return false; 61 | } 62 | function refresh_file() { 63 | load_file_list(NOW_PATH); 64 | return false; 65 | } 66 | function web_download() { 67 | fm.show_web_download(); 68 | } 69 | function move_one(path, name, type) { 70 | if (type == 'file') { 71 | fm.show_move_file(path, name, "文件"); 72 | } else if (type == 'dir') { 73 | fm.show_move_file(path, name, "文件夹"); 74 | } else { 75 | alert("类型有误!"); 76 | } 77 | return false; 78 | } 79 | function choice_drive() { 80 | fm.show_choice_dirve(); 81 | return false; 82 | } 83 | function zip_one(path, name, type) { 84 | fm.show_zip_one(path, name, type); 85 | return false; 86 | } 87 | function zip_more() { 88 | fm.show_zip_more(); 89 | return false; 90 | } 91 | function unzip(path) { 92 | fm.show_unzip(path); 93 | return false; 94 | } 95 | function read_zip(path) { 96 | fm.show_read_zip(path); 97 | return false; 98 | } 99 | function change_perms(path, name, perms) { 100 | fm.show_change_perms(path, name, perms); 101 | return false; 102 | } 103 | function chmod_more() { 104 | fm.show_chmod_more(); 105 | return false; 106 | } 107 | function copy_one(path, name, type) { 108 | if (type == 'file') { 109 | fm.show_copy_file(path, name, "文件"); 110 | } else if (type == 'dir') { 111 | fm.show_copy_file(path, name, "文件夹"); 112 | } else { 113 | alert("类型有误!"); 114 | } 115 | return false; 116 | } 117 | function rename_one(path, name) { 118 | fm.show_rename_box(path, name); 119 | return false; 120 | } 121 | function delete_one(path, name, type) { 122 | fm.show_delete_box(path, name, type); 123 | return false; 124 | } 125 | function delete_more() { 126 | fm.show_delete_more_box(); 127 | return false; 128 | } 129 | function copy_more() { 130 | fm.show_copy_more_box(); 131 | return false; 132 | } 133 | function move_more() { 134 | fm.show_move_more_box(); 135 | return false; 136 | } 137 | function text_open_more() { 138 | $("#file_list .table input[type=\"checkbox\"].file_check_box").each(function (index, element) { 139 | if ($(element).attr("checked") == true || $(element).attr("checked") == "checked") { 140 | var name = $(element).val(); 141 | edit_file(NOW_PATH + "/" + name, name); 142 | } 143 | }); 144 | return false; 145 | } 146 | function load_file_list(path) { 147 | $("#file_list .path h3").html("Loading..."); 148 | fm.get_file_list(path); 149 | return false; 150 | } 151 | 152 | function order_change(){ 153 | _ORDER.by = $("#SelectOrder").val(); 154 | _ORDER.order = $("#SelectOrder2").val(); 155 | load_file_list(NOW_PATH); 156 | } 157 | 158 | function click_all_checkbox() { 159 | var n = 0; 160 | var size = $("#file_list .table input[type=\"checkbox\"]").size(); 161 | $("#file_list .table input[type=\"checkbox\"]").each(function (index, element) { 162 | if ($(element).attr("checked") == true || $(element).attr("checked") == "checked") { 163 | n++; 164 | } else { 165 | $(element).attr("checked", true); 166 | } 167 | }); 168 | if (n == size) { 169 | $("#file_list .table input[type=\"checkbox\"]").each(function (index, element) { 170 | $(element).removeAttr("checked"); 171 | }); 172 | } 173 | return false; 174 | } 175 | function click_all() { 176 | $("#file_list .table input[type=\"checkbox\"]").each(function (index, element) { 177 | $(element).attr("checked", true); 178 | }); 179 | return false; 180 | } 181 | function click_all_no() { 182 | $("#file_list .table input[type=\"checkbox\"]").each(function (index, element) { 183 | $(element).removeAttr("checked"); 184 | }); 185 | return false; 186 | } 187 | function click_all_file() { 188 | $("#file_list .table input[type=\"checkbox\"].file_check_box").each(function (index, element) { 189 | $(element).attr("checked", true); 190 | }); 191 | $("#file_list .table input[type=\"checkbox\"].dir_check_box").each(function (index, element) { 192 | $(element).removeAttr("checked"); 193 | }); 194 | return false; 195 | } 196 | function click_f() { 197 | $("#file_list .table input[type=\"checkbox\"]").each(function (index, element) { 198 | if ($(element).attr("checked") == true || $(element).attr("checked") == "checked") { 199 | $(element).removeAttr("checked"); 200 | } else { 201 | $(element).attr("checked", true); 202 | } 203 | }); 204 | return false; 205 | } 206 | function load_FM_UI() { 207 | var width = $("#warp").width(); 208 | $("#file_action").css("width", "300px"); 209 | $("#file_list").css("width", (width - 300) + "px"); 210 | var height = $(window).height(); 211 | var x_height = height - ($("#header").height()) - ($("#footer").height()) - ($("#function").height()); 212 | if (x_height < 400) { 213 | x_height = 400; 214 | } 215 | $("#file_action").height(x_height); 216 | $("#file_list").height(x_height); 217 | $("#file_action").css("overflow", "auto"); 218 | $("#file_list .table").height(x_height - ($("#file_list .path").height()) - ($("#file_list .table_head").height())); 219 | $("#file_list .table").css("overflow", "auto"); 220 | } -------------------------------------------------------------------------------- /license.txt: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | Copyright (c) 2013 Loveyu 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 4 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 5 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- /nginx.conf: -------------------------------------------------------------------------------- 1 | location /file/ { 2 | if (!-f $request_filename){ 3 | rewrite (.*) /file/index.php; 4 | } 5 | } 6 | location ~* ^/file/LySystem/.*{ 7 | rewrite (.*) /file/index.php; 8 | } -------------------------------------------------------------------------------- /swf/uploadify.swf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loveyu/LyFM/892f83a33a8dc54bcf669f4693c7b8b5b395c061/swf/uploadify.swf --------------------------------------------------------------------------------