[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpcompta-dev] r4078 - phpcompta/trunk/include
From: |
phpcompta-dev |
Subject: |
[Phpcompta-dev] r4078 - phpcompta/trunk/include |
Date: |
Fri, 6 May 2011 20:34:31 +0200 (CEST) |
Author: danydb
Date: 2011-05-06 20:34:30 +0200 (Fri, 06 May 2011)
New Revision: 4078
Modified:
phpcompta/trunk/include/class_html_input.php
Log:
Add the function
request_to_string
get_to_string
post_to_string
Modified: phpcompta/trunk/include/class_html_input.php
===================================================================
--- phpcompta/trunk/include/class_html_input.php 2011-05-06 18:33:31 UTC
(rev 4077)
+++ phpcompta/trunk/include/class_html_input.php 2011-05-06 18:34:30 UTC
(rev 4078)
@@ -522,6 +522,64 @@
}
/**
+ *transform request data to string
+ address@hidden $array is an of indices
+ address@hidden $request name of the superglobal $_POST $_GET
$_REQUEST(default)
+ address@hidden html string with the string data
+ */
+ static function array_to_string($array,$global_array )
+ {
+
+ $r="?";
+
+ if ( count($global_array )==0) return '';
+ $and="";
+ foreach ($array as $a)
+ {
+ if (isset($global_array [$a]))
+ $r.=$and."&$a=".$global_array [$a];
+ $and="";
+ }
+
+ return $r;
+ }
+ /**
+ *transform $_GET data to string
+ address@hidden $array is an of indices
+ address@hidden HtmlInput::request_to_string
+ address@hidden html string with the string data
+ */
+ static function get_to_string($array)
+ {
+ $r=self::array_to_string($array,$_GET );
+ return $r;
+ }
+
+ /**
+ *transform $_POST data to string
+ address@hidden $array is an of indices
+ address@hidden HtmlInput::request_to_string
+ address@hidden html string with the string data
+ */
+ static function post_to_string($array)
+ {
+ $r=self::array_to_string($array,$_POST );
+ return $r;
+ }
+
+ /**
+ *transform $_REQUEST data to string
+ address@hidden $array is an of indices
+ address@hidden HtmlInput::request_to_string
+ address@hidden html string with the string data
+ */
+ static function request_to_string($array)
+ {
+ $r=self::array_to_string($array,$_REQUEST );
+ return $r;
+ }
+
+ /**
* generate an unique id for a widget,
address@hidden $p_prefix prefix
address@hidden HtmlInput::IDate
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpcompta-dev] r4078 - phpcompta/trunk/include,
phpcompta-dev <=