Advertisement
Guest User

Untitled

a guest
Feb 22nd, 2017
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.23 KB | None | 0 0
  1. <?php
  2. /*
  3. =====================================================
  4.  Файл: iphotos.php
  5. =====================================================
  6. */
  7.  
  8. if( ! defined( 'DATALIFEENGINE' ) ) {
  9.     die( "Hacking attempt!" );
  10. }
  11. function putAlbum()
  12. {
  13. global $db;
  14.  
  15. $album = $db->query( "SELECT * FROM " . PREFIX . "_iphoto_album WHERE status = 1 ORDER BY date DESC LIMIT 10" );
  16.  
  17. $iphotos = '';
  18. $iphotoss = '';
  19. if ($db->num_rows($album) > 0) {
  20. while ( $row = $db->get_row($album) ) {
  21.        
  22.         $row['date'] = strtotime( $row['date'] );
  23.         $ids = $row['id'];
  24.         $nume = $row['name'];
  25.         $alt_nume = $row['alt_name'];
  26.         $fulllink = "/iphoto/$alt_nume";
  27.        
  28. $iphotos = "<center><li><a href=\"{$fulllink}\">{$nume}</a></li></center>";
  29.    
  30. $subalbum = $db->query( "SELECT * FROM " . PREFIX . "_iphoto_subalbum WHERE album_id = '$ids' AND status = 1 " );
  31. if ($db->num_rows($subalbum) > 0) {
  32. while ( $rows = $db->get_row($subalbum) ) {
  33.        
  34.         $rows['date'] = strtotime( $rows['date'] );
  35.         $numes = $rows['name'];
  36.         $alt_numes = $rows['alt_name'];
  37.         $fulllinks = "/iphoto/$alt_numes";
  38.        
  39.         $iphotoss = "<center>&nbsp - <a href=\"{$fulllinks}\">{$numes}</a></center><br>";
  40.        
  41. }
  42. }
  43. $tra .= "{$iphotos}{$iphotoss}";
  44. }      
  45. }
  46.  
  47. return $tra;
  48.  }
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement