<?php
session_start();
require_once "../init.php";
require_once "../authority.inc.php";
$ClassName = $_POST['ClassName'];
if($_SESSION['AdmUserID_S'] ){
$UserName=$_SESSION['AdmUserID_S'];

}
else
{

$UserName=$_SESSION['User_S'];
}

$page_id=$_GET['page_id'];


if($_POST['ID'])
{
	$IDProduct = $_POST['ID'];
}
else
{
	$IDProduct = $_GET['ID'];
}




$sql = "select * from notes where ID='$IDProduct'";
$noteInfo  = $DB->getdata($sql);
list($left,$top,$zindex) = explode('|',$noteInfo['xyz']); 
$title=$noteInfo['title'];
$width=$noteInfo['width'];
$x=$left;
$y=$top;
$z=$zindex;

$height=$noteInfo['height'];
$news_id=$noteInfo['news_id'];
$page_id=$noteInfo['page_id'];
$news_nub=$noteInfo['news_nub'];
$note_css=$noteInfo['note_css'];
$title_right=$noteInfo['title_right'];
$title_right_url=$noteInfo['title_right_url'];
$pro_pic_w=$noteInfo['pro_pic_w'];
$pro_pic_y=$noteInfo['pro_pic_y'];
$title_url=$noteInfo['title_url'];
$pro_ms=$noteInfo['pro_ms'];
$news_ms=$noteInfo['news_ms'];
$pro_nub=$noteInfo['pro_nub'];
$Content=$noteInfo['Content'];
$showIndex=$noteInfo['showIndex'];
$note_weiz=$noteInfo['note_weiz'];
$pro_fy=$noteInfo['pro_fy'];
$news_fy=$noteInfo['news_fy'];
$color=$noteInfo['color'];
$share=$noteInfo['share'];
$lang=$noteInfo['lang'];
$sql="insert into notes(Content,color,xyz,width,height,news_id,page_id,news_nub,title,pro_id,note_css,title_right,title_right_url,title_url,news_ms,pro_ms,pro_nub,note_weiz,showIndex,pro_pic_w,pro_pic_y,pro_fy,news_fy,share,note_class,news_open_pageid,pro_open_pageid,picinfo,alink,pics,mobile,lang) select Content,color,xyz,width,height,news_id,page_id,news_nub,title,pro_id,note_css,title_right,title_right_url,title_url,news_ms,pro_ms,pro_nub,note_weiz,showIndex,pro_pic_w,pro_pic_y,pro_fy,news_fy,share,note_class,news_open_pageid,pro_open_pageid,picinfo,alink,pics,mobile,lang from notes where ID = $IDProduct ";
  $DB->query($sql);
		   $id = $DB->insert_id();
		
header("location:index.php?page_id=$page_id");




?>



<? 
@$DB->close();

?>

