cvs: presentations /slides/intro apache_hooks.xml image_text_ex3.php img_resize.php mysql_udf.xml serverside.png slashdot.rdf /slides/top7
funcdisp.php

From: Date: Thu, 21 Nov 2002 02:06:27 +0000
Subject: cvs: presentations /slides/intro apache_hooks.xml image_text_ex3.php img_resize.php mysql_udf.xml serverside.png slashdot.rdf /slides/top7
funcdisp.php
Groups: php.pres 
Request: Send a blank email to pres+get-542@lists.php.net to get a copy of this message
rasmus Wed Nov 20 21:06:27 2002 EDT Added files: /presentations/slides/intro apache_hooks.xml mysql_udf.xml Modified files: /presentations/slides/intro image_text_ex3.php img_resize.php serverside.png slashdot.rdf /presentations/slides/top7 funcdisp.php Log: Some new slides Index: presentations/slides/intro/image_text_ex3.php diff -u presentations/slides/intro/image_text_ex3.php:1.3 presentations/slides/intro/image_text_ex3.php:1.4 --- presentations/slides/intro/image_text_ex3.php:1.3 Mon Jul 1 18:23:44 2002 +++ presentations/slides/intro/image_text_ex3.php Wed Nov 20 21:06:26 2002 @@ -3,7 +3,7 @@ ImageAlphaBlending($im,$blend); ImageFilledRectangle($im,0,0,719,179,0x00ffffff); ImageTTFText($im,80,0,10,135,0x00000000, - "/usr/share/fonts/truetype/HEATHER_.TTF","ABCdef123"); + "Garabd","ABCdef123"); Header('Content-Type: image/png'); ImagePNG($im); ?> Index: presentations/slides/intro/img_resize.php diff -u presentations/slides/intro/img_resize.php:1.3 presentations/slides/intro/img_resize.php:1.4 --- presentations/slides/intro/img_resize.php:1.3 Mon Jul 22 11:26:28 2002 +++ presentations/slides/intro/img_resize.php Wed Nov 20 21:06:26 2002 @@ -12,16 +12,15 @@ $sizing = "Original image size $img_width x $img_height\r\n"; $sizing .= " New image size $width x $height"; $im = ImageCreateTrueColor($width,$height); -ImageAlphaBlending($im,false); ImageCopyResampled($im,$bg,0,0,0,0,$width,$height,$img_width,$img_height); $white = ImageColorAllocate($im,255,255,255); -ImageTTFText($im,15,0,20,20,$white,'couri',$sizing); -ImageDestroy($bg); +$black = ImageColorAllocate($im,0,0,0); $col = ImageColorResolveAlpha($im,10,10,10,50); -ImageAlphaBlending($im,true); +ImageFilledRectangle($im,10,5,470,90,0x30ffffff); +ImageTTFText($im,25,0,20,40,$black,'timesi',$sizing); +ImageDestroy($bg); $box = ($width-$txt_w)/2; ImageFilledRectangle($im,$box-10,$height-$txt_h-30,$width-$box,$height-5,$col); -ImageAlphaBlending($im,false); $yellow = ImageColorAllocate($im,255,255,10); ImageTTFText($im,25,0,$box,$height-$txt_h-5,$yellow,'timesi',$txt); ImagePNG($im); Index: presentations/slides/intro/serverside.png Index: presentations/slides/intro/slashdot.rdf diff -u presentations/slides/intro/slashdot.rdf:1.3 presentations/slides/intro/slashdot.rdf:1.4 --- presentations/slides/intro/slashdot.rdf:1.3 Sat Nov 2 13:45:18 2002 +++ presentations/slides/intro/slashdot.rdf Wed Nov 20 21:06:26 2002 @@ -17,53 +17,53 @@ </image> <item> -<title>Knoppix for Rapid Desktop Deployment</title> -<link>http://slashdot.org/article.pl?sid=02/11/02/1729247</link> +<title>Drug Making Genes Added To Corn Jump To Soya</title> +<link>http://slashdot.org/article.pl?sid=02/11/18/1236258</link> </item> <item> -<title>ISP Sued Over Suspended Email Account</title> -<link>http://slashdot.org/article.pl?sid=02/11/02/167234</link> +<title>Dell Handhelds Released</title> +<link>http://slashdot.org/article.pl?sid=02/11/18/1231229</link> </item> <item> -<title>Hacking Crime Victims to Remain Secret</title> -<link>http://slashdot.org/article.pl?sid=02/11/02/1513222</link> +<title>Lotus Nanotech</title> +<link>http://slashdot.org/article.pl?sid=02/11/18/024243</link> </item> <item> -<title>Cassini's First Glimpse of Saturn</title> -<link>http://slashdot.org/article.pl?sid=02/11/02/0622251</link> +<title>Grand Tour: the Story of a Penguin and a Red Fedora</title> +<link>http://slashdot.org/article.pl?sid=02/11/18/0014255</link> </item> <item> -<title>Making A Videowall</title> -<link>http://slashdot.org/article.pl?sid=02/11/01/2324207</link> +<title>Mesa 5.0 Released</title> +<link>http://slashdot.org/article.pl?sid=02/11/18/022208</link> </item> <item> -<title>Distributed TiVo Code Cracking</title> -<link>http://slashdot.org/article.pl?sid=02/11/01/2329254</link> +<title>Add-Ons Add Up</title> +<link>http://slashdot.org/article.pl?sid=02/11/17/2350251</link> </item> <item> -<title>China Concerned About Internal Copyright Infringers</title> -<link>http://slashdot.org/article.pl?sid=02/11/01/1815241</link> +<title>Bobby Fischer FBI Files Released Under FOIA</title> +<link>http://slashdot.org/article.pl?sid=02/11/18/0152244</link> </item> <item> -<title>Boston TV Signals Disrupting Police Radio in NJ</title> -<link>http://slashdot.org/article.pl?sid=02/11/01/2325211</link> +<title>Justifying the Common Criteria Security Evaluation</title> +<link>http://slashdot.org/article.pl?sid=02/11/17/2343231</link> </item> <item> -<title>Installing/Configuring ALSA Sound Modules In Debian</title> -<link>http://slashdot.org/article.pl?sid=02/11/01/1645231</link> +<title>As the Spam Turns</title> +<link>http://slashdot.org/article.pl?sid=02/11/17/2339233</link> </item> <item> -<title>4th Annual NetHack Tournament</title> -<link>http://slashdot.org/article.pl?sid=02/11/01/1328252</link> +<title>Microsoft Profit and Loss by Business Area</title> +<link>http://slashdot.org/article.pl?sid=02/11/17/2037223</link> </item> <textinput> Index: presentations/slides/top7/funcdisp.php diff -u presentations/slides/top7/funcdisp.php:1.1 presentations/slides/top7/funcdisp.php:1.2 --- presentations/slides/top7/funcdisp.php:1.1 Mon Nov 18 13:41:39 2002 +++ presentations/slides/top7/funcdisp.php Wed Nov 20 21:06:26 2002 @@ -1,7 +1,9 @@ <? -function dispnames() { - $names = array("betty", "johnny", "sue"); +global $names; +$names = array("betty", "johnny", "sue"); +function dispnames() { + global $names; foreach ($names as $name) { print "<td>$name</td>"; } Index: presentations/slides/intro/apache_hooks.xml +++ presentations/slides/intro/apache_hooks.xml <slide title="Apache Hooks"> <blurb title="In some future PHP far far away"> .. we will have Apache hooks </blurb> <example title="In your httpd.conf">phpAuthHandler = /path/to/your/auth_code.php</example> <example><![CDATA[<?php // ... logic ... return OK; ?>]]></example> <example title="Other handlers">phpUriHandler phpAccessHandler phpHeaderHandler phpTypeHandler phpFixupHandler phpLoggerHandler phpPostReadHandler phpResponseHandler </example> </slide> Index: presentations/slides/intro/mysql_udf.xml +++ presentations/slides/intro/mysql_udf.xml <slide title="UDF"> <blurb title="User Defined Functions"> You can execute PHP code as a user defined function inside MySQL. </blurb> <example title="Loading the PHP UDF library">CREATE FUNCTION php RETURNS STRING SONAME 'myphp.so';</example> <example title="Hello World" type="shell"> mysql> SELECT php('hello, world!'); +---------------------------------+ | php('hello, world!') | +---------------------------------+ | hello, world! | +---------------------------------+ 1 row in set (0.36 sec) </example> <example type="shell"> mysql> SELECT php('strftime("%c")'); +--------------------------+ | php('strftime("%c")') | +--------------------------+ | Thu Oct 24 18:12:04 2002 | +--------------------------+ 1 row in set (0.36 sec) </example> <example title="Applying PHP on a selected column" type="shell" fontsize="1.5em"> mysql> CREATE TABLE test (s varchar(255)); mysql> insert into test values ('iguana'),('turtle'),('aardvark'); mysql> select s,php('strlen($argv[1])',s) FROM test; +----------+---------------------------+ | s | php('strlen($argv[1])',s) | +----------+---------------------------+ | iguana | 6 | | turtle | 6 | | aardvark | 8 | +----------+---------------------------+ 3 rows in set (1.07 sec) </example> <example title="Oh my!" type="shell" fontsize="1.5em"> mysql> create table code (name varchar(255), code mediumblob); mysql> insert into code values ('capitalize','strtoupper($argv[1])'); mysql> select php(code,s) FROM test,code WHERE code.name = 'capitalize'; +-------------+ | php(code,s) | +-------------+ | IGUANA | | TURTLE | | AARDVARK | +-------------+ </example> </slide>

« previous php.pres (#542) next »