PageRenderTime 50ms CodeModel.GetById 17ms RepoModel.GetById 0ms app.codeStats 0ms

/modules/system/templates.php

https://github.com/foxadmin/ReloadCMS
PHP | 487 lines | 455 code | 21 blank | 11 comment | 118 complexity | 6327ea9dd0c77e35afaf925d6fb13c23 MD5 | raw file
Possible License(s): Apache-2.0, BSD-3-Clause, LGPL-2.1
  1. <?php
  2. ////////////////////////////////////////////////////////////////////////////////
  3. // Copyright (C) ReloadCMS Development Team //
  4. // http://reloadcms.com //
  5. // This product released under GNU General Public License v2 //
  6. ////////////////////////////////////////////////////////////////////////////////
  7. function user_tz_select($default = 0, $select_name = 'timezone') {
  8. global $lang;
  9. $tz_select = '<select name="' . $select_name . '">';
  10. while(list($offset, $zone) = @each($lang['tz'])) {
  11. $selected = ( $offset == $default ) ? ' selected="selected"' : '';
  12. $tz_select .= '<option value="' . $offset . '"' . $selected . '>' . $zone . '</option>';
  13. }
  14. $tz_select .= '</select>';
  15. return $tz_select;
  16. }
  17. function user_skin_select($dir, $select_name, $default = '', $style = '', $script = '') {
  18. $skins = rcms_scandir($dir);
  19. $frm = '<select name="' . $select_name . '" style="' . $style . '" ' . $script . '>';
  20. foreach ($skins as $skin){
  21. if(is_dir($dir . $skin) && is_file($dir . $skin . '/skin_name.txt')){
  22. $name = file_get_contents($dir . $skin . '/skin_name.txt');
  23. $frm .= '<option value="' . $skin . '"' . (($default == $skin) ? ' selected="selected">' : '>') . $name . '</option>';
  24. }
  25. }
  26. $frm .= '</select>';
  27. return $frm;
  28. }
  29. function user_lang_select($select_name, $default = '', $style = '', $script = '') {
  30. global $system;
  31. $frm = '<select name="' . $select_name . '" style="' . $style . '" ' . $script . '>';
  32. foreach ($system->data['languages'] as $lang_id => $lang_name){
  33. $frm .= '<option value="' . $lang_id . '"' . (($default == $lang_id) ? ' selected="selected">' : '>') . $lang_name . '</option>';
  34. }
  35. $frm .= '</select>';
  36. return $frm;
  37. }
  38. function rcms_pagination($total, $perpage, $current, $link){
  39. $return = '';
  40. $link = preg_replace("/((&amp;|&)page=(\d*))/", '', $link);
  41. if(!empty($perpage)) {
  42. $pages = ceil($total/$perpage);
  43. if($pages != 1){
  44. $c = 1;
  45. while($c <= $pages){
  46. if($c != $current) $return .= ' [' . '<a href="' . $link . '&amp;page=' . $c . '">' . $c . '</a>] ';
  47. else $return .= ' [' . $c . '] ';
  48. $c++;
  49. }
  50. }
  51. }
  52. return $return;
  53. }
  54. function rcms_parse_menu($format) {
  55. global $system;
  56. $navigation = parse_ini_file(CONFIG_PATH . 'navigation.ini', true);
  57. $dyna = parse_ini_file(CONFIG_PATH . 'dynamik.ini', true);
  58. $result = array();
  59. foreach ($navigation as $link) {
  60. if(substr($link['url'], 0, 9) == 'external:') {
  61. $target = '_blank';
  62. $link['url'] = substr($link['url'], 9);
  63. } else {
  64. $target = '';
  65. }
  66. $tdata = explode(':', $link['url'], 2);
  67. if(count($tdata) == 2){
  68. list($modifier, $value) = $tdata;
  69. } else {
  70. $modifier = $tdata[0];
  71. }
  72. if(!empty($value) && !empty($system->navmodifiers[$modifier])){
  73. if($clink = call_user_func($system->navmodifiers[$modifier]['m'], $value)){
  74. $result[] = array($clink[0], (empty($link['name'])) ? $clink[1] : __($link['name']), $target);
  75. }
  76. } else {
  77. $result[] = array($link['url'], __($link['name']));
  78. }
  79. }
  80. $menu = '';
  81. foreach ($result as $item){
  82. if(empty($item[2])) {
  83. $item[2] = '_top';
  84. }
  85. if (isset($dyna['ico'])) { //enable icons?
  86. $icon = str_replace('?module=', '', $item[0]).'.png';
  87. if (is_file(RCMS_ROOT_PATH.'skins/icons/'.$icon))
  88. $item[3] = '<img src="skins/icons/'.$icon.'" alt="'.@$item[3].'"/>';
  89. else $item[3] = '<img src="skins/icons/default.png " alt="'.@$item[3].'"/>';
  90. }
  91. else $item[3]='';
  92. $menu .= str_replace('{link}', $item[0], str_replace('{title}', $item[1], str_replace('{target}', @$item[2], str_replace('{icon}', $item[3], $format))));
  93. }
  94. $result = $menu;
  95. return $result;
  96. }
  97. function rcms_parse_dynamik_menu($format) {
  98. global $system;
  99. function convertArray($ar){
  100. $var = '{ ';
  101. foreach ($ar as $key=>$val ){
  102. $var .= '"'.$key.'" : ';
  103. if ( is_array( $val ) ){
  104. $var .= convertArray($val).', ';
  105. } else {
  106. $var .= '"'.$val.'", ';
  107. }
  108. }
  109. if ($var[strlen($var)-2] == ',') $var[strlen($var)-2] = ' ';
  110. return $var.'} ';
  111. }
  112. //$pic_right = '&nbsp;&nbsp;<b>•</b> ';
  113. //Commented becouse fucking IE, Microsoft, Gates and his mother...
  114. $pic_right = '&nbsp;<img src = \''.SKIN_PATH.'arrow_right.gif\'>';
  115. $pic_down = '<img src = \''.SKIN_PATH.'arrow_down.gif\' alt="down"/>';
  116. $navigation = parse_ini_file(CONFIG_PATH . 'navigation.ini', true);
  117. $dyna = parse_ini_file(CONFIG_PATH . 'dynamik.ini', true);
  118. $result = array();
  119. foreach ($navigation as $link) {
  120. if(substr($link['url'], 0, 9) == 'external:') {
  121. $target = '_blank';
  122. $link['url'] = substr($link['url'], 9);
  123. } else {
  124. $target = '';
  125. }
  126. $tdata = explode(':', $link['url'], 2);
  127. if(count($tdata) == 2){
  128. list($modifier, $value) = $tdata;
  129. } else {
  130. $modifier = $tdata[0];
  131. }
  132. if(!empty($value) && !empty($system->navmodifiers[$modifier])){
  133. if($clink = call_user_func($system->navmodifiers[$modifier]['m'], $value)){
  134. $result[] = array($clink[0], (empty($link['name'])) ? $clink[1] : __($link['name']), $target);
  135. }
  136. } else {
  137. $result[] = array($link['url'], __($link['name']));
  138. }
  139. }
  140. $menu = ' <script type="text/javascript" src="./tools/js/navigation.js"></script> <div class="dhtml_menu"> <div class="horz_menu"> ';
  141. foreach ($result as $item){
  142. if(empty($item[2])) {
  143. $item[2] = '_top';
  144. }
  145. if(empty($item[4])) {
  146. $item[4] = '';
  147. }
  148. // Begin of Icons support by Migel
  149. //$arr = array();
  150. if ($item[0] == '?module=articles') {
  151. if (!isset($dyna['use_art'])){
  152. $articles = new articles();
  153. $containers = $articles -> getContainers();
  154. $count = 0;
  155. if (is_array($containers)){
  156. $item[1] .= '&nbsp;'.$pic_down;
  157. $containers = array_reverse($containers);
  158. foreach ($containers as $conkey => $conval) {
  159. $count++;
  160. if ($count != $dyna['max']) {
  161. $arr['ddm_article']['&nbsp;&nbsp; '.cut_text($conval).'&nbsp;&nbsp; '] = '?module=articles&c='.$conkey;
  162. if (!isset($dyna['min'])){
  163. $articles -> setWorkContainer($conkey);
  164. $art = $articles -> getCategories();
  165. $count2 = 0;
  166. if (is_array($art)){
  167. unset($arr['ddm_article']['&nbsp;&nbsp; '.cut_text($conval).'&nbsp;&nbsp; ']);
  168. $arr['ddm_article'][$pic_right.'&nbsp;&nbsp; '.cut_text($conval).'&nbsp;&nbsp; '] = array('-' => '?module=articles&c='.$conkey);
  169. $art = array_reverse($art);
  170. foreach ($art as $artkey => $artval){
  171. $count2++;
  172. if ($count2 != $dyna['max']) {
  173. $arr['ddm_article'][$pic_right.'&nbsp;&nbsp; '.cut_text($conval).'&nbsp;&nbsp; ']['&nbsp;&nbsp; '.cut_text($artval['title']).'&nbsp;&nbsp;'] = '?module=articles&c='.$conkey.'&b='.$artval['id'];
  174. $art2 = $articles -> getArticles($artval['id']);
  175. $count3 = 0;
  176. if (count($art2) > 0){
  177. unset($arr['ddm_article'][$pic_right.'&nbsp;&nbsp; '.cut_text($conval).'&nbsp;&nbsp; ']['&nbsp;&nbsp; '.cut_text($artval['title']).'&nbsp;&nbsp;']);
  178. $arr['ddm_article'][$pic_right.'&nbsp;&nbsp; '.cut_text($conval).'&nbsp;&nbsp; '][$pic_right.'&nbsp;&nbsp; '.cut_text($artval['title']).'&nbsp;&nbsp;'] = array('-' => '?module=articles&c='.$conkey.'&b='.$artval['id']);
  179. $art2 = array_reverse($art2);
  180. foreach ($art2 as $art2key => $art2val){
  181. $count3++;
  182. if ($count3 != $dyna['max'])
  183. $arr['ddm_article'][$pic_right.'&nbsp;&nbsp; '.cut_text($conval).'&nbsp;&nbsp; '][$pic_right.'&nbsp;&nbsp; '.cut_text($artval['title']).'&nbsp;&nbsp;']['&nbsp;&nbsp;'.cut_text($art2val['title']).'&nbsp;&nbsp;'] = '?module=articles&c='.$conkey.'&b='.$artval['id'].'&a='.$art2val['id'];
  184. }
  185. }
  186. }
  187. }
  188. }
  189. }
  190. }
  191. }
  192. }
  193. $item[4] = 'ddm_article';
  194. }
  195. $item[3] = 'articles.png';
  196. } elseif ($item[0] == '?module=gallery') {
  197. if (!isset($dyna['use_gal'])){
  198. $gallery = new gallery();
  199. $kw = $gallery -> getAvaiableValues('keywords');
  200. $count = 0;
  201. if (is_array($kw)){
  202. $kw = array_reverse($kw);
  203. $count++;;
  204. if (!isset($dyna['min']))
  205. foreach($kw as $key => $val){
  206. if ($count != $dyna['max']) {
  207. $arr['ddm_gallery'][$pic_right.'&nbsp;&nbsp;'.__('By keywords').'&nbsp;&nbsp;'][$pic_right.'&nbsp;&nbsp;'.cut_text($val).'&nbsp;&nbsp;'] = array('-' => '?module=gallery&keyword='.$val);
  208. $kw2 = $gallery->getLimitedImagesList('keywords', $val);
  209. $kw2 = array_reverse($kw2);
  210. $count2 = 0;
  211. foreach ($kw2 as $key2 => $val2){
  212. $count2++;
  213. if ($count2 != $dyna['max']) {
  214. $arr['ddm_gallery'][$pic_right.'&nbsp;&nbsp;'.__('By keywords').'&nbsp;&nbsp;'][$pic_right.'&nbsp;&nbsp;'.cut_text($val).'&nbsp;&nbsp;']['&nbsp;&nbsp;'.cut_text($val2).'&nbsp;&nbsp;'] = '?module=gallery&id='.$val2;
  215. }
  216. }
  217. }
  218. }
  219. }
  220. $kw = $gallery -> getAvaiableValues('size');
  221. $count = 0;
  222. if (is_array($kw)){
  223. $kw = array_reverse($kw);
  224. $count++;
  225. $item[1] .= '&nbsp;'.$pic_down;
  226. if (!isset($dyna['min']))
  227. foreach($kw as $key => $val){
  228. if ($count != $dyna['max']) {
  229. $arr['ddm_gallery'][$pic_right.'&nbsp;&nbsp;'.__('By size').'&nbsp;&nbsp;'][$pic_right.'&nbsp;&nbsp;'.cut_text($val).'&nbsp;&nbsp;'] = array('-' => '?module=gallery&size='.$val);
  230. $kw2 = $gallery->getLimitedImagesList('size', $val);
  231. $kw2 = array_reverse($kw2);
  232. $count2 = 0;
  233. foreach ($kw2 as $key2 => $val2){
  234. $count2++;
  235. if ($count2 != $dyna['max']) {
  236. $arr['ddm_gallery'][$pic_right.'&nbsp;&nbsp;'.__('By size').'&nbsp;&nbsp;'][$pic_right.'&nbsp;&nbsp;'.cut_text($val).'&nbsp;&nbsp;']['&nbsp;&nbsp;'.cut_text($val2).'&nbsp;&nbsp;'] = '?module=gallery&id='.$val2;
  237. }
  238. }
  239. }
  240. }
  241. }
  242. $kw = $gallery -> getAvaiableValues('type');
  243. $count = 0;
  244. if (is_array($kw)){
  245. $kw = array_reverse($kw);
  246. $count++;
  247. if (!isset($dyna['min']))
  248. foreach($kw as $key => $val){
  249. if ($count != $dyna['max']) {
  250. $arr['ddm_gallery'][$pic_right.'&nbsp;&nbsp;'.__('By type').'&nbsp;&nbsp;'][$pic_right.'&nbsp;&nbsp;'.cut_text($val).'&nbsp;&nbsp;'] = array('-' => '?module=gallery&type='.$val);
  251. $kw2 = $gallery->getLimitedImagesList('type', $val);
  252. $kw2 = array_reverse($kw2);
  253. $count2 = 0;
  254. foreach ($kw2 as $key2 => $val2){
  255. $count2++;
  256. if ($count2 != $dyna['max']) {
  257. $arr['ddm_gallery'][$pic_right.'&nbsp;&nbsp;'.__('By type').'&nbsp;&nbsp;'][$pic_right.'&nbsp;&nbsp;'.cut_text($val).'&nbsp;&nbsp;']['&nbsp;&nbsp;'.cut_text($val2).'&nbsp;&nbsp;'] = '?module=gallery&id='.$val2;
  258. }
  259. }
  260. }
  261. }
  262. }
  263. $kw = $gallery -> getFullImagesList();
  264. $count = 0;
  265. if (count($kw) > 0){
  266. $kw = array_reverse($kw);
  267. $count++;
  268. foreach($kw as $key => $val){
  269. if ($count != $dyna['max']) {
  270. $arr['ddm_gallery']['&nbsp;&nbsp;'.cut_text($val).'&nbsp;&nbsp;'] = '?module=gallery&id='.$val;
  271. }
  272. }
  273. }
  274. $item[4] = 'ddm_gallery';
  275. }
  276. $item[3] = 'gallery.png';
  277. } elseif ($item[0] == '?module=user.list' && LOGGED_IN) {
  278. if (!isset($dyna['use_mem'])){
  279. $userlist = $system->getUserList('*', 'nickname');
  280. $count = 0;
  281. if (count($userlist) > 0) {
  282. $item[1] .= '&nbsp;'.$pic_down;
  283. $userlist = array_reverse($userlist);
  284. foreach ($userlist as $conkey => $conval) {
  285. $count++;
  286. if ($count != $dyna['max'])
  287. $arr['ddm_users']['&nbsp;&nbsp;'.cut_text($conval['nickname']).'&nbsp;&nbsp;'] = '?module=user.list&user='.$conval['username'];
  288. }
  289. }
  290. $item[4] = 'ddm_users';
  291. }
  292. $item[3] = 'user.list.png';
  293. } elseif ($item[0] == '?module=filesdb') {
  294. if (!isset($dyna['use_fdb'])){
  295. $filesdb = new linksdb(DOWNLOADS_DATAFILE);
  296. $count = 0;
  297. if (!empty($filesdb -> data)) {
  298. $item[1] .= '&nbsp;'.$pic_down;
  299. $fdb = array_reverse($filesdb -> data);
  300. foreach ($fdb as $conkey => $conval) {
  301. $count++;
  302. if ($count != $dyna['max']) {
  303. $arr['ddm_filesdb']['&nbsp;&nbsp;'.cut_text($conval['name']).'&nbsp;&nbsp;'] = '?module=filesdb&id='.(sizeof($fdb) - ($count - 1));
  304. if (count($conval['files']) > 0)
  305. if (!isset($dyna['min'])){
  306. unset($arr['ddm_filesdb']['&nbsp;&nbsp;'.cut_text($conval['name']).'&nbsp;&nbsp;']);
  307. $arr['ddm_filesdb'][$pic_right.'&nbsp;&nbsp;'.cut_text($conval['name']).'&nbsp;&nbsp;'] = array('-' => '?module=filesdb&id='.(sizeof($fdb) - ($count - 1)));
  308. $count2 = 0;
  309. $conval['files'] = array_reverse($conval['files']);
  310. foreach ($conval['files'] as $artkey => $artval){
  311. $count2++;
  312. if ($count2 != $dyna['max'])
  313. $arr['ddm_filesdb'][$pic_right.'&nbsp;&nbsp;'.cut_text($conval['name']).'&nbsp;&nbsp;']['&nbsp;&nbsp;'.cut_text($artval['name']).'&nbsp;&nbsp;'] = '?module=filesdb&id='.(sizeof($fdb) - ($count - 1)).'&fid='.(sizeof($conval['files']) - ($count2 - 1));
  314. }
  315. }
  316. }
  317. }
  318. }
  319. $item[4] = 'ddm_filesdb';
  320. }
  321. $item[3] = 'filesdb.png';
  322. } elseif ($item[0] == '?module=forum') {
  323. if (!isset($dyna['use_for'])){
  324. $topics = @unserialize(@file_get_contents(FORUM_PATH . 'topic_index.dat'));
  325. $count = 0;
  326. if (count($topics) > 0) {
  327. $item[1] .= '&nbsp;'.$pic_down;
  328. if (is_array($topics)){
  329. $topics = array_reverse($topics);
  330. foreach ($topics as $conkey => $conval) {
  331. $count++;
  332. if ($count != $dyna['max'])
  333. $arr['ddm_forum']['&nbsp;&nbsp;'.cut_text($conval['title']).'&nbsp;&nbsp;'] = '?module=forum&id='.(sizeof($topics) - ($count)).'&action=topic';
  334. }
  335. }
  336. }
  337. $item[4] = 'ddm_forum';
  338. }
  339. $item[3] = 'forum.png';
  340. } else {
  341. $item[3] = 'default.png';
  342. }
  343. if (isset($dyna['ico']))
  344. $item[3] = '<img src="./skins/icons/'.$item[3].'" alt="'.$item[3].'"/>';
  345. else
  346. $item[3]='';
  347. $menu .= str_replace('{link}', $item[0], str_replace('{title}', $item[1], str_replace('{target}', @$item[2], str_replace('{icon}', $item[3], str_replace('{id}', $item[4], $format)))));
  348. //$menu = str_replace('id="{id}"','',$menu);
  349. // End of Icons support by Migel
  350. }
  351. $menu .= ' <br clear="both" /> </div>';
  352. $result = $menu.' <script type="text/javascript"> dhtmlmenu_build('.convertArray($arr,'arr').');</script></div>';
  353. return $result;
  354. }
  355. function rcms_parse_module_template($module, $tpldata = array()) {
  356. global $system;
  357. ob_start();
  358. if(is_file(CUR_SKIN_PATH . $module . '.php')) {
  359. include(CUR_SKIN_PATH . $module . '.php');
  360. } elseif(is_file(MODULES_TPL_PATH . $module . '.php')) {
  361. include(MODULES_TPL_PATH . $module . '.php');
  362. }
  363. $return = ob_get_contents();
  364. ob_end_clean();
  365. return $return;
  366. }
  367. function rcms_open_browser_window($id, $link, $attributes = '', $return = false){
  368. global $system;
  369. $code = '<script type="text/javascript">window.open(\'' . addslashes($link) . '\', \'' . $id . '\',\'' . $attributes . '\');</script>';
  370. if($return){
  371. return $code;
  372. } else {
  373. @$system->config['meta'] .= $code;
  374. }
  375. }
  376. function rcms_parse_module_template_path($module) {
  377. if(is_file(CUR_SKIN_PATH . $module . '.php')) {
  378. return (CUR_SKIN_PATH . $module . '.php');
  379. } elseif(is_file(MODULES_TPL_PATH . $module . '.php')) {
  380. return (MODULES_TPL_PATH . $module . '.php');
  381. } else {
  382. return false;
  383. }
  384. }
  385. function rcms_show_element($element, $parameters = ''){
  386. global $system;
  387. switch($element){
  388. case 'title':
  389. if(!@$system->config['hide_title']) {
  390. echo $system->config['title'];
  391. if(!empty($system->config['pagename'])) echo ' - ';
  392. }
  393. echo (!empty($system->config['pagename'])) ? $system->config['pagename'] : '';
  394. break;
  395. case 'slogan':
  396. if(!empty($system->config['slogan'])) echo $system->config['slogan'];
  397. break;
  398. case 'menu_point':
  399. list($point, $template) = explode('@', $parameters);
  400. if(is_file(CUR_SKIN_PATH . 'skin.' . $template . '.php')) {
  401. $tpl_path = CUR_SKIN_PATH . 'skin.' . $template . '.php';
  402. } elseif(is_file(MODULES_TPL_PATH . $template . '.php')) {
  403. $tpl_path = MODULES_TPL_PATH . $template . '.php';
  404. }
  405. if(!empty($tpl_path) && !empty($system->output['menus'][$point])){
  406. foreach($system->output['menus'][$point] as $module){
  407. $system->showWindow($module[0], $module[1], $module[2], $tpl_path);
  408. }
  409. }
  410. break;
  411. case 'main_point':
  412. foreach ($system->output['modules'] as $module) {
  413. $system->showWindow($module[0], $module[1], $module[2], CUR_SKIN_PATH . 'skin.' . substr(strstr($parameters, '@'), 1) . '.php');
  414. }
  415. break;
  416. case 'navigation':
  417. $dyna = parse_ini_file(CONFIG_PATH . 'dynamik.ini', true);
  418. if (isset($dyna['use'])) {
  419. echo rcms_parse_dynamik_menu($parameters);
  420. break;
  421. }
  422. $den1xxx = rcms_parse_menu($parameters);
  423. $den1xxx = str_replace('id="{id}"','',$den1xxx);
  424. echo $den1xxx;
  425. break;
  426. case 'meta':
  427. @readfile(DATA_PATH . 'meta_tags.html');
  428. echo '<meta http-equiv="Content-Type" content="text/html; charset=' . $system->config['encoding'] . '" />' . "\r\n";
  429. if(!empty($system->config['enable_rss'])){
  430. foreach ($system->feeds as $module => $d) {
  431. echo '<link rel="alternate" type="application/rss+xml" title="RSS ' . $d[0] . '" href="./rss.php?m=' . $module . '" />' . "\r\n";
  432. }
  433. }
  434. echo '
  435. <link type="text/css" href="tools/js/jquery.lightbox-0.5.css" rel="stylesheet" media="screen" />
  436. <link type="text/css" href="' . SKIN_PATH . 'main.css" rel="stylesheet" />
  437. <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js" type="text/javascript"></script>
  438. <script type="text/javascript" src="' . RCMS_ROOT_PATH . 'tools/js/ajaxupload.js"></script>
  439. <script src="tools/js/jquery.lightbox-0.5.pack.js" type="text/javascript"></script>
  440. <script type="text/javascript" src="' . RCMS_ROOT_PATH . 'tools/js/editor.js"></script>
  441. <script type="text/javascript">
  442. $(function(){
  443. $("a.gallery").lightBox({
  444. overlayBgColor: "#000",
  445. overlayOpacity: 0.9,
  446. imageLoading: "' . RCMS_ROOT_PATH . 'tools/js/images/loading.gif",
  447. imageBtnClose: "' . RCMS_ROOT_PATH . 'tools/js/images/close.gif",
  448. imageBtnPrev: "' . RCMS_ROOT_PATH . 'tools/js/images/arrow_left.gif",
  449. imageBtnNext: "' . RCMS_ROOT_PATH . 'tools/js/images/arrow_right.gif",
  450. containerResizeSpeed: 350,
  451. txtImage: "'.__('Image').'",
  452. txtOf: "'.__(' of ').'"
  453. });
  454. });
  455. </script>';
  456. echo '<script type="text/javascript" src="tools/js/limit.js"></script>'. "\r\n"; // Limit post addon
  457. if(!empty($system->config['meta'])) echo $system->config['meta'];
  458. break;
  459. case 'copyright':
  460. if(!defined('RCMS_COPYRIGHT_SHOWED') || !RCMS_COPYRIGHT_SHOWED){
  461. echo RCMS_POWERED . ' ' . RCMS_VERSION_A . '.' . RCMS_VERSION_B . '.' . RCMS_VERSION_C . RCMS_VERSION_SUFFIX . '<br />' . RCMS_COPYRIGHT;
  462. }
  463. break;
  464. }
  465. }
  466. ?>