<?php
/**
 * $Source: /home/cvs/nukescripts/admin/modules/cblocks/CenterBlocksSave4.php,v $
 * $Revision: 2.2.1-1 $
 * $Author: cyril $
 * $Date: 2006/08/14 02:09:24 $
 * Fix quote & Bug 142
 */
/********************************************************/
/* NSN Center Blocks                                    */
/* By: NukeScripts Network (webmaster@nukescripts.net)  */
/* http://www.nukescripts.net                           */
/* Copyright © 2000-2005 by NukeScripts Network         */
/********************************************************/
/* Original by: Richard Benfield                        */
/* http://www.benfield.ws                               */
/********************************************************/
if (!defined('ADMIN_ALLOW') && !defined('ADMIN_MAX')) {
	die ("Access Denied");
}

  $xheight   = $GLOBALS['db']->XMFnum($xheight);
  $xcount    = $GLOBALS['db']->XMFnum($xcount);
  $xenabled  = $GLOBALS['db']->XMFbin($xenabled);
  $x1content = addslashes(htmlentities($x1content, ENT_QUOTES));
  $x2content = addslashes(htmlentities($x2content, ENT_QUOTES));
  $x3content = addslashes(htmlentities($x3content, ENT_QUOTES));
  $x4content = addslashes(htmlentities($x4content, ENT_QUOTES));
  $x1title   = addslashes(htmlentities($x1title, ENT_QUOTES));
  $x2title   = addslashes(htmlentities($x2title, ENT_QUOTES));
  $x3title   = addslashes(htmlentities($x3title, ENT_QUOTES));
  $x4title   = addslashes(htmlentities($x4title, ENT_QUOTES));

$result = $GLOBALS['db']->sql_query("UPDATE `".TABLE_NSNCB_CONFIG."` SET `enabled`='$xenabled', `count`='$xcount', `height`='$xheight' WHERE `cgid`='4'");
$result1 = $GLOBALS['db']->sql_query("UPDATE `".TABLE_NSNCB_BLOCKS."` SET `content`='$x1content', `filename`='$x1name', `title`='$x1title', `wtype`='$x1wtype', `width`='$x1width' WHERE `cbid`='1' AND `cgid`='4'");
$result2 = $GLOBALS['db']->sql_query("UPDATE `".TABLE_NSNCB_BLOCKS."` SET `content`='$x2content', `filename`='$x2name', `title`='$x2title', `wtype`='$x2wtype', `width`='$x2width' WHERE `cbid`='2' AND `cgid`='4'");
$result3 = $GLOBALS['db']->sql_query("UPDATE `".TABLE_NSNCB_BLOCKS."` SET `content`='$x3content', `filename`='$x3name', `title`='$x3title', `wtype`='$x3wtype', `width`='$x3width' WHERE `cbid`='3' AND `cgid`='4'");
$result4 = $GLOBALS['db']->sql_query("UPDATE `".TABLE_NSNCB_BLOCKS."` SET `content`='$x4content', `filename`='$x4name', `title`='$x4title', `wtype`='$x4wtype', `width`='$x4width' WHERE `cbid`='4' AND `cgid`='4'");

$GLOBALS['db']->sql_query("OPTIMIZE TABLE `".TABLE_NSNCB_BLOCKS."`");

redirect_url("".$admin_file.".php?op=CenterBlocksSet4");