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


PHP Student::get_id方法代码示例

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


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

示例1: foreach

's buddies</h1>
				</div>
				<?php 
$buddies_pending = $student->get_number_of_buddies_pending();
if ($buddies_pending > 0) {
    ?>
					<div class="content-box" id="pending-buddy-list">
						<?php 
    $pending_buddy_ids = $student->get_all_pending_buddy_ids();
    foreach ($pending_buddy_ids as $pending_buddy_id) {
        $pending_buddy = new Student($pending_buddy_id);
        ?>
							<div class="buddy-pending-entry">
								<form action="" method="POST">
									<input type="hidden" name="buddyId" value="<?php 
        echo $pending_buddy->get_id();
        ?>
">
									<div class="col-lg-3 col-md-3 col-sm-3 col-xs-3">
										<img src="<?php 
        echo $pending_buddy->get_avatar();
        ?>
" class="student-avatar">
									</div>
									<div class="col-lg-9 col-md-9 col-sm-9 col-xs-9">
										<a href="<?php 
        echo BASE;
        ?>
student/<?php 
        echo strtolower($pending_buddy->get_username());
        ?>
开发者ID:DonBananos,项目名称:studyteam,代码行数:31,代码来源:buddies.php

示例2: Student

	<script>window.location = "<?php 
    echo BASE;
    ?>
";</script>
	<?php 
    die;
}
$student = new Student($_SESSION['user_id']);
$gc = new Group_controller();
if (isset($_POST['addGroupSubmit'])) {
    $name = $_POST['groupName'];
    $category = $_POST['category'];
    $public = $_POST['privacy'];
    $max = $_POST['maxMembers'];
    $desc = $_POST['desc'];
    $new_group_result = $gc->create_new_group($name, $public, $category, $max, $student->get_id(), $desc);
    if ($new_group_result !== FALSE) {
        $new_group = new Group($new_group_result);
        //Since group is created, we save the creator as a member with 'owner' level.
        $new_group->add_student_to_group($student->get_id(), 3);
    }
}
?>
<html>
    <head>
        <meta charset="UTF-8">
        <title>Groups | StudyTeam</title>
		<?php 
require '../includes/header.php';
?>
    </head>
开发者ID:DonBananos,项目名称:studyteam,代码行数:31,代码来源:index.php

示例3: foreach

echo $student_visited->get_number_of_buddies();
?>
)</h3>
							<hr class="minor-line">
							<?php 
$buddy_ids = $student_visited->get_all_buddy_ids();
if (is_array($buddy_ids) && count($buddy_ids) > 0) {
    foreach ($buddy_ids as $buddy_id) {
        $buddy = new Student($buddy_id);
        ?>
									<div class="row">
										<a href="<?php 
        echo BASE;
        ?>
student/details.php?id=<?php 
        echo $buddy->get_id();
        ?>
">
											<div class="col-lg-3 col-md-3 col-sm-3 col-xs-3">
												<img src="<?php 
        echo $buddy->get_avatar();
        ?>
" class="student-avatar">
											</div>
											<div class="col-lg-9 col-md-9 col-sm-9 col-xs-9">
												<h4 class="student-name">
													<?php 
        echo $buddy->get_fullname();
        ?>
												</h4>
											</div>
开发者ID:DonBananos,项目名称:studyteam,代码行数:31,代码来源:details.php

示例4: Student

}
$student = new Student($_SESSION['user_id']);
/*
 * Handle Reply's
 */
$theres_a_message = FALSE;
if (isset($_POST['acceptAndGo']) || isset($_POST['accept'])) {
    $invite_id = sanitize_int($_POST['invid']);
    $group_id = sanitize_int($_POST['gid']);
    if (!validate_int($invite_id) || !validate_int($group_id)) {
        die("You naughty bastard!");
    }
    if ($student->check_if_invite_for_group_is_pending($group_id)) {
        if ($student->accept_pending_invite($invite_id) === true) {
            $group_for_accept = new Group($group_id);
            if ($group_for_accept->add_student_to_group($student->get_id())) {
                if (isset($_POST['acceptAndGo'])) {
                    ?>
					<script>window.location = "<?php 
                    echo BASE;
                    ?>
group/<?php 
                    echo $group_id;
                    ?>
/"</script>
					<?php 
                    die;
                } else {
                    $message = "You have been added to the group!";
                    $theres_a_message = TRUE;
                }
开发者ID:DonBananos,项目名称:studyteam,代码行数:31,代码来源:invites.php


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