D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
home
/
grandhou
/
www
/
album
/
Filename :
albums.php
back
Copy
<?php session_start(); include('include/configpage.php'); include('include/pdo.php'); if(strlen($_SESSION['alogin'])==0) { header('location:index.php'); } else{ $userid=$_GET['userid']; $permalink=$_GET['permalink']; ?> <!doctype html> <html> <head> <meta charset="utf-8"> <title><?php echo $permalink;?></title> <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" > <link rel="shortcut icon" href="favicon.ico"> <link href="album-css/album.css" rel="stylesheet" type="text/css"> <link rel="preconnect" href="https://fonts.gstatic.com"> <link href="https://fonts.googleapis.com/css2?family=Raleway:wght@400;700&display=swap" rel="stylesheet"> </head> <body> <div class="logo"><a href="https://www.grandhouse.com.au" target="_blank"><img src="album-images/grandhouse-wedding-photography-sydeny.png" alt="grandhouse logo"></a></div> <div class="mainwrap"> <div class="name"> <h2> <?php $sql = "select * from user where id='".$userid."' and permalink='".$permalink."'"; $result = mysqli_query($dbhandle,$sql); while($row = mysqli_fetch_array($result)) { echo $row['name']; }?></h2> <span><?php $sql2= "select file_name from album where userid='".$userid."'"; $result2 = mysqli_query($dbhandle,$sql2); echo mysqli_num_rows($result2);?> Photos</span> </div> <div class="image-wrap"> <?php $sql = "select * from albumlist where userid='".$userid."'"; // Execute query $result = mysqli_query($dbhandle,$sql); // Loop through each records while($row = mysqli_fetch_array($result)) { $sql1= "select file_name from album where userid='".$userid."' and albumlistid='".$row['id']."'"; $result1 = mysqli_query($dbhandle,$sql1); $sql3= "select file_name from album where userid='".$userid."' and albumlistid='".$row['id']."' LIMIT 1"; $result3=mysqli_query($dbhandle,$sql3); while($row3 = mysqli_fetch_array($result3)) { $filename= $row3['file_name']; } ?> <div class="image4cols"><a href="listing.php?userid=<?php echo $userid?>&permalink=<?php echo $permalink;?>&albumlistid=<?php echo $row['id'];?>"><img src="../album/album-admin/upload/<?php echo $filename;?>" width="850" height="556" alt="<?php echo $filename;?>"><div class="desc"><?php echo $row['name'];?><br><strong><?php echo mysqli_num_rows($result1); ?> Photos</strong></div></a></div> <?php } ?> </div> </div> <div class="ayyans">Site by <a href="https://www.graffitopaints.com" title="Web Design India" target="_blank">ayyans</a> | 2021 all rights reserved Grandhouse.com.au</div> </body> </html> <?php } ?>