File: pear-format-html.php
Source Location: /pearweb-1.0.0RC1/include/pear-format-html.php
Page Details:
Includes:
delim [line 947]
void delim(
[ $color = false], [ $delimiter = ' | '])
|
|
Print a pipe delimiter
Parameters
display_user_notes [line 754]
void display_user_notes(
$user, [ $width = '50%'])
|
|
Parameters
draw_navigation [line 336]
void draw_navigation(
$type, [ $menu_title = ''])
|
|
Parameters
error_handler [line 497]
void error_handler(
$errobj, [string $title = 'Error'], string|array|PEAR_Error $in)
|
|
Generates a complete PEAR web page with an error message in it then calls exit For use with PEAR_ERROR_CALLBACK error handling mode to print fatal errors and die.
Parameters
| string|array|PEAR_Error |
$in |
see report_error() for more info |
| string |
$title |
string to be put above the message |
| |
$errobj |
|
extra_styles [line 23]
void extra_styles(
[ $new = null])
|
|
Parameters
generate_captcha [line 1065]
string generate_captcha(
)
|
|
Sets $_SESSION['captcha'] and $_SESSION['captcha_time'] then prints the XHTML that displays a CAPTCHA image and a form input element Only generate a new $_SESSION['captcha'] if it doesn't exist yet. This avoids the problem of the CAPTCHA value being changed but the old image remaining in the browser's cache. This is necessary because caching can not be reliably disabled. Use upper case letters to reduce confusion with some of these fonts. Input is passed through strtoupper() before comparison. Don't use "I" or "O" to avoid confusion with numbers. Don't use digits because some of the fonts don't handle them.
getURL [line 677]
string getURL(
string $url)
|
|
Returns an absolute URL using Net_URL
Parameters
| string |
$url |
All/part of a url |
get_license_link [line 710]
string get_license_link(
[string $license = ""])
|
|
Get URL to license text
Parameters
| string |
$license |
Name of the license |
hdelim [line 958]
Prints a horizontal delimiter
html_category_urhere [line 643]
void html_category_urhere(
$id, [bool $link_lastest = false])
|
|
prints "urhere" menu bar Top Level :: XML :: XML_RPC
Parameters
| bool |
$link_lastest |
If the last category should or not be a link |
| |
$id |
|
localRedirect [line 693]
void localRedirect(
string $url, [bool $keepProtocol = true])
|
|
Redirects to the given full or partial URL. will turn the given url into an absolute url using the above getURL() function. This function does not return.
Parameters
| string |
$url |
Full/partial url to redirect to |
| bool |
$keepProtocol |
Whether to keep the current protocol or to force HTTP |
make_bug_link [line 833]
void make_bug_link(
$package, [ $type = 'list'], [ $linktext = ''])
|
|
Creates a link to the bug system
Parameters
make_image [line 904]
void make_image(
$file, [ $alt = ''], [ $align = ''], [ $extras = ''], [ $dir = ''], [ $border = 0], [ $styles = ''])
|
|
Returns an IMG tag for a given file (relative to the images dir)
Parameters
| |
$file |
|
| |
$alt |
|
| |
$align |
|
| |
$extras |
|
| |
$dir |
|
| |
$border |
|
| |
$styles |
|
make_link [line 812]
void make_link(
$url, [ $linktext = ''], [ $target = ''], [ $extras = ''])
|
|
Returns a hyperlink to something
Parameters
| |
$url |
|
| |
$linktext |
|
| |
$target |
|
| |
$extras |
|
make_mailto_link [line 862]
string make_mailto_link(
string $email, [string $linktext = ''], [string $extras = ''])
|
|
Turns the provided email address into a "mailto:" hyperlink. The link and link text are obfuscated by alternating Ord and Hex entities.
Parameters
| string |
$email |
the email address to make the link for |
| string |
$linktext |
a string for the visible part of the link. If not provided, the email address is used. |
| string |
$extras |
a string of extra attributes for the <a> element |
make_ticket_links [line 1145]
string make_ticket_links(
string $text)
|
|
Turns bug/feature request numbers into hyperlinks If the bug number is prefixed by the word "PHP," the link will go to bugs.php.net. Otherwise, the bug is considered a PEAR bug.
Parameters
| string |
$text |
the text to check for bug numbers |
menu_link [line 411]
void menu_link(
$text, $url)
|
|
Parameters
print_image [line 938]
void print_image(
$file, [ $alt = ''], [ $align = ''], [ $extras = ''], [ $dir = ''], [ $border = 0])
|
|
Prints an IMG tag for a given file
Parameters
| |
$file |
|
| |
$alt |
|
| |
$align |
|
| |
$extras |
|
| |
$dir |
|
| |
$border |
|
print_link [line 825]
void print_link(
$url, [ $linktext = ''], [ $target = ''], [ $extras = ''])
|
|
Echos a hyperlink to something
Parameters
| |
$url |
|
| |
$linktext |
|
| |
$target |
|
| |
$extras |
|
print_package_navigation [line 997]
void print_package_navigation(
int $pacid, string $name, string $action)
|
|
Prints a tabbed navigation bar for the various package pages.
Parameters
| int |
$pacid |
the id number of the package being viewed |
| string |
$name |
the name of the package being viewed |
| string |
$action |
the indicator of the current page view |
print_tabbed_navigation [line 966]
void print_tabbed_navigation(
$items)
|
|
Prints a tabbed navigation bar based on the parameter $items
Parameters
report_error [line 437]
bool report_error(
string|array|PEAR_Error $in, [string $class = 'errors'], [string $head = 'ERROR:'])
|
|
Display errors or warnings as a Here's what happens depending on $in: - string: value is printed
- array: looped through and each value is printed.
If array is empty, nothing is displayed.
If a value contains a PEAR_Error object,
- PEAR_Error: prints the value of getMessage() and getUserInfo()
if DEVBOX is true, otherwise prints data from getMessage().
Parameters
| string|array|PEAR_Error |
$in |
see long description |
| string |
$class |
name of the HTML class for the <div> tag. ("errors", "warnings") |
| string |
$head |
string to be put above the message |
report_success [line 512]
void report_success(
string $in)
|
|
Displays success messages inside a <div>
Parameters
| string |
$in |
the message to be displayed |
report_warning [line 478]
bool report_warning(
string|array|PEAR_Error $in)
|
|
Forwards warnings to report_error() For use with PEAR_ERROR_CALLBACK to get messages to be formatted as warnings rather than errors.
Parameters
| string|array|PEAR_Error |
$in |
see report_error() for more info |
resize_image [line 893]
void resize_image(
$img, [ $width = 1], [ $height = 1])
|
|
Tags the output of make_image() and resize it manually
Parameters
response_footer [line 248]
void response_footer(
[ $style = false])
|
|
Parameters
response_header [line 62]
void response_header(
[string $title = 'The PHP Extension and Application Repository'], [string $style = false], [ $extraHeaders = ''])
|
|
Prints out the XHTML headers and top of the page.
Parameters
| string |
$title |
a string to go into the header's <title> |
| string |
$style |
|
| |
$extraHeaders |
|
spacer [line 880]
void spacer(
[ $width = 1], [ $height = 1], [ $align = ''], [ $extras = ''])
|
|
Prints an IMG tag for a sized spacer GIF
Parameters
| |
$width |
|
| |
$height |
|
| |
$align |
|
| |
$extras |
|
user_link [line 789]
mixed user_link(
string $handle, [bool $compact = false])
|
|
Create link to the account information page and to the user's wishlist
Parameters
| string |
$handle |
User's handle |
| bool |
$compact |
Should the wishlist link be skipped? |
validate_captcha [line 1114]
bool validate_captcha(
[int $max_age = 300])
|
|
Check if the CAPTCHA value submitted by the user in $_POST['captcha'] matches $_SESSION['captcha'] and that the submission was made within the allowed time frame of the CAPTCHA being generated If the two values aen't the same or the length of time between CAPTCHA generation and form submission is too long, this function will unset() $_SESSION['captcha']. Unsetting it will cause generate_captcha() to come up with a new CAPTCHA value and image. This prevents brute force attacks. Similarly, if the submission is correct $_SESSION['captcha'] is unset() in order to keep robots from making multiple requests with a correctly guessed CAPTCHA value.
Parameters
| int |
$max_age |
the length of time in seconds since the CAPTCHA was generated during which a submission should be considered valid. Default is 300 seconds (aka 5 minutes). |
Documentation generated on Tue, 24 Oct 2006 21:32:25 -0400 by phpDocumentor 1.3.0. PEAR Logo Copyright © PHP Group 2004.
|
|