<?php




@ require ('writable/set/set_area.php');
@ require ('readonly/function/write_file.php');


@ $_GET['column_id'] = preg_replace('/[^\w]/', '', $_GET['column_id']);
@ $_GET['class_id'] = preg_replace('/[^\w]/', '', $_GET['class_id']);

if (!(isset($_GET['column_id']) && @array_key_exists($_GET['column_id'], $web['area']))) {
  die('<script> parent.$("caiji_load").innerHTML="更新失败[频道ID'.$_GET['column_id'].'错误或缺失]！"; parent.delSubmitSafe(); setTimeout("parent.$(\'caiji_load\').style.display=\'none\'", 3000); </script>');
}
if (!(isset($_GET['class_id']) && @array_key_exists($_GET['class_id'], $web['area'][$_GET['column_id']]))) {
  die('<script> parent.$("caiji_load").innerHTML="更新失败[栏目ID'.$_GET['class_id'].'错误或缺失]！"; parent.delSubmitSafe(); setTimeout("parent.$(\'caiji_load\').style.display=\'none\'", 3000); </script>');
}


if (isset($_GET['detail_title'])) {
  $_GET['detail_title'] = @htmlspecialchars($_GET['detail_title']);
  if (empty($_GET['detail_title'])) {
    die('<script> parent.$("caiji_load").innerHTML="更新失败[专题参数错误或缺失]！"; parent.delSubmitSafe(); setTimeout("parent.$(\'caiji_load\').style.display=\'none\'", 3000); </script>');
  }


  if (!isset($sql['db_err'])) {
    db_conn();
  }
  if ($sql['db_err'] == '') {
    $result = @mysql_query('SELECT detail_title FROM `'.$sql['pref'].''.$sql['data']['承载网址数据的表名'].'` WHERE column_id="'.$_GET['column_id'].'" AND class_id="'.$_GET['class_id'].'" AND detail_title LIKE "'.$_GET['detail_title'].'|%" LIMIT 1', $db);
    if ($row = @mysql_fetch_assoc($result)) {
      list(,$dpy, $ds) = @explode('|', $row['detail_title']);
      unset($row);
    }
    @mysql_free_result($result);
  }
  @mysql_close();

  if (reset_indexhtml('detail.php', $dpy.'.html')) {
    err('<script> parent.location.reload(); </script>');
  } else {
    err('<script> parent.$("caiji_load").innerHTML="更新失败！"; parent.delSubmitSafe(); setTimeout("parent.$(\'caiji_load\').style.display=\'none\'", 3000); </script>');
  }



} else {

  if (reset_indexhtml('class.php', $web['area'][$_GET['column_id']]['name'][1].'_'.$web['area'][$_GET['column_id']][$_GET['class_id']][1].'.html')) {
    err('<script> parent.location.reload(); </script>');
  } else {
    err('<script> parent.$("caiji_load").innerHTML="更新失败！"; parent.delSubmitSafe(); setTimeout("parent.$(\'caiji_load\').style.display=\'none\'", 3000); </script>');
  }
}












?>
