Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /*
- =====================================================
- Файл: iphotos.php
- =====================================================
- */
- if( ! defined( 'DATALIFEENGINE' ) ) {
- die( "Hacking attempt!" );
- }
- function putAlbum()
- {
- global $db;
- $album = $db->query( "SELECT * FROM " . PREFIX . "_iphoto_album WHERE status = 1 ORDER BY date DESC LIMIT 10" );
- $iphotos = '';
- $iphotoss = '';
- if ($db->num_rows($album) > 0) {
- while ( $row = $db->get_row($album) ) {
- $row['date'] = strtotime( $row['date'] );
- $ids = $row['id'];
- $nume = $row['name'];
- $alt_nume = $row['alt_name'];
- $fulllink = "/iphoto/$alt_nume";
- $iphotos = "<center><li><a href=\"{$fulllink}\">{$nume}</a></li></center>";
- $subalbum = $db->query( "SELECT * FROM " . PREFIX . "_iphoto_subalbum WHERE album_id = '$ids' AND status = 1 " );
- if ($db->num_rows($subalbum) > 0) {
- while ( $rows = $db->get_row($subalbum) ) {
- $rows['date'] = strtotime( $rows['date'] );
- $numes = $rows['name'];
- $alt_numes = $rows['alt_name'];
- $fulllinks = "/iphoto/$alt_numes";
- $iphotoss = "<center>  - <a href=\"{$fulllinks}\">{$numes}</a></center><br>";
- }
- }
- $tra .= "{$iphotos}{$iphotoss}";
- }
- }
- return $tra;
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement