本文整理汇总了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");
}
示例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;
}
示例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);
}
示例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'));
}
示例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);
}
示例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;
}
示例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();
}
示例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;
}
}
示例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;
}
}
示例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();
}
示例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();
}
示例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();
}
示例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();
}
示例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);
}
示例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);
}