当前位置: 首页>>代码示例>>PHP>>正文


PHP regenerate_url函数代码示例

本文整理汇总了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 . '&amp;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 . '&amp;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 . '&amp;action=move'), T_('Move'));
        }
        $r .= action_icon(T_('Delete...'), 'delete', regenerate_url('action,cat_ID', 'cat_ID=' . $Chapter->ID . '&amp;action=delete'));
    }
    $r .= '</td>';
    $r .= '</tr>';
    return $r;
}
开发者ID:LFSF,项目名称:oras,代码行数:41,代码来源:_chapter_list.view.php

示例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();
 }
开发者ID:Ariflaw,项目名称:b2evolution,代码行数:29,代码来源:_resultsel.class.php

示例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 . '&amp;tab3=ipranges&amp;iprange_ID=' . $aipr_ID . '&amp;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 . '&amp;action=iprange_delete&amp;' . url_crumb('iprange')));
     return $r;
 }
开发者ID:Edind304,项目名称:b2evolution,代码行数:16,代码来源:_antispam_ipranges.view.php

示例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 . '&amp;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 . '&amp;action=edit')) . $r . action_icon(T_('Delete!'), 'delete', regenerate_url('action,' . $GenericElementCache->dbIDname, $GenericElementCache->dbIDname . '=' . $ID . '&amp;action=delete'));
     }
     return $r;
 }
开发者ID:LFSF,项目名称:oras,代码行数:10,代码来源:_generic_list.inc.php

示例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('&amp;fm_mode=link_item&amp;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 . '&amp;action=unlink'));
    }
    return $r;
}
开发者ID:LFSF,项目名称:oras,代码行数:11,代码来源:_file_links.view.php

示例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 . '&amp;item_ID=' . $Item->ID . '&amp;action=unlink&amp;' . 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;
 }
开发者ID:Ariflaw,项目名称:b2evolution,代码行数:11,代码来源:_itemtag.form.php

示例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 . '&amp;action=edit') . '">' . $name . '</a></strong>';
    } else {
        $ret_name = '<strong>' . $name . '</strong>';
    }
    return $ret_name;
}
开发者ID:ldanielz,项目名称:uesp.blog,代码行数:15,代码来源:_itemtypes.view.php

示例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 . '&amp;action=edit') . '">' . $name . '</a>';
    } else {
        $ret_name = $name;
    }
    return '<strong>' . $ret_name . '</strong>';
}
开发者ID:Ariflaw,项目名称:b2evolution,代码行数:15,代码来源:_itemtypes.view.php

示例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&amp;curr_ID=' . $curr_ID . '&amp;' . url_crumb('currency')));
    } else {
        $r .= action_icon(T_('Enable the currency!'), 'activate', regenerate_url('action', 'action=enable_currency&amp;curr_ID=' . $curr_ID . '&amp;' . url_crumb('currency')));
    }
    $r .= action_icon(T_('Edit this currency...'), 'edit', regenerate_url('action', 'curr_ID=' . $curr_ID . '&amp;action=edit'));
    $r .= action_icon(T_('Duplicate this currency...'), 'copy', regenerate_url('action', 'curr_ID=' . $curr_ID . '&amp;action=new'));
    $r .= action_icon(T_('Delete this currency!'), 'delete', regenerate_url('action', 'curr_ID=' . $curr_ID . '&amp;action=delete&amp;' . url_crumb('currency')));
    return $r;
}
开发者ID:Ariflaw,项目名称:b2evolution,代码行数:14,代码来源:_currency_list.view.php

示例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&amp;action=edit&amp;grp_ID=' . $row->grp_ID));
        $r .= action_icon(T_('Duplicate this group...'), 'copy', regenerate_url('ctrl,action', 'ctrl=groups&amp;action=new&amp;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&amp;action=delete&amp;grp_ID=' . $row->grp_ID . '&amp;' . url_crumb('group')));
        } else {
            $r .= get_icon('delete', 'noimg');
        }
    }
    return $r;
}
开发者ID:Ariflaw,项目名称:b2evolution,代码行数:16,代码来源:_group.view.php

示例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) . '&amp;layout=standard&amp;show_faces=true&amp;width=190&amp;action=like&amp;font=arial&amp;colorscheme=light&amp;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;
    }
开发者ID:Ariflaw,项目名称:b2evolution,代码行数:24,代码来源:_facebook.plugin.php

示例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 . '&amp;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 . '&amp;action=new')) . action_icon(T_('Edit...'), 'edit', $edit_url) . action_icon(T_('Delete...'), 'delete', regenerate_url('action,' . $GenericCategory->dbIDname, $GenericCategory->dbIDname . '=' . $GenericCategory->ID . '&amp;action=delete&amp;' . url_crumb('element'))) . '
					 </td>';
    } else {
        $r .= '<td class="lastcol">
						 <label style="padding-left: ' . $level . 'em;">' . $GenericCategory->name . '</label>
					 </td>';
    }
    $r .= '</tr>';
    return $r;
}
开发者ID:ldanielz,项目名称:uesp.blog,代码行数:30,代码来源:_generic_recursive_list.inc.php

示例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 . '&amp;' . url_crumb('messaging_contacts'));
    } else {
        return action_icon(T_('Unblock contact'), 'file_not_allowed', $action_url . '&action=unblock&user_ID=' . $user_ID . '&amp;' . url_crumb('messaging_contacts'));
    }
}
开发者ID:Ariflaw,项目名称:b2evolution,代码行数:24,代码来源:_contact_list.view.php

示例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') . ' &bull;');
    $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&amp;blog=' . $blog . '&amp;final=0&amp;s=&amp;cat=0'), 'final' => array(T_('Final'), '?ctrl=goals&amp;blog=' . $blog . '&amp;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&amp;action=edit&amp;blog=' . $blog . '&amp;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&amp;tab3=cats&amp;action=cat_edit&amp;blog=' . $blog . '&amp;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') . ' &raquo;', 3, 4, array('class' => 'action_icon btn-primary'));
}
// Display results:
$Results->display();
开发者ID:Ariflaw,项目名称:b2evolution,代码行数:31,代码来源:_stats_goals.view.php

示例15: regenerate_url

    echo '<li><a href="' . regenerate_url('action', 'action=utf8check&amp;' . 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&amp;action=cleanup&amp;' . 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&amp;' . 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&amp;' . 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&amp;' . url_crumb('tools')) . '">' . T_('Find and delete all orphan Comments (with no matching Item) - Disk &amp; DB.') . '</a></li>';
    echo '<li><a href="' . regenerate_url('action', 'action=delete_orphan_comment_uploads&amp;' . url_crumb('tools')) . '">' . T_('Find and delete all orphan comment Uploads - Disk &amp; DB.') . '</a></li>';
    echo '<li><a href="' . regenerate_url('action', 'action=delete_orphan_files&amp;' . 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&amp;' . url_crumb('tools')) . '">' . T_('Find and delete all orphan file roots (with no matching Collection or User) and all of their content recursively - Disk &amp; DB.') . '</a></li>';
    echo '<li><a href="' . regenerate_url('action', 'action=prune_hits_sessions&amp;' . url_crumb('tools')) . '">' . T_('Prune old hits &amp; sessions (includes OPTIMIZE) - DB only.') . '</a></li>';
    echo '<li><a href="' . regenerate_url('action', 'action=recreate_itemslugs&amp;' . 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&amp;' . url_crumb('tools')) . '">' . T_('Recreate autogenerated excerpts - DB only.') . '</a></li>';
    echo '<li><a href="' . regenerate_url('action', 'action=convert_item_content_separators&amp;' . 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');
}
开发者ID:Ariflaw,项目名称:b2evolution,代码行数:31,代码来源:_misc_tools.view.php


注:本文中的regenerate_url函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。