Skip to content

Commit e2fb66a

Browse files
committed
Added offline css
1 parent 204fd96 commit e2fb66a

5 files changed

Lines changed: 68 additions & 12 deletions

File tree

app/Controllers/Auth/AuthController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ class AuthController extends Controller{
1212
*
1313
*
1414
*/
15-
public function getSignout(){
15+
public function getSignout($request, $response){
1616

1717
$this->auth->logout();
1818
$this->flash->addMessage('success', 'Logout successful'); //You can also use error, info, warning

config/DatabaseConfig.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
'host'=> 'localhost',
1616
'database' => 'raw-php',
1717
'username' => 'root',
18-
'password' => '',
18+
'password' => 'basket',
1919
'charset' => 'utf8',
2020
'collation' => 'utf8_unicode_ci',
2121
'prefix' => '',
@@ -25,7 +25,7 @@
2525
'driver' => 'Cake\Database\Driver\Mysql',
2626
'database' => 'raw-php',
2727
'username' => 'root',
28-
'password' => '',
28+
'password' => 'basket',
2929
'cacheMetadata' => false // If set to `true` you need to install the optional "cakephp/cache" package.
3030

3131
]

public/css/bootstrap.min.css

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

rawphp-database.sql

Lines changed: 56 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
-- http://www.phpmyadmin.net
44
--
55
-- Host: 127.0.0.1
6-
-- Generation Time: Jul 13, 2017 at 03:57 PM
6+
-- Generation Time: Jul 22, 2017 at 08:37 PM
77
-- Server version: 5.7.9-log
88
-- PHP Version: 7.0.0
99

@@ -22,32 +22,81 @@ SET time_zone = "+00:00";
2222

2323
-- --------------------------------------------------------
2424

25+
--
26+
-- Table structure for table `posts`
27+
--
28+
29+
DROP TABLE IF EXISTS `posts`;
30+
CREATE TABLE IF NOT EXISTS `posts` (
31+
`id` int(11) NOT NULL AUTO_INCREMENT,
32+
`title` varchar(255) NOT NULL,
33+
`body` text NOT NULL,
34+
`user_id` int(11) NOT NULL,
35+
`created_at` datetime NOT NULL,
36+
`updated_at` datetime NOT NULL,
37+
PRIMARY KEY (`id`)
38+
) ENGINE=MyISAM AUTO_INCREMENT=3 DEFAULT CHARSET=latin1;
39+
40+
--
41+
-- Dumping data for table `posts`
42+
--
43+
44+
INSERT INTO `posts` (`id`, `title`, `body`, `user_id`, `created_at`, `updated_at`) VALUES
45+
(1, 'Forever young by Jayz and Hudson.', ' This is the content of the post of forever young by Jayz and Hudson. This is the content of the post of forever young by Jayz and Hudson. This is the content of the post of forever young by Jayz and Hudson. This is the content of the post of forever young by Jayz and Hudson. This is the content of the post of forever young by Jayz and Hudson.', 7, '2017-07-21 13:44:49', '2017-07-21 13:44:49'),
46+
(2, 'Mysterious Ways - Song by Punjah Kort', ' This is the description of the song by Punjah Kort, it is soul relieving and self satisfying.', 7, '2017-07-21 17:32:22', '2017-07-21 17:32:22');
47+
48+
-- --------------------------------------------------------
49+
50+
--
51+
-- Table structure for table `roles`
52+
--
53+
54+
DROP TABLE IF EXISTS `roles`;
55+
CREATE TABLE IF NOT EXISTS `roles` (
56+
`id` int(11) NOT NULL AUTO_INCREMENT,
57+
`name` varchar(150) NOT NULL,
58+
`description` text,
59+
PRIMARY KEY (`id`)
60+
) ENGINE=MyISAM AUTO_INCREMENT=4 DEFAULT CHARSET=latin1;
61+
62+
--
63+
-- Dumping data for table `roles`
64+
--
65+
66+
INSERT INTO `roles` (`id`, `name`, `description`) VALUES
67+
(1, 'Super Admin', 'This is the super admin, has all rights!'),
68+
(2, 'Moderator', 'Fewer permissions than admin'),
69+
(3, 'User', 'Common user');
70+
71+
-- --------------------------------------------------------
72+
2573
--
2674
-- Table structure for table `users`
2775
--
2876

2977
DROP TABLE IF EXISTS `users`;
3078
CREATE TABLE IF NOT EXISTS `users` (
3179
`id` int(11) NOT NULL AUTO_INCREMENT,
80+
`role_id` int(11) DEFAULT '3',
3281
`first_name` varchar(255) DEFAULT NULL,
3382
`last_name` varchar(255) DEFAULT NULL,
3483
`email` varchar(255) NOT NULL,
3584
`password` varchar(255) NOT NULL,
85+
`gender` varchar(255) DEFAULT NULL,
86+
`phone` varchar(255) DEFAULT NULL,
3687
`created_at` timestamp NULL DEFAULT NULL,
3788
`updated_at` timestamp NULL DEFAULT NULL,
3889
PRIMARY KEY (`id`),
3990
UNIQUE KEY `email` (`email`)
40-
) ENGINE=MyISAM AUTO_INCREMENT=5 DEFAULT CHARSET=latin1;
91+
) ENGINE=MyISAM AUTO_INCREMENT=8 DEFAULT CHARSET=latin1;
4192

4293
--
4394
-- Dumping data for table `users`
4495
--
4596

46-
INSERT INTO `users` (`id`, `first_name`, `last_name`, `email`, `password`, `created_at`, `updated_at`) VALUES
47-
(1, 'John', 'Doe', 'john@doe.com', 'johndoe', NULL, NULL),
48-
(2, 'Dave', 'Partner', 'dave@gmail.com', '$2y$10$w4RlqCfGIGa4wYRHISDSK.6FvpSK4/VYhheo9s614RxJNOSX8Bv0i', '2017-06-29 06:39:52', '2017-06-29 06:39:52'),
49-
(3, 'Dave P', 'John', 'davep@gmail.com', '$2y$10$Ph5X2xWD8TBAhUFbcAVwe.wkEH42RaUB7ievzWa1Q/fc.znLwNfwO', '2017-06-29 12:46:07', '2017-06-29 12:46:07'),
50-
(4, 'Doe', 'John', 'doeJohn@gmail.com', '$2y$10$e5W4qMJNOYYqiWxDArTuWO9yk6Q/sZNN2BfW7HELavGk2BkjQ6lI6', '2017-06-30 14:14:12', '2017-06-30 14:14:12');
97+
INSERT INTO `users` (`id`, `role_id`, `first_name`, `last_name`, `email`, `password`, `gender`, `phone`, `created_at`, `updated_at`) VALUES
98+
(1, 3, 'John', 'Doeadmin', 'defaultadmin@gmail.com', '$2y$10$/idREEAxZSQpGaAV4ugXSO5mDyyyThE/LZnpWeUovbo8nbZaBEMRq', 'male', NULL, '2017-06-29 06:39:52', NULL),
99+
(2, 3, 'Jenny', 'Doeuser', 'defaultuser@gmail.com', '$2y$10$/idREEAxZSQpGaAV4ugXSO5mDyyyThE/LZnpWeUovbo8nbZaBEMRq', 'female', '0802222', '2017-06-29 06:39:52', '2017-06-29 06:39:52');
51100

52101
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
53102
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;

resources/views/templates/app.twig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
<meta charset="UTF-8">
55
<title>RawPHP</title>
66

7-
<!-- Latest compiled and minified CSS -->
8-
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
7+
<!-- Latest compiled and minified CSS -->
8+
<link href="{{ base_url()}}/css/bootstrap.min.css" rel="stylesheet">
99

1010
<!-- Loading Flat UI -->
1111
<link href="{{ base_url()}}/css/flat-ui.min.css" rel="stylesheet">

0 commit comments

Comments
 (0)