芝麻web文件管理V1.00
编辑当前文件:/home/pulsehostuk9/www/status.pulsehost.co.uk/app/controllers/AccountPlan.php
add_view_content('account_header_menu', $menu->run()); /* Prepare the view */ $view = new \Altum\View('account-plan/index', (array) $this); $this->add_view_content('content', $view->run()); } public function cancel_subscription() { \Altum\Authentication::guard(); if(!\Altum\Csrf::check()) { Alerts::add_error(l('global.error_message.invalid_csrf_token')); redirect('account-plan'); } if(!Alerts::has_field_errors() && !Alerts::has_errors()) { try { (new User())->cancel_subscription($this->user->user_id); } catch (\Exception $exception) { Alerts::add_error($exception->getCode() . ':' . $exception->getMessage()); redirect('account-plan'); } /* Set a nice success message */ Alerts::add_success(l('account_plan.success_message.subscription_canceled')); redirect('account-plan'); } } }