Commit a426da3d by tetiana yaremko

authorization process is implemented

  account activation process   via email implemented
  forgot password and reset password process implemented
  user controller along with account view are implemented
  user data and password update process is implemented
parent 5650e1bb
Showing with 2845 additions and 353 deletions
......@@ -100,7 +100,7 @@ $config['charset'] = 'UTF-8';
| setting this variable to TRUE (boolean). See the user guide for details.
|
*/
$config['enable_hooks'] = FALSE;
$config['enable_hooks'] = true;
/*
|--------------------------------------------------------------------------
......
......@@ -87,6 +87,7 @@ defined('EXIT__AUTO_MAX') OR define('EXIT__AUTO_MAX', 125); // highest auto
define('ERR_NONE', 0);
define('ERR_INVALID_EMAIL', 1);
define('ERR_INVALID_PASSWORD', 2);
define ('ERR_EMAIL_NOT_ACTIVE', 3);
......
......@@ -11,3 +11,10 @@ defined('BASEPATH') OR exit('No direct script access allowed');
| https://codeigniter.com/user_guide/general/hooks.html
|
*/
$hook['post_controller_constructor'][] = array(
'class'=>'Authorization',
'function'=>'check',
'filename'=>'Authorization.php',
'filepath'=>'hooks'
);
<?php
class Admin extends CI_Controller
{
public function __construct()
{
parent::__construct();
}
public function index () {
$name = $this->session->userdata('name');
}
}
<?php
class Auth extends CI_Controller {
class Auth extends CI_Controller
{
function __construct () {
function __construct()
{
parent::__construct();
}
public function logged_in_check()
{
if ($this->session->userdata("logged_in")) {
redirect("home/products");
redirect("user/user_profile");
}
}
public function logout() {
public function logout()
{
$this->session->unset_userdata("logged_in");
$this->session->sess_destroy();
redirect("auth/login");
}
public function login()
{
/*
$this->form_validation->set_rules('email', 'Email', 'required');
$this->form_validation->set_rules('password', 'Password', 'required|min_length[8]');
if($this->form_validation->run()==TRUE) {
$email=$_POST['email'];
$password=md5($_POST['password']);
$this->db->select('*');
$this->db->from('users');
$this->db->where(array('email'=>$email, 'password'=>$password));
$query=$this->db->get();
$user=$query->row();
if($user->email) {
$this->logged_in_check();
$this->form_validation->set_rules("email", "Email", "trim|required");
$this->form_validation->set_rules("password", "Password", "trim|required");
if ($this->form_validation->run() == true) {
$this->load->model('auth_model', 'auth');
$status = $this->auth->validate();
if ($status == ERR_INVALID_EMAIL) {
$this->session->set_flashdata("error", "Email is not valid");
} elseif ($status == ERR_INVALID_PASSWORD) {
$this->session->set_flashdata("error", "Password is not valid");
} elseif ($status == ERR_EMAIL_NOT_ACTIVE) {
$this->session->set_flashdata("error", "Email is not active");
} else {
$user_role = $this->auth->user_role();
$this->session->set_userdata("role_id", $user_role);
$this->session->set_userdata($this->auth->get_data());
$this->session->set_userdata("logged_in", true);
if($user_role==1) {
redirect("admin/index");
}
redirect("home/products");
}
}
$this->load->view('login1');
}
//$this->session->set_flashdata("success", " You are logged in");
$_SESSION['user_logged']=TRUE;
//$_SESSION['email'] =$email->email;
redirect("home/products", "refresh");
public function register()
{
$this->logged_in_check();
$this->form_validation->set_rules('email', 'Email', 'required|valid_email|is_unique[users.email]',
array('is_unique' => 'This email has already registered'));
$this->form_validation->set_rules('password', 'Password', 'required|min_length[8]');
$this->form_validation->set_rules('password2', 'Confirm password', 'required|matches[password]|min_length[8]');
$this->form_validation->set_rules('name', 'Name', 'required');
$this->form_validation->set_rules('surname', 'Surname', 'required');
$this->form_validation->set_rules('country', 'Country field', 'required');
$this->form_validation->set_rules('city', 'City field', 'required');
$this->form_validation->set_rules('street', 'Street field', 'required');
$this->form_validation->set_rules('zip', 'ZIP field', 'required');
$this->form_validation->set_rules('building', 'Building field', 'required');
$this->form_validation->set_rules('phone', 'Phone field', 'required');
if ($this->form_validation->run() == TRUE) {
$this->load->model('Register_model', 'reg');
$this->reg->register_user();
redirect("register_successful/registration_complete", "refresh");
} else {
}
$this->session->set_flashdata("error", "This account doesn't exist");
redirect("auth/login", "refresh");
}
$this->load->view('register');
}
*/
/* $this->load->view('templates/header');
$this->load->view('login1');
}
public function check_login () {
$this->form_validation->set_rules('email', 'Email', 'trim|required');
$this->form_validation->set_rules('password', 'Password', 'trim|required|trim|callback_verifyUser');
if($this->form_validation->run()==false) {
//$this->load->view('templates/header');
$this->load->view('login1');
}
/* elseif ($this->verifyUser()==false) {
$this->load->view('login1');
public function verify () {
$email=$this->input->get('email');
$token= $this->input->get('token');
$user = $this->db-> get_where('users', array('email'=>$email))->row_array();
if($user) {
$user_token=$this->db->get_where('user_token', array('token'=>$token))->row_array();
if($user_token) {
$this->db->set('is_active', 1);
$this->db->where('email', $email);
$this->db->update('users');
$this->db->delete('user_token', array('email'=>$email));
$this->session->set_flashdata("error", "Your account has been activated");
redirect("auth/login");
}else {
$this->session->set_flashdata("error", "Token doesn't exist");
redirect("auth/login");
}
}else {
$this->session->set_flashdata("error", "Email does not exist");
redirect("auth/login");
else
{
//$_SESSION['user_logged']=TRUE;
redirect("home/products", "refresh");
}
}
}
public function forgotPassword () {
$this->form_validation->set_rules("email", "Email", "trim|required");
if($this->form_validation->run() == false) {
$this->load->view('forgotPassword');
}else {
$email = $this->input->post('email');
$user=$this->db->get_where('users', array('email'=>$email, 'is_active'=>1))->row_array();
if($user) {
$token = base64_encode(random_bytes(32));
$user_token=array(
'email'=>$email,
'token'=>$token,
'date_created'=>time()
);
$this->db->insert('user_token', $user_token);
$this->load->model('Register_model', 'reg');
$this->reg->sendEmail($token, 'forgot');
$this->session->set_flashdata("message", "Check your email to reset your password");
redirect("auth/forgotPassword");
}else{
$this->session->set_flashdata("message", "Email doesn't exist or is not activated");
redirect("auth/forgotPassword");
}
}
}
public function verifyUser () {
$email=$this->input->post('email');
$password=$this->input->post('password');
$this->load->model('Auth_model');
if($this->Auth_model->login($email, $password)) {
$_SESSION['user_logged']=TRUE;
return true;
} else {
$this->form_validation->set_message('verifyUser', 'Incorrect');
return false;
}
*/
$this->logged_in_check();
$this->form_validation->set_rules("email", "Email", "trim|required");
$this->form_validation->set_rules("password", "Password", "trim|required");
if ($this->form_validation->run() == true)
{
$this->load->model('auth_model', 'auth');
$status=$this->auth->validate();
if($status==ERR_INVALID_EMAIL) {
$this->session->set_flashdata("error", "Email is not valid");
}
elseif ($status==ERR_INVALID_PASSWORD) {
$this->session->set_flashdata("error", "Password is not valid");
}
else {
$this->session->set_userdata($this->auth->get_data());
$this->session->set_userdata("logged_in",true);
redirect("home/products");
public function resetPassword() {
$email =$this->input->get('email');
$token =$this->input->get('token');
$user = $this->db->get_where('users', array('email'=>$email))->row_array();
if($user) {
$user_token=$this->db->get_where('user_token', array('token'=>$token))->row_array();
if($user_token) {
$this->session->set_userdata('reset_email', $email);
$this->changePassword();
}else {
$this->session->set_flashdata("error", "Token problem");
redirect("auth/login");
}
} else{
$this->session->set_flashdata("error", "Reset password failed!");
redirect("auth/login");
}
}
public function changePassword() {
if(!$this->session->userdata('reset_email')) {
redirect('auth/login');
}
$this->load->view('templates/header');
$this->load->view('login1');
$this->form_validation->set_rules('new_password', 'Password', 'trim|required|min_length[8]');
$this->form_validation->set_rules('new_password2', 'Confirm password', 'trim|required|matches[new_password]|min_length[8]');
if($this->form_validation->run() == false) {
$this->load->view('passReset');
} else {
$password= md5($this->input->post('new_password'));
$email=$this->session->userdata('reset_email');
$this->db->query("UPDATE users set password='$password' where email='$email'");
$this->session->unset_userdata('reset_email');
$this->session->set_flashdata("error", "Your password has been reset");
redirect("auth/login");
}
}
public function register() {
if(isset ($_POST['register'])) {
$this->form_validation->set_rules('email', 'Email', 'required|is_unique[users.email]');
$this->form_validation->set_rules('password', 'Password', 'required|min_length[8]');
$this->form_validation->set_rules('password2', 'Confirm password', 'required|min_length[8]|matches[password]');
$this->form_validation->set_rules('name', 'Name', 'required');
$this->form_validation->set_rules('surname', 'Surname', 'required');
$this->form_validation->set_rules('country', 'Country field', 'required');
$this->form_validation->set_rules('city', 'City field', 'required');
$this->form_validation->set_rules('street', 'Street field', 'required');
$this->form_validation->set_rules('zip', 'ZIP field', 'required');
$this->form_validation->set_rules('building', 'Building field', 'required');
$this->form_validation->set_rules('phone', 'Phone field', 'required');
if($this->form_validation->run()==TRUE) {
$this->load->model('Register_model', 'reg');
$this->reg->register_user();
redirect("register_successful/registration_complete", "refresh");
}
}
$this->load->view('templates/header');
$this->load->view('register');
}
}
<?php
class Common extends CI_Controller
{
public function __construct()
{
parent::__construct();
}
public function unauthorized() {
$this->load->view('unauthorized_view');
}
}
<?php
class User extends CI_Controller
{
function __construct()
{
parent::__construct();
}
public function user_profile() {
if(isset($_POST['update'])) {
$this->form_validation->set_rules('new_email', 'Email', 'required|valid_email',
array('required' => 'Please, enter new email in order to update', 'valid_email' => 'Email not valid'));
$this->form_validation->set_rules('new_name', 'Name', 'required',
array('required' => 'Please, enter new name in order to update', 'valid_email' => 'Email not valid'));
$this->form_validation->set_rules('new_surname', 'Surname', 'required',
array('required' => 'Please, enter new surname in order to update', 'valid_email' => 'Email not valid'));
if ($this->form_validation->run() == true) {
$this->load->model('auth_model', 'auth');
$this->auth->updateEmail();
$this->session->set_userdata($this->auth->get_data());
$this->session->set_flashdata("message", "<div class=\"alert alert-success alert-dismissible fade show\" role=\"alert\">
Your data has been updated!<button type=\"button\" class=\"close\" data-dismiss=\"alert\" aria-label=\"Close\">
<span aria-hidden=\"true\">&times;</span></button></div>");
redirect('user/user_profile');
}
}
elseif (isset($_POST['update-password'])) {
$this->form_validation->set_rules('update_password', 'Password', 'trim|required|min_length[8]');
$this->form_validation->set_rules('update_password2', 'Confirm password', 'trim|required|matches[update_password]|min_length[8]');
if ($this->form_validation->run() == true) {
$this->load->model('auth_model', 'auth');
$this->auth->updatePassword();
$this->session->set_userdata($this->auth->get_data());
$this->session->set_flashdata("pass_message", "<div class=\"alert alert-success alert-dismissible fade show\" role=\"alert\">
Your password has been updated!<button type=\"button\" class=\"close\" data-dismiss=\"alert\" aria-label=\"Close\">
<span aria-hidden=\"true\">&times;</span></button></div>");
redirect("user/user_profile");
}
}
$this->load->view('userProfile');
}
}
......@@ -14,6 +14,10 @@ class Home extends CI_Controller {
}
public function products()
{
$this->load->view('templates/header');
$this->load->view('templates/home_t');
/*if($_SESSION['user_logged']==true) {
//redirect("home/products");
......@@ -27,15 +31,15 @@ class Home extends CI_Controller {
redirect("auth/login");
}
*/
if ($this->session->userdata("logged_in")) {
/*if ($this->session->userdata("logged_in")) {
$this->load->view('templates/header');
$this->load->view('templates/home_t');
}
else {
redirect("auth/login");
}
}*/
}
}
<?php
class Items extends CI_Controller {
public function __construct()
{
parent::__construct();
}
public function item1()
{
/*if($_SESSION['user_logged']==False) {
redirect("home/products");
}*/
$this->load->view('templates/header');
$this->load->view('templates/product1_item');
}
}
<?php
function asset_url($resource)
{
return base_url() . "asset/" . $resource;
}
<?php
class Authorization
{
public function check($params)
{
//lpad access control list
require_once('acl.php');
//get controller and action
$ci =& get_instance();
$controller = $ci->router->fetch_class();
$action = $ci->router->fetch_method();
//validate if that action is public(no session needed)
if (!empty($allowAll[$controller][$action])) {
return TRUE;
}
//get session information
if (isset($_COOKIE) && ($_COOKIE['ci_session'])) {
$ci_session = $ci->session->userdata;
if (!empty($ci_session['logged_in'])) {
$session = $ci_session['logged_in'];
$session_role = $ci_session['role_id'];
}
}
if (!isset($session) || !isset($session_role)) {
redirect(base_url('index.php/auth/login'));
//redirect(base_url('index.php/common/unauthorized'));
return;
} else {
//check that user is able to access action
if (empty($allowOnly[$session_role][$controller][$action])
|| $allowOnly[$session_role][$controller][$action] != TRUE) {
redirect(base_url('index.php/common/unauthorized'));
}
}
return true;
}
}
?>
<?php
//Access control list for the application
$allowAll=array();
$allowOnly=array();
$allowAll['auth']['login']=true;
$allowAll['auth']['register']=true;
$allowAll['auth']['forgotPassword']=true;
$allowAll['home']['products']=true;
$allowAll['common']['unauthorized']=true;
$allowAll['auth']['logout']=true;
$allowAll['auth']['resetpassword']=true;
$allowAll['auth']['verify'] =true;
$allowOnly['1']['admin']['index']=true;
$allowOnly['2']['user']['user_profile']=true;
$allowOnly['2']['auth']['resetPassword']=true;
$allowOnly['2']['auth']['changePassword']=true;
//$allowOnly['2']['home']['products']=true;
<?php
class Auth_model extends CI_Model {
/*var $u_id;
var $email;
var $name;
public function __construct (){
parent::__construct();
}
public function login($email, $password) {
$this->db->select('u_id, name, email, password');
$this->db->from('users');
$this->db->where('email', $email);
$this->db->where('password', $password);
$query = $this->db->get();
if($query->num_rows()==1)
{
//$rows = $query->result();
/*$this->u_id = $rows[0]->u_id;
$this->email = $rows[0]->email;
$this->name = $rows[0]->name;
return true;
}
else
{
return false;
}
}
*/
private $_data=array();
public function validate() {
$email =$this->input->post('email');
$password =md5($this->input->post('password'));
$this->db->select('u_id, name, email, password');
$this->db->select('*');
$this->db->from('users');
$this->db->where('email', $email);
$query = $this->db->get();
if($query->num_rows()==1) {
$row=$query->result();
if($row[0]->password==$password)
{
unset($row['password']);
$this->_data=$row;
return ERR_NONE;
if ($row[0]->is_active=='1') {
if ($row[0]->password == $password) {
unset($row['password']);
$this->_data = array(
'email' => $row[0]->email,
'name'=> $row[0]->name,
'surname'=> $row[0]->surname,
'country'=> $row[0]->name,
'street'=> $row[0]->name,
'is_active' =>$row[0]->is_active,
'role_id'=> $row[0]->role_id
);
return ERR_NONE;
}
return ERR_INVALID_PASSWORD;
}
return ERR_INVALID_PASSWORD;
return ERR_EMAIL_NOT_ACTIVE;
} else {
return ERR_INVALID_EMAIL;
}
}
public function get_data()
{
return $this->_data;
}
public function user_role() {
if($this->_data['role_id']=='1') {
return 1;
}
return 2;
}
public function updateEmail()
{
$new_email = $this->input->post('new_email');
$new_name = $this->input->post('new_name');
$new_surname = $this->input->post('new_surname');
$session_email = $this->session->userdata('email');
$user = $this->db->get_where('users', array('email' => $session_email));
if ($user) {
$this->db->query("UPDATE users set email='$new_email' where email='$session_email'");
$this->db->query("UPDATE users set name='$new_name' where email='$session_email'");
$this->db->query("UPDATE users set surname='$new_surname' where email='$session_email'");
$this->db->select('*');
$this->db->from('users');
$this->db->where('email', $new_email);
$query = $this->db->get();
if ($query->num_rows() == 1) {
$row = $query->result();
$this->_data = array(
'email' => $row[0]->email,
'password' =>md5($row[0]->password),
'name' => $row[0]->name,
'surname' => $row[0]->surname,
'country' => $row[0]->name,
'street' => $row[0]->name,
'is_active' => $row[0]->is_active,
'role_id' => $row[0]->role_id
);
}
}
}
public function updatePassword() {
$password = md5($this->input->post('update_password'));
$session_email = $this->session->userdata('email');
$user = $this->db->get_where('users', array('email' => $session_email));
if ($user) {
$this->db->query("UPDATE users set password='$password' where email='$session_email'");
$this->db->select('*');
$this->db->from('users');
$this->db->where('email', $session_email);
$query = $this->db->get();
if ($query->num_rows() == 1) {
$row = $query->result();
$this->_data = array(
'email' => $row[0]->email,
'password' =>md5($row[0]->password),
'name' => $row[0]->name,
'surname' => $row[0]->surname,
'country' => $row[0]->name,
'street' => $row[0]->name,
'is_active' => $row[0]->is_active,
'role_id' => $row[0]->role_id
);
}
}
}
}
<?php
class Register_model extends CI_Model {
public function register_user () {
$data = array (
'email' => $this->input->post('email'),
'password' =>md5($this->input->post('password')),
'name' =>$this->input->post('name'),
'surname' =>$this->input->post('surname'),
'country' =>$this->input->post('country'),
'city' =>$this->input->post('city'),
'street' =>$this->input->post('street'),
'building' =>$this->input->post('building'),
'zip' =>$this->input->post('zip'),
'phone' =>$this->input->post('phone'),
'is_active' => 0,
'role_id'=>2
);
$this->db->insert('users', $data);
$token =base64_encode(random_bytes(32));
$user_token =array(
'email' => $this->input->post('email'),
'token'=>$token,
'date_created' =>time()
);
$this->db->insert('user_token', $user_token);
$this->sendEmail($token, 'verify');
}
public function sendEmail($token, $type) {
$config = array(
'protocol'=>'smtp',
'smtp_host'=>'ssl://smtp.googlemail.com',
'smtp_user'=>'tetianayaremko@gmail.com',
'smtp_pass'=>'',
'smtp_port'=> '465',
'mailtype'=> 'html',
'charset'=> 'iso-8859-1',
'newline' =>"\r\n",
'wordwrap' => TRUE
);
$this->load->library('email', $config);
$this->email->from('tetianayaremko@gmail.com', 'Web app');
$this->email->to($this->input->post('email'));
if($type == 'verify') {
$this->email->subject('Account verification');
$this->email->message('Click here to verify account: <a href="' .
base_url() . 'index.php/auth/verify?email=' . $this->input->post('email') .
'&token=' . urlencode($token) . '">Activate</a>');
}
elseif ($type == 'forgot') {
$this->email->subject('Reset password');
$this->email->message('Click here to reset your password: <a href="' .
base_url() . 'index.php/auth/resetpassword?email=' . $this->input->post('email') .
'&token=' . urlencode($token) . '">Reset</a>');
}
//$this->email->send();
if($this->email->send()) {
return true;
}else {
echo $this->email->print_debugger();
die;
}
}
}
<html>
<head>
</head>
<body>
<h1>Admin page</h1>
</body>
</html>
<!doctype html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<link rel="stylesheet" href="<?php echo base_url(); ?>asset/css/bootstrap.min.css" type="text/css">
<link rel="stylesheet" href="<?php echo base_url(); ?>asset/css/user_style.css" type="text/css">
<title>Login Page</title>
</head>
<style>
.email-section {
width: 40%;
}
</style>
<body>
<div class="container">
<header>
<div class="logo">
<a href="<?php echo base_url(); ?>index.php/home/products"><img src="<?= asset_url('img/logo.png')?>" alt=""></a>
</div>
</header>
<nav class="nav-bar">
<ul class="header-nav">
<li class=""><a href="<?php echo base_url(); ?>index.php/auth/login">Login</a> <a href="#">/Register</a></li>
<li><a href="#">Delivery address</a></li>
<li><a href="#">Order history</a></li>
</ul>
</nav>
<div class="email-section">
<h3>Forgot your password?</h3>
<?php $message = $this->session->flashdata("message")?>
<div class="alert alert-<?php echo $message ? 'warning' : 'info' ?> alert-dismissible" role="alert">
<button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button>
<?php echo $message ? $message : 'Enter your email' ?>
</div>
<?php echo form_open(); ?>
<?php $error =form_error("email", "<p class='text-danger'>", '</p>');?>
<div class="form-group <?php echo $error ? 'has-error' : '' ?>">
<label for="email">Please, enter your email </label>
<input class="email-control" type="email" value="<?php echo set_value("email") ?>" name="email"/>
<?php echo $error?>
</div>
<input class="btn" type="submit" value="Send" name="submit"/>
<?php form_close()?>
</div>
</div>
<script src="<?php echo base_url();?>assets/js/bootstrap.min.js"></script>
<script src="https://code.jquery.com/jquery-3.1.1.slim.min.js" integrity="sha384-A7FZj7v+d/sdmMqp/nOQwliLvUsJfDHW+k9Omg/a/EheAdgtzNs3hpfag6Ed950n" crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.6/js/bootstrap.min.js" integrity="sha384-vBWWzlZJ8ea9aCX4pEW3rVHjgjt7zpkNpZk+02D9phzyeVkE+jo0ieGizqPLForn" crossorigin="anonymous"></script>
</body>
<!doctype html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!-- Bootstrap CSS -->
<link href=" <?php echo base_url();?>assets/css/bootstrap.min.css" rel="stylesheet">
<title>Login Page</title>
</head>
<body>
<div class="row justify-content-center">
<div class ="col-lg-4 col-lg-offset-8">
<h1>Login Page</h1>
<p>Fill in the details:</p>
<?php if(isset($_SESSION['success'])) {?>
<div class="alert alert-success"> <?php echo $_SESSION['success'];?></div>
<?php
} ?>
<?php echo validation_errors('<div class="alert alert-danger">','</div>'); ?>
<form action="" method="post">
<div class="form-group">
<label> Email:</label>
<input class="form-control" name="email" id="email" type="text" >
</div>
<div class="form-group">
<label> Password:</label>
<input class="form-control" name="password" id="password" type="password">
</div>
<div class="text-center">
<button class="btn btn-primary" name="login">Login</button>
</div>
</form>
</div>
</div>
<!-- Optional JavaScript -->
<!-- jQuery first, then Popper.js, then Bootstrap JS -->
<script src="https://code.jquery.com/jquery-3.4.1.slim.min.js" integrity="sha384-J6qa4849blE2+poT4WnyKhv5vZF5SrPo0iEjwBvKU7imGFAV0wwj1yYfoRSJoZ+n" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js" integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js" integrity="sha384-wfSDF2E50Y2D1uUdj0O3uMBJnjuUD4Ih7YwaYd1iqfktj0Uod8GCExl3Og8ifwB6" crossorigin="anonymous"></script>
<script src="<?php echo base_url();?>assets/js/bootstrap.min.js"></script>
</body>
</html>
......@@ -3,164 +3,77 @@
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<link rel="stylesheet" href="<?php echo base_url(); ?>asset/css/bootstrap.min.css" type="text/css">
<link rel="stylesheet" href="<?php echo base_url(); ?>asset/css/user_style.css" type="text/css">
<title>Login Page</title>
</head>
<style>
body {
background-color: #eee;
font-size: 0.9rem;
color: #444444;
}
.auth-section {
font-family: Helvetica;
margin: auto;
background-color: white;
height: 78%;
margin-top: 190px;
width:1000px;
display: flex;
flex-direction: row;
border-shadow:1px 1px 1px rgba(0, 0, 0, 0.9);
padding-top: 100px;
}
.signup, .reg{
width: 50%;
height: 300px;
display: flex;
flex-direction: column;
padding: 25px 60px;
}
h3 {
font-weight: 600;
margin-bottom: 25px;
}
.reg {
align-items: center;
}
.signup {
border-right: 1px solid #cccccc;
}
.form-group {
display: flex;
flex-direction: column;
}
input {
width: 100%;
padding: .1em .2em;
border: 1px solid #ccc;
background: #fdfcfc;
margin: 0;
color: #444;
font-size: 1em;
line-height: 1.8;
border-radius: 2px;
margin-bottom: 0;
}
label {
margin:0;
}
.btn{
font-weight: 500;
font-family: inherit;
cursor: pointer;
width: 90px;
font-family: inherit;
padding: .5em 1em;
background: #000;
color: #fff;
border: 2px solid #000;
letter-spacing: 1.3px;
border-radius: 0;
}
.btn:hover {
border: 2px solid #000;
color: #000;
background-color: #fff;
}
.signup btn {
display: inline-block;;
}
.forgot {
display: inline-block;
float: right;
color: #999999;
font-family: inherit;
}
.forgot:hover{
color: #999999;
}
.input-error {
padding: 0;
margin-top: 0;
font-size: 0.9rem;
font-family: inherit;
}
</style>
<body>
<div class="auth-section">
<div class="signup">
<h3>Existing customer</h3>
<?php $error = $this->session->flashdata("error")?>
<div class="alert alert-<?php echo $error ? 'warning' : 'info' ?> alert-dismissible" role="alert">
<button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button>
<?php echo $error ? $error : 'Enter your username and password' ?>
</div>
<?php echo form_open(); ?>
<?php $error =form_error("email", "<p class='text-danger'>", '</p>');?>
<div class="form-group <?php echo $error ? 'has-error' : '' ?>">
<label for="email">Email</label>
<input type="email" value="<?php echo set_value("email") ?>" name="email"/>
<div class="input-error"> <?php echo $error; ?> </div>
</div>
<?php $error =form_error("password", "<p class='text-danger'>", '</p>');?>
<div class="form-group">
<label for="password">Password</label>
<input type="password" name="password"/>
<div class="input-error"> <?php echo $error; ?> </div>
</div>
<input class="btn" type="submit" value="Login" name="submit"/>
<a href="#" class="forgot open">Forgot your password?</a>
</form>
</div>
<div class="reg">
<h3>New Customer</h3>
<p>Click Next to provide us with your details</p>
<a href="<?php echo base_url(); ?>index.php/auth/register"><button class="btn">Next</button></a>
<body>
<div class="container">
<header>
<div class="logo">
<a href="<?php echo base_url(); ?>index.php/home/products"><img src="<?= asset_url('img/logo.png')?>" alt=""></a>
</div>
</header>
<nav class="nav-bar">
<ul class="header-nav">
<li class="active"><a href="#">Login/Register</a></li>
<li><a href="#">Delivery address</a></li>
<li><a href="#">Order history</a></li>
</ul>
</nav>
<div class="auth-section">
<div class="signup">
<h3>Existing customer</h3>
<?php $error = $this->session->flashdata("error")?>
<div class="alert alert-<?php echo $error ? 'warning' : 'info' ?> alert-dismissible" role="alert">
<button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button>
<?php echo $error ? $error : 'Enter your username and password' ?>
</div>
<?php echo form_open(); ?>
<?php $error =form_error("email", "<p class='text-danger'>", '</p>');?>
<div class="form-group <?php echo $error ? 'has-error' : '' ?>">
<label for="email">Email</label>
<input type="email" value="<?php echo set_value("email") ?>" name="email"/>
<div class="input-error"> <?php echo $error; ?> </div>
</div>
<?php $error =form_error("password", "<p class='text-danger'>", '</p>');?>
<div class="form-group">
<label for="password">Password</label>
<input type="password" name="password"/>
<div class="input-error"> <?php echo $error; ?> </div>
</div>
<input class="btn" type="submit" value="Login" name="submit"/>
<a href="<?php echo base_url(); ?>index.php/auth/forgotPassword" class="forgot">Forgot your password?</a>
</form>
</div>
<div class="reg">
<h3>New Customer</h3>
<p>Click Next to provide us with your details</p>
<a href="<?php echo base_url(); ?>index.php/auth/register"><button class="btn">Next</button></a>
</div>
</div>
</body>
<script src="<?php echo base_url();?>assets/js/bootstrap.min.js"></script>
<script src="https://code.jquery.com/jquery-3.1.1.slim.min.js" integrity="sha384-A7FZj7v+d/sdmMqp/nOQwliLvUsJfDHW+k9Omg/a/EheAdgtzNs3hpfag6Ed950n" crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.6/js/bootstrap.min.js" integrity="sha384-vBWWzlZJ8ea9aCX4pEW3rVHjgjt7zpkNpZk+02D9phzyeVkE+jo0ieGizqPLForn" crossorigin="anonymous"></script>
</body>
</html>
......@@ -170,4 +83,3 @@
</body>
<!doctype html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<link rel="stylesheet" href="<?php echo base_url(); ?>asset/css/bootstrap.min.css" type="text/css">
<link rel="stylesheet" href="<?php echo base_url(); ?>asset/css/user_style.css" type="text/css">
<title>Login Page</title>
</head>
<body>
<div class="container">
<header>
<div class="logo">
<a href="<?php echo base_url(); ?>index.php/home/products"><img src="<?= asset_url('img/logo.png')?>" alt=""></a>
</div>
</header>
<nav class="nav-bar">
<ul class="header-nav">
<li class=""><a href="<?php echo base_url(); ?>index.php/auth/login">Login</a> <a href="#">/Register</a></li>
<li><a href="#">Delivery address</a></li>
<li><a href="#">Order history</a></li>
</ul>
</nav>
<div class="password-section">
<h3>Change your password?</h3>
<h5><?php echo $this->session->userdata('reset_email') ?></h5>
<?php $message = $this->session->flashdata("reset_message")?>
<div class="alert alert-<?php echo $message ? 'warning' : 'info' ?> alert-dismissible" role="alert">
<button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button>
<?php echo $message ? $message : 'Please, enter and confirm new password' ?>
</div>
<form method="post" action="<?php base_url('index.php/auth/changePassword'); ?>">
<?php $error =form_error("new_password", "<p class='text-danger'>", '</p>');?>
<div class="form-group <?php echo $error ? 'has-error' : '' ?>">
<label for="new_password">New password</label>
<input class="password-control" type="password" name="new_password"/>
<?php echo $error?>
</div>
<?php $error =form_error("new_password2", "<p class='text-danger'>", '</p>');?>
<div class="form-group <?php echo $error ? 'has-error' : '' ?>">
<label for="new_password2">Confirm password</label>
<input class="password-control" type="password" name="new_password2"/>
<?php echo $error?>
</div>
<input class="btn" type="submit" value="Reset" name="submit"/>
</form>
</div>
</div>
<script src="<?php echo base_url();?>assets/js/bootstrap.min.js"></script>
<script src="https://code.jquery.com/jquery-3.1.1.slim.min.js" integrity="sha384-A7FZj7v+d/sdmMqp/nOQwliLvUsJfDHW+k9Omg/a/EheAdgtzNs3hpfag6Ed950n" crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.6/js/bootstrap.min.js" integrity="sha384-vBWWzlZJ8ea9aCX4pEW3rVHjgjt7zpkNpZk+02D9phzyeVkE+jo0ieGizqPLForn" crossorigin="anonymous"></script>
</body>
......@@ -6,76 +6,216 @@
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!-- Bootstrap CSS -->
<link href=" <?php echo base_url();?>assets/css/bootstrap.min.css" rel="stylesheet">
<link href=" <?php echo base_url();?>assets/css/bootstrap.min.css" rel="stylesheet">
<link href=" <?php echo base_url();?>asset/css/register_style.css" rel="stylesheet">
<title>Register Page</title>
</head>
<body>
<div class="row justify-content-center">
<div class ="col-lg-4 col-lg-offset-8">
<h1>Register Page</h1>
<p>Fill in the details:</p>
<?php echo validation_errors('<div class="alert alert-danger">','</div>'); ?>
<form action="" method="post">
<div class="form-group">
<label> Email:</label>
<input class="form-control" name="email" id="email" type="text">
</div>
<div class="form-group">
<label> Password:</label>
<input class="form-control" name="password" id="password" type="password">
</div>
<div class="form-group">
<label> Confirm password:</label>
<input class="form-control" name="password2" id="password" type="password" >
</div>
<div class="form-group">
<label> Name:</label>
<input class="form-control" name="name" id="name" type="text" >
</div>
<div class="form-group">
<label> Surname:</label>
<input class="form-control" name="surname" id="surname" type="text" >
</div>
<div class="form-group">
<label> Country:</label>
<input class="form-control" name="country" id="country" type="text" >
</div>
<div class="form-group">
<label> City:</label>
<input class="form-control" name="city" id="city" type="text" >
</div>
<title>Registration Page</title>
</head>
<div class="form-group">
<label> Street:</label>
<input class="form-control" name="street" id="street" type="text" >
</div>
<div class="form-group">
<label> ZIP:</label>
<input class="form-control" name="zip" id="zip" type="text" >
<body>
<div class="container">
<header>
<div class="logo">
<a href="<?php echo base_url(); ?>index.php/home/products"><img src="<?= asset_url('img/logo.png')?>" alt=""></a>
</div>
</header>
<nav class="nav-bar">
<ul class="header-nav">
<li class="active"><a href="<?php echo base_url(); ?>index.php/auth/login">Login</a> <a href="#">/Register</a></li>
<li><a href="#">Delivery address</a></li>
<li><a href="#">Order history</a></li>
</ul>
</nav>
<div class="back-to-shop">
<a href="<?php echo base_url(); ?>index.php/home/products"><< Back to shop</a>
<a href="<?php echo base_url(); ?>index.php/auth/login">Log in</a>
</div>
<div class="register-section">
<h2>New Customer</h2>
<div class="form-section">
<?php echo form_open(); ?>
<table class="register-table">
<tbody>
<tr>
<?php $error =form_error("email", "<small class='text-danger'>", '</small>');?>
<td> <label> Email<em>*</em></label> </td>
<td>
<input name="email" id="email" type="text" value="<?php echo set_value("email") ?>">
<?php echo $error; ?>
</td>
</tr>
<tr>
<td>
<?php $error =form_error("password", "<small class='text-danger'>", '</small>');?>
<label> Password<em>*</em></label></label>
</td>
<td>
<input name="password" id="password" type="password">
<?php echo $error; ?>
</td>
</tr>
<tr>
<td>
<?php $error =form_error("password2", "<small class='text-danger'>", '</small>');?>
<label> Confirm password<em>*</em></label></label>
</td>
<td>
<input name="password2" id="password" type="password" >
<?php echo $error; ?>
</td>
</tr>
</tbody>
</table>
<div class="message-box">
<h4>Why are your details necessary?</h4>
<p>We need your email address to send confirmation of orders placed, orders shipped and updates on the status of orders.</p>
<p>We respect yout privacy</p>
</div>
<div class="form-group">
<label> Building:</label>
<input class="form-control" name="building" id="building" type="text" >
<table class="delivery-details" >
<tbody>
<tr>
<td>
<label>Title</label>
</td>
<td>
<select>
<option>Mr</option>
<option>Mrs</option>
<option>Mr</option>
<option>Ms</option>
<option>Dr</option>
</select>
</td>
</tr>
<tr>
<td>
<?php $error =form_error("name", "<small class='text-danger'>", '</small>');?>
<label> Name<em>*</em></label></label>
</td>
<td>
<input name="name" id="name" type="text" value="<?php echo set_value('name')?>">
<?php echo $error; ?>
</td>
</tr>
<tr>
<td>
<?php $error =form_error("surname", "<small class='text-danger'>", '</small>');?>
<label> Surname<em>*</em></label></label>
</td>
<td>
<input name="surname" id="surname" type="text" value="<?php echo set_value('surname')?>">
<?php echo $error; ?>
</td>
</tr>
<tr>
<td>
<?php $error =form_error("street", "<small class='text-danger'>", '</small>');?>
<label> Street<em>*</em></label></label>
</td>
<td>
<input name="street" id="street" type="text" value="<?php echo set_value('street')?>">
<?php echo $error; ?>
</td>
</tr>
<tr>
<td>
<?php $error =form_error("building", "<small class='text-danger'>", '</small>');?>
<label> Building<em>*</em></label></label>
</td>
<td>
<input name="building" id="building" type="text" value="<?php echo set_value('building')?>">
<?php echo $error; ?>
</td>
</tr>
<tr>
<td>
<?php $error =form_error("city", "<small class='text-danger'>", '</small>');?>
<label> City<em>*</em></label></label>
</td>
<td>
<input name="city" id="city" type="text" value="<?php echo set_value('city')?>">
<?php echo $error; ?>
</td>
</tr>
<tr>
<td>
<?php $error =form_error("country", "<small class='text-danger'>", '</small>');?>
<label> Country<em>*</em></label></label>
</td>
<td>
<input name="country" id="country" type="text" value="<?php echo set_value('surname')?>">
<?php echo $error; ?>
</td>
</tr>
<tr>
<td>
<?php $error =form_error("zip", "<small class='text-danger'>", '</small>');?>
<label> ZIP<em>*</em></label></label>
</td>
<td>
<input name="zip" id="zip" type="text" value="<?php echo set_value('zip')?>">
<?php echo $error; ?>
</td>
</tr>
<tr>
<td>
<?php $error =form_error("phone", "<small class='text-danger'>", '</small>');?>
<label> Phone<em>*</em></label></label>
</td>
<td>
<input name="phone" id="phone" type="text" value="<?php echo set_value('phone')?>">
<?php echo $error; ?>
</td>
</tr>
</tbody>
</table>
<div class="emaile-pref">
<h2>Email Preferences</h2>
<div class="rb-table">
<table>
<tbody>
<tr>
<td>
<label>
<input type="radio" checked="checked">Email you about the latest news
</label>
</td>
</tr>
<tr>
<td>
<label>
<input type="radio" >Email you about discounts and promotions
</label>
</td>
</tr>
<tr>
<td>
<label>
<input type="radio" >Only Email you regarding your orders
</label>
</td>
</tr>
<tr>
<td>
By clicking I agree to the following
<a href="#">Privacy policy</a>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="register-button">
<button class="button " name="register">Register</button>
</div>
</form>
</div>
</div>
</div>
<div class="form-group">
<label> Phone:</label>
<input class="form-control" name="phone" id="phone" type="text" >
</div>
<div class="text-center">
<button class="btn btn-primary" name="register">Register</button>
</div>
</form>
</div>
</div>
<!-- Optional JavaScript -->
<!-- jQuery first, then Popper.js, then Bootstrap JS -->
......
......@@ -10,15 +10,17 @@
<title></title>
</head>
<style>
h2 {
margin-top: 200px;
}
</style>
<body>
<div class="row justify-content-center">
<div class ="col-lg-4 col-lg-offset-8">
<?php if(isset($_SESSION['success'])) {?>
<div class="alert alert-success"> <?php echo $_SESSION['success'];?></div>
<?php
} ?>
Your registration is successful. Please, log in.
<h2> Your registration is successful. Please, <a href="<?php echo base_url(); ?>index.php/auth/login"> log in.</a></h2>
<br><br>
......
<html>
<head>
<link rel="stylesheet" href="<?php echo base_url(); ?>asset/css/stylee.css" type="text/css">
</head>
<body>
<div class="footer-section">
<div class="container">
<div class="newslatter-form">
<div class="row">
<div class="col-lg-12">
<form action="#">
<input type="text" placeholder="Your email address">
<button type="submit">Subscribe to our newsletter</button>
</form>
</div>
</div>
</div>
<div class="footer-widget">
<div class="row">
<div class="col-lg-3 col-sm-6">
<div class="single-footer-widget">
<h4>About us</h4>
<ul>
<li>About Us</li>
<li>Community</li>
<li>Jobs</li>
<li>Shipping</li>
<li>Contact Us</li>
</ul>
</div>
</div>
<div class="col-lg-3 col-sm-6">
<div class="single-footer-widget">
<h4>Customer Care</h4>
<ul>
<li>Search</li>
<li>Privacy Policy</li>
<li>2019 Lookbook</li>
<li>Shipping & Delivery</li>
<li>Gallery</li>
</ul>
</div>
</div>
<div class="col-lg-3 col-sm-6">
<div class="single-footer-widget">
<h4>Our Services</h4>
<ul>
<li>Free Shipping</li>
<li>Free Returnes</li>
<li>Our Franchising</li>
<li>Terms and conditions</li>
<li>Privacy Policy</li>
</ul>
</div>
</div>
<div class="col-lg-3 col-sm-6">
<div class="single-footer-widget">
<h4>Information</h4>
<ul>
<li>Payment methods</li>
<li>Times and shipping costs</li>
<li>Product Returns</li>
<li>Shipping methods</li>
<li>Conformity of the products</li>
</ul>
</div>
</div>
</div>
</div>
</div>
<div class="social-links-warp">
<div class="container">
<div class="social-links">
<a href="" class="instagram"><i class="fa fa-instagram"></i><span>instagram</span></a>
<a href="" class="pinterest"><i class="fa fa-pinterest"></i><span>pinterest</span></a>
<a href="" class="facebook"><i class="fa fa-facebook"></i><span>facebook</span></a>
<a href="" class="twitter"><i class="fa fa-twitter"></i><span>twitter</span></a>
<a href="" class="youtube"><i class="fa fa-youtube"></i><span>youtube</span></a>
<a href="" class="tumblr"><i class="fa fa-tumblr-square"></i><span>tumblr</span></a>
</div>
</div>
<div class="container text-center pt-5">
<p><!-- Link back to Colorlib can't be removed. Template is licensed under CC BY 3.0. -->
Copyright &copy;<script>document.write(new Date().getFullYear());</script> All rights reserved | This template is made with <i class="icon-heart color-danger" aria-hidden="true"></i> by <a href="https://colorlib.com" target="_blank">Colorlib</a>
<!-- Link back to Colorlib can't be removed. Template is licensed under CC BY 3.0. --></p>
</div>
</div>
</div>
<!-- Footer Section End -->
<!-- Js Plugins -->
<script src="<?php echo base_url(); ?>asset/js/jquery-3.3.1.min.js"></script>
<script src="<?php echo base_url(); ?>asset/js/bootstrap.min.js"></script>
<script src="<?php echo base_url(); ?>asset/js/hceader-top.js"></script>
</body>
</html>
......@@ -9,11 +9,13 @@
<div class="container-fluid" id="header-top">
<div class="inner-header">
<div class="logo">
<a href="<?php echo base_url(); ?>index.php/home/products"><img src="<?= asset_url('img/logo.gif')?>" alt=""></a>
<a href="<?php echo base_url(); ?>index.php/home/products"><img src="<?= asset_url('img/logo.png')?>" alt=""></a>
</div>
<div class="header-right">
<img src="<?= asset_url('img/icons/man.png')?>" alt="">
<a href="<?php echo base_url(); ?>index.php/user/user_profile" >
<img src="<?= asset_url('img/icons/man.png')?>" alt="">
</a>
<a href="#">
<img src="<?= asset_url('img/icons/bag.png')?>" alt="">
<span>2</span>
......
<!DOCTYPE html>
<html lang="zxx">
<head>
<meta charset="UTF-8">
<title>Retro Record Home</title>
<!-- Google Font -->
<link href="https://fonts.googleapis.com/css?family=Amatic+SC:400,700&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Montserrat:100,200,300,400,500,600,700,800,900&display=swap"
rel="stylesheet">
<link rel="stylesheet" href="<?php echo base_url(); ?>asset/css/stylee.css" type="text/css">
<link rel="stylesheet" href="<?php echo base_url(); ?>asset/css/bootstrap.min.css" type="text/css">
</head>
<body>
<ul class="head-info">
<li class="frontendsegment homepage-ctas"><a href="" class="card">
<h4><p style="color:#ffde26">Enjoy 10% off first order</h4></font>
<p>Join our Mailing List</p>
</a>
<a href="" class="card">
<h4><p style="color:#ffde26">We offer FREE UK RETURNS</h4></font>
<p>Click here for more info</p>
</a>
<a href="" class="card">
<h4><p style="color:#ffde26">EXCLUSIVES</h4></font>
<p>SHOP NOW</p>
</a>
</li>
</ul>
<!-- Header Info End -->
<!-- Header End -->
<div id="carousel" class="carousel slide" data-ride="carousel" data-interval="2000">
<ol class="carousel-indicators">
<li data-target="#carousel" data-slide-to="0" class="active"></li>
<li data-target="#carousel" data-slide-to="1"></li>
<li data-target="#carousel" data-slide-to="2"></li>
</ol>
<div class="carousel-inner">
<div class=" item carousel-item active">
<a href="<?php echo base_url(); ?>index.php/items/item1" >
<img class="d-block w-100" src="<?= asset_url('img/sl-1.jpg')?>" alt="First slide">
</a>
</div>
<div class="item carousel-item">
<img class="d-block w-100" src="<?= asset_url('img/sl-2.jpg')?>" alt="Second slide">
</div>
<div class="item carousel-item">
<img class="d-block w-100" src="<?= asset_url('img/sl-3.jpg')?>" alt="Third slide">
</div>
</div>
<a class="carousel-control-prev" href="#carousel" role="button" data-slide="prev">
<span class="carousel-control-prev-icon" aria-hidden="true"></span>
<span class="sr-only">Previous</span>
</a>
<a class="carousel-control-next" href="#carousel" role="button" data-slide="next">
<span class="carousel-control-next-icon" aria-hidden="true"></span>
<span class="sr-only">Next</span>
</a>
</div>
<div class="h_sec">
<h3 class="section-header"><span>RECOMMENDED PRE-ORDERS</span></h3>
</div>
<div class="shop-items">
<div class="shop-item">
<a href="<?php echo base_url(); ?>index.php/items/item1">
<img class="shop-item-image" src="https://dvfnvgxhycwzf.cloudfront.net/media/SharedImage/image550/.feUXup5W/SharedImage-96980.png?t=dc227e5bcb5adff101b3" alt="Ariana Grande: thank u, next exclusive clear/pink lp"/>
</a>
<div class="shop-item-details">
<span class="brand">Ariana Grande</span>
</div>
<div>
<span class="format double-vinyl-lp">Double Vinyl LP</span>
</div>
<div>
<span class="price">€31.00</span>
</div>
<div>
<span class="dispatch">In Stock</span>
</div>
<div class="add--to-cart">
<input type="submit" id="add-to-basket" name="add" value="Add to basket" class="submit"/>
</div>
</div>
<div class="shop-item">
<a href="">
<img class="shop-item-image" src="https://dvfnvgxhycwzf.cloudfront.net/media/SharedImage/image550/.feUXup5W/SharedImage-96980.png?t=dc227e5bcb5adff101b3" alt="Ariana Grande: thank u, next exclusive clear/pink lp"/>
</a>
<div class="shop-item-details">
<span class="brand">Ariana Grande</span>
</div>
<div>
<span class="format double-vinyl-lp">Double Vinyl LP</span>
</div>
<div>
<span class="price">€31.00</span>
</div>
<div>
<span class="dispatch">In Stock</span>
</div>
<div class="add--to-cart">
<input type="submit" id="add-to-basket" name="add" value="Add to basket" class="submit"/>
</div>
</div>
<div class="shop-item">
<a href="">
<img class="shop-item-image" src="https://dvfnvgxhycwzf.cloudfront.net/media/SharedImage/image550/.feUXup5W/SharedImage-96980.png?t=dc227e5bcb5adff101b3" alt="Ariana Grande: thank u, next exclusive clear/pink lp"/>
</a>
<div class="shop-item-details">
<span class="brand">Ariana Grande</span>
</div>
<div>
<span class="format double-vinyl-lp">Double Vinyl LP</span>
</div>
<div>
<span class="price">€31.00</span>
</div>
<div>
<span class="dispatch">In Stock</span>
</div>
<div class="add--to-cart">
<input type="submit" id="add-to-basket" name="add" value="Add to basket" class="submit"/>
</div>
</div>
<div class="shop-item">
<a href="/">
<img class="shop-item-image" src="https://dvfnvgxhycwzf.cloudfront.net/media/SharedImage/image550/.feUXup5W/SharedImage-96980.png?t=dc227e5bcb5adff101b3" alt="Ariana Grande: thank u, next exclusive clear/pink lp"/>
</a>
<div class="shop-item-details">
<span class="brand">Ariana Grande</span>
</div>
<div>
<span class="format double-vinyl-lp">Double Vinyl LP</span>
</div>
<div>
<span class="price">€31.00</span>
</div>
<div>
<span class="dispatch">In Stock</span>
</div>
<div class="add--to-cart">
<input type="submit" id="add-to-basket" name="add" value="Add to basket" class="submit"/>
</div>
</div>
<div class="shop-item">
<a href="">
<img class="shop-item-image" src="https://dvfnvgxhycwzf.cloudfront.net/media/SharedImage/image550/.feUXup5W/SharedImage-96980.png?t=dc227e5bcb5adff101b3" alt="Ariana Grande: thank u, next exclusive clear/pink lp"/>
</a>
<div class="shop-item-details">
<span class="brand">Ariana Grande</span>
</div>
<div>
<span class="format double-vinyl-lp">Double Vinyl LP</span>
</div>
<div>
<span class="price">€31.00</span>
</div>
<div>
<span class="dispatch">In Stock</span>
</div>
<div class="add--to-cart">
<input type="submit" id="add-to-basket" name="add" value="Add to basket" class="submit"/>
</div>
</div>
</div>
<div class="h_sec">
<h3 class="section-header"><span>RECOMMENDED PRE-ORDERS</span></h3>
</div>
<div class="shop-items">
<div class="shop-item">
<a href="">
<img class="shop-item-image" src="https://dvfnvgxhycwzf.cloudfront.net/media/SharedImage/image550/.feUXup5W/SharedImage-96980.png?t=dc227e5bcb5adff101b3" alt="Ariana Grande: thank u, next exclusive clear/pink lp"/>
</a>
<div class="shop-item-details">
<span class="brand">Ariana Grande</span>
</div>
<div>
<span class="format double-vinyl-lp">Double Vinyl LP</span>
</div>
<div>
<span class="price">€31.00</span>
</div>
<div>
<span class="dispatch">In Stock</span>
</div>
<div class="add--to-cart">
<input type="submit" id="add-to-basket" name="add" value="Add to basket" class="submit"/>
</div>
</div>
<div class="shop-item">
<a href="">
<img class="shop-item-image" src="https://dvfnvgxhycwzf.cloudfront.net/media/SharedImage/image550/.feUXup5W/SharedImage-96980.png?t=dc227e5bcb5adff101b3" alt="Ariana Grande: thank u, next exclusive clear/pink lp"/>
</a>
<div class="shop-item-details">
<span class="brand">Ariana Grande</span>
</div>
<div>
<span class="format double-vinyl-lp">Double Vinyl LP</span>
</div>
<div>
<span class="price">€31.00</span>
</div>
<div>
<span class="dispatch">In Stock</span>
</div>
<div class="add--to-cart">
<input type="submit" id="add-to-basket" name="add" value="Add to basket" class="submit"/>
</div>
</div>
<div class="shop-item">
<a href="">
<img class="shop-item-image" src="https://dvfnvgxhycwzf.cloudfront.net/media/SharedImage/image550/.feUXup5W/SharedImage-96980.png?t=dc227e5bcb5adff101b3" alt="Ariana Grande: thank u, next exclusive clear/pink lp"/>
</a>
<div class="shop-item-details">
<span class="brand">Ariana Grande</span>
</div>
<div>
<span class="format double-vinyl-lp">Double Vinyl LP</span>
</div>
<div>
<span class="price">€31.00</span>
</div>
<div>
<span class="dispatch">In Stock</span>
</div>
<div class="add--to-cart">
<input type="submit" id="add-to-basket" name="add" value="Add to basket" class="submit"/>
</div>
</div>
<div class="shop-item">
<a href="">
<img class="shop-item-image" src="https://dvfnvgxhycwzf.cloudfront.net/media/SharedImage/image550/.feUXup5W/SharedImage-96980.png?t=dc227e5bcb5adff101b3" alt="Ariana Grande: thank u, next exclusive clear/pink lp"/>
</a>
<div class="shop-item-details">
<span class="brand">Ariana Grande</span>
</div>
<div>
<span class="format double-vinyl-lp">Double Vinyl LP</span>
</div>
<div>
<span class="price">€31.00</span>
</div>
<div>
<span class="dispatch">In Stock</span>
</div>
<div class="add--to-cart">
<input type="submit" id="add-to-basket" name="add" value="Add to basket" class="submit"/>
</div>
</div>
<div class="shop-item">
<a href="">
<img class="shop-item-image" src="https://dvfnvgxhycwzf.cloudfront.net/media/SharedImage/image550/.feUXup5W/SharedImage-96980.png?t=dc227e5bcb5adff101b3" alt="Ariana Grande: thank u, next exclusive clear/pink lp"/>
</a>
<div class="shop-item-details">
<span class="brand">Ariana Grande</span>
</div>
<div>
<span class="format double-vinyl-lp">Double Vinyl LP</span>
</div>
<div>
<span class="price">€31.00</span>
</div>
<div>
<span class="dispatch">In Stock</span>
</div>
<div class="add--to-cart">
<input type="submit" id="add-to-basket" name="add" value="Add to basket" class="submit"/>
</div>
</div>
</div>
<script src="<?php echo base_url(); ?>asset/js/jquery-3.3.1.min.js"></script>
<script src="<?php echo base_url(); ?>asset/js/bootstrap.min.js"></script>
<script src="<?php echo base_url(); ?>asset/js/hceader-top.js"></script>
</body>
</html>
<html>
<head>
</head>
<body>
<h1>this is product page</h1>
</body>
</html>
<
<!doctype html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!-- Bootstrap CSS -->
<link href=" <?php echo base_url();?>assets/css/bootstrap.min.css" rel="stylesheet">
<link href=" <?php echo base_url();?>asset/css/register_style.css" rel="stylesheet">
<title>Registration Page</title>
</head>
<style>
.update-form {
width: 43%;
}
.alert-m {
width: 43%;
}
.update-form h3 {
font-weight: bold;
}
.password-update h3 {
font-weight: bold;
}
.password-update {
border-top: 1px solid #ccc;
}
.password-update h3 {
padding-top: 30px;
}
.password-update .button{
float: right;
}
.update-form .form-group input {
width: 70%;
font-size: 1.1em;
line-height: 1.6;
padding: .1em .2em;
border: 1px solid #ccc;
background: #fdfcfc;
}
</style>
<body>
<div class="container">
<header>
<div class="logo">
<a href="<?php echo base_url(); ?>index.php/home/products"><img src="<?= asset_url('img/logo.png')?>" alt=""></a>
</div>
</header>
<nav class="nav-bar">
<ul class="header-nav">
<li class="active"><a href="<?php echo base_url(); ?>index.php/user/user_profile">Your details</a></li>
<li><a href="#">Delivery address</a></li>
<li><a href="#">Order history</a></li>
</ul>
</nav>
<div class="back-to-shop">
<a href="<?php echo base_url(); ?>index.php/home/products"><< Back to shop</a>
<a href="<?php echo base_url(); ?>index.php/auth/logout">Log out</a>
</div>
<div class="update-form">
<h3>Personal details</h3>
<?php $message = $this->session->flashdata("message")?>
<?php echo $message; ?>
<?php echo form_open(); ?>
<?php $error =form_error("new_email", "<small class='text-danger'>", '</small>');?>
<table>
<tbody>
<tr>
<td>
<label for="email">Email address</label>
</td>
<?php $error =form_error("new_mail", "<small class='text-danger'>", '</small>');?>
<td> <input name="new_email" id="email" type="text" value="<?php echo $this->session->userdata('email'); ?>">
<?php echo $error; ?>
</td>
</tr>
<tr>
<td>
<label for="name">Name</label>
</td>
<?php $error =form_error("new_name", "<small class='text-danger'>", '</small>');?>
<td> <input name="new_name" id="surname" type="text" value="<?php echo $this->session->userdata('name'); ?>">
<?php echo $error; ?>
</td>
</tr>
<tr>
<td>
<label for="name">Surname</label>
</td>
<?php $error =form_error("new_surname", "<small class='text-danger'>", '</small>');?>
<td> <input name="new_surname" id="name" type="text" value="<?php echo $this->session->userdata('surname'); ?>">
<?php echo $error; ?>
</td>
</tr>
</tbody>
</table>
</div>
<div class="update-button">
<button class="button " type="submit" name="update">Update</button>
</div>
</form>
<div class="password-update">
<h3>Update password</h3>
<?php $pass_message = $this->session->flashdata("pass_message")?>
<div class="alert-m"> <?php echo $pass_message; ?> </div>
<?php echo form_open(); ?>
<?php $error =form_error("update_password", "<p class='text-danger'>", '</p>');?>
<table>
<tbody>
<tr>
<td>
<label for="update_password">New Password</label>
</td>
<td><input class="password-control" type="password" name="update_password"/>
<?php echo $error?>
</td>
</tr>
<?php $error =form_error("update_password2", "<p class='text-danger'>", '</p>');?>
<tr>
<td><label for="new_password2">Confirm password</label> </td>
<td> <input class="password-control" type="password" name="update_password2"/>
<?php echo $error?>
</td>
</tr>
</tbody>
</table>
<input class="button" type="submit" value="update" name="update-password"/>
</form>
</div>
</div>
<!-- Optional JavaScript -->
<!-- jQuery first, then Popper.js, then Bootstrap JS -->
<script src="https://code.jquery.com/jquery-3.4.1.slim.min.js" integrity="sha384-J6qa4849blE2+poT4WnyKhv5vZF5SrPo0iEjwBvKU7imGFAV0wwj1yYfoRSJoZ+n" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js" integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js" integrity="sha384-wfSDF2E50Y2D1uUdj0O3uMBJnjuUD4Ih7YwaYd1iqfktj0Uod8GCExl3Og8ifwB6" crossorigin="anonymous"></script>
<script src="<?php echo base_url();?>assets/js/bootstrap.min.js"></script>
</body>
</html>
This diff could not be displayed because it is too large.
body{
background-color: #f1f6f3;
font: 100%/1.4 Halvatica;
color: #444;
font-size: 1rem;
}
.container {
font-family: Halvatica;
background-color: white;
padding: 0 1.76991%;
min-height: 100vh;
width: 1000px;
border-shadow:1px 1px 1px rgba(0, 0, 0, 0.9);
}
header {
padding: 20px 10px;
}
header img{
height:100px;
}
h2 {
padding-top: 20px;
margin-bottom: .5em;
font-size: 1.8em;
font-weight: bold;
display: block;
text-transform: uppercase;
}
.form-section {
display: block;
}
.register-table {
float: left;
width: 60%;
clear: both;
padding: 0 0 1em;
margin-right: 1.5em;
border-bottom: 1px solid #ddd;
margin-bottom: 1em;
}
.message-box {
float: right;
width: 30%;
display: block;
min-width: 15em;
color: #777;
padding: .2em .8em;
background: #cfe0d8;
}
.message-box h4 {
font-size: 1.3rem;
font-weight: bold;
}
p {
padding: 0;
margin: 0;
}
table {
display: table;
border-collapse: separate;
border-spacing: 2px;
border-color: grey;
}
tbody {
display: table-row-group;
vertical-align: middle;
border-color: inherit;
}
tr {
display: table-row;
vertical-align: inherit;
border-color: inherit;
}
td {
width: 50%;
padding: .25em 0;
display: table-cell;
vertical-align: inherit;
}
label {
vertical-align: middle;
}
.register-table input, select {
width: 100%;
max-width: 25em;
font-size: 1em;
line-height: 1.6;
padding: .1em .2em;
border: 1px solid #ccc;
background: #fdfcfc;
margin: .1em 0;
color: #444;
background-clip: padding-box;
text-rendering: auto;
letter-spacing: normal;
word-spacing: normal;
text-transform: none;
text-indent: 0px;
text-shadow: none;
display: inline-block;
text-align: start;
cursor: text;
}
.delivery-details input {
width: 100%;
max-width: 25em;
font-size: 1em;
line-height: 1.6;
padding: .1em .2em;
border: 1px solid #ccc;
background: #fdfcfc;
}
.delivery-details {
padding-top: 0;
width: 60%;
}
.emaile-pref {
margin-top: 10px;
}
input[type="radio"] {
margin-right: 10px;
}
.logOut a:hover {
text-decoration: none;
color: #888888;
}
.back-to-shop a {
color: #4c7762;
font-size: 1.1rem;
}
.back-to-shop {
display: flex;
justify-content: space-between;
padding-bottom: 10px ;
}
.emaile-pref a:hover {
text-decoration: none;
color: #888888;
}
.emaile-pref a {
color: #4c7762;
}
.register-button {
margin:15px;
}
em {
color: red;
}
.button{
font-weight: 500;
font-family: inherit;
cursor: pointer;
margin-bottom: 50px;
font-family: inherit;
padding: .5em 1em;
background: #2D473A;
color: #fff;
border: 2px solid #2D473A;
letter-spacing: 1.3px;
border-radius: 0;
text-transform:uppercase;
}
.button:hover {
border: 2px solid #2D473A;
color: #2D473A;
background-color: #fff;
}
.header-nav {
margin: 30px 0px;
display: flex;
justify-content: space-between;
height: 45px;
align-items: center;
list-style-type: none;
text-align: center;
padding-left: 0;
background-color: #f1f6f3;
border: 1px solid #ccc;
cursor: pointer;
}
.header-nav li {
display: flex;
justify-content: center;
width:100%;
font-size: 1.1rem;
height: 100%;
align-items: center;
border-left: 1px solid #ccc;
}
.header-nav a {
color: #444444;
list-style-type: none;
}
.header-nav li:hover {
background: #cfe0d8;
}
.header-nav .active{
background-color: #2D473A;
}
.header-nav .active a {
color: white;
}
.header-nav .active:hover{
background-color: #2D473A;
}
.header-nav .active a:hover{
color: white;
}
/******************************************************************
Template Name: Violet
Description: Violet ecommerce Html Template
Author: Colorlib
Author URI: https://colorlib.com/
Version: 1.0
Created: Colorlib
******************************************************************/
/*------------------------------------------------------------------
[Table of contents]
1. Template default CSS
1.1 Variables
1.2 Mixins
1.3 Flexbox
1.4 Reset
2. Helper Css
3. Header Section
4. Hero Section
5. Feature Section
6. Latest Product Section
7. Lookbok Section
8. Logo Section
9. Footer
10. Other Pages Style
-------------------------------------------------------------------*/
/*----------------------------------------*/
/* Template default CSS
/*----------------------------------------*/
/*---------------------
Footer
-----------------------*/
.footer-section {
background: #262626;
}
.newslatter-form {
margin-bottom: 90px;
}
.newslatter-form form {
position: relative;
}
.newslatter-form form input {
width: 100%;
border: 2px solid #454747;
border-radius: 50px;
height: 53px;
background: transparent;
color: #535353;
font-size: 14px;
font-style: italic;
font-weight: 600;
padding-left: 30px;
position: relative;
}
.newslatter-form form button {
width: 310px;
height: 53px;
background: #B0BCC2;
border: 2px solid #B0BCC2;
color: #fff;
cursor: pointer;
text-transform: uppercase;
font-size: 14px;
font-weight: 600;
border-radius: 50px;
position: absolute;
right: 0;
}
.footer-widget .single-footer-widget {
margin-bottom: 30px;
}
.footer-widget .single-footer-widget h4 {
color: #fff;
font-size: 26px;
margin-bottom: 44px;
}
.footer-widget .single-footer-widget ul li {
color: #fff;
font-size: 14px;
font-weight: 500;
list-style: none;
line-height: 36px;
opacity: 0.5;
}
.social-links-warp {
background: #222121;
padding: 46px 0;
}
.social-links a {
margin-right: 88px;
display: inline-block;
}
.social-links a:last-child {
margin-right: 0;
}
.social-links a i {
font-size: 30px;
color: #d7d7d7;
float: left;
margin-right: 19px;
overflow: hidden;
-webkit-transition: all 0.3s;
transition: all 0.3s;
}
.social-links a span {
display: inline-block;
font-size: 12px;
font-weight: 400;
text-transform: uppercase;
color: #9f9fa0;
padding-top: 10px;
-webkit-transition: all 0.3s;
transition: all 0.3s;
}
.social-links a.instagram:hover i {
color: #2F5D84;
}
.social-links a.google-plus:hover i {
color: #E04B37;
}
.social-links a.twitter:hover i {
color: #5abed6;
}
.social-links a.pinterest:hover i {
color: #CD212D;
}
.social-links a.facebook:hover i {
color: #39599F;
}
.social-links a.twitter:hover i {
color: #5abed6;
}
.social-links a.youtube:hover i {
color: #D12227;
}
.social-links a.tumblr:hover i {
color: #37475E;
}
.social-links a:hover span {
color: #fff;
}
/*.header-section {
height: 104px;
padding-top: 38px;
padding-bottom: 24px;
padding-left: 45px;
padding-right: 45px;
position: fixed;
top: 0px;
display: flex;
}
.sticky {
position: fixed;
top: 0;
width: 100%;
}*/
header {
position: fixed;
top: 0px;
display: flex;
width: 100%;
padding: 10px 100px;
background-color: #FFFFFF;
transition: padding 300ms ease;
z-index: 10000;
border-bottom: double;
}
header.sticky {
padding: 10px 20px;
}
.inner-header .logo img {
max-width: 30%;
max-height: 40%;
display: inline-block;
position: absolute;
padding-left: 300px;
top: 0px;
bottom: 10px;
margin: 0 50px;
left: 0;
right: 0;
}
.inner-header .header-right {
float: right;
line-height: 30px;
}
.inner-header .header-right a {
display: inline-block;
position: relative;
margin-right: 20px;
}
.inner-header .header-right a img {
margin-right: 0;
margin-left: 4px;
}
.inner-header .header-right a span {
font-size: 11px;
color: #1e1e1e;
width: 18px;
height: 18px;
border: 2px solid #D0D7DB;
background: #fff;
display: inline-block;
line-height: 15px;
text-align: center;
border-radius: 50%;
font-weight: 600;
position: absolute;
left: -9px;
top: 14px;
}
.inner-header .user-access {
float: right;
margin-right: 100px;
}
.inner-header .user-access a {
color: #1e1e1e;
font-size: 16px;
display: inline-block;
font-weight: 500;
position: relative;
line-height: 42px;
}
.inner-header .user-access a.in {
color: #838383;
margin-left: 15px;
position: relative;
}
.inner-header .user-access a.out {
color: #838383;
margin-left: 15px;
position: relative;
}
.inner-header .user-access a.in::before {
position: absolute;
left: -13px;
top: 1px;
color: #1e1e1e;
content: "/";
}
.inner-header .user-access a.out::before {
position: absolute;
left: -13px;
top: 1px;
color: #1e1e1e;
content: "/";
}
.inner-header .main-menu {
float: right;
margin-right: 150px;
}
.inner-header .main-menu ul li {
display: inline-block;
margin-left: 60px;
position: relative;
}
.inner-header .main-menu ul li a {
color: #1e1e1e;
font-size: 16px;
display: inline-block;
font-weight: 500;
position: relative;
line-height: 42px;
}
.inner-header .main-menu ul li a.active:after {
opacity: 1;
}
.inner-header .main-menu ul li a:hover:after {
opacity: 1;
}
.inner-header .main-menu ul li a:after {
position: absolute;
left: 0;
bottom: 7px;
width: 100%;
height: 2px;
background: #1e1e1e;
content: "";
opacity: 0;
-webkit-transform: all 0.3s;
-webkit-transition: all 0.3s;
transition: all 0.3s;
}
.navigation{clear:both;text-align:center;display:inline-block!important;position:relative;background:0 0;color:#000;margin-top:1em;text-transform:uppercase;font-size:1.1em}
.navigation li{display:inline-block;list-style:none;margin:0;padding:0;}
.navigation li a{display:block;margin:0; max-width:auto;padding:.5em 1em;list-style:none;color:inherit;font-weight:inherit;cursor:pointer}
.navigation li a:hover{color:#666}
.header-info li{
color: black;
}
.homepage-ctas{padding:1em 0 .5em;position:relative; margin-top: 195px;}
.homepage-ctas .card{transition:opacity .3s;vertical-align:top;text-align:center;position:relative;display:inline-block;width:33%; background: black;padding:.5em 0}
.homepage-ctas .card:hover{opacity: .6}
.homepage-ctas .card::after{content:"";height:1.5em;width:2px;position:absolute;top:50%;margin-top:-.75em;bottom:0;right:0;background:#ffffff}
.homepage-ctas .card:last-child::after{display:none}
.homepage-ctas h4{text-transform:uppercase;font-size:1.25em;margin:0; }
.homepage-ctas p{position:relative;margin:0; color:#ffffff;line-height:1.25}
.homepage-ctas::after,.homepage-ctas::before{content:"";height:100%;width:100vw;position:absolute;left:50%;right:50%;top:0;margin-left:-50vw;margin-right:-50vw}
.homepage-ctas::before{background:#0e0e0e}.homepage-ctas::after{height:1px;top:auto;bottom:0;background:#000000}
.header-info {
margin-top: 195px;
background: black;
overflow: hidden;
padding: 30px 45px;
}
.header-info .header-item {
overflow: hidden;
}
.header-info .header-item img {
display: inline-block;
margin-right: 13px;
}
.header-info .header-item p {
display: inline-block;
line-height: 1;
font-size: 20px;
color: yellow;
font-weight: 500;
margin-bottom: 0;
position: relative;
top: 3px;
}
.carousel {
margin: 10px auto;
padding: 10px 300px;
background: #FFFFFF;
}
.carousel .item {
min-height: 330px;
text-align: center;
overflow: hidden;
}
.carousel .carousel-control-prev {
height: 60px;
width: 20px;
background: #b2b9bf;
margin: 135px 300px;
}
.carousel .carousel-control-next {
height: 60px;
width: 20px;
background: #b2b9bf;
margin: 135px 300px;
}
.content {
margin-left: 20px;
}
.h_sec{
padding: 10px 300px;
position: relative;
}
.section-header
{
margin: 0;
font-weight: normal;
position: relative;
text-align: center;
font-size: 35px;
line-height: 30px;
background: #e9e9f2;
border: 5px solid #fff;
padding: 5px 15px;
color: black;
font-family: 'Muli', sans-serif;
}
.section-header span {
padding: 10px 15px;
background-color: white;
}
.shop-item-image {
height: 250px;
border:1px solid #cecece;
margin:0 3% 0 0;
border-bottom:6px solid #999;
-webkit-transition:.5s .1s ease;
-moz-transition:.5s .1s ease;
transition:.5s .1s ease;
margin-top: 20px;
}
.shop-item-image:hover{border-bottom:6px solid #000; }
.brand {
display: block;
text-align: center;
font-weight: 700;
font-size: 1.1em;
color: #333333;
text-transform:uppercase;
letter-spacing:.5px;
line-height:1.2em;
margin-top:.5em;
}
.format {
display: block;
font-style:italic;
margin:0;
text-align: center;
}
.price {
display: block;
margin:0;
text-align: center;
}
.dispatch {
display: block;
margin:0;
text-align: center;
}
.add--to-cart {
display: block;
margin:0;
text-align: center;
}
.submit {
text-shadow:none;
border:0;
border-radius:.2em;
background:#ffde26;
color:#000000;
width:10em;}
.submit:hover{background:#c9af1e}
.shop-items {
padding: 10px 300px;
display: flex;
flex-wrap: wrap;
justify-content: space-around;
}
.footer-section {
background: #262626;
padding-bottom: 0;
}
.newslatter-form {
margin-bottom: 90px;
}
.newslatter-form form {
position: relative;
}
.newslatter-form form input {
width: 100%;
border: 2px solid #454747;
border-radius: 50px;
height: 53px;
background: transparent;
color: #535353;
font-size: 14px;
font-style: italic;
font-weight: 600;
padding-left: 30px;
position: relative;
}
.newslatter-form form button {
width: 310px;
height: 53px;
background: #B0BCC2;
border: 2px solid #B0BCC2;
color: #fff;
cursor: pointer;
text-transform: uppercase;
font-size: 14px;
font-weight: 600;
border-radius: 50px;
position: absolute;
right: 0;
}
.footer-widget {
margin-bottom: 40px;
}
.footer-widget .single-footer-widget {
margin-bottom: 30px;
}
.footer-widget .single-footer-widget h4 {
color: #fff;
font-size: 26px;
margin-bottom: 44px;
}
.footer-widget .single-footer-widget ul li {
color: #fff;
font-size: 14px;
font-weight: 500;
list-style: none;
line-height: 36px;
opacity: 0.5;
}
.social-links-warp {
background: #222121;
padding: 46px 0;
}
.social-links a {
margin-right: 88px;
display: inline-block;
}
.social-links a:last-child {
margin-right: 0;
}
.social-links a i {
font-size: 30px;
color: #d7d7d7;
float: left;
margin-right: 19px;
overflow: hidden;
-webkit-transition: all 0.3s;
transition: all 0.3s;
}
.social-links a span {
display: inline-block;
font-size: 12px;
font-weight: 400;
text-transform: uppercase;
color: #9f9fa0;
padding-top: 10px;
-webkit-transition: all 0.3s;
transition: all 0.3s;
}
.social-links a.instagram:hover i {
color: #2F5D84;
}
.social-links a.google-plus:hover i {
color: #E04B37;
}
.social-links a.twitter:hover i {
color: #5abed6;
}
.social-links a.pinterest:hover i {
color: #CD212D;
}
.social-links a.facebook:hover i {
color: #39599F;
}
.social-links a.twitter:hover i {
color: #5abed6;
}
.social-links a.youtube:hover i {
color: #D12227;
}
.social-links a.tumblr:hover i {
color: #37475E;
}
.social-links a:hover span {
color: #fff;
}
/*---------------------------- Other Pages Styles ----------------------------*/
/*---------------------
Page Add
-----------------------*/
.page-add {
padding-top: 31px;
margin-bottom: 92px;
}
.page-add .page-breadcrumb {
padding-top: 34px;
}
.page-add .page-breadcrumb h2 {
color: #1e1e1e;
font-size: 48px;
font-weight: 600;
}
.page-add .page-breadcrumb h2 span {
color: #B0BCC2;
}
.page-add .page-breadcrumb a {
color: #838383;
display: inline-block;
font-size: 12px;
font-weight: 600;
margin-right: 6px;
position: relative;
}
.page-add .page-breadcrumb a.active {
color: #1e1e1e;
}
.page-add .page-breadcrumb a:last-child:after {
display: none;
}
.page-add .page-breadcrumb a:after {
position: absolute;
top: 1px;
right: -5px;
content: "/";
}
body{
background-color: #f1f6f3;
font: 100%/1.4 Halvatica;
color: #444;
font-size: 1rem;
}
.container {
font-family: Halvatica;
background-color: white;
padding: 0 1.76991%;
height: 100vh;
width: 1000px;
border-shadow:1px 1px 1px rgba(0, 0, 0, 0.9);
}
header {
padding: 20px 10px;
}
header img{
height:100px;
}
.register-section h2 {
padding-top: 20px;
margin-bottom: .5em;
font-size: 1.8em;
font-weight: bold;
display: block;
text-transform: uppercase;
}
.header-nav {
margin: 30px 0px;
display: flex;
justify-content: space-between;
height: 45px;
align-items: center;
list-style-type: none;
text-align: center;
padding-left: 0;
background-color: #f1f6f3;
border: 1px solid #ccc;
cursor: pointer;
}
.header-nav li {
display: flex;
justify-content: center;
width:100%;
font-size: 1.1rem;
height: 100%;
align-items: center;
border-left: 1px solid #ccc;
}
.header-nav a {
color: #444444;
list-style-type: none;
}
.header-nav li:hover {
background: #cfe0d8;
}
.header-nav .active{
background-color: #2D473A;
}
.header-nav .active a {
color: white;
}
.header-nav .active:hover{
background-color: #2D473A;
}
.header-nav .active a:hover{
color: white;
}
.auth-section {
padding: 60px 0px;
display: flex;
flex-direction: row;
}
.signup, .reg{
width: 50%;
height: 300px;
display: flex;
flex-direction: column;
padding: 25px 60px;
}
h3 {
font-weight: 600;
margin-bottom: 25px;
}
.reg {
align-items: center;
}
.signup {
border-right: 1px solid #cccccc;
}
.form-group {
display: flex;
flex-direction: column;
}
input {
width: 100%;
padding: .1em .2em;
border: 1px solid #ccc;
background: #fdfcfc;
margin: 0;
color: #444;
font-size: 1em;
line-height: 1.8;
border-radius: 2px;
margin-bottom: 0;
}
label {
margin:0;
}
.btn{
font-weight: 500;
font-family: inherit;
cursor: pointer;
width: 90px;
font-family: inherit;
padding: .5em 1em;
background: #2D473A;
color: #fff;
border: 2px solid #2D473A;
letter-spacing: 1.3px;
border-radius: 0;
}
.btn:hover {
border: 2px solid #2D473A;
color: #000;
background-color: #fff;
}
.signup btn {
display: inline-block;;
}
.forgot {
display: inline-block;
float: right;
color: #999999;
font-family: inherit;
}
.forgot:hover{
color: #999999;
}
.input-error {
padding: 0;
margin-top: 0;
font-size: 0.9rem;
font-family: inherit;
}
.email-section {
display: block;
width: 50%;
padding: 30px 20px;
}
.email-section .form-group {
display: flex;
flex-direction: column;
padding: 10px;
}
.email-section h3 {
padding-top: 20px;
margin-bottom: .5em;
font-size: 1.8em;
font-weight: bold;
display: block;
}
.email-control {
width: 100%;
padding: .1em .2em;
border: 1px solid #ccc;
background: #fdfcfc;
margin: 0;
color: #444;
font-size: 1em;
line-height: 1.8;
border-radius: 2px;
margin-bottom: 0;
}
.password-control {
width: 100%;
padding: 0;
border: 1px solid #ccc;
background: #fdfcfc;
margin: 0;
color: #444;
font-size: 1em;
line-height: 1.8;
border-radius: 2px;
margin-bottom: 0;
}
.password-section {
display: block;
width: 50%;
padding: 30px 20px;
}
.password-section .form-group {
display: flex;
flex-direction: column;
padding: 0px;
}
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
This diff could not be displayed because it is too large.
No preview for this file type
No preview for this file type
No preview for this file type
;(function(){function t(){}function e(t){return null==t?t===l?d:y:I&&I in Object(t)?n(t):r(t)}function n(t){var e=$.call(t,I),n=t[I];try{t[I]=l;var r=true}catch(t){}var o=_.call(t);return r&&(e?t[I]=n:delete t[I]),o}function r(t){return _.call(t)}function o(t,e,n){function r(e){var n=d,r=g;return d=g=l,x=e,v=t.apply(r,n)}function o(t){return x=t,O=setTimeout(c,e),T?r(t):v}function i(t){var n=t-h,r=t-x,o=e-n;return w?k(o,j-r):o}function f(t){var n=t-h,r=t-x;return h===l||n>=e||n<0||w&&r>=j}function c(){
var t=D();return f(t)?p(t):(O=setTimeout(c,i(t)),l)}function p(t){return O=l,S&&d?r(t):(d=g=l,v)}function s(){O!==l&&clearTimeout(O),x=0,d=h=g=O=l}function y(){return O===l?v:p(D())}function m(){var t=D(),n=f(t);if(d=arguments,g=this,h=t,n){if(O===l)return o(h);if(w)return O=setTimeout(c,e),r(h)}return O===l&&(O=setTimeout(c,e)),v}var d,g,j,v,O,h,x=0,T=false,w=false,S=true;if(typeof t!="function")throw new TypeError(b);return e=a(e)||0,u(n)&&(T=!!n.leading,w="maxWait"in n,j=w?M(a(n.maxWait)||0,e):j,S="trailing"in n?!!n.trailing:S),
m.cancel=s,m.flush=y,m}function i(t,e,n){var r=true,i=true;if(typeof t!="function")throw new TypeError(b);return u(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),o(t,e,{leading:r,maxWait:e,trailing:i})}function u(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function f(t){return null!=t&&typeof t=="object"}function c(t){return typeof t=="symbol"||f(t)&&e(t)==m}function a(t){if(typeof t=="number")return t;if(c(t))return s;if(u(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;
t=u(e)?e+"":e}if(typeof t!="string")return 0===t?t:+t;t=t.replace(g,"");var n=v.test(t);return n||O.test(t)?h(t.slice(2),n?2:8):j.test(t)?s:+t}var l,p="4.17.5",b="Expected a function",s=NaN,y="[object Null]",m="[object Symbol]",d="[object Undefined]",g=/^\s+|\s+$/g,j=/^[-+]0x[0-9a-f]+$/i,v=/^0b[01]+$/i,O=/^0o[0-7]+$/i,h=parseInt,x=typeof global=="object"&&global&&global.Object===Object&&global,T=typeof self=="object"&&self&&self.Object===Object&&self,w=x||T||Function("return this")(),S=typeof exports=="object"&&exports&&!exports.nodeType&&exports,N=S&&typeof module=="object"&&module&&!module.nodeType&&module,E=Object.prototype,$=E.hasOwnProperty,_=E.toString,W=w.Symbol,I=W?W.toStringTag:l,M=Math.max,k=Math.min,D=function(){
return w.Date.now()};t.debounce=o,t.throttle=i,t.isObject=u,t.isObjectLike=f,t.isSymbol=c,t.now=D,t.toNumber=a,t.VERSION=p,typeof define=="function"&&typeof define.amd=="object"&&define.amd?(w._=t, define(function(){return t})):N?((N.exports=t)._=t,S._=t):w._=t}).call(this);
// This function will run a throttled script every 300 ms
var checkHeader = _.throttle(() => {
console.log('checkHeader');
// Detect scroll position
let scrollPosition = Math.round(window.scrollY);
// If we've scrolled 100px, add "sticky" class to the header
if (scrollPosition > 50){
document.querySelector('header').classList.add('sticky');
}
// If not, remove "sticky" class from header
else {
document.querySelector('header').classList.remove('sticky');
}
}, 0);
// Run the checkHeader function every time you scroll
window.addEventListener('scroll', checkHeader);
!function(e){e.fn.niceSelect=function(t){function s(t){t.after(e("<div></div>").addClass("nice-select").addClass(t.attr("class")||"").addClass(t.attr("disabled")?"disabled":"").attr("tabindex",t.attr("disabled")?null:"0").html('<span class="current"></span><ul class="list"></ul>'));var s=t.next(),n=t.find("option"),i=t.find("option:selected");s.find(".current").html(i.data("display")||i.text()),n.each(function(t){var n=e(this),i=n.data("display");s.find("ul").append(e("<li></li>").attr("data-value",n.val()).attr("data-display",i||null).addClass("option"+(n.is(":selected")?" selected":"")+(n.is(":disabled")?" disabled":"")).html(n.text()))})}if("string"==typeof t)return"update"==t?this.each(function(){var t=e(this),n=e(this).next(".nice-select"),i=n.hasClass("open");n.length&&(n.remove(),s(t),i&&t.next().trigger("click"))}):"destroy"==t?(this.each(function(){var t=e(this),s=e(this).next(".nice-select");s.length&&(s.remove(),t.css("display",""))}),0==e(".nice-select").length&&e(document).off(".nice_select")):console.log('Method "'+t+'" does not exist.'),this;this.hide(),this.each(function(){var t=e(this);t.next().hasClass("nice-select")||s(t)}),e(document).off(".nice_select"),e(document).on("click.nice_select",".nice-select",function(t){var s=e(this);e(".nice-select").not(s).removeClass("open"),s.toggleClass("open"),s.hasClass("open")?(s.find(".option"),s.find(".focus").removeClass("focus"),s.find(".selected").addClass("focus")):s.focus()}),e(document).on("click.nice_select",function(t){0===e(t.target).closest(".nice-select").length&&e(".nice-select").removeClass("open").find(".option")}),e(document).on("click.nice_select",".nice-select .option:not(.disabled)",function(t){var s=e(this),n=s.closest(".nice-select");n.find(".selected").removeClass("selected"),s.addClass("selected");var i=s.data("display")||s.text();n.find(".current").text(i),n.prev("select").val(s.data("value")).trigger("change")}),e(document).on("keydown.nice_select",".nice-select",function(t){var s=e(this),n=e(s.find(".focus")||s.find(".list .option.selected"));if(32==t.keyCode||13==t.keyCode)return s.hasClass("open")?n.trigger("click"):s.trigger("click"),!1;if(40==t.keyCode){if(s.hasClass("open")){var i=n.nextAll(".option:not(.disabled)").first();i.length>0&&(s.find(".focus").removeClass("focus"),i.addClass("focus"))}else s.trigger("click");return!1}if(38==t.keyCode){if(s.hasClass("open")){var l=n.prevAll(".option:not(.disabled)").first();l.length>0&&(s.find(".focus").removeClass("focus"),l.addClass("focus"))}else s.trigger("click");return!1}if(27==t.keyCode)s.hasClass("open")&&s.trigger("click");else if(9==t.keyCode&&s.hasClass("open"))return!1});var n=document.createElement("a").style;return n.cssText="pointer-events:auto","auto"!==n.pointerEvents&&e("html").addClass("no-csspointerevents"),this}}(jQuery);
......@@ -2,7 +2,7 @@ INSERT INTO 'users'(u_id, email, password, name, surname, country, city, street,
INSERT INTO 'users'(u_id, email, password, name, surname, country, city, street, zip, building) VALUES (2, 'email2@gmail.com', 'pass2', 'name2', 'surname2', 'country2', 'city2', 'street2', 'zip2', 'building2');
INSERT INTO 'users'(u_id, email, password, name, surname, country, city, street, zip, building) VALUES (3, 'email3@gmail.com', 'pass3', 'name3', 'surname3', 'country3', 'city3', 'street3', 'zip3', 'building3');
INSERT INTO 'users'(u_id, email, password, name, surname, country, city, street, zip, building) VALUES (4, 'email4@gmail.com', 'pass4', 'name4', 'surname4', 'country4', 'city4', 'street4', 'zip4', 'building4');
INSERT INTO `user_role` (`id`, `role`) VALUES (NULL, 'administrator'), (NULL, 'member');
INSERT INTO 'product'(id, artist, title, genre, description, price, q_ty) VALUES (1, 'artist', 'title', 'genre', 'description', 100, 5);
INSERT INTO 'product'(id, artist, title, genre, description, price, q_ty) VALUES (2, 'artist2', 'title2', 'genre2', 'description2', 100, 5);
......@@ -36,4 +36,4 @@ INSERT INTO 'transaction'(id, id_user, id_status) VALUES (4, 1, 1);
INSERT INTO 'trans_products'(id_trans, id_prod, num_of_pr, price) VALUES (1, 1, 5, 120);
INSERT INTO 'trans_products'(id_trans, id_prod, num_of_pr, price) VALUES (2, 1, 5, 120);
INSERT INTO 'trans_products'(id_trans, id_prod, num_of_pr, price) VALUES (3, 1, 5, 120);
INSERT INTO 'trans_products'(id_trans, id_prod, num_of_pr, price) VALUES (4, 1, 5, 120);
\ No newline at end of file
INSERT INTO 'trans_products'(id_trans, id_prod, num_of_pr, price) VALUES (4, 1, 5, 120);
......@@ -41,10 +41,30 @@ CREATE TABLE IF NOT EXISTS `mydb`.`users` (
`street` VARCHAR(45) NULL,
`zip` VARCHAR(45) NULL,
`building` VARCHAR(45) NULL,
`is_active` INT(1),
`role_id` int (1);
PRIMARY KEY (`u_id`),
F
UNIQUE INDEX `username_UNIQUE` (`email` ASC) )
ENGINE = InnoDB;
CREATE TABLE IF NOT EXISTS `mydb`.`user_role` (
`id` INT NULL AUTO_INCREMENT,
`role` VARCHAR(45) NULL,
PRIMARY KEY (`id`)
)
ENGINE = InnoDB;
CREATE TABLE `mydb`.`user_token`
( `id` INT NOT NULL AUTO_INCREMENT ,
`email` VARCHAR(45) NOT NULL ,
`token` VARCHAR(128) NOT NULL ,
`date_created` INT NOT NULL ,
PRIMARY KEY (`id`))
ENGINE = InnoDB;
alter TABLE users add FOREIGN KEY (role_id) REFERENCES user_role(id);
alter TABLE user_token add FOREIGN KEY (email) REFERENCES users(email);
-- -----------------------------------------------------
-- Table `mydb`.`product`
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment