<?php 


//if   main lang have cnt,if not then insert null,else insert main cnt.
  $sql = "SELECT * from  $tablename2  where pid='$pidname' and lang='$mainlang' order by id limit 1";
 // echo $sql;
    $row = getrow($sql);
   // pre($row);

   $pid = $pidname;
 $pidnamesub='sreg'.$bshou;

    if($row=='no'){

    	 $arr_cfg = 'reganchor:##==#==cssname:##==#==cssstyle:##==#==dmpadT:##==#==dmpadB:##==#==bgcolor:##==#==bgimg:##==#==bgposi:##center center==#==bgattach:##fixed==#==bgrepeat:##no-repeat==#==bgsize:##cover==#==testimg:##n==#==listbtn:##==#==sta_width_cnt:##y==#==jttext1:##==#==jttext2:##==#==jttext3:##==#==jttext4:##==#==jttext5:##==#==jttext6:##==#==linktitle:##==#==linkurl:##';
 $pidnamesub='sreg'.$bshou;

	$ss = "insert into $tablename2 (pid,pidname,pbh,title,lang,arr_cfg) values ('$pid','$pidnamesub','$user2510','','".LANG."','$arr_cfg')";
		 // echo $ss;exit;
		

    }
    else{
    	$title = $row['title'];
    	$despjj = $row['despjj'];

    	$cateid = $row['cateid'];
    	$blockid = $row['blockid'];
    	
    	$jtimg = $row['jtimg'];
    	$jtimg2 = $row['jtimg2'];
    	$jtimg3 = $row['jtimg3'];
    	$jtimg4 = $row['jtimg4'];
    	$arr_cfg = $row['arr_cfg'];


$ss = "insert into $tablename2 (pid,pidname,pbh,title,despjj,cateid,blockid,jtimg,jtimg2,jtimg3,jtimg4,lang,arr_cfg) values ('$pid','$pidnamesub','$user2510','$title','$despjj','$cateid','$blockid','$jtimg','$jtimg2','$jtimg3','$jtimg4','".LANG."','$arr_cfg')";
		 // echo $ss;exit;
		

    }
//echo $ss;

iquery($ss);	






$jumpv = $jumpv.'&file=editlangcnt&pidname='.$pidname;
 //echo $jumpv;

   jump($jumpv);