Location: PHPKode > projects > Philosopher'Stone Personal > pssp/dvd.php
<?php

// Copyright (c) 2010 by Paul M. Foster <hide@address.com>
// Licensed under PostgreSQL License (see LICENSE file)

include('setup.php');

allowed(127, 5);


/* ***** FIELDS TO BE VALIDATED ***** */


/* ***** CLASS REGISTRATION ***** */

$sc->register('dvd', array('class' => 'dvd', 'shared' => true, 'depends' => 'db', 'arguments' => '%db%'));

/* ***** INSTANTIATE CLASSES HERE ***** */

$app_navs = $sc->appnavs;
$dvd = $sc->dvd;

/* ***** VALIDATE USER DATA ***** */

$arr = $dvd->get_all();
$items = snake(3, $arr);


/* ***** PAGE SETUP ***** */

$meta['app_navs'] = $app_navs->get();
$meta['file_mtime'] = date('d F Y H:i:s', getlastmod());
$meta['mod_navs'] = array(
	array('url' => 'dvdedt.php', 'txt' => 'Edit Title'),
	array('url' => 'dvdadd.php', 'txt' => 'Add Title'),
	array('url' => 'dvddel.php', 'txt' => 'Delete Title')
);
$meta['return_url'] = 'dvd.php';
$meta['app_title'] = 'DVD';
$meta['page_title'] = 'List DVDs';
$meta['view_file'] = fullpath('view', 'dvd');

include('generic.php');
Return current item: Philosopher'Stone Personal