Yangi formatda davom etish uchun: https://uzfor.net/view.php?act=post&id=4136
Postga havola
Сирожиддин [2882] [off]
Foydalauvchining albomidagi rasmlarni profilga chiqarish (JohnCMS 6.x.x versiyasida sinalgan)
// LIMIT 8 - qancha rasmini chiqarmoqchi bo'lsangiz 8 orniga shu raqamni qo'ying. $album_rasmlari = mysql_result(mysql_query("SELECT COUNT(*) FROM `cms_album_files` WHERE `user_id` = '" . $user['id'] . "'"), 0); echo ' <div class="phdr">Shaxsiy rasmlar ' . ($album_rasmlari ? $album_rasmlari : '') . '</div> <div class="menu">'; $fotoalbom = mysql_query("SELECT `id`, `user_id`, `album_id`, `img_name` FROM `cms_album_files` WHERE `user_id` = '" .$user['id']. "' ORDER BY `time` DESC LIMIT 8"); $fotoalbom = mysql_query("SELECT `id`, `user_id`, `album_id`, `img_name` FROM `cms_album_files` WHERE `user_id` = '" .$user['id']. "' ORDER BY `time` DESC LIMIT 8"); <a href="../users/album.php?act=show&al=' . $fotosurat['album_id'] . '&img=' . $fotosurat['id'] . '&user=' . $fotosurat['user_id'] . '&view"> <img style="height: 80px;" src="../files/users/album/' . $fotosurat['user_id'] . '/' . $fotosurat['img_name'] . '" /> </a>'; } } else { echo '<bold>' .$user['name']. '</bold> fotoalbomiga fotosuratlar qo\'shmagan!'; } echo ' </div>'; //.menu if ($user_id == $user['id']) { $shaxsiy_albom = mysql_fetch_assoc(mysql_query("SELECT * FROM `cms_album_cat` WHERE `user_id` = '".$user_id."' ")); echo ' <div class="menu"> <a href="'.$set['homeurl'].'/users/album.php?act=image_upload&al='.$shaxsiy_albom['id'].'&user='.$user_id.'">Albomga rasm qo\'shish</a> <a href="'.$set['homeurl'].'//users/album.php?act=show&al='.$shaxsiy_albom['id'].'&user='.$user_id.'">Barcha rasmlar</a> </div> '; }