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


PHP Jfactory::getuser方法代码示例

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


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

示例1: return

        return (str.indexOf("@") > 1);
    }
    
    function allreordering(){
        if(document.orderForm.direction.value=='asc')
            document.orderForm.direction.value='desc';
        else document.orderForm.direction.value='asc';

        document.orderForm.submit();
    }
</script>
    
    <?php 
if (!isset($_REQUEST['userId']) || $_REQUEST['userId'] == $my->id) {
    if (JRequest::getVar('option') == "com_simplemembership") {
        $user = Jfactory::getuser();
        $db = Jfactory::getDBO();
        $query = "SELECT * FROM #__booklibrary_lend AS b WHERE fk_userid = '{$user->id}'";
        $db->setQuery($query);
        $current_user_rent_history_array = $db->loadObjectList();
        $check_for_show_rent_history = 0;
        $option = 'com_booklibrary';
        if (isset($current_user_rent_history_array)) {
            foreach ($current_user_rent_history_array as $temp) {
                if ($temp->fk_userid == $user->id) {
                    $check_for_show_rent_history = 1;
                }
            }
        }
        if ($booklibrary_configuration['cb_mybook']['show'] == '1' && checkAccessBL($booklibrary_configuration['cb_mybook']['registrationlevel'], 'NORECURSE', userGID_BL($my->id), $acl)) {
            echo " <span class='books_button'><a class='my_btn my_btn-primary' href='" . JRoute::_('index.php?option=' . $option . '&task=show_my_books&tab=showmybooks&Itemid=' . $Itemid . $username . '&user=' . $userid . '&is_show_data=1' . '#tabs-2') . "'>" . _BOOKLIBRARY_LABEL_CBBOOKS_TT . "</a></span>";
开发者ID:rdegennaro,项目名称:Check-It,代码行数:31,代码来源:default.php

示例2: showRentHistory

    static function showRentHistory($option, $rows, $pageNav, $params)
    {
        global $my, $Itemid, $mosConfig_live_site, $mainframe, $booklibrary_configuration;
        $session = JFactory::getSession();
        $acl = JFactory::getACL();
        $arr = $session->get("array", "default");
        $doc = JFactory::getDocument();
        $doc->addStyleSheet($mosConfig_live_site . '/components/com_booklibrary/includes/booklibrary.css');
        $doc->addStyleSheet($mosConfig_live_site . '/components/com_booklibrary/includes/custom.css');
        // for 1.6
        $doc->addStyleSheet($mosConfig_live_site . '/components/com_booklibrary/includes/custom.css');
        if ($option == 'com_booklibrary') {
            $user = Jfactory::getuser();
            $db = Jfactory::getDBO();
            $query = "SELECT * FROM #__booklibrary_lend_request AS b WHERE b.status=0";
            $db->setQuery($query);
            $current_user_rent_request_array = $db->loadObjectList();
            $check_for_show_rent_request = 0;
            if (isset($current_user_rent_request_array)) {
                $check_for_show_rent_request = 1;
            }
            if ($booklibrary_configuration['cb_mybook']['show'] == '1' && checkAccessBL($booklibrary_configuration['cb_mybook']['registrationlevel'], 'NORECURSE', userGID_BL($my->id), $acl)) {
                echo "<span class='books_button'><a class='my_btn my_btn-primary' href='" . JRoute::_('index.php?option=' . $option . '&task=show_my_books&layout=mybooks') . "'>" . _BOOKLIBRARY_LABEL_CBBOOKS_TT . "</a></span>";
            }
            if ($booklibrary_configuration['cb_edit']['show'] == '1' && checkAccessBL($booklibrary_configuration['cb_mybook']['registrationlevel'], 'NORECURSE', userGID_BL($my->id), $acl)) {
                echo " <span class='books_button'><a class='my_btn my_btn-primary' href='" . JRoute::_('index.php?option=' . $option . '&task=showmybooks&layout=mybooks') . "'>" . _BOOKLIBRARY_LABEL_CBEDIT . "</a></span>";
            }
            if ($booklibrary_configuration['cb_history']['show']) {
                $params->def('show_history', 1);
                $i = checkAccessBL($booklibrary_configuration['cb_history']['registrationlevel'], 'NORECURSE', userGID_BL($my->id), $acl);
                if ($i) {
                    $params->def('show_history_registrationlevel', 1);
                }
                if ($params->get('show_history')) {
                    if ($params->get('show_history_registrationlevel')) {
                        if ($check_for_show_rent_request != 0) {
                            echo " <span class='books_button'>\n\t\t\t\t\t\t\t\t\t\t<a class='my_btn my_btn-primary' href='" . JRoute::_('index.php?option=com_booklibrary&task=rent_history_books&name=' . $user->name . '&user=' . $user->id . '&is_show_data=1') . "'>" . _BOOKLIBRARY_MY_LEND_HISTORY . "</a></span>";
                        }
                        //echo "<div style=\" border:1px solid black; padding: 10px; text-align:center; \">you dont have rent_history_lable</div>";
                    }
                }
            }
            if ($booklibrary_configuration['cb_rent']['show']) {
                $params->def('show_rent', 1);
                $i = checkAccessBL($booklibrary_configuration['cb_rent']['registrationlevel'], 'NORECURSE', userGID_BL($my->id), $acl);
                if ($i) {
                    $params->def('show_rent_registrationlevel', 1);
                }
                if ($params->get('show_rent')) {
                    if ($params->get('show_rent_registrationlevel')) {
                        if ($check_for_show_rent_request != 0) {
                            echo " <span class='books_button'><a class='my_btn my_btn-primary' href='" . JRoute::_('index.php?option=' . $option . '&task=rent_requests_cb_books&is_show_data=1') . "'>" . _BOOKLIBRARY_LEND_REQUESTS . "</a></span>";
                        }
                    }
                }
            }
            ?>
            <style type="text/css">
                .row0 {background-color:#F9F9F9;}
            </style><br/><br/><br/><?php 
        }
        ?>
        <?php 
        //---------------------------------------------------------------------------- view
        //echo " <span class='books_button'><a class='my_btn my_btn-primary' href='" . JRoute::_('index.php?option=com_booklibrary&task=show_my_books&layout=mybooks') . "'>" . _BOOKLIBRARY_LABEL_CBBOOKS_TT . "</a></span>";
        ?>

        <?php 
        if ($rows) {
            ?>
            <form class="g" action="index.php" method="get" name="adminForm" id="adminForm">
                <table cellpadding="4" cellspacing="0" border="0" width="100%" class="basictable my_table my_table-bordered
                       my_table-hover bl_all_categories_show_my_book_lend_history">
                    <tr>
                        <th align = "center" width="30">#</th>         
                        <th align = "center" class="title" width="5%" nowrap="nowrap"><?php 
            echo _BOOKLIBRARY_LABEL_BOOKID;
            ?>
</th>
                        <th align = "center" class="title" width="40%" nowrap="nowrap"><?php 
            echo _BOOKLIBRARY_LABEL_TITLE;
            ?>
</th>
                        <th align = "center" class="title" width="20%" nowrap="nowrap"><?php 
            echo _BOOKLIBRARY_ORDER_LEND_FROM;
            ?>
</th>
                        <th align = "center" class="title" width="20%" nowrap="nowrap"><?php 
            echo _BOOKLIBRARY_ORDER_LEND_UNTIL;
            ?>
</th>
                        <th align = "center" class="title" width="20%" nowrap="nowrap"><?php 
            echo _BOOKLIBRARY_SHOW_LEND_RETURN;
            ?>
</th>
                    </tr>


                    <?php 
            $numb = 0;
//.........这里部分代码省略.........
开发者ID:rdegennaro,项目名称:Check-It,代码行数:101,代码来源:booklibrary.html.php


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