- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 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
function ru_title() {
global $locale, $lang, $settings;
define("DIVIDER", $locale['title-00']);
$title = "";
if (stristr($_SERVER['REQUEST_URI'],"news")){
$title = $locale['title-16'];
if (isset($_GET['readmore'])){
$result = dbquery("SELECT * FROM ".DB_PREFIX."news WHERE news_id='".$_GET['readmore']."'");
if (dbrows($result) != 0) {
$data = dbarray($result);
$title = $data["news_subject"].DIVIDER.$title;
}
}
}
elseif (stristr($_SERVER['REQUEST_URI'],"contact")){
$title = $locale['title-01'];
}
elseif (stristr($_SERVER['REQUEST_URI'],"edit_profile")){
$title = $locale['title-02'];
}
elseif (stristr($_SERVER['REQUEST_URI'],"lostpassword")){
$title = $locale['title-03'];
}
elseif (stristr($_SERVER['REQUEST_URI'],"messages")){
$title = $locale['title-04'];
}
elseif (stristr($_SERVER['REQUEST_URI'],"photogallery")){
$title = $locale['title-05'];
}
elseif (stristr($_SERVER['REQUEST_URI'],"profile")){
$title = $locale['title-06'];
}
elseif (stristr($_SERVER['REQUEST_URI'],"register")){
$title = $locale['title-07'];
}
elseif (stristr($_SERVER['REQUEST_URI'],"search")){
$title = $locale['title-08'];
}
elseif (stristr($_SERVER['REQUEST_URI'],"submit")){
$title = $locale['title-09'];
}
elseif (stristr($_SERVER['REQUEST_URI'],"downloads")){
if ($_SERVER['PHP_SELF'] !== "/infusions/mod_downloads/downloads.php"){ // Sky edition
$title = $lang['downloads_000'];
if (isset($_GET['cat_id'])){
$result = dbquery("SELECT * FROM ".DB_PREFIX."download_cats WHERE download_cat_id='".$_GET['cat_id']."'");
if (dbrows($result) != 0) {
$data = dbarray($result);
$title = $data["download_cat_name"].DIVIDER.$title;
}
}
}
}
return $title.(($title == "") ? ("") : (DIVIDER));
}
Споcоб реализации динамических заголовков для одной популярной CMS