core/parcer/i/1.php

21 lines
488 B
PHP
Raw Normal View History

2023-07-12 20:02:20 +05:00
<?php
ini_set('display_errors', 0);
require_once('db.php');
DB::$dsn = 'mysql:dbname=tk-ligat;host=127.0.0.1';
DB::$user = 'admin';
DB::$pass = '32143214';
$tovar=DB::getAll("SELECT `filename` FROM `tovar_img` WHERE `tovar_id` IN (SELECT `id` FROM `tovar` WHERE `donor` LIKE '%leopak%')");
//print_r($tovar);
for ($i=0; $i<count($tovar); $i++){
copy ("/home/cloud/core/img/tk-ligat.ru/tovar/" . $tovar[$i]['filename'] . ".jpg", "img/" . $tovar[$i]['filename'] . ".jpg");
}
?>