本文整理汇总了PHP中regenerate_url函数的典型用法代码示例。如果您正苦于以下问题:PHP regenerate_url函数的具体用法?PHP regenerate_url怎么用?PHP regenerate_url使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了regenerate_url函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: cat_line
/**
* Generate category line when it has children
*
* @param Chapter generic category we want to display
* @param int level of the category in the recursive tree
* @return string HTML
*/
function cat_line($Chapter, $level)
{
global $line_class, $result_fadeout, $permission_to_edit, $current_User, $Settings;
global $GenericCategoryCache;
$line_class = $line_class == 'even' ? 'odd' : 'even';
$r = '<tr id="tr-' . $Chapter->ID . '"class="' . $line_class . (isset($result_fadeout[$GenericCategoryCache->dbIDname]) && in_array($Chapter->ID, $result_fadeout[$GenericCategoryCache->dbIDname]) ? ' fadeout-ffff00' : '') . '">
<td class="firstcol shrinkwrap">' . $Chapter->ID . '
</td>';
if ($permission_to_edit) {
// We have permission permission to edit:
$edit_url = regenerate_url('action,' . $Chapter->dbIDname, $Chapter->dbIDname . '=' . $Chapter->ID . '&action=edit');
$r .= '<td>
<strong style="padding-left: ' . $level . 'em;"><a href="' . $edit_url . '" title="' . T_('Edit...') . '">' . $Chapter->dget('name') . '</a></strong>
</td>';
} else {
$r .= '<td>
<strong style="padding-left: ' . $level . 'em;">' . $Chapter->dget('name') . '</strong>
</td>';
}
$r .= '<td>' . $Chapter->dget('urlname') . '</td>';
$r .= '<td class="lastcol shrinkwrap">';
if ($permission_to_edit) {
// We have permission permission to edit, so display action column:
$r .= action_icon(T_('New...'), 'new', regenerate_url('action,cat_ID,cat_parent_ID', 'cat_parent_ID=' . $Chapter->ID . '&action=new')) . action_icon(T_('Edit...'), 'edit', $edit_url);
if ($Settings->get('allow_moving_chapters')) {
// If moving cats between blogs is allowed:
$r .= action_icon(T_('Move to a different blog...'), 'file_move', regenerate_url('action,cat_ID', 'cat_ID=' . $Chapter->ID . '&action=move'), T_('Move'));
}
$r .= action_icon(T_('Delete...'), 'delete', regenerate_url('action,cat_ID', 'cat_ID=' . $Chapter->ID . '&action=delete'));
}
$r .= '</td>';
$r .= '</tr>';
return $r;
}
示例2: display_list_start
/**
* Display list/table start preceeded by <form> opening.
*/
function display_list_start()
{
global $item_ID_array, $current_User;
if (!$current_User->check_perm('selections', 'view')) {
// User is NOT allowed to view selections
// Don't do any more then base class:
parent::display_list_start();
return;
}
$this->Form = new Form(regenerate_url('', '', '', '&'), $this->param_prefix . 'selections_checkchanges', 'post', 'none');
// COPY!!
$this->Form->begin_form('');
if ($this->total_pages > 0) {
// We have rows to display, we want the selection stuff:
// Need it to check in the next page if the selection has to be updated
$this->Form->hidden($this->param_prefix . 'previous_sel_ID', $this->current_selection_ID);
// Sets the cols_check global variable to verify if checkboxes
// have to be checked in the result set :
cols_check($this->current_selection_ID, $this->table_objsel, $this->field_selected, $this->field_selection);
// item_ID_array must be emptied to avoid conflicts with previous result sets :
// TODO: put this into object
$item_ID_array = array();
}
// list/table start:
parent::display_list_start();
}
示例3: antispam_ipranges_actions
/**
* Get actions links for IP range
*
* @param integer IP range ID
* @param string Current tab value
* @return string HTML links to edit and delete IP range
*/
function antispam_ipranges_actions($aipr_ID, $tab_param)
{
global $admin_url;
// A link to edit IP range
$r = action_icon(T_('Edit this IP range...'), 'properties', $admin_url . '?ctrl=antispam' . $tab_param . '&tab3=ipranges&iprange_ID=' . $aipr_ID . '&action=iprange_edit');
// A link to delete IP range
$r .= action_icon(T_('Delete this IP range!'), 'delete', regenerate_url('iprange_ID,action', 'iprange_ID=' . $aipr_ID . '&action=iprange_delete&' . url_crumb('iprange')));
return $r;
}
示例4: edit_actions
function edit_actions($ID)
{
global $locked_IDs, $GenericElementCache;
$r = action_icon(T_('Duplicate...'), 'copy', regenerate_url('action,' . $GenericElementCache->dbIDname, $GenericElementCache->dbIDname . '=' . $ID . '&action=copy'));
if (empty($locked_IDs) || !in_array($ID, $locked_IDs)) {
// This element is NOT locked:
$r = action_icon(T_('Edit...'), 'edit', regenerate_url('action,' . $GenericElementCache->dbIDname, $GenericElementCache->dbIDname . '=' . $ID . '&action=edit')) . $r . action_icon(T_('Delete!'), 'delete', regenerate_url('action,' . $GenericElementCache->dbIDname, $GenericElementCache->dbIDname . '=' . $ID . '&action=delete'));
}
return $r;
}
示例5: file_actions
function file_actions($link_ID)
{
global $current_File, $edited_Item, $current_User;
$title = T_('Locate this file!');
$r = $current_File->get_linkedit_link('&fm_mode=link_item&item_ID=' . $edited_Item->ID, get_icon('locate', 'imgtag', array('title' => $title)), $title);
if ($current_User->check_perm('item', 'edit', false, $edited_Item)) {
// Check that we have permission to edit item:
$r .= action_icon(T_('Delete this link!'), 'unlink', regenerate_url('action', 'link_ID=' . $link_ID . '&action=unlink'));
}
return $r;
}
示例6: tagitem_edit_actions
function tagitem_edit_actions($Item)
{
global $current_User, $edited_ItemTag;
// Display the edit icon if current user has the rights:
$r = $Item->get_edit_link(array('before' => '', 'after' => ' ', 'text' => get_icon('edit'), 'title' => '#', 'class' => ''));
if ($current_User->check_perm('item_post!CURSTATUS', 'edit', false, $Item)) {
// Display the unlink icon if current user has the rights:
$r .= action_icon(T_('Unlink this tag from post!'), 'unlink', regenerate_url('tag_ID,action,tag_filter', 'tag_ID=' . $edited_ItemTag->ID . '&item_ID=' . $Item->ID . '&action=unlink&' . url_crumb('tag')), NULL, NULL, NULL, array('onclick' => 'return confirm(\'' . format_to_output(sprintf(TS_('Are you sure you want to remove the tag "%s" from "%s"?'), $edited_ItemTag->dget('name'), $Item->dget('title')) . '\');', 'htmlattr')));
}
return $r;
}
示例7: get_name_for_itemtype
/**
* Callback to make item type name depending on item type id
*
*/
function get_name_for_itemtype($id, $name)
{
global $reserved_ids;
if ($id < $reserved_ids[0] || $id > $reserved_ids[1]) {
// not reserved id
$ret_name = '<strong><a href="' . regenerate_url('action,ID', 'ptyp_ID=' . $id . '&action=edit') . '">' . $name . '</a></strong>';
} else {
$ret_name = '<strong>' . $name . '</strong>';
}
return $ret_name;
}
示例8: get_name_for_itemtype
/**
* Callback to make post type name depending on post type id
*
*/
function get_name_for_itemtype($id, $name)
{
global $current_User;
if (!ItemType::is_reserved($id) && $current_User->check_perm('options', 'edit')) {
// Not reserved id AND current User has permission to edit the global settings
$ret_name = '<a href="' . regenerate_url('action,ID', 'ityp_ID=' . $id . '&action=edit') . '">' . $name . '</a>';
} else {
$ret_name = $name;
}
return '<strong>' . $ret_name . '</strong>';
}
示例9: curr_td_actions
function curr_td_actions($curr_enabled, $curr_ID)
{
global $dispatcher;
$r = '';
if ($curr_enabled == true) {
$r .= action_icon(T_('Disable the currency!'), 'deactivate', regenerate_url('action', 'action=disable_currency&curr_ID=' . $curr_ID . '&' . url_crumb('currency')));
} else {
$r .= action_icon(T_('Enable the currency!'), 'activate', regenerate_url('action', 'action=enable_currency&curr_ID=' . $curr_ID . '&' . url_crumb('currency')));
}
$r .= action_icon(T_('Edit this currency...'), 'edit', regenerate_url('action', 'curr_ID=' . $curr_ID . '&action=edit'));
$r .= action_icon(T_('Duplicate this currency...'), 'copy', regenerate_url('action', 'curr_ID=' . $curr_ID . '&action=new'));
$r .= action_icon(T_('Delete this currency!'), 'delete', regenerate_url('action', 'curr_ID=' . $curr_ID . '&action=delete&' . url_crumb('currency')));
return $r;
}
示例10: grp_actions
function grp_actions(&$row)
{
global $usedgroups, $Settings, $current_User;
$r = '';
if ($current_User->check_perm('users', 'edit', false)) {
$r = action_icon(T_('Edit this group...'), 'edit', regenerate_url('ctrl,action', 'ctrl=groups&action=edit&grp_ID=' . $row->grp_ID));
$r .= action_icon(T_('Duplicate this group...'), 'copy', regenerate_url('ctrl,action', 'ctrl=groups&action=new&grp_ID=' . $row->grp_ID));
if ($row->grp_ID != 1 && $row->grp_ID != $Settings->get('newusers_grp_ID') && !in_array($row->grp_ID, $usedgroups)) {
// delete
$r .= action_icon(T_('Delete this group!'), 'delete', regenerate_url('ctrl,action', 'ctrl=groups&action=delete&grp_ID=' . $row->grp_ID . '&' . url_crumb('group')));
} else {
$r .= get_icon('delete', 'noimg');
}
}
return $r;
}
示例11: SkinTag
/**
* Event handler: SkinTag (widget)
*
* @param array Associative array of parameters.
* @return boolean did we display?
*/
function SkinTag($params)
{
/**
* Default params:
*/
$params = array_merge(array('block_start' => '<div class="bSideItem">', 'block_end' => "</div>\n", 'block_body_start' => '', 'block_body_end' => ''), $params);
global $baseurlroot;
//$test_url = url_absolute( regenerate_url( '', '', '', '&' ), 'http://127.0.0.1' );
$current_url = url_absolute(regenerate_url('', '', '', '&'), $baseurlroot);
echo $params['block_start'];
echo $params['block_body_start'];
echo '<iframe src="http://www.facebook.com/plugins/like.php?href=' . urlencode($current_url) . '&layout=standard&show_faces=true&width=190&action=like&font=arial&colorscheme=light&height=66"
scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:190px; height:66px;"
allowTransparency="true"></iframe>';
echo $params['block_body_end'];
echo $params['block_end'];
return true;
}
示例12: cat_line
/**
* Generate category line when it has children
*
* @param GenericCategory generic category we want to display
* @param int level of the category in the recursive tree
* @return string HTML
*/
function cat_line($GenericCategory, $level)
{
global $line_class, $result_fadeout, $permission_to_edit, $current_User;
$line_class = $line_class == 'even' ? 'odd' : 'even';
$r = '<tr id="tr-' . $GenericCategory->ID . '"class="' . $line_class . (in_array($GenericCategory->ID, $result_fadeout) ? ' fadeout-ffff00' : '') . '">
<td class="firstcol shrinkwrap">' . $GenericCategory->ID . '
</td>';
if ($permission_to_edit) {
// We have permission permission to edit, so display action column:
$edit_url = regenerate_url('action,' . $GenericCategory->dbIDname, $GenericCategory->dbIDname . '=' . $GenericCategory->ID . '&action=edit');
$r .= '<td>
<label style="padding-left: ' . $level . 'em;"><a href="' . $edit_url . '" title="' . T_('Edit...') . '">' . $GenericCategory->name . '</a></label>
</td>
<td class="lastcol shrinkwrap">' . action_icon(T_('New...'), 'new', regenerate_url('action,' . $GenericCategory->dbIDname . ',' . $GenericCategory->dbprefix . 'parent_ID', $GenericCategory->dbprefix . 'parent_ID=' . $GenericCategory->ID . '&action=new')) . action_icon(T_('Edit...'), 'edit', $edit_url) . action_icon(T_('Delete...'), 'delete', regenerate_url('action,' . $GenericCategory->dbIDname, $GenericCategory->dbIDname . '=' . $GenericCategory->ID . '&action=delete&' . url_crumb('element'))) . '
</td>';
} else {
$r .= '<td class="lastcol">
<label style="padding-left: ' . $level . 'em;">' . $GenericCategory->name . '</label>
</td>';
}
$r .= '</tr>';
return $r;
}
示例13: contact_block
/**
* Get block/unblock icon
*
* @param block value
* @param user ID
* @return icon
*/
function contact_block($block, $user_ID, $user_status)
{
if ($user_status == 'closed') {
return '';
}
// set action url
$action_url = regenerate_url();
if (!is_admin_page()) {
// in front office the action will be processed by messaging module handle_htsrv_action() through action.php
$action_url = get_samedomain_htsrv_url() . 'action.php?mname=messaging&disp=contacts&redirect_to=' . rawurlencode($action_url);
}
if ($block == 0) {
return action_icon(T_('Block contact'), 'file_allowed', $action_url . '&action=block&user_ID=' . $user_ID . '&' . url_crumb('messaging_contacts'));
} else {
return action_icon(T_('Unblock contact'), 'file_not_allowed', $action_url . '&action=unblock&user_ID=' . $user_ID . '&' . url_crumb('messaging_contacts'));
}
}
示例14: Results
// Create result set:
$Results = new Results($SQL->get(), 'goals_', '-A');
$Results->Cache =& get_GoalCache();
$Results->title = T_('Goals') . get_manual_link('goal-settings');
/**
* Callback to add filters on top of the result set
*
* @param Form
*/
function filter_goals(&$Form)
{
$Form->checkbox_basic_input('final', get_param('final'), T_('Final only') . ' •');
$Form->text('s', get_param('s'), 30, T_('Search'), '', 255);
$GoalCategoryCache =& get_GoalCategoryCache(NT_('All'));
$GoalCategoryCache->load_all();
$Form->select_input_object('cat', get_param('cat'), $GoalCategoryCache, T_('Category'), array('allow_none' => true));
}
$Results->filter_area = array('callback' => 'filter_goals', 'url_ignore' => 'results_goals_page,final', 'presets' => array('all' => array(T_('All'), '?ctrl=goals&blog=' . $blog . '&final=0&s=&cat=0'), 'final' => array(T_('Final'), '?ctrl=goals&blog=' . $blog . '&final=1')));
$Results->cols[] = array('th' => T_('ID'), 'order' => 'goal_ID', 'td_class' => 'center', 'td' => '$goal_ID$');
$Results->cols[] = array('th' => T_('Name'), 'order' => 'goal_name', 'td' => $perm_options_edit ? '<a href="' . $admin_url . '?ctrl=goals&action=edit&blog=' . $blog . '&goal_ID=$goal_ID$" style="color:$gcat_color$~conditional( #gcat_color# == "", "", ";font-weight:bold" )~">$goal_name$</a>' : '<span style="color:$gcat_color$~conditional( #gcat_color# == "", "", ";font-weight:bold" )~">$goal_name$</span>');
$Results->cols[] = array('th' => T_('Category'), 'order' => 'gcat_name', 'td' => $perm_options_edit ? '<a href="' . $admin_url . '?ctrl=goals&tab3=cats&action=cat_edit&blog=' . $blog . '&gcat_ID=$goal_gcat_ID$" style="color:$gcat_color$">$gcat_name$</a>' : '<span style="color:$gcat_color$">$gcat_name$</span>', 'extra' => array('style' => 'color:#gcat_color#'));
$Results->cols[] = array('th' => T_('Key'), 'order' => 'goal_key', 'td' => '@action_link( "edit", #goal_key# )@');
$Results->cols[] = array('th' => T_('Redirect to'), 'order' => 'goal_redir_url', 'td_class' => 'small', 'td' => '<a href="%{Obj}->get_active_url()%">%{Obj}->get_active_url( array( "before_temp" => "<b>", "after_temp" => "</b>" ) )%</a>');
$Results->cols[] = array('th' => T_('Def. val.'), 'order' => 'goal_default_value', 'td_class' => 'right', 'td' => '$goal_default_value$');
if ($perm_options_edit) {
// We have permission to modify:
$Results->cols[] = array('th' => T_('Actions'), 'th_class' => 'shrinkwrap', 'td_class' => 'shrinkwrap', 'td' => '@action_icon("edit")@@action_icon("copy")@@action_icon("delete")@');
$Results->global_icon(T_('Create a new goal...'), 'new', regenerate_url('action', 'action=new'), T_('New goal') . ' »', 3, 4, array('class' => 'action_icon btn-primary'));
}
// Display results:
$Results->display();
示例15: regenerate_url
echo '<li><a href="' . regenerate_url('action', 'action=utf8check&' . url_crumb('tools')) . '">' . T_('Check/Convert/Normalize the charsets/collations used by the DB (UTF-8 / ASCII)') . '</a></li>';
// echo '<li><a href="'.regenerate_url('action', 'action=backup_db').'">'.T_('Backup database').'</a></li>';
echo '</ul>';
$block_item_Widget->disp_template_raw('block_end');
$block_item_Widget->title = T_('Cleanup tools');
$block_item_Widget->disp_template_replaced('block_start');
echo '<ul>';
echo '<li><a href="' . $admin_url . '?ctrl=itemtags&action=cleanup&' . url_crumb('tag') . '">' . T_('Find and delete all orphan Tag entries (not used anywhere) - DB only.') . '</a></li>';
echo '<li><a href="' . regenerate_url('action', 'action=find_broken_posts&' . url_crumb('tools')) . '">' . T_('Find all broken posts (with no matching Category) + Option to delete with related objects - DB only.') . '</a></li>';
echo '<li><a href="' . regenerate_url('action', 'action=find_broken_slugs&' . url_crumb('tools')) . '">' . T_('Find all broken slugs (with no matching Item) + Option to delete - DB only.') . '</a></li>';
echo '<li><a href="' . regenerate_url('action', 'action=delete_orphan_comments&' . url_crumb('tools')) . '">' . T_('Find and delete all orphan Comments (with no matching Item) - Disk & DB.') . '</a></li>';
echo '<li><a href="' . regenerate_url('action', 'action=delete_orphan_comment_uploads&' . url_crumb('tools')) . '">' . T_('Find and delete all orphan comment Uploads - Disk & DB.') . '</a></li>';
echo '<li><a href="' . regenerate_url('action', 'action=delete_orphan_files&' . url_crumb('tools')) . '">' . T_('Find and delete all orphan File objects (with no matching file on disk) - DB only.') . '</a></li>';
echo '<li><a href="' . regenerate_url('action', 'action=delete_orphan_file_roots&' . url_crumb('tools')) . '">' . T_('Find and delete all orphan file roots (with no matching Collection or User) and all of their content recursively - Disk & DB.') . '</a></li>';
echo '<li><a href="' . regenerate_url('action', 'action=prune_hits_sessions&' . url_crumb('tools')) . '">' . T_('Prune old hits & sessions (includes OPTIMIZE) - DB only.') . '</a></li>';
echo '<li><a href="' . regenerate_url('action', 'action=recreate_itemslugs&' . url_crumb('tools')) . '">' . T_('Recreate all item Slugs (change title-[0-9] canonical slugs to a slug generated from current title). Old slugs will still work, but will redirect to the new ones - DB only.') . '</a></li>';
echo '<li><a href="' . regenerate_url('action', 'action=recreate_autogenerated_excerpts&' . url_crumb('tools')) . '">' . T_('Recreate autogenerated excerpts - DB only.') . '</a></li>';
echo '<li><a href="' . regenerate_url('action', 'action=convert_item_content_separators&' . url_crumb('tools')) . '">' . T_('Convert item content separators to [teaserbreak] and [pagebreak] - DB only.') . '</a></li>';
echo '</ul>';
$block_item_Widget->disp_template_raw('block_end');
}
// We should load GeoIP plugin here even if it is disabled now, because action 'geoip_download' may be requested
$Plugins->load_plugin_by_classname('geoip_plugin');
// Event AdminToolPayload for each Plugin:
$tool_plugins = $Plugins->get_list_by_event('AdminToolPayload');
foreach ($tool_plugins as $loop_Plugin) {
$block_item_Widget->title = format_to_output($loop_Plugin->name);
$block_item_Widget->disp_template_replaced('block_start');
$Plugins->call_method_if_active($loop_Plugin->ID, 'AdminToolPayload', $params = array());
$block_item_Widget->disp_template_raw('block_end');
}