} if ($findback['findback'] != null) { require_once '../model/done.php'; $contr5 = new controller(); $contr5->sendfind($form); } if ($findback2['findback2'] != null) { require_once '../model/done.php'; $contr6 = new controller(); $contr6->compare($form); } if ($reset['reset'] != null) { require_once '../model/jiami.php'; require_once '../model/done.php'; $contr7 = new controller(); $contr7->reset($form); } class controller { function check($form) { $model = new model(); $final = $model->done($form); $result = new controller(); $result->show($final); } function insert($form) { $model = new model(); $final = $model->insert($form); $result = new controller();
protected static function run_action($controller_name, $controller, $action, $action_arg, $run_filters) { controller::reset(); if ($run_filters) { $have_global_filters = self::$global_filters !== null; if ($have_global_filters) { self::run_global_filters('before'); } self::run_controller_filters('before', $controller_name, $action); } try { if (is_callable([$controller, 'before_run'], false)) { $controller::before_run(); } $controller::$action($action_arg); if (is_callable([$controller, 'after_run'], false)) { $controller::after_run(); } } catch (action_return $return) { } if ($run_filters) { self::run_controller_filters('after', $controller_name, $action); if ($have_global_filters) { self::run_global_filters('after'); } } }