Location: PHPKode > projects > Netautor Professional > netautor/napro4/appl/na_professional/editor_simple.php
<?php
/* +----------------------------------------------------------------------+
   | Netautor Professional Application Server                             |
   +----------------------------------------------------------------------+
   | Copyright (C) 1998-2005 digiconcept GmbH. <www.digiconcept.net>      |
   +----------------------------------------------------------------------+
   | This file is subject to license, that is bundled with this package   |
   | in the file LICENSE.TXT, and is available at through the             |
   | world-wide-web at http://www.netautor.com/license/                   |
   |                                                                      |
   | If you did not receive a copy of the license and are unable to       |
   | obtain it through the world-wide-web, please send a note to          |
   | hide@address.com so we can mail you a copy.                      |
   +----------------------------------------------------------------------+
   | Authors: Stefan Rottensteiner <hide@address.com>    |
   |          Marek  Kadziela      <hide@address.com>	      |
   |          Gregor Wollner                                              |
   |          Christian Unger                                             |
   |          Helli  Kleinhans  									      |
   +----------------------------------------------------------------------+
   + @version $Revision: 1.6 $										+
   +----------------------------------------------------------------------+*/

if (file_exists('../../include/init.inc')) include_once('../../include/init.inc');

$ed_conf['style'		]='../../include/netautor.css';
$ed_conf['editorsave'	]= 'Save';
$ed_conf['editorbreak'	]= 'Close window';
$ed_conf['logo'			]='<img src="../../grafik/na_logo.gif" border="0" title="Netautor Professional" alt="NEtautor Professional">';

if(!empty($editor_config) && file_exists($editor_config )) include($editor_config);

$form	= (empty($form)		? 0 : "'{$form}'");
$element= (empty($element)	? 0 : "'{$element}'");

if (empty($font_size)) $font_size =12;
if (empty($font_name)) $font_name ='arial';

$rows	= intval( ( empty($rows)?31:$rows));
$cols	= intval( ( empty($cols)?75:$cols));
$class	= (empty($class)?'fixklein':$class);
$style	= (empty($style)?$ed_conf['style'] : $style);

?><html>
<head>
	<title>digiconcept/netautor/Editor - TextArea</title>
	<meta http-equiv="pragma" 				content="no-cache">
	<meta http-equiv="cache-control"	 	content="no-cache">
	<meta http-equiv="Content-Style-Type" 	content="text/css">
	<meta name	="robots" 					content="noindex">		
</head>

<script language="JavaScript" type="text/javascript">
	var	theTextElement = null;

	function setTextElement(theTextObject){
		theTextElement = theTextObject;
	}

	function customizeApplet(){

		text = '';
		if (window.opener) text = window.opener.document.forms[<?php echo($form);?>].elements[<?php echo($element);?>].value;
		document.forms[0].elements['edit_area'].value= (text.length>0? text : ' ');
    };

	function prepareHtmlText(){
		text = '';
		if (window.opener) text = window.opener.document.forms[<?php echo($form);?>].elements[<?php echo($element);?>].value;
		return text;
	}

	function exportTextAndClose(){
		SetFormText();
		window.parent.close();
	}

    function SetFormText(){
		if (window.opener)
		{
			window.opener.document.forms[<?php echo($form);?>].elements[<?php echo($element);?>].value = document.forms[0].elements['edit_area'].value;
		}
    };

/* Reaction :Button OK */
	function clickButtonOk(){
		exportTextAndClose();
	}

/* Reaction : Button CANCEL */
	function clickButtonCancel(){
		window.close();
	}

</script>
<link href="<?php echo($ed_conf['style'])?>" rel="stylesheet" type="text/css" src="<?php echo($ed_conf['style'])?>">

<body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0"  onLoad="customizeApplet();if (window.focus) {window.focus();}">
<FORM	name="editorform" >
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr class="bgeditorhead">
	<td align="left" valign="center"  height="37">
		<?php echo($ed_conf['logo']); ?>
	</td>
	<td align="right" 	valign="center" class="bgeditorhead">
		<input type="button" onClick="clickButtonOk();" value="<?php echo($ed_conf['editorsave']); ?>" class="editorsave">
		<img src="../../grafik/pixel.gif" width="4" height="19">
		<input type="button" onClick="clickButtonCancel();"	 value="<?php echo($ed_conf['editorbreak']); ?>" class="editorbreak">
		<img src="../../grafik/pixel.gif" width="8" height="19">
		<br>
	</td>
</tr>
</table>
<textarea 	cols	="<?php echo($cols);?>"
			rows	="<?php echo($rows);?>" 
			name	="edit_area" 
			wrap	="virtual" 
			class	="<?php echo($class);?>"
			style	="width:100%; height:100%; line-height:15px; background-attachment:scroll; background-image:url(../../grafik/bg_textarea_layoutmgr.gif); "
			></textarea>
</FORM>
</body>
</html>
Return current item: Netautor Professional