phpDocumentor seminarplan
[ class tree: seminarplan ] [ index: seminarplan ] [ all elements ]

Class: seminarplan

Source Location: /seminarplan.module.php

Class seminarplan

Class Overview

SeminarplanModule Desception

What does it do?
The seminarplanmodul is a contentmodul and a CMSMS Tagmodul.
It would be selected to give visitors the ability
to show events by diverent days.

Located in /seminarplan.module.php [line 33]

CMSModule
   |
   --seminarplan
Author(s): Information Tags:
Version:  0.3 16/01/2006 10:18

Methods

[ Top ]
Method Summary
void   AdminForm()   AdminForm to generate or edit Seminars
void   DateForm()   DateForm to generate or edit Trainers
void   DateFormReservation()   DateFormReservation to generate or edit Trainers
void   DoAction()   This is the main function that gets called if your module is a plug-in type module.
void   generate_calendar2()   Generates the Monthkallender
void   generate_day_calendar2()   Generates the Daycallender
void   GetAdminDescription()   GetAdminDescription()
void   GetAdminSection()   Specify which Admin Section (or top-level Admin Menu) it shows
void   GetAllDaySemDates()   gets all Seminarsdates from one day and return them as an array
void   GetAllInternSeminarAsDorpdown()   gets all internal Seminars and return them as an Assoc
void   GetAllSemDates()   Gets all Seminarsdates and return them as an array
void   GetAllSeminar()   gets all Seminars and return them as an Assoc
void   GetAuthor()   This returns a string that is presented in the Module
Admin if you click on the "About" link.
void   GetAuthorEmail()   This returns a string that is presented in the Module
Admin if you click on the "About" link.
void   GetChangeLog()   This returns a string that is presented in the module
Admin if you click on the About link.
void   GetFriendlyName()   This can return any string, preferably a localized name of the module.
void   GetHelp()   This returns HTML information on the module.
void   GetName()   Must return the exact class name of the module.

void   GetSeminars()   gets all Seminars and return the result orderd by name
void   GetTrainer()   gets all Trainers and return the result
void   GetURL()  
void   GetVersion()   This can return any string, preferably a number or
something that makes sense for designating a version.
void   HasAdmin()   Give CMSMS back if this Module has an Adminarea
void   Install()   When your module is installed, you may need to do some
void   InstallPostMessage()   Message after Module was Installed
void   IsContentModule()   Alow users to add as an Contenttype
void   IsPluginModule()   Alow users to add it in a Page using 'smarty' tag
void   ShowError()   ShowError to display error
void   ShowStandard()   ShowStandard to few the Seminars to vistors
void   TrainForm()   TrainForm to generate or edit Trainers
void   Uninstall()   The Uninstallfunction
void   Upgrade()   The Upgrade function
void   VisibleToAdminUser()   Show or not Show for User with no access to the Module

[ Top ]
Methods
AdminForm  [line 1024]

  void AdminForm( string $id, string $moduleaction, [string $error = ''], [string $name = ''], [string $info = ''], [string $train = ''], [string $energie = ''], [string $semID = ''], [string $trainers = ''], [string $intern = '']  )

AdminForm to generate or edit Seminars

This is NOT overriding a CMSModule function.
It's just used internallly for displaying the form,
since it's used in so many places.

Parameters:
string   $id:  The ID of the module
string   $moduleaction: 
string   $error:  Gets the errormessages if something don't insert the Adminform
string   $name:  Stores the Seminarname
string   $info:  Stores the information about the Seminar
string   $train: 
string   $energie:  Costs of the seminar
string   $semID:  Stores the seminarID on edit
string   $trainers: 
string   $intern:  mark Seminar as Internal or normal


[ Top ]
DateForm  [line 433]

  void DateForm( string $id, string $moduleaction, [string $error = ''], [string $time = ''], [string $endtime = ''], [string $entryarray = ''], [string $semID = ''], [string $semname = ''], [string $objektedropdown = '']  )

DateForm to generate or edit Trainers

This is NOT overriding a CMSModule function.
It's just used internallly for displaying the form,
since it's used in so many places.

Parameters:
string   $id:  The ID of the module
string   $moduleaction: 
string   $error:  Gets the errormessages if something went wrong
string   $time:  definate the Startday and time of Dropdownfields
string   $endtime:  definate the endday and time of Dropdownfields
string   $entryarray:  Put a list of already added Dates to the Form
string   $semID:  used to store the ID of the Seminar for whom a date will be created
string   $semname:  used to store the Name of the Seminar
string   $objektedropdown:  used to store the Name of the Rooms wich are available with the objektmodul


[ Top ]
DateFormReservation  [line 505]

  void DateFormReservation( string $id, string $moduleaction, [string $error = ''], [string $dayvalue = ''], [string $objektedropdown = ''], [string $entryarray = ''], [string $semID = ''], [string $semname = '']  )

DateFormReservation to generate or edit Trainers

This is NOT overriding a CMSModule function.
It's just used internallly for displaying the form,
since it's used in so many places.

Parameters:
string   $id:  like m1_
string   $moduleaction: 
string   $error:  Gets the errormessages if something went wrong
string   $dayvalue:  definate the Startday and time of Dropdownfields
string   $objektedropdown:  used to store the Name of the Rooms wich are available with the objektmodul
string   $entryarray:  stores a list of Seminarsdates for the current Date
string   $semID:  used to store the ID of the Seminar for whom a date will be created
string   $semname:  used to store the Name of the Seminar


[ Top ]
DoAction  [line 1324]

  void DoAction( string $action, string $id, string $params, [mixed $returnid = -1]  )

This is the main function that gets called if your module is a plug-in type module.

In general, you'll want to call various different
methods, depending upon the requested "action."

There are two built-in actions: "default" which gets
called if the module is accessed from a page or template,
and "defaultadmin" which gets called from the Admin
panel.

The Action can be overridden by passing a different
action either in your tag, e.g.,
{cms_module module='Skeleton' action='something'}
or by passing it in a link create by the CreateLink
method. More on that can be seen below in the
DisplayAdminNav method.

Parameters:
string   $action: 
switch
case "default": Shows the Seminarplan to Visitors
case "defaultadmin": Adminarea to administrate the Seminarplan
case "edit": Call the function AdminForm to edit an entrie
case "add": Adds an entrie from the Adminarea of gastbuch
case "delete": Deletes an entrie from the gastbuch
case "pruef1": Activate an entrie to show it to the Visitors
case "pruef": Deactivate an entrie to show it to the Visitors
case "completeadd": This case saves the entrie you make from the Adminarea with the AdminForm function
case "completeedit": This case saves the entrie you modify from the Adminarea with the AdminForm function

string   $id:  The ID of the module
string   $params:  The parameters targeted for this module

default

To Show the Visitorsinterface
defaultadmin

To Show the Administratorinterface
showcall

To Show the Calender for Internal Roomreservations
reservieren

To Show the Day wich is choosen by user
completereservation

To Save the roomreservation
edit

To edit a Seminar
completeedit

Save a edited Seminar
add

To Show the AdminForm for Inserting Seminars
completeadd

Save a inserted Seminar
addtrain

To Show the TrainForm for Inserting Trainers
completeaddtrain

Saves the Inserted Data from the Trainform
adddate

First it checks for already inserted days andthen it generate the DateForm for Inserting new Dates
completeadddate

Saves the Inserted data from the DateForm
deldate

Deletes a Date from the DateForm
delete

Deletes a Seminar
updateoptions

Saves the setten options


[ Top ]
generate_calendar2  [line 857]

  void generate_calendar2( string $id, string $returnid, string $year, string $month, mixed $days, [string $month_href = NULL], [mixed $first_day = '2'], [string $pn = array()], string $day, string $firstday  )

Generates the Monthkallender

This is NOT overriding a CMSModule function.
It's just used internallly for displaying the form,
since it's used in so many places.

Parameters:
string   $id:  like m1_
string   $returnid: 
string   $year:  Stores the selected year
string   $month:  Stores the selected month
string   $day:  Stores the selected day
string   $month_href:  will be deleted
string   $firstday:  specificate the day wich the week start
string   $pn:  will be deleted


[ Top ]
generate_day_calendar2  [line 750]

  void generate_day_calendar2( string $id, string $returnid, string $year, string $month, string $day, string $day_of_month, [string $entryarray = array()], [string $semarray = array()]  )

Generates the Daycallender

This is NOT overriding a CMSModule function.
It's just used internallly for displaying the form,
since it's used in so many places.

Parameters:
string   $id:  like m1_
string   $returnid: 
string   $year:  Stores the selected year
string   $month:  Stores the selected month
string   $day:  Stores the selected day
string   $day_of_month:  Stores the day of the month
string   $entryarray:  stores the dates as an array
string   $semarray:  stores the seminars as an assocarray


[ Top ]
GetAdminDescription  [line 186]

  void GetAdminDescription( )

GetAdminDescription()

If your module does have an Admin Panel, you
can have it return a description string that gets shown
in the Admin Section page that contains the module.

See the note on localization at the top of this file.



[ Top ]
GetAdminSection  [line 171]

  void GetAdminSection( )

Specify which Admin Section (or top-level Admin Menu) it shows

If your module has an Admin Panel, you can specify
which Admin Section (or top-level Admin Menu) it shows
up in. This method returns a string to specify that
section. Valid return values are:

main - the Main menu tab.
content - the Content menu
layout - the Layout menu
usersgroups - the Users and Groups menu
extensions - the Extensions menu (this is the default)
siteadmin - the Site Admin menu
viewsite - the View Site menu tab
logout - the Logout menu tab

Note that if you place your module in the main,
viewsite, or logout sections, it will show up in the
menus, but will not be visible in any top-level
section pages.



[ Top ]
GetAllDaySemDates  [line 599]

  void GetAllDaySemDates( mixed $day_of_month  )

gets all Seminarsdates from one day and return them as an array

This is NOT overriding a CMSModule function.
It's just used internallly for displaying the form,
since it's used in so many places.



[ Top ]
GetAllInternSeminarAsDorpdown  [line 701]

  void GetAllInternSeminarAsDorpdown( string $id  )

gets all internal Seminars and return them as an Assoc

This is NOT overriding a CMSModule function.
It's just used internallly for displaying the form,
since it's used in so many places.

Parameters:
string   $id:  like m1_


[ Top ]
GetAllSemDates  [line 570]

  void GetAllSemDates( )

Gets all Seminarsdates and return them as an array

This is NOT overriding a CMSModule function.
It's just used internallly for displaying the form,
since it's used in so many places.



[ Top ]
GetAllSeminar  [line 660]

  void GetAllSeminar( )

gets all Seminars and return them as an Assoc

This is NOT overriding a CMSModule function.
It's just used internallly for displaying the form,
since it's used in so many places.



[ Top ]
GetAuthor  [line 2145]

  void GetAuthor( )

This returns a string that is presented in the Module
Admin if you click on the "About" link.



[ Top ]
GetAuthorEmail  [line 2158]

  void GetAuthorEmail( )

This returns a string that is presented in the Module
Admin if you click on the "About" link.

It helps users of your module get in touch with you to send </br> bug reports,questions, cases of beer, and/or large sums of money.



[ Top ]
GetChangeLog  [line 2171]

  void GetChangeLog( )

This returns a string that is presented in the module
Admin if you click on the About link.

It helps users figure out what's changed between releases.
See the note on localization at the top of this file.



[ Top ]
GetFriendlyName  [line 58]

  void GetFriendlyName( )

This can return any string, preferably a localized name of the module.

This is the name that's shown in the
Admin Menus and section pages (if the module has an admin
component).
See for more details skeleton module.



[ Top ]
GetHelp  [line 2135]

  void GetHelp( [mixed $lang = 'en_US']  )

This returns HTML information on the module.

Typically, you'll want to include information on how to use the module. See the Languagefile at /lang/



[ Top ]
GetName  [line 45]

  void GetName( )

Must return the exact class name of the module.

If these do not match, bad things happen
This is the name that's shown in the main Modules
page in the Admin.
If you want to be safe, you can just replace the body
of this function with:
return get_class($this);



[ Top ]
GetSeminars  [line 682]

  void GetSeminars( )

gets all Seminars and return the result orderd by name

This is NOT overriding a CMSModule function.
It's just used internallly for displaying the form,
since it's used in so many places.



[ Top ]
GetTrainer  [line 724]

  void GetTrainer( )

gets all Trainers and return the result

This is NOT overriding a CMSModule function.
It's just used internallly for displaying the form,
since it's used in so many places.



[ Top ]
GetURL  [line 2176]

  void GetURL( )



[ Top ]
GetVersion  [line 143]

  void GetVersion( )

This can return any string, preferably a number or
something that makes sense for designating a version.

The CMS will use this to identify whether or not
the installed version of the module is current, and
the module will use it to figure out how to upgrade
itself if requested.



[ Top ]
HasAdmin  [line 101]

  void HasAdmin( )

Give CMSMS back if this Module has an Adminarea

This function returns a boolean value, depending on
whether your module adds anything to the Admin area of
the site. For the rest of these comments, I'll be calling
the admin part of your module the "Admin Panel" for
want of a better term.



[ Top ]
Install  [line 242]

  void Install( )

When your module is installed, you may need to do some

setup. Typical things that happen here are the creation
and prepopulation of database tables, database sequences,
permissions, preferences, etc.

For information on the creation of database tables,
check out the ADODB Data Dictionary page at
http://phplens.com/lens/adodb/docs-datadict.htm

This function can return a "false" in case of any error,
and CMS will not consider the module installed.


$flds

Set's the fields for cms_db_prefix().module_seminarplan.
fields are:

semID
energie: costs
train
name
info
intern

$flds1

Set's the fields for cms_db_prefix().module_seminarplandates.
fields are:

datID
semID
objectID
starttime
endtime
intern


$flds2

Set's the fields for cms_db_prefix().module_seminarplantrain.
fields are:

trainID
name


Sequences

Sequences wich will be created is:

cms_db_prefix()."module_seminarplan_seq


Permissions

It Creates some permissions.
The Permissions are:

Modify seminarplan: Grand rights for Seminarplan
Add Roomreservation: Alow to add Internal Roomreservations wich are allowed for this user
Add for all Reservation: Grand rights for Internal Kalender to add sombodies reservation



[ Top ]
InstallPostMessage  [line 287]

  void InstallPostMessage( )

Message after Module was Installed

After installation, there may be things you want to
communicate to your admin. This function returns a
string which will be displayed.

For best you put a Variable like $lang['inposmes']
into your Languagefile already includet is de_DE



[ Top ]
IsContentModule  [line 86]

  void IsContentModule( )

Alow users to add as an Contenttype

This function returns true or false, depending upon
If you don't want to include it as an Contentmodule
return "false" here.



[ Top ]
IsPluginModule  [line 73]

  void IsPluginModule( )

Alow users to add it in a Page using 'smarty' tag

This function returns true or false, depending upon
whether users can include the module in a page or
template using a smarty tag
If your module does not get included in pages or
templates, return "false" here.



[ Top ]
ShowError  [line 373]

  void ShowError( string $error  )

ShowError to display error

This is NOT overriding a CMSModule function.
It's just used internallly for displaying the Errors,
so it's avalable to change the error stile on oneplace.

Parameters:
string   $error:  The Error to display


[ Top ]
ShowStandard  [line 1056]

  void ShowStandard( )

ShowStandard to few the Seminars to vistors

This is NOT overriding a CMSModule function.
It's just used internallly for displaying the form,
since it's used in so many places.



[ Top ]
TrainForm  [line 394]

  void TrainForm( string $id, string $moduleaction, [string $error = ''], [string $name = ''], int $trainID  )

TrainForm to generate or edit Trainers

This is NOT overriding a CMSModule function.
It's just used internallly for displaying the form,
since it's used in so many places.

Parameters:
string   $id:  The ID of the module
string   $moduleaction: 
string   $error:  Gets the errormessages if something went wrong
string   $name:  used for edit trainers comes soon
int   $trainID:  ID of the trainer wich will be edited


[ Top ]
Uninstall  [line 343]

  void Uninstall( )

The Uninstallfunction

Sometimes, an exceptionally unenlightened or ignorant
admin will wish to uninstall your module. While it
would be best to lay into these idiots with a cluestick,
we will do the magnanimous thing and remove the module
and clean up the database, permissions, and preferences
that are specific to it.
This is the method where we do this.



[ Top ]
Upgrade  [line 305]

  void Upgrade( mixed $oldversion, mixed $newversion  )

The Upgrade function

If your module version number does not match the version
number of the installed module, the CMS Admin will give
you a chance to upgrade the module. This is the function
that actually handles the upgrade.
Ideally, this function should handle upgrades incrementally,
so you could upgrade from version 0.0.1 to 10.5.7 with
a single call. For a great example of this, see the News
module in the standard CMS install.



[ Top ]
VisibleToAdminUser  [line 118]

  void VisibleToAdminUser( )

Show or not Show for User with no access to the Module

If your module does have an Admin Panel, you
can control whether or not it's displayed by the boolean
that is returned by this method. This is primarily used
to hide modules from admins who lack permission to use
them.
In this case, the module will only be visible to admins
who have "Use Skeleton" permissions.



[ Top ]

Documentation generated on Thu, 19 Jan 2006 08:17:04 +0100 by phpDocumentor 1.2.3