| Current File : //var/wcp4/mycath2o/public_html/file/private/templates.old/file_editor.html |
<html>
<head>
<title>FileMan</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" href="<%html_url%>/<%scheme%>.css">
<script>
function detach () {
var myrand = Math.random();
var url = '<%http_ref%>';
document.frm_main.switch_html.value = 1;
window.location = 'url';
void (0);
}
function switch_wrap() {
if (document.frm_main.content.wrap == 'off') {
document.frm_main.content.wrap = 'soft';
document.frm_main.bswitch.value = 'Wrap off';
}
else {
document.frm_main.content.wrap = 'off';
document.frm_main.bswitch.value = 'Wrap on';
}
}
function gotoLine() {
var obj = document.frm_main.content;
var line = document.frm_main.line.value;
if (obj.innerText) {
var items = obj.innerText.split("\n");
if ( ( isNaN(line) )|| ( line > items.length ) || ( line <=0 ) || !line) {
alert('Please enter a number between 1 to ' + items.length);
return;
}
var lineContent = items[line-1];
var rangContent = '';
for (var i=0; i<line; i++) rangContent += items[i];
var items = rangContent.split(lineContent);
var numTimes = (items.length > 1) ? ( items.length-1 ) : 1;
var txtRange = obj.createTextRange();
var found = txtRange.findText(rangContent);
if (found) {
var tmp = 0;
while (txtRange.findText(lineContent)) {
tmp++;
if ( tmp == numTimes ) {
txtRange.select();
break;
}
txtRange.moveStart("character",1);
}
txtRange.scrollIntoView();
}
}
else alert('The content is empty!')
}
</script>
<script language="JavaScript1.2">
function hidestatus(){
window.status='WCP4 : File Manager'
return true
}
// Hide Status Bar
if (document.layers)
document.captureEvents(Event.MOUSEOVER | Event.MOUSEOUT)
document.onmouseover=hidestatus
document.onmouseout=hidestatus
</script>
</head>
<body class="bg_main" leftmargin=5 topmargin=5 onload="top.js_status(<%if filename%>'<%status%>'<%else%>'Editor text file...'<%endif%>)">
<form name=frm_main action='<%http_ref%>' method=post>
<table width="<%if use_html%>100%<%else%>700<%endif%>" <%if use_html%>height=100%<%endif%> border="1" cellspacing="0" cellpadding="0" align="center" class="bg_window">
<tr>
<td valign=top>
<table width="100%" align=center border="0" cellspacing="0" cellpadding="0" bgcolor="#000066" height=3%>
<tr>
<td class="header_format" height=20 width=60%> <Font color=white><b>File Editor: <%if filename%><%filename%><%endif%></b></font></td>
<td class="header_format" height=20 width=40% align=right><a href="<%http_ref%>?fdo=cmd_main_display&work_path=<%work_path%>&<%url_opts%>"><img src="<%html_url%>/icons/close.gif" border=0></a></td>
</tr>
</table>
<table width="99%" align=center border="0" cellspacing="1" cellpadding="1" height=97%>
<tr height=7%>
<td>
<table width='100%' border="0" cellspacing="1" cellpadding="1">
<%if old%>
<tr>
<td ><%font%>
<%if writeable%><input type="submit" name="save" value=" Save " class='submit'><%else%>(Not Writeable)<%endif%> -
<input type="submit" name="saveas" value="Save as ..." class='submit'>
<input type="text" name="filenew" size=30 value='<%if filenew%><%filenew%><%endif%>' class='button'>
<input type="hidden" name="filename" value='<%if filename%><%filename%><%endif%>'></font>
</td>
<%else%>
<tr >
<td width=10%><%font%> File name </font></td>
<td >
<input type="text" name="filenew" size=40 value='<%if filename%><%filename%><%endif%>' class='button'>
<input type="submit" name="saveas" value="Save document" class='submit'>
</td>
<%endif%>
<script>
var ver = window.navigator.appVersion;
if (ver.search('MSIE 5.5') > 0 || ver.search('MSIE 6') > 0) {
document.write('<td width=20% align=right><input class="submit" type=submit name="switch_edit" value="<%if use_html%>Switch to Text<%else%>Switch to HTML<%endif%>"></td>');
}
</script>
</tr>
</table>
</td>
</tr>
<%if msg%>
<tr height=2%>
<td><%font%><font color=red><b><%msg%></b></font></font></td>
</tr>
<%endif%>
<%if use_html%>
<tr>
<td align=center><%include file_html_editor.html%>
<BR>
</td>
</tr>
<%else%>
<input type="hidden" name="use_html" value="0">
<tr>
<td align="center">
<textarea name="content" cols="<%if cols%><%cols%><%else%>100<%endif%>" rows="<%if rows%><%rows%><%else%>20<%endif%>" wrap='off'><%if content%><%content%><%endif%>
</textarea>
</td>
</tr>
<tr>
<td>
<table border="0" cellspacing="1" cellpadding="1" width=100%>
<tr>
<td><%font%>
<input name=bswitch value='Wrap on' class='submit' type=button onclick='javascript:switch_wrap()'>
<input type="submit" name="resize" value="Resize" class='submit'>
<input name=rows class='button' value='<%if rows%><%rows%><%else%>20<%endif%>' size=3 maxlength=3> rows
<input name=cols class='button' value='<%if cols%><%cols%><%else%>100<%endif%>' size=3 maxlength=3> cols</font>
</td>
<script>
var ie = (document.all)? true : false;
if (ie) {
document.write("<td align=right><%font%>Line:<input name='line' size=3 maxlength=4 class='button'><input name=goto value=' Go ' type=button onclick='gotoLine()' class=submit></font></td>")
}
</script>
</tr>
</table>
</td>
</tr>
<%endif%>
</table>
</td>
</tr>
</table>
<input type=hidden name='fileold' value='<%if old%><%old%><%endif%>'>
<input type=hidden name='work_path' value='<%work_path%>'>
<input type=hidden name='cmd_do' value='cmd_editor'>
<input type=hidden name="page" VALUE="">
<input type=hidden name="txt_input" VALUE="">
<input type=hidden name="status" value="<%if status%><%status%><%endif%>">
<input type=hidden name='writeable' value='<%if writeable%><%writeable%><%endif%>'>
<input type=hidden name=do value="fileman">
<!--Search options-->
<input type=hidden name="c_regex" VALUE="">
<input type=hidden name="c_case" VALUE="">
<input type=hidden name="c_word" VALUE="">
<input type=hidden name="c_content" VALUE="">
<input type=hidden name="c_bak" VALUE="">
<input type=hidden name="scope" VALUE="">
<input type=hidden name="txt_with" VALUE="">
<%ifnot user_sessions%>
<!--multi users-->
<input type=hidden name="session_id" value="<%session_id%>">
<%endif%>
<%if root_selected%>
<input type=hidden name='root_selected' value="<%root_selected%>">
<%endif%>
</form>
</body>
</html>