PHP Classes

File: user.tpl

Recommend this page to a friend!
  Classes of Jesse Estevez   Result Class - Rule-based system for processing data tied to a DB result id.   user.tpl   Download  
File: user.tpl
Role: ???
Content type: text/plain
Description: A sample template
Class: Result Class - Rule-based system for processing data tied to a DB result id.
Author: By
Last change:
Date: 22 years ago
Size: 840 bytes
 

Contents

Class file image Download
<? // Notice that this template is named 'user.tpl' // and that all of the functions start with 'user_'. // The argument $row will be an associative array holding // any arguments specified by the dominant rule and // also holding any data returned from the DB. function user_start ( $row ) { $table_start = "<TABLE>"; $table_start .= "<TR><TD>Name</TD><TD>Address</TD></TR>"; return ( $table_start ); } function user_body ( $row ) { $table_body = "<TR>"; $table_body .= "<TD>" . $row['name'] . "</TD>"; $table_body .= "<TD>" . $row['address'] . "</TD>"; $table_body .= "</TR>"; return ( $table_body ); } function user_options ( $row ) { return ( "<TR><TD COLSPAN=2>" . $row['options'] . "</TD></TR>" ); } function user_end ( $row ) { return ( "</TABLE>" ); } ?>