本文整理汇总了PHP中Client::getEmail方法的典型用法代码示例。如果您正苦于以下问题:PHP Client::getEmail方法的具体用法?PHP Client::getEmail怎么用?PHP Client::getEmail使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Client
的用法示例。
在下文中一共展示了Client::getEmail方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: editClient
/**
* Modify a client saved in the database.
*
* @param Client $client
* @return integer
*/
public function editClient(Client $client)
{
$mcrypt = new MCrypt();
$sql = "UPDATE client \n\t\t\tSET id_client = '" . $client->getIdClient() . "', client_name = '" . replaceCharacters($client->getClientName()) . "', agent = '" . replaceCharacters($client->getAgent()) . "', address = '" . replaceCharacters($client->getAddress()) . "', phone = '" . $client->getPhone() . "', email = '" . $client->getEmail() . "', website = '" . $client->getWebsite() . "', user = '" . $client->getUser() . "', password = '" . $mcrypt->encrypt($client->getPassword()) . "' WHERE id_client = '" . $client->getIdClient() . "'";
return DB::query($sql);
}
示例2: actionSaveClient
function actionSaveClient($currentProject)
{
$backUrl = $this->context->getFlowScopeAttr("backUrl");
$projectID = $this->context->getRequestAttr("projectID");
$edit = $this->context->getRequestAttr("edit");
$client = new Client();
$clientErrs = array();
$client->setId($this->context->getRequestAttr("id"));
$client->setPid($this->context->getRequestAttr("projectID"));
$client->setName($this->context->getRequestAttr("name"));
if (!is_null($client->getName())) {
$client->setName(trim($client->getName()));
if (strlen($client->getName()) < 1) {
$client->setName(null);
}
}
if (is_null($client->getName())) {
$clientErrs["name"] = "field.error.empty";
}
$client->setEmail($this->context->getRequestAttr("email"));
if (!is_null($client->getEmail())) {
$client->setEmail(trim($client->getEmail()));
if (strlen($client->getEmail()) < 1) {
$client->setEmail(null);
}
}
if (is_null($client->getEmail())) {
$clientErrs["email"] = "field.error.empty";
}
$client->setTelephone($this->context->getRequestAttr("telephone"));
if (!is_null($client->getTelephone())) {
$client->setTelephone(trim($client->getTelephone()));
if (strlen($client->getTelephone()) < 1) {
$client->setTelephone(null);
}
}
$client->setCustomer($this->context->getRequestAttr("customer"));
if (!is_null($client->getCustomer())) {
$client->setCustomer(trim($client->getCustomer()));
if (strlen($client->getCustomer()) < 1) {
$client->setCustomer(null);
}
}
$client->setComment($this->context->getRequestAttr("comment"));
if (!is_null($client->getComment())) {
$client->setComment(trim($client->getComment()));
if (strlen($client->getComment()) < 1) {
$client->setComment(null);
}
}
$client->setPeriodical(false);
$client->setPeriodicalid(0);
$timeZone = new DateTimeZone("Europe/Vilnius");
$time = new DateTime("now", $timeZone);
$client->setR_date($time->format("Y-m-d H:i:s"));
$client->setR_user(777);
$client->setActive(true);
$this->context->setFlashScopeAttr("createClient", $client);
$this->context->setFlashScopeAttr("clientErrs", $clientErrs);
$this->context->setFlashScopeAttr("projectID", $projectID);
if (count($clientErrs) >= 1) {
if (!is_null($backUrl)) {
header("Location: " . $backUrl);
return true;
}
return false;
}
$insert = true;
$store = $this->storeClient($client);
if (!$store) {
if (!is_null($backUrl)) {
header("Location: " . $backUrl);
return true;
}
return false;
}
if ($insert && $edit == 0) {
$eventHistory = new EventHistory();
$eventHistory->setPid($client->getPid());
$eventHistory->setCid($client->getId());
$eventHistory->setR_date($client->getR_date());
$eventHistory->setDescription("Sukurtas partnerio");
$this->storeEventHistory($eventHistory);
}
$this->cancelClientCreate();
if (!is_null($backUrl)) {
header("Location: " . $backUrl);
return true;
}
return false;
}
示例3: Book
<?php
require 'connect.php';
require 'client/Book.php';
require 'client/Employee.php';
require 'client/Client.php';
require 'client/Hire.php';
$book = new Book(1, 'Metro', 'Gluhowsky', 'apokalipsa');
$employee = new Employee(2, 'Jan', 'Kowalski', 'asdasdasdas@gmail.com', 'Warszawa');
$client = new Client(3, 'Anna', 'Kowalska', 'sadassdadas@o2.pl');
$hire = new Hire(4, $book, $employee, '2015-12-15', '2015-12-26');
$query = "INSERT INTO `book` (`id`, `title`, `author`, `type`) VALUES ('1', '{$book->getTitle()}', '{$book->getAuthor()}', '{$book->getType()}')";
$libraryRequest = mysql_query($query);
$query = "INSERT INTO `employee` (`id`, `firstname`, `lastname`, `email`, `city`) VALUES ('2', '{$employee->getfirstName()}', '{$employee->getlastName()}', '{$employee->getEmail()}', '{$employee->getCity()}')";
$libraryRequest = mysql_query($query);
$query = "INSERT INTO `client` (`id`, `firstname`, `lastname`, `email`) VALUES ('3', '{$client->getfirstName()}', '{$client->getlastName()}', '{$client->getEmail()}')";
$libraryRequest = mysql_query($query);
$query = "INSERT INTO `hire` (`id`, `id_client`, `id_book`, `id_employee`, `hiredate`, `returndate`) VALUES ('4', '{$client->getId()}', '{$book->getId()}', '{$employee->getId()}', '{$hire->getHireDate()}', '{$hire->getReturnDate()}')";
var_dump($query);
$libraryRequest = mysql_query($query);
示例4: formatClientInfo
function formatClientInfo(Client $client, $needBreak = false)
{
$sep = $needBreak ? "<br />" : " ";
return htmlspecialchars($client->getName()) . $sep . htmlspecialchars($client->getEmail()) . $sep . htmlspecialchars($client->getTelephone());
}
示例5: Client
<div id="container">
<div id="sidebar" style="float:left;width:15%;">
<?php
include 'sidebar.php';
?>
</div>
<div id="content" style="float:right;width:85%;">
<table>
<tr><td style="width:200px;">Name</td>
<td style="width:200px;">Phone</td>
<td style="width:200px;">Email</td>
<td style="width:200px;">Website</td>
<td style="width:200px;">Action</td>
</tr>
<?php
for ($i = 0; $i < sizeof($mClientList); $i++) {
$mClient = new Client($mClientList[$i]);
echo "<tr>";
echo "<td>" . $mClient->getName() . "</td>";
echo "<td>" . $mClient->getPhone() . "</td>";
echo "<td>" . $mClient->getEmail() . "</td>";
echo "<td>" . $mClient->getWebsite() . "</td>";
echo "<td><input type='submit' value='Assign'><input type='submit' value='Track'></td>";
echo "</tr>";
}
?>
</table>
<div>
</div>
</body>
示例6: actionSaveClient
function actionSaveClient($currentUser)
{
$backUrl = $this->context->getFlowScopeAttr("backUrl");
$client = new Client();
$clientErrs = array();
$client->setId($this->context->getRequestAttr("id"));
$client->setPid($this->context->getRequestAttr("projectID"));
$client->setName($this->context->getRequestAttr("name"));
if (!is_null($client->getName())) {
$client->setName(trim($client->getName()));
if (strlen($client->getName()) < 1) {
$client->setName(null);
}
}
if (is_null($client->getName())) {
$clientErrs["name"] = "field.error.empty";
}
$client->setEmail($this->context->getRequestAttr("email"));
if (!is_null($client->getEmail())) {
$client->setEmail(trim($client->getEmail()));
if (strlen($client->getEmail()) < 1) {
$client->setEmail(null);
}
}
if (is_null($client->getEmail())) {
$clientErrs["email"] = "field.error.empty";
}
$client->setTelephone($this->context->getRequestAttr("telephone"));
if (!is_null($client->getTelephone())) {
$client->setTelephone(trim($client->getTelephone()));
if (strlen($client->getTelephone()) < 1) {
$client->setTelephone(null);
}
}
$client->setCustomer($this->context->getRequestAttr("customer"));
if (!is_null($client->getCustomer())) {
$client->setCustomer(trim($client->getCustomer()));
if (strlen($client->getCustomer()) < 1) {
$client->setCustomer(null);
}
}
$client->setComment($this->context->getRequestAttr("comment"));
if (!is_null($client->getComment())) {
$client->setComment(trim($client->getComment()));
if (strlen($client->getComment()) < 1) {
$client->setComment(null);
}
}
$periodicalID = $this->context->getRequestAttr("periodicalid");
$periodical = $this->context->getRequestAttr("periodCustomer");
$client->setPeriodical($periodical == 1 ? true : false);
$timeZone = new DateTimeZone("Europe/Vilnius");
$time = new DateTime("now", $timeZone);
$client->setR_date($time->format("Y-m-d H:i:s"));
$client->setR_user($currentUser->getId());
$client->setActive(true);
if (!is_null($periodicalID) && !$client->isPeriodical()) {
$this->clientPeriodicalDao->delete($periodicalID);
$this->clientDaol->resetPeriodicalClients($periodicalID);
$client->setPeriodicalid(0);
}
if ($client->isPeriodical()) {
$clientPeriodical = new ClientPeriodical();
$clientPeriodical->setId($periodicalID);
$clientPeriodical->setPid($client->getPid());
$clientPeriodical->setName($client->getName());
$clientPeriodical->setEmail($client->getEmail());
$clientPeriodical->setCustomer($client->getCustomer());
$clientPeriodical->setTelephone($client->getTelephone());
$clientPeriodical->setComment($client->getComment());
$clientPeriodical->setR_date($time->format("Y-m-d H:i:s"));
$clientPeriodical->setR_user($currentUser->getId());
$clientPeriodical->setPeriod_type($this->context->getRequestAttr("period_type"));
$clientPeriodical->setWeek_day($this->context->getRequestAttr("week_day"));
$clientPeriodical->setMonth_day($this->context->getRequestAttr("month_day"));
$clientPeriodical->setHour($this->context->getRequestAttr("hour"));
} else {
$clientPeriodical = new ClientPeriodical();
}
$this->context->setFlashScopeAttr("client", $client);
$this->context->setFlashScopeAttr("clientPeriodical", $clientPeriodical);
$this->context->setFlashScopeAttr("clientErrs", $clientErrs);
$projectID = $client->getPid();
if (!$this->setStoreProject($projectID, "clientProject")) {
$this->cancelClientEdit();
if (!is_null($backUrl)) {
header("Location: " . $backUrl);
return true;
}
return false;
}
if (count($clientErrs) >= 1) {
if (!is_null($backUrl)) {
header("Location: " . $backUrl);
return true;
}
return false;
}
$insert = false;
if (is_null($client->getId())) {
//.........这里部分代码省略.........
示例7: render
//.........这里部分代码省略.........
echo $client->getClientName();
?>
" />
</div>
<div>
<label for="agent">
Representante <small>(*)</small>
</label>
<input name="agent" type="text" required value="<?php
echo $client->getAgent();
?>
" />
</div>
<div>
<label for="address">
Dirección <small>(*)</small>
</label>
<input name="address" type="text" required value="<?php
echo $client->getAddress();
?>
" />
</div>
<div>
<label for="phone">
Teléfono <small>(*)</small>
</label>
<input name="phone" type="tel" required value="<?php
echo $client->getPhone();
?>
" />
</div>
</div>
<div class="col-md-6">
<div>
<label for="email">
Correo electrónico <small>(*)</small>
</label>
<input name="email" type="email" required value="<?php
echo $client->getEmail();
?>
" />
</div>
<div>
<label for="website">
Sitio web
</label>
<input name="website" type="url" value="<?php
echo $client->getWebsite();
?>
" />
</div>
<div>
<label for="user">
Usuario <small>(*)</small>
</label>
<input name="user" type="text" required value="<?php
echo $client->getUser();
?>
" />
</div>
<div>
<label for="email">
Contraseña <small>(*)</small>
</label>
<input name="password" type="text" required />
</div>
<div>
<label for="date_suscription">
Fecha Suscripción <small>(*)</small>
</label>
<input id="date_suscription" name="date_suscription" type="text" required value="<?php
echo $client->getDateSuscription();
?>
"/>
</div>
<div>
<input type="submit" value="Modificar" />
</div>
</div>
</div>
</fieldset>
</form>
<?php
}
示例8: render
/**
* Renderize the view.
*
* @return null
*/
public function render(Client $client)
{
?>
<p>
<?php
echo REQUIRED_FIELDS_TEXT;
?>
</p>
<form action="<?php
echo $this->generateURL('client', 'edit', $client->getIdClient());
?>
" method="post">
<fieldset>
<div class="row">
<div class="col-md-6">
<div>
<label for="client_name">
Nombre <small>(*)</small>
</label>
<input name="client_name" type="text" required value="<?php
echo $client->getClientName();
?>
" />
</div>
<div>
<label for="agent">
Representante <small>(*)</small>
</label>
<input name="agent" type="text" required value="<?php
echo $client->getAgent();
?>
" />
</div>
<div>
<label for="address">
Dirección <small>(*)</small>
</label>
<input name="address" type="text" required value="<?php
echo $client->getAddress();
?>
" />
</div>
<div>
<label for="phone">
Teléfono <small>(*)</small>
</label>
<input name="phone" type="tel" required value="<?php
echo $client->getPhone();
?>
" />
</div>
</div>
<div class="col-md-6">
<div>
<label for="email">
Correo electrónico <small>(*)</small>
</label>
<input name="email" type="email" required value="<?php
echo $client->getEmail();
?>
" />
</div>
<div>
<label for="website">
Sitio web
</label>
<input name="website" type="url" value="<?php
echo $client->getWebsite();
?>
" />
</div>
<div>
<label for="user">
Usuario <small>(*)</small>
</label>
<input name="user" type="text" required value="<?php
echo $client->getUser();
?>
" />
</div>
//.........这里部分代码省略.........