├── Login
├── css
│ ├── animate-custom.css
│ ├── demo.css
│ ├── fonts
│ │ ├── BebasNeue-webfont.eot
│ │ ├── BebasNeue-webfont.svg
│ │ ├── BebasNeue-webfont.ttf
│ │ ├── BebasNeue-webfont.woff
│ │ ├── Dharma Type Font License.txt
│ │ ├── fontomas-webfont.eot
│ │ ├── fontomas-webfont.svg
│ │ ├── fontomas-webfont.ttf
│ │ ├── fontomas-webfont.woff
│ │ ├── franchise-bold-webfont.eot
│ │ ├── franchise-bold-webfont.svg
│ │ ├── franchise-bold-webfont.ttf
│ │ └── franchise-bold-webfont.woff
│ └── style.css
└── images
│ ├── ImageAttribution.txt
│ └── bg.jpg
├── README.md
├── Server-Configuration
├── .htaccess
├── Apache-configuration.txt
└── Nginx-configuration.txt
├── action.php
├── api.php
├── assets
├── .DS_Store
├── css
│ ├── .DS_Store
│ ├── bootstrap.css
│ ├── font-awesome.min.css
│ └── main.css
├── fonts
│ ├── .DS_Store
│ ├── FontAwesome.otf
│ ├── fontawesome-webfont.eot
│ ├── fontawesome-webfont.svg
│ ├── fontawesome-webfont.ttf
│ ├── fontawesome-webfont.woff
│ ├── glyphicons-halflings-regular.eot
│ ├── glyphicons-halflings-regular.svg
│ ├── glyphicons-halflings-regular.ttf
│ └── glyphicons-halflings-regular.woff
├── img
│ ├── logo.png
│ └── tabla.jpg
└── js
│ ├── .DS_Store
│ ├── bootstrap.js
│ ├── chart.js
│ └── jquery-1.11.0.min.js
├── blacklist.php
├── close.php
├── config.php
├── deleteData.php
├── examples
├── Python
│ └── AARConnector
│ │ ├── AARConnector.py
│ │ └── test.py
├── getAllDataByTableName.php
└── showTree.php
├── getData.php
├── inc
├── autentification.php
├── blackListClass.php
├── functions.php
└── toolsClass.php
├── index.php
├── login.php
├── mod
├── footer.php
├── header.php
├── modCustomSelect.php
├── modFields.php
└── modTable.php
├── postData.php
├── style
└── bootstrap.css
├── test.php
├── updateData.php
└── xml
└── blacklist.xml
/Login/css/demo.css:
--------------------------------------------------------------------------------
1 | @font-face {
2 | font-family: 'BebasNeueRegular';
3 | src: url('fonts/BebasNeue-webfont.eot');
4 | src: url('fonts/BebasNeue-webfont.eot?#iefix') format('embedded-opentype'),
5 | url('fonts/BebasNeue-webfont.woff') format('woff'),
6 | url('fonts/BebasNeue-webfont.ttf') format('truetype'),
7 | url('fonts/BebasNeue-webfont.svg#BebasNeueRegular') format('svg');
8 | font-weight: normal;
9 | font-style: normal;
10 | }
11 | /* CSS reset */
12 | body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,form,fieldset,input,textarea,p,blockquote,th,td {
13 | margin:0;
14 | padding:0;
15 | }
16 | html,body {
17 | margin:0;
18 | padding:0;
19 | height: 100%;
20 | }
21 | table {
22 | border-collapse:collapse;
23 | border-spacing:0;
24 | }
25 | fieldset,img {
26 | border:0;
27 | }
28 | address,caption,cite,code,dfn,th,var {
29 | font-style:normal;
30 | font-weight:normal;
31 | }
32 | ol,ul {
33 | list-style:none;
34 | }
35 | caption,th {
36 | text-align:left;
37 | }
38 | h1,h2,h3,h4,h5,h6 {
39 | font-size:100%;
40 | font-weight:normal;
41 | }
42 | q:before,q:after {
43 | content:'';
44 | }
45 | abbr,acronym { border:0;
46 | }
47 | article, aside, details, figcaption, figure,
48 | footer, header, hgroup, menu, nav, section {
49 | display: block;
50 | }
51 | /* General Demo Style */
52 | body{
53 | font-family: Cambria, Palatino, "Palatino Linotype", "Palatino LT STD", Georgia, serif;
54 | background: #fff url(../images/bg.jpg) repeat top left;
55 | font-weight: 400;
56 | font-size: 15px;
57 | color: #1d3c41;
58 | overflow-y: scroll;
59 | }
60 | a{
61 | color: #333;
62 | text-decoration: none;
63 | }
64 | .container{
65 | width: 100%;
66 | height: 100%;
67 | position: relative;
68 | text-align: center;
69 | }
70 | .clr{
71 | clear: both;
72 | }
73 | .container > header{
74 | padding: 20px 30px 10px 30px;
75 | margin: 0px 20px 10px 20px;
76 | position: relative;
77 | display: block;
78 | text-shadow: 1px 1px 1px rgba(0,0,0,0.2);
79 | text-align: center;
80 | }
81 | .container > header h1{
82 | font-family: 'BebasNeueRegular', 'Arial Narrow', Arial, sans-serif;
83 | font-size: 35px;
84 | line-height: 35px;
85 | position: relative;
86 | font-weight: 400;
87 | color: rgba(26,89,120,0.9);
88 | text-shadow: 1px 1px 1px rgba(0,0,0,0.1);
89 | padding: 0px 0px 5px 0px;
90 | }
91 | .container > header h1 span{
92 | color: #7cbcd6;
93 | text-shadow: 0px 1px 1px rgba(255,255,255,0.8);
94 | }
95 | .container > header h2{
96 | font-size: 16px;
97 | font-style: italic;
98 | color: #2d6277;
99 | text-shadow: 0px 1px 1px rgba(255,255,255,0.8);
100 | }
101 | /* Header Style */
102 | .codrops-top{
103 | line-height: 24px;
104 | font-size: 11px;
105 | background: rgba(255, 255, 255, 0.4);
106 | text-transform: uppercase;
107 | z-index: 9999;
108 | position: relative;
109 | box-shadow: 1px 0px 2px rgba(0,0,0,0.2);
110 | }
111 | .codrops-top a{
112 | padding: 0px 10px;
113 | letter-spacing: 1px;
114 | color: #333;
115 | text-shadow: 0px 1px 1px #fff;
116 | display: block;
117 | float: left;
118 | }
119 | .codrops-top a:hover{
120 | background: #fff;
121 | }
122 | .codrops-top span.right{
123 | float: right;
124 | }
125 | .codrops-top span.right a{
126 | float: left;
127 | display: block;
128 | }
129 |
130 | .codrops-demos{
131 | text-align:center;
132 | display: block;
133 | padding: 14px;
134 | }
135 | .codrops-demos span{
136 | display: inline-block;
137 | padding-right: 15px;
138 | text-shadow: 1px 1px 1px rgba(255, 255, 255, 0.8);
139 | }
140 | .codrops-demos a,
141 | .codrops-demos a.current-demo,
142 | .codrops-demos a.current-demo:hover{
143 | display: inline-block;
144 | font-style: italic;
145 | font-size: 12px;
146 | padding: 3px 5px;
147 | margin: 0px 3px;
148 | font-weight: 800;
149 | box-shadow: 1px 1px 1px rgba(0,0,0,0.05) inset;
150 | color: #fff;
151 | text-shadow: 1px 1px 1px rgba(0,0,0,0.1);
152 | background: rgba(104,171,194,0.5);
153 | }
154 | .codrops-demos a:hover{
155 | background: #4fa2c4;
156 | }
157 | .codrops-demos a.current-demo,
158 | .codrops-demos a.current-demo:hover{
159 | color: rgba(104,171,194,1);
160 | background: rgba(255,255,255,0.9);
161 | box-shadow: 0px 1px 1px rgba(0,0,0,0.1);
162 | }
163 |
164 |
--------------------------------------------------------------------------------
/Login/css/fonts/BebasNeue-webfont.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GeekyTheory/Automatic-API-REST/8a547f6ded5e6de282f9e4b1483b0824aadd4b06/Login/css/fonts/BebasNeue-webfont.eot
--------------------------------------------------------------------------------
/Login/css/fonts/BebasNeue-webfont.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/Login/css/fonts/BebasNeue-webfont.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GeekyTheory/Automatic-API-REST/8a547f6ded5e6de282f9e4b1483b0824aadd4b06/Login/css/fonts/BebasNeue-webfont.ttf
--------------------------------------------------------------------------------
/Login/css/fonts/BebasNeue-webfont.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GeekyTheory/Automatic-API-REST/8a547f6ded5e6de282f9e4b1483b0824aadd4b06/Login/css/fonts/BebasNeue-webfont.woff
--------------------------------------------------------------------------------
/Login/css/fonts/Dharma Type Font License.txt:
--------------------------------------------------------------------------------
1 | ____________________________________________________________________________________________________
2 | _____ _ _ __ ____ _ _ __ ______ _ _ ____ _____
3 | / ) / / / | / ) / /| / | / | / / ) / '
4 | ---/----/----/___ /-----/__|----/___ /----/| /-|----/__|--------/--------|---/-----/____/----/__----
5 | / / / / / | / | / |/ | / | / | / / /
6 | _/____/____/____/_____/____|__/_____|___/__/___|__/____|______/__________|_/_____/_________/____ ___
7 | /
8 | (_ / DHARMA TYPE FREE FONTs
9 |
10 |
11 | EULA ( the End User License Agreement )
12 |
13 | This document is a legal agreement between you the end user, and Dharma Type.
14 | By using or installing Dharma Type font(s), you agree to be bound by the terms of this Agreement.
15 |
16 | 1. You may use this font for both commercial and non-commercial works at no charge.
17 | 2. You may use this font to create images on the website or printed matter on papre, logomark.....up to you.
18 | 3. You may not sell this font without permission.
19 | 4. You may not redistribute this font without permission.
20 | 5. You may not modify, adapt, translate, reverse engineer, decompile, disassemble, or create derivative works based on this font.
21 | 6. This font are Copyrighted by Ryoichi Tsunekawa. All rights reserved. You may not claim copyrgiht rights for this font.
22 | 7. DISCLAIMER
23 | This font is provided to you free of charge.
24 | Dharma Type give no warranty in relation to this font, and you use this at your own risk.
25 | Dharma Type will not be liable for any damage to your system, any loss or corruption of any data or software,
26 | or any other loss or damage that you may suffer as a result of downloading or using this font, whether it results from our negligence or in any other way.
27 |
28 | Here is a list of things you could do, Only if you want to:
29 | * Link http://dharmatype.com/ or credit "Dharma Type"
30 | * Tell me what did you use this font for.
31 |
32 |
33 | FAQ
34 |
35 | Q_ Can I use this for a commercial product?
36 | A_ Yes, You can!
37 |
38 | Q_ Can I use this on a web page via css @font-face?
39 | A_ Yes, You can!
40 |
41 | Q_ Can I donate $ to you?
42 | A_ Yes, You can! ( Paypal: info@flat-it.com )
43 |
44 |
45 |
46 | Contact_______________________________
47 |
48 | info@dharmatype.com
49 |
50 | Dharma Type (http://dharmatype.com)
51 | |
52 | |___ Flat it type foundry
53 | |
54 | |___ Prop-a-ganda
55 | |
56 | |___ Holiday Type
57 | ______________________________________
--------------------------------------------------------------------------------
/Login/css/fonts/fontomas-webfont.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GeekyTheory/Automatic-API-REST/8a547f6ded5e6de282f9e4b1483b0824aadd4b06/Login/css/fonts/fontomas-webfont.eot
--------------------------------------------------------------------------------
/Login/css/fonts/fontomas-webfont.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/Login/css/fonts/fontomas-webfont.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GeekyTheory/Automatic-API-REST/8a547f6ded5e6de282f9e4b1483b0824aadd4b06/Login/css/fonts/fontomas-webfont.ttf
--------------------------------------------------------------------------------
/Login/css/fonts/fontomas-webfont.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GeekyTheory/Automatic-API-REST/8a547f6ded5e6de282f9e4b1483b0824aadd4b06/Login/css/fonts/fontomas-webfont.woff
--------------------------------------------------------------------------------
/Login/css/fonts/franchise-bold-webfont.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GeekyTheory/Automatic-API-REST/8a547f6ded5e6de282f9e4b1483b0824aadd4b06/Login/css/fonts/franchise-bold-webfont.eot
--------------------------------------------------------------------------------
/Login/css/fonts/franchise-bold-webfont.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/Login/css/fonts/franchise-bold-webfont.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GeekyTheory/Automatic-API-REST/8a547f6ded5e6de282f9e4b1483b0824aadd4b06/Login/css/fonts/franchise-bold-webfont.ttf
--------------------------------------------------------------------------------
/Login/css/fonts/franchise-bold-webfont.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GeekyTheory/Automatic-API-REST/8a547f6ded5e6de282f9e4b1483b0824aadd4b06/Login/css/fonts/franchise-bold-webfont.woff
--------------------------------------------------------------------------------
/Login/css/style.css:
--------------------------------------------------------------------------------
1 | /* remove codrops styles and reset the whole thing */
2 | #container_demo{
3 | text-align: left;
4 | margin: 0;
5 | padding: 0;
6 | margin: 0 auto;
7 | font-family: "Trebuchet MS","Myriad Pro",Arial,sans-serif;
8 | }
9 |
10 | /** fonts used for the icons **/
11 | @font-face {
12 | font-family: 'FontomasCustomRegular';
13 | src: url('fonts/fontomas-webfont.eot');
14 | src: url('fonts/fontomas-webfont.eot?#iefix') format('embedded-opentype'),
15 | url('fonts/fontomas-webfont.woff') format('woff'),
16 | url('fonts/fontomas-webfont.ttf') format('truetype'),
17 | url('fonts/fontomas-webfont.svg#FontomasCustomRegular') format('svg');
18 | font-weight: normal;
19 | font-style: normal;
20 | }
21 | @font-face {
22 | font-family: 'FranchiseRegular';
23 | src: url('fonts/franchise-bold-webfont.eot');
24 | src: url('fonts/franchise-bold-webfont.eot?#iefix') format('embedded-opentype'),
25 | url('fonts/franchise-bold-webfont.woff') format('woff'),
26 | url('fonts/franchise-bold-webfont.ttf') format('truetype'),
27 | url('fonts/franchise-bold-webfont.svg#FranchiseRegular') format('svg');
28 | font-weight: normal;
29 | font-style: normal;
30 |
31 | }
32 | a.hiddenanchor{
33 | display: none;
34 | }
35 | /** The wrapper that will contain our two forms **/
36 | #wrapper{
37 | width: 60%;
38 | right: 0px;
39 | min-height: 560px;
40 | margin: 0px auto;
41 | width: 500px;
42 | position: relative;
43 | }
44 | /**** Styling the form elements **/
45 |
46 | /**** general text styling ****/
47 | #wrapper a{
48 | color: rgb(95, 155, 198);
49 | text-decoration: underline;
50 | }
51 |
52 | #wrapper h1{
53 | font-size: 48px;
54 | color: rgb(6, 106, 117);
55 | padding: 2px 0 10px 0;
56 | font-family: 'FranchiseRegular','Arial Narrow',Arial,sans-serif;
57 | font-weight: bold;
58 | text-align: center;
59 | padding-bottom: 30px;
60 | }
61 | /** For the moment only webkit supports the background-clip:text; */
62 | #wrapper h1{
63 | background: -webkit-repeating-linear-gradient(-45deg,
64 | rgb(18, 83, 93) ,
65 | rgb(18, 83, 93) 20px,
66 | rgb(64, 111, 118) 20px,
67 | rgb(64, 111, 118) 40px,
68 | rgb(18, 83, 93) 40px);
69 | -webkit-text-fill-color: transparent;
70 | -webkit-background-clip: text;
71 | }
72 | #wrapper h1:after{
73 | content: ' ';
74 | display: block;
75 | width: 100%;
76 | height: 2px;
77 | margin-top: 10px;
78 | background: -moz-linear-gradient(left, rgba(147,184,189,0) 0%, rgba(147,184,189,0.8) 20%, rgba(147,184,189,1) 53%, rgba(147,184,189,0.8) 79%, rgba(147,184,189,0) 100%);
79 | background: -webkit-gradient(linear, left top, right top, color-stop(0%,rgba(147,184,189,0)), color-stop(20%,rgba(147,184,189,0.8)), color-stop(53%,rgba(147,184,189,1)), color-stop(79%,rgba(147,184,189,0.8)), color-stop(100%,rgba(147,184,189,0)));
80 | background: -webkit-linear-gradient(left, rgba(147,184,189,0) 0%,rgba(147,184,189,0.8) 20%,rgba(147,184,189,1) 53%,rgba(147,184,189,0.8) 79%,rgba(147,184,189,0) 100%);
81 | background: -o-linear-gradient(left, rgba(147,184,189,0) 0%,rgba(147,184,189,0.8) 20%,rgba(147,184,189,1) 53%,rgba(147,184,189,0.8) 79%,rgba(147,184,189,0) 100%);
82 | background: -ms-linear-gradient(left, rgba(147,184,189,0) 0%,rgba(147,184,189,0.8) 20%,rgba(147,184,189,1) 53%,rgba(147,184,189,0.8) 79%,rgba(147,184,189,0) 100%);
83 | background: linear-gradient(left, rgba(147,184,189,0) 0%,rgba(147,184,189,0.8) 20%,rgba(147,184,189,1) 53%,rgba(147,184,189,0.8) 79%,rgba(147,184,189,0) 100%);
84 | }
85 |
86 | #wrapper p{
87 | margin-bottom:15px;
88 | }
89 | #wrapper p:first-child{
90 | margin: 0px;
91 | }
92 | #wrapper label{
93 | color: rgb(64, 92, 96);
94 | position: relative;
95 | }
96 |
97 | /**** advanced input styling ****/
98 | /* placeholder */
99 | ::-webkit-input-placeholder {
100 | color: rgb(190, 188, 188);
101 | font-style: italic;
102 | }
103 | input:-moz-placeholder,
104 | textarea:-moz-placeholder{
105 | color: rgb(190, 188, 188);
106 | font-style: italic;
107 | }
108 | input {
109 | outline: none;
110 | }
111 |
112 | /* all the input except submit and checkbox */
113 | #wrapper input:not([type="checkbox"]){
114 | width: 92%;
115 | margin-top: 4px;
116 | padding: 10px 5px 10px 32px;
117 | border: 1px solid rgb(178, 178, 178);
118 | -webkit-appearance: textfield;
119 | -webkit-box-sizing: content-box;
120 | -moz-box-sizing : content-box;
121 | box-sizing : content-box;
122 | -webkit-border-radius: 3px;
123 | -moz-border-radius: 3px;
124 | border-radius: 3px;
125 | -webkit-box-shadow: 0px 1px 4px 0px rgba(168, 168, 168, 0.6) inset;
126 | -moz-box-shadow: 0px 1px 4px 0px rgba(168, 168, 168, 0.6) inset;
127 | box-shadow: 0px 1px 4px 0px rgba(168, 168, 168, 0.6) inset;
128 | -webkit-transition: all 0.2s linear;
129 | -moz-transition: all 0.2s linear;
130 | -o-transition: all 0.2s linear;
131 | transition: all 0.2s linear;
132 | }
133 | #wrapper input:not([type="checkbox"]):active,
134 | #wrapper input:not([type="checkbox"]):focus{
135 | border: 1px solid rgba(91, 90, 90, 0.7);
136 | background: rgba(238, 236, 240, 0.2);
137 | -webkit-box-shadow: 0px 1px 4px 0px rgba(168, 168, 168, 0.9) inset;
138 | -moz-box-shadow: 0px 1px 4px 0px rgba(168, 168, 168, 0.9) inset;
139 | box-shadow: 0px 1px 4px 0px rgba(168, 168, 168, 0.9) inset;
140 | }
141 |
142 | /** the magic icon trick ! **/
143 | [data-icon]:after {
144 | content: attr(data-icon);
145 | font-family: 'FontomasCustomRegular';
146 | color: rgb(106, 159, 171);
147 | position: absolute;
148 | left: 10px;
149 | top: 35px;
150 | width: 30px;
151 | }
152 |
153 | /*styling both submit buttons */
154 | #wrapper p.button input{
155 | width: 30%;
156 | cursor: pointer;
157 | background: rgb(61, 157, 179);
158 | padding: 8px 5px;
159 | font-family: 'BebasNeueRegular','Arial Narrow',Arial,sans-serif;
160 | color: #fff;
161 | font-size: 24px;
162 | border: 1px solid rgb(28, 108, 122);
163 | margin-bottom: 10px;
164 | text-shadow: 0 1px 1px rgba(0, 0, 0, 0.5);
165 | -webkit-border-radius: 3px;
166 | -moz-border-radius: 3px;
167 | border-radius: 3px;
168 | -webkit-box-shadow: 0px 1px 6px 4px rgba(0, 0, 0, 0.07) inset,
169 | 0px 0px 0px 3px rgb(254, 254, 254),
170 | 0px 5px 3px 3px rgb(210, 210, 210);
171 | -moz-box-shadow:0px 1px 6px 4px rgba(0, 0, 0, 0.07) inset,
172 | 0px 0px 0px 3px rgb(254, 254, 254),
173 | 0px 5px 3px 3px rgb(210, 210, 210);
174 | box-shadow:0px 1px 6px 4px rgba(0, 0, 0, 0.07) inset,
175 | 0px 0px 0px 3px rgb(254, 254, 254),
176 | 0px 5px 3px 3px rgb(210, 210, 210);
177 | -webkit-transition: all 0.2s linear;
178 | -moz-transition: all 0.2s linear;
179 | -o-transition: all 0.2s linear;
180 | transition: all 0.2s linear;
181 | }
182 | #wrapper p.button input:hover{
183 | background: rgb(74, 179, 198);
184 | }
185 | #wrapper p.button input:active,
186 | #wrapper p.button input:focus{
187 | background: rgb(40, 137, 154);
188 | position: relative;
189 | top: 1px;
190 | border: 1px solid rgb(12, 76, 87);
191 | -webkit-box-shadow: 0px 1px 6px 4px rgba(0, 0, 0, 0.2) inset;
192 | -moz-box-shadow: 0px 1px 6px 4px rgba(0, 0, 0, 0.2) inset;
193 | box-shadow: 0px 1px 6px 4px rgba(0, 0, 0, 0.2) inset;
194 | }
195 | p.login.button,
196 | p.signin.button{
197 | text-align: right;
198 | margin: 5px 0;
199 | }
200 |
201 |
202 | /* styling the checkbox "keep me logged in"*/
203 | .keeplogin{
204 | margin-top: -5px;
205 | }
206 | .keeplogin input,
207 | .keeplogin label{
208 | display: inline-block;
209 | font-size: 12px;
210 | font-style: italic;
211 | }
212 | .keeplogin input#loginkeeping{
213 | margin-right: 5px;
214 | }
215 | .keeplogin label{
216 | width: 80%;
217 | }
218 |
219 |
220 | /*styling the links to change from one form to another */
221 |
222 | p.change_link{
223 | position: absolute;
224 | color: rgb(127, 124, 124);
225 | left: 0px;
226 | height: 20px;
227 | width: 440px;
228 | padding: 17px 30px 20px 30px;
229 | font-size: 16px ;
230 | text-align: right;
231 | border-top: 1px solid rgb(219, 229, 232);
232 | -webkit-border-radius: 0 0 5px 5px;
233 | -moz-border-radius: 0 0 5px 5px;
234 | border-radius: 0 0 5px 5px;
235 | background: rgb(225, 234, 235);
236 | background: -moz-repeating-linear-gradient(-45deg,
237 | rgb(247, 247, 247) ,
238 | rgb(247, 247, 247) 15px,
239 | rgb(225, 234, 235) 15px,
240 | rgb(225, 234, 235) 30px,
241 | rgb(247, 247, 247) 30px
242 | );
243 | background: -webkit-repeating-linear-gradient(-45deg,
244 | rgb(247, 247, 247) ,
245 | rgb(247, 247, 247) 15px,
246 | rgb(225, 234, 235) 15px,
247 | rgb(225, 234, 235) 30px,
248 | rgb(247, 247, 247) 30px
249 | );
250 | background: -o-repeating-linear-gradient(-45deg,
251 | rgb(247, 247, 247) ,
252 | rgb(247, 247, 247) 15px,
253 | rgb(225, 234, 235) 15px,
254 | rgb(225, 234, 235) 30px,
255 | rgb(247, 247, 247) 30px
256 | );
257 | background: repeating-linear-gradient(-45deg,
258 | rgb(247, 247, 247) ,
259 | rgb(247, 247, 247) 15px,
260 | rgb(225, 234, 235) 15px,
261 | rgb(225, 234, 235) 30px,
262 | rgb(247, 247, 247) 30px
263 | );
264 | }
265 | #wrapper p.change_link a {
266 | display: inline-block;
267 | font-weight: bold;
268 | background: rgb(247, 248, 241);
269 | padding: 2px 6px;
270 | color: rgb(29, 162, 193);
271 | margin-left: 10px;
272 | text-decoration: none;
273 | -webkit-border-radius: 4px;
274 | -moz-border-radius: 4px;
275 | border-radius: 4px;
276 | border: 1px solid rgb(203, 213, 214);
277 | -webkit-transition: all 0.4s linear;
278 | -moz-transition: all 0.4s linear;
279 | -o-transition: all 0.4s linear;
280 | -ms-transition: all 0.4s linear;
281 | transition: all 0.4s linear;
282 | }
283 | #wrapper p.change_link a:hover {
284 | color: rgb(57, 191, 215);
285 | background: rgb(247, 247, 247);
286 | border: 1px solid rgb(74, 179, 198);
287 | }
288 | #wrapper p.change_link a:active{
289 | position: relative;
290 | top: 1px;
291 | }
292 | /** Styling both forms **/
293 | #register,
294 | #login{
295 | position: absolute;
296 | top: 0px;
297 | width: 88%;
298 | padding: 18px 6% 60px 6%;
299 | margin: 0 0 35px 0;
300 | background: rgb(247, 247, 247);
301 | border: 1px solid rgba(147, 184, 189,0.8);
302 | -webkit-box-shadow: 0pt 2px 5px rgba(105, 108, 109, 0.7), 0px 0px 8px 5px rgba(208, 223, 226, 0.4) inset;
303 | -moz-box-shadow: 0pt 2px 5px rgba(105, 108, 109, 0.7), 0px 0px 8px 5px rgba(208, 223, 226, 0.4) inset;
304 | box-shadow: 0pt 2px 5px rgba(105, 108, 109, 0.7), 0px 0px 8px 5px rgba(208, 223, 226, 0.4) inset;
305 | -webkit-box-shadow: 5px;
306 | -moz-border-radius: 5px;
307 | border-radius: 5px;
308 | }
309 | #register{
310 | z-index: 21;
311 | opacity: 0;
312 | }
313 | #login{
314 | z-index: 22;
315 | }
316 | #toregister:target ~ #wrapper #register,
317 | #tologin:target ~ #wrapper #login{
318 | z-index: 22;
319 | -webkit-animation-name: fadeInLeft;
320 | -moz-animation-name: fadeInLeft;
321 | -ms-animation-name: fadeInLeft;
322 | -o-animation-name: fadeInLeft;
323 | animation-name: fadeInLeft;
324 | -webkit-animation-delay: .1s;
325 | -moz-animation-delay: .1s;
326 | -o-animation-delay: .1s;
327 | -ms-animation-delay: .1s;
328 | animation-delay: .1s;
329 | }
330 | #toregister:target ~ #wrapper #login,
331 | #tologin:target ~ #wrapper #register{
332 | -webkit-animation-name: fadeOutLeft;
333 | -moz-animation-name: fadeOutLeft;
334 | -ms-animation-name: fadeOutLeft;
335 | -o-animation-name: fadeOutLeft;
336 | animation-name: fadeOutLeft;
337 | }
338 |
339 | /** the actual animation, credit where due : http://daneden.me/animate/ ***/
340 | .animate{
341 | -webkit-animation-duration: 0.5s;
342 | -webkit-animation-timing-function: ease;
343 | -webkit-animation-fill-mode: both;
344 |
345 | -moz-animation-duration: 0.5s;
346 | -moz-animation-timing-function: ease;
347 | -moz-animation-fill-mode: both;
348 |
349 | -o-animation-duration: 0.5s;
350 | -o-animation-timing-function: ease;
351 | -o-animation-fill-mode: both;
352 |
353 | -ms-animation-duration: 0.5s;
354 | -ms-animation-timing-function: ease;
355 | -ms-animation-fill-mode: both;
356 |
357 | animation-duration: 0.5s;
358 | animation-timing-function: ease;
359 | animation-fill-mode: both;
360 | }
361 |
362 | /** yerk some ugly IE fixes 'cause I know someone will ask "why does it look ugly in IE?", no matter how many warnings I will put in the article */
363 |
364 | .lt8 #wrapper input{
365 | padding: 10px 5px 10px 32px;
366 | width: 92%;
367 | }
368 | .lt8 #wrapper input[type=checkbox]{
369 | width: 10px;
370 | padding: 0;
371 | }
372 | .lt8 #wrapper h1{
373 | color: #066A75;
374 | }
375 | .lt8 #register{
376 | display: none;
377 | }
378 | .lt8 p.change_link,
379 | .ie9 p.change_link{
380 | position: absolute;
381 | height: 90px;
382 | background: transparent;
383 | }
--------------------------------------------------------------------------------
/Login/images/ImageAttribution.txt:
--------------------------------------------------------------------------------
1 |
2 |
3 | Background Pattern from http://subtlepatterns.com/
--------------------------------------------------------------------------------
/Login/images/bg.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GeekyTheory/Automatic-API-REST/8a547f6ded5e6de282f9e4b1483b0824aadd4b06/Login/images/bg.jpg
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Automatic API REST (Beta) -
2 |
3 | [Automatic API REST](http://automaticapirest.info/) is an Open Source Tool to create a full REST API of your Data Base in seconds. AAR uses the native functions of MySQL to abstract your data base and provide the information in different formats (JSON available). Automatic API REST let you to build a JSON and XML tree of your Data Base. You can choose which tables are public and which are private to keep your secret information secure.
4 |
5 | Automatic API Rest works as a bridge to interact with all programing languages which can read a JSON and XML format, facilitating the communication machine-to-machine (M2M). Read from JAVA, c++, python (...) all the information from you data base to implement your apps.
6 |
7 | Visit [Automatic API REST](http://automaticapirest.info/) to view our demo.
8 |
9 | [**View DEMO**](http://automaticapirest.info/demo) | [**View Features**](#features) | [**Installation Instructions**](#installation) | [**User Guide**](https://github.com/GeekyTheory/Automatic-API-REST/wiki/User-Guide) | [**Documentation**](https://github.com/GeekyTheory/Automatic-API-REST/wiki/) | [**TO-DO**](#to-do) | [**Links**](#links)
10 |
11 |
12 |
13 | ## Features
14 |
15 | * Creation of a powerful REST API of your MySQL DB in Seconds.
16 | * Management of the API in situ, it is not neccesary an extra database.
17 | * Private tables and columns.
18 | * REST-based URIs format.
19 | * Custom queries.
20 |
21 | ## Dependencies
22 |
23 | * PHP5
24 | * MySQL
25 | * Apache or Nginx
26 |
27 | ## Installation
28 |
29 | 1. [Download the source](http://goo.gl/7kPWWP) or clone the repository in the root folder of your project.
30 | 2. Place it in `/var/www/YourWebPage/` (for Apache).
31 | 3. Open the fileconfig.php and complete all the fields with the server credencials.
32 | 4. Replace the file .htaccess in the root folder of your project if your are using Apache. In case you are using Nginx, please follow the intructions attached in /Server-Configuration/ folder.
33 | 5. Go to http://domain.com/Automatic-API-REST
34 |
35 | **Note: If you have troubles with the privacy system, please allow access to xml folder.**.
36 |
37 | **Note 2: If you have troubles in localhost with apache, please see this [issue](https://github.com/GeekyTheory/Automatic-API-REST/issues/9).**
38 |
39 | ## Hello World (GET From PHP)
40 |
<?php
41 | //Get JSON from Automatic Api Rest
42 | $apiLink = "http://localhost/api/get/city/";
43 | $json = file_get_contents($apiLink);
44 | //Decode JSON
45 | $json = json_decode($json);
46 | //Print
47 | for($i=0;$i<count($json);$i++){
48 | echo $json[$i].ID;
49 | }
50 |
51 |
52 | ## TO-DO
53 |
54 | * Implement XML Format
55 | * Documentation for all the platforms
56 | * Security
57 | * Complex query
58 |
59 | ## Links
60 | * Oficial Page: AUTOMATIC API REST
61 | * Project ZIP: Download
62 | * GitHub: AUTOMATIC API REST PROJECT
63 | * Developer email: alejandro@geekytheory.com
64 | * Twitter: @alex_esquiva
65 |
66 |
67 | ### License
68 |
69 | Copyright 2014 GeekyTheory (Alejandro Esquiva)
70 |
71 | Licensed under the Apache License, Version 2.0 (the "License");
72 | you may not use this file except in compliance with the License.
73 | You may obtain a copy of the License at
74 |
75 | http://www.apache.org/licenses/LICENSE-2.0
76 |
77 | Unless required by applicable law or agreed to in writing, software
78 | distributed under the License is distributed on an "AS IS" BASIS,
79 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
80 | See the License for the specific language governing permissions and
81 | limitations under the License.
82 |
--------------------------------------------------------------------------------
/Server-Configuration/.htaccess:
--------------------------------------------------------------------------------
1 | RewriteEngine on
2 | RewriteRule ^api/ Automatic-API-REST/api.php
--------------------------------------------------------------------------------
/Server-Configuration/Apache-configuration.txt:
--------------------------------------------------------------------------------
1 | /**
2 | * Automatic Api Rest
3 | *
4 | * @package Automatic Api Rest
5 | * @author Alejandro Esquiva Rodríguez [@alex_esquiva]
6 | * @license Apache License, Version 2.0
7 | * @link https://github.com/GeekyTheory/Automatic-API-REST
8 | */
9 |
10 | In order to configurate Automatic API REST in an Apache server, please follow next steps:
11 |
12 |
13 | 1º Open or create the file .httaccess located in the main path server:
14 | 2º Write this:
15 |
16 | RewriteEngine on
17 | RewriteRule ^api/ Automatic-API-REST/api.php
18 |
19 | 3º Save it!
20 |
--------------------------------------------------------------------------------
/Server-Configuration/Nginx-configuration.txt:
--------------------------------------------------------------------------------
1 | /**
2 | * Automatic Api Rest
3 | *
4 | * @package Automatic Api Rest
5 | * @author Alejandro Esquiva Rodríguez [@alex_esquiva]
6 | * @license Apache License, Version 2.0
7 | * @link https://github.com/GeekyTheory/Automatic-API-REST
8 | */
9 |
10 | In order to configurate Automatic API REST in a nginx server, please follow next steps:
11 |
12 | 1º Open Virtual Domains Configuration
13 | /etc/nginx/sites-enabled/default
14 |
15 | 2º Add this location rule
16 | location /api {
17 | rewrite ^/api /Automatic-API-REST/api.php;
18 | }
19 |
20 | 3º Restart Nginx
21 | sudo service nginx restart
22 |
--------------------------------------------------------------------------------
/action.php:
--------------------------------------------------------------------------------
1 |
7 | * @license Apache License, Version 2.0
8 | * @link https://github.com/GeekyTheory/Automatic-API-REST
9 | */
10 |
11 | include_once 'inc/functions.php';
12 | require_once("inc/autentification.php");
13 | $blacklist = new BlackList();
14 |
15 | if(isset($_GET["a"])){
16 | if($_GET["a"]=="add"){
17 |
18 | $tool = new Tools();
19 | $fields = $tool->getFieldsByTable($_GET["table"]);
20 | $num_fields = count($fields);
21 |
22 | if($_GET["column"]=="*"){
23 | //Get all columns from table
24 | for($i=0;$iexistItem($_GET["type"],$_GET["table"],$fields[$i])){
26 | $blacklist->createItem($_GET["type"],$_GET["table"],$fields[$i]);
27 | }
28 | }
29 | $blacklist->createItem($_GET["type"],$_GET["table"],$_GET["column"]);
30 | }else{
31 | $blacklist->createItem($_GET["type"],$_GET["table"],$_GET["column"]);
32 |
33 | $num_fields_check = 0;
34 | for($i=0;$iexistItem($_GET["type"],$_GET["table"],$fields[$i])){
36 | $num_fields_check++;
37 | }
38 | }
39 |
40 | if($num_fields == $num_fields_check){
41 | //Añadimos *
42 | $blacklist->createItem($_GET["type"],$_GET["table"],"*");
43 | }
44 | }
45 | }
46 | if($_GET["a"]=="delete"){
47 |
48 | if($_GET["column"]=="*"){
49 | //Get all columns from table
50 | $tool = new Tools();
51 | $fields = $tool->getFieldsByTable($_GET["table"]);
52 |
53 | for($i=0;$igetIDbyParameters($_GET["type"],$_GET["table"],$fields[$i]);
55 | $blacklist->id_item = $id_item;
56 | if($id_item!=0)$blacklist->deleteItem();
57 | }
58 | //delete *
59 | $id_item = $blacklist->getIDbyParameters($_GET["type"],$_GET["table"],"*");
60 | $blacklist->id_item = $id_item;
61 | if($id_item!=0)$blacklist->deleteItem();
62 | }else{
63 | //delete field
64 | $id_item = $blacklist->getIDbyParameters($_GET["type"],$_GET["table"],$_GET["column"]);
65 | $blacklist->id_item = $id_item;
66 | if($id_item!=0)$blacklist->deleteItem();
67 | //delete *
68 | $id_item = $blacklist->getIDbyParameters($_GET["type"],$_GET["table"],"*");
69 | $blacklist->id_item = $id_item;
70 | if($id_item!=0)$blacklist->deleteItem();
71 |
72 | }
73 |
74 | }
75 | }
--------------------------------------------------------------------------------
/api.php:
--------------------------------------------------------------------------------
1 |
7 | * @license Apache License, Version 2.0
8 | * @link https://github.com/GeekyTheory/Automatic-API-REST
9 | */
10 | require_once 'inc/functions.php';
11 |
12 | $blacklist = new BlackList();
13 | $objectTools = new Tools();
14 | /**
15 | * URL FORMAT
16 | * http:///api///--/?=
17 | *
18 | * URL EXAMPLE
19 | * http://localhost/AutomaticApiRest/api/get/country/Continent-Capital/?f=table&o=Name&s=asc&l=0,100
20 | */
21 | //http:///api//--/?=
22 |
23 | // QUERY Variables
24 | $method = "";
25 | $table = "";
26 | $columns="";
27 | $order="";
28 | $sort="";
29 | $limit="";
30 | $where="";
31 | $format="";
32 | $option="";
33 |
34 | $path = "";
35 | $params = array();
36 | $parts = explode('/', $_SERVER['REQUEST_URI']);
37 |
38 |
39 | //Get method, table and columns
40 | for ($i = 0; $i < count($parts); $i++) {
41 | if ($parts[$i]=="api"){
42 |
43 | //convert string $method to lowercase
44 | $method = strtolower ($parts[$i+1]);
45 | $table = $parts[$i+2];
46 |
47 | if(!empty($parts[$i+3])) $columns = str_replace("-",",",$parts[$i+3]);
48 |
49 | for($j=0;$j<$i;$j++){
50 | $path .= $parts[$j]."/";
51 | }
52 | break;
53 | }
54 | }
55 |
56 | if ($_SERVER['REQUEST_METHOD'] === 'GET') {
57 | // Others parameter for get call
58 | if(isset($_GET["o"])) $order = $_GET["o"];
59 | if(isset($_GET["s"])) $sort = $_GET["s"];
60 | if(isset($_GET["l"])) $limit = $_GET["l"];
61 | if(isset($_GET["w"])) $where = $_GET["w"];
62 | if(isset($_GET["f"])) $format = $_GET["f"];
63 | if(isset($_GET["opt"])) $option = $_GET["opt"];
64 | }
65 |
66 | if ($_SERVER['REQUEST_METHOD'] === 'POST') {
67 | if($method == "get"){
68 | // Others parameter for get call
69 | if(isset($_POST["o"])) $order = $_POST["o"];
70 | if(isset($_POST["s"])) $sort = $_POST["s"];
71 | if(isset($_POST["l"])) $limit = $_POST["l"];
72 | if(isset($_POST["w"])) $where = $_POST["w"];
73 | if(isset($_POST["f"])) $format = $_POST["f"];
74 | if(isset($_POST["opt"])) $option = $_POST["opt"];
75 | }elseif($method == "post"){
76 | // Get extra parameters for Post call
77 | }
78 |
79 | }
80 |
81 |
82 | // Delimit formats
83 | if($format == "tree" || $format == "table") $format = "";
84 |
85 |
86 | // Action API
87 | if($method=="get"){
88 | $objectTools->getData($table,$columns,$order,$sort,$limit,$where,$format,$option);
89 | }elseif($method=="post"){
90 | $objectTools->postData($table,$_POST);
91 | }elseif($method=="update"){
92 | echo "TO-DO";
93 | }elseif($method=="delete"){
94 | echo "TO-DO";
95 | }else{
96 | die($objectTools->JSONError(301));
97 | }
98 |
99 | ?>
--------------------------------------------------------------------------------
/assets/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GeekyTheory/Automatic-API-REST/8a547f6ded5e6de282f9e4b1483b0824aadd4b06/assets/.DS_Store
--------------------------------------------------------------------------------
/assets/css/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GeekyTheory/Automatic-API-REST/8a547f6ded5e6de282f9e4b1483b0824aadd4b06/assets/css/.DS_Store
--------------------------------------------------------------------------------
/assets/css/font-awesome.min.css:
--------------------------------------------------------------------------------
1 | @font-face{font-family:'FontAwesome';src:url('../fonts/fontawesome-webfont.eot?v=4.0.1');src:url('../fonts/fontawesome-webfont.eot?#iefix&v=4.0.1') format('embedded-opentype'),url('../fonts/fontawesome-webfont.woff?v=4.0.1') format('woff'),url('../fonts/fontawesome-webfont.ttf?v=4.0.1') format('truetype'),url('../fonts/fontawesome-webfont.svg?v=4.0.1#fontawesomeregular') format('svg');font-weight:normal;font-style:normal}.fa{display:inline-block;font-family:FontAwesome;font-style:normal;font-weight:normal;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}
2 | .fa-lg{font-size:1.3333333333333333em;line-height:.75em;vertical-align:-15%}
3 | .fa-2x{font-size:2em}
4 | .fa-3x{font-size:3em}
5 | .fa-4x{font-size:4em}
6 | .fa-5x{font-size:5em}
7 | .fa-fw{width:1.2857142857142858em;text-align:center}
8 | .fa-ul{padding-left:0;margin-left:2.142857142857143em;list-style-type:none}.fa-ul>li{position:relative}
9 | .fa-li{position:absolute;left:-2.142857142857143em;width:2.142857142857143em;top:.14285714285714285em;text-align:center}.fa-li.fa-lg{left:-1.8571428571428572em}
10 | .fa-border{padding:.2em .25em .15em;border:solid .08em #eee;border-radius:.1em}
11 | .pull-right{float:right}
12 | .pull-left{float:left}
13 | .fa.pull-left{margin-right:.3em}
14 | .fa.pull-right{margin-left:.3em}
15 | .fa-spin{-webkit-animation:spin 2s infinite linear;-moz-animation:spin 2s infinite linear;-o-animation:spin 2s infinite linear;animation:spin 2s infinite linear}
16 | @-moz-keyframes spin{0%{-moz-transform:rotate(0deg)} 100%{-moz-transform:rotate(359deg)}}@-webkit-keyframes spin{0%{-webkit-transform:rotate(0deg)} 100%{-webkit-transform:rotate(359deg)}}@-o-keyframes spin{0%{-o-transform:rotate(0deg)} 100%{-o-transform:rotate(359deg)}}@-ms-keyframes spin{0%{-ms-transform:rotate(0deg)} 100%{-ms-transform:rotate(359deg)}}@keyframes spin{0%{transform:rotate(0deg)} 100%{transform:rotate(359deg)}}.fa-rotate-90{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=1);-webkit-transform:rotate(90deg);-moz-transform:rotate(90deg);-ms-transform:rotate(90deg);-o-transform:rotate(90deg);transform:rotate(90deg)}
17 | .fa-rotate-180{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2);-webkit-transform:rotate(180deg);-moz-transform:rotate(180deg);-ms-transform:rotate(180deg);-o-transform:rotate(180deg);transform:rotate(180deg)}
18 | .fa-rotate-270{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=3);-webkit-transform:rotate(270deg);-moz-transform:rotate(270deg);-ms-transform:rotate(270deg);-o-transform:rotate(270deg);transform:rotate(270deg)}
19 | .fa-flip-horizontal{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1);-webkit-transform:scale(-1, 1);-moz-transform:scale(-1, 1);-ms-transform:scale(-1, 1);-o-transform:scale(-1, 1);transform:scale(-1, 1)}
20 | .fa-flip-vertical{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1);-webkit-transform:scale(1, -1);-moz-transform:scale(1, -1);-ms-transform:scale(1, -1);-o-transform:scale(1, -1);transform:scale(1, -1)}
21 | .fa-stack{position:relative;display:inline-block;width:2em;height:2em;line-height:2em;vertical-align:middle}
22 | .fa-stack-1x,.fa-stack-2x{position:absolute;left:0;width:100%;text-align:center}
23 | .fa-stack-1x{line-height:inherit}
24 | .fa-stack-2x{font-size:2em}
25 | .fa-inverse{color:#fff}
26 | .fa-glass:before{content:"\f000"}
27 | .fa-music:before{content:"\f001"}
28 | .fa-search:before{content:"\f002"}
29 | .fa-envelope-o:before{content:"\f003"}
30 | .fa-heart:before{content:"\f004"}
31 | .fa-star:before{content:"\f005"}
32 | .fa-star-o:before{content:"\f006"}
33 | .fa-user:before{content:"\f007"}
34 | .fa-film:before{content:"\f008"}
35 | .fa-th-large:before{content:"\f009"}
36 | .fa-th:before{content:"\f00a"}
37 | .fa-th-list:before{content:"\f00b"}
38 | .fa-check:before{content:"\f00c"}
39 | .fa-times:before{content:"\f00d"}
40 | .fa-search-plus:before{content:"\f00e"}
41 | .fa-search-minus:before{content:"\f010"}
42 | .fa-power-off:before{content:"\f011"}
43 | .fa-signal:before{content:"\f012"}
44 | .fa-gear:before,.fa-cog:before{content:"\f013"}
45 | .fa-trash-o:before{content:"\f014"}
46 | .fa-home:before{content:"\f015"}
47 | .fa-file-o:before{content:"\f016"}
48 | .fa-clock-o:before{content:"\f017"}
49 | .fa-road:before{content:"\f018"}
50 | .fa-download:before{content:"\f019"}
51 | .fa-arrow-circle-o-down:before{content:"\f01a"}
52 | .fa-arrow-circle-o-up:before{content:"\f01b"}
53 | .fa-inbox:before{content:"\f01c"}
54 | .fa-play-circle-o:before{content:"\f01d"}
55 | .fa-rotate-right:before,.fa-repeat:before{content:"\f01e"}
56 | .fa-refresh:before{content:"\f021"}
57 | .fa-list-alt:before{content:"\f022"}
58 | .fa-lock:before{content:"\f023"}
59 | .fa-flag:before{content:"\f024"}
60 | .fa-headphones:before{content:"\f025"}
61 | .fa-volume-off:before{content:"\f026"}
62 | .fa-volume-down:before{content:"\f027"}
63 | .fa-volume-up:before{content:"\f028"}
64 | .fa-qrcode:before{content:"\f029"}
65 | .fa-barcode:before{content:"\f02a"}
66 | .fa-tag:before{content:"\f02b"}
67 | .fa-tags:before{content:"\f02c"}
68 | .fa-book:before{content:"\f02d"}
69 | .fa-bookmark:before{content:"\f02e"}
70 | .fa-print:before{content:"\f02f"}
71 | .fa-camera:before{content:"\f030"}
72 | .fa-font:before{content:"\f031"}
73 | .fa-bold:before{content:"\f032"}
74 | .fa-italic:before{content:"\f033"}
75 | .fa-text-height:before{content:"\f034"}
76 | .fa-text-width:before{content:"\f035"}
77 | .fa-align-left:before{content:"\f036"}
78 | .fa-align-center:before{content:"\f037"}
79 | .fa-align-right:before{content:"\f038"}
80 | .fa-align-justify:before{content:"\f039"}
81 | .fa-list:before{content:"\f03a"}
82 | .fa-dedent:before,.fa-outdent:before{content:"\f03b"}
83 | .fa-indent:before{content:"\f03c"}
84 | .fa-video-camera:before{content:"\f03d"}
85 | .fa-picture-o:before{content:"\f03e"}
86 | .fa-pencil:before{content:"\f040"}
87 | .fa-map-marker:before{content:"\f041"}
88 | .fa-adjust:before{content:"\f042"}
89 | .fa-tint:before{content:"\f043"}
90 | .fa-edit:before,.fa-pencil-square-o:before{content:"\f044"}
91 | .fa-share-square-o:before{content:"\f045"}
92 | .fa-check-square-o:before{content:"\f046"}
93 | .fa-move:before{content:"\f047"}
94 | .fa-step-backward:before{content:"\f048"}
95 | .fa-fast-backward:before{content:"\f049"}
96 | .fa-backward:before{content:"\f04a"}
97 | .fa-play:before{content:"\f04b"}
98 | .fa-pause:before{content:"\f04c"}
99 | .fa-stop:before{content:"\f04d"}
100 | .fa-forward:before{content:"\f04e"}
101 | .fa-fast-forward:before{content:"\f050"}
102 | .fa-step-forward:before{content:"\f051"}
103 | .fa-eject:before{content:"\f052"}
104 | .fa-chevron-left:before{content:"\f053"}
105 | .fa-chevron-right:before{content:"\f054"}
106 | .fa-plus-circle:before{content:"\f055"}
107 | .fa-minus-circle:before{content:"\f056"}
108 | .fa-times-circle:before{content:"\f057"}
109 | .fa-check-circle:before{content:"\f058"}
110 | .fa-question-circle:before{content:"\f059"}
111 | .fa-info-circle:before{content:"\f05a"}
112 | .fa-crosshairs:before{content:"\f05b"}
113 | .fa-times-circle-o:before{content:"\f05c"}
114 | .fa-check-circle-o:before{content:"\f05d"}
115 | .fa-ban:before{content:"\f05e"}
116 | .fa-arrow-left:before{content:"\f060"}
117 | .fa-arrow-right:before{content:"\f061"}
118 | .fa-arrow-up:before{content:"\f062"}
119 | .fa-arrow-down:before{content:"\f063"}
120 | .fa-mail-forward:before,.fa-share:before{content:"\f064"}
121 | .fa-resize-full:before{content:"\f065"}
122 | .fa-resize-small:before{content:"\f066"}
123 | .fa-plus:before{content:"\f067"}
124 | .fa-minus:before{content:"\f068"}
125 | .fa-asterisk:before{content:"\f069"}
126 | .fa-exclamation-circle:before{content:"\f06a"}
127 | .fa-gift:before{content:"\f06b"}
128 | .fa-leaf:before{content:"\f06c"}
129 | .fa-fire:before{content:"\f06d"}
130 | .fa-eye:before{content:"\f06e"}
131 | .fa-eye-slash:before{content:"\f070"}
132 | .fa-warning:before,.fa-exclamation-triangle:before{content:"\f071"}
133 | .fa-plane:before{content:"\f072"}
134 | .fa-calendar:before{content:"\f073"}
135 | .fa-random:before{content:"\f074"}
136 | .fa-comment:before{content:"\f075"}
137 | .fa-magnet:before{content:"\f076"}
138 | .fa-chevron-up:before{content:"\f077"}
139 | .fa-chevron-down:before{content:"\f078"}
140 | .fa-retweet:before{content:"\f079"}
141 | .fa-shopping-cart:before{content:"\f07a"}
142 | .fa-folder:before{content:"\f07b"}
143 | .fa-folder-open:before{content:"\f07c"}
144 | .fa-resize-vertical:before{content:"\f07d"}
145 | .fa-resize-horizontal:before{content:"\f07e"}
146 | .fa-bar-chart-o:before{content:"\f080"}
147 | .fa-twitter-square:before{content:"\f081"}
148 | .fa-facebook-square:before{content:"\f082"}
149 | .fa-camera-retro:before{content:"\f083"}
150 | .fa-key:before{content:"\f084"}
151 | .fa-gears:before,.fa-cogs:before{content:"\f085"}
152 | .fa-comments:before{content:"\f086"}
153 | .fa-thumbs-o-up:before{content:"\f087"}
154 | .fa-thumbs-o-down:before{content:"\f088"}
155 | .fa-star-half:before{content:"\f089"}
156 | .fa-heart-o:before{content:"\f08a"}
157 | .fa-sign-out:before{content:"\f08b"}
158 | .fa-linkedin-square:before{content:"\f08c"}
159 | .fa-thumb-tack:before{content:"\f08d"}
160 | .fa-external-link:before{content:"\f08e"}
161 | .fa-sign-in:before{content:"\f090"}
162 | .fa-trophy:before{content:"\f091"}
163 | .fa-github-square:before{content:"\f092"}
164 | .fa-upload:before{content:"\f093"}
165 | .fa-lemon-o:before{content:"\f094"}
166 | .fa-phone:before{content:"\f095"}
167 | .fa-square-o:before{content:"\f096"}
168 | .fa-bookmark-o:before{content:"\f097"}
169 | .fa-phone-square:before{content:"\f098"}
170 | .fa-twitter:before{content:"\f099"}
171 | .fa-facebook:before{content:"\f09a"}
172 | .fa-github:before{content:"\f09b"}
173 | .fa-unlock:before{content:"\f09c"}
174 | .fa-credit-card:before{content:"\f09d"}
175 | .fa-rss:before{content:"\f09e"}
176 | .fa-hdd-o:before{content:"\f0a0"}
177 | .fa-bullhorn:before{content:"\f0a1"}
178 | .fa-bell:before{content:"\f0f3"}
179 | .fa-certificate:before{content:"\f0a3"}
180 | .fa-hand-o-right:before{content:"\f0a4"}
181 | .fa-hand-o-left:before{content:"\f0a5"}
182 | .fa-hand-o-up:before{content:"\f0a6"}
183 | .fa-hand-o-down:before{content:"\f0a7"}
184 | .fa-arrow-circle-left:before{content:"\f0a8"}
185 | .fa-arrow-circle-right:before{content:"\f0a9"}
186 | .fa-arrow-circle-up:before{content:"\f0aa"}
187 | .fa-arrow-circle-down:before{content:"\f0ab"}
188 | .fa-globe:before{content:"\f0ac"}
189 | .fa-wrench:before{content:"\f0ad"}
190 | .fa-tasks:before{content:"\f0ae"}
191 | .fa-filter:before{content:"\f0b0"}
192 | .fa-briefcase:before{content:"\f0b1"}
193 | .fa-fullscreen:before{content:"\f0b2"}
194 | .fa-group:before{content:"\f0c0"}
195 | .fa-chain:before,.fa-link:before{content:"\f0c1"}
196 | .fa-cloud:before{content:"\f0c2"}
197 | .fa-flask:before{content:"\f0c3"}
198 | .fa-cut:before,.fa-scissors:before{content:"\f0c4"}
199 | .fa-copy:before,.fa-files-o:before{content:"\f0c5"}
200 | .fa-paperclip:before{content:"\f0c6"}
201 | .fa-save:before,.fa-floppy-o:before{content:"\f0c7"}
202 | .fa-square:before{content:"\f0c8"}
203 | .fa-reorder:before{content:"\f0c9"}
204 | .fa-list-ul:before{content:"\f0ca"}
205 | .fa-list-ol:before{content:"\f0cb"}
206 | .fa-strikethrough:before{content:"\f0cc"}
207 | .fa-underline:before{content:"\f0cd"}
208 | .fa-table:before{content:"\f0ce"}
209 | .fa-magic:before{content:"\f0d0"}
210 | .fa-truck:before{content:"\f0d1"}
211 | .fa-pinterest:before{content:"\f0d2"}
212 | .fa-pinterest-square:before{content:"\f0d3"}
213 | .fa-google-plus-square:before{content:"\f0d4"}
214 | .fa-google-plus:before{content:"\f0d5"}
215 | .fa-money:before{content:"\f0d6"}
216 | .fa-caret-down:before{content:"\f0d7"}
217 | .fa-caret-up:before{content:"\f0d8"}
218 | .fa-caret-left:before{content:"\f0d9"}
219 | .fa-caret-right:before{content:"\f0da"}
220 | .fa-columns:before{content:"\f0db"}
221 | .fa-unsorted:before,.fa-sort:before{content:"\f0dc"}
222 | .fa-sort-down:before,.fa-sort-asc:before{content:"\f0dd"}
223 | .fa-sort-up:before,.fa-sort-desc:before{content:"\f0de"}
224 | .fa-envelope:before{content:"\f0e0"}
225 | .fa-linkedin:before{content:"\f0e1"}
226 | .fa-rotate-left:before,.fa-undo:before{content:"\f0e2"}
227 | .fa-legal:before,.fa-gavel:before{content:"\f0e3"}
228 | .fa-dashboard:before,.fa-tachometer:before{content:"\f0e4"}
229 | .fa-comment-o:before{content:"\f0e5"}
230 | .fa-comments-o:before{content:"\f0e6"}
231 | .fa-flash:before,.fa-bolt:before{content:"\f0e7"}
232 | .fa-sitemap:before{content:"\f0e8"}
233 | .fa-umbrella:before{content:"\f0e9"}
234 | .fa-paste:before,.fa-clipboard:before{content:"\f0ea"}
235 | .fa-lightbulb-o:before{content:"\f0eb"}
236 | .fa-exchange:before{content:"\f0ec"}
237 | .fa-cloud-download:before{content:"\f0ed"}
238 | .fa-cloud-upload:before{content:"\f0ee"}
239 | .fa-user-md:before{content:"\f0f0"}
240 | .fa-stethoscope:before{content:"\f0f1"}
241 | .fa-suitcase:before{content:"\f0f2"}
242 | .fa-bell-o:before{content:"\f0a2"}
243 | .fa-coffee:before{content:"\f0f4"}
244 | .fa-cutlery:before{content:"\f0f5"}
245 | .fa-file-text-o:before{content:"\f0f6"}
246 | .fa-building:before{content:"\f0f7"}
247 | .fa-hospital:before{content:"\f0f8"}
248 | .fa-ambulance:before{content:"\f0f9"}
249 | .fa-medkit:before{content:"\f0fa"}
250 | .fa-fighter-jet:before{content:"\f0fb"}
251 | .fa-beer:before{content:"\f0fc"}
252 | .fa-h-square:before{content:"\f0fd"}
253 | .fa-plus-square:before{content:"\f0fe"}
254 | .fa-angle-double-left:before{content:"\f100"}
255 | .fa-angle-double-right:before{content:"\f101"}
256 | .fa-angle-double-up:before{content:"\f102"}
257 | .fa-angle-double-down:before{content:"\f103"}
258 | .fa-angle-left:before{content:"\f104"}
259 | .fa-angle-right:before{content:"\f105"}
260 | .fa-angle-up:before{content:"\f106"}
261 | .fa-angle-down:before{content:"\f107"}
262 | .fa-desktop:before{content:"\f108"}
263 | .fa-laptop:before{content:"\f109"}
264 | .fa-tablet:before{content:"\f10a"}
265 | .fa-mobile-phone:before,.fa-mobile:before{content:"\f10b"}
266 | .fa-circle-o:before{content:"\f10c"}
267 | .fa-quote-left:before{content:"\f10d"}
268 | .fa-quote-right:before{content:"\f10e"}
269 | .fa-spinner:before{content:"\f110"}
270 | .fa-circle:before{content:"\f111"}
271 | .fa-mail-reply:before,.fa-reply:before{content:"\f112"}
272 | .fa-github-alt:before{content:"\f113"}
273 | .fa-folder-o:before{content:"\f114"}
274 | .fa-folder-open-o:before{content:"\f115"}
275 | .fa-expand-o:before{content:"\f116"}
276 | .fa-collapse-o:before{content:"\f117"}
277 | .fa-smile-o:before{content:"\f118"}
278 | .fa-frown-o:before{content:"\f119"}
279 | .fa-meh-o:before{content:"\f11a"}
280 | .fa-gamepad:before{content:"\f11b"}
281 | .fa-keyboard-o:before{content:"\f11c"}
282 | .fa-flag-o:before{content:"\f11d"}
283 | .fa-flag-checkered:before{content:"\f11e"}
284 | .fa-terminal:before{content:"\f120"}
285 | .fa-code:before{content:"\f121"}
286 | .fa-reply-all:before{content:"\f122"}
287 | .fa-mail-reply-all:before{content:"\f122"}
288 | .fa-star-half-empty:before,.fa-star-half-full:before,.fa-star-half-o:before{content:"\f123"}
289 | .fa-location-arrow:before{content:"\f124"}
290 | .fa-crop:before{content:"\f125"}
291 | .fa-code-fork:before{content:"\f126"}
292 | .fa-unlink:before,.fa-chain-broken:before{content:"\f127"}
293 | .fa-question:before{content:"\f128"}
294 | .fa-info:before{content:"\f129"}
295 | .fa-exclamation:before{content:"\f12a"}
296 | .fa-superscript:before{content:"\f12b"}
297 | .fa-subscript:before{content:"\f12c"}
298 | .fa-eraser:before{content:"\f12d"}
299 | .fa-puzzle-piece:before{content:"\f12e"}
300 | .fa-microphone:before{content:"\f130"}
301 | .fa-microphone-slash:before{content:"\f131"}
302 | .fa-shield:before{content:"\f132"}
303 | .fa-calendar-o:before{content:"\f133"}
304 | .fa-fire-extinguisher:before{content:"\f134"}
305 | .fa-rocket:before{content:"\f135"}
306 | .fa-maxcdn:before{content:"\f136"}
307 | .fa-chevron-circle-left:before{content:"\f137"}
308 | .fa-chevron-circle-right:before{content:"\f138"}
309 | .fa-chevron-circle-up:before{content:"\f139"}
310 | .fa-chevron-circle-down:before{content:"\f13a"}
311 | .fa-html5:before{content:"\f13b"}
312 | .fa-css3:before{content:"\f13c"}
313 | .fa-anchor:before{content:"\f13d"}
314 | .fa-unlock-o:before{content:"\f13e"}
315 | .fa-bullseye:before{content:"\f140"}
316 | .fa-ellipsis-horizontal:before{content:"\f141"}
317 | .fa-ellipsis-vertical:before{content:"\f142"}
318 | .fa-rss-square:before{content:"\f143"}
319 | .fa-play-circle:before{content:"\f144"}
320 | .fa-ticket:before{content:"\f145"}
321 | .fa-minus-square:before{content:"\f146"}
322 | .fa-minus-square-o:before{content:"\f147"}
323 | .fa-level-up:before{content:"\f148"}
324 | .fa-level-down:before{content:"\f149"}
325 | .fa-check-square:before{content:"\f14a"}
326 | .fa-pencil-square:before{content:"\f14b"}
327 | .fa-external-link-square:before{content:"\f14c"}
328 | .fa-share-square:before{content:"\f14d"}
329 | .fa-compass:before{content:"\f14e"}
330 | .fa-toggle-down:before,.fa-caret-square-o-down:before{content:"\f150"}
331 | .fa-toggle-up:before,.fa-caret-square-o-up:before{content:"\f151"}
332 | .fa-toggle-right:before,.fa-caret-square-o-right:before{content:"\f152"}
333 | .fa-euro:before,.fa-eur:before{content:"\f153"}
334 | .fa-gbp:before{content:"\f154"}
335 | .fa-dollar:before,.fa-usd:before{content:"\f155"}
336 | .fa-rupee:before,.fa-inr:before{content:"\f156"}
337 | .fa-cny:before,.fa-rmb:before,.fa-yen:before,.fa-jpy:before{content:"\f157"}
338 | .fa-ruble:before,.fa-rouble:before,.fa-rub:before{content:"\f158"}
339 | .fa-won:before,.fa-krw:before{content:"\f159"}
340 | .fa-bitcoin:before,.fa-btc:before{content:"\f15a"}
341 | .fa-file:before{content:"\f15b"}
342 | .fa-file-text:before{content:"\f15c"}
343 | .fa-sort-alpha-asc:before{content:"\f15d"}
344 | .fa-sort-alpha-desc:before{content:"\f15e"}
345 | .fa-sort-amount-asc:before{content:"\f160"}
346 | .fa-sort-amount-desc:before{content:"\f161"}
347 | .fa-sort-numeric-asc:before{content:"\f162"}
348 | .fa-sort-numeric-desc:before{content:"\f163"}
349 | .fa-thumbs-up:before{content:"\f164"}
350 | .fa-thumbs-down:before{content:"\f165"}
351 | .fa-youtube-square:before{content:"\f166"}
352 | .fa-youtube:before{content:"\f167"}
353 | .fa-xing:before{content:"\f168"}
354 | .fa-xing-square:before{content:"\f169"}
355 | .fa-youtube-play:before{content:"\f16a"}
356 | .fa-dropbox:before{content:"\f16b"}
357 | .fa-stack-overflow:before{content:"\f16c"}
358 | .fa-instagram:before{content:"\f16d"}
359 | .fa-flickr:before{content:"\f16e"}
360 | .fa-adn:before{content:"\f170"}
361 | .fa-bitbucket:before{content:"\f171"}
362 | .fa-bitbucket-square:before{content:"\f172"}
363 | .fa-tumblr:before{content:"\f173"}
364 | .fa-tumblr-square:before{content:"\f174"}
365 | .fa-long-arrow-down:before{content:"\f175"}
366 | .fa-long-arrow-up:before{content:"\f176"}
367 | .fa-long-arrow-left:before{content:"\f177"}
368 | .fa-long-arrow-right:before{content:"\f178"}
369 | .fa-apple:before{content:"\f179"}
370 | .fa-windows:before{content:"\f17a"}
371 | .fa-android:before{content:"\f17b"}
372 | .fa-linux:before{content:"\f17c"}
373 | .fa-dribbble:before{content:"\f17d"}
374 | .fa-skype:before{content:"\f17e"}
375 | .fa-foursquare:before{content:"\f180"}
376 | .fa-trello:before{content:"\f181"}
377 | .fa-female:before{content:"\f182"}
378 | .fa-male:before{content:"\f183"}
379 | .fa-gittip:before{content:"\f184"}
380 | .fa-sun-o:before{content:"\f185"}
381 | .fa-moon-o:before{content:"\f186"}
382 | .fa-archive:before{content:"\f187"}
383 | .fa-bug:before{content:"\f188"}
384 | .fa-vk:before{content:"\f189"}
385 | .fa-weibo:before{content:"\f18a"}
386 | .fa-renren:before{content:"\f18b"}
387 | .fa-pagelines:before{content:"\f18c"}
388 | .fa-stack-exchange:before{content:"\f18d"}
389 | .fa-arrow-circle-o-right:before{content:"\f18e"}
390 | .fa-arrow-circle-o-left:before{content:"\f190"}
391 | .fa-toggle-left:before,.fa-caret-square-o-left:before{content:"\f191"}
392 | .fa-dot-circle-o:before{content:"\f192"}
393 | .fa-wheelchair:before{content:"\f193"}
394 | .fa-vimeo-square:before{content:"\f194"}
395 | .fa-turkish-lira:before,.fa-try:before{content:"\f195"}
396 |
--------------------------------------------------------------------------------
/assets/css/main.css:
--------------------------------------------------------------------------------
1 | /*
2 | * Author: Carlos Alvarez
3 | * URL: http://alvarez.is
4 | *
5 | * Project Name: Bolt - Free Bootstrap 3 Theme
6 | * Version: 1.0
7 | * URL: http://blacktie.co
8 | */
9 |
10 | /* FONTS */
11 | @import url(http://fonts.googleapis.com/css?family=Lato:300,400,700,900);
12 | @import url(http://fonts.googleapis.com/css?family=Raleway:400,300,700,900);
13 |
14 | /* OVERALL ASPECT */
15 |
16 | body {
17 | /*background-color: #f2f2f2;*/
18 | font-family: "Lato";
19 | /*font-weight: 300;*/
20 | font-size: 16px;
21 | color: #555;
22 |
23 | -webkit-font-smoothing: antialiased;
24 | -webkit-overflow-scrolling: touch;
25 |
26 | margin-top: 70px;
27 | }
28 |
29 | /* Titles */
30 | h1, h2, h3, h4, h5, h6 {
31 | font-family: "Raleway";
32 | font-weight: 300;
33 | color: #333;
34 | }
35 |
36 |
37 | /* Paragraph & Typographic */
38 | p {
39 | line-height: 28px;
40 | /*margin-bottom: 25px;*/
41 | }
42 |
43 | .centered {
44 | text-align: center;
45 | }
46 |
47 | .mt {
48 | margin-top: 40px;
49 | }
50 |
51 | /* Links */
52 | a {
53 | color: #838080;
54 | word-wrap: break-word;
55 |
56 | -webkit-transition: color 0.1s ease-in, background 0.1s ease-in;
57 | -moz-transition: color 0.1s ease-in, background 0.1s ease-in;
58 | -ms-transition: color 0.1s ease-in, background 0.1s ease-in;
59 | -o-transition: color 0.1s ease-in, background 0.1s ease-in;
60 | transition: color 0.1s ease-in, background 0.1s ease-in;
61 | }
62 |
63 | a:hover,
64 | a:focus {
65 | color: #7b7b7b;
66 | text-decoration: none;
67 | outline: 0;
68 | }
69 |
70 | a:before,
71 | a:after {
72 | -webkit-transition: color 0.1s ease-in, background 0.1s ease-in;
73 | -moz-transition: color 0.1s ease-in, background 0.1s ease-in;
74 | -ms-transition: color 0.1s ease-in, background 0.1s ease-in;
75 | -o-transition: color 0.1s ease-in, background 0.1s ease-in;
76 | transition: color 0.1s ease-in, background 0.1s ease-in;
77 | }
78 |
79 | /* Bootstrap Modifications */
80 | hr {
81 | display: block;
82 | height: 1px;
83 | border: 0;
84 | border-top: 1px solid #ccc;
85 | margin: 1em 0;
86 | padding: 0;
87 | }
88 |
89 |
90 | .navbar {
91 | font-weight: 800;
92 | font-size: 14px;
93 | /*padding-top: 15px;*/
94 | /*padding-bottom: 15px;*/
95 | background-color: #ffffff;
96 | }
97 |
98 | .navbar-default .navbar-nav > .active > a, .navbar-default .navbar-nav > .active > a:hover, .navbar-default .navbar-nav > .active > a:focus {
99 | color: #ffffff;
100 | background-color: #00AEEF;
101 | padding: 10px;
102 | }
103 |
104 | .navbar-brand {
105 | font-size: 60px;
106 | padding-top: 0px;
107 | padding-bottom: 0px;
108 | }
109 |
110 | .btn-theme {
111 | color: #ffffff;
112 | background-color: #00AEEF;
113 | border-color: transparent;
114 | }
115 |
116 | .btn {
117 | padding: 10px 30px;
118 | margin-bottom: 0;
119 | font-size: 18px;
120 | border: 5px solid transparent;
121 | border-radius: 0px;
122 | }
123 |
124 | .lead {
125 | letter-spacing: 1px;
126 | }
127 |
128 | /* WRAP SECTIONS */
129 |
130 | /* hello */
131 | #hello {
132 | width: 100%;
133 | /*padding-top: 250px;
134 | padding-bottom: 250px;*/
135 | }
136 |
137 | #hello h1 {
138 | font-size: 90px;
139 | font-weight: 700;
140 | letter-spacing: 3px;
141 | color: #00AEEF;
142 | }
143 |
144 | #hello h2 {
145 | color: #c0c0c0;
146 | font-weight: 400;
147 | }
148 | #hello p {
149 | color: black;
150 | font-weight: 400;
151 | font-size: 20px;
152 | }
153 |
154 | /* Green */
155 | #green {
156 | background-color: #00AEEF;
157 | padding-top: 50px;
158 | margin-bottom: 0px;
159 | }
160 |
161 | #green h3 {
162 | color: white;
163 | font-weight: 400;
164 | margin-bottom: 35px;
165 | }
166 |
167 | #green p {
168 | color: white;
169 | font-weight: 400;
170 | font-size: 20px;
171 | }
172 |
173 | /* Skills */
174 | #skills {
175 | background-color: #4e4e4e;
176 | padding-top: 50px;
177 | padding-bottom: 50px;
178 | margin-top: 50px;
179 | }
180 |
181 | #skills h3 {
182 | color: white;
183 | }
184 |
185 | #skills p {
186 | color: white;
187 | font-weight: 400;
188 | }
189 |
190 | /* Social Links */
191 | #social {
192 | width: 100%;
193 | padding-top: 200px;
194 | padding-bottom: 200px;
195 | }
196 |
197 | #social i {
198 | font-size: 50px;
199 | color: #00AEEF;
200 | }
201 |
202 | #social .col-md-3:hover {
203 | background-color: #f5f5f5;
204 | }
205 |
206 | #social .col-md-3 {
207 | padding:30px;
208 | }
209 |
210 | /* Footer */
211 | #f {
212 | padding: 8px;
213 | background-color: #00AEEF;
214 | }
215 |
216 | #f p {
217 | color: white;
218 | text-align: right;
219 | font-weight: 400;
220 | }
221 |
222 | /* Image Opacity */
223 | .grid img {
224 | opacity: .7;
225 | }
226 | .grid img:hover {
227 | opacity: 1;
228 | }
229 |
--------------------------------------------------------------------------------
/assets/fonts/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GeekyTheory/Automatic-API-REST/8a547f6ded5e6de282f9e4b1483b0824aadd4b06/assets/fonts/.DS_Store
--------------------------------------------------------------------------------
/assets/fonts/FontAwesome.otf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GeekyTheory/Automatic-API-REST/8a547f6ded5e6de282f9e4b1483b0824aadd4b06/assets/fonts/FontAwesome.otf
--------------------------------------------------------------------------------
/assets/fonts/fontawesome-webfont.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GeekyTheory/Automatic-API-REST/8a547f6ded5e6de282f9e4b1483b0824aadd4b06/assets/fonts/fontawesome-webfont.eot
--------------------------------------------------------------------------------
/assets/fonts/fontawesome-webfont.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GeekyTheory/Automatic-API-REST/8a547f6ded5e6de282f9e4b1483b0824aadd4b06/assets/fonts/fontawesome-webfont.ttf
--------------------------------------------------------------------------------
/assets/fonts/fontawesome-webfont.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GeekyTheory/Automatic-API-REST/8a547f6ded5e6de282f9e4b1483b0824aadd4b06/assets/fonts/fontawesome-webfont.woff
--------------------------------------------------------------------------------
/assets/fonts/glyphicons-halflings-regular.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GeekyTheory/Automatic-API-REST/8a547f6ded5e6de282f9e4b1483b0824aadd4b06/assets/fonts/glyphicons-halflings-regular.eot
--------------------------------------------------------------------------------
/assets/fonts/glyphicons-halflings-regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GeekyTheory/Automatic-API-REST/8a547f6ded5e6de282f9e4b1483b0824aadd4b06/assets/fonts/glyphicons-halflings-regular.ttf
--------------------------------------------------------------------------------
/assets/fonts/glyphicons-halflings-regular.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GeekyTheory/Automatic-API-REST/8a547f6ded5e6de282f9e4b1483b0824aadd4b06/assets/fonts/glyphicons-halflings-regular.woff
--------------------------------------------------------------------------------
/assets/img/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GeekyTheory/Automatic-API-REST/8a547f6ded5e6de282f9e4b1483b0824aadd4b06/assets/img/logo.png
--------------------------------------------------------------------------------
/assets/img/tabla.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GeekyTheory/Automatic-API-REST/8a547f6ded5e6de282f9e4b1483b0824aadd4b06/assets/img/tabla.jpg
--------------------------------------------------------------------------------
/assets/js/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GeekyTheory/Automatic-API-REST/8a547f6ded5e6de282f9e4b1483b0824aadd4b06/assets/js/.DS_Store
--------------------------------------------------------------------------------
/blacklist.php:
--------------------------------------------------------------------------------
1 |
7 | * @license Apache License, Version 2.0
8 | * @link https://github.com/GeekyTheory/Automatic-API-REST
9 | */
10 |
11 | require_once 'inc/functions.php';
12 | require_once("inc/autentification.php");
13 | require_once 'mod/header.php';
14 |
15 | $blacklist = new BlackList();
16 | $rawdata = $blacklist->getAllInfo();
17 | if(empty($rawdata)){
18 | $tool = new Tools();
19 | $tool->displayError("Not Found", "Empty BlackList");
20 | }else{
21 | $blacklist->displayTable($rawdata);
22 | }
23 |
24 | require_once 'mod/footer.php';
25 | ?>
26 |
--------------------------------------------------------------------------------
/close.php:
--------------------------------------------------------------------------------
1 |
7 | * @license Apache License, Version 2.0
8 | * @link https://github.com/GeekyTheory/Automatic-API-REST
9 | */
10 |
11 | session_start();
12 | $_SESSION['useradmin'] = "";
13 | $_SESSION['passadmin'] = "";
14 |
15 | //REEDIRIGIR
16 | header('Location: ./');
17 |
18 |
19 |
--------------------------------------------------------------------------------
/config.php:
--------------------------------------------------------------------------------
1 |
7 | * @license Apache License, Version 2.0
8 | * @link https://github.com/GeekyTheory/Automatic-API-REST
9 | */
10 |
11 | define("SERVER","localhost");
12 | define("USER","");
13 | define("PASS","");
14 | define("DB","");
15 |
16 | define("USERADMIN","admin");
17 | define("PASSADMIN","admin");
18 | ?>
--------------------------------------------------------------------------------
/deleteData.php:
--------------------------------------------------------------------------------
1 | user_login;
9 | }
--------------------------------------------------------------------------------
/examples/showTree.php:
--------------------------------------------------------------------------------
1 | 1000) return ''; // Make sure not to have an endless recursion
4 | $tree = '';
5 | for($i=0, $ni=count($datas); $i < $ni; $i++){
6 | if($datas[$i]['parent'] == $parent){
7 | $tree .= '- ';
8 | $tree .= $datas[$i]['name'];
9 | $tree .= generatePageTree($datas, $datas[$i]['id'], $depth+1);
10 | $tree .= '
';
11 | }
12 | }
13 | $tree .= '
';
14 | return $tree;
15 | }
16 | //Get JSON from Automatic Api Rest
17 | $json = file_get_contents("http://localhost:80/AutomaticAPI/getData.php?f=json&t=badges");
18 | //Decode JSON
19 | $json = json_decode($json);
20 |
21 |
22 | $html = "empieza";
23 |
24 | for($i=1;$i".key($json[0]).":";
26 | next($json[0]);
27 | }
28 | $html = $html."
";
29 | echo $html;
30 | $datas = array(
31 | array('id' => 1, 'parent' => 0, 'name' => 'Page 1'),
32 | array('id' => 2, 'parent' => 1, 'name' => 'Page 1.1'),
33 | array('id' => 3, 'parent' => 2, 'name' => 'Page 1.1.1'),
34 | array('id' => 4, 'parent' => 3, 'name' => 'Page 1.1.1.1'),
35 | array('id' => 5, 'parent' => 3, 'name' => 'Page 1.1.1.2'),
36 | array('id' => 6, 'parent' => 1, 'name' => 'Page 1.2'),
37 | array('id' => 7, 'parent' => 6, 'name' => 'Page 1.2.1'),
38 | array('id' => 8, 'parent' => 0, 'name' => 'Page 2'),
39 | array('id' => 9, 'parent' => 0, 'name' => 'Page 3'),
40 | array('id' => 10, 'parent' => 9, 'name' => 'Page 3.1'),
41 | array('id' => 11, 'parent' => 9, 'name' => 'Page 3.2'),
42 | array('id' => 12, 'parent' => 11, 'name' => 'Page 3.2.1'),
43 | );
44 |
45 | //echo(generatePageTree($datas));
46 |
47 | /*
48 | * To change this license header, choose License Headers in Project Properties.
49 | * To change this template file, choose Tools | Templates
50 | * and open the template in the editor.
51 | */
52 |
--------------------------------------------------------------------------------
/getData.php:
--------------------------------------------------------------------------------
1 |
7 | * @license Apache License, Version 2.0
8 | * @link https://github.com/GeekyTheory/Automatic-API-REST
9 | */
10 |
11 | require_once 'inc/functions.php';
12 | $objectTools = new Tools();
13 |
14 | // QUERY Variables
15 | $method = "";
16 | $table = "";
17 | $columns="";
18 | $order="";
19 | $sort="";
20 | $limit="";
21 | $where="";
22 | $format="";
23 | $option="";
24 |
25 | if(isset($_GET["t"])) $table = $_GET["t"];
26 | if(isset($_GET["c"])) $columns = $_GET["c"];
27 | if(isset($_GET["o"])) $order = $_GET["o"];
28 | if(isset($_GET["s"])) $sort = $_GET["s"];
29 | if(isset($_GET["l"])) $limit = $_GET["l"];
30 | if(isset($_GET["w"])) $where = $_GET["w"];
31 | if(isset($_GET["f"])) $format = $_GET["f"];
32 | if(isset($_GET["opt"])) $option = $_GET["opt"];
33 |
34 | $objectTools->getData($table,$columns,$order,$sort,$limit,$where,$format,$option);
--------------------------------------------------------------------------------
/inc/autentification.php:
--------------------------------------------------------------------------------
1 |
7 | * @license Apache License, Version 2.0
8 | * @link https://github.com/GeekyTheory/Automatic-API-REST
9 | */
10 | session_start();
11 | if($_SESSION['useradmin']!=USERADMIN || $_SESSION['passadmin']!=PASSADMIN){
12 | //REEDIRIGIR
13 | header('Location: login.php');
14 | die();
15 | }
16 | ?>
--------------------------------------------------------------------------------
/inc/blackListClass.php:
--------------------------------------------------------------------------------
1 |
8 | * @license Apache License, Version 2.0
9 | * @link https://github.com/GeekyTheory/Automatic-API-REST
10 | */
11 | class BlackList{
12 |
13 | public $id_item = 0;
14 | /**
15 | * Insert a row into the blacklist.xml
16 | *
17 | * @param type $type
18 | * @param type $table
19 | * @param type $colum
20 | */
21 | function createItem($type,$table,$colum){
22 | $library = new SimpleXMLElement('xml/blacklist.xml', null, true);
23 |
24 | $book = $library->addChild('ITEM');
25 | $book->addAttribute('ID', $this->getLastIDItem()+1);
26 | $book->addChild('TYPE', $type);
27 | $book->addChild('TABLE', $table);
28 | $book->addChild('COLUMN', $colum);
29 | echo $library->asXML();
30 | $library->asXML('xml/blacklist.xml');
31 | }
32 |
33 |
34 | /**
35 | * Get all the info in one multidimensional array
36 | * @return type
37 | */
38 | function getAllInfo(){
39 | $doc = new SimpleXMLElement('xml/blacklist.xml', null, true);
40 | $count = 0;
41 | $rawdata = "";
42 | foreach($doc->ITEM as $ITEM){
43 | $dom=dom_import_simplexml($ITEM);
44 | $rawdata[$count][0] = $dom->getAttribute("ID");
45 | $rawdata[$count]["ID"] = $dom->getAttribute("ID");
46 | //$rawdata[$count][1] = $ITEM->TYPE;
47 | //$rawdata[$count]["TYPE"] = $ITEM->TYPE;
48 | $rawdata[$count][1] = $ITEM->TABLE;
49 | $rawdata[$count]["TABLE"] = $ITEM->TABLE;
50 | $rawdata[$count][2] = $ITEM->COLUMN;
51 | $rawdata[$count]["COLUMN"] = $ITEM->COLUMN;
52 | $count++;
53 | }
54 | return $rawdata;
55 | }
56 | /**
57 | * Delete row with id_item how reference
58 | */
59 | function deleteItem(){
60 | $doc = new SimpleXMLElement('xml/blacklist.xml', null, true);
61 | foreach($doc->ITEM as $ITEM){
62 | if($ITEM['ID'] == $this->id_item) {
63 | $dom=dom_import_simplexml($ITEM);
64 | $dom->parentNode->removeChild($dom);
65 | }
66 | }
67 | echo $doc->asXml('xml/blacklist.xml');
68 | }
69 | /**
70 | * Return last id_item
71 | * @return int
72 | */
73 | function getLastIDItem(){
74 | $doc = new SimpleXMLElement('xml/blacklist.xml', null, true);
75 |
76 | $count = count($doc);
77 | $count2 = 0;
78 |
79 | foreach($doc->ITEM as $ITEM){
80 | $count2++;
81 | if($count == $count2){
82 | $dom=dom_import_simplexml($ITEM);
83 | return $dom->getAttribute("ID");
84 | }
85 | }
86 |
87 | return 0;
88 | }
89 | /**
90 | * Check if exist item about the input arguments
91 | * @param type $type
92 | * @param type $table
93 | * @param type $column
94 | * @return boolean
95 | */
96 | function existItem($type,$table,$column){
97 | $doc = new SimpleXMLElement('xml/blacklist.xml', null, true);
98 |
99 | $count = count($doc);
100 | $count2 = 0;
101 |
102 | foreach($doc->ITEM as $ITEM){
103 | if($type==$ITEM->TYPE && $table==$ITEM->TABLE && $column==$ITEM->COLUMN){
104 | return true;
105 | }
106 | }
107 | return false;
108 | }
109 | /**
110 | * Return Id by parameters
111 | *
112 | * @param type $type
113 | * @param type $table
114 | * @param type $column
115 | * @return int
116 | */
117 | function getIDbyParameters($type,$table,$column){
118 | $doc = new SimpleXMLElement('xml/blacklist.xml', null, true);
119 |
120 | $count = count($doc);
121 | $count2 = 0;
122 |
123 | foreach($doc->ITEM as $ITEM){
124 | if($type==$ITEM->TYPE && $table==$ITEM->TABLE && $column==$ITEM->COLUMN){
125 | $dom=dom_import_simplexml($ITEM);
126 | return $dom->getAttribute("ID");
127 | }
128 | }
129 | return 0;
130 | }
131 | /**
132 | * Display a table with the blacklist
133 | * @param type $rawdata
134 | */
135 | function displayTable($rawdata){
136 | echo '';
169 | }
170 |
171 | }
172 | ?>
--------------------------------------------------------------------------------
/inc/functions.php:
--------------------------------------------------------------------------------
1 |
* @license Apache License, Version 2.0
* @link https://github.com/GeekyTheory/Automatic-API-REST
*/
require_once("config.php");
require_once("toolsClass.php");
require_once("blackListClass.php");
?>
--------------------------------------------------------------------------------
/inc/toolsClass.php:
--------------------------------------------------------------------------------
1 |
8 | * @license Apache License, Version 2.0
9 | * @link https://github.com/GeekyTheory/Automatic-API-REST
10 | */
11 | class Tools{
12 | /**
13 | * Connect the data base with the parameters from the config.php, return the instance
14 | * @return type
15 | */
16 | function connectDB(){
17 | $conexion = mysqli_connect(SERVER, USER, PASS, DB);
18 | if($conexion){
19 | }else{
20 | $this->displayError("Error", "Conection refused");
21 | }
22 | mysqli_query ($conexion,"SET NAMES 'utf8'");
23 | mysqli_set_charset($conexion, "utf8");
24 | return $conexion;
25 | }
26 | /**
27 | * Try connection
28 | * @return type
29 | */
30 | function tryConnection(){
31 | //Extraemos los datos de configuración de xml/config.xml
32 | $xml = file_get_contents("xml/config.xml");
33 | $DOM = new DOMDocument('1.0', 'utf-8');
34 | $DOM->loadXML($xml);
35 | $config = $DOM->getElementsByTagName('SERVER_CONFIG')->item(0);
36 | $server = $config->getElementsByTagName("SERVER")->item(0)->nodeValue;
37 | $user = $config->getElementsByTagName("USER")->item(0)->nodeValue;
38 | $pass = $config->getElementsByTagName("PASS")->item(0)->nodeValue;
39 | $db = $config->getElementsByTagName("DB")->item(0)->nodeValue;
40 |
41 |
42 | $conexion = mysqli_connect(SERVER, USER, PASS, DB);
43 | return $conexion;
44 | }
45 | /**
46 | * Disconnect our data base, return a boolean variable with the state
47 | * @param type $conexion
48 | * @return type
49 | */
50 | function disconnectDB($conexion){
51 | $close = mysqli_close($conexion);
52 | if($close){
53 | }else{
54 | }
55 | return $close;
56 | }
57 | /**
58 | * Return one multidimensional array from a SQL sentence
59 | * @param type $sql
60 | * @return type
61 | */
62 | function getArraySQL($sql){
63 | //Creamos la conexión
64 | $conexion = $this->connectDB();
65 | //generamos la consulta
66 | if(!$result = mysqli_query($conexion, $sql)) die($this->JSONError(301, mysqli_error($conexion)));
67 | $rawdata = array();
68 | //guardamos en un array multidimensional todos los datos de la consulta
69 | $i=0;
70 | while($row = mysqli_fetch_array($result))
71 | {
72 | $rawdata[$i] = $row;
73 | $i++;
74 | }
75 | $this->disconnectDB($conexion);
76 | return $rawdata;
77 | }
78 |
79 | /**
80 | * Set data from sql sentence
81 | * @param type $sql
82 | */
83 | function setDataBySQL($sql){
84 | // Init Connexion
85 | $conexion = $this->connectDB();
86 | //Set query
87 | if(!$result = mysqli_query($conexion, $sql)) die($this->JSONError(303, mysqli_error($conexion)));
88 | $this->disconnectDB($conexion);
89 | return $result;
90 | }
91 |
92 | /**
93 | * Display a table from SQL sentence
94 | * @param type $sql
95 | */
96 | function displayTable($sql){
97 | //Creamos la conexión
98 | $conexion = $this->connectDB();
99 | //generamos la consulta
100 | if(!$result = mysqli_query($conexion, $sql)) die();
101 | $rawdata = array();
102 | //guardamos en un array multidimensional todos los datos de la consulta
103 | $i=0;
104 | while($row = mysqli_fetch_array($result))
105 | {
106 | $rawdata[$i] = $row;
107 | $i++;
108 | }
109 | $this->disconnectDB($conexion);
110 |
111 | //DIBUJAMOS LA TABLA
112 | echo '';
113 | $columnas = count($rawdata[0])/2;
114 | //echo $columnas;
115 | $filas = count($rawdata);
116 | //echo "
".$filas."
";
117 | //Añadimos los titulos
118 |
119 | for($i=1;$i".key($rawdata[0])."";
122 | next($rawdata[0]);
123 | }
124 | for($i=0;$i<$filas;$i++){
125 | echo "";
126 | for($j=0;$j<$columnas;$j++){
127 | echo "".$rawdata[$i][$j]." | ";
128 |
129 | }
130 | echo "
";
131 | }
132 | echo '
';
133 | }
134 | /**
135 | * Return all the columns from a table
136 | * @param type $table
137 | * @return type
138 | */
139 | function getFieldsByTable($table){
140 |
141 | $conexion = $this->connectDB();
142 |
143 | # Consulta SQL que devuelve los campos de cada tabla
144 | $campos = mysqli_query($conexion,'SHOW COLUMNS FROM '.$table) or die($this->JSONError(301));
145 |
146 | $this->disconnectDB($conexion);
147 |
148 | $count = 0;
149 | # Muestra como tabla HTML los detalles de los campos de la tabla correspondiente
150 | if(mysqli_num_rows($campos)) {
151 | while($detalles = mysqli_fetch_row($campos)) {
152 | $myArray[$count] = $detalles[0];
153 | $count++;
154 | }
155 | }
156 |
157 | return $myArray;
158 |
159 | }
160 |
161 | /**
162 | * Display a box with an error
163 | * @param type $title
164 | * @param type $message
165 | */
166 | function displayError($title,$message){
167 | ?>
168 |
169 |
170 |
171 |
172 |
173 |
176 |
177 |
178 |
179 |
180 |
181 |
182 |
183 |
184 | $code,"message" => "Unauthorized");
192 | $json = array ("errors" => $error);
193 | }
194 | if($code == 301){
195 | $error[0] = array("code" => $code,"message" => "Invalid Parameters: ".$details);
196 | $json = array ("errors" => $error);
197 | }
198 | if($code == 302){
199 | $error[0]= array("code" => $code,"message" => "Empty Data");
200 | $json = array ("errors" => $error);
201 | }
202 | if($code == 303){
203 | $error[0]= array("code" => $code,"message" => "Insert data error: ".$details);
204 | $json = array ("errors" => $error);
205 | }
206 | echo json_encode($json);
207 |
208 |
209 | }
210 |
211 | function getCurlJson($url,$variablesJson=''){
212 | $ch = curl_init(); // Initiate cURL
213 | curl_setopt($ch, CURLOPT_URL,$url);
214 | curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
215 | curl_setopt($ch, CURLOPT_POSTFIELDS, $variablesJson);
216 | curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);
217 | curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
218 | //curl_setopt($ch, CURLOPT_HTTPHEADER, array(
219 | // 'Content-Type: application/json',
220 | //'Content-Length: ' . strlen($variablesJson))
221 | //);
222 |
223 | $result = curl_exec($ch);
224 | return $result;
225 | }
226 |
227 | function getData($table,$columns="",$order="",$sort="",$limit="",$where="",$format="",$option=""){
228 |
229 | $blacklist = new BlackList();
230 |
231 | /**
232 | * check the blacklist
233 | */
234 | if($columns!=""){
235 | $exist = $blacklist->existItem("G",$table,"*");
236 | if(!$exist){
237 | $exist = $blacklist->existItem("G",$table,$columns);
238 | }
239 | }else{
240 | $exist = $blacklist->existItem("G",$table,"*");
241 | }
242 |
243 | /**
244 | * If the query is not allowed -> die
245 | */
246 | if($exist){
247 | die($this->JSONError(401));
248 | }
249 |
250 | /**
251 | * Create the sql sentence with the input parameters
252 | */
253 |
254 | if (strpos($columns,'?') !== false) {
255 | $columns = "";
256 | }
257 |
258 | if($columns!=""){
259 |
260 | //get the fields which are not in the black list
261 | $fields = explode(",", $columns);
262 | $fields_allowed = "";
263 | for($i=0;$iexistItem("G", $table, $fields[$i])){
265 | if($fields_allowed == ""){
266 | $fields_allowed = $fields[$i];
267 | }else{
268 | $fields_allowed = $fields_allowed.",".$fields[$i];
269 | }
270 | }
271 | }
272 |
273 |
274 | if($where!=""){
275 | $where = str_replace(":","=",$where);
276 | }
277 |
278 | if($order!=""){
279 | if($limit!=""){
280 | if($where!=""){
281 | $sql = "SELECT ".$fields_allowed." FROM ".$table." WHERE $where ORDER BY ".$order." ".$sort." LIMIT ".$limit.";";
282 | }else{
283 | $sql = "SELECT ".$fields_allowed." FROM ".$table." ORDER BY ".$order." ".$sort." LIMIT ".$limit.";";
284 | }
285 | }else{
286 | if($where!=""){
287 | $sql = "SELECT ".$fields_allowed." FROM ".$table." WHERE $where ORDER BY ".$order." ".$sort.";";
288 | }else{
289 | $sql = "SELECT ".$fields_allowed." FROM ".$table." ORDER BY ".$order." ".$sort.";";
290 | }
291 | }
292 | }else{
293 | if($limit!=""){
294 | if($where!=""){
295 | $sql = "SELECT ".$fields_allowed." FROM ".$table." WHERE $where LIMIT ".$limit.";";
296 | }else{
297 | $sql = "SELECT ".$fields_allowed." FROM ".$table." LIMIT ".$limit.";";
298 | }
299 | }else{
300 | if($where!=""){
301 | $sql = "SELECT ".$fields_allowed." FROM ".$table." WHERE $where;";
302 | }else{
303 | $sql = "SELECT ".$fields_allowed." FROM ".$table.";";
304 | }
305 | }
306 | }
307 |
308 | }else{
309 | //get the fields which are not in the black list
310 | $fields = $this->getFieldsByTable($table);
311 | $fields_allowed = "";
312 | for($i=0;$iexistItem("G", $table, $fields[$i])){
314 | if($fields_allowed == ""){
315 | $fields_allowed = $fields[$i];
316 | }else{
317 | $fields_allowed = $fields_allowed.",".$fields[$i];
318 | }
319 | }
320 | }
321 |
322 | if($order!=""){
323 | if($limit!=""){
324 | $sql = "SELECT $fields_allowed FROM ".$table." ORDER BY ".$order." ".$sort." LIMIT ".$limit.";";
325 | }else{
326 | $sql = "SELECT $fields_allowed FROM ".$table." ORDER BY ".$order." ".$sort.";";
327 | }
328 | }else{
329 | if($limit!=""){
330 | $sql = "SELECT $fields_allowed FROM ".$table." LIMIT ".$limit.";";
331 | }else{
332 | $sql = "SELECT $fields_allowed FROM ".$table.";";
333 | }
334 | }
335 | }
336 |
337 | $function = "";
338 |
339 | if($format!=""){
340 | $function = $format;
341 | }else{
342 | $function = "json";
343 | }
344 |
345 | if($option!=""){
346 | $opt = $option;
347 | }else{
348 | $opt = "";
349 | }
350 |
351 | if($function=="json"){
352 | header('Content-Type: application/json');
353 |
354 | if($opt == "numItem"){
355 | $conexion = $this->connectDB();
356 | $result = mysqli_query($conexion,$sql);
357 | $rawdata = mysqli_num_rows($result);
358 | $this->disconnectDB($conexion);
359 | }else{
360 | $rawdata = $this->getArraySQL($sql);
361 | }
362 |
363 | if(empty($rawdata)) die ($this->JSONError (302));
364 |
365 | $indices = "";
366 | $count = 0;
367 | for($i=1;$idisplayTable($sql);
386 | require_once 'mod/footer.php';
387 | }else if($function=="tree"){
388 | require_once 'mod/header.php';
389 | $rawdata = $this->getArraySQL($sql);
390 |
391 | $keyarray = "";
392 | $valuearray = "";
393 | for($i=0;$i";
405 | for($i=0;$i";
407 | echo "
";
408 | echo "";
409 | $count = 0;
410 | for($j=0;$j".$keyarray[$count].": ".$valuearray[$i][$j]."";
412 | $count++;
413 | echo "- ".$keyarray[$count].": ".$valuearray[$i][$j]."
";
414 | $count++;
415 | }
416 | echo "
";
417 | echo "";
418 | }
419 | echo "";
420 | require_once 'mod/footer.php';
421 | }else{
422 | die($this->JSONError(301));
423 | }
424 |
425 | }
426 |
427 | function postData($table,$post_parameters){
428 |
429 | $blacklist = new BlackList();
430 | /**
431 | * check the blacklist
432 | */
433 | $values = "";
434 | $columns = "";
435 | $values_array = "";
436 | $columns_array = "";
437 | $first_iteration = true;
438 | $counter = 0;
439 | while( list( $field, $value ) = each( $post_parameters )) {
440 | // Detect if it is a text or number
441 | $value = (is_numeric($value) ? $value : "'".$value."'");
442 | // join the string with (,) ie: value1,value2,value3
443 | $values .= ($first_iteration ? $value : ",".$value);
444 | $columns .= ($first_iteration ? $field : ",".$field);
445 | $values_array[$counter] = $value;
446 | $columns_array[$counter] = $field;
447 | $first_iteration = false;
448 | $counter++;
449 | }
450 |
451 | if($blacklist->existItem("G",$table,"*")) die($this->JSONError(401));
452 | if(!empty($post_parameters)){
453 | for($i=0;$iexistItem("G", $table, $columns_array[$i])) die($this->JSONError(401));
455 | }
456 | }
457 |
458 | /**
459 | * Create the sql sentence with the post parameters
460 | */
461 |
462 | if($values != ""){
463 | $sql = "INSERT INTO $table ($columns) VALUES ($values)";
464 | }
465 |
466 | $function = "json";
467 | if($function=="json"){
468 | header('Content-Type: application/json');
469 |
470 | $result = $this->setDataBySQL($sql);
471 |
472 | if(!$result) die ($this->JSONError (303));
473 | $indices = "";
474 | $rawdata = "";
475 | var_dump($columns_array);
476 | for($i=0;$iJSONError(301));
491 | }
492 | }
493 |
494 | }
495 | ?>
496 |
--------------------------------------------------------------------------------
/index.php:
--------------------------------------------------------------------------------
1 |
* @license Apache License, Version 2.0
* @link https://github.com/GeekyTheory/Automatic-API-REST
*/
require_once 'inc/functions.php';
require_once("inc/autentification.php");
require_once 'mod/header.php';
//VARIABLES DE PATH
if($_SERVER['SERVER_PORT'] == 80){
$urlNow = "http://".$_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF'];
$pathFolderAPI = "http://".$_SERVER['HTTP_HOST'];
}else{
$urlNow = "http://".$_SERVER['HTTP_HOST'].":".$_SERVER['SERVER_PORT'].$_SERVER['PHP_SELF'];
$pathFolderAPI = "http://".$_SERVER['HTTP_HOST'].":".$_SERVER['SERVER_PORT'];
}
$pathFolder = dirname($urlNow);
# Establecer la conexión a la Base de Datos
$tool = new Tools();
$conexion = $tool->connectDB();
# Consulta SQL que devuelve los nombres de las tablas de la Base de Datos
$tablas = mysqli_query($conexion,'SHOW TABLES') or die(require_once 'mod/footer.php');
//Objecto BlackList
$blacklist = new BlackList();
if(!isset($_GET["t"])){
require_once 'mod/modTable.php';
}else{
require_once 'mod/modFields.php';
}
#Cerrar la conexión a la Base de Datos
mysqli_close($conexion);
if(isset($_GET["t"])){
$urlJsonAPI = $pathFolderAPI."/api/get/".$_GET["t"]."/";
$viewTable = $pathFolder."/getData.php?f=table&t=".$_GET["t"];
$viewTree = $pathFolder."/getData.php?f=tree&t=".$_GET["t"];
$advance = $pathFolder."/advance.php?t=".$_GET["t"];
$objectTools = new Tools();
$fields = $objectTools->getFieldsByTable($_GET["t"]);
require_once 'mod/modCustomSelect.php';
//cerrar isset
}
require_once 'mod/footer.php';
?>
--------------------------------------------------------------------------------
/login.php:
--------------------------------------------------------------------------------
1 |
7 | * @license Apache License, Version 2.0
8 | * @link https://github.com/GeekyTheory/Automatic-API-REST
9 | */
10 |
11 | require_once 'config.php';
12 | $usr4 = "";
13 | if(isset($_POST["user"])){
14 | $user = $_POST["user"];
15 | $pass = $_POST["password"];
16 | $msg_error = "";
17 |
18 | if($user == USERADMIN){
19 | if($pass == PASSADMIN){
20 | //HABILITAR SESSION
21 | session_start();
22 | $_SESSION['useradmin'] = $user;
23 | $_SESSION['passadmin'] = $pass;
24 |
25 | //REEDIRIGIR
26 | header('Location: ./');
27 | }else{
28 | $msg_error = "INCORRECT PASS";
29 | }
30 | }else{
31 | $msg_error = "INCORRECT USER";
32 | }
33 |
34 | echo "";
35 | }
36 | ?>
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 | Login and Registration Form with HTML5 and CSS3
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
89 |
90 |
91 |
--------------------------------------------------------------------------------
/mod/footer.php:
--------------------------------------------------------------------------------
1 |
6 |
100 |
115 |
116 |
118 |
119 |
120 |