本文整理汇总了PHP中Admin::getEmail方法的典型用法代码示例。如果您正苦于以下问题:PHP Admin::getEmail方法的具体用法?PHP Admin::getEmail怎么用?PHP Admin::getEmail使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Admin
的用法示例。
在下文中一共展示了Admin::getEmail方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: AdminEkle
function AdminEkle(Admin $admin)
{
try {
$sorgu = "insert into admin (username, ad, soyad, email, tel, dogumTarihi) values(?,?,?,?,?,?)";
$admindeger = array($admin->getUsername(), $admin->getAd(), $admin->getSoyad(), $admin->getEmail(), $admin->getTel(), $admin->getDogumTarihi());
$baglanti = new VeriTabaniBaglanti();
$conn = $baglanti->pdo_baglanti();
$ekle = $conn->prepare($sorgu);
$sonuc = $ekle->execute($admindeger);
if ($sonuc) {
$kul = new KullaniciGiris();
$kuldao = new KullaniciGirisDAO();
$sifre = $admin->getAd() . $admin->getSoyad();
$yeniSifre = $kuldao->sifreleme($sifre);
$kul->setEmail($admin->getEmail());
$kul->setSifre($yeniSifre);
$kul->setYetkiId(1);
echo '<p style="color: green;">Veriler Eklendi</p>';
echo $kuldao->KullaniciEkle($kul);
} else {
echo '<p style="color: red;">Hata Oluştu</p>';
}
} catch (PDOException $exc) {
echo $exc->getTraceAsString();
}
}
示例2: login
public function login(Admin $admin)
{
$query = "SELECT * FROM administradores WHERE usuario = :email AND senha = :senha";
$stmt = $this->conexao->prepare($query);
$stmt->bindValue(":email", $admin->getEmail(), PDO::PARAM_STR);
$stmt->bindValue(":senha", $admin->getSenha(), PDO::PARAM_STR);
$stmt->execute();
$rs_admin = $stmt->fetchAll(PDO::FETCH_ASSOC);
$objAdmin = array();
foreach ($rs_admin as $rs) {
$admin = new Admin();
$admin->setIdAdmin($rs['id_administrador']);
$_SESSION['id_admin'] = $rs['id_administrador'];
$_SESSION['email_admin'] = $rs['usuario'];
}
return $objAdmin;
}
示例3: salvaAdmin
/**
* Rende persistenti le modifiche all'anagrafica di un admin sul db
* @param Admin $a l'admin considerato
* @param mysqli_stmt $stmt un prepared statement
* @return int il numero di righe modificate
*/
private function salvaAdmin(Admin $a, mysqli_stmt $stmt)
{
$query = " update admins set \n password = ?,\n nome = ?,\n cognome = ?,\n email = ?,\n where admins.id = ?\n ";
$stmt->prepare($query);
if (!$stmt) {
error_log("[salvaAdmin] impossibile" . " inizializzare il prepared statement");
return 0;
}
if (!$stmt->bind_param('ssssi', $a->getPassword(), $a->getNome(), $a->getCognome(), $a->getEmail(), $a->getId())) {
error_log("[salvaAdmin] impossibile" . " effettuare il binding in input");
return 0;
}
if (!$stmt->execute()) {
error_log("[caricaRegistrati] impossibile" . " eseguire lo statement");
return 0;
}
return $stmt->affected_rows;
}
示例4: login
public function login(Admin $admin)
{
$this->setAuthenticated(true);
$this->setAttribute('mid', $admin->getMid(), 'admin');
$this->setAttribute('email', $admin->getEmail(), 'admin');
}
示例5: ucfirst
<h2><?php
echo $curUser->getFirstName() . " " . $curUser->getLastName();
?>
</h2>
<h4>Position: <?php
echo ucfirst($curUser->getUserType());
?>
</h4>
<hr/>
<ul class="icons-list">
<li><i class="icon-li fa fa-envelope"></i> <?php
echo $curUser->getEmail();
?>
</li>
<li>
<i class="icon-li fa fa-phone"></i>Mobile: <?php
echo $curUser->getMobileNum();
?>
</li>
</ul>
<?php
if ($curUser->isTutor()) {
?>
Major: <strong><?php
echo $curUser->getMajorId();
?>
示例6: header
} else {
if (isBtnSubmitReplaceCourse()) {
Tutor::updateTeachingCourse($curUser->getId(), $_POST['teachingCourse'], $_POST['hiddenUpdateCourseOldId'], $_POST['termId']);
header('Location: ' . BASE_URL . 'staff/edit/' . $staffId . '/success');
exit;
}
}
}
if (isSaveBttnProfilePressed()) {
$newDataAdded = false;
$newFirstName = $_POST['firstName'];
$newLastName = $_POST['lastName'];
$newEmail = $_POST['email'];
$oldFirstName = $curUser->getFirstName();
$oldLastName = $curUser->getLastName();
$oldEmail = $curUser->getEmail();
if (strcmp($newFirstName, $oldFirstName) !== 0) {
$user->validateName($newFirstName);
$user->updateInfo("f_name", "user", $newFirstName, $staffId);
$newDataAdded = true;
}
if (strcmp($newLastName, $oldLastName) !== 0) {
$user->validateName($newLastName);
$user->updateInfo("l_name", "user", $newLastName, $staffId);
$newDataAdded = true;
}
if (strcmp($newEmail, $oldEmail) !== 0) {
Person::validateNewEmail($newEmail, User::DB_TABLE);
$user->updateInfo("email", "user", $newEmail, $staffId);
$newDataAdded = true;
}
示例7: Admin
<?php
require_once 'User.php';
require_once 'Viewer.php';
require_once 'Admin.php';
$ingrid = new Admin("Ingrid", "ingrid@email.com");
$hugo = new Viewer("Hugo", "hugo@email.com");
echo $ingrid->getType() . " " . $ingrid->getName() . " has permission level:" . $ingrid->getLevel() . "<br>";
echo $ingrid->getName() . "s email adres is " . $ingrid->getEmail() . "<br>";
echo $hugo->getType() . " " . $hugo->getName() . "was created on" . $hugo->getDate();