Add php files
This commit is contained in:
27
modules/EcmProducts/importlocalized.php
Executable file
27
modules/EcmProducts/importlocalized.php
Executable file
@@ -0,0 +1,27 @@
|
||||
<?
|
||||
$w=$GLOBALS['db']->query("select * from productcf");
|
||||
//426 ean, 414 long, 412 short, 500 remarks
|
||||
//a:4:{s:2:"PL";s:99:"Lexmark 3100/ Z12/ Z22/ Z32/ Z705/ Z708/ Z710/ Z715/ P704/ P706/ P707/ P3120/ P3150/ P3150M
|
||||
//Czarny";s:2:"DE";s:0:"";s:2:"EN";s:0:"";s:2:"RU";s:0:"";}
|
||||
function gv($l,$txt){
|
||||
$t=explode('"'.$l.'";s:',$txt);
|
||||
$tt=explode(':"',$t[1]);
|
||||
$ttt=explode('"',$tt[1]);
|
||||
return $ttt[0];
|
||||
}
|
||||
$u=$_SESSION['authenticated_user_id'];
|
||||
$d=date("Y-m-d H:i:s");
|
||||
$arr=array("EN","PL","DE");
|
||||
while($r=$GLOBALS['db']->fetchByAssoc($w)){
|
||||
|
||||
foreach($arr as $a){
|
||||
$sd[$a]=gv($a,$r['cf_412']);
|
||||
$ld[$a]=gv($a,$r['cf_414']);
|
||||
$re[$a]=gv($a,$r['cf_500']);
|
||||
$ea[$a]=gv($a,$r['cf_426']);
|
||||
print "insert into ecmproduct_language values('".create_guid()."','".$u."','".$u."','".$d."','".$d."','0','".$r['productid']."','".$a."','".$ea[$a]."','".$sd[$a]."','".$ld[$a]."','".$re[$a]."');<br>";
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
?>
|
||||
Reference in New Issue
Block a user