本文整理汇总了PHP中UserClass::getLastName方法的典型用法代码示例。如果您正苦于以下问题:PHP UserClass::getLastName方法的具体用法?PHP UserClass::getLastName怎么用?PHP UserClass::getLastName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UserClass
的用法示例。
在下文中一共展示了UserClass::getLastName方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: setcookie
$p->setUserID($_COOKIE['userID']);
$p->setProfileText(addslashes($profilesTexts[$i]));
$p->setProfileName(addslashes($profilesNames[$i]));
$p->getGrandeAreaID($grandeAreaId[$i]);
$p->getSubAreaID($subAreaId[$i]);
array_push($arrProfile, $p);
}
$usr->setProfiles($arrProfile);
$usr->setID($_COOKIE['userID']);
$result = $usr->addUserProfiles();
if (!is_array($result)) {
if ($useSGU) {
setcookie("userToken", $usr->getToken(), time() + 3600, "/");
}
setcookie("firstName", $usr->getFirstName(), time() + 3600, "/");
setcookie("lastName", $usr->getLastName(), time() + 3600, "/");
setcookie("userID", $usr->getID(), time() + 3600, "/");
session_write_close();
header("Location: /");
exit;
}
//apos o cadastro jah loga o usuário
break;
case "atualizar":
$usr = new UserClass();
$usr->setID($_COOKIE['userID']);
if ($useSGU) {
$usr->setToken($_COOKIE['userToken']);
}
if ($password != "") {
$usr->setPassword($password);
示例2: trim
<td><input type="text" class="expression" name="firstName" value="<?php
echo trim($usr->getFirstName());
?>
"/>
<span id="firstNameMsg" class="tfvNormal"><?php
echo FIELD_FIRST_NAME_ERROR_DESCRIPTION;
?>
</span></td>
</tr>
<tr>
<td class="label"><?php
echo FIELD_LAST_NAME;
?>
</td>
<td><input type="text" class="expression" name="lastName" value="<?php
echo trim($usr->getLastName());
?>
" />
<span id="lastNameMsg" class="tfvNormal"><?php
echo FIELD_LAST_NAME_ERROR_DESCRIPTION;
?>
</span></td>
</tr>
<tr>
<td class="label"><?php
echo FIELD_GENDER;
?>
</td>
<td>
<label for="genderM"><?php
echo FIELD_GENDER_MALE;
示例3:
?>
</div>
<form method="post" name="cadastro" onsubmit="return v.exec()">
<input type="hidden" name="postback" value="1" />
<input type="hidden" name="userid" value="<?=trim($usr->getID())?> " />
<?=REQUIRED_FIELD_TEXT?>
<h4><?=PERSONAL_DATA?></h4>
<table class="register">
<tr>
<td class="label"><?=FIELD_FIRST_NAME?></td>
<td><input type="text" class="expression" name="firstName" value="<?=trim($usr->getFirstName())?>"/>
<span id="firstNameMsg" class="tfvNormal"><?=FIELD_FIRST_NAME_ERROR_DESCRIPTION?></span></td>
</tr>
<tr>
<td class="label"><?=FIELD_LAST_NAME?></td>
<td><input type="text" class="expression" name="lastName" value="<?=trim($usr->getLastName())?>" />
<span id="lastNameMsg" class="tfvNormal"><?=FIELD_LAST_NAME_ERROR_DESCRIPTION?></span></td>
</tr>
<tr>
<td class="label"><?=FIELD_GENDER?></td>
<td>
<label for="genderM"><?=FIELD_GENDER_MALE?>
<input type="radio" <?if ($usr->getGender() == "M") echo "checked"; ?> name="gender" id="genderM" value="M" />
<label for="genderF"><?=FIELD_GENDER_FEMALE?>
<input type="radio" <?if ($usr->getGender() == "F") echo "checked"; ?> name="gender" id="genderF" value="F" />
<span id="genderMsg" class="tfvNormal"><?=FIELD_GENDER_ERROR_DESCRIPTION?></span>
</td>
</tr>
<tr>
<td class="label"><?=FIELD_EMAIL?></td>
<td><input type="text" class="expression" name="email" value="<?=trim($usr->getEMail())?>" />
示例4:
</tr>
</table>
<span>
<a href="<?=$ini['this']['relpath']?>/users/forgot.php"><?=FORGOT_PASSWORD?></a><br />
<a href="<?=$ini['this']['relpath']?>/users/userData.php"><strong><?=REGISTER?></strong></a> <?=FOR_SERVICES?>
</span>
<input type="hidden" name="acao" value="login"/>
</form>
</div>
<? }
else
//Depois de Logado
{?>
<div class="userInfo">
<span><?=HELLO_STRING?> <strong><?=$usr->getFirstName()." ".$usr->getLastName() ?></strong> | <a href="<?=$ini['this']['relpath']?>/users/userData.php?id=<?=$_COOKIE['userID'];?>"><?=EDIT_USER_DATA?></a> | <a href="?logout=true"><?=BUTTON_LOGOUT?></a></span>
</div>
<ul>
<li><a href="<?=$ini['this']['relpath']?>/users/myShelf.php"><?=MY_SHELF?></a></li>
<li><a href="<?=$ini['this']['relpath']?>/users/myArticleProfile.php"><?=MY_ARTICLE_PROFILE?></a></li>
<li><a href="<?=$ini['this']['relpath']?>/users/myArticleProfile.php?new"><?=MY_NEW_ARTICLE_PROFILE?></a></li>
<li><a href="<?=$ini['this']['relpath']?>/users/myNews.php"><?=MY_NEWS?></a></li>
<li><a href="<?=$ini['this']['relpath']?>/users/myLinks.php"><?=MY_LINKS?></a></li>
<li><a href="<?=$ini['this']['relpath']?>/users/myAlerts.php"><?=MY_ALERTS?></a></li>
</ul>
<?
require_once(dirname(__FILE__)."/../sgu/traker.php");
}
?>