Revision 1310
Added by Dietmar over 14 years ago
frontend.functions.php | ||
---|---|---|
69 | 69 |
} |
70 | 70 |
|
71 | 71 |
// Frontend functions |
72 |
if (!function_exists('page_link')) { |
|
72 |
if (!function_exists('page_link')) |
|
73 |
{ |
|
73 | 74 |
function page_link($link) { |
74 | 75 |
global $wb; |
75 | 76 |
return $wb->page_link($link); |
76 | 77 |
} |
77 | 78 |
} |
78 | 79 |
|
80 |
if (!function_exists('get_page_link')) |
|
81 |
{ |
|
82 |
function get_page_link( $id ) |
|
83 |
{ |
|
84 |
global $database; |
|
85 |
// Get link |
|
86 |
$sql = 'SELECT `link` FROM `'.TABLE_PREFIX.'pages` WHERE `page_id` = '.$id; |
|
87 |
$link = $database->get_one( $sql ); |
|
88 |
return $link; |
|
89 |
} |
|
90 |
} |
|
91 |
|
|
79 | 92 |
//function to highlight search results |
80 | 93 |
if(!function_exists('search_highlight')) { |
81 | 94 |
function search_highlight($foo='', $arr_string=array()) { |
... | ... | |
107 | 120 |
$foo .= $match; |
108 | 121 |
} |
109 | 122 |
} |
110 |
|
|
123 |
|
|
111 | 124 |
if(DEFAULT_CHARSET != 'utf-8') { |
112 | 125 |
$foo = umlauts_to_entities($foo, 'UTF-8'); |
113 | 126 |
} |
... | ... | |
123 | 136 |
$wb->menu_item_template=$item_template; |
124 | 137 |
$wb->menu_item_footer=''; |
125 | 138 |
$wb->menu_parent = $parent; |
126 |
$wb->menu_header = $menu_header;
|
|
139 |
$wb->menu_header = $menu_header; |
|
127 | 140 |
$wb->menu_footer = $menu_footer; |
128 | 141 |
$wb->menu_default_class = $default_class; |
129 | 142 |
$wb->menu_current_class = $current_class; |
130 |
$wb->menu_recurse = $recurse+2;
|
|
143 |
$wb->menu_recurse = $recurse+2; |
|
131 | 144 |
$wb->menu(); |
132 | 145 |
unset($wb->menu_parent); |
133 | 146 |
unset($wb->menu_number); |
... | ... | |
205 | 218 |
// Include page content |
206 | 219 |
if(!defined('PAGE_CONTENT') OR $block!=1) |
207 | 220 |
{ |
208 |
$page_id=$wb->page_id;
|
|
221 |
$page_id = intval($wb->page_id);
|
|
209 | 222 |
// set session variable to save page_id only if PAGE_CONTENT is empty |
210 | 223 |
$_SESSION['PAGE_ID'] = !isset($_SESSION['PAGE_ID']) ? $page_id : $_SESSION['PAGE_ID']; |
211 | 224 |
// set to new value if page_id changed and not 0 |
212 |
if(($page_id != 0) AND ($_SESSION['PAGE_ID'] <> $page_id))
|
|
225 |
if(($page_id != 0) && ($_SESSION['PAGE_ID'] <> $page_id))
|
|
213 | 226 |
{ |
214 | 227 |
$_SESSION['PAGE_ID'] = $page_id; |
215 | 228 |
} |
... | ... | |
390 | 403 |
|
391 | 404 |
function bind_jquery ($file_id='jquery') |
392 | 405 |
{ |
406 |
|
|
393 | 407 |
$jquery_links = ''; |
394 | 408 |
/* include the Javascript jquery api */ |
395 | 409 |
if( $file_id == 'jquery' AND file_exists(WB_PATH .'/include/jquery/jquery-min.js')) |
... | ... | |
403 | 417 |
."</script>\n"; |
404 | 418 |
|
405 | 419 |
$jquery_links .= '<script src="'.WB_URL.'/include/jquery/jquery-min.js" type="text/javascript"></script>'."\n"; |
406 |
$jquery_links .= '<script src="'.WB_URL.'/include/jquery/jquery-ui-min.js" type="text/javascript"></script>'."\n"; |
|
407 | 420 |
$jquery_links .= '<script src="'.WB_URL.'/include/jquery/jquery-insert.js" type="text/javascript"></script>'."\n"; |
408 | 421 |
/* workout to insert ui.css and theme */ |
409 | 422 |
$jquery_theme = WB_PATH.'/modules/jquery/jquery_theme.js'; |
Also available in: Unified diff
Ticket 963 Minor XSS issue in admin login
update jquery-ui-min.js from 1.7.2 to 1.8.0
Fixed typo in the english language file