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


PHP sUserMgr函数代码示例

本文整理汇总了PHP中sUserMgr函数的典型用法代码示例。如果您正苦于以下问题:PHP sUserMgr函数的具体用法?PHP sUserMgr怎么用?PHP sUserMgr使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: __construct

 /**
  * Constructor of the Extension class
  *
  * @param string $code Extension code
  */
 public function __construct($code)
 {
     $code = sYDB()->escape_string($code);
     $this->_code = $code;
     $this->_uid =& sUserMgr()->getCurrentUserID();
     $this->extensionProperties = new Properties("yg_ext_" . $this->_code . "_props", 1);
     $this->extensionPropertySettings = new PropertySettings("yg_ext_" . $this->_code . "_props");
 }
开发者ID:nrueckmann,项目名称:yeager,代码行数:13,代码来源:extensions.php

示例2: __construct

 /**
  * Constructor of the JSQueue class
  *
  * @param object $permissions Permissions Object
  * @param int $siteId Site Id
  */
 function __construct($permissions, $siteId = 0)
 {
     $this->_table = "yg_jsqueue";
     $this->_sourceid = HISTORYTYPE_JSQUEUE;
     $this->_siteID = (int) $siteId;
     $this->_uid =& sUserMgr()->getCurrentUserID();
     $this->permissions =& $permissions;
 }
开发者ID:nrueckmann,项目名称:yeager,代码行数:14,代码来源:jsqueue.php

示例3: __construct

 /**
  * Constructor of the Entrymasks class
  */
 function __construct()
 {
     $this->_db = sYDB();
     $this->_uid =& sUserMgr()->getCurrentUserID();
     $this->table = "yg_entrymasks_tree";
     $this->tree = new Tree($this);
     $this->permissions = new Permissions("yg_entrymasks_permissions", $this);
 }
开发者ID:nrueckmann,项目名称:yeager,代码行数:11,代码来源:entrymasks.php

示例4: __construct

 /**
  * Constructor of the Templates class
  */
 function __construct()
 {
     $this->_uid = sUserMgr()->getCurrentUserID();
     $this->table = "yg_templates_tree";
     $this->tree = new tree($this);
     $this->permissions = new Permissions("yg_templates_permissions", $this);
     $this->setDir((string) sConfig()->getVar('CONFIG/DIRECTORIES/TEMPLATEDIR'));
 }
开发者ID:nrueckmann,项目名称:yeager,代码行数:11,代码来源:templates.php

示例5: onRender

 public function onRender($args = NULL)
 {
     $page = $this->getPage();
     $pageinfo = $page->get();
     $action = sApp()->request->parameters['ACTION'];
     // check if commenting user is authenticated
     $anonymousUserID = sUserMgr()->getAnonymousID();
     if ((int) sUserMgr()->getCurrentUserID() == $anonymousUserID) {
         $isLoggedIn = false;
     } else {
         $isLoggedIn = true;
     }
     // get comment infos
     $commentError = NULL;
     $commentObject = $page->comments;
     $commentSettings = $commentObject->getSettings();
     $commentStatus = $commentObject->getStatus($pageinfo['ID']);
     $commentPermission = $page->permissions->check(sUserMgr()->getCurrentUserID(), 'RCOMMENT', $pageinfo['ID']);
     // add comment
     if ($action == 'ADD') {
         $commentUser = sApp()->request->parameters['USER'];
         $commentEmail = sApp()->request->parameters['EMAIL'];
         $commentText = sApp()->request->parameters['TEXT'];
         $result = $commentObject->add($commentText, $pageinfo['ID'], $commentUser, $commentEmail);
         if ($result !== ERROR_NONE) {
             switch ($result) {
                 case ERROR_COMMENTS_MINIMUM_POST_INTERVAL_EXCEEDED:
                     $commentError = 'Minimum post interval was exceeded.';
                     break;
                 case ERROR_COMMENTS_BLACKLISTED_WORD:
                     $commentError = 'You have used a blacklisted word.';
                     break;
                 case ERROR_COMMENTS_AUTHENTICATION_NEEDED:
                     $commentError = 'Authentication is needed.';
                     break;
                 case ERROR_COMMENTS_COMMENTING_IS_CLOSED:
                     $commentError = 'Commenting is closed.';
                     break;
                 case ERROR_COMMENTS_NO_COMMENT_RIGHTS:
                     $commentError = 'No permissions to comment.';
                     break;
                 default:
                     $commentError = 'An unknown error has occured.';
                     break;
             }
         }
     }
     // get comments - has to be after add functionaly in order for new comments to show up
     $commentCount = $commentObject->getCommentsCount();
     $comments = $commentObject->getComments($pageinfo['ID'], NULL);
     sSmarty()->assign("isLoggedIn", $isLoggedIn);
     sSmarty()->assign("commentError", $commentError);
     sSmarty()->assign("commentCount", $commentCount);
     sSmarty()->assign("commentPermission", $commentPermission);
     sSmarty()->assign("commentSettings", $commentSettings);
     sSmarty()->assign("commentStatus", $commentStatus);
     sSmarty()->assign("comments", $comments);
 }
开发者ID:nrueckmann,项目名称:yeager,代码行数:58,代码来源:extension.php

示例6: __construct

 /**
  * Constructor of the History class
  *
  * @param int $sourceId Source Id
  * @param object $permissions Permissions Object
  * @param int $siteId Site Id
  */
 function __construct(&$object = NULL, $sourceId, $permissions, $siteId = 0)
 {
     $this->_table = "yg_history";
     $this->_sourceid = $sourceId;
     $this->_siteID = (int) $siteId;
     $this->_uid =& sUserMgr()->getCurrentUserID();
     $this->_object =& $object;
     $this->permissions =& $permissions;
 }
开发者ID:nrueckmann,项目名称:yeager,代码行数:16,代码来源:history.php

示例7: __construct

 /**
  * Constructor of the Tag class
  *
  * @param object $object Object from which the Tag class was instantiated
  */
 function __construct(&$object = NULL)
 {
     $this->_db = sYDB();
     $this->_uid =& sUserMgr()->getCurrentUserID();
     $this->table = "yg_tags_tree";
     $this->tree = new tree($this);
     $this->permissions = new Permissions("yg_tags_permissions", $this);
     $this->_object =& $object;
     $this->fetchIdentifiers();
 }
开发者ID:nrueckmann,项目名称:yeager,代码行数:15,代码来源:tags.php

示例8: __construct

 /**
  * Constructor of the Scheduler class
  *
  * @param string $table Database table for the Scheduler instance
  * @param int $objecttype Object type
  */
 function __construct($table, $objecttype)
 {
     $this->_uid = sUserMgr()->getCurrentUserID();
     $objecttype = (int) $objecttype;
     $this->_table = $table;
     $this->_objecttype = $objecttype;
     if (strlen($table) < 2) {
         return false;
     }
 }
开发者ID:nrueckmann,项目名称:yeager,代码行数:16,代码来源:scheduler.php

示例9: __construct

 /**
  * Constructor of the Properties class
  *
  * @param string $table Name of the table into which the Properties will be saved
  * @param int $propertyId Property Id (versioned Object Id)
  */
 function __construct($table = '', $propertyId = NULL, &$object = NULL)
 {
     $this->_table = $table;
     $this->_uid =& sUserMgr()->getCurrentUserID();
     if ($propertyId == NULL) {
         return;
     }
     $this->_property_id = $propertyId;
     if ($object) {
         $this->_object =& $object;
     }
 }
开发者ID:nrueckmann,项目名称:yeager,代码行数:18,代码来源:properties.php

示例10: __construct

 /**
  * Constructor of the PageMgr class
  */
 public function __construct()
 {
     $this->_db = sYDB();
     $this->_uid =& sUserMgr()->getCurrentUserID();
     $this->_config = $config;
     $this->table = "yg_mailing_tree";
     $this->tree = new tree($this);
     $this->permissions = new Permissions("yg_mailing_permissions", $this);
     $this->history = new History($this, "mailing", $this->permissions);
     $this->tags = new Tags($this);
     $this->properties = new PropertySettings("yg_mailing_props");
     $this->scheduler = new Scheduler("yg_cron", SCHEDULER_MAILING);
     $this->templates = new Templates();
 }
开发者ID:nrueckmann,项目名称:yeager,代码行数:17,代码来源:mailingmgr.php

示例11: __construct

 /**
  * Constructor of the CblockMgr class
  */
 function __construct()
 {
     $this->_db = sYDB();
     $this->_uid = sUserMgr()->getCurrentUserID();
     $this->table = "yg_contentblocks_tree";
     $this->tree = new tree($this);
     $this->permissions = new Permissions($this->getPermissionsTable(), $this);
     $this->history = new History($this, HISTORYTYPE_CO, $this->permissions);
     $this->tags = new Tags($this);
     $this->properties = new PropertySettings("yg_contentblocks_props");
     $this->tags->_dobjectpropertytable = "yg_contentblocks_propsv";
     $this->scheduler = new Scheduler("yg_cron", SCHEDULER_CO);
     $this->control = new Entrymasks();
 }
开发者ID:nrueckmann,项目名称:yeager,代码行数:17,代码来源:cblockmgr.php

示例12: __construct

 /**
  * Constructor of the File class
  *
  * @param int $fileId File Id
  * @param int $version Version
  */
 public function __construct($fileId = 0, $version = 0)
 {
     $this->_uid =& sUserMgr()->getCurrentUserID();
     $this->_id = $fileId;
     $this->initTables();
     $this->permissions = new Permissions($this->_table_permissions, $this);
     parent::__construct($this->_id, $version, $this->_table_object, $this->_table_tree, $this->permissions);
     $this->history = new History($this, HISTORYTYPE_FILE, $this->permissions);
     $this->tags = new Tags($this);
     $this->comments = new Comments($this);
     $this->properties = new Properties($this->_table_properties, $this->getPropertyId(), $this);
     $this->scheduler = new Scheduler($this->_table_scheduler, SCHEDULER_FILE);
     $this->views = new Views($this);
     $this->filetypes = new Filetypes();
 }
开发者ID:nrueckmann,项目名称:yeager,代码行数:21,代码来源:file.php

示例13: __construct

 /**
  * Constructor of the PageMgr class
  *
  * @param int $siteId Site Id
  */
 public function __construct($siteId)
 {
     $this->_db = sYDB();
     $this->_uid =& sUserMgr()->getCurrentUserID();
     $this->_config = $config;
     $this->_site = (int) $siteId;
     $this->table = "yg_site_" . $this->_site . "_tree";
     $this->tree = new tree($this);
     $this->permissions = new Permissions("yg_site_" . $this->_site . "_permissions", $this);
     $this->history = new History($this, "site_" . $this->_site, $this->permissions, $this->_site);
     $this->tags = new Tags($this);
     $this->properties = new PropertySettings("yg_site_" . $this->_site . "_props");
     $this->scheduler = new Scheduler("yg_site_" . $this->_site . "_cron", SCHEDULER_PAGE);
     $this->templates = new Templates();
 }
开发者ID:nrueckmann,项目名称:yeager,代码行数:20,代码来源:pagemgr.php

示例14: __construct

 /**
  * Constructor of the Cblock class
  *
  * @param int $cbId Cblock Id
  * @param int $version Version
  */
 public function __construct($cbId = 0, $version = 0)
 {
     $this->_uid =& sUserMgr()->getCurrentUserID();
     // object descriptor
     $this->_id = $cbId;
     $this->initTables();
     $this->permissions = new Permissions($this->_table_permissions, $this);
     parent::__construct($this->_id, $version, $this->_table_object, $this->_table_tree, $this->permissions);
     $this->history = new History($this, HISTORYTYPE_CO, $this->permissions);
     $this->tags = new Tags($this);
     $this->properties = new Properties($this->_table_properties, $this->getPropertyId(), $this);
     $this->scheduler = new Scheduler($this->_table_scheduler, SCHEDULER_CO);
     $this->control = new Entrymasks();
     $this->comments = new Comments($this);
 }
开发者ID:nrueckmann,项目名称:yeager,代码行数:21,代码来源:cblock.php

示例15: __construct

 /**
  * Constructor of the Page class
  *
  * @param int $siteID Site Id
  * @param int $pageID Page Id
  * @param int $version Version
  */
 public function __construct($siteID = 1, $pageID = 0, $version = 0)
 {
     $this->_uid =& sUserMgr()->getCurrentUserID();
     if ($siteID < 1) {
         return false;
     }
     $this->_site = $siteID;
     $this->_id = $pageID;
     $this->initTables();
     $this->permissions = new Permissions($this->_table_permissions, $this);
     parent::__construct($this->_id, $version, $this->_table_object, $this->_table_tree, $this->permissions);
     $this->history = new History($this, $this->_id_history, $this->permissions, $this->_site);
     $this->tags = new Tags($this);
     $this->comments = new Comments($this);
     $this->properties = new Properties($this->_table_properties, $this->getPropertyId(), $this);
     $this->scheduler = new Scheduler($this->_table_scheduler, SCHEDULER_PAGE);
 }
开发者ID:nrueckmann,项目名称:yeager,代码行数:24,代码来源:page.php


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