43 lines
1.2 KiB
PHP
43 lines
1.2 KiB
PHP
<?php
|
|
|
|
defined('BASEPATH') OR exit('No direct script access allowed');
|
|
|
|
class Invite extends CI_Controller {
|
|
|
|
public function index() {
|
|
//echo "ameye kvkgkg";
|
|
/* $data['sitename'] = 'home';
|
|
$this->load->view('templates/header_boxed', $data);
|
|
$this->load->view('users/view_index');
|
|
$this->load->view('users/view_external_footer');
|
|
*/
|
|
|
|
//define('WRENCHBOARD_ACCOUNT_REFERLINK',11033);
|
|
//https://oameye.work.wrenchboard.com/invite?refer_link=WRENREF-368681216-703766272-36774144
|
|
|
|
// HOW DO I SECURE THIS FROM ATTACK DDOS
|
|
//
|
|
|
|
if($_GET){
|
|
$refer_link = substr(trim($this->input->get('refer_link')),0,37);
|
|
$in_data=[];
|
|
$in_data['refer_link'] = $refer_link;
|
|
$in_data['action'] = WRENCHBOARD_ACCOUNT_REFERLINK;
|
|
$this->load->model('backend_model');
|
|
$out = array();
|
|
$res = $this->backend_model->wrenchboard_api($in_data, $out);
|
|
if ($res == PHP_API_OK) {
|
|
redirect('/signup');
|
|
} else {
|
|
redirect('/signup');
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
redirect('/registration');
|
|
}
|
|
|
|
}
|