本文整理汇总了PHP中user::getUserNameFromUserId方法的典型用法代码示例。如果您正苦于以下问题:PHP user::getUserNameFromUserId方法的具体用法?PHP user::getUserNameFromUserId怎么用?PHP user::getUserNameFromUserId使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类user
的用法示例。
在下文中一共展示了user::getUserNameFromUserId方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: htmlspecialchars
if ($i % 2 == 0) {
$bg = "#FFFFCC";
} else {
$bg = "#CCCCCC";
}
echo '<tr valign="top" bgcolor=' . $bg . '>';
echo '<td >' . $objuser->getReviews($data['fromuserid']) . '<br><small><b>(' . $objuser->getUserType($data['fromuserid']) . ')</b></small></td>';
//'<br></td>';
if ($data['touserid'] == 0) {
echo '<td><small>' . "Message #" . $i . " Posted at " . $objproject->Fuzzytime($data['postedtime']) . '</small><br><br>' . str_replace(htmlspecialchars("<br>"), "<br>", htmlspecialchars(str_replace("\n", "<br>", $data['message']))) . '</td>';
echo '<td align="right"><i>[ public ]</i></td>';
} else {
if ($data['touserid'] == $objuser->getloggedid() || $data['fromuserid'] == $objuser->getloggedid()) {
echo '<td><small>' . "Message #" . $i . " Posted at " . $objproject->Fuzzytime($data['postedtime']) . '</small><br><br>' . str_replace(htmlspecialchars("<br>"), "<br>", htmlspecialchars(str_replace("\n", "<br>", $data['message']))) . '</td>';
if ($data['fromuserid'] != $objuser->getloggedid()) {
echo '<td align="right"><i>[<a href="javascript:loadPage(\'/ajax/project/form_postmessage.php?pid=' . $_GET['pid'] . '&private=' . $objuser->getUserNameFromUserId($data['fromuserid']) . '\');">reply to ' . $objuser->getUserNameFromUserId($data['fromuserid']) . '</a> ]</i></td>';
} else {
echo '<td align="right"><i>[Message for ' . $objuser->getUserNameFromUserId($data['touserid']) . '] </i></td>';
}
} else {
echo '<td><small>' . "Message #" . $i . " Posted at " . $objproject->Fuzzytime($data['postedtime']) . '</small></td>';
echo '<td align="right"><i>[private for ' . $objuser->getUserNameFromUserId($data['touserid']) . ']</i></td>';
}
}
echo '</tr>';
$i++;
echo "\n";
}
?>
</table>
示例2:
<tr>
<th width="200"> Status :</th> <td> <?php
echo $rentorhire_data['status'];
?>
</td>
</tr>
<tr class="fir">
<th> Posted On :</th> <td> <?php
echo $rentorhire_data['posted_time'];
?>
</td>
</tr>
<tr>
<th > By Username :</th> <td > <?php
echo $user->getUserNameFromUserId($rentorhire_data['userid']);
?>
</td>
</tr>
<tr class="fir">
<th> Category Listing :</th> <td> Category Listing..</td>
</tr>
<tr>
<th valign="top"> Description:</th> <td valign="top"><?php
echo $rentorhire_data['description'];
?>
</td>
</tr>
示例3: foreach
<td class="grey" align="center">Area</td>
<td class="grey" align="center" align="center"><input type="checkbox" name="allbox" onclick="CheckAll(document.listjob);" /></td>
</tr>
<?php
foreach ($result as $group_details) {
echo "<tr align='center' ";
$color = !$color;
if ($color) {
echo 'bgcolor="#ffffff"';
} else {
echo 'bgcolor="#e4ebfb"';
}
echo ">\r\n\t\t\r\n\t\t<td><a href='user_profile.php?userid=" . $group_details['userid'] . "'>" . $user->getUserNameFromUserId($group_details['userid']) . "</a></td>\r\n\t\t<td>" . $group_details['name'] . "</td>\r\n\t\t<td>" . $sub_rentorhire->get_name_category_id($group_details['product_category']) . "</td>\r\n\t\t<td>" . $category->getById($group_details['sub_maincategory_id']) . "</td>\r\n\t \r\n\t\t\r\n\t\t\r\n\t\t<td align='center'><input type='checkbox' name='checkdel' value='" . $group_details['id'] . "' /></td></tr>";
}
} else {
echo "<tr align='center' ";
echo 'bgcolor="#e4ebfb"';
echo ">\r\n\t\t\r\n\t\t<td align='center'>No Rent or Hire Items Posted Yet</td></tr>";
}
?>
</table>
</form>
</td></tr></table></td></tr></table>
<?php
include "footer.php";
示例4:
<tr class="fir">
<th> Posted On :</th> <td> <?php
echo $service_data['posted_time'];
?>
</td>
</tr>
<tr>
<th width="200"> Status :</th> <td> <?php
echo $service_data['status'];
?>
</td>
</tr>
<tr class="fir">
<th > By Username :</th> <td > <?php
echo $user->getUserNameFromUserId($service_data['userid']);
?>
</td>
</tr>
<tr>
<th> Category Listing :</th> <td> Category Listing..</td>
</tr>
<tr class="fir">
<th valign="top"> Description:</th> <td valign="top"> <?php
echo $service_data['description'];
?>
</td>
</tr>
<tr>
示例5: user
session_start();
require_once $_SERVER['DOCUMENT_ROOT'] . "/common/class/project.class.php";
require_once $_SERVER['DOCUMENT_ROOT'] . "/common/class/user.class.php";
$objuser = new user();
$objuser->checkLoginAjax();
$objproject = new project();
$data = $objproject->getdetails($_GET['pid']);
if ($_SESSION['foongigs_usertype'] == "seeker") {
if ($_GET['private'] == "") {
$private = "";
} else {
$private = $_GET['private'];
}
} else {
$private = $objuser->getUserNameFromUserId($data['userid']);
}
?>
<form method="post" action="ajax/project/postmessage.php" name="frmPostMessage" onsubmit="if(validateForm(this)) submitFormOnFloat(this); return false;">
<input type="hidden" name="projectid" value="<?php
echo $_GET['pid'];
?>
" >
<table width="100%">
<tr>
<td width="20%"></td>
<td ></td>
</tr>
<tr>
<td colspan="2"><big><b>Post Message</b></big></td>
示例6: confirmSubmit
?>
<?php
echo "<tr align='center' ";
if ($group_details['active'] == "1") {
$status = "<b style='color:green;'>Active</b>";
} else {
$status = "<b style='color:red;'>Blocked</b>";
}
$color = !$color;
if ($color) {
echo 'bgcolor="#ffffff"';
} else {
echo 'bgcolor="#e4ebfb"';
}
echo ">\r\n\t\t\r\n\t\t\r\n\t\t<td align='left'><a href='user_profile.php?userid=" . $group_details['userid'] . "'>" . $user->getUserNameFromUserId($group_details['userid']) . "</a></td>\r\n\t\t<td align='left'>" . $group_details['comment'] . "</td>\r\n\t\t<td >" . $group_details['days'] . "</td>\r\n\t\t<td >" . $group_details['amount'] . "</td>\r\n\t\t<td><a href='edit_bid.php?id=" . $group_details['id'] . "&pro_id=" . $_GET['id'] . "'>EDIT</a></td>\r\n\t\t<td><a href='delete_bid.php?action=delete&id=" . $group_details['id'] . "&type=" . $_GET['type'] . "' onclick=\"return confirmSubmit()\">DELETE</a></td>\r\n\t\t<td align='center'><input type='checkbox' name='checkdel' value='" . $group_details['id'] . "' /></td></tr>";
}
?>
</table>
</form>
<?php
} else {
echo "No Bids";
}
?>
<table style="color:#FFFFFF; font-family:Arial, Helvetica, sans-serif; font-size:12px; font-weight:bold; background-color:#5790dc; height:20px;width:100%;" >
<tr>
<td align="left"></td>
<td align="right">
示例7: if
</tr>
</table>
<form name="frmaddcategory" action="helpdesk_management.php?wtdo=send_message&helpdesk_id=<?php
echo $_GET['helpdesk_id'];
?>
" method="post" onSubmit="if(validateForm(this)) { if(check_amount()) return true; } else return false; ">
<table>
<tr>
<td><label for="tags"><strong>From Username:</strong></label>
<span id="plus_amount" style="display:none;">+</span><span id="minus_amount" style="display:none;">-</span>
<?php
echo $user->getUserNameFromUserId($userid);
?>
<span class="checkStatus"></span>
</td>
</tr>
<tr>
<td><label for="tags"><strong>Subject:</strong></label>
<span id="plus_amount" style="display:none;">+</span><span id="minus_amount" style="display:none;">-</span>
<?php
echo $subject;
?>
<span class="checkStatus"></span>
示例8: displayProviderList
function displayProviderList($pid)
{
$sql = "select * from projects_bids where projectid='" . $pid . "'";
$result = $this->mysql->getdata($sql);
$objuser = new user();
$providerid = $this->getSelectedProvider($pid);
if (is_array($result)) {
$str = '<select name="provider" id="provider_' . $pid . '">';
foreach ($result as $data) {
$str .= '<option value="' . $data['userid'] . '"';
if ($data['userid'] == $providerid) {
$str .= "selected='selected'";
}
$str .= '>' . $objuser->getUserNameFromUserId($data['userid']) . '</option>';
}
$str .= '</select>';
if ($providerid == 0) {
$str .= "<input type=\"button\" value=\"Confirm\" onclick=\"selectprovider('" . $pid . "');\">";
} else {
$str .= "<input type=\"button\" value=\"Waiting for provider\" disabled='disabled'>";
$str .= "<input type=\"button\" value=\"Cancel Provider\" onclick=\"cancelprovider('" . $pid . "');\" >";
}
} else {
$str = "No Bids Placed";
}
return $str;
}
示例9: elseif
if ($group_details['status'] == "active") {
$status = "<b style='color:green;'>Active</b>";
} elseif ($group_details['status'] == "block") {
$status = "<b style='color:red;'>Blocked</b>";
} elseif ($group_details['status'] == "expired") {
$status = "<b style='color:pink;'>Expired</b>";
} elseif ($group_details['status'] == "suspended") {
$status = "<b style='color:black;'>Suspended</b>";
}
$color = !$color;
if ($color) {
echo 'bgcolor="#ffffff"';
} else {
echo 'bgcolor="#e4ebfb"';
}
echo ">\r\n\t\t\r\n\t\t<td>" . $group_details['id'] . "</td>\r\n\t\t<td>" . $group_details['title'] . "</td>\r\n\t\t<td><a href='user_profile.php?userid=" . $group_details['userid'] . "'>" . $user->getUserNameFromUserId($group_details['userid']) . "</a></td>\r\n\t\t<td>" . $group_details['posted_time'] . "</td>\r\n\t <td>" . $status . "</td>\r\n\t\t\r\n\t\t\r\n\t\t<td align='center'><input type='checkbox' name='checkdel' value='" . $group_details['id'] . "' /></td></tr>";
}
} else {
echo "<tr align='center' ";
echo 'bgcolor="#e4ebfb"';
echo ">\r\n\t\t\r\n\t\t<td align='center'>No Jobs Posted Yet</td></tr>";
}
?>
</table>
</form>
</td></tr></table></td></tr></table>
<?php
include "footer.php";
示例10: count
<?php
$projectbids = $objproject->getAllBids($_GET['id']);
if (is_array($projectbids)) {
?>
<table width="100%">
<tr bgcolor="#FFFFFF">
<td> Providers</td>
<td> Bid</td>
<td> Delivery Within</td>
<td> Time of Bid</td>
<td> Rating</td>
</tr>
<?php
if ($objproject->ishidden($_GET['id'])) {
echo "<tr><td colspan='5' align='center'>(" . count($projectbids) . " bids have been placed. " . $objuser->getUserNameFromUserId($projects['userid']) . " has chosen to keep all bids for this project hidden.)</td></tr>";
} else {
$common = new common();
foreach ($projectbids as $data) {
?>
<tr>
<td><?php
echo "<a href='viewprofile.php?id=" . $data['userid'] . "'>" . $objuser->getUserNameFromUserId($data['userid']) . "</a>";
?>
</td>
<td><?php
echo "\$" . $data['amount'];
?>
</td>
<td><?php
echo $data['days'] . " Days";
示例11: trim
<th> Salary :</th> <td> <?php
echo "\$" . $job['salary_minimum'] . "-" . $job['salary_maximum'];
?>
</td>
</tr>
<tr class="fir">
<th> Status :</th> <td> <?php
echo $job['status'];
?>
</td>
</tr>
<tr>
<th> By Username :</th> <td > <?php
echo $user->getUserNameFromUserId($job['userid']);
?>
</td>
</tr>
<tr class="fir">
<th> Company :</th> <td> <?php
echo $job['company'];
?>
</td>
</tr>
<tr>
<th> Company URL :</th> <td> <a href="<?php
echo trim($job['company_url']);
?>
示例12: elseif
if ($group_details['status'] == "open") {
$status = "";
} elseif ($group_details['status'] == "reopen") {
$status = "";
} elseif ($group_details['status'] == "close") {
$status = "<b style='color:balck;'>Close</b>";
} elseif ($group_details['status'] == "resolved") {
$status = "<b style='color:balck;'>Resolved</b>";
}
$color = !$color;
if ($color) {
echo 'bgcolor="#ffffff"';
} else {
echo 'bgcolor="#e4ebfb"';
}
echo ">\r\n\t\t\r\n\t\t\r\n\t\t<td>" . $user->getUserNameFromUserId($group_details['userid']) . "</td>\r\n\t\t<td><a href='helpdesk_message.php?helpdesk_id=" . $group_details['id'] . "'>" . substr($group_details['subject'], 0, 100) . "</td>\r\n\t\t<td align='center'>" . $group_details['timestamp'] . "</td>\r\n\r\n\t\t<td align='center'>";
if ($status != "") {
?>
<a href="javascript: loadPage('/ajax/helpdesk_new_request.php?helpdesk_id=<?php
echo $group_details['id'];
?>
&status_change=reopen')">Re Open</a><?php
}
echo "</td></tr>";
}
} else {
echo '
<tr bgcolor="#FFFFFF">
<td class="grey" align="center">No Messages </td>
</tr>
示例13: transaction
<div id="escrow" style="width:50%; float:left;">
<table width="300">
<tr bgcolor="#CCCCCC">
<td colspan="3"> Escrow Payment </td>
</tr>
<?php
$escrow = new transaction();
$user = new user();
$escrow_list = $escrow->list_escrow();
if (!is_array($escrow_list)) {
echo "<tr><td>No Escrow Payment </td></tr>";
} else {
echo '<tr><td>Provider</td><td>Amount</td><td>Option</td></tr>';
foreach ($escrow_list as $row) {
echo '<tr><td>' . $user->getUserNameFromUserId($row['provider_userid']) . '</td><td>$' . $row['amount'] . '</td><td><a href="">Cancel</a></td></tr>';
}
}
?>
</table>
</div>
<?php
$user_data = $user->getbyid($user->getloggedid);
if ($user_data['active'] == "suspended") {
$common = new common();
$msg = $common->getconfigvalue('account_suspended_message');
echo "<div style='height:20px;clear:both;'></div><div id='account_suspended' style='clear:both; text-align:center;'>" . $msg . "</div><div style='height:20px;clear:both;'></div>";
}
?>
示例14: if
</table>
<form name="frmeditbid" action="bids_details.php?wtdo=edit_bid&bid_id=<?php
echo $_GET['id'];
?>
&id=<?php
echo $_GET['pro_id'];
?>
" method="post" onSubmit="if(validateForm(this)) { if(check_amount()) return true; } else return false; ">
<table>
<tr>
<td><label for="tags"><strong>Username:</strong></label></td>
<td>
<?php
echo $user->getUserNameFromUserId($bid_details['userid']);
?>
<span class="checkStatus"></span>
</td>
</tr>
<tr>
<td><label for="tags"><strong>Amount:</strong></label></td>
<td>
<input type="text" id="amount" name="amount" class="vldnum textWidth" value="<?php
echo $bid_details['amount'];
?>
" />
<span class="checkStatus"></span>
</td>
示例15: elseif
if ($group_details['status'] == "open") {
$status = "<b style='color:green;'>Open</b>";
} elseif ($group_details['status'] == "reopen") {
$status = "<b style='color:pink;'>Re-Open</b>";
} elseif ($group_details['status'] == "close") {
$status = "<b style='color:red;'>Closed</b>";
} elseif ($group_details['status'] == "resolved") {
$status = "<b style='color:black;'>Resolved</b>";
}
$color = !$color;
if ($color) {
echo 'bgcolor="#ffffff"';
} else {
echo 'bgcolor="#e4ebfb"';
}
echo ">\r\n\t\t\r\n\t\t<td><a href='user_profile.php?userid=" . $group_details['userid'] . "'>" . $user->getUserNameFromUserId($group_details['userid']) . "</a></td>\r\n\t\t<td><a href='helpdesk_message.php?helpdesk_id=" . $group_details['id'] . "'>" . $group_details['subject'] . "</a></td>\r\n\t\t<td>" . $group_details['timestamp'] . "</td>\r\n\t <td>" . $status . "</td>\r\n\t\t\r\n\t\t\r\n\t\t<td align='center'><input type='checkbox' name='checkdel' value='" . $group_details['id'] . "' /></td></tr>";
}
} else {
echo "<tr align='center' ";
echo 'bgcolor="#e4ebfb"';
echo ">\r\n\t\t\r\n\t\t<td align='center'>" . $mes . "</td></tr>";
}
?>
</table>
</form>
</td></tr></table></td></tr></table>
<?php
include "footer.php";