<?php 


//if   main lang have cnt,if not then insert null,else insert main cnt.
  $sql = "SELECT * from  $tablename  where pid='$pid' and pidfile='$pidfile' and lang='$mainlang' order by id limit 1";
 //echo $sql;exit;
 if(getnum($sql)==0) {
         $name = $title = $subtitle = $desp = $desptext =  $cateid = $arr_cfg = $jtimg = $jtimg2 = $jtimg3 = $jtimg4 = '';    
 }else{
 	 $row = getrow($sql);

      $name = $row['name'];
 	 $title = $row['title'];
 	 $subtitle = $row['subtitle'];
 	 $desp = $row['desp'];
 	 $desptext = $row['desptext'];
 	 $cateid = $row['cateid'];
 	 $arr_cfg = $row['arr_cfg'];
 	 $jtimg = $row['jtimg'];
 	 $jtimg2 = $row['jtimg2'];
 	 $jtimg3 = $row['jtimg3'];
 	 $jtimg4 = $row['jtimg4'];
 	  
 }
    
   // pre($row);
 
 
 $pidname ='jtext'.$bshou;

	$ss = "insert into $tablename  (pid,pidname,pidfile,pbh,lang,name,title,subtitle,desp,desptext,cateid,jtimg,jtimg2,jtimg3,jtimg4,arr_cfg) values ('$pid','$pidname','$pidfile','$user2510','".LANG."','$name','$title','$subtitle','$desp','$desptext','$cateid','$jtimg','$jtimg2','$jtimg3','$jtimg4','$arr_cfg')";
  //echo $ss;exit;
	 

iquery($ss);	 


$jumpv = $jumpv.'&file=edit';
 //echo $jumpv;

   jump($jumpv);