-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtemplates.php
55 lines (44 loc) · 1.4 KB
/
templates.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
50
51
52
53
54
55
<?php /*
Conposr Framework (a Composr-lite designed for standalone projects)
Copyright (c) ocProducts, 2004-2018
*/
/**
* @license http://opensource.org/licenses/cpal_1.0 Common Public Attribution License
* @copyright ocProducts Ltd
* @package conposr
*/
function globalise($title, $middle)
{
return do_template('GLOBAL_HTML_WRAP', array('TITLE' => $title, 'MIDDLE' => $middle));
}
function inform_exit($text)
{
require_code('failure');
set_throw_errors(false);
_generic_exit($text, 'INFORM_SCREEN');
}
function warn_exit($text)
{
require_code('failure');
_generic_exit($text, 'WARN_SCREEN');
}
function fatal_exit($text, $_trace = null)
{
require_code('failure');
_fatal_exit($text, $_trace);
}
function form_input_hidden($name, $value)
{
return '<input type="hidden" name="' . escape_html($name) . '" value="' . escape_html($value) . '" />';
}
function form_input_list_entry($value, $selected, $text)
{
return '<option value="' . escape_html($value) . '"' . ($selected ? ' selected="selected"' : '') . '>' . escape_html($text) . '</option>';
}
function form_input_radio_entry($name, $value, $selected = false, $text = '')
{
if ($text == '') {
$text = $value;
}
return '<input type="radio" name="' . escape_html($name) . '" value="' . escape_html($value) . '"' . ($selected ? ' checked="checked"' : '') . '>' . escape_html($text) . '</option>';
}