当前位置: 首页>>代码示例>>PHP>>正文


PHP PHPWS_Core::requireInc方法代码示例

本文整理汇总了PHP中PHPWS_Core::requireInc方法的典型用法代码示例。如果您正苦于以下问题:PHP PHPWS_Core::requireInc方法的具体用法?PHP PHPWS_Core::requireInc怎么用?PHP PHPWS_Core::requireInc使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在PHPWS_Core的用法示例。


在下文中一共展示了PHPWS_Core::requireInc方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1:

<?php

/**
 * Main command class for Calendar module
 *
 * @author Matthew McNaney <mcnaney at gmail dot com>
 * @version $Id$
 */
PHPWS_Core::requireConfig('calendar');
PHPWS_Core::requireInc('calendar', 'error_defines.php');
define('MINI_CAL_NO_SHOW', 0);
define('MINI_CAL_SHOW_FRONT', 1);
define('MINI_CAL_SHOW_ALWAYS', 2);
class PHPWS_Calendar
{
    /**
     * unix timestamp of today
     * @var integer
     */
    public $today = 0;
    /**
     * unix timestamp according to passed variables
     * @var integer
     */
    public $current_date = 0;
    /**
     * month number based on current_date
     * @var integer
     */
    public $int_month = null;
    /**
开发者ID:HaldunA,项目名称:phpwebsite,代码行数:31,代码来源:Calendar.php

示例2: array

<?php

/**
 * @version $Id$
 * @author Matthew McNaney <mcnaney at gmail dot com>
 */
PHPWS_Text::addTag('filecabinet', array('document'));
PHPWS_Core::requireInc('filecabinet', 'parse.php');
PHPWS_Core::requireInc('filecabinet', 'defines.php');
PHPWS_Core::initModClass('filecabinet', 'Cabinet.php');
开发者ID:HaldunA,项目名称:phpwebsite,代码行数:10,代码来源:init.php

示例3:

<?php

namespace events;

if (!defined('PHPWS_SOURCE_DIR')) {
    include '../../config/core/404.html';
    exit;
}
\PHPWS_Core::requireInc('events', 'defines.php');
\PHPWS_Core::initModClass('events', 'EventsFactory.php');
//eh = events handler
//$eh = new Events();
//events factory always returns adminevents right now
$controller = EventsFactory::getEvents();
$controller->process();
开发者ID:sinkdb,项目名称:events,代码行数:15,代码来源:index.php

示例4: Faxmaster

    * 
    * This program is distributed in the hope that it will be useful,
    * but WITHOUT ANY WARRANTY; without even the implied warranty of
    * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    * GNU General Public License for more details.
    * 
    * You should have received a copy of the GNU General Public License
    * along with this program; if not, write to the Free Software
    * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    *
    * @author Jeremy Booker <jbooker at tux dot appstate dot edu>
*/
if (!defined('PHPWS_SOURCE_DIR')) {
    include '../../config/core/404.html';
    exit;
}
# Include configuration and defines
PHPWS_Core::requireInc('faxmaster', 'defines.php');
PHPWS_Core::requireInc('faxmaster', 'errordefines.php');
PHPWS_Core::requireConfig('faxmaster');
Layout::addStyle('faxmaster');
/* The user must be logged in to use this module. So, if
 * there's no user session, or the user is not logged
 * in, then return here
 */
if ((!isset($_SESSION['User']) || !Current_User::isLogged()) && (!isset($_REQUEST['op']) || $_REQUEST['op'] != 'new_fax')) {
    return;
}
# Create the Faxmaster
PHPWS_Core::initModClass('faxmaster', 'Faxmaster.php');
$fm = new Faxmaster();
开发者ID:sinkdb,项目名称:faxserv,代码行数:31,代码来源:index.php

示例5: realpath

$phpws_dir = realpath('../../../');
// HACK!
$_SERVER['HTTP_HOST'] = 'localhost';
chdir($phpws_dir);
include 'config/core/config.php';
require_once 'core/class/Init.php';
PHPWS_Core::initCoreClass('Database.php');
//PHPWS_Core::initCoreClass('Form.php');
//PHPWS_Core::initCoreClass('Template.php');
PHPWS_Core::initModClass('hms', 'Term.php');
PHPWS_Core::initModClass('users', 'Current_User.php');
PHPWS_Core::initModClass('hms', 'StudentDataProvider.php');
PHPWS_Core::initModClass('hms', 'LocalCacheDataProvider.php');
PHPWS_Core::initModClass('hms', 'SOAPDataProvider.php');
PHPWS_Core::initModClass('hms', 'StudentFactory.php');
PHPWS_Core::requireInc('hms', 'defines.php');
//get around visibility problems...
class MyLocalCacheDataProvider extends LocalCacheDataProvider
{
    public static function getInstance()
    {
        if (!is_null(self::$instance)) {
            return self::$instance;
        }
        PHPWS_Core::initModClass('hms', 'SOAPDataProvider.php');
        PHPWS_Core::initModClass('hms', 'LocalCacheDataProvider.php');
        //set the ttl to zero so it will always update the cache
        self::$instance = new LocalCacheDataProvider(new SOAPDataProvider(), 0);
        return self::$instance;
    }
}
开发者ID:jlbooker,项目名称:homestead,代码行数:31,代码来源:update_cache.php

示例6: edit

 /**
  * @Override FC_Document_Manager::edit()
  *
  * This is a copy and paste of the overridden function
  * except that the module for the form is set to intern.
  * Also, check if the folder has been set. If not create
  * one for the user and load it.
  */
 public function edit()
 {
     if (empty($this->document)) {
         $this->loadDocument();
     }
     // If the folder ID is zero then it was not found
     // when InternFolder::documentUpload() was called.
     // Create one and load it.
     if ($this->folder->id == 0) {
         \PHPWS_Core::requireInc('filecabinet', 'defines.php');
         $folder = new InternFolder();
         $folder->module_created = 'intern';
         $folder->title = 'intern documents';
         $folder->public_folder = FALSE;
         $folder->ftype = DOCUMENT_FOLDER;
         $folder->loadDirectory();
         $folder->save();
         $this->folder = $folder;
     }
     \PHPWS_Core::initCoreClass('File.php');
     $form = new \PHPWS_FORM();
     $form->addHidden('module', 'intern');
     $form->addHidden('internship', $_REQUEST['internship']);
     $form->addHidden('action', 'post_document_upload');
     $form->addHidden('ms', $this->max_size);
     $form->addHidden('folder_id', $this->folder->id);
     $form->addFile('file_name');
     $form->setSize('file_name', 30);
     $form->setLabel('file_name', dgettext('filecabinet', 'Document location'));
     $form->addText('title', $this->document->title);
     $form->setSize('title', 40);
     $form->setLabel('title', dgettext('filecabinet', 'Title'));
     $form->addTextArea('description', $this->document->description);
     $form->setLabel('description', dgettext('filecabinet', 'Description'));
     if ($this->document->id) {
         $form->addTplTag('FORM_TITLE', dgettext('filecabinet', 'Update file'));
         $form->addHidden('document_id', $this->document->id);
         $form->addSubmit('submit', dgettext('filecabinet', 'Update'));
     } else {
         $form->addTplTag('FORM_TITLE', dgettext('filecabinet', 'Upload new file'));
         $form->addSubmit('upload', dgettext('filecabinet', 'Upload'));
     }
     $form->addButton('cancel', dgettext('filecabinet', 'Cancel'));
     $form->setExtra('cancel', 'onclick="window.close()"');
     $form->setExtra('upload', 'onclick="this.style.display=\'none\'"');
     if ($this->document->id && Current_User::allow('filecabinet', 'edit_folders', $this->folder->id, 'folder', true)) {
         Cabinet::moveToForm($form, $this->folder);
     }
     $template = $form->getTemplate();
     if ($this->document->id) {
         $template['CURRENT_DOCUMENT_LABEL'] = dgettext('filecabinet', 'Current document');
         $template['CURRENT_DOCUMENT_ICON'] = $this->document->getIconView();
         $template['CURRENT_DOCUMENT_FILE'] = $this->document->file_name;
     }
     $template['MAX_SIZE_LABEL'] = dgettext('filecabinet', 'Maximum file size');
     $sys_size = str_replace('M', '', ini_get('upload_max_filesize'));
     $sys_size = $sys_size * 1000000;
     if ((int) $sys_size < (int) $this->max_size) {
         $template['MAX_SIZE'] = sprintf(dgettext('filecabinet', '%d bytes (system wide)'), $sys_size);
     } else {
         $template['MAX_SIZE'] = sprintf(dgettext('filecabinet', '%d bytes'), $this->max_size);
     }
     if ($this->document->_errors) {
         $template['ERROR'] = $this->document->printErrors();
     }
     return \PHPWS_Template::process($template, 'filecabinet', 'Forms/document_edit.tpl');
     //        Layout::add(PHPWS_Template::process($template, 'filecabinet', 'document_edit.tpl'));
 }
开发者ID:jlbooker,项目名称:InternshipInventory,代码行数:76,代码来源:DocumentManager.php

示例7: admin

<?php

/**
 * @version $Id$
 * @author Matthew McNaney <mcnaney at gmail dot com>
 */
PHPWS_Core::requireInc('pagesmith', 'error_defines.php');
PHPWS_Core::requireConfig('pagesmith');
if (!defined('PS_ALLOWED_HEADER_TAGS')) {
    define('PS_ALLOWED_HEADER_TAGS', '<b><strong><i><u><em>');
}
if (!defined('PS_CHECK_CHAR_LENGTH')) {
    define('PS_CHECK_CHAR_LENGTH', true);
}
class PageSmith
{
    public $forms = null;
    public $panel = null;
    public $title = null;
    public $message = null;
    public $content = null;
    public $page = null;
    public function admin()
    {
        if (!Current_User::allow('pagesmith')) {
            Current_User::disallow();
        }
        $this->loadPanel();
        $javascript = false;
        switch ($_REQUEST['aop']) {
            case 'block_info':
开发者ID:par-orillonsoft,项目名称:phpwebsite,代码行数:31,代码来源:PageSmith.php

示例8: adminMenu

<?php

/**
 * @author Matthew McNaney <mcnaney at gmail dot com>
 * @version $Id$
 */
PHPWS_Core::requireInc('signup', 'errordefines.php');
PHPWS_Core::requireConfig('signup');
if (!defined('SIGNUP_WINDOW')) {
    define('SIGNUP_WINDOW', 3600);
}
class Signup
{
    public $forms = null;
    public $panel = null;
    public $title = null;
    public $message = null;
    public $content = null;
    public $sheet = null;
    public $slot = null;
    public $peep = null;
    public $email = null;
    public function adminMenu()
    {
        if (!Current_User::allow('signup')) {
            Current_User::disallow();
        }
        $this->loadPanel();
        $javascript = false;
        $this->loadMessage();
        $command = $_REQUEST['aop'];
开发者ID:HaldunA,项目名称:phpwebsite,代码行数:31,代码来源:Signup.php

示例9: metaWeblog_newMediaObject

 /**
  * The IXR library required a change to make this work.
  * If you update that file, make sure the base64 decode contains
  * a trim call on the currentTagContents variable.
  */
 public function metaWeblog_newMediaObject($args)
 {
     PHPWS_Core::requireInc('core', 'file_types.php');
     PHPWS_Core::initCoreClass('File.php');
     $allowed_images = unserialize(ALLOWED_IMAGE_TYPES);
     /* Login the user */
     $logged = $this->logUser($args[1], $args[2], 'media');
     if ($logged !== true) {
         return $logged;
     }
     $filename = PHPWS_File::nameToSafe($args[3]['name']);
     $filetype = $args[3]['type'];
     $ext = PHPWS_File::getFileExtension($filename);
     if (!(ALLOW_OCTET_STREAM && $filetype == 'application/octet-stream') && !in_array($filetype, $allowed_images)) {
         return new IXR_Error(-652, "File type '{$filetype}' not allowed.");
     }
     if (!isset($allowed_images[$ext])) {
         return new IXR_Error(-653, "File extension '{$ext}' not allowed.");
     }
     if (isset($this->image_directory)) {
         $img_directory =& $this->image_directory;
     } else {
         $img_directory = 'images/';
     }
     PHPWS_File::appendSlash($img_directory);
     $source_file = $img_directory . $filename;
     @unlink($source_file);
     $handle = @fopen($source_file, 'wb');
     if (!$handle) {
         return new IXR_Error(-2323, 'Unable to open file.');
     }
     $image = $args[3]['bits'];
     if (!@fwrite($handle, $image)) {
         return new IXR_Error(-651, "Unable to write file - {$filename}.");
     }
     fclose($handle);
     $url = PHPWS_Core::getHomeHttp() . $img_directory . $filename;
     return $url;
 }
开发者ID:HaldunA,项目名称:phpwebsite,代码行数:44,代码来源:xmlrpc.php


注:本文中的PHPWS_Core::requireInc方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。