本文整理汇总了PHP中Classes::find_by_id方法的典型用法代码示例。如果您正苦于以下问题:PHP Classes::find_by_id方法的具体用法?PHP Classes::find_by_id怎么用?PHP Classes::find_by_id使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Classes
的用法示例。
在下文中一共展示了Classes::find_by_id方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1:
echo 'Active';
} else {
echo 'Not Active';
}
?>
</p>
<a href="index.php">back to sessions</a>
<table id="tbschedualdisplay">
<tr class="tabletitle"><td>Class Dates</td><td>Spots</td><td>Available</td><td class="notes">Notes</td><td>View</td><td>Update</td><td>Delete</td></tr>
<?php
Classes::displayclass($_GET['sid']);
?>
</table>
<?php
if (isset($_GET['updtclss'])) {
$updateclass = Classes::find_by_id($_GET['updtclss']);
?>
<h2>Update Class of: <?php
echo DateManager::frontdisplaytimefromtmstp($updateclass->c_date);
?>
</h2>
<form action="classes-view.php?sid=<?php
echo $_GET['sid'];
?>
" method="post">
<input type="hidden" value="<?php
echo $updateclass->id;
?>
" name="cls_id" />
Class Date: <input type="datetime" maxlength="40" name="class-date" value="<?php
示例2: Securimage
<?php
require_once "includesmain/session.php";
require_once "includesmain/functions.php";
require_once "includesmain/database.php";
require_once "includesmain/class.php";
require_once "includesmain/client.php";
require_once "includesmain/class_session.php";
require_once "securimage/securimage.php";
require_once "includesmain/datemanager.php";
$securimage = new Securimage();
$activesession = ClassSession::getactivesession();
$classtojoin = Classes::find_by_id($_GET['join']);
$sessiontojoin = ClassSession::find_by_id($classtojoin->sessionid);
if (isset($_POST['p_firstname'])) {
if (!$securimage->check($_POST['captcha_code'])) {
$captchaerror = TRUE;
} else {
$mailtotest = $database->escape_value($_POST['email']);
$alreadyclient = Client::find_by_email($mailtotest);
if ($alreadyclient) {
if ($_POST['k_firstname'] == $alreadyclient->k_firstname) {
$kidalreadyregistered = true;
}
}
if (!$kidalreadyregistered) {
Client::addclienttodatabase($_POST['clsid'], $_POST['p_firstname'], $_POST['p_lastname'], $_POST['k_firstname'], $_POST['k_lastname'], $_POST['phone'], $_POST['email'], $_POST['coupon']);
$insertedid = $database->insert_id();
redirect_to('view-details.php?tclt=' . $insertedid . '&cls=' . $_POST['clsid']);
} else {
redirect_to('complete.php');
示例3: redirect_to
if (isset($_GET['rmvclt'])) {
Client::rmvclt($_GET['rmvclt']);
}
$classexst = Classes::find_by_id($_GET['clsid']);
if (!$classexst) {
redirect_to("index.php");
}
//Adding a session to the db
if (isset($_POST['p_firstname'])) {
Client::addclienttodatabase($_POST['clsid'], $_POST['p_firstname'], $_POST['p_lastname'], $_POST['k_firstname'], $_POST['k_lastname'], $_POST['phone'], $_POST['email'], $_POST['coupon']);
}
if (isset($_POST['c_id'])) {
Client::updateclient($_POST['c_id'], $_POST['u_p_firstname'], $_POST['u_p_lastname'], $_POST['u_k_firstname'], $_POST['u_k_lastname'], $_POST['u_phone'], $_POST['u_email'], $_POST['u_coupon']);
}
//finding the info on the class session
$currentclass = Classes::find_by_id($_GET['clsid']);
$loggedinuser = User::showmeuser($_SESSION['user_id']);
include '../includes/pagestructure.php';
include '../includes/smartbanner.php';
include '../includes/smartnav.php';
adminhead('Welcome to Urban Illustration');
admintopbar();
?>
<div id="content">
<div id="maincontent">
<div class="textcontentalone">