1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124
|
<?php
/**
* GForge Notepad Facility
*
* Copyright 2003 FUJITSU PRIME SOFTWARE TECHNOLOGIES LIMITED
* http://www.pst.fujitsu.com/
*
* @version $Id: notepad.php 2404 2003-11-04 20:52:52Z lo-lan-do $
*
* This file is part of GForge.
*
* GForge is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* GForge is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with GForge; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
/**
* GForge Notepad Window
* By Hidenari Miwa, FUJITSU PRIME SOFTWARE TECHNOLOGIES LIMITED, 09/2003
*/
require_once('pre.php');
/*
* form: Input form name
* wrap: Wrap attribute
* rows: Rows
* cols: Colums
*/
if ($wrap == '') {
$wrap = "SOFT";
}
if ($rows == '') {
$rows = 30;
}
if ($cols == '') {
$cols = 75;
}
$pform = '';
if ($form != '') {
$pform = "opener.".$form;
}
?>
<html>
<head>
<title>GForge Notepad</title>
<script language="JavaScript" type="text/javascript">
<!--
function load_initial_value() {
try {
aform = <?php echo $pform ?>;
document.forms[0].details.value = aform.value;
} catch (e) {
}
}
function set_value() {
try {
aform = eval("<?php echo $pform ?>");
aform.value = document.forms[0].details.value;
} catch (e) {
}
}
function set_and_close() {
set_value();
window.close();
}
-->
</script>
</head>
<body onLoad="load_initial_value();" >
<form name="form1" action="">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><input type="button" name="ok" value="OK"
onClick="set_and_close()"/>
<input type="reset" value="Clear" />
<input type="button" value="Cancel"
onClick="window.close()" />
</td>
</tr>
<tr>
<td>
<textarea name="details" ROWS="<?php echo $rows ?>"
COLS="<?php echo $cols ?>"
WRAP="<?php echo $wrap ?>"></textarea>
</td>
</tr>
<tr>
<td><input type="button" name="ok" value="OK"
onClick="set_and_close()"/>
<input type="reset" value="Clear" />
<input type="button" value="Cancel"
onClick="window.close()" />
</td>
</tr>
</table>
</form>
</body>
</html>
<?php
// Local Variables:
// mode: php
// c-file-style: "bsd"
// End:
?>
|