本文整理汇总了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;