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


PHP Authentication::getUserObject方法代码示例

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


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

示例1: date

                echo date('H:i', strtotime($event->getRemindMeTime()));
            } else {
                echo $event->getRemindMeTime();
            }
            echo ' ';
        }
        echo '<i class="fa fa-clock-o"></i> ';
        if ($event->getAllDay() == '1') {
            echo "all day";
        } else {
            echo $start_time . '-' . $end_time;
        }
        echo '</small>';
        echo '&nbsp;<i class="fa fa-info-circle"></i> ';
        echo $event->getDescription() . ' <small><a href="/edit_evt.php?id=' . $event->getId() . '">edit</a>';
        if ($event->getUserId() == Authentication::get_user() || PermissionMgr::groupHasPermission(Authentication::getUserObject()->getGroupId(), 'is_administrator')) {
            echo '&nbsp;<a href="#" onclick="deleteEvt(' . $event->getId() . ', \'' . htmlspecialchars($event->getDescription()) . '\')">delete</a>';
        }
        echo '</small></h5>';
        $number += 1;
    }
    if ($number == 0) {
        echo '<i>No events on this date.</i>';
    }
    $date = date("Y-m-d", strtotime("+1 day", strtotime($date)));
    echo '<hr>';
}
?>
     
	
	
开发者ID:ryunoneil,项目名称:a2-comp4,代码行数:28,代码来源:calendar.php

示例2: navbar


//.........这里部分代码省略.........
    if ($active == 0) {
        ?>
class="active"<?php 
    }
    ?>
><a href="<?php 
    if ($active == 0) {
        ?>
#<?php 
    } else {
        ?>
index.php<?php 
    }
    ?>
"><span class="glyphicon glyphicon-home" aria-hidden="true"></span>&nbsp;Home <!--<span class="sr-only">(current)</span>--></a></li>
					<li <?php 
    if ($active == 1) {
        ?>
class="active"<?php 
    }
    ?>
><a href="<?php 
    if ($active == 1) {
        ?>
#<?php 
    } else {
        ?>
timetable.php<?php 
    }
    ?>
"><span class="fa fa-table" aria-hidden="true"></span>&nbsp;Timetable</a></li>
					<li <?php 
    if ($active == 2) {
        ?>
class="active"<?php 
    }
    ?>
><a href="<?php 
    if ($active == 2) {
        ?>
#<?php 
    } else {
        ?>
tasks.php<?php 
    }
    ?>
"><span class="fa fa-check" aria-hidden="true"></span>&nbsp;Tasks <span class="badge"><?php 
    echo TaskList::getAllOutstandingCount(Authentication::get_user());
    ?>
</span></a></li>
					<li <?php 
    if ($active == 4) {
        ?>
class="active"<?php 
    }
    ?>
><a href="<?php 
    if ($active == 4) {
        ?>
#<?php 
    } else {
        ?>
calendar.php<?php 
    }
    ?>
"><span class="glyphicon glyphicon-calendar" aria-hidden="true"></span>&nbsp;Calendar</a></li>
					<li <?php 
    if ($active == 3) {
        ?>
class="active"<?php 
    }
    ?>
><a href="<?php 
    if ($active == 3) {
        ?>
#<?php 
    } else {
        ?>
profile.php<?php 
    }
    ?>
"><span class="glyphicon glyphicon-user" aria-hidden="true"></span>&nbsp;You</a></li>
				</ul>
				
				<ul class="nav navbar-nav navbar-right">
					<li><a href="/<?php 
    echo APP_LOGOUT_LOC;
    ?>
"><i class="fa fa-sign-out"></i>&nbsp;Log out <?php 
    echo Authentication::getUserObject()->getUsername();
    ?>
</a></li>
				</ul>
			</div>
		</div>
	</nav>    
    
        
        <?php 
}
开发者ID:ryunoneil,项目名称:a2-comp4,代码行数:101,代码来源:ui.php

示例3: json_encode

         echo json_encode(array('status' => 'error', 'reason' => 'Task description not supplied.'));
     }
 } else {
     if ($_POST['action'] == "new_list") {
         if (isset($_POST['name'])) {
             if (empty(trim($_POST['name']))) {
                 echo json_encode(array('status' => 'validation', 'reason' => 'Your task list name is empty!'));
                 die;
             }
             /*if (strlen($_POST['name']) > 32)
             		{
             			echo json_encode(array('status'=>'validation', 'reason' => 'Your task list name is too long!'));
             			die();
             		}*/
             $tasklist = new TaskList();
             $tasklist->setUserId(Authentication::getUserObject()->getId());
             $tasklist->setName($_POST['name']);
             $tasklist->setIcon($_POST['icon']);
             $tasklist->save();
             echo json_encode(array('status' => 'success', 'tasklist-id' => $tasklist->getId()));
         } else {
             echo json_encode(array('status' => 'error', 'reason' => 'List name not supplied.'));
         }
     } else {
         if ($_POST['action'] == "delete_list") {
             if (isset($_POST['id'])) {
                 $list = TaskList::get($where = array('id' => $_POST['id']))[0];
                 foreach (Task::get($where = array('list_id' => $list->getId())) as $task) {
                     $task->delete();
                 }
                 $list->delete();
开发者ID:ryunoneil,项目名称:a2-comp4,代码行数:31,代码来源:tasks.php

示例4: head

<!DOCTYPE html>
<html lang="en">
<?php 
require 'config.php';
include DIR_LIB . 'helpers/ui.php';
Authentication::require_login();
?>
 
  
<head>
<?php 
head();
$user = Authentication::getUserObject();
?>

</head>
  <body>
	
	<?php 
navbar(3);
?>
	
    <div class="container" role="main">

	<div class="page-header">
    		<h1><span class="glyphicon glyphicon-user"></span>&nbsp;<?php 
echo htmlspecialchars($user->getUsername());
?>
 <small><?php 
$group = PermGroup::get($where = array('id' => $user->getGroupId()))[0];
开发者ID:ryunoneil,项目名称:a2-comp4,代码行数:30,代码来源:profile.php


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