本文整理汇总了PHP中get_memorized函数的典型用法代码示例。如果您正苦于以下问题:PHP get_memorized函数的具体用法?PHP get_memorized怎么用?PHP get_memorized使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了get_memorized函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
$delete_notes[] = array(T_('WARNING: You are about to delete the default collection.'), 'warning');
}
if (($info_Blog =& get_setting_Blog('info_blog_ID')) && $info_Blog->ID == $edited_Blog->ID) {
// Info blog
$delete_notes[] = array(T_('WARNING: You are about to delete the collection used for info pages.'), 'warning');
}
if (($login_Blog =& get_setting_Blog('login_blog_ID')) && $login_Blog->ID == $edited_Blog->ID) {
// Login blog
$delete_notes[] = array(T_('WARNING: You are about to delete the collection used for login/registration pages.'), 'warning');
}
if (($msg_Blog =& get_setting_Blog('msg_blog_ID')) && $msg_Blog->ID == $edited_Blog->ID) {
// Messaging blog
$delete_notes[] = array(T_('WARNING: You are about to delete the collection used for messaging pages.'), 'warning');
}
$delete_notes[] = array(T_('Note: Some files in this collection\'s fileroot may be linked to users or to other collections posts and comments. Those files will ALSO be deleted, which may be undesirable!'), 'note');
$edited_Blog->confirm_delete(sprintf(T_('Delete collection «%s»?'), $edited_Blog->get_name()), 'collection', $action, get_memorized('action'), $delete_notes);
break;
default:
// List the blogs:
$AdminUI->disp_payload_begin();
// Display VIEW:
switch ($tab) {
case 'site_settings':
$AdminUI->disp_view('collections/views/_coll_settings_site.form.php');
break;
case 'blog_settings':
$AdminUI->disp_view('collections/views/_coll_settings_blog.form.php');
break;
}
$AdminUI->disp_payload_end();
}
示例2: find_users_with_same_email
// Find other users with the same email address
$message_same_email_users = find_users_with_same_email($edited_User->ID, $edited_User->get('email'), T_('Note: this user has the same email address (%s) as: %s'));
if ($message_same_email_users !== false) {
$confirm_messages[] = array($message_same_email_users, 'note');
}
// Add a checkbox on deletion form
$delete_form_params = array();
if ($Settings->get('reportpm_enabled')) {
// If this feature is enabled
$user_count_reports = count(get_user_reported_user_IDs($edited_User->ID));
if ($user_count_reports > 0) {
// If the user has been reported at least one time
$delete_form_params['before_submit_button'] = '<p><label>' . '<input type="checkbox" id="send_reportpm" name="send_reportpm" value="1"' . ($deltype == 'spammer' ? ' checked="checked"' : '') . ' /> ' . sprintf(T_('Send an info message to %s users who reported this account.'), $user_count_reports) . '</label></p>' . '<p><label>' . '<input type="checkbox" id="increase_spam_score" name="increase_spam_score" value="1"' . ($deltype == 'spammer' ? ' checked="checked"' : '') . ' /> ' . sprintf(T_('Increase spam fighter score for the %s users who reported this account.'), $user_count_reports) . '</label></p>';
}
}
$edited_User->confirm_delete($msg, 'user', $action, get_memorized('action'), $confirm_messages, $delete_form_params);
// Display user identity form:
$AdminUI->disp_view('users/views/_user_identity.form.php');
$AdminUI->disp_payload_end();
// Init JS for user reporting
echo_user_report_window();
break;
case 'promote':
default:
// Display user list:
// NOTE: we don't want this (potentially very long) list to be displayed again and again)
$AdminUI->disp_payload_begin();
if ($tab == 'stats') {
$AdminUI->disp_view('users/views/_user_stats.view.php');
} else {
$AdminUI->disp_view('users/views/_user_list.view.php');
示例3: switch
$AdminUI->breadcrumbpath_add(T_('Countries'), '?ctrl=countries');
// Display <html><head>...</head> section! (Note: should be done early if actions do not redirect)
$AdminUI->disp_html_head();
// Display title, menu, messages, etc. (Note: messages MUST be displayed AFTER the actions)
$AdminUI->disp_body_top();
$AdminUI->disp_payload_begin();
/**
* Display payload:
*/
switch ($action) {
case 'nil':
// Do nothing
break;
case 'delete':
// We need to ask for confirmation:
$edited_Country->confirm_delete(sprintf(T_('Delete country «%s»?'), $edited_Country->dget('name')), 'country', $action, get_memorized('action'));
case 'new':
case 'create':
case 'create_new':
case 'create_copy':
case 'edit':
case 'update':
$AdminUI->disp_view('regional/views/_country.form.php');
break;
default:
// No specific request, list all countries:
// Cleanup context:
forget_param('ctry_ID');
// Display country list:
$AdminUI->disp_view('regional/views/_country_list.view.php');
break;
示例4: 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')));
}
示例5: switch
$AdminUI->breadcrumbpath_add(T_('Conversations'), '?ctrl=threads');
// Display <html><head>...</head> section! (Note: should be done early if actions do not redirect)
$AdminUI->disp_html_head();
// Display title, menu, messages, etc. (Note: messages MUST be displayed AFTER the actions)
$AdminUI->disp_body_top();
$AdminUI->disp_payload_begin();
/**
* Display payload:
*/
switch ($action) {
case 'nil':
// Do nothing
break;
case 'delete':
// We need to ask for confirmation:
$edited_Thread->confirm_delete(sprintf(T_('Delete thread «%s»?'), $edited_Thread->dget('title')), 'messaging_threads', $action, get_memorized('action'));
$AdminUI->disp_view('messaging/views/_thread_list.view.php');
break;
case 'new':
case 'create':
$AdminUI->disp_view('messaging/views/_thread.form.php');
break;
default:
// No specific request, list all threads:
// Cleanup context:
forget_param('thrd_ID');
forget_param('msg_ID');
// Display threads list:
$AdminUI->disp_view('messaging/views/_thread_list.view.php');
break;
}
示例6: switch
$AdminUI->disp_html_head();
// Display title, menu, messages, etc. (Note: messages MUST be displayed AFTER the actions)
$AdminUI->disp_body_top();
// Begin payload block:
$AdminUI->disp_payload_begin();
/**
* Display Payload:
*/
switch ($action) {
case 'new':
// Display VIEW:
$AdminUI->disp_view('skins/views/_skin_list_available.view.php');
break;
case 'delete':
// We need to ask for confirmation:
$edited_Skin->confirm_delete(sprintf(T_('Uninstall skin «%s»?'), $edited_Skin->dget('name')), 'skin', $action, get_memorized('action'));
case 'edit':
case 'update':
// we return in this state after a validation error
// Display VIEW:
$AdminUI->disp_view('skins/views/_skin.form.php');
break;
case 'list':
// Display VIEW:
$AdminUI->disp_view('skins/views/_skin_list.view.php');
break;
}
// End payload block:
$AdminUI->disp_payload_end();
// Display body bottom, debug info and close </html>:
$AdminUI->disp_global_footer();
示例7: Form
<?php
break;
case 'uninstall':
// We come here either if the plugin requested a call to BeforeUninstallPayload() or if there are tables to be dropped {{{
?>
<div class="panelinfo">
<?php
$Form = new Form('', 'uninstall_plugin', 'post', 'compact');
$Form->global_icon(T_('Cancel uninstall!'), 'close', regenerate_url());
$Form->begin_form('fform', sprintf(T_('Uninstall plugin #%d (%s)'), $edit_Plugin->ID, $edit_Plugin->name));
$Form->add_crumb('plugin');
// We may need to use memorized params in the next page
$Form->hiddens_by_key(get_memorized('action,plugin_ID'));
$Form->hidden('action', 'uninstall');
$Form->hidden('plugin_ID', $edit_Plugin->ID);
$Form->hidden('uninstall_confirmed_drop', 1);
if ($uninstall_tables_to_drop) {
echo '<p>' . T_('Uninstalling this plugin will also delete its database tables:') . '</p>' . '<ul>' . '<li>' . implode('</li><li>', $uninstall_tables_to_drop) . '</li>' . '</ul>';
}
if ($uninstall_ok === NULL) {
// Plugin requested this:
$admin_Plugins->call_method($edit_Plugin->ID, 'BeforeUninstallPayload', $params = array('Form' => &$Form));
}
echo '<p>' . T_('THIS CANNOT BE UNDONE!') . '</p>';
$Form->submit(array('', T_('I am sure!'), 'DeleteButton btn-danger'));
$Form->end_form();
?>
示例8: Form
}
/*
* UPLOAD:
*/
if ($Settings->get('upload_enabled') && $current_User->check_perm('files', 'add', false, $fm_FileRoot)) {
// Upload is enabled and we have permission to use it...
echo "<!-- QUICK UPLOAD: -->\n";
echo '<div class="toolbaritem">';
$Form = new Form(NULL, '', 'post', 'none', 'multipart/form-data');
$Form->begin_form();
$Form->add_crumb('file');
$Form->hidden('ctrl', 'upload');
$Form->hidden('upload_quickmode', 1);
// The following is mainly a hint to the browser.
$Form->hidden('MAX_FILE_SIZE', $Settings->get('upload_maxkb') * 1024);
$Form->hiddens_by_key(get_memorized('ctrl'));
echo '<div>';
echo '<span class="btn btn-default btn-file">';
echo T_('Choose File') . '<input name="uploadfile[]" type="file" size="10" />';
echo '</span> ';
echo '<span>' . T_('No file selected') . '</span> ';
echo '<input class="ActionButton btn btn-default" type="submit" value="> ' . T_('Quick upload!') . '" />';
echo '</div>';
$Form->end_form();
echo '</div>';
}
echo '<div class="clear"></div>';
echo '</div>';
echo '</td>';
?>
</tr>
示例9: switch
switch ($action) {
case 'nil':
// Display NO payload!
break;
case 'delete_user':
// We need to ask for confirmation:
$edited_User->confirm_delete(sprintf(T_('Delete user «%s» [%s]?'), $edited_User->dget('fullname'), $edited_User->dget('login')), $action, get_memorized('action'));
case 'new_user':
case 'view_user':
case 'edit_user':
// Display user form:
$AdminUI->disp_view('users/views/_user.form.php');
break;
case 'delete_group':
// We need to ask for confirmation:
$edited_Group->confirm_delete(sprintf(T_('Delete group «%s»?'), $edited_Group->dget('name')), $action, get_memorized('action'));
case 'new_group':
case 'edit_group':
case 'view_group':
// Display group form:
$AdminUI->disp_view('users/views/_group.form.php');
break;
case 'promote':
default:
// Display user list:
// NOTE: we don't want this (potentially very long) list to be displayed again and again)
$AdminUI->disp_payload_begin();
$AdminUI->disp_view('users/views/_user_list.view.php');
$AdminUI->disp_payload_end();
}
// Display body bottom, debug info and close </html>:
示例10: sprintf
$messages_count = $edited_User->get_num_messages();
if ($messages_count > 0 && $current_User->check_perm('perm_messaging', 'abuse')) {
// Display a confirm message if curent user can delete the messages sent by the edited user
$confirm_message = sprintf(T_('Delete %d private messages sent by the user?'), $messages_count);
}
break;
case 'delete_all_userdata':
if ($current_User->ID != $edited_User->ID && $edited_User->ID != 1) {
// User can NOT delete admin and own account
$confirm_message = T_('Delete user and all his contributions?');
}
break;
}
if (!empty($confirm_message)) {
// Displays form to confirm deletion
$DataObject->confirm_delete($confirm_message, 'user', $action, get_memorized('action'));
}
}
$AdminUI->disp_view('users/views/_user_activity.view.php');
$AdminUI->disp_payload_end();
break;
case 'deldata':
if ($display_mode == 'js') {
// Do not append Debuglog & Debug JSlog to response!
$debug = false;
$debug_jslog = false;
}
if ($display_mode != 'js') {
$AdminUI->disp_payload_begin();
}
$user_tab = param('user_tab_from', 'string', 'profile');
示例11: switch
}
// Display <html><head>...</head> section! (Note: should be done early if actions do not redirect)
$AdminUI->disp_html_head();
// Display title, menu, messages, etc. (Note: messages MUST be displayed AFTER the actions)
$AdminUI->disp_body_top();
$AdminUI->disp_payload_begin();
/**
* Display payload:
*/
switch ($action) {
case 'nil':
// Do nothing
break;
case 'delete':
// We need to ask for confirmation:
$edited_Subregion->confirm_delete(sprintf(T_('Delete sub-region «%s»?'), $edited_Subregion->dget('name')), 'subregion', $action, get_memorized('action'));
case 'new':
case 'create':
case 'create_new':
case 'create_copy':
case 'edit':
case 'update':
$AdminUI->disp_view('regional/views/_subregion.form.php');
break;
default:
// No specific request, list all subregions:
// Cleanup context:
forget_param('subrg_ID');
// Display subregions list:
$AdminUI->disp_view('regional/views/_subregion_list.view.php');
break;
示例12: switch
}
// Display <html><head>...</head> section! (Note: should be done early if actions do not redirect)
$AdminUI->disp_html_head();
// Display title, menu, messages, etc. (Note: messages MUST be displayed AFTER the actions)
$AdminUI->disp_body_top();
$AdminUI->disp_payload_begin();
/**
* Display payload:
*/
switch ($action) {
case 'nil':
// Do nothing
break;
case 'delete':
// We need to ask for confirmation:
$edited_Goal->confirm_delete(sprintf(T_('Delete goal «%s»?'), $edited_Goal->dget('name')), 'goal', $action, get_memorized('action'));
/* no break */
/* no break */
case 'new':
case 'copy':
case 'create':
// we return in this state after a validation error
// we return in this state after a validation error
case 'create_new':
// we return in this state after a validation error
// we return in this state after a validation error
case 'create_copy':
// we return in this state after a validation error
// we return in this state after a validation error
case 'edit':
case 'update':
示例13: switch
}
// Display <html><head>...</head> section! (Note: should be done early if actions do not redirect)
$AdminUI->disp_html_head();
// Display title, menu, messages, etc. (Note: messages MUST be displayed AFTER the actions)
$AdminUI->disp_body_top();
$AdminUI->disp_payload_begin();
/**
* Display payload:
*/
switch ($action) {
case 'nil':
// Do nothing
break;
case 'delete':
// We need to ask for confirmation:
$edited_ItemStatus->confirm_delete(sprintf(T_('Delete Post Status «%s»?'), $edited_ItemStatus->dget('name')), 'itemstatus', $action, get_memorized('action'));
/* no break */
/* no break */
case 'new':
case 'create':
case 'create_new':
case 'create_copy':
case 'edit':
case 'update':
// we return in this state after a validation error
$AdminUI->disp_view('items/views/_itemstatus.form.php');
break;
default:
// No specific request, list all post statuses:
// Cleanup context:
forget_param('pst_ID');
示例14: AdminToolPayload
/**
* Event handler: Called when displaying the block in the "Tools" menu.
*
* @see Plugin::AdminToolPayload()
*/
function AdminToolPayload($params)
{
$Form = new Form();
$Form->begin_form('fform');
$Form->add_crumb('tools');
$Form->hidden_ctrl();
// needed to pass the "ctrl=tools" param
$Form->hiddens_by_key(get_memorized());
// needed to pass all other memorized params, especially "tab"
$Form->hidden('action', 'geoip_find_country');
echo '<p>' . T_('This tool finds all users that do not have a registration country yet and then assigns them a registration country based on their registration IP.') . '</p>';
$Form->button(array('value' => T_('Find Registration Country for all Users NOW!')));
if (!empty($this->text_from_AdminTabAction)) {
// Display a report of executed action
echo '<p><b>' . T_('Report') . ':</b></p>';
echo $this->text_from_AdminTabAction;
}
$Form->end_form();
}
示例15: switch
*/
switch ($action) {
case 'nil':
// Do nothing
break;
case 'new':
case 'copy':
case 'create':
case 'edit':
case 'update':
case 'delete':
// Begin payload block:
$AdminUI->disp_payload_begin();
if ($action == 'delete') {
// We need to ask for confirmation:
$edited_GenericCategory->confirm_delete(sprintf(T_('Delete element «%s»?'), $edited_GenericCategory->dget('name')), 'element', $action, get_memorized('action'));
}
if ($form_below_list) {
// Display list VIEW before form view:
if (!empty($list_view_path)) {
$AdminUI->disp_view($list_view_path);
} else {
$AdminUI->disp_view('generic/_generic_recursive_list.inc.php');
}
}
// Display category edit form:
if (!empty($edit_view_path)) {
$AdminUI->disp_view($edit_view_path);
} else {
$AdminUI->disp_view('generic/_generic_category.form.php');
}