forked from sajhu/FurrySkeleton
-
Notifications
You must be signed in to change notification settings - Fork 0
/
core.View.php
49 lines (41 loc) · 1.21 KB
/
core.View.php
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
<?php
/**
* FurrySkeleton WebApp Framework
* for quick developement of Bootstrap based PHP apps.
*
* Developed by:
* Santiago Rojas - www.santiagorojas.co
*
* check for latest updates at https://github.com/sajhu/FurrySkeleton
*/
/**
* Prints the page
* @param $title string the title to display in the page header
* @param $title string/path the path to include inside template's content
*/
function printPage($titleN = DEFAULT_TITLE, $includeN)
{
global $title;
$title = $titleN;
global $include;
$include = $includeN;
include_once(STATIC_FOLDER. 'template.inc');
}
/**
* Prints an error message badge
* @param $errorMessage string the error message to be displayed, can contain HTML inside
* @param $total boolean wether to display the message in an entire page and die (true) or just the badge (false)
*/
function printError($errorMessage, $total = FALSE)
{
if(!$total)
echo '
<div class="alert alert-block alert-error">
<button type="button" class="close" data-dismiss="alert">×</button>
<h4>¡Error!</h4>
<p>'.$errorMessage.'</p>
</div>
<a href="#" class="btn btn-large text-center" onclick="history.back();">Volver</a>
';
}
?>