[TEP-COMMIT] [CVS admin] new textarea function which takes care of slashes and globals
hpdl-OfajU3CKLf1/[email protected] 15 Aug 2004 18:12:18 -0000
| Newsgroups | gmane.comp.web.oscommerce.cvs |
|---|---|
| Message-ID | <[email protected]> |
Commit in admin/admin/includes/functions on MAIN
html_output.php +28 1.32 -> 1.33
new textarea function which takes care of slashes and globals
----------
admin /admin /includes /functions
html_output.php 1.32 -> 1.33
diff -u -r1.32 -r1.33
--- html_output.php 2004/08/03 11:00:28 1.32
+++ html_output.php 2004/08/15 18:12:17 1.33
@@ -278,6 +278,34 @@
return $field;
}
+ function osc_draw_textarea_field($name, $value = '', $width = '60', $height = '5', $wrap = 'soft', $parameters = '', $reinsert_value = true, $required = false) {
+ if (PHP_VERSION < 4.1) {
+ global $_GET, $_POST;
+ }
+
+ if ($reinsert_value === true) {
+ if (isset($_GET[$name])) {
+ $value = $_GET[$name];
+ } elseif (isset($_POST[$name])) {
+ $value = $_POST[$name];
+ }
+ }
+
+ $field = '<textarea name="' . tep_output_string($name) . '" wrap="' . tep_output_string($wrap) . '" cols="' . tep_output_string($width) . '" rows="' . tep_output_string($height) . '"';
+
+ if (!empty($parameters)) {
+ $field .= ' ' . $parameters;
+ }
+
+ $field .= '>' . $value . '</textarea>';
+
+ if ($required === true) {
+ $field .= ' <span class="inputRequirement">*</span>';
+ }
+
+ return $field;
+ }
+
////
// Output a form hidden field
function tep_draw_hidden_field($name, $value = '', $parameters = '') {
CVSspam 0.2.9
-------------------------------------------------------
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285