PHP Classes

File: example.php

Recommend this page to a friend!
  Classes of Russell Nash   News Box   example.php   Download  
File: example.php
Role: Example script
Content type: text/plain
Description: example.php
Class: News Box
Display random news items stored in a file
Author: By
Last change:
Date: 18 years ago
Size: 1,636 bytes
 

Contents

Class file image Download
<?php
$data
= $_SERVER['QUERY_STRING'];
parse_str($data);
?>
<html>
<head>
<title>3K Engine &gt;&gt; Development</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta name="description" content="Web Development in languages from PHP Javascript HTML Flash and others." />
<meta http-equiv="GENERATOR" content="DWI Computers" />
<style type="text/css">
<!--
a.Help:link, a.Help:visited, a.Help:active, .Hlp
{
    font-family:times; font-size:10pt; font-weight:bold;; color:#D50000; text-decoration:none;
 }
a.Help:hover
{
    color:#0080FF; font-family:times; font-size:10pt; font-weight:bold;; text-decoration:underline;
 }
// -->
</style>
</head>
<body bgcolor="black" text="white">
<?php
switch ($act) {
    case
'ajax':
        echo
"<p>
This is an Ajax interface version, this allows the newsbox to be placed in standard HTML files or in places where php code inclusion is forbidden:
<script language=\"javascript\" src=\"newsbox.ajax.js\">
</script>
<div id=\"NewsBox\">NewsBox Version 1.1</div>
<br />
<a href=\""
. $_SERVER['PHP_SELF'] ."?act=php\" class=\"Help\">Click Here for PHP Version</a>
"
;
    break;
    case
'php':
   
$Tmp = include('newsbox.php');
        echo
"<p>\nThis is a php version of the newsbox:\n". $Tmp ."\n<br />\n<a href=\"". $_SERVER['PHP_SELF'] ."?act=ajax\" class=\"Help\">Click Here for Ajax Version</a>\n</p>\n";
    break;
    default:
       
$Tags = "<p>
This is a php version of the newsbox:
"
. include './newsbox.php' ."
<br />
<a href=\""
. $_SERVER['PHP_SELF'] ."?act=ajax\" class=\"Help\">Click Here for Ajax Version</a>
</p>
"
;
}
?>
</body>
</html>