<?php
if(isset($_POST["FORM_NAME"]) && $_POST["FORM_NAME"]=="new_news_entry"){
$D_image_upload1=D_image_upload1("photo_news","NEWS","",400000); //POST name,Path,target_file_name,max_size
if($D_image_upload1["D_image_upload1"]=="ok")
  {
  //var_dump($D_image_upload1);
  $news["image"]=$D_image_upload1["name"];
  $news["news_category"]=$_POST["news_category"];
  $news["lang"]=$_POST["lang"];
  $news["news_link"]=$_POST["news_link"];$news["news_link"]=preg_replace('~[^a-zA-Z0-9]+~', '-', $news["news_link"]);
  $news["news_title"]=$_POST["news_title"];
  $news["news_content"]=$_POST["news_content"];
  D_news_entry($news);
  }
}
?>