Файл: EasyHost v2.0/system/htdocs/manager/files/wysiwyg/table.html
Строк: 161
<?php
<html>
<head>
<link rel="stylesheet" type="text/css" href="<{system.htdocs}>styles/<{system.color}>/default.css" />
<title>Insert Table</title>
<script language="JavaScript">
<!--
function attr( name, value ) {
if (!value || value == "") return "";
return ' ' + name + '="' + value + '"';
}
function insert() {
var nRows = document.getElementById( 'rows' ).value ? parseInt( document.getElementById( 'rows' ).value ) : 2;
var nCols = document.getElementById( 'columns' ).value ? parseInt( document.getElementById( 'columns' ).value ) : 2;
var strHTML = '<TABLE'
+ attr("border", document.getElementById( 'border_width' ).value)
+ attr("bordercolor", document.getElementById( 'border_color' ).value)
+ attr("bgcolor", document.getElementById( 'background_color' ).value)
+ attr("background", document.getElementById( 'background_image' ).options[ document.getElementById( 'background_image' ).selectedIndex ].value)
+ attr("cellspacing", document.getElementById( 'spacing' ).value)
+ attr("cellpadding", document.getElementById( 'padding' ).value)
+ '>';
for (var i = 0; i < nRows; i++) {
strHTML += '<TR>';
for (var j = 0; j < nCols; j++) {
strHTML += '<TD></TD>';
}
strHTML += '</TR>';
}
strHTML += '</TABLE>';
insertHTML( strHTML );
window.close();
}
function cancel() {
window.close();
}
function insertHTML( html )
{
rte = window.opener.document.getElementById( 'page' ).contentWindow;
rte.focus();
if ( document.all )
{
var range = rte.document.selection.createRange();
range.pasteHTML( html );
}
else
{
rte.document.execCommand( 'insertHTML', false, html );
}
}
//-->
</script>
</head>
<body marginwidth="0" marginheight="0" topmargin="0" leftmargin="0" rightmargin="0" bottommargin="0" bgcolor="<{system.color('left_bg')}>">
<table botder="0" cellspacing="10" cellpadding="0" width="100%"><tr><td>
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr>
<td bgcolor="<{system.color('border')}>">
<table border="0" cellspacing="1" cellpadding="0" width="100%">
<tr>
<td bgcolor="<{system.color('content_bg')}>">
<table border="0" cellspacing="10" cellpadding="0">
<tr>
<td><b>Layout</b></td>
</tr>
</table>
<table border="0" cellspacing="10" cellpadding="0">
<tr>
<td width="80">Rows:</td>
<td><input type="text" name="rows" id="rows" value="2" size="3" /></td>
<td width="80">Cell padding:</td>
<td><input type="text" name="padding" id="padding" value="2" size="3" /></td>
</tr>
<tr>
<td width="80">Columns:</td>
<td><input type="text" name="columns" id="columns" value="2" size="3" /></td>
<td width="80">Cell spacing:</td>
<td><input type="text" name="spacing" id="spacing" value="2" size="3" /></td>
</tr>
<tr>
<td width="80">Row height:</td>
<td><input type="text" name="height" id="height" value="20" size="3" /></td>
</tr>
<tr>
<td width="80">Column width:</td>
<td><input type="text" name="width" id="width" value="50" size="3" /></td>
</tr>
</table>
</td>
</tr>
<tr>
<td bgcolor="<{system.color('content_bg')}>">
<table border="0" cellspacing="10" cellpadding="0">
<tr>
<td><b>Border</b></td>
</tr>
</table>
<table border="0" cellspacing="10" cellpadding="0">
<tr>
<td width="80">Width:</td>
<td><input type="text" name="border_width" id="border_width" value="1" size="3" /></td>
<td width="80">Color:</td>
<td><input type="text" name="border_color" id="border_color" size="6" /></td>
</tr>
</table>
</td>
</tr>
<tr>
<td bgcolor="<{system.color('content_bg')}>">
<table border="0" cellspacing="10" cellpadding="0" width="100%">
<tr>
<td><b>Background</b></td>
</tr>
</table>
<table border="0" cellspacing="10" cellpadding="0">
<tr>
<td width="80">Color:</td>
<td><input type="text" name="background_color" id="background_color" size="6" /></td>
</tr>
<tr>
<td width="80">Image:</td>
<td>
<select name="background_image" id="background_image">
<option value=""> - Select One - </option>
<%images%>
<option value="<{image.url}>"><{image.path}></option>
<%end%>
</select>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
<table border="0" cellspacing="0" cellpadding="3" width="100%" bgcolor="<{system.color('highlight_bg')}>">
<tr>
<td class="buttons">
<input type="button" value="Insert" onclick="insert()" />
<input type="button" value="Cancel" onclick="cancel()" />
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td></tr></table>
</body>
</html>
?>