本文整理汇总了PHP中get_area函数的典型用法代码示例。如果您正苦于以下问题:PHP get_area函数的具体用法?PHP get_area怎么用?PHP get_area使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了get_area函数的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: get_number
?>
</strong>
<span>Baths</span>
</div><!-- /.col-sm-3 -->
<div class="property-row-meta-item col-sm-3">
<strong><?php
echo get_number();
?>
</strong>
<span>Beds</span>
</div><!-- /.col-sm-3 -->
<div class="property-row-meta-item col-sm-3">
<strong><?php
echo get_area();
?>
</strong>
<span>Area</span>
</div><!-- /.col-sm-3 -->
<div class="property-row-meta-item col-sm-3">
<strong><?php
echo get_number();
?>
</strong>
<span>Garages</span>
</div><!-- /.col-sm-3 -->
</div><!-- /.property-row-meta -->
</div><!-- /.property-row-picture -->
</div><!-- /.property-row-picture -->
示例2: unset
// The id must be either an integer or NULL, so that subsequent code that tests whether
// isset($id) works. (I suppose one could use !empty instead, but there's always the
// possibility that sites have allowed 0 in their auto-increment/serial columns.)
if (isset($id) && $id == '') {
unset($id);
}
if (empty($rooms)) {
trigger_error('Internal error: no rooms specified', E_USER_WARNING);
} else {
// Make sure the area corresponds to the room that is being booked
$area = get_area($rooms[0]);
get_area_settings($area);
// Update the area settings
}
// and that $room is in $area
if (get_area($room) != $area) {
$room = get_default_room($area);
}
// If they're not an admin and multi-day bookings are not allowed, then
// set the end date to the start date
if (!$is_admin && $auth['only_admin_can_book_multiday']) {
$end_day = $start_day;
$end_month = $start_month;
$end_year = $start_year;
}
// If this is an Ajax request and we're being asked to commit the booking, then
// we'll only have been supplied with parameters that need to be changed. Fill in
// the rest from the existing boking information.
// Note: we assume that
// (1) this is not a series (we can't cope with them yet)
// (2) we always get passed start_seconds and end_seconds in the Ajax data
示例3: display_buttons
function display_buttons($row, $is_series)
{
global $PHP_SELF;
global $user, $reminders_enabled, $reminder_interval;
$last_reminded = empty($row['reminded']) ? $row['last_updated'] : $row['reminded'];
$returl = $PHP_SELF;
$target_id = $is_series ? $row['repeat_id'] : $row['id'];
// When we're going to view_entry.php we need to pass the id and series
// in a query string rather than as hidden inputs. That's because some
// pages called by view_entry use HTTP_REFERER to form a return URL, and
// view_entry needs to have a valid id.
$query_string = "id={$target_id}";
$query_string .= $is_series ? "&series=1" : "";
if (auth_book_admin($user, $row['room_id'])) {
// approve
echo "<form action=\"approve_entry_handler.php\" method=\"post\">\n";
echo "<div>\n";
echo "<input type=\"hidden\" name=\"action\" value=\"approve\">\n";
echo "<input type=\"hidden\" name=\"id\" value=\"{$target_id}\">\n";
echo "<input type=\"hidden\" name=\"series\" value=\"{$is_series}\">\n";
echo "<input type=\"hidden\" name=\"returl\" value=\"" . htmlspecialchars($returl) . "\">\n";
echo "<input type=\"submit\" value=\"" . get_vocab("approve") . "\">\n";
echo "</div>\n";
echo "</form>\n";
// reject
echo "<form action=\"view_entry.php?{$query_string}\" method=\"post\">\n";
echo "<div>\n";
echo "<input type=\"hidden\" name=\"action\" value=\"reject\">\n";
echo "<input type=\"hidden\" name=\"returl\" value=\"" . htmlspecialchars($returl) . "\">\n";
echo "<input type=\"submit\" value=\"" . get_vocab("reject") . "\">\n";
echo "</div>\n";
echo "</form>\n";
// more info
$info_time = $is_series ? $row['repeat_info_time'] : $row['entry_info_time'];
$info_user = $is_series ? $row['repeat_info_user'] : $row['entry_info_user'];
if (empty($info_time)) {
$info_title = get_vocab("no_request_yet");
} else {
$info_title = get_vocab("last_request") . ' ' . time_date_string($info_time);
if (!empty($info_user)) {
$info_title .= " " . get_vocab("by") . " {$info_user}";
}
}
echo "<form action=\"view_entry.php?{$query_string}\" method=\"post\">\n";
echo "<div>\n";
echo "<input type=\"hidden\" name=\"action\" value=\"more_info\">\n";
echo "<input type=\"hidden\" name=\"returl\" value=\"" . htmlspecialchars($returl) . "\">\n";
echo "<input type=\"submit\" title=\"" . htmlspecialchars($info_title) . "\" value=\"" . get_vocab("more_info") . "\">\n";
echo "</div>\n";
echo "</form>\n";
} else {
// get the area settings for this room
get_area_settings(get_area($row['room_id']));
// if enough time has passed since the last reminder
// output a "Remind Admin" button, otherwise nothing
if ($reminders_enabled && working_time_diff(time(), $last_reminded) >= $reminder_interval) {
echo "<form action=\"approve_entry_handler.php\" method=\"post\">\n";
echo "<div>\n";
echo "<input type=\"hidden\" name=\"action\" value=\"remind_admin\">\n";
echo "<input type=\"hidden\" name=\"id\" value=\"" . $row['id'] . "\">\n";
echo "<input type=\"hidden\" name=\"returl\" value=\"" . htmlspecialchars($returl) . "\">\n";
echo "<input type=\"submit\" value=\"" . get_vocab("remind_admin") . "\">\n";
echo "</div>\n";
echo "</form>\n";
} else {
echo " ";
}
}
}
示例4: process_event
//.........这里部分代码省略.........
$booking[$key] = $value;
}
}
break;
case 'CLASS':
if (in_array($details['value'], array('PRIVATE', 'CONFIDENTIAL'))) {
$booking['status'] |= STATUS_PRIVATE;
}
break;
case 'STATUS':
if ($details['value'] == 'TENTATIVE') {
$booking['status'] |= STATUS_TENTATIVE;
}
break;
case 'UID':
$booking['ical_uid'] = $details['value'];
break;
case 'SEQUENCE':
$booking['ical_sequence'] = $details['value'];
break;
case 'LAST-MODIFIED':
// We probably ought to do something with LAST-MODIFIED and use it
// for the timestamp field
break;
default:
break;
}
}
// If we didn't manage to work out a username then just put the booking
// under the name of the current user
if (!isset($booking['create_by'])) {
$booking['create_by'] = getUserName();
}
// A SUMMARY is optional in RFC 5545, however a brief description is mandatory
// in MRBS. So if the VEVENT didn't include a name, we'll give it one
if (!isset($booking['name'])) {
$booking['name'] = "Imported event - no SUMMARY name";
}
// On the other hand a UID is mandatory in RFC 5545. We'll be lenient and
// provide one if it is missing
if (!isset($booking['ical_uid'])) {
$booking['ical_uid'] = generate_global_uid($booking['name']);
$booking['sequence'] = 0;
// and we'll start the sequence from 0
}
// LOCATION is optional in RFC 5545 but is obviously mandatory in MRBS.
// We could maybe have a default room on the form and use that
if (!isset($booking['room_id'])) {
$problems[] = get_vocab("no_LOCATION");
}
if (empty($problems)) {
// Get the area settings for this room, if we haven't got them already
if (!isset($room_settings[$booking['room_id']])) {
get_area_settings(get_area($booking['room_id']));
$room_settings[$booking['room_id']]['morningstarts'] = $morningstarts;
$room_settings[$booking['room_id']]['morningstarts_minutes'] = $morningstarts_minutes;
$room_settings[$booking['room_id']]['resolution'] = $resolution;
}
// Round the start and end times to slot boundaries
$date = getdate($booking['start_time']);
$m = $date['mon'];
$d = $date['mday'];
$y = $date['year'];
$am7 = mktime($room_settings[$booking['room_id']]['morningstarts'], $room_settings[$booking['room_id']]['morningstarts_minutes'], 0, $m, $d, $y);
$booking['start_time'] = round_t_down($booking['start_time'], $room_settings[$booking['room_id']]['resolution'], $am7);
$booking['end_time'] = round_t_up($booking['end_time'], $room_settings[$booking['room_id']]['resolution'], $am7);
// Make the bookings
$bookings = array($booking);
$result = mrbsMakeBookings($bookings, NULL, FALSE, $skip);
if ($result['valid_booking']) {
return TRUE;
}
}
// There were problems - list them
echo "<div class=\"problem_report\">\n";
echo get_vocab("could_not_import") . " UID:" . htmlspecialchars($booking['ical_uid']);
echo "<ul>\n";
foreach ($problems as $problem) {
echo "<li>" . htmlspecialchars($problem) . "</li>\n";
}
if (!empty($result['rules_broken'])) {
echo "<li>" . get_vocab("rules_broken") . "\n";
echo "<ul>\n";
foreach ($result['rules_broken'] as $rule) {
echo "<li>{$rule}</li>\n";
}
echo "</ul></li>\n";
}
if (!empty($result['conflicts'])) {
echo "<li>" . get_vocab("conflict") . "\n";
echo "<ul>\n";
foreach ($result['conflicts'] as $conflict) {
echo "<li>{$conflict}</li>\n";
}
echo "</ul></li>\n";
}
echo "</ul>\n";
echo "</div>\n";
return FALSE;
}
示例5: sql_query
// If we had $id passed in then it's a modification.
if (isset($id)) {
$sql = "SELECT *\n FROM {$tbl_entry}\n WHERE id={$id}\n LIMIT 1";
$res = sql_query($sql);
if (!$res) {
trigger_error(sql_error(), E_USER_WARNING);
fatal_error(TRUE, get_vocab("fatal_db_error"));
}
if (sql_count($res) != 1) {
fatal_error(1, get_vocab("entryid") . $id . get_vocab("not_found"));
}
$row = sql_row_keyed($res, 0);
sql_free($res);
// We've possibly got a new room and area, so we need to update the settings
// for this area.
$area = get_area($row['room_id']);
get_area_settings($area);
$private = $row['status'] & STATUS_PRIVATE;
if ($private_mandatory) {
$private = $private_default;
}
// Need to clear some data if entry is private and user
// does not have permission to edit/view details
if (isset($copy) && $user != $row['create_by']) {
// Entry being copied by different user
// If they don't have rights to view details, clear them
$privatewriteable = getWritable($row['create_by'], $user, $row['room_id']);
$keep_private = is_private_event($private) && !$privatewriteable;
} else {
$keep_private = FALSE;
}
示例6: foreach
// Some problems, but some reps can be contacted, proceed with a note
$stash['warning_text'] = "<strong>Note:</strong> Some of these representatives cannot be contacted for the following reasons: <br> " . $error_msg;
}
// Assemble the name string
$stash['rep_text'] = "<ul>";
foreach ($stash['valid_reps'] as $rep) {
$stash['rep_text'] .= "<li>" . $fyr_voting_area['rep_prefix'] . " " . $rep['name'] . " " . $fyr_voting_area['rep_suffix'] . "</li>";
}
$stash['rep_text'] .= "</ul>";
debug("FRONTEND", "Valid reps", $stash['valid_reps']);
// Set a msgid for each rep in the list
assign_message_ids();
} else {
// Message intended for individual representative
$fyr_representative = get_rep($fyr_values['who']);
$fyr_voting_area = get_area($fyr_representative['voting_area']);
if (is_postcode_editable($fyr_representative['type'])) {
$eb_area = mapit_call('area', $fyr_voting_area['parent_area']);
} else {
// Check that the representative represents this postcode
if (!$fyr_values['pc']) {
mismatch_error();
}
$postcode_areas = mapit_call('postcode', $fyr_values['pc']);
mapit_check_error($postcode_areas);
$area_ids = array_keys($postcode_areas['areas']);
if (!in_array($fyr_representative['voting_area'], $area_ids)) {
mismatch_error();
}
$eb_type = $va_inside[$fyr_voting_area['type']];
foreach ($postcode_areas['areas'] as $id => $arr) {
示例7: the_title
?>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<th>ホテル名</th>
<td><?php
echo the_title();
?>
<span>(<?php
echo post_custom('title_en');
?>
)</span></td>
</tr>
<tr>
<th>エリア</th>
<td><?php
echo get_area(get_the_ID());
?>
</td>
</tr>
<tr>
<th>address</th>
<td><?php
if ($base_infos) {
echo $base_infos[0]['address'];
?>
<?php
}
?>
</td>
</tr>
<tr>
示例8: get_form_var
$rep_num_weeks = get_form_var('rep_num_weeks', 'int');
$private = get_form_var('private', 'string');
// bool, actually
// Truncate the name field to the maximum length as a precaution.
// Although the MAXLENGTH attribute is used in the <input> tag, this can
// sometimes be ignored by the browser, for example by Firefox when
// autocompletion is used. The user could also edit the HTML and remove
// the MAXLENGTH attribute. Passing an oversize string to some
// databases (eg some versions of PostgreSQL) results in an SQL error,
// rather than silent truncation of the string.
$name = substr($name, 0, ENTRY_NAME_LENGTH);
if (empty($area)) {
if (empty($rooms[0])) {
$area = get_default_area();
} else {
$area = get_area($rooms[0]);
}
}
// Get the timeslot settings (resolution, etc.) for this area
get_area_settings($area);
// When $all_day is set, the hour and minute (or $period) fields are set to disabled, which means
// that they are not passed through by the form. We need to set them because they are needed below
// in various places. (We could change the JavaScript in edit_entry.php to set the fields to readonly
// instead of disabled, but browsers do not generally grey out readonly fields and this would mean
// that it's not so obvious to the user what is happening. Also doing it here is safer, in case
// JavaScript is disabled and for some strange reason the user changes the values in the form to be
// before start of day)
if (isset($all_day) && $all_day == "yes") {
if ($enable_periods) {
$period = 0;
} else {
示例9: get_shopname
}
if (isset($_COOKIE['renrenid'])) {
$_SESSION['email'] = $_COOKIE['renrenid'];
$mark = 1;
} else {
$mark = 0;
}
if (isset($_GET['shopid'])) {
$smarty->assign('shopname', get_shopname($db, $_GET['shopid']));
}
if (isset($_SESSION['email']) && isset($_COOKIE['renrenid'])) {
$user = get_user($db, $_SESSION['email']);
$nc = "<img src='./images/ico_renren.gif' align='bottom'/><a href='http://www.renren.com' target='_blank'>" . $user['nickname'] . "</a> 积分:" . $user['jifen'] . " <a id='feed_link' href='javascript:void(0);'>告诉好友</a>";
} elseif (isset($_SESSION['email']) && !isset($_COOKIE['renrenid'])) {
$user = get_user($db, $_SESSION['email']);
$nc = $user['nickname'] . " 积分:" . $user['jifen'];
} else {
$nc = NULL;
}
$city = get_city($db, $bulid);
$area = get_area($db, $bulid);
$shopcount = getshopcounts($db, $bulid);
$dinnercount = getdinnercounts($db, $bulid);
$smarty->assign("city", $city);
$smarty->assign("dinnercount", $dinnercount);
$smarty->assign("shopcount", $shopcount);
$smarty->assign("build", $area['b']);
$smarty->assign('mark', $mark);
$smarty->assign('nc', $nc);
$smarty->assign('tag', $tag);
$smarty->display("header.tpl");
示例10: isset
$sum = isset($sum) ? intval($sum) : 0;
$page = isset($page) ? max(intval($page), 1) : 1;
$catid = isset($catid) ? intval($catid) : 0;
$areaid = isset($areaid) ? intval($areaid) : 0;
$itemid = isset($itemid) ? is_array($itemid) ? array_map('intval', $itemid) : intval($itemid) : 0;
$pagesize = $DT['pagesize'] ? $DT['pagesize'] : 30;
$offset = ($page - 1) * $pagesize;
$kw = isset($_GET['kw']) ? strip_kw($_GET['kw']) : '';
$keyword = $kw ? str_replace(array(' ', '*'), array('%', '%'), $kw) : '';
$today_endtime = strtotime(date('Y-m-d', $DT_TIME) . ' 23:59:59');
$seo_file = $seo_title = $head_title = $head_keywords = $head_description = $head_canonical = $head_mobile = '';
if ($catid) {
$CAT = get_cat($catid);
}
if ($areaid) {
$ARE = get_area($areaid);
}
$_userid = $_admin = $_aid = $_message = $_chat = $_sound = $_online = $_money = $_credit = $_sms = 0;
$_username = $_company = $_passport = $_truename = '';
$_groupid = 3;
$destoon_auth = get_cookie('auth');
if ($destoon_auth) {
$_dauth = explode("\t", decrypt($destoon_auth));
$_userid = isset($_dauth[0]) ? intval($_dauth[0]) : 0;
$_username = isset($_dauth[1]) ? trim($_dauth[1]) : '';
$_groupid = isset($_dauth[2]) ? intval($_dauth[2]) : 3;
$_admin = isset($_dauth[4]) ? intval($_dauth[4]) : 0;
if ($_userid && !defined('DT_NONUSER')) {
$_password = isset($_dauth[3]) ? trim($_dauth[3]) : '';
$USER = $db->get_one("SELECT username,passport,company,truename,password,groupid,email,message,chat,sound,online,sms,credit,money,loginip,admin,aid,edittime,trade FROM {$DT_PRE}member WHERE userid={$_userid}");
if ($USER && $USER['password'] == $_password) {
示例11: get_area
?>
"><?php
echo $val['name'];
?>
</option>
<?php
}
}
?>
</select>
</label>
<label>
<select name="area">
<option selected value = -1>Địa điểm</option>
<?php
$area = get_area();
if (isset($area) && !empty($area)) {
foreach ($area as $key => $val) {
?>
<option value="<?php
echo $val['id'];
?>
"><?php
echo $val['name'];
?>
</option>
<?php
}
}
?>
</select>
示例12: get_post_meta
?>
" style="max-width:100px"></a></div>
<div class="list_name">
<span><?php
echo get_post_meta($post->ID, 'catch_copy', true);
?>
</span>
<a href="<?php
echo get_permalink($post->ID);
?>
" target="_top"><?php
echo $title;
?>
</a></div>
<p class="area"><?php
echo get_area($post->ID);
?>
</p>
<?php
$hotel_stars = get_post_meta($post->ID, 'baligirl_rank', true);
?>
<?php
if ($hotel_stars == '1') {
?>
<p class="rank"><img src="/img/osusume_rank1_s.jpg" width="12" height="12" alt="1つ星"></p>
<?php
} elseif ($hotel_stars == '2') {
?>
<p class="rank"><img src="/img/osusume_rank2_s.jpg" width="27" height="12" alt="2つ星"></p>
<?php
} elseif ($hotel_stars == '3') {
示例13: get_official
} else {
//get official for area
if ($level != 'national') {
$response['official'] = get_official();
}
//set names
set_names();
if ($level != 'national') {
//get all machines
$response['machines'] = get_machines();
}
//get codes and regions
set_regions_and_codes();
//get area
if (!$info_only) {
$response['area'] = get_area();
}
}
$response['header']['code'] = 0;
//put some error handling in later
$end_time = get_microseconds();
$response['header']['time'] = round($end_time - $start_time, 4);
if ($download) {
header('Pragma: no-cache');
switch ($download) {
case 'json':
header('Content-type: application/json');
header('Content-Disposition: attachment; filename=verifier-search.json');
echo json_encode(array('codes' => $response['codes']));
break;
case 'excel':
示例14: plbali_show_post
function plbali_show_post($posts)
{
if ($posts) {
foreach ($posts as $post) {
setup_postdata($post);
?>
<div class="list">
<div class="list_img">
<a href="<?php
echo get_permalink($post->ID);
?>
" target="_top">
<?php
$title = get_the_title($post->ID);
// $thumb = get_the_post_thumbnail($post->ID, array( 100,100 ), array( 'alt' =>$title, 'title' => $title));
// echo $thumb;
?>
<?php
$image_attributes = wp_get_attachment_image_src(get_post_meta($post->ID, 'thumbnail', true), 'full');
?>
<?php
$thumbnail = $image_attributes ? $image_attributes[0] : '';
?>
<img src="<?php
echo $thumbnail;
?>
" title="<?php
echo $title;
?>
" style="max-width:100px;max-height:100px">
</a>
</div>
<div class="list_name">
<div class="o_icon">
<?php
$staff_recommendation = get_post_meta($post->ID, 'staff_recommendation', true);
if ($staff_recommendation) {
?>
<img src="/img/staff_osusume_icon.gif" width="122" height="17" alt="スタッフおすすめ">
<?php
}
?>
</div>
<!-- <span><?php
echo get_post_meta($post->ID, 'copy', true);
?>
</span> -->
<a href="<?php
echo get_permalink($post->ID);
?>
" target="_top"><?php
echo $title;
?>
</a>
</div>
<p class="area"><?php
echo get_area($post->ID);
?>
</p>
<?php
$baligirl_rank = get_post_meta($post->ID, 'baligirl_rank', true);
?>
<?php
if ($baligirl_rank == '1') {
?>
<p class="rank"><img src="/img/osusume_rank1_s.jpg" width="12" height="12" alt="1つ星"></p>
<?php
} elseif ($baligirl_rank == '2') {
?>
<p class="rank"><img src="/img/osusume_rank2_s.jpg" width="27" height="12" alt="2つ星"></p>
<?php
} elseif ($baligirl_rank == '3') {
?>
<p class="rank"><img src="/img/osusume_rank3_s.jpg" width="42" height="12" alt="3つ星"></p>
<?php
} elseif ($baligirl_rank == '4') {
?>
<p class="rank"><img src="/img/osusume_rank4_s.jpg" width="57" height="12" alt="4つ星"></p>
<?php
} elseif ($baligirl_rank == '5') {
?>
<p class="rank"><img src="/img/osusume_rank5_s.jpg" width="72" height="12" alt="5つ星"></p>
<?php
} elseif ($baligirl_rank == '2-3') {
?>
<p class="rank"><img src="/img/osusume_rank2-3_s.jpg" width="89" height="12" alt="2〜3つ星"></p>
<?php
} elseif ($baligirl_rank == '2-4') {
?>
<p class="rank"><img src="/img/osusume_rank2-4_s.jpg" width="104" height="12" alt="2〜4つ星"></p>
<?php
} elseif ($baligirl_rank == '2-5') {
?>
<p class="rank"><img src="/img/osusume_rank2-5_s.jpg" width="119" height="12" alt="2〜5つ星"></p>
<?php
} elseif ($baligirl_rank == '3-4') {
?>
<p class="rank"><img src="/img/osusume_rank3-4_s.jpg" width="119" height="12" alt="3〜4つ星"></p>
<?php
//.........这里部分代码省略.........