mirror of
https://github.com/claradex/nativegallery.git
synced 2025-02-13 09:43:14 +03:00
fix entity show info
This commit is contained in:
parent
9774d329fd
commit
3d03ccce6f
2 changed files with 3 additions and 2 deletions
|
@ -334,8 +334,9 @@ if ($photo->i('id') !== null) {
|
|||
</colgroup>
|
||||
<tbody>
|
||||
<?php
|
||||
$entity = DB::query('SELECT * FROM entities_data WHERE id=:id', array(':id'=>$photo->i('entitydata_id')))[0];
|
||||
$vehiclevariables = json_decode($vehicle->i('sampledata'), true);
|
||||
$vehicledatavariables = json_decode($vehicle->i('content'), true);
|
||||
$vehicledatavariables = json_decode($entity['content'], true);
|
||||
$num = 1;
|
||||
foreach ($vehiclevariables as $vb) {
|
||||
echo ' <tr class="s11 h21">
|
||||
|
|
|
@ -49,7 +49,7 @@ $vehicledatavariables = json_decode($data['content'], true);
|
|||
foreach ($photos as $p) {
|
||||
$author = new User($p['user_id']);
|
||||
echo '<div class="p20p s11"><table><tbody><tr>
|
||||
<td class="pb_photo" id="p1987895"><a href="/photo/'.$p['id'].'/ target="_blank" class="prw"><img class="f" src="/api/photo/compress?url='.$p['photourl'].'" alt="678 КБ">
|
||||
<td class="pb_photo" id="p1987895"><a href="/photo/'.$p['id'].'" target="_blank" class="prw"><img class="f" src="/api/photo/compress?url='.$p['photourl'].'" alt="678 КБ">
|
||||
<div class="hpshade">';
|
||||
if (DB::query('SELECT COUNT(*) FROM photos_comments WHERE photo_id=:id', array(':id'=>$p['id']))[0]['COUNT(*)'] >= 1) {
|
||||
echo '<div class="com-icon">'.DB::query('SELECT COUNT(*) FROM photos_comments WHERE photo_id=:id', array(':id'=>$p['id']))[0]['COUNT(*)'].'</div>';
|
||||
|
|
Loading…
Reference in a new issue