Location: PHPKode > scripts > WH Social > wh_social/modules/photos.inc.php
<?php

    echo '<div class="content_left">
    <div id="breadcrumb">
        <ul class="crumbs">
            <li class="first"><a href="index.php" style="z-index:9;"><span></span>' . $lang['index'] . '</a></li>
            <li><a href="photos.php" style="z-index:8;">' . $lang['my_photos'] . '</a></li>
        </ul>
    </div>
    </div>

    <div class="content_right">';

        include('modules/search.inc.php');
    echo '</div>

    <div class="clear_long"></div>';

    $ret = 1;

    echo '<div class="main_menu">';

        $ret = include 'framework/templates/'.$main_content['menu'];
    echo '<div id="line"></div>';

        $ret = include 'framework/templates/'.$main_content['infos'];
    echo '</div>';

    echo '<div class="main_content">';

    echo '<h1 class="p_space">' . $lang['my_photos'] . '</h1>';

    if((isset($_GET['id'])) && (is_numeric($_GET['id']))) {

	$id = mysql_real_escape_string($_GET['id']);
	$id = intval($_GET['id']);

		}else{

		$id = (int)$_SESSION['id'];
		}

    $sql = "SELECT * FROM photos WHERE id2 = " . $id;

	$result = mysql_query($sql) OR die(mysql_error());

	if(!$result) {

	echo '<p class="false">' . $lang['no_photos'] . '</p>' . mysql_error();

		}else{

		if(intval(mysql_num_rows($result)) == 0) {

		echo '<p class="false">' . $lang['no_photos'] . '</p>';

	}else{

    require_once('framework/class/photo_class.php');

    $gallery = $PHOTOS['album']->getAll("SELECT * FROM photos WHERE id2 = '" . $id . "' ORDER BY date DESC");

    foreach($gallery as $key => $row) {

        $show_photos .= '<a href="myphoto.php?id=' . (int)$row['id'] . '"><div class="photo"><p>' . htmlentities($row['title'], ENT_QUOTES) . '</p>
        <img src="' . htmlentities($row['tag']) . '" border="0" id="' . (int)$row['id'] . '">
        <p class="blue_span">' . htmlentities($row['description'], ENT_QUOTES) . '</p></div></a>';
        }

    echo '<div class="container">' . $show_photos . '</div>';
    }
    }

?>
Return current item: WH Social