-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
executable file
·423 lines (423 loc) · 16.5 KB
/
index.php
File metadata and controls
executable file
·423 lines (423 loc) · 16.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
<?php
require_once __DIR__.'/core.php';
\APLib\Core::init();
\APLib\Config::set(
'title',
'APLib - A PHP library to create your website smooth, easy & secure'
);
\APLib\FrontEnd::add(
array(
'command' => 'refresh',
'response' => array(
'command' => 'alert',
'title' => 'Welcome to APLib',
'message' => 'A PHP library to create your website smooth, easy & secure',
'type' => 'success',
'placement' => array(
'from' => 'bottom',
'align' => 'left'
)
)
)
);
\APLib\Response\Body::add(body());
\APLib\Core::run();
function body(){
ob_start(); ?>
<center><?php
echo \APLib\Bootstrap::navbar(
array(
array(
'action' => '#welcome',
'menu' => '',
'label' => 'Welcome'
),
array(
'action' => '#brief',
'menu' => '',
'label' => 'Brief'
)
,
array(
'menu' => '',
'action' => '#thumbs',
'label' => 'Components',
'left' => ''
),
array(
'menu' => '',
'dropmenu' => '',
'items' => array(
array('#saying1', 'Innovation'),
array('divider', ''),
array('#saying2', 'Creativity')
),
'label' => 'My Secrets'
),
array(
'menu' => '',
'action' => '#todo',
'label' => 'To-Do',
'left' => ''
)
),
array(
'title' => 'APLib',
'action' => APLibHTML,
'id' => 'mainNav',
'collapses' => '',
'sr text' => 'APLib Navbar'
),
3,
false
);
\APLib\Response\Body\CSS::add("body {background-color: #eee;} #mainNav{ z-index: 1000; width: 100%;}");
\APLib\Bootstrap::affix("#mainNav", 0);
\APLib\Response\Body\JavaScript::add(
"$('#mainNav a').on('click', function(event){
if (this.hash !== ''){
event.preventDefault();
var hash = this.hash;
$('html, body').animate({ scrollTop: $(hash).offset().top-50 }, 1500, function(){
$(hash).css({ border: '0px solid #00ff00' }).animate({ borderWidth: 4 }, 100, function(){
$(this).animate({ borderWidth: 0 }, 100)
});
});
}
});"
);
\APLib\Bootstrap::scrollspy('body', '#mainNav', 100);
echo \APLib\Bootstrap::jumbotron(
'Welcome to APLib',
'A PHP library to create your '.\APLib\Bootstrap::keyboard('website').' smooth, easy & secure',
3,
'welcome'
);
echo "\r\n <div id='brief'>";
echo \APLib\Bootstrap::dl(
'Brief',
'A brief of what '.\APLib\Bootstrap::keyboard('APLib').' is.',
array(
array('A PHP Library', 'A library full of ready-to-use components to help you create your website fast.'),
array('ALMA PRO Library', 'Created with the sight of a hacker. Security, Automation & Hackablity.'),
// array('Omar Almalol Library', 'A leading PHP library created with the porpuse of showing newbie websites\' creators the '.\APLib\Bootstrap::mark('difference').' between<BR> a '.\APLib\Bootstrap::abbreviation(\APLib\Bootstrap::keyboard('PHP').' developer', "A coder who writes PHP code.\r\nA REAL developer.").' & a '.\APLib\Bootstrap::abbreviation(\APLib\Bootstrap::code('WordPress').' developer', "A fool who thinks editing WordPress templates is developing :/").'.')
),
4
);
echo "\r\n </div>";
echo "\r\n <div id='thumbs'>";
echo "\r\n ".\APLib\Bootstrap::well(
'<h1>What forms '.\APLib\Bootstrap::code('APLib').'</h1>',
'well-lg'
);
echo \APLib\Bootstrap::thumbnails(
array(
array(
'url' => 'http://php.net/manual/en/intro-whatis.php',
'image' => \APLib\Extras::NormalizePath(APLibHTML.'../imgs/logos/PHP.png'),
'alt' => 'PHP',
'caption' => 'PHP (Hypertext Preprocessor): a widely-used open source general-purpose scripting language that is especially suited for web development and can be embedded into HTML.'
),
array(
'url' => 'https://en.wikipedia.org/wiki/HTML5',
'image' => \APLib\Extras::NormalizePath(APLibHTML.'../imgs/logos/html5.png'),
'alt' => 'HTML5',
'caption' => 'HTML5 is a markup language used for structuring and presenting content on the World Wide Web. It is the fifth and current major version of the HTML standard.'
),
array(
'url' => 'https://en.wikipedia.org/wiki/JavaScript',
'image' => \APLib\Extras::NormalizePath(APLibHTML.'../imgs/logos/js.png'),
'alt' => 'JavaScript',
'caption' => 'JavaScript (often abbreviated as JS): a high-level, dynamic, weakly typed, prototype-based, multi-paradigm, and interpreted programming language.'
),
array(
'url' => 'https://developer.mozilla.org/en/docs/Web/CSS/CSS3',
'image' => \APLib\Extras::NormalizePath(APLibHTML.'../imgs/logos/css3.png'),
'alt' => 'CSS3',
'caption' => 'CSS3 is the latest evolution of the Cascading Style Sheets language and aims at extending CSS2.1. It brings a lot of long-awaited novelties, like rounded corners, shadows, gradients, transitions or animations, as well as new layouts like multi-columns, flexible box or grid layouts.'
),
array(
'url' => 'https://jquery.com/',
'image' => \APLib\Extras::NormalizePath(APLibHTML.'../imgs/logos/jquery.svg'),
'alt' => 'jQuery',
'caption' => 'jQuery is a fast, small, and feature-rich JavaScript library. It makes things like HTML document traversal and manipulation, event handling, animation, and Ajax much simpler with an easy-to-use API that works across a multitude of browsers. With a combination of versatility and extensibility, jQuery has changed the way that millions of people write JavaScript.'
),
array(
'url' => 'https://jqueryui.com/',
'image' => \APLib\Extras::NormalizePath(APLibHTML.'../imgs/logos/jquery-ui.png'),
'alt' => 'jQuery UI',
'caption' => 'jQuery UI is a curated set of user interface interactions, effects, widgets, and themes built on top of the jQuery JavaScript Library. Whether you\'re building highly interactive web applications or you just need to add a date picker to a form control, jQuery UI is the perfect choice.'
),array(
'url' => 'https://getbootstrap.com/',
'image' => \APLib\Extras::NormalizePath(APLibHTML.'../imgs/logos/bootstrap.png'),
'alt' => 'Bootstrap',
'caption' => 'Bootstrap is a free and open-source front-end web framework for designing websites and web applications.'
),
array(
'url' => 'http://fontawesome.io/',
'image' => \APLib\Extras::NormalizePath(APLibHTML.'../imgs/logos/fontawesome.png'),
'alt' => 'Font-Awesome',
'caption' => 'Font Awesome is a font and icon toolkit based on CSS and LESS. It was made by Dave Gandy for use with Twitter Bootstrap, and later was incorporated into the BootstrapCDN.'
),
array(
'url' => 'https://github.com/daneden/animate.css/',
'image' => \APLib\Extras::NormalizePath(APLibHTML.'../imgs/logos/animate.css.png'),
'alt' => 'Animate.css',
'caption' => 'Animate.css is a bunch of cool, fun, and cross-browser animations for you to use in your projects. Great for emphasis, home pages, sliders, and general just-add-water-awesomeness.'
),
array(
'url' => 'https://www.highcharts.com/',
'image' => \APLib\Extras::NormalizePath(APLibHTML.'../imgs/logos/highcharts.png'),
'alt' => 'HighCharts',
'caption' => 'Highcharts is a charting library written in pure JavaScript, offering an easy way of adding interactive charts to your web site or web application.'
),
array(
'url' => 'https://github.com/rendro/easy-pie-chart',
'image' => \APLib\Extras::NormalizePath(APLibHTML.'../imgs/logos/easypiechart.jpg'),
'alt' => 'Easy Pie Chart',
'caption' => 'Easy Pie Chart is a lightweight plugin to draw simple, animated pie charts for single values.'
),
array(
'url' => 'http://bootstrap-notify.remabledesigns.com/',
'image' => \APLib\Extras::NormalizePath(APLibHTML.'../imgs/logos/bootstrap-notify.png'),
'alt' => 'Bootstrap Notify',
'caption' => 'Bootstrap Notify formally known as Bootstrap notify was renamed at version 3.0.0. This project originally started out to be a pull request for <a href="https://github.com/ifightcrime/bootstrap-notify" target="_blank">ifightcrime\'s Bootstrap notify</a> plugin, but quickly grew into it\'s own. This is the reason the two plugins shared a name and I chose that it was time that my plugin got its own name.'
),
array(
'url' => 'https://select2.org',
'image' => \APLib\Extras::NormalizePath(APLibHTML.'../imgs/logos/select2.png'),
'alt' => 'Select2',
'caption' => 'The jQuery replacement for select boxes<BR><BR>Select2 gives you a customizable select box with support for searching, tagging, remote data sets, infinite scrolling, and many other highly used options.'
),
array(
'url' => 'http://fancyapps.com/fancybox/3/',
'image' => \APLib\Extras::NormalizePath(APLibHTML.'../imgs/logos/fancybox.png'),
'alt' => 'fancyBox3',
'caption' => 'jQuery lightbox script for displaying images, videos and more.<BR>Touch enabled, responsive and fully customizable. '
),
array(
'url' => 'http://gijsroge.github.io/tilt.js/',
'image' => \APLib\Extras::NormalizePath(APLibHTML.'../imgs/logos/tilt.js.png'),
'alt' => 'Tilt.js',
'caption' => 'A tiny requestAnimationFrame powered 60+fps lightweight parallax hover tilt effect for jQuery.'
),
array(
'url' => 'https://jonsuh.com/hamburgers/',
'image' => \APLib\Extras::NormalizePath(APLibHTML.'../imgs/logos/hamburgers.gif'),
'alt' => 'Hamburgers',
'caption' => 'Tasty CSS-animated hamburgers.'
),
array(
'url' => 'http://chartjs.org/',
'image' => \APLib\Extras::NormalizePath(APLibHTML.'../imgs/logos/chart.js.svg'),
'alt' => 'Chart.js',
'caption' => 'Simple yet flexible JavaScript charting for designers & developers.'
),
array(
'url' => 'http://responsiveslides.com/',
'image' => \APLib\Extras::NormalizePath(APLibHTML.'../imgs/logos/responsiveslides.js.png'),
'alt' => 'ResponsiveSlides.js',
'caption' => 'Simple & lightweight responsive slider plugin (in 1kb).'
)
),
4
);
\APLib\Response\Body\JavaScript::add('$("img[src*=\'tilt.js.png\']").tilt({scale: 1.1, glare: true, maxGlare: .6, speed: 400, maxtilt: 50, perspective: 500});');
echo "\r\n </div>";
echo "\r\n <div id='saying1'>";
echo \APLib\Bootstrap::blockquote(
"Variety of thinking is the mother of innovation.",
"Omar Almalol",
4
);
echo "\r\n </div>";
echo "\r\n <div id='saying2'>";
echo \APLib\Bootstrap::blockquote(
"Diversity is the mother of creativity.",
"Unknown",
4
);
echo "\r\n </div>";
echo \APLib\Bootstrap::table(
array('Name', 'Function', 'Feature', 'Upgrade', 'Description', 'Progress'),
array(
array(
'Examples',
'',
\APLib\Bootstrap::icon(\APLib\Bootstrap::ICON_CHECK),
'',
'Usage examples of each Function & Feature in the library and how to create specific website desings using the APLib.',
\APLib\Bootstrap::progress(
array(
array(
'extra classes' => 'progress-bar-success progress-bar-striped active',
'width' => '70',
'value now' => '70',
'value min' => '0',
'value max' => '100'
)
),
9
)
),
array(
'Complete Components',
'',
'',
\APLib\Bootstrap::icon(\APLib\Bootstrap::ICON_CHECK),
'Include all bootstrap\'s components as well as all other APLib components\' functionalities.',
\APLib\Bootstrap::progress(
array(
array(
'extra classes' => 'progress-bar-danger progress-bar-striped active',
'width' => '30',
'value now' => '30',
'value min' => '0',
'value max' => '100'
)
),
9
)
),
array(
'Object-alike elements',
'',
\APLib\Bootstrap::icon(\APLib\Bootstrap::ICON_CHECK),
'',
"This feature is planned before the library's first publish, but it will take a lot of work and time, so it's been delayed.<BR>This feature will allow you to customize your elements before you render them. As well as the ability to remove/add certain things from/to elements themselves.",
\APLib\Bootstrap::progress(
array(
array(
'extra classes' => 'progress-bar-danger progress-bar-striped active',
'width' => '10',
'value now' => '10',
'value min' => '0',
'value max' => '100'
)
),
9
)
),
array(
'Render',
\APLib\Bootstrap::icon(\APLib\Bootstrap::ICON_CHECK),
'',
'',
'A function to be used with \'Object-alike elements\' after they\'ve been fully customized.',
\APLib\Bootstrap::progress(
array(
array(
'extra classes' => 'progress-bar-danger progress-bar-striped active',
'width' => '10',
'value now' => '10',
'value min' => '0',
'value max' => '100'
)
),
9
)
),
array(
'Fully Responsive View',
'',
'',
\APLib\Bootstrap::icon(\APLib\Bootstrap::ICON_CHECK),
'Create costume CSS/CSS3 style sheets to make website\'s elements as responsive as possible on different screen sizes.',
\APLib\Bootstrap::progress(
array(
array(
'extra classes' => 'progress-bar-success progress-bar-striped active',
'width' => '90',
'value now' => '90',
'value min' => '0',
'value max' => '100'
)
),
9
)
),
array(
'Support Needs',
'',
\APLib\Bootstrap::icon(\APLib\Bootstrap::ICON_CHECK),
'',
'Add support to User Login, Multiple Views, Files\' Upload handling, Forms Inputs\' filtering, etc...',
\APLib\Bootstrap::progress(
array(
array(
'extra classes' => 'progress-bar-warning',
'width' => '50',
'value now' => '50',
'value min' => '0',
'value max' => '100'
)
),
9
)
),
array(
'Privacy',
'',
\APLib\Bootstrap::icon(\APLib\Bootstrap::ICON_CHECK),
'',
'A feature aiming on encrypting traffic between the client & the server in a way that even the server\'s monitoring system won\'t know what\'s being transferred.',
\APLib\Bootstrap::progress(
array(
array(
'extra classes' => 'progress-bar-danger',
'width' => '5',
'value now' => '5',
'value min' => '0',
'value max' => '100'
)
),
8
)
),
array(
'Detect Attacks',
'',
'',
\APLib\Bootstrap::icon(\APLib\Bootstrap::ICON_CHECK),
'Detect attacks based on the behaviour of certain requests & clients.',
\APLib\Bootstrap::progress(
array(
array(
'extra classes' => 'progress-bar-warning progress-bar-striped active',
'width' => '65',
'value now' => '65',
'value min' => '0',
'value max' => '100'
)
),
8
)
),
array(
'Block Attacks',
'',
'',
\APLib\Bootstrap::icon(\APLib\Bootstrap::ICON_CHECK),
'An upgrade of Security which comes to bring a sense of challenge to those attackers & pentesters whom trying to break-in. Still, nothing to worry about in present.',
\APLib\Bootstrap::progress(
array(
array(
'extra classes' => 'progress-bar-danger progress-bar-striped active',
'width' => '20',
'value now' => '20',
'value min' => '0',
'value max' => '100'
)
),
8
)
)
),
3,
'todo'
);
echo "\r\n"; ?>
</center><?php
return ob_get_clean();
}
?>