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


PHP forget_param函数代码示例

本文整理汇总了PHP中forget_param函数的典型用法代码示例。如果您正苦于以下问题:PHP forget_param函数的具体用法?PHP forget_param怎么用?PHP forget_param使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了forget_param函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: sprintf

            if ($edited_Group->ID == 1) {
                $Messages->add(T_('You can\'t delete Group #1!'), 'error');
                $action = 'view_group';
                break;
            }
            if ($edited_Group->ID == $Settings->get('newusers_grp_ID')) {
                $Messages->add(T_('You can\'t delete the default group for new users!'), 'error');
                $action = 'view_group';
                break;
            }
            if (param('confirm', 'integer', 0)) {
                // confirmed, Delete from DB:
                $msg = sprintf(T_('Group «%s» deleted.'), $edited_Group->dget('name'));
                $edited_Group->dbdelete($Messages);
                unset($edited_Group);
                forget_param('grp_ID');
                $Messages->add($msg, 'success');
                $action = 'list';
            } else {
                // not confirmed, Check for restrictions:
                memorize_param('grp_ID', 'integer', true);
                if (!$edited_Group->check_delete(sprintf(T_('Cannot delete Group «%s»'), $edited_Group->dget('name')))) {
                    // There are restrictions:
                    $action = 'view_group';
                }
            }
            break;
    }
}
// We might delegate to this action from above:
if ($action == 'edit_user') {
开发者ID:LFSF,项目名称:oras,代码行数:31,代码来源:users.ctrl.php

示例2: switch

// 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;
}
$AdminUI->disp_payload_end();
// Display body bottom, debug info and close </html>:
$AdminUI->disp_global_footer();
开发者ID:ldanielz,项目名称:uesp.blog,代码行数:31,代码来源:threads.ctrl.php

示例3: sprintf

 } else {
     $msg = sprintf(T_('User &laquo;%s&raquo; deleted.'), $edited_User->dget('login'));
 }
 $send_reportpm = param('send_reportpm', 'integer', 0);
 $increase_spam_score = param('increase_spam_score', 'integer', 0);
 if ($send_reportpm || $increase_spam_score) {
     // Get all user IDs who reported for the deleted user:
     $report_user_IDs = get_user_reported_user_IDs($edited_User->ID);
 }
 $deleted_user_ID = $edited_User->ID;
 $deleted_user_email = $edited_User->get('email');
 $deleted_user_login = $edited_User->get('login');
 if ($edited_User->dbdelete($Messages) !== false) {
     // User has been deleted successfully
     unset($edited_User);
     forget_param('user_ID');
     $Messages->add($msg, 'success');
     // Find other users with the same email address:
     $message_same_email_users = find_users_with_same_email($deleted_user_ID, $deleted_user_email, T_('Note: the same email address (%s) is still in use by: %s'));
     if ($message_same_email_users !== false) {
         $Messages->add($message_same_email_users, 'note');
     }
     if ($send_reportpm) {
         // Send an info message to users who reported this deleted user:
         user_send_report_message($report_user_IDs, $deleted_user_login);
     }
     if ($increase_spam_score) {
         // Increase spam fighter score for the users who reported the deleted account:
         user_increase_spam_score($report_user_IDs);
     }
 }
开发者ID:Ariflaw,项目名称:b2evolution,代码行数:31,代码来源:users.ctrl.php

示例4: param

$AdminUI->set_path('options', 'cron');
param('action', 'string', 'list');
// We want to remember these params from page to page:
param('ctst_pending', 'integer', 0, true);
param('ctst_started', 'integer', 0, true);
param('ctst_timeout', 'integer', 0, true);
param('ctst_error', 'integer', 0, true);
param('ctst_finished', 'integer', 0, true);
param('results_crontab_order', 'string', '-D', true);
param('results_crontab_page', 'integer', 1, true);
if (param('ctsk_ID', 'integer', '', true)) {
    // Load cronjob from cache:
    $CronjobCache =& get_CronjobCache();
    if (($edited_Cronjob =& $CronjobCache->get_by_ID($ctsk_ID, false)) === false) {
        unset($edited_Cronjob);
        forget_param('ctsk_ID');
        $Messages->add(sprintf(T_('Requested &laquo;%s&raquo; object does not exist any longer.'), T_('Scheduled job')), 'error');
        $action = 'list';
    }
}
// fp> The if  below was the point where THE LINE WAS CROSSED!
// This is bloated here. This has to go into the action handling block (and maybe a function)
// THIS IS NO LONGER CONTROLLER INITIALIZATION. THIS IS ACTION EXECUTION!
// dh> ok. Moved the other param inits above. Ok? I don't think it should be an extra function..
// Init names and params for "static" available jobs and ask Plugins about their jobs:
if (in_array($action, array('new', 'create', 'edit', 'update', 'copy'))) {
    // NOTE: keys starting with "plugin_" are reserved for jobs provided by Plugins
    $cron_job_names = array('test' => T_('Basic test job'), 'error' => T_('Error test job'), 'anstispam_poll' => T_('Poll the antispam blacklist'), 'prune_hits_sessions' => T_('Prune old hits & sessions (includes OPTIMIZE)'), 'prune_page_cache' => T_('Prune old files from page cache'), 'post_by_email' => T_('Create posts by email'), 'process_hitlog' => T_('Extract info from hit log'), 'unread_message_reminder' => T_('Send reminders about unread messages'), 'activate_account_reminder' => T_('Send reminders about non-activated accounts'), 'comment_moderation_reminder' => T_('Send reminders about comments awaiting moderation'), 'return_path' => T_('Process the return path inbox'), 'light_db_maintenance' => T_('Light DB maintenance (ANALYZE)'), 'heavy_db_maintenance' => T_('Heavy DB maintenance (CHECK & OPTIMIZE)'));
    $cron_job_params = array('test' => array('ctrl' => 'cron/jobs/_test.job.php', 'params' => NULL), 'error' => array('ctrl' => 'cron/jobs/_error_test.job.php', 'params' => NULL), 'anstispam_poll' => array('ctrl' => 'cron/jobs/_antispam_poll.job.php', 'params' => NULL), 'prune_hits_sessions' => array('ctrl' => 'cron/jobs/_prune_hits_sessions.job.php', 'params' => NULL), 'prune_page_cache' => array('ctrl' => 'cron/jobs/_prune_page_cache.job.php', 'params' => NULL), 'post_by_email' => array('ctrl' => 'cron/jobs/_post_by_email.job.php', 'params' => NULL), 'process_hitlog' => array('ctrl' => 'cron/jobs/_process_hitlog.job.php', 'params' => NULL), 'unread_message_reminder' => array('ctrl' => 'cron/jobs/_unread_message_reminder.job.php', 'params' => NULL), 'activate_account_reminder' => array('ctrl' => 'cron/jobs/_activate_account_reminder.job.php', 'params' => NULL), 'comment_moderation_reminder' => array('ctrl' => 'cron/jobs/_comment_moderation_reminder.job.php', 'params' => NULL), 'return_path' => array('ctrl' => 'cron/jobs/_decode_returned_emails.job.php', 'params' => NULL), 'light_db_maintenance' => array('ctrl' => 'cron/jobs/_light_db_maintenance.job.php', 'params' => NULL), 'heavy_db_maintenance' => array('ctrl' => 'cron/jobs/_heavy_db_maintenance.job.php', 'params' => NULL));
    // Get additional jobs from Plugins:
    foreach ($Plugins->trigger_collect('GetCronJobs') as $plug_ID => $jobs) {
开发者ID:ldanielz,项目名称:uesp.blog,代码行数:31,代码来源:cronjobs.ctrl.php

示例5: skin_include

    }
    // ------------------ COMMENT FORM INCLUDED HERE ------------------
    skin_include('_item_comment_form.inc.php', $params);
    // ---------------------- END OF COMMENT FORM ---------------------
    echo '</div></div>';
    if ($params['disp_trackbacks']) {
        // We want to display trackbacks:
        echo '<div class="section clearfix" id="section-trackbacks">
				<div id="trackbacks-wrap"><div class="clearfix">';
        if ($params['disp_trackback_url']) {
            echo $params['before_section_title'];
            echo $Skin->T_('Trackback address for this post');
            echo $params['after_section_title'];
            /*
             * Trigger plugin event, which could display a captcha form, before generating a whitelisted URL:
             */
            if (!$Plugins->trigger_event_first_true('DisplayTrackbackAddr', array('Item' => &$Item, 'template' => '<code>%url%</code>'))) {
                // No plugin displayed a payload, so we just display the default:
                echo '<p class="trackback_url"><code>' . $Item->get_trackback_url() . '</code></p>';
            }
        }
        $params['comment_list_start'] = '<ul id="trackbacks" class="comments">';
        $Skin->disp_feedback_list('trackback', $params);
        echo '</div></div></div>';
    }
    // Restore "redir" param
    forget_param('redir');
}
// Related posts
echo $Skin->get_related_posts($Skin->get_setting('display_related'));
echo '</div><!-- /tab sections --></div><!-- /tabbed content -->';
开发者ID:b2evolution,项目名称:mystique_skin,代码行数:31,代码来源:_item_feedback.inc.php

示例6: load_funcs

}
// Memorize this as the last "tab" used in the Blog Settings:
$UserSettings->set('pref_coll_settings_tab', 'manage_skins');
$UserSettings->dbupdate();
load_funcs('skins/_skin.funcs.php');
// Check permission to display:
$current_User->check_perm('options', 'view', true);
param('action', 'string', 'list');
param('redirect_to', 'url', '?ctrl=skins');
if (param('skin_ID', 'integer', '', true)) {
    // Load file type:
    $SkinCache =& get_SkinCache();
    if (($edited_Skin =& $SkinCache->get_by_ID($skin_ID, false)) === false) {
        // We could not find the skin to edit:
        unset($edited_Skin);
        forget_param('skin_ID');
        $Messages->head = T_('Cannot edit skin!');
        $Messages->add(T_('Requested skin is not installed any longer.'), 'error');
        $action = 'nil';
    }
}
/**
 * Perform action:
 */
switch ($action) {
    case 'create':
        param('skin_folder', 'string', true);
        // Check validity of requested skin name:
        if (preg_match('~([^-A-Za-z0-9._]|\\.\\.)~', $skin_folder)) {
            debug_die('The requested skin name is invalid.');
        }
开发者ID:ldanielz,项目名称:uesp.blog,代码行数:31,代码来源:skins.ctrl.php

示例7: switch

$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_Currency->confirm_delete(sprintf(T_('Delete currency &laquo;%s&raquo;?'), $edited_Currency->dget('name')), 'currency', $action, get_memorized('action'));
    case 'new':
    case 'create':
    case 'create_new':
    case 'create_copy':
    case 'edit':
    case 'update':
        $AdminUI->disp_view('regional/views/_currency.form.php');
        break;
    default:
        // No specific request, list all currencies:
        // Cleanup context:
        forget_param('curr_ID');
        // Display currency list:
        $AdminUI->disp_view('regional/views/_currency_list.view.php');
        break;
}
$AdminUI->disp_payload_end();
// Display body bottom, debug info and close </html>:
$AdminUI->disp_global_footer();
开发者ID:ldanielz,项目名称:uesp.blog,代码行数:31,代码来源:currencies.ctrl.php

示例8: get_ThreadCache

    // Load thread from cache:
    $ThreadCache =& get_ThreadCache();
    if (($edited_Thread =& $ThreadCache->get_by_ID($thrd_ID, false)) === false) {
        // Thread doesn't exists with this ID
        unset($edited_Thread);
        forget_param('thrd_ID');
        if (!$error_messages_exist) {
            // Display this error only when no error above
            $Messages->add(T_('The requested thread does not exist any longer.'), 'error');
        }
        $thread_is_missed = true;
    } else {
        if (!$edited_Thread->check_thread_recipient($current_User->ID)) {
            // Current user is not recipient of this thread
            unset($edited_Thread);
            forget_param('thrd_ID');
            if (!$error_messages_exist) {
                // Display this error only when no error above
                $Messages->add(T_('You are not allowed to view this thread.'), 'error');
            }
        }
    }
}
if (!$error_messages_exist && !$Messages->has_errors() && (empty($thrd_ID) || empty($edited_Thread))) {
    // Display this error only when no error above
    $Messages->add(T_('Can\'t show messages without thread!'), 'error');
    $thread_is_missed = true;
} else {
    // Preload users to show theirs avatars
    load_messaging_thread_recipients($thrd_ID);
}
开发者ID:Ariflaw,项目名称:b2evolution,代码行数:31,代码来源:_messages.disp.php

示例9: sprintf

 case 'delete':
     // ----------  Delete a blog from DB ----------
     // Check that this action request is not a CSRF hacked request:
     $Session->assert_received_crumb('collection');
     // Check permissions:
     $current_User->check_perm('blog_properties', 'edit', true, $blog);
     if (param('confirm', 'integer', 0)) {
         // confirmed
         // Delete from DB:
         $msg = sprintf(T_('Blog &laquo;%s&raquo; deleted.'), $edited_Blog->dget('name'));
         $edited_Blog->dbdelete();
         $Messages->add($msg, 'success');
         $BlogCache->remove_by_ID($blog);
         unset($edited_Blog);
         unset($Blog);
         forget_param('blog');
         set_working_blog(0);
         $UserSettings->delete('selected_blog');
         // Needed or subsequent pages may try to access the delete blog
         $UserSettings->dbupdate();
         $action = 'list';
         // Redirect so that a reload doesn't write to the DB twice:
         $redirect_to = param('redirect_to', 'url', '?ctrl=collections');
         header_redirect($redirect_to, 303);
         // Will EXIT
         // We have EXITed already at this point!!
     }
     break;
 case 'update_settings':
     // Check that this action request is not a CSRF hacked request:
     $Session->assert_received_crumb('collectionsettings');
开发者ID:ldanielz,项目名称:uesp.blog,代码行数:31,代码来源:collections.ctrl.php

示例10: switch

 * Display payload:
 */
switch ($action) {
    case 'nil':
        // Do nothing
        break;
    case 'delete':
        // We need to ask for confirmation:
        $edited_Itemtype->confirm_delete(sprintf(T_('Delete Post Type &laquo;%s&raquo;?'), $edited_Itemtype->dget('name')), 'itemtype', $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/_itemtype.form.php');
        break;
    default:
        // No specific request, list all post types:
        // Cleanup context:
        forget_param('ityp_ID');
        // Display post types list:
        $AdminUI->disp_view('items/views/_itemtypes.view.php');
        break;
}
$AdminUI->disp_payload_end();
// Display body bottom, debug info and close </html>:
$AdminUI->disp_global_footer();
开发者ID:Ariflaw,项目名称:b2evolution,代码行数:31,代码来源:item_types.ctrl.php

示例11: switch

 * Display payload:
 */
switch ($action) {
    case 'nil':
        // Do nothing
        break;
    case 'delete':
        // We need to ask for confirmation:
        $edited_Userfield->confirm_delete(sprintf(T_('Delete user field &laquo;%s&raquo;?'), $edited_Userfield->dget('name')), 'userfield', $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('users/views/_userfield.form.php');
        break;
    default:
        // No specific request, list all user fields:
        // Cleanup context:
        forget_param('ufdf_ID');
        // Display user fields list:
        $AdminUI->disp_view('users/views/_userfields.view.php');
        break;
}
$AdminUI->disp_payload_end();
// Display body bottom, debug info and close </html>:
$AdminUI->disp_global_footer();
开发者ID:ldanielz,项目名称:uesp.blog,代码行数:31,代码来源:userfields.ctrl.php

示例12: param

     break;
 case 'delete':
     // Delete entry:
     param($GenericElementCache->dbIDname, 'integer', true);
     if (isset($perm_name)) {
         // We need to Check permission:
         $current_User->check_perm($perm_name, $perm_level, true);
     }
     // Set restrictions for element
     $edited_GenericElement->delete_restrictions = $delete_restrictions;
     if (param('confirm', 'integer', 0)) {
         // confirmed, Delete from DB:
         $msg = sprintf(T_('Element &laquo;%s&raquo; deleted.'), $edited_GenericElement->dget('name'));
         $GenericElementCache->dbdelete_by_ID($edited_GenericElement->ID);
         unset($edited_GenericElement);
         forget_param($GenericElementCache->dbIDname);
         $Messages->add($msg, 'success');
         $action = 'list';
     } else {
         // not confirmed, Check for restrictions:
         // Get the page number we come from:
         $previous_page = param('results_' . $GenericElementCache->dbprefix . 'page', 'integer', 1, true);
         if (!$edited_GenericElement->check_delete(sprintf(T_('Cannot delete element &laquo;%s&raquo;'), $edited_GenericElement->dget('name')))) {
             // There are restrictions:
             $action = 'edit';
         }
     }
     break;
 case 'sort_by_order':
     // The list is sorted by the order column now.
     $Results->order = '--A';
开发者ID:LFSF,项目名称:oras,代码行数:31,代码来源:_generic_listeditor.php

示例13: switch

            // 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':
            // we return in this state after a validation error
            $AdminUI->disp_view('sessions/views/_internal_search.form.php');
            break;
        default:
            // No specific request, list all file types:
            switch ($tab3) {
                case 'intsearches':
                    // Cleanup context:
                    forget_param('isrch_ID');
                    // Display goals list:
                    $AdminUI->disp_view('sessions/views/_stats_internal_searches.view.php');
                    break;
            }
    }
} else {
    switch ($AdminUI->get_path(1)) {
        case 'summary':
            // Display VIEW:
            switch ($tab3) {
                case 'browser':
                    $AdminUI->disp_view('sessions/views/_stats_browserhits.view.php');
                    break;
                case 'robot':
                    $AdminUI->disp_view('sessions/views/_stats_robots.view.php');
开发者ID:ldanielz,项目名称:uesp.blog,代码行数:31,代码来源:stats.ctrl.php

示例14: switch

 * Display payload:
 */
switch ($action) {
    case 'nil':
        // Do nothing
        break;
    case 'delete':
        // We need to ask for confirmation:
        $edited_Organization->confirm_delete(sprintf(T_('Delete organization &laquo;%s&raquo;?'), $edited_Organization->dget('name')), 'organization', $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('users/views/_organization.form.php');
        break;
    default:
        // No specific request, list all organizations:
        // Cleanup context:
        forget_param('org_ID');
        // Display organizations list:
        $AdminUI->disp_view('users/views/_organization.view.php');
        break;
}
$AdminUI->disp_payload_end();
// Display body bottom, debug info and close </html>:
$AdminUI->disp_global_footer();
开发者ID:Ariflaw,项目名称:b2evolution,代码行数:31,代码来源:organizations.ctrl.php

示例15: param

        $action = 'edit';
        break;
    case 'delete':
        // Delete slug:
        // Check that this action request is not a CSRF hacked request:
        $Session->assert_received_crumb('slug');
        // Check that current user has permission to edit slugs:
        $current_User->check_perm('slugs', 'edit', true);
        // Make sure we got an slug_ID:
        param('slug_ID', 'integer', true);
        if (param('confirm', 'integer', 0)) {
            // confirmed, Delete from DB:
            $msg = sprintf(T_('Slug &laquo;%s&raquo; deleted.'), $edited_Slug->dget('title'));
            $edited_Slug->dbdelete(true);
            unset($edited_Slug);
            forget_param('slug_ID');
            $Messages->add($msg, 'success');
            // Redirect so that a reload doesn't write to the DB twice:
            header_redirect(regenerate_url('action', '', '', '&'), 303);
            // Will EXIT
            // We have EXITed already at this point!!
        } else {
            // not confirmed, Check for restrictions:
            if (!$edited_Slug->check_delete(sprintf(T_('Cannot delete slug &laquo;%s&raquo;'), $edited_Slug->dget('title')), array(), true)) {
                // There are restrictions:
                $action = 'list';
            }
        }
        break;
}
$AdminUI->breadcrumbpath_init(false);
开发者ID:ldanielz,项目名称:uesp.blog,代码行数:31,代码来源:slugs.ctrl.php


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