Skip to content

Commit cf113df

Browse files
committed
SQL Added
1 parent af278fb commit cf113df

3 files changed

Lines changed: 105 additions & 3 deletions

File tree

HMVC-example.sql

Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
-- phpMyAdmin SQL Dump
2+
-- version 3.5.1
3+
-- http://www.phpmyadmin.net
4+
--
5+
-- Host: localhost
6+
-- Generation Time: Jan 09, 2014 at 07:45 PM
7+
-- Server version: 5.5.25
8+
-- PHP Version: 5.4.4
9+
10+
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
11+
SET time_zone = "+00:00";
12+
13+
14+
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
15+
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
16+
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
17+
/*!40101 SET NAMES utf8 */;
18+
19+
--
20+
-- Database: `HMVC-example`
21+
--
22+
23+
-- --------------------------------------------------------
24+
25+
--
26+
-- Table structure for table `roles`
27+
--
28+
29+
CREATE TABLE `roles` (
30+
`id` int(11) NOT NULL AUTO_INCREMENT,
31+
`name` varchar(45) DEFAULT NULL,
32+
PRIMARY KEY (`id`)
33+
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=3 ;
34+
35+
--
36+
-- Dumping data for table `roles`
37+
--
38+
39+
INSERT INTO `roles` (`id`, `name`) VALUES
40+
(0, 'user'),
41+
(1, 'admin'),
42+
(2, 'editor');
43+
44+
-- --------------------------------------------------------
45+
46+
--
47+
-- Table structure for table `users`
48+
--
49+
50+
CREATE TABLE `users` (
51+
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
52+
`user_login` varchar(60) DEFAULT NULL,
53+
`user_pass` varchar(64) DEFAULT NULL,
54+
`user_nicename` varchar(64) DEFAULT NULL,
55+
`user_email` varchar(100) DEFAULT NULL,
56+
`activation_key` varchar(64) NOT NULL,
57+
`registered_date` datetime NOT NULL,
58+
`status` int(11) NOT NULL,
59+
PRIMARY KEY (`id`)
60+
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=2 ;
61+
62+
--
63+
-- Dumping data for table `users`
64+
--
65+
66+
INSERT INTO `users` (`id`, `user_login`, `user_pass`, `user_nicename`, `user_email`, `activation_key`, `registered_date`, `status`) VALUES
67+
(1, 'admin', '21232f297a57a5a743894a0e4a801fc3', 'admin', 'admin@admin.com', '', '2012-10-06 14:49:46', 1);
68+
69+
-- --------------------------------------------------------
70+
71+
--
72+
-- Table structure for table `users_roles`
73+
--
74+
75+
CREATE TABLE `users_roles` (
76+
`user_id` int(11) unsigned NOT NULL,
77+
`role_id` int(11) NOT NULL,
78+
PRIMARY KEY (`user_id`,`role_id`),
79+
KEY `fk_users_roles_roles1_idx` (`role_id`)
80+
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
81+
82+
--
83+
-- Dumping data for table `users_roles`
84+
--
85+
86+
INSERT INTO `users_roles` (`user_id`, `role_id`) VALUES
87+
(1, 1);
88+
89+
--
90+
-- Constraints for dumped tables
91+
--
92+
93+
--
94+
-- Constraints for table `users_roles`
95+
--
96+
ALTER TABLE `users_roles`
97+
ADD CONSTRAINT `fk_users_roles_roles1` FOREIGN KEY (`role_id`) REFERENCES `roles` (`id`) ON DELETE NO ACTION ON UPDATE CASCADE,
98+
ADD CONSTRAINT `fk_users_roles_users` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;
99+
100+
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
101+
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
102+
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;

application/config/database.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
$db['default']['hostname'] = 'localhost';
5252
$db['default']['username'] = 'root';
5353
$db['default']['password'] = 'root';
54-
$db['default']['database'] = 'finances';
54+
$db['default']['database'] = 'HMVC-example';
5555
$db['default']['dbdriver'] = 'mysql';
5656
$db['default']['dbprefix'] = '';
5757
$db['default']['pconnect'] = TRUE;

application/modules/users/Views/signin.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@
1616
<div class="control-group">
1717
<label class="control-label" for="inputEmail">Email</label>
1818
<div class="controls">
19-
<input type="text" id="inputEmail" placeholder="Email" name="user_email" value="daniel.gutierrez@degt.cl">
19+
<input type="text" id="inputEmail" placeholder="Email" name="user_email" value="">
2020
</div>
2121
</div>
2222
<div class="control-group">
2323
<label class="control-label" for="inputPassword">Password</label>
2424
<div class="controls">
25-
<input type="password" id="inputPassword" placeholder="Password" name="password" value="degt">
25+
<input type="password" id="inputPassword" placeholder="Password" name="password" value="">
2626
</div>
2727
</div>
2828
<div class="control-group">

0 commit comments

Comments
 (0)