<?php
require ('authentication_manager.php');
?>
<?php

/* 导航Banner */
/* 162100源码 - 162100.com */


if (POWER != 5) {
  err('该命令必须以基本管理员身份登陆！请重登陆。');
}
function confirm_mode($m) {
  global $web;
  //$m = str_replace('/', '', $m);
  if ($m && file_exists('inc/css/'.$m.'/index.php') && file_exists('inc/css/'.$m.'/list.php') && file_exists('inc/css/'.$m.'/article.php')) {
    return $m;
  }
  //return $web['sitemode'];
  return false;
}

  if (!confirm_mode($_GET['mode'])) { 
    err('<script> alert("模板出错！"); parent.delSubmitSafe(); </script>');
  }

$_POST['content'] = str_replace($web['path'], '', $_POST['content']);

if ($_POST['filter'] == 'yes'){
  require('inc/function/filter.php');
  $content = ''.filter2($_POST['content']).'';
} else {
  if (!get_magic_quotes_gpc()) {
    $_POST['content'] = addslashes($_POST['content']);
  } else {
    $_POST['content'] = $_POST['content'];
  }
  $content = ''.stripslashes($_POST['content']).'';
}

@ require ('inc/function/write_file.php');
write_file('inc/css/'.$_GET['mode'].'/banner.txt', $content);
alert('发布成功！', 'webmaster_central.php?mode='.$_GET['mode'].'&get=banner');


?>



