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