Updated successfully

This commit is contained in:
Djery-Tom 2021-06-05 11:11:58 +01:00
parent 8377ceccef
commit d3f3ba16b9
8 changed files with 437 additions and 439 deletions

6
.htaccess Normal file
View File

@ -0,0 +1,6 @@
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]
</IfModule>

View File

@ -52,4 +52,4 @@ defined('BASEPATH') OR exit('No direct script access allowed');
$route['default_controller'] = 'Users';
$route['404_override'] = '';
$route['translate_uri_dashes'] = FALSE;
$route['home'] = 'index.php/Users/login';
$route['login'] = 'Users/login';

View File

@ -1,108 +1,96 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
defined('BASEPATH') or exit('No direct script access allowed');
class Users extends CI_Controller {
class Users extends CI_Controller
{
public function __construct(){
public function __construct()
{
parent::__construct();
$this->load->model('Global_model');
}
public function index()
{
if (!$this->session->userdata('id_user')) {
if(!empty($this->uri->segment(3))){
$data['message'] = $this->uri->segment(3);
$this->load->view('login',$data);
}else{
$data['message'] = null;
$this->load->view('login',$data);
}
$id_user = $this->session->userdata('id_user');
if (isset($id_user)) {
$data['membres'] = $this->Global_model->getMembres($id_user);
$data['total'] = $this->Global_model->getTotal($this->session->userdata('agent_member_code'));
$data['message'] = $this->session->flashdata('message');
$this->load->view('dashboard', $data);
} else {
if(!empty($this->uri->segment(3))){
$data['message'] = $this->uri->segment(3);
$this->load->view('login',$data);
}else{
$data['message'] = null;
$this->load->view('login',$data);
}
redirect('login');
}
}
public function login()
{
$user_login = array(
'user_validation_code' => $this->input->post('code')
);
$user = $this->Global_model->login_user($user_login['user_validation_code']);
if($user!=false){
$countryId = $this->Global_model->getIdCountry($user_login['user_validation_code']);
$checkIfGameActived = $this->Global_model->checkIfGameActived($countryId);
if($checkIfGameActived==true){
$data['user'] = $user;
$data['pays'] = $this->Global_model->getCountry($user_login['user_validation_code']);
$data['total'] = $this->Global_model->getTotal($user_login['user_validation_code']);
$data['id_user'] = $this->Global_model->getIdUser($user_login['user_validation_code']);
$data['membre'] = $this->Global_model->getMembre($data['id_user']);
$data['message'] = "";
$this->session->set_userdata('user_validation_code', $user_login['user_validation_code']);
$this->session->set_userdata('user', $user);
$this->session->set_userdata('pays', $data['pays']);
$this->session->set_userdata('total', $data['total']);
$this->session->set_userdata('id_user', $data['id_user']);
$this->load->view('dashbord',$data);
}else{
$data['message'] = "Le jeu n'est pas activé pour votre pays";
$this->load->view('login',$data);
}
}else{
$data['message'] = "Ce code de validation est incorrecte";
if ($this->input->server('REQUEST_METHOD') === 'GET') {
$data['message'] = $this->session->flashdata('message');
$this->load->view('login',$data);
} elseif ($this->input->server('REQUEST_METHOD') === 'POST') {
$user_login = array(
'agent_member_code' => $this->input->post('code')
);
$user = $this->Global_model->login_user($user_login['agent_member_code']);
if ($user != false) {
$countryId = $user->country_id;
$checkIfGameActived = $this->Global_model->checkIfGameActived($countryId);
if ($checkIfGameActived == true) {
$data['user'] = $user;
$data['pays'] = $user->country;
$data['id_user'] = $user->id;
$this->session->set_userdata('agent_member_code', $user_login['agent_member_code']);
$this->session->set_userdata('user', $user->lastname);
$this->session->set_userdata('pays', $data['pays']);
$this->session->set_userdata('id_user', $user->id);
$this->session->set_userdata('id_country', $countryId);
redirect('/');
} else {
$this->session->set_flashdata('message', "Le jeu n'est pas activé pour votre pays");
redirect('login');
}
} else {
$this->session->set_flashdata('message', "Ce code membre est incorrect");
redirect('login');
}
}
}
public function logout()
{
$this->session->sess_destroy();
$message = 'Vous avez été déconnecté.';
//$this->load->view('login',$data);
redirect('index.php/');
}
public function add_member(){
{
$this->session->sess_destroy();
$this->session->set_flashdata('message','Vous avez été déconnecté');
redirect('/');
}
public function add_member()
{
$validation_code = $this->input->post('code');
$idNewMember = $this->Global_model->getIdUser($validation_code);
if($idNewMember!=false){
$newMember = $this->Global_model->getSimpleUser($validation_code);
if ($newMember != false) {
$idNewMember = $newMember->id;
$codeExist = $this->Global_model->checkIfIdExist($idNewMember);
$idPaysParrain = $this->Global_model->getIdCountry($this->session->userdata('user_validation_code'));
$idPaysNewMember = $this->Global_model->getIdCountry($validation_code);
if($codeExist==false){
if($idPaysParrain==$idPaysNewMember){
$res = $this->Global_model->addMember($this->session->userdata('id_user'),$idNewMember,$idPaysParrain);
if($res==true){
$this->session->set_userdata('total', $this->Global_model->getTotal($this->session->userdata('user_validation_code')));
$data['membre'] = $this->Global_model->getMembre($this->session->userdata('id_user'));
$data['message'] = 'Le membre a bien été ajouté';
$this->load->view('dashbord',$data);
}else{
$data['message'] = "Une erreur s'est produite";
$data['membre'] = $this->Global_model->getMembre($this->session->userdata('id_user'));
$this->load->view('dashbord',$data);
$idPaysParrain = $this->session->userdata('id_country');
$idPaysNewMember = $newMember->country_id;
if ($codeExist == false) {
if ($idPaysParrain == $idPaysNewMember) {
$res = $this->Global_model->addMember($this->session->userdata('id_user'), $idNewMember, $idPaysParrain);
if ($res == true) {
$this->session->set_flashdata('message', 'Le membre a bien été ajouté');
} else {
$this->session->set_flashdata('message', "Une erreur s'est produite");
}
}else{
$data['message'] = "Le code de validation appartient à un autre pays.";
$data['membre'] = $this->Global_model->getMembre($this->session->userdata('id_user'));
$this->load->view('dashbord',$data);
} else {
$this->session->set_flashdata('message', "Le code de validation appartient à un autre pays.");
}
}else{
$data['message'] = "Ce code a déjà été ajouté ou appartient à un utilisateur participant au jeu en tant que parrain.";
$data['membre'] = $this->Global_model->getMembre($this->session->userdata('id_user'));
$this->load->view('dashbord',$data);
} else {
$this->session->set_flashdata('message', "Ce code a déjà été ajouté ou appartient à un utilisateur participant au jeu en tant que parrain.");
}
}else{
$data['message'] = "Ce code est incorrecte ou ne correspond à aucun utilisateur.";
$data['membre'] = $this->Global_model->getMembre($this->session->userdata('id_user'));
$this->load->view('dashbord',$data);
} else {
$this->session->set_flashdata('message', "Ce code est incorrect ou ne correspond à aucun utilisateur.");
}
redirect('/');
}
}

View File

@ -1,97 +1,99 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Global_model extends CI_Model
{
public function login_user($code){
$query = $this->db->query("SELECT lastname,phone FROM users WHERE validation_code='".$code."'");
if($query->num_rows()>0)
{
return $query->row()->lastname;
}
else{
return false;
}
}
public function getCountry($code){
$query = $this->db->query("SELECT countries.id,countries.name FROM `users` INNER JOIN `networks` ON `users`.network_id=`networks`.id INNER JOIN countries ON networks.country_id=countries.id WHERE users.validation_code='".$code."'");
if($query->num_rows()>0)
{
return $query->row()->name;
}
else{
return false;
}
}
public function getTotal($code){
$query = $this->db->query("SELECT count(*) AS c
FROM game
INNER JOIN users ON game.id_parrain=users.id
WHERE users.validation_code='".$code."'");
if($query->num_rows()>0){
return $query->row()->c;
}else{
return null;
}
}
public function getMembre($id_parrain){
$query = $this->db->query("SELECT users.lastname,users.validation_code FROM `game`
INNER JOIN `users` ON `users`.id=`game`.id_joueur
WHERE `game`.id_parrain='".$id_parrain."'");
if($query->num_rows()>0)
{
return $query;
}
else{
return false;
}
}
public function getIdUser($code){
$query = $this->db->query("SELECT id FROM users WHERE validation_code='".$code."'");
if($query->num_rows()>0)
{
return $query->row()->id;
}
else{
return false;
}
}
public function addMember($id_parrain, $id_newMember,$id_pays){
$query = $this->db->query("INSERT INTO game(id_parrain, id_joueur, id_pays) VALUE (".$id_parrain.",".$id_newMember.",".$id_pays.")");
return $query;
}
public function checkIfIdExist($id){
$query = $this->db->query("SELECT * FROM game WHERE id_joueur=".$id." OR id_parrain=".$id);
if($query->num_rows()>0)
{
return true;
}
else{
return false;
}
}
public function getIdCountry($code){
$query = $this->db->query("SELECT countries.id FROM `users` INNER JOIN `networks` ON `users`.network_id=`networks`.id INNER JOIN countries ON networks.country_id=countries.id WHERE users.validation_code='".$code."'");
if($query->num_rows()>0)
{
return $query->row()->id;
}
else{
return false;
}
}
public function checkIfGameActived($id_pays){
$query = $this->db->query("SELECT * FROM `configGame` WHERE id_pays='".$id_pays."'");
if($query->num_rows()>0)
{
if($query->row()->etat==1){
return true;
}elseif($query->row()->etat==0){
return false;
}
}
else{
return false;
}
}
}
<?php
defined('BASEPATH') or exit('No direct script access allowed');
class Global_model extends CI_Model
{
public function login_user($code)
{
$query = $this->db->query("SELECT id , lastname, phone , country_id , country FROM agent_plus WHERE code_membre='" . $code . "'");
if ($query->num_rows() > 0) {
return $query->first_row();
} else {
return false;
}
}
// public function getCountry($code){
// $query = $this->db->query("SELECT countries.id,countries.name FROM `users` INNER JOIN `networks` ON `users`.network_id=`networks`.id INNER JOIN countries ON networks.country_id=countries.id WHERE users.validation_code='".$code."'");
// if($query->num_rows()>0)
// {
// return $query->row()->name;
// }
// else{
// return false;
// }
// }
public function getTotal($code)
{
$query = $this->db->query("SELECT count(*) AS c
FROM agents_game g
INNER JOIN agent_plus ag ON g.id_parrain= ag.id
WHERE ag.code_membre='" . $code . "'");
if ($query->num_rows() > 0) {
return $query->row()->c;
} else {
return null;
}
}
public function getMembres($id_parrain)
{
$query = $this->db->query("SELECT users.lastname,users.validation_code FROM agents_game g
INNER JOIN `users` ON `users`.id= g.id_joueur
WHERE g.id_parrain='" . $id_parrain . "'");
if ($query->num_rows() > 0) {
return $query;
} else {
return false;
}
}
public function getSimpleUser($code)
{
$query = $this->db->query("SELECT id , country, country_id FROM users_simple WHERE validation_code='" . $code . "'");
if ($query->num_rows() > 0) {
return $query->first_row();
} else {
return false;
}
}
public function addMember($id_parrain, $id_newMember, $id_pays)
{
$query = $this->db->query("INSERT INTO agents_game(id_parrain, id_joueur, id_pays) VALUE (" . $id_parrain . "," . $id_newMember . "," . $id_pays . ")");
return $query;
}
public function checkIfIdExist($id)
{
$query = $this->db->query("SELECT * FROM agents_game WHERE id_joueur=" . $id . " OR id_parrain=" . $id);
if ($query->num_rows() > 0) {
return true;
} else {
return false;
}
}
public function getIdCountry($code)
{
$query = $this->db->query("SELECT countries.id FROM `users` INNER JOIN `networks` ON `users`.network_id=`networks`.id INNER JOIN countries ON networks.country_id=countries.id WHERE users.validation_code='" . $code . "'");
if ($query->num_rows() > 0) {
return $query->row()->id;
} else {
return false;
}
}
public function checkIfGameActived($id_pays)
{
$query = $this->db->query("SELECT * FROM `configGame` WHERE id_pays='" . $id_pays . "'");
if ($query->num_rows() > 0) {
if ($query->row()->etat == 1) {
return true;
} elseif ($query->row()->etat == 0) {
return false;
}
} else {
return false;
}
}
}

View File

@ -1,106 +1,114 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
?>
<!DOCTYPE html>
<html lang="fr">
<head>
<title>iLinkWorld</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" type="image/png" href="<?php echo base_url('dist/images/logo.ico')?>"/>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous">
<link href="<?php echo base_url('dist/css/main_dash.css') ?>" rel="stylesheet" id="css">
<link href="https://cdn.datatables.net/1.10.19/css/jquery.dataTables.min.css" rel="stylesheet">
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<script src="https://cdn.datatables.net/1.10.19/js/jquery.dataTables.min.js"></script>
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.min.js" integrity="sha256-VazP97ZCwtekAsvgPBSUwPFKdrwD3unUfSGVYrahUqU=" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js" integrity="sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy" crossorigin="anonymous"></script>
<script src="<?php echo base_url('dist/js/paging.js') ?>"></script>
<!------ Include the above in your HEAD tag ---------->
</head>
<body>
<div class="container login-container">
<div class="row">
<div style="text-align: center" class="col-md-6 login-form-1">
<img width="300" height="85" class="col-xs-12" src="<?php echo base_url('dist/images/logo_2.png')?>" alt="IMG">
<h3 style="height:100; text-align:center;" id="challenge">Challenge</h3>
<p style="text-align:center;"><span style="font-size:40px;"><?php echo $this->session->userdata('user'); ?></span><span style="font-size:10px;"></span><?php echo ' /'.$this->session->userdata('pays'); ?></span></p>
<p style="text-align:center;"><span style="font-size:90px;"><?php echo $this->session->userdata('total'); ?></span><span style="font-size:10px;"></span>personnes</span></p>
<h3 id="add-code" style="text-align:center;">Ajouter un code</h3>
<form action="<?php echo base_url('index.php/Users/add_member') ?>" method="post">
<div class="form-group">
<input type="text" name="code" class="form-control" style="text-align:center;" placeholder="Code de validation" value="" />
</div>
<div class="form-group">
<input type="submit" class="btnSubmit" value="Valider" />
</div>
</form>
</div>
<div class="col-md-6 login-form-2 parent">
<div style="text-align: center;" class="center">
<?php
$membres = $membre;
if($membres!=false){
?>
<table style="background-color: white;" id="tab" class="table table-bordered table-sm" cellspacing="0" width="100%">
<thead style="text-align:center;">
<tr>
<th class="th-sm">Nom</th>
<th class="th-sm">Code</th>
</tr>
</thead>
<tbody style="text-align:center;">
<?php foreach($membres->result() as $row) {
echo "<tr><td>".$row->lastname."</td>";
echo "<td>".$row->validation_code."</td></tr>";
}
?>
</tbody>
</table>
<?php
}else{
echo "Aucun membre";
}
?>
<button class="btnPage2 btnSubmit" onclick="location.href = '<?php echo base_url('index.php/Users/logout') ?>';">Me déconnecter</button>
</div>
</div>
</div>
</div>
<!-- Modal -->
<div class="modal fade" id="info" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" data-show="true" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalLabel">information</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<p id="message"><?php echo $message; ?></p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Fermer</button>
</div>
</div>
</div>
</div>
</body>
<script>
$(document).ready(function () {
if($('#message').text()!==""){
$('#minfo').modal('show');
alert($('#message').text());
}
$('#tab').paging(
{
limit: 5,
rowDisplayStyle: 'block',
activePage: 0,
rows: []
}
);
});
</script>
</html>
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
?>
<!DOCTYPE html>
<html lang="fr">
<head>
<title>iLinkWorld</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" type="image/png" href="<?php echo base_url('dist/images/logo.ico')?>"/>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous">
<link href="<?php echo base_url('dist/css/main_dash.css') ?>" rel="stylesheet" id="css">
<link href="https://cdn.datatables.net/1.10.19/css/jquery.dataTables.min.css" rel="stylesheet">
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<script src="https://cdn.datatables.net/1.10.19/js/jquery.dataTables.min.js"></script>
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.min.js" integrity="sha256-VazP97ZCwtekAsvgPBSUwPFKdrwD3unUfSGVYrahUqU=" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js" integrity="sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy" crossorigin="anonymous"></script>
<script src="<?php echo base_url('dist/js/paging.js') ?>"></script>
<link rel="stylesheet" type="text/css" href="<?php echo base_url('dist/fonts/font-awesome-4.7.0/css/font-awesome.min.css')?>">
<link rel="stylesheet" type="text/css" href="<?php echo base_url('dist/css/util.css')?>">
<link rel="stylesheet" type="text/css" href="<?php echo base_url('dist/css/main.css')?>">
<!------ Include the above in your HEAD tag ---------->
</head>
<body>
<div class="container login-container">
<div class="row">
<div style="text-align: center" class="col-md-6 login-form-1">
<img width="300" height="85" class="col-xs-12" src="<?php echo base_url('dist/images/logo_2.png')?>" alt="IMG">
<h3 style="height:100; text-align:center;" id="challenge">Challenge</h3>
<p style=" text-align:center; color: white"><span style="font-size:40px;"><?php echo $this->session->userdata('user'); ?></span><span style="font-size:10px;"></span><?php echo ' /'.$this->session->userdata('pays'); ?></span></p>
<p style="text-align:center; color: white"><span style="font-size:90px;"><?php echo $total ?></span><span style="font-size:10px;"></span>personne<?= $total > 1 ? 's' : ''?></span></p>
<h3 id="add-code" style="text-align:center;">Ajouter un code</h3>
<form class="validate-form" action="<?php echo base_url('index.php/Users/add_member') ?>" method="post">
<div class="wrap-input100 validate-input" data-validate = "Votre code membre est requis">
<input type="text" name="code" class="input100" required placeholder="Code de validation" value="" />
<span class="focus-input100"></span>
<span class="symbol-input100">
<i class="fa fa-user" aria-hidden="true"></i>
</span>
</div>
<div class="container-login100-form-btn">
<button class="login100-form-btn">Valider</button>
</div>
</form>
</div>
<div class="col-md-6 login-form-2 parent">
<div style="text-align: center;" class="center">
<?php
if($membres!=false){
?>
<table style="background-color: white;" id="tab" class="table table-bordered table-sm" cellspacing="0" width="100%">
<thead style="text-align:center;">
<tr>
<th class="th-sm">Nom</th>
<th class="th-sm">Code</th>
</tr>
</thead>
<tbody style="text-align:center;">
<?php foreach($membres->result() as $row) {
echo "<tr><td>".$row->lastname."</td>";
echo "<td>".$row->validation_code."</td></tr>";
}
?>
</tbody>
</table>
<?php
}else{ ?>
<h5 style="color: white">Aucun membre</h5>
<?php }
?>
<button class="btnPage2 btnSubmit" style="font-family: Montserrat-Bold; text-transform: uppercase;width: 200px;height: 50px; border-radius: 25px;" onclick="location.href = '<?php echo base_url('index.php/Users/logout') ?>';">Déconnexion</button>
</div>
</div>
</div>
</div>
<!-- Modal -->
<div class="modal fade" id="info" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" data-show="true" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalLabel">Information</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<p id="message"><?php echo $message; ?></p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Fermer</button>
</div>
</div>
</div>
</div>
</body>
<script>
$(document).ready(function () {
if(<?= isset($message) ?>){
$('#info').modal('show');
// alert($('#message').text());
}
$('#tab').paging(
{
limit: 5,
rowDisplayStyle: 'block',
activePage: 0,
rows: []
}
);
});
</script>
</html>

View File

@ -39,8 +39,8 @@ defined('BASEPATH') OR exit('No direct script access allowed');
Se connecter
</span>
<div class="wrap-input100 validate-input" data-validate = "Votre code de validation est requis">
<input class="input100" type="text" title="Code de validation utilisé lors de la création de votre compte iLinkWorld" name="code" placeholder="Code de validation">
<div class="wrap-input100 validate-input" data-validate = "Votre code membre est requis">
<input class="input100" type="text" title="Code de membre obtenu lors de la création de votre compte iLinkWorld" name="code" placeholder="Code membre">
<span class="focus-input100"></span>
<span class="symbol-input100">
<i class="fa fa-lock" aria-hidden="true"></i>
@ -52,12 +52,12 @@ defined('BASEPATH') OR exit('No direct script access allowed');
Connexion
</button>
</div>
<!--<div class="text-center p-t-136">
<a class="txt2" id="redirect" href="">
Retourner sur le site
<i class="fa fa-long-arrow-right m-l-5" aria-hidden="true"></i>
</a>
</div>-->
<!-- <div class="text-center p-t-136">-->
<!-- <a class="txt2" href="https://www.ilink-app.com">-->
<!-- Retourner sur le site-->
<!-- <i class="fa fa-long-arrow-right m-l-5" aria-hidden="true"></i>-->
<!-- </a>-->
<!-- </div>-->
</form>
</div>
</div>
@ -68,7 +68,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalLabel">information</h5>
<h5 class="modal-title" id="exampleModalLabel">Information</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
@ -102,19 +102,11 @@ defined('BASEPATH') OR exit('No direct script access allowed');
<script src="<?php echo base_url('dist/js/main.js')?>"></script>
<script>
$(document).ready(function () {
if($('#message').text().length!=0){
$('#minfo').modal('show');
alert($('#message').text());
if(<?= isset($message) ?>){
$('#info').modal('show');
// alert($('#message').text());
}
});
</script>
<script>
$('#redirect').click(function(){
event.preventDefault();
location.replace("https://www.ilink-app.com");
})
</script>
</body>
</html>
</html>

View File

@ -11,7 +11,7 @@
"source": "https://github.com/bcit-ci/CodeIgniter"
},
"require": {
"php": ">=5.3.7"
"php": ">=5.5"
},
"suggest": {
"paragonie/random_compat": "Provides better randomness in PHP 5.x"

264
dist/css/main_dash.css vendored
View File

@ -1,131 +1,133 @@
html,body{
background: #6787B1;
background: -webkit-linear-gradient(-135deg, #6787B1, #DA7028);
background: -o-linear-gradient(-135deg, #6787B1, #DA7028);
background: -moz-linear-gradient(-135deg, #6787B1, #DA7028);
background: linear-gradient(-135deg, #6787B1, #DA7028);
}
.login-container{
margin-top: 5%;
margin-bottom: 5%;
}
.login-form-1{
padding: 5%;
background: #6787B1;
box-shadow: 0 5px 8px 0 rgba(0, 0, 0, 0.2), 0 9px 26px 0 rgba(0, 0, 0, 0.19);
color: #fff;
}
.login-form-1 h3{
text-align: center;
color: #333;
}
.login-form-2{
padding: 5%;
background: #DA7028;
box-shadow: 0 5px 8px 0 rgba(0, 0, 0, 0.2), 0 9px 26px 0 rgba(0, 0, 0, 0.19);
}
.login-form-2 h3{
text-align: center;
color: #fff;
}
.login-container form{
padding: 10%;
}
.btnPage2{
display: inline-block;
border-radius: 1rem;
border: none;
cursor: pointer;
font-weight: 600;
color: #fff;
background-color: #6787B1;
margin-top: 50px;
}
.btnSubmit
{
width: 50%;
text-align: center;
border-radius: 1rem;
padding: 1.5%;
border: none;
cursor: pointer;
}
.login-form-1 .btnSubmit{
font-weight: 600;
color: #fff;
background-color: #DA7028;
}
.login-form-2 .btnSubmit{
font-weight: 600;
color: #0062cc;
background-color: #fff;
}
.login-form-2 .ForgetPwd{
color: #fff;
font-weight: 600;
text-decoration: none;
}
.login-form-1 .ForgetPwd{
color: #0062cc;
font-weight: 600;
text-decoration: none;
}
.parent {
display: flex;
flex-direction: column;
justify-content: center;
}
.center{
}
.paging-nav {
text-align: right;
padding-top: 2px;
}
.paging-nav a {
margin: auto 1px;
text-decoration: none;
display: inline-block;
padding: 1px 7px;
background: #91b9e6;
color: white;
border-radius: 3px;
}
.paging-nav .selected-page {
background: #187ed5;
font-weight: bold;
}
#add-code{
color: #fff;
}
@font-face {
font-family: gotham-thin;
src: url('../fonts/gotham/Gotham-Thin.woff');
}
#challenge{
font-family: gotham-thin;
color: #ffffff;
font-size: 30px;
margin-top: 10px;
text-align: center;
}
#bloc-logo{
height: 50px;
}
.trash { color:rgb(209, 91, 71); }
.flag { color:rgb(248, 148, 6); }
.panel-body { padding:0px; }
.panel-footer .pagination { margin: 0; }
.panel .glyphicon,.list-group-item .glyphicon { margin-right:5px; }
.panel-body .radio, .checkbox { display:inline-block;margin:0px; }
.panel-body input[type=checkbox]:checked + label { text-decoration: line-through;color: rgb(128, 144, 160); }
.list-group-item:hover, a.list-group-item:focus {text-decoration: none;background-color: rgb(245, 245, 245);}
.list-group { margin-bottom:0px; }
html,body{
background: #6787B1;
background: -webkit-linear-gradient(-135deg, #6787B1, #DA7028);
background: -o-linear-gradient(-135deg, #6787B1, #DA7028);
background: -moz-linear-gradient(-135deg, #6787B1, #DA7028);
background: linear-gradient(-135deg, #6787B1, #DA7028);
}
.login-container{
margin-top: 5%;
margin-bottom: 5%;
}
.login-form-1{
padding: 5%;
background: #6787B1;
box-shadow: 0 5px 8px 0 rgba(0, 0, 0, 0.2), 0 9px 26px 0 rgba(0, 0, 0, 0.19);
color: #fff;
}
.login-form-1 h3{
text-align: center;
color: #333;
}
.login-form-2{
padding: 5%;
background: #DA7028;
box-shadow: 0 5px 8px 0 rgba(0, 0, 0, 0.2), 0 9px 26px 0 rgba(0, 0, 0, 0.19);
}
.login-form-2 h3{
text-align: center;
color: #fff;
}
.login-container form{
padding: 10%;
}
.btnPage2{
display: inline-block;
border-radius: 1rem;
border: none;
cursor: pointer;
font-weight: 600;
color: #fff;
background-color: #6787B1;
margin-top: 50px;
}
.btnSubmit
{
width: 50%;
text-align: center;
border-radius: 1rem;
padding: 1.5%;
border: none;
cursor: pointer;
font-size: 15px;
line-height: 1.5;
}
.login-form-1 .btnSubmit{
font-weight: 600;
color: #fff;
background-color: #DA7028;
}
.login-form-2 .btnSubmit{
font-weight: 600;
color: #0062cc;
background-color: #fff;
}
.login-form-2 .ForgetPwd{
color: #fff;
font-weight: 600;
text-decoration: none;
}
.login-form-1 .ForgetPwd{
color: #0062cc;
font-weight: 600;
text-decoration: none;
}
.parent {
display: flex;
flex-direction: column;
justify-content: center;
}
.center{
}
.paging-nav {
text-align: right;
padding-top: 2px;
}
.paging-nav a {
margin: auto 1px;
text-decoration: none;
display: inline-block;
padding: 1px 7px;
background: #91b9e6;
color: white;
border-radius: 3px;
}
.paging-nav .selected-page {
background: #187ed5;
font-weight: bold;
}
#add-code{
color: #fff;
}
@font-face {
font-family: gotham-thin;
src: url('../fonts/gotham/Gotham-Thin.woff');
}
#challenge{
font-family: gotham-thin;
color: #ffffff;
font-size: 30px;
margin-top: 10px;
text-align: center;
}
#bloc-logo{
height: 50px;
}
.trash { color:rgb(209, 91, 71); }
.flag { color:rgb(248, 148, 6); }
.panel-body { padding:0px; }
.panel-footer .pagination { margin: 0; }
.panel .glyphicon,.list-group-item .glyphicon { margin-right:5px; }
.panel-body .radio, .checkbox { display:inline-block;margin:0px; }
.panel-body input[type=checkbox]:checked + label { text-decoration: line-through;color: rgb(128, 144, 160); }
.list-group-item:hover, a.list-group-item:focus {text-decoration: none;background-color: rgb(245, 245, 245);}
.list-group { margin-bottom:0px; }