本文整理汇总了PHP中href_link函数的典型用法代码示例。如果您正苦于以下问题:PHP href_link函数的具体用法?PHP href_link怎么用?PHP href_link使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了href_link函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: str_replace
if (strlen($mailVars['options']) < 1) {
$mailVars['options'] = 'none';
}
//send buddy email
$mailSubject = str_replace($mailTags, $mailVars, $_SESSION['BUDDY_LIST_EMAILS_SUBJECT']);
$mailBody = str_replace($mailTags, $mailVars, $_SESSION['BUDDY_LIST_EMAILS_BODY']);
// Added by BenH 03/12/06 - we only want to send if we have users
if ($my_users) {
foreach ($my_users as $d => $buddy_details) {
send_mail($_SESSION['BUDDY_LIST_EMAILS_FROM_NAME'], $_SESSION['BUDDY_LIST_EMAILS_FROM'], $buddy_details['firstname'] . ' ' . $buddy_details['lastname'], $buddy_details['email'], $mailSubject, $mailBody);
}
}
}
// end if user has no buddies
// Redirect to display page for user options (edit/delete).
header('Location: ' . href_link(FILENAME_DETAILS_VIEW, 'event_id=' . $add_event_id . '&origin=' . FILENAME_ADD_EVENT . '&' . 'date=' . $starting_date . '&' . make_hidden_fields_workstring() . '&page_info_message=' . urlencode($page_info_message), 'NONSSL'));
wrap_exit();
} else {
$page_error_message = "We could not add your event. Please check your information and try again.";
}
}
// end of if ($page_error_message == '')
//add a BACK link for non admin users if there has been any kind of error.
if ($page_error_message != '' && !$is_admin) {
$page_error_message .= '<br><br><a href="javascript:history.go(-2);">Go back</a>';
}
}
// end of if ($_POST['add_want'] != "" || $_POST['check_event'] != "")
$page_title = "Booking Calendar - Add Booking Event";
$page_title_bar = "Add Booking Event:";
include_once "header.php";
示例2: href_link
class="BgcolorDull2" nowrap="nowrap"><b>Time Slot</b></td>
<td class="BgcolorBright" align="center" valign="middle">
<a href="<?php
echo href_link(FILENAME_DAY_VIEW, 'date=' . PREVIOUS_DAY_DATE . '&print_view=1&' . make_hidden_fields_workstring(array('view', 'loc')), 'NONSSL');
?>
"><img
src="<?php
echo DIR_WS_IMAGES;
?>
/prev.gif"
alt="Previous Day" /></a><b><?php
echo SELECTED_DATE_LONGSTR;
?>
</b><a
href="<?php
echo href_link(FILENAME_DAY_VIEW, 'date=' . NEXT_DAY_DATE . '&print_view=1&' . make_hidden_fields_workstring(array('view', 'loc')), 'NONSSL');
?>
"><img
src="<?php
echo DIR_WS_IMAGES;
?>
/next.gif" alt="Next Day" /></a></td>
</tr>
<?php
$count = 0;
$width_length = 5;
$data_display_times = array();
$data_display_times = get_times_in_range(MIN_BOOKING_HOUR, MAX_BOOKING_HOUR, BOOKING_TIME_INTERVAL);
array_pop($data_display_times);
示例3: header
<?php
// set a variable that will be picked up by the user widget to say that it is the buy credits page, therefore
// the number of credits bought by the user may have changed
$buyCreditsPage = true;
include_once "./includes/application_top.php";
if (REQUIRE_AUTH_FOR_ADDING_FLAG) {
if (!@wrap_session_is_registered('valid_user')) {
header('Location: ' . href_link(FILENAME_LOGIN, 'origin=' . FILENAME_BUY_CREDITS . '&' . make_hidden_fields_workstring(), 'NONSSL'));
wrap_exit();
}
}
$page_title = 'Buy Credits';
$page_title_bar = "Buy Credits";
include_once "header.php";
// Show the number of credits the user has
echo "<p><strong>Booking credits remaining:</strong> " . $user_info['booking_credits'] . " credit";
if ($user_info['booking_credits'] != 1) {
echo "s";
}
echo "</p>";
?>
<table width="550" border="0" cellpadding="2" cellspacing="4">
<tr>
<td width="530">NOTE: Once payment has been made via Paypal, your account will be updated automatically with the additional credits once you have received a confirmation email. <font color="red">Please note this can take up to 20 minutes.</font></td>
</tr>
</table>
<?php
//Load the user info
$user_info = get_user(get_user_id($_SESSION['valid_user']));
// Check we have permissions to buy credits
示例4: href_link
<a href="<?php
echo href_link(FILENAME_FORGOT_USERNAME, '', 'NONSSL');
?>
">Forgot Username?</a><br />
<a href="<?php
echo href_link(FILENAME_FORGOT_PASSWD, '', 'NONSSL');
?>
">Forgot Password?</a><br />
<a href="<?php
echo href_link(FILENAME_CHANGE_PASSWD, '', 'NONSSL');
?>
">Change Password</a><br />
<a href="<?php
echo href_link(FILENAME_UPDATE, '', 'NONSSL');
?>
">Update User Info</a><br />
-->
<a href="<?php
echo href_link(FILENAME_HELP, '', 'NONSSL');
?>
">User Help</a>
</span></td>
</tr>
</table>
<?php
}
// end allow additions
?>
示例5: elseif
?>
-<?php
echo $end_time;
?>
</a> -
Subject: <?php
echo $this_event['subject'];
?>
</span></td>
<?php
} elseif ($event_row_data[$display_time] == '0') {
// This is where the cell is already taken from the prev row.
} else {
?>
<td align="right" rowspan="1" class="BgcolorNormal"><span
class="FontSoftSmall"><a href="<?php
echo href_link(FILENAME_ADD_EVENT, 'start_time=' . $std_time_str . '&' . make_hidden_fields_workstring(array('date', 'view', 'loc')), 'NONSSL');
?>
">(+)</a></span></td>
<?php
}
// end of if/elseif/else
?>
</tr>
<?php
}
// end of foreach
?>
</table>
示例6: sprintf
<tr>
<?php
}
if (SELECTED_DATE_MONTH == $i) {
?>
<td align="center" valign="middle" class="BgcolorDull"><span class="FontSoftSmall"><b><?php
echo $mon_str;
?>
</b></span></td>
<?php
} else {
$date = SELECTED_DATE_YEAR . '-' . sprintf("%02d", $i) . '-' . SELECTED_DATE_DAY;
?>
<td align="center" valign="middle" class="BgcolorNormal"><span class="FontSoftSmall"><a
href="<?php
echo href_link(NAV_SCRIPT_NAME, 'date=' . $date . '&' . make_hidden_fields_workstring(array('view', 'loc')), 'NONSSL');
?>
"><?php
echo $mon_str;
?>
</a></span></td>
<?php
}
if ($i % $cols == 0) {
?>
</tr>
<?php
}
}
// end of for loop
if (12 % $cols != 0) {
示例7: create_sort_heading
/**
* Create a sort heading with appropriate sort link
*
* @param string $key The key used for sorting
* @param string $heading The heading to use the link on
* @access public
*/
function create_sort_heading($key, $heading)
{
global $Language;
$current = false;
$direction = false;
if (!isset($_GET['sort'])) {
$current = 'name';
} elseif ($_GET['sort'] == $key || $_GET['sort'] == $key . '|d') {
$current = $key;
}
if ($key == $current) {
if (isset($_GET['sort'])) {
$direction = $_GET['sort'] == $key ? '+' : '-';
} else {
$direction = '+';
}
}
return link_object(href_link(basename($_SERVER['SCRIPT_FILENAME']), get_all_get_params(array('page', 'sort')) . '&sort=' . $key . ($direction == '+' ? '|d' : '')), $heading . ($key == $current ? $direction : ''), 'title="' . (isset($_GET['sort']) && $_GET['sort'] == $key ? sprintf($Language->get('listing_sort_ascendingly'), $heading) : sprintf($Language->get('listing_sort_descendingly'), $heading)) . '" class="productListing-heading"');
}
示例8: href_link
<a href="<?php
echo href_link(FILENAME_LOGIN, '', 'NONSSL');
?>
">User Login</a><br />
<a href="<?php
echo href_link(FILENAME_LOGOUT, '', 'NONSSL');
?>
">User Logout</a><br />
<br />
<a href="<?php
echo href_link(FILENAME_FORGOT_USERNAME, '', 'NONSSL');
?>
">Forgot Username?</a><br />
<a href="<?php
echo href_link(FILENAME_FORGOT_PASSWD, '', 'NONSSL');
?>
">Forgot Password?</a><br />
<a href="<?php
echo href_link(FILENAME_CHANGE_PASSWD, '', 'NONSSL');
?>
">Change Password</a><br />
<a href="<?php
echo href_link(FILENAME_UPDATE, '', 'NONSSL');
?>
">Update User Info</a><br />
</p>
<?php
include_once "footer.php";
include_once "application_bottom.php";
示例9: sprintf
<tr>
<?php
}
if (SELECTED_DATE_MONTH == $i) {
?>
<td align="center" valign="middle" class="BgcolorDull"><span class="FontSoftSmall"><b><?php
echo $mon_str;
?>
</b></span></td>
<?php
} else {
$date = SELECTED_DATE_YEAR . '-' . sprintf("%02d", $i) . '-' . SELECTED_DATE_DAY;
?>
<td align="center" valign="middle" class="BgcolorNormal"><span class="FontSoftSmall"><a
href="<?php
echo href_link(FILENAME_MONTH_VIEW, 'date=' . $date . '&' . make_hidden_fields_workstring(array('view', 'loc')), 'NONSSL');
?>
"><?php
echo $mon_str;
?>
</a></span></td>
<?php
}
if ($i % $cols == 0) {
?>
</tr>
<?php
}
}
// end of for loop
if (12 % $cols != 0) {
示例10: href_link
<?php
} else {
?>
<table cellspacing="1" cellpadding="1" width="100%" border="0">
<tr>
<td nowrap="nowrap" align="center" valign="middle" class="BgcolorDull2">
<img src="<?php
echo DIR_WS_IMAGES;
?>
/spacer.gif" width="15" height="15" />
Add New Event:
<img src="<?php
echo DIR_WS_IMAGES;
?>
/spacer.gif" width="15" height="15" />
</td>
</tr>
</table>
<table cellspacing="1" cellpadding="1" width="100%" border="0">
<tr>
<td nowrap="nowrap" align="center" valign="middle" class="BgcolorNormal"><a href="<?php
echo href_link(FILENAME_WEEK_VIEW, 'view=week&' . make_hidden_fields_workstring(array('date', 'loc')), 'NONSSL');
?>
">Select date from calendar</a></td>
</tr>
</table>
</form>
<?php
}
示例11: header
<?php
include_once "./includes/application_top.php";
if (!@wrap_session_is_registered('valid_user')) {
header('Location: ' . href_link(FILENAME_LOGIN, 'origin=' . FILENAME_UPDATE, 'NONSSL'));
wrap_exit();
}
$page_title = "Update User Information";
$page_error_message = '';
$update_result = false;
// default
if ($_POST['update'] == "") {
$user_info_fields = get_user_information($_SESSION['valid_user']);
if (!(count($user_info_fields) > 0)) {
$page_error_message = "Your user information could not be found! Please try again. " . $_SESSION['valid_user'] . "";
$update_result = false;
} else {
// Set the $_POST variable for the Form fields below.
foreach (array_keys($user_info_fields) as $key) {
$_POST[$key] = addslashes($user_info_fields[$key]);
}
}
} else {
if ($_POST['update'] != "") {
// Update Form Submit
if ($_POST['username'] == "" || $_POST['email'] == "") {
// check forms filled in - required fields
$page_title = "Problem Updating User Information!";
$page_error_message = "You have not filled the form out correctly. " . "Please make sure to fill out all required fields.";
} elseif (!validate_email($_POST['email'])) {
// email address not valid
示例12: elseif
onmouseout="nd();"><?php
echo $start_time;
?>
-<?php
echo $end_time;
?>
</a> </span></td>
<?php
} elseif ($event_row_data[$display_time][$week_date] == '0') {
// This is where the cell is already taken from the prev row.
} else {
//generate the link to be used for making/preventing bookings. Store for possible re-use later in this table row:
$make_booking_link = '';
list($year, $month, $day) = explode("-", $week_date);
if (wrap_session_is_registered("admin_user") || mktime($hour, $min, $sec, $month, $day, $year) < $booking_limited_time) {
$make_booking_link = href_link(FILENAME_ADD_EVENT, 'date=' . $week_date . '&start_time=' . $std_time_str . '&' . make_hidden_fields_workstring(array('view', 'loc')), 'NONSSL');
} else {
$make_booking_link = '#" onclick="return outsideBookingLimit();"';
}
?>
<td align="right" rowspan="1" class="BgcolorNormal" width="14%"><span
class="FontSoftSmall"><a href="<?php
echo $make_booking_link;
?>
">(+)</a></span></td>
<?php
}
// end of if/elseif/else
}
// end of foreach $week_date
?>
示例13: reset
echo DIR_WS_IMAGES;
?>
/spacer.gif" width="15" height="15" />
</td>
</tr>
</table>
<table cellspacing="1" cellpadding="1" width="100%" border="0">
<tr>
<td nowrap="nowrap" align="center" valign="middle" class="BgcolorNormal"><span class="FontSoftSmall">
<?php
reset($location_display);
while (list($location_id, $location_display_name) = each($location_display)) {
?>
<a href="<?php
echo href_link(NAV_SCRIPT_NAME, 'loc=' . $location_id . '&' . make_hidden_fields_workstring(array('date', 'view')), 'NONSSL');
?>
"
<?php
echo $_REQUEST['loc'] == $location_id ? $highlight_style : '';
?>
><b><?php
echo $location_display[$location_id];
?>
</b></a><br />
<?php
}
?>
</span></td>
</tr>
</table>
示例14: href_link
<a href="<?php
echo href_link(FILENAME_DAY_VIEW, 'view=day&' . make_hidden_fields_workstring(array('date', 'loc')), 'NONSSL');
?>
"
<?php
echo NAV_SCRIPT_NAME == FILENAME_DAY_VIEW ? $highlight_style : '';
?>
><b>Day</b></a>
<a href="<?php
echo href_link(FILENAME_WEEK_VIEW, 'view=week&' . make_hidden_fields_workstring(array('date', 'loc')), 'NONSSL');
?>
"
<?php
echo NAV_SCRIPT_NAME == FILENAME_WEEK_VIEW ? $highlight_style : '';
?>
><b>Week</b></a>
<a href="<?php
echo href_link(FILENAME_MONTH_VIEW, 'view=month&' . make_hidden_fields_workstring(array('date', 'loc')), 'NONSSL');
?>
"
<?php
echo NAV_SCRIPT_NAME == FILENAME_MONTH_VIEW ? $highlight_style : '';
?>
><b>Month</b></a>
</span></td>
</tr>
</table>
示例15: format_time_to_ampm
if (DEFINE_AM_PM) {
$start_time = format_time_to_ampm($start_time);
$end_time = format_time_to_ampm($end_time);
}
// Use the $db_row_id to data seek to the data for this event.
$rv = wrap_db_data_seek($event_data, $db_row_id);
$this_event = wrap_db_fetch_array($event_data);
//is this user allowed to see the booking details?
if (!$_SESSION['SHOW_USER_DETAILS'] && $this_event['user_id'] != $currentUsersID) {
//user not allowed to see these details, overwrite the subject string
$this_event['subject'] = 'Booking Confirmed';
} else {
//add the booking option data into the event array
$this_event['booking_options'] = get_booking_options($this_event['event_id']);
}
$event_url = href_link(FILENAME_DETAILS_VIEW, 'event_id=' . $this_event['event_id'] . '&' . make_hidden_fields_workstring(array('date', 'view', 'loc')), 'NONSSL');
$over_text = 'Event ID#: ' . $this_event['event_id'] . '<br />Subject: ' . $this_event['subject'];
$numBookingOptions = count($this_event['booking_options']);
if ($numBookingOptions > 0) {
$over_text .= '<br />Options: ';
for ($o = 0; $o < $numBookingOptions; $o++) {
//handle commas to separate the list
if ($o != 0) {
$over_text .= ', ';
}
$over_text .= htmlspecialchars(stripslashes($this_event['booking_options'][$o]['desc']));
}
}
?>
<span class="FontSoftSmall"> <a href="<?php
echo $event_url;