Subversion Repositories web.creative

Rev

Rev 15 | Details | Compare with Previous | Last modification | View Log

Rev Author Line No. Line
1 mjordaan 1
<?php
2
# vim:et:ts=3:sts=3:sw=3:
3
 
4
// RLD Creative base functions
5
// Copyright (C) 2017 RLD Creative
6
//
7
 
16 mjordaan 8
//load configuration settings
9
include_once( get_approot()."/include/config_inc.php");
10
 
11
 
1 mjordaan 12
/* ======================================================================
13
 * Function get_docroot()
14
 * Parameters: 
16 mjordaan 15
 * Returns: 
1 mjordaan 16
 *
16 mjordaan 17
 * Return the registered company name.
1 mjordaan 18
 * ====================================================================== */
19
function get_company() {
20
  global $config;
21
 
22
  echo( $config["company"]);
23
}
24
 
16 mjordaan 25
/* ======================================================================
26
 * Function get_docroot()
27
 * Parameters: 
28
 * Returns: 
29
 *
30
 * Return the configured page title.
31
 * ====================================================================== */
1 mjordaan 32
function get_title() {
33
  global $config;
34
 
35
  echo( $config["title"]);
36
}
37
 
16 mjordaan 38
/* ======================================================================
39
 * Function get_docroot()
40
 * Parameters: 
41
 * Returns: 
42
 *
43
 * Return home page url.
44
 * ====================================================================== */
1 mjordaan 45
function get_homepage() {
46
 
47
  echo('/');  
48
}
49
 
16 mjordaan 50
/* ======================================================================
51
 * Function get_docroot()
52
 * Parameters: 
53
 * Returns: 
54
 *
55
 * return the configured page title.
56
 * ====================================================================== */
1 mjordaan 57
function get_page_title() {
58
  global $page_title;
59
 
60
  $page = basename($_SERVER["SCRIPT_FILENAME"], '.php');
61
 
62
	if (empty($page_title[$page])) {
63
    echo( $page_title["index"]);
64
  } else {
65
    echo( $page_title[$page]); 
66
  }
67
}
68
 
16 mjordaan 69
/* ======================================================================
70
 * Function get_docroot()
71
 * Parameters: 
72
 * Returns: 
73
 *
74
 * set actuele kleurschema.
75
 * ====================================================================== */
1 mjordaan 76
function set_kleurschema( $schema = 0) {
77
  global $config;
78
 
79
  $config["kleurschema"] = $schema;
80
}
81
 
16 mjordaan 82
/* ======================================================================
83
 * Function get_docroot()
84
 * Parameters: 
85
 * Returns: 
86
 *
87
 * .
88
 * ====================================================================== */
1 mjordaan 89
function get_kleur( $index = 0, $hash = 1) {
90
 global $kleur_hexa, $config;
91
 
92
  $x = $config["kleurschema"];
93
 
94
  if ($index < 0) {$index = 0;}
95
  if ($index > 6) {$index = 6;}
96
  if ($index > 4) {$x = 0;}
97
  if ($hash != 0) { 
98
    echo( '#'.$kleur_hexa[$x][$index]);
99
  }
100
  else {
101
    echo( $kleur_hexa[$x][$index]);
102
  }
103
}
104
 
16 mjordaan 105
/* ======================================================================
106
 * Function get_docroot()
107
 * Parameters: 
108
 * Returns: 
109
 *
110
 * .
111
 * ====================================================================== */
1 mjordaan 112
function get_kleur_a( $index = 0) {
113
 global $kleur_rgba, $config;
114
 
115
  $x = $config["kleurschema"];
116
 
117
  if ($index < 0) {$index = 0;}
118
  if ($index > 6) {$index = 6;}
119
  if ($index > 4) {$x = 0;}
120
 
121
  echo( $kleur_rgba[$x][$index]);
122
}
123
 
124
?>
125
 
126