cvs: presentations / phpclub.xml /slides/intro input_filter2.xml
| From: | Rasmus Lerdorf | Date: | Fri, 26 May 2006 11:32:23 +0000 |
| Subject: | cvs: presentations / phpclub.xml /slides/intro input_filter2.xml | ||
| Groups: | php.pres | ||
| Request: | Send a blank email to pres+get-1317@lists.php.net to get a copy of this message | ||
rasmus Fri May 26 11:32:23 2006 UTC
Added files:
/presentations phpclub.xml
Modified files:
/presentations/slides/intro input_filter2.xml
Log:
Moscow talk
http://cvs.php.net/viewcvs.cgi/presentations/slides/intro/input_filter2.xml?r1=1.5&r2=1.6&diff_format=u
Index: presentations/slides/intro/input_filter2.xml
diff -u presentations/slides/intro/input_filter2.xml:1.5
presentations/slides/intro/input_filter2.xml:1.6
--- presentations/slides/intro/input_filter2.xml:1.5 Fri Jan 27 01:27:19 2006
+++ presentations/slides/intro/input_filter2.xml Fri May 26 11:32:23 2006
@@ -19,33 +19,22 @@
function test($data) {
return strtoupper($data);
}
-$data1 = "PHP";
-$data2 = "123";
-$data3 = "123abc<>()";
-$data4 = "O'Henry";
-$data5 = "íí¼";
+$data =
array("PHP","123","123abc<>()","O'Henry",
"íí¼");
+
echo "<tr><th>
</th><td>PHP</td><td>123</td><td>123abc<>()</td>";
echo "<td>O'Henry</td><td>íí¼</td></tr>\n";
foreach(input_filters_list() as $filter) {
if($filter=="validate_regexp") {
- $result1 =
filter_data($data1,input_name_to_filter($filter),array("regexp"=>'/^O.*/'));
- $result2 =
filter_data($data2,input_name_to_filter($filter),array("regexp"=>'/^O.*/'));
- $result3 =
filter_data($data3,input_name_to_filter($filter),array("regexp"=>'/^O.*/'));
- $result4 =
filter_data($data4,input_name_to_filter($filter),array("regexp"=>'/^O.*/'));
- $result5 =
filter_data($data5,input_name_to_filter($filter),array("regexp"=>'/^O.*/'));
+ foreach($data as $k=>$v)
+ $result[$k] =
filter_data($v,input_name_to_filter($filter),array("regexp"=>'/^O.*/'));
} else {
- $result1 = filter_data($data1,input_name_to_filter($filter),"test");
- $result2 = filter_data($data2,input_name_to_filter($filter),"test");
- $result3 = filter_data($data3,input_name_to_filter($filter),"test");
- $result4 = filter_data($data4,input_name_to_filter($filter),"test");
- $result5 = filter_data($data5,input_name_to_filter($filter),"test");
+ foreach($data as $k=>$v)
+ $result[$k] = filter_data($v,input_name_to_filter($filter),"test");
}
echo "<tr><th align='left'>$filter</th>";
- echo "<td>".htmlspecialchars($result1)."</td>";
- echo "<td>".htmlspecialchars($result2)."</td>";
- echo "<td>".htmlspecialchars($result3)."</td>";
- echo "<td>".htmlspecialchars($result4)."</td>";
- echo "<td>".htmlspecialchars($result5)."</td></tr>\n";
+ foreach($result as $v)
+ echo "<td>".htmlspecialchars($v)."</td>";
+ echo "</td></tr>\n";
}
?>
</table>]]></example>
http://cvs.php.net/viewcvs.cgi/presentations/phpclub.xml?view=markup&rev=1.1
Index: presentations/phpclub.xml
+++ presentations/phpclub.xml
<presentation
template="php2"
navmode="html"
titlecolor="#1111aa"
navbarbackground="url(images/trans-ffffff.png)"
logo1="images/php-med-trans-light.gif"
titlesize="2em"
navbarheight="4.1em"
>
<topic>PHP</topic>
<title>Getting Rich with PHP</title>
<event>phpconf5</event>
<location>Moscow</location>
<date>May 26, 2006</date>
<speaker>Rasmus Lerdorf</speaker>
<email>rasmus@php.net</email>
<url>http://talks.php.net/show/phpclub</url>
<slide>slides/intro/titlepage.xml</slide>
<slide>slides/intro/rich.xml</slide>
<slide>slides/intro/rich2.xml</slide>
<slide>slides/bm06/profit.xml</slide>
<slide>slides/bm06/initial.xml</slide>
<slide>slides/bm06/pg.xml</slide>
<slide>slides/bm06/pg_persist.xml</slide>
<slide>slides/bm06/mysql.xml</slide>
<slide>slides/bm06/apc.xml</slide>
<slide>slides/bm06/apc2.xml</slide>
<slide>slides/intro/xss.xml</slide>
<slide>slides/intro/xss1.xml</slide>
<slide>slides/intro/xss2.xml</slide>
<slide>slides/intro/xss_common.xml</slide>
<slide>slides/intro/xss_charset.xml</slide>
<slide>slides/intro/xss_risks.xml</slide>
<slide>slides/intro/php5.xml</slide>
<slide>slides/intro/input_filter2.xml</slide>
<slide>slides/intro/xml_eg.xml</slide>
<slide>slides/intro/rss_flickr.xml</slide>
<slide>slides/intro/atom_google.xml</slide>
<slide>slides/intro/ws1.xml</slide>
<slide>slides/intro/ws2.xml</slide>
<slide>slides/intro/ws3.xml</slide>
<slide>slides/intro/ws6.xml</slide>
<slide>slides/intro/ws7.xml</slide>
<slide>slides/intro/ws8.xml</slide>
<slide>slides/intro/ws9.xml</slide>
<slide>slides/intro/yajax.xml</slide>
<slide>slides/intro/yajax_apc.xml</slide>
<slide>slides/intro/yui.xml</slide>
<slide>slides/intro/web2_ref.xml</slide>
</presentation>