[ Index ]
 

Code source de Plume CMS 1.2.2

Accédez au Source d'autres logiciels libres

Classes | Fonctions | Variables | Constantes | Tables

title

Body

[fermer]

/manager/inc/ -> class.manager.php (sommaire)

(pas de description)

Poids: 1577 lignes (60 kb)
Inclus ou requis:0 fois
Référencé: 0 fois
Nécessite: 0 fichiers

Définit 1 class

Manager:: (47 méthodes):
  Manager()
  setMessage()
  getMessage()
  getArrayCategories()
  getArrayMonths()
  getArrayOnlyMonths()
  getArrayResStatus()
  getArrayCommentStatus()
  getArrayCommentSupport()
  asRightToEdit()
  loadResource()
  addResourceInCategory()
  removeResourceFromCategory()
  triggerMassUpdate()
  indexResource()
  indexRemove()
  getSubTypes()
  getSubTypesArray()
  isSubTypeUsed()
  deleteType()
  saveType()
  saveUser()
  delUser()
  saveSite()
  delSite()
  switchSiteTheme()
  loadCategory()
  saveCategory()
  delCategory()
  check()
  saveNews()
  delNews()
  saveArticle()
  delArticle()
  checkArticlePage()
  saveArticlePage()
  delArticlePage()
  asRightToEditComment()
  getComments()
  getComment()
  saveComment()
  delComment()
  getHelp()
  getHelpChapters()
  getHelpChapter()
  HelpLink()
  sendEmail()


Classe: Manager  - X-Ref

Manager()   X-Ref
Constructor.
Depending on the context, a user is automatically created
from the session data.


setMessage($msg)   X-Ref
Set a message.

param: string Message

getMessage()   X-Ref
Get the message

The message is poped.

return: string Message

getArrayCategories($addallcat=false)   X-Ref
If $addallcat set to true a special "All the categories" is also
given. Used for the listing of the resources in the manager.


getArrayMonths($type='', $cat_id='', $addalldates=true)   X-Ref
Get the list of months for the drop-down selectors.

param: string type of resource
param: int category id
param: bool (true) add the all dates choice (true by default!!!)
return: array($first, $last, array of months + year)

getArrayOnlyMonths()   X-Ref
Get the list of months for the drop-down selectors.

return: array Months

getArrayResStatus()   X-Ref
Get the array of possible resource status.

return: array Resource status

getArrayCommentStatus()   X-Ref
Get the array of possible comment status.

return: array Comment status

getArrayCommentSupport()   X-Ref
Get the array of possible support of the comment
for a resource.

return: array Comment support

asRightToEdit(&$res)   X-Ref
Check if a user has the rights to edit a resource.

param: &object Resource object
return: bool

loadResource(&$res, $id)   X-Ref
Load a resource for the current website.
As the resource object has a type, all the type checking is done
by the object. Only the website checking is done by this method.

param: &object Resource object in which the resource will be set
param: int Resource id
return: bool Success

addResourceInCategory(&$res, $catid, $type=PX_RESOURCE_CATEGORY_MAIN)   X-Ref
Add a resource in a category.

param: &object Reference of the resource object
param: int Category id
param: int Type of category (PX_RESOURCE_CATEGORY_MAIN)
return: bool Success

removeResourceFromCategory(&$res, $catid)   X-Ref
Remove a resource from a category

param: &object Reference of the resource object
param: int Category id
return: bool Success

triggerMassUpdate($website='')   X-Ref
Trigger mass update for a given website.
If no website given, use the currently managed by the user.

param: string Website id ('')
return: bool true

indexResource(&$res)   X-Ref
Index a resource.

param: &object Resource object
return: bool Success

indexRemove(&$res)   X-Ref
Remove a resource from the index.

param: &object Resource object
return: bool Success

getSubTypes($id='', $type='')   X-Ref
Get the list of subtypes, ordered by type

param: int Optional, limit the search to one subtype
param: string Optional, limit the search to a type of resource
return: object RecordSet

getSubTypesArray($type='', $extra=0)   X-Ref
Get an array of the subtypes.
Used in the display of the subtypes.

param: string Type of resource ('')
param: int Limit to the one having the given extra data set (0)
return: array Ready to use in the display

isSubTypeUsed($id)   X-Ref
Pas de description

deleteType($id)   X-Ref
Pas de description

saveType($id, $type_id, $name, $template, $cachetime, $extra1, $extra2, $website='')   X-Ref
Pas de description

saveUser($id, $username, $password, $realname, $email, $pubemail, $authwebs = null)   X-Ref
Pas de description

delUser($id)   X-Ref
Pas de description

saveSite($id, $name, $description, $sitelang, $website_address, $website_path, $xmedia_name, $support_comments, $status_comments, &$log_new_site, $force_new_id='')   X-Ref
Save a site or create a new one.

If $id is empty, a new site is created and the
log of the creation is set in &$log_new_site.
The log is pure HTML ready for display.

delSite($id)   X-Ref
Pas de description

switchSiteTheme($id, $theme)   X-Ref
Switch the theme of a website.

param: string Id of the website
param: string New theme for the website
return: bool Success

loadCategory(&$cat, $id)   X-Ref
Load a category for the current website.

param: &object Category object in which the category will be set
param: int Category id
return: bool Success

saveCategory(&$cat)   X-Ref
Save a category.

param: &object Category to be saved
return: Mixed Id of the category or false if error

delCategory(&$cat)   X-Ref
Remove a category.

param: &object Category to be removed
return: bool Success

check(&$res)   X-Ref
Check a resource.

Check a resource, set the error of the manager from the results of
the check, if errors are found.

param: &object Resource object
return: bool Success

saveNews(&$news)   X-Ref
Save a news.

param: &object News object
return: mixed Id of the news or false

delNews(&$news)   X-Ref
Remove a news from the database.

param: &object News object
return: bool Success

saveArticle(&$ar)   X-Ref
Save an article.

Automatically add a new or update an old.

param: &object Article object
return: mixed Id of the article if success, else false

delArticle(&$ar)   X-Ref
Remove an article from the database.

param: &object Article object
return: bool Success

checkArticlePage(&$ar)   X-Ref
Check an article page.

Check a page, set the error of the manager from the results of
the check, if errors are found.

param: &object Article object
return: bool Success

saveArticlePage(&$ar)   X-Ref
Save the current page of an article.

param: &object Article object
return: mixed Id of the page if success else false

delArticlePage(&$ar)   X-Ref
Delete the current page of an article.

param: &object Article object
return: bool Success

asRightToEditComment(&$ct)   X-Ref
Check if a user has the rights to edit a comment.

A comment can be edited by a user if:
- The user is "owner" of the resource associated to the comment.
- The user is the "owner" of the comment.
- The user has at least an PX_USER_LEVEL_ADVANCED level.

param: &object Comment object
return: bool

getComments($resource_id='', $limit=0)   X-Ref
Get the list of comments in the current website.

param: int Resource id ('')
param: int Maximum number of comments (0)
return: mixed Comment object or false if errors.

getComment($id, $resource_id)   X-Ref
Get a comment in the current website associated to a given resource.

param: int Comment id
param: int Resource id
return: mixed Comment object or false if errors.

saveComment(&$ct)   X-Ref
Save a comment.

Automatically add a new or update an old.

param: &object Comment object
return: mixed Id of the comment if success, else false

delComment(&$ct)   X-Ref
Remove a comment from the database.

param: &object Comment object
return: bool Success

getHelp($id, $plugin='', $getall=false)   X-Ref
Get a help file. Returned as a string containing only the HTML content
with the good locale and the encoding.

param: string Id of the help to get
param: string Id of the plugin if the help is from a plugin
param: bool Get also the title and the id of the help
return: string The help

getHelpChapters($plugin='')   X-Ref
Get all the help files, sorted by file name usefull to list the
possible themes in the help.

param: string Id of the plugin if the help is from a plugin
return: array The help list

getHelpChapter($file)   X-Ref
Get the id and the title of a help chapter from the file name and the
content encoded with the output encoding.

param: string file name
return: array 0=id 1=title 2=content

HelpLink($chapter, $section, $plugin='')   X-Ref
Returns the contextual help link

param: string chapter, correspond to the file of the help
param: string section the part to see in the file
param: string plugin ('')
return: string Help link

sendEmail($subject, $content, $website, $level=PX_AUTH_ADVANCED)   X-Ref
Send an email to the users of the website.

param: string Subject of the email
param: string Content of the email
param: int Website id
param: int Minimum level of the user to get the email PX_AUTH_ADVANCED



Généré le : Mon Nov 26 11:57:01 2007 par Balluche grâce à PHPXref 0.7
  Clicky Web Analytics