本文整理汇总了PHP中url_crumb函数的典型用法代码示例。如果您正苦于以下问题:PHP url_crumb函数的具体用法?PHP url_crumb怎么用?PHP url_crumb使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了url_crumb函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: get_name_for_itemtype
/**
* Callback to make post type name depending on post type id
*/
function get_name_for_itemtype($ityp_ID, $name)
{
global $admin_url, $edited_Item, $from_tab;
$current = $edited_Item->ityp_ID == $ityp_ID ? ' ' . T_('(current)') : '';
$from_tab_param = empty($from_tab) ? '' : '&from_tab=' . $from_tab;
$duplicated_item_param = get_param('p') > 0 ? '&p=' . get_param('p') : '';
return '<strong><a href="' . $admin_url . '?ctrl=items&action=update_type&post_ID=' . $edited_Item->ID . '&ityp_ID=' . $ityp_ID . $from_tab_param . $duplicated_item_param . '&' . url_crumb('item') . '">' . $name . '</a></strong>' . $current;
}
开发者ID:Ariflaw,项目名称:b2evolution,代码行数:11,代码来源:_item_edit_type.form.php
示例2: 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;
}
开发者ID:Edind304,项目名称:b2evolution,代码行数:16,代码来源:_antispam_ipranges.view.php
示例3: 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&' . url_crumb('element')));
}
return $r;
}
开发者ID:ldanielz,项目名称:uesp.blog,代码行数:10,代码来源:_generic_ordered_list.inc.php
示例4: td_file_properties_link
function td_file_properties_link($File, $link_text)
{
global $current_User;
if (is_object($File) && $current_User->check_perm('files', 'edit_allowed', false, $File->get_FileRoot())) {
// Check if File object is correct and current user has an access
return '<a href="' . url_add_param($File->get_linkedit_url(), 'action=edit_properties&fm_selected[]=' . rawurlencode($File->get_rdfp_rel_path()) . '&' . url_crumb('file')) . '">' . $link_text . '</a>';
} else {
return $link_text;
}
}
开发者ID:Ariflaw,项目名称:b2evolution,代码行数:10,代码来源:_file_likes.view.php
示例5: get_actions_for_itemtype
/**
* Callback to build possible actions depending on item type id
*
*/
function get_actions_for_itemtype($id)
{
global $reserved_ids;
$action = action_icon(T_('Duplicate this item type...'), 'copy', regenerate_url('action', 'ptyp_ID=' . $id . '&action=new'));
if ($id < $reserved_ids[0] || $id > $reserved_ids[1]) {
// not reserved id
$action = action_icon(T_('Edit this item type...'), 'edit', regenerate_url('action', 'ptyp_ID=' . $id . '&action=edit')) . $action . action_icon(T_('Delete this item type!'), 'delete', regenerate_url('action', 'ptyp_ID=' . $id . '&action=delete&' . url_crumb('itemtype') . ''));
}
return $action;
}
开发者ID:ldanielz,项目名称:uesp.blog,代码行数:14,代码来源:_itemtypes.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 . '&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;
}
开发者ID:Ariflaw,项目名称:b2evolution,代码行数:11,代码来源:_itemtag.form.php
示例7: 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;
}
开发者ID:Ariflaw,项目名称:b2evolution,代码行数:14,代码来源:_currency_list.view.php
示例8: 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;
}
开发者ID:Ariflaw,项目名称:b2evolution,代码行数:16,代码来源:_group.view.php
示例9: 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;
}
开发者ID:ldanielz,项目名称:uesp.blog,代码行数:30,代码来源:_generic_recursive_list.inc.php
示例10: 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');
}
开发者ID:Ariflaw,项目名称:b2evolution,代码行数:31,代码来源:_misc_tools.view.php
示例11: ityp_row_default
function ityp_row_default($item_type_ID)
{
if (ItemType::is_reserved($item_type_ID)) {
// It is reserved item type, Don't allow to enable this
return '';
}
global $current_User, $admin_url, $Blog;
if ($Blog->get_setting('default_post_type') == $item_type_ID) {
// The item type is default for current collection:
$status_icon = get_icon('bullet_black', 'imgtag', array('title' => sprintf(T_('The item type is the default for %s.'), $Blog->get('shortname'))));
} else {
// The item type is not default:
if ($current_User->check_perm('blog_properties', 'edit', false, $Blog->ID)) {
// URL to use the item type as default if current user has a permission to edit collection properties:
$status_url = $admin_url . '?ctrl=itemtypes&action=default&ityp_ID=' . $item_type_ID . '&blog=' . $Blog->ID . '&' . url_crumb('itemtype');
$status_icon_title = sprintf(T_('Set this item type as the default for %s.'), $Blog->get('shortname'));
} else {
$status_icon_title = sprintf(T_('The item type is not the default for %s.'), $Blog->get('shortname'));
}
$status_icon = get_icon('bullet_empty_grey', 'imgtag', array('title' => $status_icon_title));
}
if (isset($status_url)) {
return '<a href="' . $status_url . '">' . $status_icon . '</a>';
} else {
return $status_icon;
}
}
开发者ID:Ariflaw,项目名称:b2evolution,代码行数:27,代码来源:_itemtypes.view.php
示例12: rawurlencode
$current_skin_ID = $edited_Blog->get_setting($skin_type . '_skin_ID', true);
if ($current_User->check_perm('options', 'edit', false)) {
// We have permission to modify:
$block_item_Widget->global_icon(T_('Install new skin...'), 'new', $dispatcher . '?ctrl=skins&action=new&redirect_to=' . rawurlencode(url_rel_to_same_host(regenerate_url('', 'skinpage=selection', '', '&'), $admin_url)), T_('Install new'), 3, 4);
$block_item_Widget->global_icon(T_('Keep current skin!'), 'close', regenerate_url('skinpage'), ' ' . T_('Don\'t change'), 3, 4);
}
$block_item_Widget->disp_template_replaced('block_start');
$SkinCache =& get_SkinCache();
$SkinCache->load_all();
if ($display_same_as_normal) {
$skinshot_title = T_('Same as normal skin');
$select_url = '?ctrl=coll_settings&tab=skin&blog=' . $edited_Blog->ID . '&action=update&skinpage=selection&' . $skin_type . '_skin_ID=0&' . url_crumb('collection');
$disp_params = array('function' => 'select', 'selected' => $current_skin_ID == '0', 'select_url' => $select_url);
Skin::disp_skinshot($skinshot_title, $skinshot_title, $disp_params);
}
$SkinCache->rewind();
while (($iterator_Skin =& $SkinCache->get_next()) != NULL) {
if ($iterator_Skin->type != $skin_type) {
// This skin cannot be used here...
continue;
}
$selected = $current_skin_ID == $iterator_Skin->ID;
$blog_skin_param = $skin_type . '_skin_ID=';
$select_url = '?ctrl=coll_settings&tab=skin&blog=' . $edited_Blog->ID . '&action=update&skinpage=selection&' . $blog_skin_param . $iterator_Skin->ID . '&' . url_crumb('collection');
$preview_url = url_add_param($edited_Blog->gen_blogurl(), 'tempskin=' . rawurlencode($iterator_Skin->folder));
$disp_params = array('function' => 'select', 'selected' => $selected, 'select_url' => $select_url, 'function_url' => $preview_url);
// Display skinshot:
Skin::disp_skinshot($iterator_Skin->folder, $iterator_Skin->name, $disp_params);
}
echo '<div class="clear"></div>';
$block_item_Widget->disp_template_replaced('block_end');
开发者ID:ldanielz,项目名称:uesp.blog,代码行数:31,代码来源:_coll_skin.view.php
示例13: rgn_td_actions
function rgn_td_actions($rgn_enabled, $rgn_ID)
{
global $dispatcher;
$r = '';
if ($rgn_enabled == true) {
$r .= action_icon(T_('Disable the region!'), 'deactivate', regenerate_url('action', 'action=disable_region&rgn_ID=' . $rgn_ID . '&' . url_crumb('region')));
} else {
$r .= action_icon(T_('Enable the region!'), 'activate', regenerate_url('action', 'action=enable_region&rgn_ID=' . $rgn_ID . '&' . url_crumb('region')));
}
$r .= action_icon(T_('Edit this region...'), 'edit', regenerate_url('action', 'rgn_ID=' . $rgn_ID . '&action=edit'));
$r .= action_icon(T_('Duplicate this region...'), 'copy', regenerate_url('action', 'rgn_ID=' . $rgn_ID . '&action=new'));
$r .= action_icon(T_('Delete this region!'), 'delete', regenerate_url('action', 'rgn_ID=' . $rgn_ID . '&action=delete&' . url_crumb('region')));
return $r;
}
开发者ID:ldanielz,项目名称:uesp.blog,代码行数:14,代码来源:_region_list.view.php
示例14: Form
/**
* @var Comment
*/
global $edited_Comment;
/**
*
*/
global $Plugins;
global $mode, $month, $tab, $redirect_to, $comment_content;
$Form = new Form(NULL, 'comment_checkchanges', 'post');
$link_attribs = array('style' => 'margin-right: 3ex;');
// Avoid misclicks by all means!
if ($current_User->check_perm('blog_post!draft', 'edit', false, $Blog->ID)) {
$Form->global_icon(T_('Elevate this comment into a post'), 'elevate', '?ctrl=comments&action=elevate&comment_ID=' . $edited_Comment->ID . '&' . url_crumb('comment'), T_('Elevate into a post'), 4, 3, $link_attribs);
}
$delete_url = '?ctrl=comments&action=delete&comment_ID=' . $edited_Comment->ID . '&' . url_crumb('comment');
if ($edited_Comment->status == 'trash') {
$delete_title = T_('Delete this comment');
$delete_text = T_('delete');
$link_attribs['onclick'] = 'return confirm(\'' . TS_('You are about to delete this comment!\\nThis cannot be undone!') . '\')';
} else {
$delete_title = T_('Recycle this comment');
$delete_text = T_('recycle');
}
$Form->global_icon($delete_title, 'recycle', $delete_url, $delete_text, 4, 3, $link_attribs);
$Form->global_icon(T_('Cancel editing!'), 'close', str_replace('&', '&', $redirect_to), T_('cancel'), 4, 1);
$Form->begin_form('eform');
$Form->add_crumb('comment');
$Form->hidden('ctrl', 'comments');
$Form->hidden('redirect_to', $redirect_to);
$Form->hidden('comment_ID', $edited_Comment->ID);
开发者ID:Ariflaw,项目名称:b2evolution,代码行数:31,代码来源:_comment.form.php
示例15: antispam_actions
function antispam_actions(&$row)
{
$output = '';
if ($row->aspm_source == 'local') {
$output .= '[<a href="' . regenerate_url('action,keyword', 'action=report&keyword=' . rawurlencode($row->aspm_string)) . '&' . url_crumb('antispam') . '" title="' . T_('Report abuse to centralized ban blacklist!') . '">' . T_('Report') . '</a>]';
}
return $output . '[<a href="' . regenerate_url('action,keyword', 'action=ban&keyword=' . rawurlencode($row->aspm_string)) . '&' . url_crumb('antispam') . '" title="' . T_('Check hit-logs and comments for this keyword!') . '">' . T_('Re-check') . '</a>]';
}
开发者ID:ldanielz,项目名称:uesp.blog,代码行数:8,代码来源:_antispam_list.view.php
示例16: list
$block_item_Widget->disp_template_raw('block_end');
/**
* PHP
*/
$block_item_Widget->title = 'PHP';
$block_item_Widget->disp_template_replaced('block_start');
// User ID:
list($uid, $uname, $running_as) = system_check_process_user();
init_system_check('PHP running as USER:', $running_as);
disp_system_check('note');
// Group ID:
list($gid, $gname, $running_as) = system_check_process_group();
init_system_check('PHP running as GROUP:', $running_as);
disp_system_check('note');
// PHP version
$phpinfo_url = '?ctrl=tools&action=view_phpinfo&' . url_crumb('tools');
$phpinfo_link = action_icon(T_('View PHP info'), 'info', $phpinfo_url, '', 5, '', array('target' => '_blank', 'onclick' => 'return pop_up_window( \'' . $phpinfo_url . '\', \'phpinfo\', 650 )'));
init_system_check('PHP version', $system_stats['php_version'] . ' ' . $phpinfo_link);
if (version_compare($system_stats['php_version'], $required_php_version['application'], '<')) {
disp_system_check('error', T_('This version is too old. b2evolution will not run correctly. You must ask your host to upgrade PHP before you can run b2evolution.'));
} elseif (version_compare($system_stats['php_version'], '5.2', '<')) {
disp_system_check('warning', T_('This version is old. b2evolution may run but some features may fail. You should ask your host to upgrade PHP before running b2evolution.') . '<br />' . T_('PHP 5.2 or greater is recommended for maximum security, especially for "httpOnly" cookies support.'));
} else {
disp_system_check('ok');
}
// register_globals?
init_system_check('PHP register_globals', $system_stats['php_reg_globals'] ? T_('On') : T_('Off'));
if ($system_stats['php_reg_globals']) {
disp_system_check('warning', $facilitate_exploits . ' ' . sprintf($change_ini, 'register_globals = Off'));
} else {
disp_system_check('ok');
开发者ID:Ariflaw,项目名称:b2evolution,代码行数:31,代码来源:system.ctrl.php
示例17: die
*
* @copyright (c)2003-2015 by Francois Planque - {@link http://fplanque.com/}
*
* @package admin
*
* @author fplanque: Francois PLANQUE.
*/
if (!defined('EVO_MAIN_INIT')) {
die('Please, do not access this page directly.');
}
/**
* @var Skin
*/
global $edited_Skin;
$Form = new Form(NULL, 'skin_checkchanges');
$Form->global_icon(T_('Uninstall this skin!'), 'delete', regenerate_url('action', 'action=delete&' . url_crumb('skin')));
$Form->global_icon(T_('Cancel editing!'), 'close', regenerate_url('action'));
$Form->begin_form('fform', T_('Skin properties'));
$Form->add_crumb('skin');
$Form->hidden_ctrl();
$Form->hidden('action', 'update');
$Form->hidden('skin_ID', $edited_Skin->ID);
$Form->begin_fieldset(T_('Skin properties') . get_manual_link('skin-system-settings'));
echo '<div class="skin_settings well">';
$disp_params = array('skinshot_class' => 'coll_settings_skinshot');
Skin::disp_skinshot($edited_Skin->folder, $edited_Skin->name, $disp_params);
// Skin name
echo '<div class="skin_setting_row">';
echo '<label>' . T_('Skin name') . ':</label>';
echo '<span>' . $edited_Skin->name . '</span>';
echo '</div>';
开发者ID:Ariflaw,项目名称:b2evolution,代码行数:31,代码来源:_skin.form.php
示例18: cat_line
/**
* Generate category line when it has children
*
* @param object Chapter we want to display
* @param integer Level of the category in the recursive tree
* @return string HTML
*/
function cat_line($Chapter, $level)
{
global $line_class, $permission_to_edit, $current_User, $Settings;
global $ChapterCache, $current_default_cat_ID;
global $number_of_posts_in_cat;
global $Session;
$result_fadeout = $Session->get('fadeout_array');
$line_class = $line_class == 'even' ? 'odd' : 'even';
// ID
$r = '<tr id="tr-' . $Chapter->ID . '"class="' . $line_class . ' chapter_parent_' . ($Chapter->parent_ID ? $Chapter->parent_ID : '0') . (isset($result_fadeout) && in_array($Chapter->ID, $result_fadeout) ? ' fadeout-ffff00' : '') . '">
<td class="firstcol shrinkwrap">' . $Chapter->ID . '
</td>';
// Default
if ($current_default_cat_ID == $Chapter->ID) {
$makedef_icon = get_icon('enabled', 'imgtag', array('title' => format_to_output(T_('This is the default category'), 'htmlattr')));
} else {
$makedef_url = regenerate_url('action,cat_ID', 'cat_ID=' . $Chapter->ID . '&action=make_default&' . url_crumb('element'));
$makedef_title = format_to_output(T_('Click to make this the default category'), 'htmlattr');
$makedef_icon = '<a href="' . $makedef_url . '" title="' . $makedef_title . '">' . get_icon('disabled', 'imgtag', array('title' => $makedef_title)) . '</a>';
}
$r .= '<td class="center">' . $makedef_icon . '</td>';
// Name
if ($permission_to_edit) {
// We have permission permission to edit:
$edit_url = regenerate_url('action,cat_ID', 'cat_ID=' . $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>';
}
// URL "slug"
$edit_url = regenerate_url('action,cat_ID', 'cat_ID=' . $Chapter->ID . '&action=edit');
$r .= '<td><a href="' . htmlspecialchars($Chapter->get_permanent_url()) . '">' . $Chapter->dget('urlname') . '</a></td>';
// Order
if ($Chapter->get_parent_subcat_ordering() == 'manual') {
// Manual ordering
$r .= '<td class="center cat_order_edit" rel="' . $Chapter->ID . '">' . '<a href="#">' . ($Chapter->get('order') === NULL ? '-' : $Chapter->dget('order')) . '</a>' . '</td>';
} else {
// Alphabetic ordering
$r .= '<td class="center">' . T_('Alphabetic') . '</td>';
}
if ($permission_to_edit) {
// We have permission permission to edit, so display these columns:
if ($Chapter->meta) {
$makemeta_icon = 'enabled';
$makemeta_title = format_to_output(T_('Click to revert this from meta category'), 'htmlattr');
$action = 'unset_meta';
} else {
$makemeta_icon = 'disabled';
$makemeta_title = format_to_output(T_('Click to make this as meta category'), 'htmlattr');
$action = 'set_meta';
}
// Meta
$makemeta_url = regenerate_url('action,cat_ID', 'cat_ID=' . $Chapter->ID . '&action=' . $action . '&' . url_crumb('element'));
$r .= '<td class="center"><a href="' . $makemeta_url . '" title="' . $makemeta_title . '">' . get_icon($makemeta_icon, 'imgtag', array('title' => $makemeta_title)) . '</a></td>';
// Lock
if ($Chapter->lock) {
$makelock_icon = 'file_not_allowed';
$makelock_title = format_to_output(T_('Unlock category'), 'htmlattr');
$action = 'unlock';
} else {
$makelock_icon = 'file_allowed';
$makelock_title = format_to_output(T_('Lock category'), 'htmlattr');
$action = 'lock';
}
$makelock_url = regenerate_url('action,cat_ID', 'cat_ID=' . $Chapter->ID . '&action=' . $action . '&' . url_crumb('element'));
$r .= '<td class="center"><a href="' . $makelock_url . '" title="' . $makelock_title . '">' . get_icon($makelock_icon, 'imgtag', array('title' => $makelock_title)) . '</a></td>';
}
// Posts
if (isset($number_of_posts_in_cat[$Chapter->ID])) {
$r .= '<td class="center">' . (int) $number_of_posts_in_cat[$Chapter->ID] . '</td>';
} else {
// no posts in this category
$r .= '<td class="center"> - </td>';
}
// Actions
$r .= '<td class="lastcol shrinkwrap">';
if ($permission_to_edit) {
// We have permission permission to edit, so display action column:
$r .= 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_('New...'), 'new', regenerate_url('action,cat_ID,cat_parent_ID', 'cat_parent_ID=' . $Chapter->ID . '&action=new')) . action_icon(T_('Delete...'), 'delete', regenerate_url('action,cat_ID', 'cat_ID=' . $Chapter->ID . '&action=delete&' . url_crumb('element')));
}
$r .= '</td>';
$r .= '</tr>';
return $r;
}
开发者ID:Ariflaw,项目名称:b2evolution,代码行数:100,代码来源:_chapter_list.view.php
示例19: die
* @copyright (c)2009-2015 by Francois Planque - {@link http://fplanque.com/}
* Parts of this file are copyright (c)2009 by The Evo Factory - {@link http://www.evofactory.com/}.
*
* @package evocore
*/
if (!defined('EVO_MAIN_INIT')) {
die('Please, do not access this page directly.');
}
load_class('users/model/_userfieldgroup.class.php', 'UserfieldGroup');
/**
* @var Userfield
*/
global $edited_UserfieldGroup;
// Determine if we are creating or updating...
global $action;
$creating = is_create_action($action);
$Form = new Form(NULL, 'userfieldgroup_checkchanges', 'post', 'compact');
$Form->global_icon(T_('Delete this user field group!'), 'delete', regenerate_url('action', 'action=delete&' . url_crumb('userfieldgroup')));
$Form->global_icon(T_('Cancel editing!'), 'close', '?ctrl=userfields');
$Form->begin_form('fform', $creating ? T_('New user field group') : T_('User field group'));
$Form->add_crumb('userfieldgroup');
$Form->hiddens_by_key(get_memorized('action' . ($creating ? ',ufgp_ID' : '')));
// (this allows to come back to the right list order & page)
$Form->hidden('ufgp_ID', $edited_UserfieldGroup->ID);
$Form->text_input('ufgp_name', $edited_UserfieldGroup->name, 50, T_('Name'), '', array('maxlength' => 255, 'required' => true));
$Form->text_input('ufgp_order', $edited_UserfieldGroup->order, 50, T_('Order number'), '', array('maxlength' => 11, 'required' => true));
if ($creating) {
$Form->end_form(array(array('submit', 'actionArray[create]', T_('Record'), 'SaveButton'), array('submit', 'actionArray[create_new]', T_('Record, then Create New'), 'SaveButton'), array('submit', 'actionArray[create_copy]', T_('Record, then Create Similar'), 'SaveButton')));
} else {
$Form->end_form(array(array('submit', 'actionArray[update]', T_('Save Changes!'), 'SaveButton')));
}
开发者ID:Ariflaw,项目名称:b2evolution,代码行数:31,代码来源:_userfieldsgroup.form.php
示例20: regenerate_url
echo '<ul>';
echo '<li><a href="' . regenerate_url('action', 'action=check_tables&' . url_crumb('tools')) . '">' . T_('CHECK database tables') . '</a></li>';
echo '<li><a href="' . regenerate_url('action', 'action=optimize_tables&' . url_crumb('tools')) . '">' . T_('OPTIMIZE database tables') . '</a></li>';
echo '<li><a href="' . regenerate_url('action', 'action=analyze_tables&' . url_crumb('tools')) . '">' . T_('ANALYZE database tables') . '</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_('Database Maintenance Tools');
$block_item_Widget->disp_template_replaced('block_start');
echo '<ul>';
echo '<li><a href="' . regenerate_url('action', 'action=del_obsolete_tags&' . url_crumb('tools')) . '">' . T_('Remove obsolete (unused) tag entries') . '</a></li>';
echo '<li><a href="' . regenerate_url('action', 'action=find_broken_posts&' . url_crumb('tools')) . '">' . T_('Find all broken posts that have no matching category') . '</a></li>';
echo '<li><a href="' . regenerate_url('action', 'action=find_broken_slugs&' . url_crumb('tools')) . '">' . T_('Find all broken slugs that have no matching target post') . '</a></li>';
echo '<li><a href="' . regenerate_url('action', 'action=delete_orphan_comment_uploads&' . url_crumb('tools')) . '">' . T_('Find and delete 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 orphan File objects (with no matching file on disk)') . '</a></li>';
echo '<li><a href="' . regenerate_url('action', 'action=prune_hits_sessions&' . url_crumb('tools')) . '">' . T_('Prune old hits & sessions (includes OPTIMIZE)') . '</a></li>';
echo '</ul>';
$block_item_Widget->disp_template_raw('block_end');
$block_item_Widget->title = T_('Recreate item slugs');
$block_item_Widget->disp_template_replaced('block_start');
echo '» <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 redirect to the new one.') . '</a>';
$block_item_Widget->disp_template_raw('block_end');
}
// 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:ldanielz,项目名称:uesp.blog,代码行数:31,代码来源:_misc_tools.view.php
注:本文中的url_crumb函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论