4 * GForge Notepad Facility
6 * Copyright 2003 FUJITSU PRIME SOFTWARE TECHNOLOGIES LIMITED
7 * http://www.pst.fujitsu.com/
9 * This file is part of GForge.
11 * GForge is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License as published by
13 * the Free Software Foundation; either version 2 of the License, or
14 * (at your option) any later version.
16 * GForge is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU General Public License for more details.
21 * You should have received a copy of the GNU General Public License
22 * along with GForge; if not, write to the Free Software
23 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
26 * GForge Notepad Window
27 * By Hidenari Miwa, FUJITSU PRIME SOFTWARE TECHNOLOGIES LIMITED, 09/2003
29 require_once('env.inc.php');
30 require_once $gfwww.'include/pre.php';
33 * form: Input form name
34 * wrap: Wrap attribute
39 $form = getStringFromRequest('form');
40 $wrap = getStringFromRequest('wrap');
41 $rows = getIntFromRequest('rows');
42 $cols = getIntFromRequest('cols');
45 $wrap = htmlspecialchars("SOFT");
55 $pform = "opener.".$form;
61 <title>GForge Notepad</title>
62 <script language="JavaScript" type="text/javascript">
64 function load_initial_value() {
66 aform = <?php echo $pform ?>;
67 document.forms[0].details.value = aform.value;
73 function set_value() {
75 aform = eval("<?php echo $pform ?>");
76 aform.value = document.forms[0].details.value;
81 function set_and_close() {
89 <body onLoad="load_initial_value();" >
90 <form name="form1" action="">
91 <table width="100%" cellpadding="0" cellspacing="0" border="0">
93 <td><input type="button" name="ok" value="OK"
94 onClick="set_and_close()"/>
95 <input type="reset" value="Clear" />
96 <input type="button" value="Cancel"
97 onClick="window.close()" />
102 <textarea name="details" ROWS="<?php echo $rows ?>"
103 COLS="<?php echo $cols ?>"
104 WRAP="<?php echo $wrap ?>"></textarea>
108 <td><input type="button" name="ok" value="OK"
109 onClick="set_and_close()"/>
110 <input type="reset" value="Clear" />
111 <input type="button" value="Cancel"
112 onClick="window.close()" />
125 // c-file-style: "bsd"