<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Code Snippets for PHP</title>
    <link>http://www.uwec.edu/code/</link>
    <pubDate>Mon, 19 Jun 2006 19:42:17 GMT</pubDate>
    <description>UW-Eau Claire Web Development code snippets</description>
    <item>
      <title>Canned Validation</title>
      <link>http://www.uwec.edu/code/PHP/show/23</link>
      <description>These functions can be put in any page you call or include.  All you have to do is send it the post form a submited page.  The function will pull out the values and check them for errors and missing data.  All fields with bad data or missing data are put in the session under values witht the input name as the key.    In order to use this function properly the following naming convention MUST BE USED!  Text fields: txt Date fields: dt Year fields: yr Number fields: in Currency fields: am Email fields: em  Feel free to add data types!</description>
      <pubDate>Mon, 19 Jun 2006 19:42:17 GMT</pubDate>
      <guid>http://www.uwec.edu/code/PHP/show/23</guid>
      <author>ludwigaw)</author>
    </item>
    <item>
      <title>Auto Download</title>
      <link>http://www.uwec.edu/code/PHP/show/25</link>
      <description>Call this function, and the server will send the user a request to begin downloading a file instead of sending it through the browser (e.g. if you called the function on a PHP file, the server would allow the user to download the source code of that file instead of serving it)  Of course, that&amp;#39;s why this code contains exceptions that don&amp;#39;t allow you to download certain files to prevent that type of thing from happening.    To use, simply call the function dl_file(filename) with the filename.</description>
      <pubDate>Mon, 19 Jun 2006 19:42:02 GMT</pubDate>
      <guid>http://www.uwec.edu/code/PHP/show/25</guid>
      <author>webermp)</author>
    </item>
    <item>
      <title>CAS authentication for PHP</title>
      <link>http://www.uwec.edu/code/PHP/show/27</link>
      <description>Include this file at the top of every page that you want to have CAS authentication on. Note that this only authenticates that the person signing is is a UWEC user, but doesn&amp;rsquo;t take into account the role of the user. Currently the username is stored into $_Session[&amp;#39;uwecNetworkID&amp;#39;], but can be changed for each application. It also checks to see if the user has already been authenticated so it knows to not challenge the user again.  Note that the code requires &amp;#39;Request.php&amp;#39;, a file found from PHP Pear (http://pear.php.net/package/HTTP_Request).</description>
      <pubDate>Wed, 12 Jul 2006 17:49:52 GMT</pubDate>
      <guid>http://www.uwec.edu/code/PHP/show/27</guid>
      <author>webermp)</author>
    </item>
    <item>
      <title>Global Class</title>
      <link>http://www.uwec.edu/code/PHP/show/29</link>
      <description>This class should be implemented on every PHP application.  It has been standardized and includes the major functions that are needed by every PHP application developed by webdev.  Simply include this at the top of every file in your app.

Note that any functions that return or require private variables are within the class (things like creating a connection), while functions that are essentially shortcuts for good coding practices are included at the end of the file outside for the GlobalClass object (like properlly terminating a session before calling a redirect).

A section is even included for you to add your functions that are specific to your own project.  </description>
      <pubDate>Thu, 02 Mar 2006 22:10:34 GMT</pubDate>
      <guid>http://www.uwec.edu/code/PHP/show/29</guid>
      <author>webermp)</author>
    </item>
  </channel>
</rss>
