PHPDevShell Core Utilities
2010-01-25 23:00:30   来源:   评论:0 点击:

$core->confirm_link ($confirm_what)

 

Description: This creates a simple confirmation box to ask users input before performing a critical link click.

  • string $confirm_what: What is the question to be asked in the confirmation box.
  • return: Javascript popup confirmation box.

Example Usage

// Get this page's URL
$this_page = $navigation->self_url();
 
// Generate the HTML code for the Delete link
$delete = $core->confirm_link("Do you really wish to delete this record?");
 
// Print a "Delete" link for the user. If clicked upon, the user will first be asked to confirm whether deletion should commence
echo "<a href=\"{$this_page}\"{$delete}>Delete</a>";
 
// FirePHP Log Result: onClick="return confirm('Do you really wish to delete this record?')"
$debug->log($delete);

$core->confirm_submit ($confirm_what)

Jump to PHPDevShell Doc

Description: This creates a simple confirmation box to ask users input before performing a critical submit.

  • string $confirm_what: What is the question to be asked in the confirmation box.
  • return: Javascript popup confirmation box.

Example Usage

// Get this page's URL
$this_page = $navigation->self_url();
 
// Generate the HTML code for the Submit link
$submit = $core->confirm_submit("Do you really wish to save the updated data?");
 
// Print a "Save" link for the user. If clicked upon, the user will first be asked to confirm whether the data can be saved
echo "<a href=\"{$this_page}\"{$submit}>Save</a>";
 
// FirePHP Log Result: onClick="return confirm('Do you really wish to save the updated data?')"
$debug->log($submit);

$core->alert_submit ($confirm_what)

Jump to PHPDevShell Doc

Description: This shows a simple "alert" box which notifies the user about a specified condition.

  • string $alert_msg: The actual warning message
  • return: Javascript popup warning box.

Example Usage

// Get this page's URL
$this_page = $navigation->self_url();
 
// Generate the HTML code for the Alert Submit link
$submit = $core->alert_submit("Warning, you are about to submit changes.");
 
// Print a "Save" link for the user. If clicked upon, the user will first be asked to confirm whether the data can be saved
echo "<a href=\"{$this_page}\"{$submit}>Save</a>";
 
// FirePHP Log Result: onClick="return confirm('Do you really wish to save the updated data?')"
$debug->log($submit);

We will talk about these soon:

    • alert_link ($alert_msg)
    • format_time_date ($time_stamp, $format_type_or_custom = 'default', $custom_timezone = false)
    • user_server_tz_diff ($custom_timestamp = false)
    • create_random_string ($length = 4, $uppercase_only = false)
    • __ ($say_what, $domain = false)
    • format_locale ($charset = true, $user_language = false, $user_region = false)
    • right_trim ($str, $remove = null)
    • safe_name ($name, $replace = '-')
    • SearchAndReplaceBetween ($string, $start, $end, $replace = )
    • replace_accents ($string)
    • _e ($text) (For templates (.tpl))
Retrieved from "http://wiki.phpdevshell.org/wiki/Core_Utilities"

相关热词搜索:

上一篇:PHPDevShell Navigation
下一篇:PHPDevShell Configuration

分享到: 收藏
频道总排行
频道本月排行