2024-10-11 21:54:40 +03:00
< ? php
2024-10-15 20:39:44 +03:00
namespace App\Controllers\Api\Vehicles ;
2024-10-11 21:54:40 +03:00
use App\Services\ { Auth , Router , GenerateRandomStr , DB , Json , EXIF };
2024-10-15 20:39:44 +03:00
use App\Models\ { User , Vote , Comment , Vehicle };
2024-10-11 21:54:40 +03:00
class Load
{
public function __construct ()
{
2024-10-15 20:39:44 +03:00
$entities_data = DB :: query ( 'SELECT * FROM entities_data WHERE (LOWER(title) LIKE :value) OR (LOWER(id) LIKE :value) AND entityid=:pid' , array ( ':pid' => $_GET [ 'type' ], ':value' => '%' . $_GET [ 'num' ] . '%' ));
echo '<table>' ;
foreach ( $entities_data as $e ) {
$vehicle = new Vehicle ( $e [ 'entityid' ]);
echo '<tbody class="found_vehicle s11" data-state="1" data-vid="' . $e [ 'id' ] . ' " data-cid= " 2 " data-type= " 3 " data-twoside= " 0 " >
< tr >
< th width = " 100 " > ID </ th >
< th width = " 90% " > Название </ th >
< th > Примечание </ th >
< th class = " c nw " > Тип </ th >
</ tr >
< tr >
< td style = " padding:10px " >< a href = " /vehicle/'. $e['id'] .' " target = " _blank " class = " num pcnt " > '.$e[' id '].' </ a >
</ td >
2024-10-16 17:16:21 +03:00
< td style = " padding:10px; font-size:16px " class = " mname " > '.$e[' title '].' </ td >
2024-10-15 20:39:44 +03:00
< td style = " padding:10px " class = " d " >
'.$e[' comment '].'
</ td >
< td style = " padding:10px " class = " d " >
'.$vehicle->i(' title ').'
</ td >
</ tr >
</ tr >
</ tbody > ' ;
}
echo '</table>' ;
2024-10-11 21:54:40 +03:00
2024-10-15 20:39:44 +03:00
}
}