\n"; echo "function PreviewNewsCat() {\n"; echo "\tvar selectNewsCat = document.getElementById('newscat_image');\n"; echo "\tvar imageNewsCat = document.getElementById('newscat_preview');\n"; echo "\tvar optionValue = selectNewsCat.options[selectNewsCat.selectedIndex].value;\n"; echo "\tif (optionValue!='') {\n"; echo "\t\timageNewsCat.src = '".IMAGES_NC."' + optionValue;\n"; echo "\t} else {\n"; echo "\t\timageNewsCat.src = '".IMAGES_NC."default.png';\n"; echo "\t}\n"; echo "}\n"; echo "\n"; if (!checkrights("N") || !defined("iAUTH") || !isset($_GET['aid']) || $_GET['aid'] != iAUTH) { redirect("../index.php"); } require_once THEMES."templates/admin_header_mce.php"; include LOCALE.LOCALESET."admin/news.php"; if ($settings['tinymce_enabled']) { echo "\n"; } else { require_once INCLUDES."html_buttons_include.php"; } if (isset($_GET['error']) && isnum($_GET['error'])) { if ($_GET['error'] == 1) { $message = $locale['413']; } elseif ($_GET['error'] == 2) { $message = sprintf($locale['414'], parsebytesize($settings['news_photo_max_b'])); } elseif ($_GET['error'] == 3) { $message = $locale['415']; } elseif ($_GET['error'] == 4) { $message = sprintf($locale['416'], $settings['news_photo_max_w'], $settings['news_photo_max_h']); } if ($message) { echo "