0byt3m1n1
Path:
/
home
/
k
/
a
/
s
/
kassiope
/
www
/
cron
/
[
Home
]
File: chunk_pict.php
<?php include("../configuration.inc.php"); //produits direct /* $rec = mysql_query_override("SELECT * FROM gaia_produits where (image1 != '' or image2 != '' or image3 != '' or image4 != '') and id not in (select produit_id from gaia_produits_photos) "); while($data = mysql_fetch_array_override($rec)) { $img1 = duplic_image($data['image1']); $img2 = duplic_image($data['image2']); $img3 = duplic_image($data['image3']); $img4 = duplic_image($data['image4']); echo $sql = "update gaia_produits set image1 = '".$img1."', image2 = '".$img2."', image3 = '".$img3."', image4 = '".$img4."' where id = '".$data['id']."'"; echo '<br />'; mysql_query_override($sql); } */ //d�clinaisons $rec = mysql_query_override("select * from gaia_produits_photos p where (image1 != '' or image2 != '' or image3 != '' or image4 != '') "); while($data = mysql_fetch_array_override($rec)) { $img1 = duplic_image($data['image1']); $img2 = duplic_image($data['image2']); $img3 = duplic_image($data['image3']); $img4 = duplic_image($data['image4']); echo $data['produit_id']; echo $sql = "update gaia_produits_photos set image1 = '".$img1."', image2 = '".$img2."', image3 = '".$img3."', image4 = '".$img4."' where id = '".$data['id']."'"; echo '<br />'; mysql_query_override($sql); } function duplic_image($img) { $name = $img; if(substr($img,0,8) != 'kassiope' && !empty($img) && file_exists('../upload/'.$img)) { $name = 'kassiope_'.rand(0,9999999999).'_'.$img; copy('../upload/'.$img, '../upload/'.$name); } return $name; }