Location: PHPKode > scripts > Php AddressBook 2 > php-addressbook-2/view-full.php
<?php
//////////////////////////////////////////////////////////////////////////////////
// Pull content from DB via $ID
//////////////////////////////////////////////////////////////////////////////////  
// Gather information fron the Addressbook Table
       # setup SQL statement to retrieve link that we want to edit
		$sql  = " SELECT * FROM addressbook WHERE id = $id ";
		
        # execute SQL statement
        $result = mysql_query($sql,$cid);

        # retrieve values
        $row = mysql_fetch_array($result);
			include("rows.php"); 
			
?>

<div id="addressBlock">
  <div id="imageBlock">
    <? if($website == '') { 
        echo "<h2>$firstname $lastname</h2>";
    } else { 
        echo "<h2><a class=\"url fn\" href=\"$website\">$firstname $lastname</a></h2>";   } 
 
	 if(!$profile == '') echo "<img src=profiles/imagethumb.php?s=$profile&w=200>";  
	?>
    <br />
  </div>
  <div id="vcard">
    	<?
		if (!$address == '') echo "<strong>Address</strong>:<br><span class=\"street-address\"> $address</span><br />";if (!$city == '') echo "<span class=\"locality\">$city</span>, <span class=\"region\">$province</span>, <span class=\"postal-code\">$postalcode</span><br/><span class=\"country-name\">$country</span><br />";
		echo "<br />";
		if (!$home == '') echo "<strong>Home Phone</strong>: <span class=\"tel\">$home</span><br />";
		if (!$mobile == '') echo "<strong>Mobile</strong>: <span class=\"tel\">$mobile</span><br />";
		if (!$work == '') echo "<strong>Work</strong>: <span class=\"tel\">$work</span><br />";
		if (!$work2 == '') echo "<strong>Work2</strong>: <span class=\"tel\">$work2</span><br />";
		if (!$fax == '') echo "<strong>Fax</strong>: <span class=\"tel\">$fax</span><br />";
		echo "<br />";
		if (!$email == '') echo "<strong>E-mail</strong>: <a class=\"email\" href=\"mailto:$email\">$email</a><br />";
		if (!$email2 == '') echo "<strong>E-mail2</strong>: <a class=\"email2\" href=\"mailto:$email2\">$email2</a><br />";
		if (!$email3 == '') echo "<strong>E-mail3</strong>: <a class=\"email3\" href=\"mailto:$email3\">$email3</a><br />";
		echo "<br />";
		if (!$yahoo == '') echo "<strong>Yahoo</strong>: $yahoo<br />";
		if (!$msn == '') echo "<strong>MSN</strong>: $msn<br />";
		if (!$icq == '') echo "<strong>ICQ</strong>: $icq<br />";
		if (!$jabber == '') echo "<strong>Jabber</strong>: $jabber<br />";
		if (!$gtalk == '') echo "<strong>Google Talk</strong>: $gtalk<br />";
		if (!$aim == '') echo "<strong>AIM</strong>: $aim<br />";
		if (!$skype == '') echo "<strong>Skype</strong>: $skype<br />";
		echo "<br />";	


 // Gather the Groupe information from the Groupe Table
       # setup SQL statement to retrieve link that we want to edit
		$sql  = " SELECT * FROM groups WHERE gid = $gid ";
		
        # execute SQL statement
        $result = mysql_query($sql,$cid);

        # retrieve values
        $row = mysql_fetch_array($result);
		$gid = $row["gid"];
		$groups = $row["groups"];
    		
    echo "<strong>Groupe</strong>: $groups<br />";

 ?>    
    <br />
    <? if (!$comments == '') print "<strong>Comments</strong>: <div id='barComments'>$comments</div>" ?>
  </div>
</div>
<div class="barBoth">
  <div class="barLeft">
    <div id="modify">
      <div class="barLeft-icon"><a href="?title=delete&id=<? echo "$id"?>" title="Delete"><img src="images/icons/delete.png" alt="Delete" width="16" height="16" /></a></div>
      <div class="barLeft-icon"><a href="?title=edit&id=<? echo "$id"?>" title="Edit"><img src="images/icons/edit.png" alt="Edit" width="16" height="16" /></a></div>
      <div class="barLeft-icon">
        <? if(!$email == '') { 
		echo "<a class=\"email\" href=\"mailto:$email\" title=\"Email\"><img src=\"images/icons/email.png\" alt=\"view\" width=\"16\" height=\"14\" /></a>"; 
		} else {
		echo "<img src=\"images/icons/email-off.png\" alt='Email Off' title='Email Off' width=\"16\" height=\"14\" />";
		} ?>
      </div>
      <div class="barLeft-icon">
        <? if(!$website == '') { 
		echo "<a class=\"url fn\" href=\"$website\"><img src=\"images/icons/world.png\" alt=\"view\" width=\"16\" height=\"16\" /></a>"; 
		} else {
		echo "<img src=\"images/icons/world-off.png\" alt='WWW Off' title='WWW Off' width=\"16\" height=\"16\" />";
		} ?>
      </div>
      <div class="barLeft-icon"><a href="vcard.php?id=<? echo "$id"?>" title="Vcard"><img src="images/icons/v-card.png" alt="View" width="16" height="14" /></a></div>
      <div class="barLeft-icon">
      <? if(!$address == '') {	  
		echo "<a href='?title=google&id=".$id."' target='_blank'><img border=0 src=images/icons/car.png width=16 height=16 title='Google Maps' alt='googlemaps'/></a>"; 
		} else {
		echo "<img border=0 src=images/icons/car-off.png width=16 height=16 title='Google Maps Off' alt='googlemaps'/>";
		} ?>
      </div>
      <div class="barLeft-icon"> <a href="javascript:window.print()" title="Print"><img src="images/icons/print.png" alt="Print" width="16" height="15" border="0" /></a></div>
    </div>
  </div>
  <div class="barRight">
    <form>
      <input type=button value="Back" id="fback" onClick="parent.location='index2.php?title=view'">
    </form>
  </div>
</div>
 <div class="clearfix"></div>
 <? if(!$email == '') {	 ?>
 <p id="sourcelinks"><a href="#" id="emailcode">Send e-mail</a> <img src="images/icons/slide-down.png" alt="slide" width="16" height="16" /></p>
<div id="source">
  <div style="display: snone;" class="code" id="email"><fieldset>
    <form method="post" action="?title=email&id=<? echo "$id"?>" enctype="multipart/form-data">
        <dt>
          <label for="home">Subject:</label>
        </dt>
        <dd>
          <input type="text" name="subject" id="subject" tabindex="1"/>
        </dd>
        <dt>
          <label for="broupe"></label>
        </dt>
        <dt>
          <label for="comments">Message:</label>
        </dt>
        <dt>
          <textarea name="message" id="message" cols="60" rows="10" tabindex="2"></textarea>
        </dt>
      <div class="barSubmit">
        <dl>
          <input type="submit" name="send" id="fsend" value="Send" class="button" tabindex="3" />
        </dl>
      </div>
    </form>
    </fieldset>
</div>
</div>
<? } //end if ?>
Return current item: Php AddressBook 2