本文整理汇总了PHP中Member::search方法的典型用法代码示例。如果您正苦于以下问题:PHP Member::search方法的具体用法?PHP Member::search怎么用?PHP Member::search使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Member
的用法示例。
在下文中一共展示了Member::search方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: actionExportExcel
public function actionExportExcel()
{
$model = new Member('search');
$model->unsetAttributes();
// clear any default values
if (isset($_GET['Member'])) {
$model->attributes = $_GET['Member'];
}
$this->widget('application.extensions.phpexcel.EExcelView', array('dataProvider' => $model->search(), 'title' => 'Member', 'autoWidth' => true, 'columns' => array('username', 'title', 'first_name', 'last_name', 'email', 'phone', 'company_name', 'address', 'birthday', 'gender', 'created_time', 'last_update_time', 'last_update_by', 'last_login', 'last_login_ip', 'status:status')));
}
示例2: getPendingReturns
public static function getPendingReturns($member_nic = null)
{
if (isset($member_nic)) {
$member = Member::search(["member_nic" => $member_nic]);
$extra = "AND member_id=" . $member->getId();
} else {
$extra = "";
}
$sql = "SELECT DISTINCT t.transaction_id,transaction_description,t.borrowed_date,t.expected_return_date,member_id FROM transaction t,item_transaction it WHERE t.transaction_id=it.transaction_id AND status=0 " . $extra . ";";
$result = DB::getInstance()->directSelect($sql);
$trans = array();
foreach ($result as $key => $value) {
$data = array("id" => $value["transaction_id"], "purpose" => $value["transaction_description"], "borrow_comment" => null, "return_comment" => null, "member_id" => $value["member_id"], "borrowed_date" => $value["borrowed_date"], "expected_return_date" => $value["expected_return_date"]);
$t = new Transaction();
$t->create($data);
$trans[] = $t;
}
return $trans;
}
示例3: array
case "Temporary Member":
$search_term = "tmp_mem";
break;
//echo $search_term;
}
$results = DB::getInstance()->search("member_role", array("role" => $search_term));
//print_r($results);
$members;
foreach ($results as $result) {
$members[] = Member::search(array("member_id" => $result['member_id']));
}
} elseif ($search_methode == "2") {
$members[] = Member::search(array("member_nic" => $search_term));
//print_r($members);
} elseif ($search_methode == "3") {
$members[] = Member::search(array("member_email" => $search_term));
//print_r($members);
}
//print_r($members);
//echo $search_methode;
//echo $search_term;
echo "<br><br><div class='datagrid'><table>\n\t<thead><tr><th>Initials</th><th>Surname</th><th>Email</th><th>Remarks</th></tr></thead>";
$x = 0;
foreach ($members as $member) {
if (isset($member)) {
$x = 1;
$initials = $member->getInitials();
$surname = $member->getSurname();
$email = $member->getEmail();
$remarks = $member->getRemarks();
echo "\n <tbody><tr><td>{$initials}</td><td>{$surname}</td><td>{$email}</td><td>{$remarks}</td></tr>\n <tr class=\"alt\">\n </tr>\n </tbody>\n ";
示例4:
<?php
require_once './resource/config/connectDB.php';
require_once './resource/models/member.php';
$member = Member::search($searchTerms, $conn);
示例5: explode
<?php
require_once 'core/init.php';
if (isset($_SESSION["logged_in_user"])) {
$username = $_SESSION["logged_in_user"];
$member = Member::search(array("member_email" => $username));
$name = $member->getInitials() . " " . $member->getSurname();
$r = explode(",", $member->getRoles());
$roles = array_map('trim', $r);
$_SESSION["roles"] = $roles;
} else {
header("location: homepage.php");
}
?>
<link rel="stylesheet" type="text/css" href="css/header.css" />
<div id="headerwrap">
<div id="header">
<div id="logo">
<img src="img/logo.png" width="70px" height="70px" alt="UCSC logo"/>
</div>
<div id="title">
<font face="Agency FB" color="#b5dfeb" size="6px" >Electronic Laboratory <br> Management System</font>
</div>
<div style="float:right; padding:27px;">
<font face="Calibri" color="white" size="4">You are logged in as <strong><span style="text-transform:uppercase;"><a class="head"><?php
echo $name;
?>
</a></span></strong></font>
示例6: crypt
<?php
require_once 'core/init.php';
$password = "nalinda";
$hash = crypt($password);
$io = Member::search(["member_nic" => "931390473"]);
print_r($io);
///echo $hash;
if (password_verify("nalinda", $hash)) {
//echo strlen($hash);
} else {
echo "invalid";
}
echo "test";
//echo date_format(date_add(DateTime::createFromFormat('d/m/Y', date("d/m/Y")),date_interval_create_from_date_string("5 years")),"d/m/Y");
echo date("d/m/Y");
$a = Item::search(["item_id" => 2]);
print_r($a);
$sql = "UPDATE item_copy SET item_copy_status=1;";
DB::getInstance()->directUpdate($sql);
$data = array("id" => null, "purpose" => "sdasd", "comment" => "asdsdf", "member_id" => 16);
$salt = '5&JDDlwz%Rwh!t2Yg-Igae@QxPzFTSId';
$enc_pass = md5($salt . 'admin');
echo "paswowkjhkfjw";
DB::getInstance()->directUpdate("UPDATE member SET member_password='{$enc_pass}' WHERE member_nic='000000000';");
$t = new Transaction();
$t->create($data);
$t->add();
print_r(DB::getInstance()->search("schedule", ["semester_no" => 2]));
示例7: login
public static function login($username, $password)
{
$member = Member::search(array("member_email" => $username));
$salt = '5&JDDlwz%Rwh!t2Yg-Igae@QxPzFTSId';
$enc_pass = md5($salt . $password);
if ($member != null) {
if ($member->getPassword() == $enc_pass) {
return true;
} else {
return false;
}
} else {
return false;
}
}
示例8: _doSearch
public static function _doSearch()
{
$name = trim($_POST['name']);
$results = Member::search($name);
Flight::render('member/search', compact('results'));
}
示例9: header
<?php
require_once 'core/init.php';
$member_role = $_SESSION['roles'];
if (in_array("Laboratory Assistant", $member_role)) {
} else {
header('location:restricted_page.php');
}
$searchValue = $_GET["searchVal"];
$new_member = Member::search(["member_nic" => $searchValue]);
$_SESSION["sv"] = $searchValue;
if ($new_member) {
$_SESSION["items"] = array();
$_SESSION["basket"] = array();
$remark = $new_member->getRemarks();
if ($remark == "Borrow Allowed") {
$bgcolor = "#00FF00";
} else {
$bgcolor = "#FF0000";
}
echo "<div>";
echo "<fieldset>";
echo "<legend>Member Details</legend>";
echo "<div style='display:inline-block'>";
echo "<img src='img/profile_pictures/" . $new_member->getNicNo() . ".jpg' width='100' hight='120' style='border:1px solid #ccc;'/>";
echo "</div>";
echo "<div style='display:inline-block;vertical-align:top' class='datagrid'>";
echo "<table style='padding:20px;'>";
echo "<tbody><tr><td>Name :<th><td>" . $new_member->getInitials() . " " . $new_member->getSurname() . "<td><tr>";
echo "<tr><td>Role/s :<th><td>" . $new_member->getRoles() . "<td><tr>";
echo "<tr><td>Remarks :<th><td bgcolor=\"{$bgcolor}\">" . $remark . "<td><tr>";
示例10: completeReturn
include "includes/header.php";
?>
<?php
include "includes/leftnav.php";
?>
<div id="contentwrap">
<div id="content">
<form id="returnForm" onsubmit="return completeReturn();">
<h3>Transaction Details</h3>
<div class="datagrid">
<?php
$value = Transaction::searchPendingReturns($_GET["t_id"]);
$member = Member::search(["member_id" => $value->getMemberId()]);
$name = $member->getInitials() . " " . $member->getSurname();
$nic = $member->getNicNo();
$tid = $value->getTransactionId();
$desc = $value->getPurpose();
$bdate = $value->getBorrowedDate();
$edate = $value->getExpectedReturnDate();
$bcomment = $value->getBorrowComment();
$rcomment = $value->getReturnComment();
?>
<table>
<tr><th>Transaction ID</th><td><?php
echo $tid;
?>
</td></tr>
<tr><th>Member Name</th><td><?php