本文整理汇总了PHP中manager::getmanagerbyid方法的典型用法代码示例。如果您正苦于以下问题:PHP manager::getmanagerbyid方法的具体用法?PHP manager::getmanagerbyid怎么用?PHP manager::getmanagerbyid使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类manager
的用法示例。
在下文中一共展示了manager::getmanagerbyid方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: user
include "php/manager.php";
$login = new user();
$logincheck = $login->islogin();
if ($logincheck != 1) {
header("location: index.php");
die;
}
$manager = new manager();
$sec = new security();
$name;
$age;
$email;
$address;
if ($_SERVER["REQUEST_METHOD"] == "GET") {
if (isset($_GET['id'])) {
$result = $manager->getmanagerbyid($_GET['id']);
$row = $result->fetch_assoc();
$name = $row['Name'];
$age = $row['Age'];
$email = $row['Email'];
$address = $row['Address'];
}
}
if ($_SERVER["REQUEST_METHOD"] == "POST") {
$id = $sec->escape($_POST['managerid']);
$managername = $sec->escape($_POST["managername"]);
$managerlength = $sec->checknullwithoutwhitespace($managername);
$managerage = $sec->escape($_POST["managerage"]);
$manageremail = $sec->escape($_POST["manageremail"]);
$manageraddress = $sec->escape($_POST["manageraddress"]);
if ($managerlength != 0) {
示例2:
echo "</td>";
echo "<td>";
echo $row['Sname'];
echo "</td>";
echo "<td>";
echo $row['Address'];
echo "</td>";
echo "<td>";
echo $row['Telephone'];
echo "</td>";
if ($row['Manager1ID'] == 0) {
echo "<td>";
echo "<a href='setmanagers.php?schoolid={$row['ID']}&shift=1'>انتخاب</a>";
echo "</td>";
} else {
$managerres = $manager->getmanagerbyid($row['Manager1ID']);
$managerrow = $managerres->fetch_assoc();
echo "<td>";
echo "<a href='setmanagers.php?schoolid={$row['ID']}&shift=1'>{$managerrow['Name']}</a>";
echo "</td>";
}
if ($row['Manager2ID'] == 0) {
echo "<td>";
echo "<a href='setmanagers.php?schoolid={$row['ID']}&shift=2'>انتخاب</a>";
echo "</td>";
} else {
$managerres = $manager->getmanagerbyid($row['Manager2ID']);
$managerrow = $managerres->fetch_assoc();
echo "<td>";
echo "<a href='setmanagers.php?schoolid={$row['ID']}&shift=2'>{$managerrow['Name']}</a>";
echo "</td>";