本文整理汇总了PHP中getAddress函数的典型用法代码示例。如果您正苦于以下问题:PHP getAddress函数的具体用法?PHP getAddress怎么用?PHP getAddress使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了getAddress函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: index
/**
* 主页
* @return null null
*/
public function index()
{
echo 'Moudle: Home' . '<br />';
echo 'Controller: Index' . '<br />';
echo 'Action: index' . '<br />';
$links = getAddress();
$this->assign('address', $links);
$this->display();
}
示例2: saveIntoPublisherInfo
public function saveIntoPublisherInfo($objPublisherInfo)
{
$query = "INSERT INTO publisher_info(pub_id, organisation_name, address, city, pincode) values(:PUB_ID, :ORGANISATION_NAME, :ADDRESS, :CITY, :PINCODE)";
try {
$dbconn = $this->getConnection();
$stmt = $dbconn->prepare($query);
$stmt->bindValue(':PUB_ID', $objPublisherInfo->getPubId());
$stmt->bindValue(':ORGANISATION_NAME', $objPublisherInfo->getOrganisationName());
$stmt->bindValue(':ADDRESS', $objPublisherInfo > getAddress());
$stmt->bindValue(':CITY', $objPublisherInfo->getCity());
$stmt->bindValue(':PINCODE', $objPublisherInfo->getPincode());
$stmt->execute();
} catch (Exception $ex) {
$this->throwPDOException($e);
}
}
示例3: createVCard
function createVCard($array)
{
$return = 'BEGIN:VCARD' . PHP_EOL;
$return .= 'VERSION:2.1' . PHP_EOL;
$return .= getName($array) . PHP_EOL;
$return .= getFormatedName($array) . PHP_EOL;
$return .= getPhoto($array);
$return .= getTelephonePrivate($array);
$return .= getMobilePrivate($array);
//$return .= 'TEL;WORK;VOICE:(0221) 9999123' . PHP_EOL;
//$return .= 'TEL;HOME;VOICE:(0221) 1234567' . PHP_EOL;
$return .= getAddress($array);
$return .= getEmail($array);
$return .= date('Y-m-d H:i:s') . PHP_EOL;
$return .= 'END:VCARD' . PHP_EOL;
return $return;
}
示例4: sendBtc
function sendBtc($id, $amount)
{
#Send btc from id to address
$bitcoin = new jsonRPCClient("http://{$bitcoin_user}:{$bitcoin_pass}@127.0.0.1:8332/");
if ($bitcoin->getbalance() < $amount) {
return -1;
}
if (!debit($id, $amount)) {
return -2;
}
$address = getAddress($id);
if ($address == -1) {
return -3;
}
$comment = getUsernameById($id);
$bitcoin->sendtoaddress($address, $amount, $comment);
return 0;
}
示例5: index
public function index()
{
echo 'Moudle: Home' . '<br />';
echo 'Controller: Chart' . '<br />';
echo 'Action: index' . '<br />';
$nums = I('numbers');
if (I('numbers') <= 0) {
$nums = 15;
}
// 链接地址
$links = getAddress();
$this->assign('address', $links);
// 开奖数据
$kjh = M('kjh');
$result = $kjh->limit($nums)->order('qh DESC')->select();
$result = array_reverse($result);
// 开奖号码经过处理返回表格形式的数组
$d = numbersFormat($result);
$this->assign('kjh', $d);
$this->display();
}
示例6: filter_input
$address_id = filter_input(INPUT_POST, 'address_id');
$fullname = filter_input(INPUT_POST, 'fullname');
$email = filter_input(INPUT_POST, 'email');
$address = filter_input(INPUT_POST, 'address');
$phone = filter_input(INPUT_POST, 'phone');
$website = filter_input(INPUT_POST, 'website');
$birthday = filter_input(INPUT_POST, 'birthday');
$image = filter_input(INPUT_POST, 'upfile');
$img = uploadProductImage();
// function to update database
updateNoImg($address_group_id, $address_id, $user_id, $fullname, $email, $address, $phone, $website, $img);
} else {
$address_id = filter_input(INPUT_GET, 'address_id');
}
//fill variables from database function
$results = getAddress($address_id, $user_id);
$address_group_id = $results['address_group_id'];
$fullname = $results['fullname'];
$email = $results['email'];
$address = $results['address'];
$phone = $results['phone'];
$website = $results['website'];
$birthday = $results['birthday'];
$image = $results['image'];
// /* statment selects from database */
// $stmt = $db->prepare("SELECT * FROM address WHERE address_id = :address_id AND user_id = :user_id");
//
// /* binds results into array */
// $binds = array(
// ":address_id" => $address_id,
// ":user_id" => $user_id
示例7: readEntryLog
//.........这里部分代码省略.........
}
break;
case 'invoice_comment':
if ($value == '') {
$return[] = _('Invoice') . ' - ' . _('Comment') . ' <i>' . _('not set') . '</i>';
} else {
$return[] = _('Invoice') . ' - ' . _('Comment') . ' ' . $middlestring . ' "' . $value . '"';
}
break;
case 'invoice_ref_your':
if ($value == '') {
$return[] = _('Invoice') . ' - ' . _('Your reference') . ' <i>' . _('not set') . '</i>';
} else {
$return[] = _('Invoice') . ' - ' . _('Your reference') . ' ' . $middlestring . ' "' . $value . '"';
}
break;
case 'invoice_electronic':
if ($value) {
$return[] = _('Invoice') . ' <i>' . _('is to be sendt by e-mail') . '</i> (' . _('E-delivery') . ')';
} else {
$return[] = _('Invoice') . ' <i>' . _('is to be sendt by regular mail') . '</i> (' . _('Not') . ' ' . strtolower(_('E-delivery')) . ')';
}
break;
case 'invoice_email':
if ($value == '') {
$return[] = _('Invoice') . ' - ' . _('E-mail') . ' <i>' . _('not set') . '</i>';
} else {
$return[] = _('Invoice') . ' - ' . _('E-mail') . ' ' . $middlestring . ' "' . $value . '"';
}
break;
case 'invoice_address_id':
if ($value == 0) {
$return[] = _('Invoice') . ' - ' . _('Address') . ' <i>' . _('not set') . '</i>';
} else {
$address = getAddress($value);
if (count($address)) {
$return[] = _('Invoice') . ' - ' . _('Address') . ' ' . $middlestring . ' <i>' . str_replace("\n", ', ', $address['address_full']) . '</i>';
} else {
$return[] = _('Invoice') . ' - ' . _('Address') . ' ' . $middlestring . ' "' . $value . '"';
}
}
break;
case 'invoice_content':
if (!is_array($value)) {
$return[] = _('Invoice') . ' - ' . _('Content') . ' has got syntax error in the log.';
} else {
foreach ($value as $linenr => $line) {
$return[] = _('Invoice') . ' - ' . _('Content') . ' - ' . _('line') . ' <i>' . $linenr . '</i> ' . $middlestring . ': ' . _('name') . ': <i>' . $line['name'] . '</i>, ' . 'pris/stk: <i>' . $line['belop_hver'] . '</i>, ' . _('amount') . ': <i>' . $line['antall'] . '</i>, ' . _('tax') . ': <i>' . $line['mva'] * 100 . '%</i>, ' . 'sum u/MVA: <i>' . $line['belop_sum_netto'] . '</i>';
}
}
break;
case 'program_id':
if ($value == 0) {
$return[] = _('Fixed program') . ' <i>' . _('not set') . '</i>';
} else {
$program = getProgram($value);
if (count($program)) {
$return[] = _('Fixed program') . ' ' . $middlestring . ' <i>' . $program['program_name'] . '</i>';
} else {
$return[] = _('ID of fixed program') . ' ' . $middlestring . ' "' . $value . '"';
}
}
break;
case 'entry_type_id':
if ($value == 0) {
$return[] = _('Entry type') . ' <i>' . _('not set') . '</i>';
} else {
$entry_type = getEntryType($value);
if (count($entry_type)) {
$return[] = _('Entry type') . ' ' . $middlestring . ' <i>' . $entry_type['entry_type_name'] . '</i>';
} else {
$return[] = _('ID of entry type') . ' ' . $middlestring . ' "' . $value . '"';
}
}
break;
case 'confirm_id':
$return[] = '<a href="entry_confirm_view.php?confirm_id=' . $value . '">' . _('Confirmation sent') . '</a>';
break;
case 'confirm_comment':
$return[] = _('Comment') . ': ' . $value;
break;
default:
if (substr($index, 0, 11) == 'email_faild') {
$return[] = _('Confirmation was <b>not sent</b> to') . ' <i>' . $value . '</i>';
break;
} elseif (substr($index, 0, 5) == 'email') {
$return[] = _('Confirmation was sent to') . ' <i>' . $value . '</i>';
break;
}
if (is_array($value)) {
$return[] = $index . ' = ' . print_r($value, true);
} else {
$return[] = $index . ' = ' . $value;
}
break;
}
}
}
return $return;
}
示例8: session_start
<?php
session_start();
if (!isset($_SESSION['user']) || $_SESSION['user']->u_status != 1) {
header("Location: index.php");
exit;
}
include 'functions.php';
$page = 'profile';
$address = getAddress($_SESSION['user']->u_zip);
$age = getAge($_SESSION['user']->u_birthday);
$membershipDuration = displayDate($_SESSION['user']->u_register_date, '2');
$userTimeline = getUserTimeline($_SESSION['user']->u_id);
if ($_SESSION['user']->u_gender == 'Male') {
$genderIcon = 'fa-male';
} else {
if ($_SESSION['user']->u_gender == 'Female') {
$genderIcon = 'fa-female';
} else {
$genderIcon = 'fa-genderless';
}
}
$dietStatus = dietStatus();
$isUpUpdateRequired = isUpUpdateRequired();
if ($dietStatus) {
$dietStats = getDietStats();
if ($dietStats->ds_progress == 'P') {
$icon_diet_progres_class = 'fa fa-smile-o fa-2x';
$progress_status = '';
} else {
if ($dietStats->ds_progress == 'N') {
示例9: session_start
<?php
session_start();
require('db.class.php/db.class.php');
$DB = new DB();
function getAddress(){
/*** check for https ***/
$protocol = $_SERVER['HTTPS'] == 'on' ? 'https' : 'http';
/*** return the full address ***/
return $protocol.'://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];
}
if(isset($_REQUEST['logout'])){
unset($_SESSION['loggedin']);
}
if(!isset($_SESSION['loggedin']) || strlen(trim($_SESSION['loggedin'])) == 0){
$_SESSION['referer'] = getAddress();
header('Location: /riot/jobtracker/login.php');
}
?>
示例10: chr
}
echo '</td>
</tr>' . chr(10);
echo '<tr>
<td align="right"><b>' . _('E-mail') . ':</b> </td>
<td>';
echo $entry['invoice_email'];
echo '</td>
</tr>' . chr(10);
echo '<tr>
<td align="right"><b>' . _('Address') . ':</b> </td>
<td>';
if ($entry['invoice_address_id'] == 0) {
echo '<i>' . _('Non selected') . '</i>';
} else {
$address = getAddress($entry['invoice_address_id']);
if (count($address)) {
echo nl2br($address['address_full']);
} else {
echo _('Address not found');
}
}
echo '</td>
</tr>' . chr(10);
echo '<tr>
<td align="right"><b>' . _('Your referance') . ':</b> </td>
<td>';
echo $entry['invoice_ref_your'];
echo '</td>
</tr>' . chr(10);
echo '<tr>
示例11: rgba
echo ' <img id="image" src="http://graph.facebook.com/' . $pid . '/picture?type=large" class="avatar" style="padding: 5px">';
echo ' </div>';
echo ' <div class="wall-right">';
echo ' <div style="height: 50%; white-space: nowrap;">';
echo ' <span style="padding-right: 5px; float: right; color: rgba(0,0,0,0.45);">';
$d = substr($j2['time'], 0, 10);
if ($d == date('Y-m-d')) {
echo ' 今天 ';
} else {
if ($d == date('Y-m-d', strtotime('yesterday'))) {
echo ' 昨天 ';
} else {
echo ' ' . $d . ' ';
}
}
echo substr($j2['time'], strrpos($j2['time'], ' '), 6);
echo '</span>';
echo ' <span style="float: left;"><b>乘客: ' . $name . '</b></span><br/>';
echo ' </div>';
echo ' <div style="height: 50%;">';
echo ' <span style="float: left;">共乘距離: ' . $dis . '公尺</span><br/>';
echo ' <button class="mdl-button mdl-js-button mdl-button--icon" style="color: #00AAAA; float: right;"><i class="material-icons">info</i></button>';
echo ' <span style="text-align: left; color: rgba(0,0,0,0.75);">起點:<br/>' . getAddress(json_encode($path[0])) . '號<br/></span>';
echo ' <span style="text-align: left; color: rgba(0,0,0,0.75);">終點:<br/>' . getAddress(json_encode($path[count($path) - 1])) . '號</span>';
echo ' </div>';
echo ' </div>';
echo '</div>';
$index++;
}
}
}
示例12: switch
switch ($step) {
case "send":
$tts = 0;
$start = microtime(true);
$dontlog = 0;
if (!($handler = @fopen('logs/list' . $list_id . '-msg' . $msg_id . '.txt', 'a+'))) {
$dontlog = 1;
}
$limit = $row_config_globale['sending_limit'];
$mail = new PHPMailer();
$mail->CharSet = $row_config_globale['charset'];
$mail->PluginDir = "include/lib/";
$newsletter = getConfig($cnx, $list_id, $row_config_globale['table_listsconfig']);
$mail->From = $newsletter['from_addr'];
$mail->FromName = strtoupper($row_config_globale['charset']) == "UTF-8" ? $newsletter['from_name'] : iconv("UTF-8", $row_config_globale['charset'], $newsletter['from_name']);
$addr = getAddress($cnx, $row_config_globale['table_email'], $list_id, $begin, $limit);
switch ($row_config_globale['sending_method']) {
case "smtp":
$mail->IsSMTP();
$mail->Host = $row_config_globale['smtp_host'];
if ($row_config_globale['smtp_auth']) {
$mail->SMTPAuth = true;
$mail->Username = $row_config_globale['smtp_login'];
$mail->Password = $row_config_globale['smtp_pass'];
}
break;
case "smtp_gmail":
$mail->IsSMTP();
$mail->SMTPAuth = true;
$mail->SMTPSecure = 'tls';
$mail->Host = "smtp.gmail.com";
示例13: switch
<?php
require_once 'connect.php';
switch ($_GET["queryName"]) {
case "getAddress":
getAddress($_GET["customerId"]);
break;
}
//-------------------------------------------------------------------------------------------------------------
// HIGHEST SLIDE
//-------------------------------------------------------------------------------------------------------------
function getAddress($customerId)
{
$query = mysql_query("SELECT address FROM customer WHERE customerId = '" . $customerId . "';");
$result = mysql_fetch_array($query);
echo $_GET['callback'] . '(' . "{'address' :'" . $result['address'] . "'}" . ')';
}
?>
示例14: templateAssignEntry
//.........这里部分代码省略.........
${$var}->assign('user_assigned_any', true);
}
${$var}->assign('user_assigned_names', implode(', ', $names));
${$var}->assign('user_assigned_names2', implode(', ', $names2));
${$var}->assign('customer_id', $entry['customer_id']);
${$var}->assign('customer_name', $entry['customer_name']);
${$var}->assign('contact_person_name', $entry['contact_person_name']);
${$var}->assign('contact_person_phone', $entry['contact_person_phone']);
${$var}->assign('contact_person_email', $entry['contact_person_email']);
${$var}->assign('customer_municipal_num', $entry['customer_municipal_num']);
${$var}->assign('customer_municipal', $entry['customer_municipal']);
${$var}->assign('created_by', $entry['created_by']);
// created_by_name
$user = getUser($entry['created_by']);
if (count($user)) {
${$var}->assign('created_by_name', $user['user_name']);
} else {
${$var}->assign('created_by_name', '');
}
${$var}->assign('time_created', $entry['time_created']);
${$var}->assign('edit_by', $entry['edit_by']);
// Edit_by_names
$names = array();
foreach ($entry['edit_by'] as $user_id) {
$user = getUser($user_id);
if (count($user)) {
$names[] = $user['user_name'];
} else {
$names[] = 'ERROR';
}
}
if (!count($names)) {
$names[] = _('Nobody');
}
${$var}->assign('edit_by_names', implode(', ', $names));
${$var}->assign('time_last_edit', $entry['time_last_edit']);
${$var}->assign('user_last_edit', $entry['user_last_edit']);
$user = getUser($entry['user_last_edit']);
if (count($user)) {
${$var}->assign('user_last_edit_name', $user['user_name']);
} else {
${$var}->assign('user_last_edit_name', '');
}
${$var}->assign('rev_num', $entry['rev_num']);
${$var}->assign('invoice', $entry['invoice']);
if ($entry['invoice'] == '1') {
${$var}->assign('invoice2', true);
${$var}->assign('invoice3', _('yes'));
} else {
${$var}->assign('invoice2', false);
${$var}->assign('invoice3', _('no'));
}
${$var}->assign('invoice_status', $entry['invoice_status']);
switch ($entry['invoice_status']) {
case '0':
${$var}->assign('invoice_status2', _('not to be made'));
break;
case '1':
${$var}->assign('invoice_status2', 'skal lages, ikke klar');
break;
case '2':
${$var}->assign('invoice_status2', 'skal lages, klar til fakturering');
break;
case '3':
${$var}->assign('invoice_status2', 'faktura laget og sendt');
break;
case '4':
${$var}->assign('invoice_status2', 'betalt');
break;
}
${$var}->assign('invoice_electronic', $entry['invoice_electronic']);
if ($entry['invoice_electronic'] == '1') {
${$var}->assign('invoice_electronic2', true);
${$var}->assign('invoice_electronic3', _('yes'));
} else {
${$var}->assign('invoice_electronic2', false);
${$var}->assign('invoice_electronic3', _('no'));
}
${$var}->assign('invoice_email', $entry['invoice_email']);
${$var}->assign('invoice_comment', $entry['invoice_comment']);
${$var}->assign('invoice_internal_comment', $entry['invoice_internal_comment']);
${$var}->assign('invoice_ref_your', $entry['invoice_ref_your']);
${$var}->assign('invoice_address_id', $entry['invoice_address_id']);
$invoice_address = getAddress($entry['invoice_address_id']);
if (count($invoice_address)) {
${$var}->assign('invoice_address', $invoice_address['address_full']);
} else {
${$var}->assign('invoice_address', '');
}
${$var}->assign('invoice_content', $entry['invoice_content']);
${$var}->assign('mva_vis', $entry['mva_vis']);
${$var}->assign('mva', $entry['mva']);
${$var}->assign('mva_grunnlag', $entry['mva_grunnlag']);
${$var}->assign('mva_grunnlag_sum', $entry['mva_grunnlag_sum']);
${$var}->assign('faktura_belop_sum', $entry['faktura_belop_sum']);
${$var}->assign('faktura_belop_sum_mva', $entry['faktura_belop_sum_mva']);
${$var}->assign('eks_mva_tot', $entry['eks_mva_tot']);
${$var}->assign('grunnlag_mva_tot', $entry['grunnlag_mva_tot']);
}
}
示例15: getNameIDs
<?php
// grab array of library name ids (login names)
$name_id = getNameIDs();
// loop through these for the panel display
for ($i = 0; $i < count($name_id); $i++) {
// smaller functions used for future flexibility
$nameid = $name_id[$i];
$id = getID($name_id[$i]);
$url = getURL($name_id[$i]);
$name = getName($name_id[$i]);
$building = getBuilding($name_id[$i], 'at ');
$description = getDescription($name_id[$i]);
$notes = getHoursNotes($name_id[$i]);
$map = getMapCode($name_id[$i]);
$address = getAddress($name_id[$i]);
$phone = getPhone($name_id[$i]);
$accessurl = getAccessURL($name_id[$i]);
$currentdate = date('Y-m-d');
$currenttime = date('H:i:s');
?>
<a name="view-<?php
echo $nameid;
?>
"></a>
<div id="<?php
echo $nameid;
?>
" class="branch">