SHOW:
|
|
- or go back to the newest paste.
1 | - | <?php |
1 | + | <!DOCTYPE html> |
2 | - | class Login extends CI_Controller |
2 | + | <html lang="en"> |
3 | - | { |
3 | + | <head> |
4 | - | public function __contruct() |
4 | + | <meta charset="UTF-8" /> |
5 | - | { |
5 | + | <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" /> |
6 | - | parent::__construct(); |
6 | + | <title><?php echo $title; ?></title> |
7 | - | // $this->load->model(""); |
7 | + | <meta name="description" content="Philbert is a Dashboard & Admin Site Responsive Template by hencework." /> |
8 | - | } |
8 | + | <meta name="keywords" content="admin, admin dashboard, admin template, cms, crm, Philbert Admin, Philbertadmin, premium admin templates, responsive admin, sass, panel, software, ui, visualization, web app, application" /> |
9 | - | |
9 | + | <meta name="author" content="hencework"/> |
10 | - | public function index() |
10 | + | |
11 | - | { |
11 | + | <!-- Favicon --> |
12 | - | $data["title"] = "SalmaMarket | Login"; |
12 | + | <link rel="shortcut icon" href="favicon.ico"> |
13 | - | $data['error_message']=$this->session->userdata("error_message"); |
13 | + | <link rel="icon" href="favicon.ico" type="image/x-icon"> |
14 | - | $this->session->set_userdata("error_message",FALSE); |
14 | + | |
15 | - | $this->load->view("login_v", $data); |
15 | + | <link href="<?php echo base_url('assets/vendors/bower_components/jquery-toast-plugin/dist/jquery.toast.min.css'); ?>" rel="stylesheet" type="text/css"> |
16 | - | } |
16 | + | |
17 | <!-- Custom CSS --> | |
18 | - | public function proses() |
18 | + | <link href="<?php echo base_url('assets/dist/css/style.css'); ?>" rel="stylesheet" type="text/css"> |
19 | - | { |
19 | + | </head> |
20 | - | $this->load->model("login_m"); |
20 | + | <body> |
21 | - | $email = $this->input->post("email"); |
21 | + | <!-- start body --> |
22 | - | $password = $this->input->post("password"); |
22 | + | |
23 | <div class="preloader-it"> | |
24 | - | $result = $this->login_m->api_process($email, $password); |
24 | + | <!-- start preloader-it --> |
25 | - | if($result["login"]){ |
25 | + | |
26 | - | $this->session->set_userdata("u_email", $result["user"]["email"]); |
26 | + | <div class="la-anim-1"></div> |
27 | - | |
27 | + | |
28 | - | // echo 'berhasil login'; |
28 | + | <!-- end preloader-it --> |
29 | - | redirect('admin/beranda'); |
29 | + | </div> |
30 | - | // return TRUE; |
30 | + | |
31 | - | // print_r($a); |
31 | + | <div class="wrapper pa-0"> |
32 | - | } |
32 | + | <!-- start wrapper pa-0 --> |
33 | - | else{ |
33 | + | |
34 | - | $this->session->set_userdata("error_message", $result["message"]); |
34 | + | <?php $this->load->view("komponen/header_login"); ?> |
35 | - | redirect('login/index'); |
35 | + | |
36 | <!-- Main Content --> | |
37 | - | echo 'gagal <pre>'.$result['message']; |
37 | + | <div class="page-wrapper pa-0 ma-0 auth-page"> |
38 | - | } |
38 | + | <!-- start page-wrapper --> |
39 | ||
40 | - | } |
40 | + | <div class="container-fluid"> |
41 | - | } |
41 | + | <!-- start container-fluid --> |
42 | ||
43 | <div class="table-struct full-width full-height"> | |
44 | <!-- start table-struct --> | |
45 | ||
46 | <div class="table-cell vertical-align-middle auth-form-wrap"> | |
47 | <!-- start table-cell --> | |
48 | ||
49 | <div class="auth-form ml-auto mr-auto no-float"> | |
50 | <!-- start auth-form --> | |
51 | ||
52 | <div class="row"> | |
53 | <!-- start row --> | |
54 | ||
55 | <div class="col-sm-12 col-xs-12"> | |
56 | <!-- start col --> | |
57 | ||
58 | <div class="mb-30"> | |
59 | <!-- start div --> | |
60 | ||
61 | <h3 class="text-center txt-dark mb-10">Login SalmaMarket</h3> | |
62 | <!-- <h6 class="text-center nonecase-font txt-grey">Enter your details below</h6> --> | |
63 | ||
64 | <!-- end div --> | |
65 | </div> | |
66 | <div class="form-wrap"> | |
67 | <!-- start form-wrap --> | |
68 | <?php | |
69 | if($error_message){ | |
70 | echo '<h3>'.$error_message.'</h3>'; | |
71 | ||
72 | } | |
73 | ?> | |
74 | <form action="<?php echo site_url('login/proses'); ?>" method="POST"> | |
75 | <div class="form-group"> | |
76 | <label class="control-label mb-10" for="exampleInputEmail_2">Username</label> | |
77 | <input type="text" name="email" class="form-control" required="" id="exampleInputEmail_2" placeholder="Enter Username" /> | |
78 | </div> | |
79 | <div class="form-group"> | |
80 | <label class="pull-left control-label mb-10" for="exampleInputpwd_2">Password</label> | |
81 | <a class="capitalize-font txt-primary block mb-10 pull-right font-12" href="forgot-password.html">forgot password ?</a> | |
82 | <div class="clearfix"></div> | |
83 | <input type="password" name="password" class="form-control" required="" id="exampleInputpwd_2" placeholder="Enter Password" /> | |
84 | </div> | |
85 | <!-- <div class="form-group"> | |
86 | <div class="checkbox checkbox-primary pr-10 pull-left"> | |
87 | <input id="checkbox_2" required="" type="checkbox"> | |
88 | <label for="checkbox_2"> Keep me logged in</label> | |
89 | </div> | |
90 | <div class="clearfix"></div> | |
91 | </div> --> | |
92 | <div class="form-group text-center"> | |
93 | <button type="submit" class="btn btn-info btn-success btn-block">sign in</button> | |
94 | </div> | |
95 | </form> | |
96 | ||
97 | <!-- end form-wrap --> | |
98 | </div> | |
99 | ||
100 | <!-- end col --> | |
101 | </div> | |
102 | ||
103 | <!-- end row --> | |
104 | </div> | |
105 | ||
106 | <!-- end auth-form --> | |
107 | </div> | |
108 | ||
109 | <!-- end table-cell --> | |
110 | </div> | |
111 | ||
112 | <!-- end table-struct --> | |
113 | </div> | |
114 | ||
115 | <!-- end container-fluid --> | |
116 | </div> | |
117 | ||
118 | <!-- end page-wrapper --> | |
119 | </div> | |
120 | ||
121 | <!-- end wrapper pa-0 --> | |
122 | </div> | |
123 | ||
124 | <?php $this->load->view("komponen/footer.php"); ?> | |
125 | ||
126 | <!-- end body --> | |
127 | </body> | |
128 | </html> |