com.lokorin.dfcrafters.lib
[ class tree: com.lokorin.dfcrafters.lib ] [ index: com.lokorin.dfcrafters.lib ] [ all elements ]

Procedural File: lib_admin_panel.php

Source Location: /_includes/lib_admin_panel.php



Classes:

AdminModule
Describes an module with admin functionality. The module defines actions that it's able perform and performs the action when needed. This class should be concidered abstract.
TableField
Describes a table field with a connected value in $_REQUEST. The table field tries to capture it's connected value if possible.
AdminAction
Describes an admin action, an identifier for something that can be done by the admin panel.
DeleteModule
Describes a module that deletes rows from a table.
EditModule
Describes a module that edits a specified row in a table.
AddModule
Describes a module for adding new rows to a table.
CallbackModule
Describes a module that uses callbacks to process events.
DetailsModule
Describes a module that shows read only contents of a specified row.
UpdateModule
Describes a module that sets specified fields to specified values when requested.
AdminPanel
Describes a panel itself. The panel itself is an module that shows an overview of a table and the available modules.


Page Details:

A library containing admin panel functionality. The library can create simplified and customized panels which can be used to alter database tables. The library is integrated with the administration log and update libraries.



Tags:

filesource:  Source Code for this file
license:  GNU Lesser General Public License
version:  $Revision: 1.15 $
author:  Andreas Launila


Includes:

require_once('common.php') [line 21]
For access to common constants and functions.







convertBoolToYn [line 140]

string convertBoolToYn( boolean $boolVal)

Converts a boolean value to either 'Yes' or 'No'. 'Yes' is used if the value is a boolean true, 'No' is used in all other cases.



Tags:

return:  'Yes' or 'No'.
access:  public


Parameters

boolean   $boolVal   The boolean value that should be converted.
[ Top ]



formatTimestampDate [line 109]

string formatTimestampDate( integer $timestamp)

Formats a timestamp into a date representation. As a special case timestamp equal to 0 get the representation 'Never'.



Tags:

return:  A date representation.
access:  public


Parameters

integer   $timestamp   The unix timestamp to be converted.
[ Top ]



formatTimestampDays [line 87]

string formatTimestampDays( integer $timestamp)

Formats a timestamp to the number of elapsed days since the point in time which the timestamp represents. This includes special cases like 'Never', 'Today' and 'Yesterday'.



Tags:

return:  A string indicating the number of elapsed days.
access:  public


Parameters

integer   $timestamp   The unix timestamp to be converted.
[ Top ]



formatTimestampTime [line 125]

string formatTimestampTime( integer $timestamp)

Formats a timestamp into a date representation complete with hours and minutes. As a special case timestamp equal to 0 get the representation 'Never'.



Tags:

return:  A date/time representation.
access:  public


Parameters

integer   $timestamp   The unix timestamp to be converted.
[ Top ]



logAdminAction [line 38]

void logAdminAction( string $table, string $module, [string $comment = ''])

Adds an entry to the admin log, storing the action for later examination.



Tags:

access:  private


Parameters

string   $table   The name of the table that the action affects.
string   $module   The name of the module that performed the action, or alternativly a description of the action.
string   $comment   An optional comment to add additional information to the log message.
[ Top ]



logAdminActivity [line 63]

void logAdminActivity( string $table, string $module, [mixed $sqlSelector = ''], string $sqlSelectThe)

This function is notified whenever a module performs a table altering action. Everything that should be notified of admin activity should hook in here.



Tags:

access:  private


Parameters

string   $table   The name of the table that the action affects.
string   $module   The name of the module class that performed the action, or alternativly a description of the action.
string   $sqlSelectThe   sql selector (if there is any) that specifies the row that was altered.
[ Top ]



Documentation generated on Tue, 10 Jan 2006 17:06:20 +0100 by phpDocumentor 1.3.0RC4