1 rizwank 1.1 <?php
2 require "./inc/connect.php";
3 require "./inc/authentication.php";
4 session_start();
5 sessionAuthenticate();
6 $currentUser = $_SESSION["login"];
7 // Get Album Name
8 $query = "SELECT gName
9 FROM $utbl
10 WHERE usr = '$currentUser'";
11 $result = mysql_query($query);
12 $row = mysql_fetch_array($result);
13 $gName = $row["gName"];
14
15 if (empty($gName))
16 $gName = 'SSPAdmin';
17
18 if (isset($_GET['m']))
19 $m = $_GET['m'];
20 else
21 $m = '';
22 rizwank 1.1
23 // Get User Profile
24 $query = "SELECT id
25 FROM $utbl
26 WHERE usr = '$currentUser'";
27 $result = mysql_query($query);
28 $row = mysql_fetch_array($result);
29 $uid = $row["id"];
30
31 // If Album ID is present, get album info
32
33 if (isset($_GET['aid']))
34 {
35 $aid = $_GET['aid'];
36 $query = "SELECT * FROM $atbl WHERE id=$aid";
37 $result = mysql_query($query);
38
39
40 while ($row = mysql_fetch_array($result))
41 {
42 $aName = $row['name'];
43 rizwank 1.1 $aDes = $row['description'];
44 $p = $row['path'];
45 $tn = $row['tn'];
46 $tgt = $row['target'];
47 $atn = $row['aTn'];
48 $aMp3 = $row['audioFile'];
49 $aMp3Cap = $row['audioCap'];
50 }
51 }
52
53 if (isset($_GET['did']))
54 {
55 $did = $_GET['did'];
56 $query = "SELECT * FROM $dtbl WHERE id=$did";
57 $result = mysql_query($query);
58
59
60 while ($row = mysql_fetch_array($result))
61 {
62 $aName = $row['name'];
63 }
64 rizwank 1.1 }
65
66
67 ?>
|