Code Duplication    Length = 13-14 lines in 5 locations

src/app/controllers/artuino_workshop.php 1 location

@@ 135-148 (lines=14) @@
132
133
    }
134
135
    public function pay_again() {
136
        $this->load_model('contest_model');
137
        $user_nick = $this->auth->get_user();
138
        global $payment_cfg;
139
        $team_info = $this->contest_model->is_registered_for_artuino($user_nick);
140
        if ($team_info && $team_info['payment_status'] != 'success') {
141
            $redirect_url = $this->get_artuino_payment_url($team_info['team_name'], $team_info['contact_number']);
142
            $this->load_library('http_lib', 'http');
143
            $this->http->redirect($redirect_url);
144
        } else {
145
            $this->load_library('http_lib', 'http');
146
            $this->http->redirect(base_url() . "pulsation/artuino/register/");
147
        }
148
    }
149
150
    public function success() {
151
        $this->load_library('http_lib', 'http');

src/app/controllers/arvr_workshop.php 1 location

@@ 94-106 (lines=13) @@
91
        $this->load_view('skeleton_template/buttons_hide');
92
    }
93
94
    public function pay_again() {
95
        $user_nick = $this->auth->get_user();
96
        global $payment_cfg;
97
        $user_details = $this->model->is_registered_for_arvr($user_nick);
98
        if ($user_details && $user_details['payment_status'] != 'success') {
99
            $redirect_url = $this->get_arvr_payment_url($user_nick, $user_details['contact_number']);
100
            $this->load_library('http_lib', 'http');
101
            $this->http->redirect($redirect_url);
102
        } else {
103
            $this->load_library('http_lib', 'http');
104
            $this->http->redirect(base_url() . "talks-and-workshops/arvr/register/");
105
        }
106
    }
107
108
    public function success() {
109
        $this->load_library('http_lib', 'http');

src/app/controllers/riderofstorms.php 1 location

@@ 102-114 (lines=13) @@
99
        $this->load_view('skeleton_template/buttons_hide');
100
    }
101
102
    public function pay_again() {
103
        $user_nick = $this->auth->get_user();
104
        global $payment_cfg;
105
        $user_details = $this->model->is_registered_for_riderofstorms($user_nick);
106
        if ($user_details && $user_details['payment_status'] != 'success') {
107
            $redirect_url = $this->get_riderofstorms_payment_url($user_details['name'], $user_details['contact_number']);
108
            $this->load_library('http_lib', 'http');
109
            $this->http->redirect($redirect_url);
110
        } else {
111
            $this->load_library('http_lib', 'http');
112
            $this->http->redirect(base_url() . "cultural-Colosseum/bob/register/");
113
        }
114
    }
115
116
    public function success() {
117
        $this->load_library('http_lib', 'http');

src/app/controllers/webdev_workshop.php 1 location

@@ 98-110 (lines=13) @@
95
        $this->load_view('skeleton_template/buttons_hide');
96
    }
97
98
    public function pay_again() {
99
        $user_nick = $this->auth->get_user();
100
        global $payment_cfg;
101
        $user_details = $this->model->is_registered_for_webdev($user_nick);
102
        if ($user_details && $user_details['payment_status'] != 'success') {
103
            $redirect_url = $this->get_webdev_payment_url($user_nick, $user_details['contact_number']);
104
            $this->load_library('http_lib', 'http');
105
            $this->http->redirect($redirect_url);
106
        } else {
107
            $this->load_library('http_lib', 'http');
108
            $this->http->redirect(base_url() . "talks-and-workshops/web-development/register/");
109
        }
110
    }
111
112
    public function success() {
113
        $this->load_library('http_lib', 'http');

src/app/controllers/mun.php 1 location

@@ 106-119 (lines=14) @@
103
        $this->load_view('skeleton_template/buttons_hide');
104
    }
105
106
    public function pay_again() {
107
        $user_nick = $this->auth->get_user();
108
        global $payment_cfg;
109
        $user_details = $this->model->is_registered_for_mun($user_nick);
110
        if ($user_details && $user_details['payment_status'] != 'success') {
111
            $redirect_url = $this->get_mun_payment_url($user_nick, $user_details['contact_number'],
112
                                                       $user_details['team_size'], $user_details['needs_accomodation']);
113
            $this->load_library('http_lib', 'http');
114
            $this->http->redirect($redirect_url);
115
        } else {
116
            $this->load_library('http_lib', 'http');
117
            $this->http->redirect(base_url() . "talks-and-workshops/mun/register/");
118
        }
119
    }
120
121
    public function success() {
122
        $this->load_library('http_lib', 'http');