".$locale['431']."
\n".$locale['432']."\n"; } else { $result = dbquery("DELETE FROM ".$db_prefix."news_cats WHERE news_cat_id='$cat_id'"); opentable($locale['430']); echo "
".$locale['433']."
\n"; } closetable(); tablebreak(); } if (isset($_POST['save_cat'])) { $cat_name = stripinput($_POST['cat_name']); $cat_image = stripinput($_POST['cat_image']); if ($cat_name != "" && $cat_image != "") { if ($action == "edit") { $result = dbquery("UPDATE ".$db_prefix."news_cats SET news_cat_name='$cat_name', news_cat_image='$cat_image' WHERE news_cat_id='$cat_id'"); } else { $result = dbquery("INSERT INTO ".$db_prefix."news_cats (news_cat_name, news_cat_image) VALUES ('$cat_name', '$cat_image')"); } } redirect(FUSION_SELF.$aidlink); } if (isset($action) && $action == "edit") { $result = dbquery("SELECT * FROM ".$db_prefix."news_cats WHERE news_cat_id='$cat_id'"); $data = dbarray($result); $cat_name = $data['news_cat_name']; $cat_image = $data['news_cat_image']; $formaction = FUSION_SELF.$aidlink."&action=edit&cat_id=".$data['news_cat_id']; opentable($locale['434']); } else { $cat_name = ""; $cat_image = ""; $formaction = FUSION_SELF.$aidlink; opentable($locale['435']); } $image_files = makefilelist(IMAGES_NC, ".|..|index.php", true); $image_list = makefileopts($image_files,$cat_image); echo "
".$locale['436']."
".$locale['437']."
\n"; closetable(); tablebreak(); opentable($locale['440']); $result = dbquery("SELECT * FROM ".$db_prefix."news_cats ORDER BY news_cat_name"); $rows = dbrows($result); if ($rows != 0) { $counter = 0; $columns = 4; echo "\n\n"; while ($data = dbarray($result)) { if ($counter != 0 && ($counter % $columns == 0)) echo "\n\n"; echo "\n"; $counter++; } echo "\n
".$data['news_cat_name']."
\n"; if (file_exists(IMAGES_NC.$data['news_cat_image'])) { echo "".$data[
\n"; } else { echo "".$data[
\n"; } echo "".$locale['441']." - ".$locale['442']."
\n"; } else { echo "

\n".$locale['443']."

\n
\n"; } echo "

\n".$locale['439']."

\n
\n"; closetable(); echo "\n"; require_once BASEDIR."footer.php"; ?>