Location: PHPKode > scripts > WH Social > wh_social/myphoto.php
<?php require('framework/session.php'); ?>
<?php require('framework/ready.php'); ?>
<?php require('style/layout/header.php'); ?>

<div id="content_wrapper">
    <div class="content">

    <?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>
                <li><a href="myphoto.php?id=' . intval($_GET['id']) . '" style="z-index:7;">' . $lang['view_photo'] . '</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['view_photo'] . '</h1>';

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

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

			}else{

			echo '<p class="false">' . $lang['invalid_id'] . '</p>';
			exit();
			}

		$sql = "SELECT * FROM photos WHERE id = " . $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{

		while($row = mysql_fetch_assoc($result)) {

            $count_comms = mysql_query("SELECT id FROM comments WHERE id2 = " . (int)$row['id'] . "");
            $result_comms = intval(mysql_num_rows($count_comms));

            echo '<div class="left"><img src="' . htmlentities($row['tag']) . '" style="border: 1px solid #c3c3c3; box-shadow: 0px 2px 8px rgba(0, 0, 0, 0.45);" id="' . (int)$row['id'] . '"></div>
            <div class="album_right"><h3>' . htmlentities($row['title'], ENT_QUOTES) . '</h3>
            <p><span class="blue_span">' . $lang['photo_id'] . ':</span> ' . (int)$row['id'] . '<br>
            <span class="blue_span">' . $lang['blank_description'] . ':</span> ' . htmlentities($row['description'], ENT_QUOTES) . '<br>
            <span class="blue_span">' . $lang['added_date'] . ':</span> ' . date('d.m.Y - H:i', strtotime($row['date'])) . '<br>
            <span class="blue_span">' . $lang['blank_comments'] . ':</span> ' . (int)$result_comms . '</p></div>';

        }}}

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

        echo '<p class="blue_hml">' . $lang['blank_comments'] . '</p>';

        include('modules/comments.inc.php');
        include('framework/functions/comments.php');

	?>

<?php require('style/layout/footer.php'); ?>
Return current item: WH Social