本文整理匯總了PHP中DB_Functions::getName方法的典型用法代碼示例。如果您正苦於以下問題:PHP DB_Functions::getName方法的具體用法?PHP DB_Functions::getName怎麽用?PHP DB_Functions::getName使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類DB_Functions
的用法示例。
在下文中一共展示了DB_Functions::getName方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: ucfirst
<!-- Search | has-form wrapper -->
<li class="has-form bg-white">
<div class="row collapse">
<div class="large-12 columns">
<div class="dark"> </div>
<input class="input-top" type="text" placeholder="search">
</div>
</div>
</li>
</ul>
<ul class="right">
<li class=" has-dropdown bg-white">
<a class="bg-white" href="#"><img alt="" class="admin-pic img-circle" src="../../../api.randomuser.me/portraits/thumb/men/28.jpg"><span class="admin-pic-text text-gray">Hi, <?php
$name = $db->getName($_SESSION['user_id']);
echo ucfirst($name[0]) . " " . ucfirst($name[1]);
?>
</span>
</a>
<ul class="dropdown dropdown-nest profile-dropdown">
<li>
<i class="icon-user"></i>
<a href="#">
<h4>Profile<span class="text-aqua fontello-record" ></span></h4>
</a>
</li>
<li>
<i class="icon-folder-open"></i>
示例2:
$response["error_msg"] = "Already Friends";
echo json_encode($response);
}
}
}
} else {
if ($tag == 'addReminder') {
$fromEmail = $_POST['fromemail'];
$toEmail = $_POST['toemail'];
$radius = $_POST['radius'];
$title = $_POST['title'];
$address = $_POST['address'];
$latitude = $_POST['latitude'];
$longitude = $_POST['longitude'];
$fromId = $db->getUid($fromEmail);
$name = $db->getName($fromEmail);
$toId = $db->getUid($toEmail);
if ($db->getRelation($fromId, $toId) == 1 || $db->getRelation($toId, $fromId) == 1 || $fromId == $toId) {
$check = $db->setReminder($title, $fromId, $toId, $latitude, $longitude, $address, $radius, $name);
if ($check != false) {
// user found
// echo json with success = 1
$response["success"] = 1;
echo json_encode($response);
} else {
$response["error"] = 1;
$response["error_msg"] = "Error";
echo json_encode($response);
}
} else {
$response["error"] = 1;