當前位置: 首頁>>代碼示例>>PHP>>正文


PHP manager::getmanagerbyid方法代碼示例

本文整理匯總了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) {
開發者ID:padratec,項目名稱:school-last,代碼行數:31,代碼來源:editmanager.php

示例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>";
開發者ID:padratec,項目名稱:school-last,代碼行數:31,代碼來源:schools.php


注:本文中的manager::getmanagerbyid方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。