/** 
 * Implementation of simple class used to store 
 * data in the DB in the correct format.
 * Permissions to common methods are denied (Nobody).
 *
 * $Id$
 * @package smdoc
 */
/** METHOD PERMISSIONS */
setPermission('smdoc_news', 'class', 'create', 'News');
setPermission('smdoc_news', 'class', 'list', 'Everybody');
setPermission('smdoc_news', 'object', 'history', 'Nobody');
setPermission('smdoc_news', 'object', 'diff', 'Nobody');
setPermission('smdoc_news', 'object', 'revert', 'Nobody');
setPermission('smdoc_news', 'object', 'delete', 'News');
setPermission('smdoc_news', 'object', 'edit', 'News');
/** Class Descriptor/Meta information */
setClassMeta('smdoc_news', 'News');
setConst('NEWS_CLASS_ID', META_SMDOC_NEWS_CLASS_ID);
setConst('NEWS_CLASS_NAME', 'smdoc_news');
/**
 * Array identifying news source
 * @global array $NEWS_SOURCE
 */
global $NEWS_SOURCE;
$NEWS_SOURCE = array('table' => 'smdoc_news', 'table_create' => array(getClassname(NEWS_CLASS_ID), 'makeTable'));
/** 
 * Global containing default news categories 
 * @global array $NEWS_CATEGORIES
 */
global $NEWS_CATEGORIES;
 */
/**
 * Error handling functions/class/constants.
 *
 * $Id$
 * @package smdoc
 * @subpackage error
 */
/** Include storage class */
include_once SM_DIR . 'smdoc.class.storage.php';
/** Set constants and meta data */
setClassMeta('smdoc_error', 'Error Display');
setConst('ERROR_CLASS_ID', META_SMDOC_ERROR_CLASS_ID);
setConst('ERROR_TITLE', _("Page Error"));
/** METHOD PERMISSIONS **/
setPermission('smdoc_error', 'object', 'view', 'Everybody');
/**
 * Error class.
 *
 * Used for rendering error messages
 *
 * @package smdoc
 * @subpackage error
 */
class smdoc_error extends smdoc_storage
{
    /**
     * String containing error message.
     * @var string
     */
    var $errorString;
 * Licensed under the GNU GPL. For full terms see the file COPYING.
 *
 * This file is an addition/modification to the 
 * Framework for Object Orientated Web Development (Foowd).
 * */
/**
 * Class for HTML and Textile formatted documents.
 *
 * $Id$
 *m  
 * @package smdoc
 * @subpackage text
 */
/** Class Descriptor/Meta information */
setClassMeta('smdoc_spec', 'HTML + Textile + Spec tracking');
setPermission('smdoc_spec', 'class', 'create', 'dev');
setPermission('smdoc_spec', 'object', 'revert', 'dev');
/**
 * HTML and Textile text object class.
 *
 * This class defines a HTML/Textile text area and 
 * methods to view and edit that area. Defines additional
 * elements for targeting/editing/documenting design intentions.
 *
 * @package smdoc
 * @subpackage text
 * @author Erin Schnabel
 */
class smdoc_spec extends smdoc_text_textile
{
}
示例#4
0
 * Workspaces allow groups of pages to overlay the default set.
 * 
 * Modified by SquirrelMail Development
 * $Id$
 * 
 * @package Foowd
 */
/** Method permissions */
setPermission('foowd_workspace', 'class', 'create', 'Gods');
setPermission('foowd_workspace', 'class', 'enter', 'Gods');
setPermission('foowd_workspace', 'object', 'edit', 'Gods');
setPermission('foowd_workspace', 'object', 'enter', 'Gods');
setPermission('foowd_workspace', 'object', 'fill', 'Gods');
setPermission('foowd_workspace', 'object', 'empty', 'Gods');
setPermission('foowd_workspace', 'object', 'export', 'Gods');
setPermission('foowd_workspace', 'object', 'import', 'Gods');
/** Class descriptor */
setClassMeta('foowd_workspace', 'Workspace');
setConst('WORKSPACE_CLASS_ID', META_FOOWD_WORKSPACE_CLASS_ID);
/** Workspace settings */
setConst('WORKSPACE_EXPORT_COMPRESS', FALSE);
/**
 * The Foowd workspace class.
 *
 * Class for holding information about a workspace and providing methods for
 * placing objects in and removing them from the workspace, and exporting
 * and importing objects from XML files.
 *
 * @author Paul James
 * @package Foowd
 */
*/
/**
 * Base class for creation/storage/manipulation of documents.
 *
 * Modified by SquirrelMail Development
 * $Id$
 * 
 * @package smdoc
 * @subpackage Foowd
 */
/** Method permissions */
setPermission('foowd_text_plain', 'class', 'create', 'Edit');
setPermission('foowd_text_plain', 'object', 'edit', 'Edit');
setPermission('foowd_text_plain', 'object', 'revert', 'Edit');
setPermission('foowd_text_plain', 'object', 'delete', 'Edit');
setPermission('foowd_text_plain', 'object', 'clone', 'Edit');
/** Class descriptor/Meta information */
setClassMeta('foowd_text_plain', 'Plain Text');
/* Class settings */
setConst('DIFF_COMMAND', 'diff -Bb -u5');
setConst('DIFF_ADD_REGEX', '/^\\+([^+].*)/');
setConst('DIFF_MINUS_REGEX', '/^\\-([^-].*)/');
setConst('DIFF_SAME_REGEX', '/^ (.*)/');
/**
 * Plain text object class.
 *
 * This class defines a plain text area and methods to view and edit that area.
 *
 * @author Paul James
 * @package smdoc
 * @subpackage text
 * Licensed under the GNU GPL. For full terms see the file COPYING.
 *
 * This file is an addition/modification to the 
 * Framework for Object Orientated Web Development (Foowd).
 */
/**
 * Name lookup implementation used to map easy object name like 'faq' to 
 * an objectid/classid pair for retrieval.
 *
 * $Id$
 *
 * @package smdoc
 */
/** Class descriptor/Meta information */
setClassMeta('smdoc_name_lookup', 'Singleton object lookup/name manager');
setPermission('smdoc_name_lookup', 'class', 'list', 'Edit');
setConst('SHORTNAMES_ID', 1063068242);
/** Regex to validate shortname */
setConst('REGEX_SHORTNAME', '/^[a-z_-]{0,11}$/');
/** Base storage class */
include_once SM_DIR . 'smdoc.class.storage.php';
/**
 * Singleton class provides a basic mapping for 
 * well-known simple names (faq, privacy..)
 * to objectid/className pairs.
 * 
 * @package smdoc
 */
class smdoc_name_lookup extends smdoc_storage
{
    /**
 * Implementation of simple class used to store 
 * data in the DB in the correct format.
 * Permissions to common methods are denied (Nobody).
 *
 * $Id$
 * @package smdoc
 */
/** METHOD PERMISSIONS */
setPermission('smdoc_storage', 'class', 'create', 'Nobody');
setPermission('smdoc_storage', 'object', 'view', 'Nobody');
setPermission('smdoc_storage', 'object', 'history', 'Nobody');
setPermission('smdoc_storage', 'object', 'admin', 'Nobody');
setPermission('smdoc_storage', 'object', 'revert', 'Nobody');
setPermission('smdoc_storage', 'object', 'delete', 'Nobody');
setPermission('smdoc_storage', 'object', 'clone', 'Nobody');
setPermission('smdoc_storage', 'object', 'xml', 'Nobody');
/** CLASS DESCRIPTOR **/
setClassMeta('smdoc_storage', 'Storage class with no permission');
/**
 * Basic class that restricts certain operations,
 * and maintains no permissions for public access
 * @package smdoc
 */
class smdoc_storage extends foowd_object
{
    /**
     * Retrieve singleton instance of storage object
     * @static
     * @param smdoc $foowd Reference to the foowd environment object.
     * @return Reference to singleton object
     */
 * Framework for Object Orientated Web Development (Foowd).
 */
/**
 * Implementation of Site Translations based on Workspaces
 *
 * $Id$
 * @see foowd_workspace
 * @package smdoc
 */
/** METHOD PERMISSIONS **/
setPermission('smdoc_translation', 'class', 'create', 'Translator');
setPermission('smdoc_translation', 'class', 'enter', 'Everybody');
setPermission('smdoc_translation', 'object', 'fill', 'Translator');
setPermission('smdoc_translation', 'object', 'empty', 'Translator');
setPermission('smdoc_translation', 'object', 'export', 'Gods');
setPermission('smdoc_translation', 'object', 'import', 'Gods');
/** CLASS DESCRIPTOR **/
setClassMeta('smdoc_translation', 'Site Translation');
setConst('TRANSLATION_CLASS_ID', META_SMDOC_TRANSLATION_CLASS_ID);
setConst('TRANSLATION_DEFAULT_LANGUAGE', 'en_US');
/** Base workspace implementation */
require_once SM_DIR . 'class.workspace.php';
/**
 * Extension of workspaces to allow all-in-one-place
 * management of site and translations.
 *
 * @package smdoc
 * @subpackage translation
 */
class smdoc_translation extends foowd_workspace
{
示例#9
0
    case "delGroup":
        delGroup();
        break;
    case "delTutorial":
        delTutorial();
        break;
    case "TutorialsConfigAdmin":
        TutorialsConfigAdmin();
        break;
    case "TutorialsConfigChange":
        TutorialsConfigChange();
        break;
    case "TutorialsConfigMenuC":
        TutorialsConfigMenuC();
        break;
    case "TutorialsConfigMenuG":
        TutorialsConfigMenuG();
        break;
    case "TutorialsConfigMenuT":
        TutorialsConfigMenuT();
        break;
    case "PreviewTutorial":
        PreviewTutorial();
        break;
    case "SaveTutorial":
        SaveTutorial();
        break;
    case "setPerm":
        setPermission();
        break;
}
<?php

/*
 * Copyright (c) 2003-2004 The SquirrelMail Project Team
 * Licensed under the GNU GPL. For full terms see the file COPYING.
 *
 * This file is an addition/modification to the
 * Framework for Object Orientated Web Development (Foowd).
 */
setPermission('smdoc_group_user', 'class', 'list', 'Gods');
setPermission('smdoc_group_user', 'class', 'edit', 'Gods');
/** 
 * Singleton Group Manager.
 * 
 * $Id$
 * @package smdoc
 * @subpackage group
 */
/** Base storage class. */
include_once SM_DIR . 'smdoc.class.storage.php';
/** Class descriptor/Meta information */
setClassMeta('smdoc_group_user', 'Many-to-Many Mapping of users and groups');
/** 
 * @global array $GROUP_USER_SOURCE
 */
global $GROUP_USER_SOURCE;
$GROUP_USER_SOURCE = array('table' => 'smdoc_group_user', 'table_create' => array('smdoc_group_user', 'makeTable'));
/** 
 * Small group for managing user-group pairs in a special
 * associative table.
 *
示例#11
0
 * to the storage medium, administrating objects, etc. all the 
 * base FOOWD object functionality.
 * 
 * Modified by SquirrelMail Development
 * $Id$
 * 
 * @package smdoc
 * @subpackage Foowd
 */
/** Method permissions */
setPermission('foowd_object', 'class', 'create', 'Nobody');
setPermission('foowd_object', 'object', 'admin', 'Gods');
setPermission('foowd_object', 'object', 'revert', 'Gods');
setPermission('foowd_object', 'object', 'delete', 'Gods');
setPermission('foowd_object', 'object', 'clone', 'Translator');
setPermission('foowd_object', 'object', 'xml', 'Nobody');
/** Class descriptor/Meta information */
setClassMeta('foowd_object', 'Base Object');
/**
 * The abstract Foowd base class.
 *
 * Implements methods for saving objects to the database, calling object
 * methods, and doing useful object housekeeping and management.
 *
 * @author Paul James
 * @package Foowd
 */
class foowd_object
{
    /**
     * Reference to the Foowd object.
示例#12
0
/**
 * @global array $USER_SOURCE
 */
global $USER_SOURCE;
$USER_SOURCE = array('table' => 'smdoc_user', 'table_create' => array(getClassname(USER_CLASS_ID), 'makeTable'));
setPermission('base_user', 'class', 'login', 'Everybody');
setPermission('base_user', 'class', 'logout', 'Registered');
setPermission('base_user', 'class', 'create', 'Everybody');
setPermission('base_user', 'class', 'list', 'Everybody');
setPermission('base_user', 'object', 'groups', 'Gods');
setPermission('base_user', 'object', 'update', 'Author');
setPermission('base_user', 'object', 'clone', 'Nobody');
setPermission('base_user', 'object', 'admin', 'Nobody');
setPermission('base_user', 'object', 'xml', 'Nobody');
setPermission('base_user', 'object', 'permissions', 'Nobody');
setPermission('base_user', 'object', 'history', 'Nobody');
include_once SM_DIR . 'class.anonuser.php';
/**
 * The smdoc extended user class.
 *
 * Class for holding information about a user and providing methods for
 * manipulating and getting information on a user.
 *
 * This class is loosely based on the base user class in the Foowd
 * framework - but highly customized for smdoc (session-based auth).
 * The elements in smdoc.class.user.php are additional smdoc-specific
 * user attributes/etc.
 *
 * @author Paul James
 * @author Erin Schnabel
 * @package smdoc