PHP Classes

File: examples/testupdatecreate.php

Recommend this page to a friend!
  Classes of Barton Phillips   Update Site   examples/testupdatecreate.php   Download  
File: examples/testupdatecreate.php
Role: Example script
Content type: text/plain
Description: Example script
Class: Update Site
Create Web site pages from database content
Author: By
Last change:
Date: 7 years ago
Size: 741 bytes
 

Contents

Class file image Download
<?php
// You should put 'SetEnv SITELOAD=<path_to_site-class_includes>' in your .htaccess file
$_site = require_once(getenv("SITELOAD"). "/siteload.php");
ErrorClass::setNoEmailErrs(true);
ErrorClass::setDevelopment(true);
$S = new $_site->className($_site);

// Get site info

$h->title = "UpdateSite";
$h->banner = "<h1>UpdateSite</h1>";

// UpdateSite::firstHalf() is a static member.
// UpdateSite::firstHalf($S, $h, [$nextfilename]);
// The third parameter is optional.
// $nextfilename can be set if we want a file other than the default which is "/updatesite2.php".

$page = UpdateSite::firstHalf($S, $h, 'testupdatesite2.php');

echo <<<EOF
$page
<br>
<a href="testupdateadmin.php">Administer Update Site Table</a><br/>
$footer
EOF;