2018-07-13 18:39:55 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Copyright (c) Codiad & Kent Safranski (codiad.com), distributed
|
|
|
|
* as-is and without warranty under the MIT License. See
|
|
|
|
* [root]/license.txt for more. This information must remain intact.
|
|
|
|
*/
|
|
|
|
|
|
|
|
require_once('../../common.php');
|
|
|
|
|
|
|
|
//////////////////////////////////////////////////////////////////
|
|
|
|
// Verify Session or Key
|
|
|
|
//////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
checkSession();
|
|
|
|
|
|
|
|
?>
|
|
|
|
<form onsubmit="return false;">
|
2019-01-20 01:02:11 +01:00
|
|
|
<?php
|
|
|
|
switch( $_GET['action'] ) {
|
|
|
|
|
2019-10-18 21:58:01 +02:00
|
|
|
case 'line':
|
|
|
|
|
|
|
|
?>
|
|
|
|
<label><?php i18n("Goto Line:"); ?></label>
|
2019-10-19 22:32:23 +02:00
|
|
|
<input name="goto_line" type="number" autofocus="autofocus" autocomplete="off">
|
2019-10-18 21:58:01 +02:00
|
|
|
<button class="btn-left" onclick="codiad.editor.goto_line();return false;"><?php i18n("Goto"); ?></button>
|
|
|
|
<button class="btn-right" onclick="codiad.modal.unload(); return false;"><?php i18n("Cancel"); ?></button>
|
|
|
|
<?php
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
|
2019-01-20 01:02:11 +01:00
|
|
|
case 'search':
|
|
|
|
|
|
|
|
//////////////////////////////////////////////////////////////////
|
|
|
|
// Find & Replace
|
|
|
|
//////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
|
|
|
|
$type = $_GET['type'];
|
|
|
|
?>
|
|
|
|
<label><?php i18n("Find:"); ?></label>
|
|
|
|
<input name="find" autofocus="autofocus" autocomplete="off">
|
|
|
|
<textarea style="display: none;" name="find" autofocus="autofocus" autocomplete="off"></textarea>
|
|
|
|
<?php
|
|
|
|
if( $type == 'replace' ) {
|
|
|
|
|
|
|
|
?>
|
|
|
|
<label><?php i18n("Replace:");?></label>
|
|
|
|
<input name="replace">
|
|
|
|
<textarea style="display: none;" name="replace"></textarea>
|
|
|
|
<?php
|
|
|
|
}
|
|
|
|
?>
|
|
|
|
<button class="btn-left" onclick="codiad.editor.search('find');return false;"><?php i18n("Find"); ?></button>
|
|
|
|
<button class="btn-mid" onclick="codiad.editor.toggleMultiLine( this );return false;"><?php i18n("Multi Line"); ?></button>
|
|
|
|
<?php
|
|
|
|
if( $type == 'replace' ) {
|
|
|
|
|
|
|
|
?>
|
|
|
|
<button class="btn-mid" onclick="codiad.editor.search('replace');return false;"><?php i18n("Replace"); ?></button>
|
|
|
|
<button class="btn-mid" onclick="codiad.editor.search('replaceAll');return false;"><?php i18n("Replace ALL"); ?></button>
|
|
|
|
<?php
|
|
|
|
}
|
|
|
|
?>
|
|
|
|
<button class="btn-right" onclick="codiad.modal.unload(); return false;"><?php i18n("Cancel"); ?></button>
|
|
|
|
<?php
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 'sort':
|
|
|
|
|
|
|
|
?>
|
|
|
|
<label><?php i18n("Sort:"); ?></label>
|
|
|
|
<textarea style="" name="sort" autofocus="autofocus" autocomplete="off"></textarea>
|
|
|
|
<div>
|
|
|
|
<label><input name="case_sensitive" style="display:inline-block;vertical-align: bottom;" type="checkbox"> Case Sensitive</label>
|
|
|
|
</div>
|
|
|
|
<div style="display: none;" >
|
|
|
|
<label>Delimiter:</label>
|
|
|
|
<input type="text" name="delimiter" value="">
|
|
|
|
</div>
|
|
|
|
<button class="btn-left" onclick="codiad.editor.sort( '<?php echo addcslashes( PHP_EOL, PHP_EOL );?>' );return false;"><?php i18n("Sort"); ?></button>
|
|
|
|
<button class="btn-right" onclick="codiad.modal.unload();return false;"><?php i18n("Cancel"); ?></button>
|
|
|
|
<?php
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
?>
|
2018-07-13 18:39:55 +02:00
|
|
|
</form>
|