473,320 Members | 1,828 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Trying to get in image on the php page to link back to itself with new images.

Trying to get in image on the php page to link back to itself with new images.
Please Help!!! Im just stuck and going crazy.
Here's my problem, keep in mind Im still learning. This is a site Im doing for someone else that was already created.
Im on this PHP file called rental_profile_dewdrop
and it displays the pictures I needed by calling them from my PHP files
I then want to be able to make one if the photos on the pages a link back to itself, but it would change 2 of the photos on the page based on info from my php files.

I will place all cap notes where the image is and the info Ive place.
Of course it does not work, Please help.





Expand|Select|Wrap|Line Numbers
  1. <?
  2. if (!$Link)
  3. include("global.inc.php");
  4.  
  5. $query = 
  6.     "SELECT ".
  7.         "* ".
  8.     "FROM ".
  9.         "community ".
  10.     "WHERE ".
  11.         "community_id = '14'";
  12. $res = mysql_query($query) or die(mysql_error());
  13. $community = mysql_fetch_assoc($res);
  14. mysql_free_result($res);
  15.  
  16. $query =
  17.     "SELECT ".
  18.         "* ".
  19.     "FROM ".
  20.         "communityphoto ".
  21.     "WHERE ".
  22.         "communityphoto_community_id = '14' AND
  23.         communityphoto_community_id_sub = ''".
  24.     "ORDER BY ".
  25.         "communityphoto_order";
  26. $pres = mysql_query($query) or die(mysql_error());
  27. while ( $prow = mysql_fetch_assoc($pres) )
  28.     $photo[] = $prow;
  29. mysql_free_result($pres);
  30. ?>
  31. <?php echo('<?xml version="1.0" encoding="UTF-8"?>'); ?>
  32.  
  33. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
  34. <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" >
  35.  
  36. <head>
  37. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  38. <title>Burkentine &amp; Sons</title>
  39. <link href="common/styles/jquery.lightbox-0.5.css" rel="stylesheet" type="text/css" />
  40. <link href="common/styles/global.css" rel="stylesheet" type="text/css" />    
  41. <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
  42. <script type="text/javascript" src="common/scripts/jquery.lightbox-0.5.js"></script>
  43. <script type="text/javascript" src="common/scripts/jquery.cycle.all.min.js"></script>
  44. <script type="text/javascript" src="common/scripts/global.js"></script>
  45. <script src="../SpryAssets/SpryEffects.js" type="text/javascript"></script>
  46. <style type="text/css">
  47. <!--
  48. .community_module_photoCopy {
  49.     width: 220px;
  50.     float: left;
  51.     margin-right: 0px;
  52.     margin-bottom: 10px;
  53. }
  54. .style3 {
  55.     font-family: Georgia, "Times New Roman", Times, serif;
  56.     font-weight: bold;
  57.     border-bottom-width: 1px;
  58.     border-bottom-style: solid;
  59.     border-bottom-color: #C2BC9A;
  60.     padding-bottom: 4px;
  61. }
  62. #renter_results_col01 {
  63.     border: 0;
  64.     width: 250px;
  65.     float: left;
  66. }
  67. #renter_results_col02 {
  68.     float: right;
  69.     width: 391px;
  70. }
  71. .imagesthumbnailrental {
  72.     height: 150px;
  73.     width: 120px;
  74.     float: left;
  75.     margin-left: 10px;
  76. }
  77. -->
  78. </style>
  79. </head>
  80.  
  81. <body>
  82.  
  83.     <!-- wrapper -->
  84. <div id="wrapper">
  85.  
  86.         <div id="wrapper_inner">
  87.  
  88.             <!-- inside_header -->
  89.             <div id="inside_header">
  90.               <?php include("header.php"); ?>
  91.             </div>
  92.   <!-- inside_header -->
  93.  
  94.             <div class="clear"></div>
  95.  
  96.             <!-- content -->
  97.             <div id="inside_content_wrapper">
  98.  
  99. <div class="inside_content_inner">
  100.  
  101.                     <div class="inside_page_header_blank">
  102.                     <h1>Rentals: 
  103.                       <?= $community['community_name'] ?> - 
  104.                     <?= $community['community_city'] ?>, 
  105.                     <?= $community['community_state'] ?></h1>
  106.                   </div>
  107.  
  108.                     <div class="clear"></div>
  109.  
  110.                     <div class="inside_content_col01_02_wrapper">
  111.  
  112.                          <div class="community_module_wrapper">
  113. <!---->             
  114.  
  115. <div class="community_module_wrapper_inner"> 
  116.       <div id="renter_results_col01">
  117.               <div class="community_module_photoCopy">
  118.                                  <?  $logo = $community['community_logo'];
  119.                                 if ( $logo ) { ?>
  120.                                  <img src="CmImageDir/<?= $logo ?>" width="210"
  121.                          height="*" border="0" /><? } else { ?><? } ?>
  122.               </div>
  123.  
  124.                      <div class="clear" style="border:0; margin:0; padding:0;"></div>
  125. <div class="rental_module_text_box"  style="float: left; margin:0; padding: 0; border: 0; width: 225px;">
  126. <h4><span class="style3">
  127.                                  <?= $community['community_addr'] ?> 
  128.                                    <?= $community['community_city'] ?> 
  129.                                    , 
  130.                                    <?= $community['community_state'] ?>      
  131.                                  <?= $community['community_zip'] ?>
  132.                                   </span> </h4>
  133.  
  134.  
  135.                                  <h4><strong><br />
  136.                                  Price Range: </strong><?= $community['community_pricerange'] ?></h4>
  137.   <h4 ><strong>Square Foot Range: </strong><?= $community['community_sqftrange'] ?></h4>
  138.                <h4> <strong>Model Hours: </strong><?= nl2br($community['community_hours']) ?></h4>
  139.   <h4 ><strong>Agent Info: </strong>
  140.   <?= ($community['community_agents']) ?></h4>
  141.                            <h4 ><strong>Phone: </strong><?= $community['community_phone'] ?></h4>
  142.                               <h4 ><strong>Fax: </strong><?= $community['community_fax'] ?></h4>
  143.  
  144.                 </div>
  145. <div class="clear" style="border:0; margin:0; padding:0;"></div>
  146.                               <p><a href="CmImageDir/DDsitemap.pdf" target="_blank" >
  147.  
  148.  
  149.                            <img src="CmImageDir/DDsitemap.png" width="200"  border="0" /></a>                   </p>
  150.                    <div class="clear" style="border:0; margin:0; padding:0;"></div>
  151.               </div>
  152.  
  153.                            <!--Second column starts containing thumbnail images-->
  154.               <div id="renter_results_col02">
  155.                              <div class="imagesthumbnailrental">                           
  156. THIS IS WERE A PHOTO IS LOCATED AND IM TRYING TO MAKE IT A LINK BACK TO THIS PAGE AND ALSO INCLUDE VARAIBLES FROM MY PHP CHARGE FOR THE 2 NEW IMAGES. THESE IMAGES WOULD REPLACE THE ONES SHOWING AT THIS TIME.
  157.  
  158.                              <a href="rentals_profile_dewdrop.php 
  159.                             <?= $communityphoto['communityphoto_community_id_sub = 1'] ?>">
  160.                              <img src="CmImageDir/rental14dd_u1_5_thumb.png" /></a>
  161.  
  162.                                <p align="center">Units 1-5 and 28-35 </p>
  163.                 </div>
  164.                 <div class="imagesthumbnailrental"> <img src="CmImageDir/rental14dd_u1_5_thumb.png"  /><p align="center">Units 6-7</p>
  165.                 </div>
  166.  
  167.                                  <div class="imagesthumbnailrental"> <img src="CmImageDir/rental14dd_u1_5_thumb.png" /><p align="center">Units 8-11</p>
  168.                    </div>
  169.  
  170.                                  <div class="imagesthumbnailrental"> <img src="CmImageDir/rental14dd_u1_5_thumb.png"/><p align="center" >Units 12-13</p>
  171.                    </div>
  172.  
  173.                                <div class="imagesthumbnailrental"> <img src="CmImageDir/rental14dd_u1_5_thumb.png" /><p align="center">Units 14-15</p>
  174.                    </div>
  175.  
  176.                    <div class="imagesthumbnailrental"> <img src="CmImageDir/rental14dd_u1_5_thumb.png" /><p align="center">Units 16-21 &amp; 22-27</p>
  177.                    </div>
  178.  
  179.  
  180.                 <div style="width:200px; float:left; margin-left: 125px; ">
  181.                 <img src="common/images/Arrow_Button_Rentals.png" alt="" width="175" /></div>
  182.                </p></div>
  183.  
  184. <div class="clear"></div>
  185.  
  186.                             <div id="rental_nav_bar">
  187.                                     <ul>
  188.             <li id="rental_nav_profile"><a href="contact.php">Inquire about Rental</a></li>
  189.            <li id="rental_nav_homes">&lt; <?php if ($community['community_vtour']) { ?><? } ?><a href="http://maps.google.com/maps?f=q&amp;source=s_q&amp;hl=en&amp;geocode=&amp;q=<?= $community['community_addr'] ?>+<?= $community['community_city'] ?>+<?= $community['community_state'] ?>+<?= $community['community_zip'] ?>&amp;ie=UTF8&amp;z=17&amp;iwloc=A" target="_blank">Google Directions</a></li>
  190.            <li id="rental_nav_plans"><a href="">Rental Application</a></li>
  191.             <li id="rental_nav_contact"><a href="rentals.php">
  192. Back to Rentals</a></li>                                
  193.                                     </ul>
  194.                  </div></div></div>
  195.  
  196.  
  197.  
  198.                             <div class="community_header_profile"><h1>Community Profile</h1></div>
  199.  
  200.                                 <div class="inside_content_col01_wrapper">
  201.                                     <div class="inside_content_col01_top"></div>
  202.                                     <div class="inside_content_col01_rpt">
  203.  
  204.                                         <div class="inside_content_col01_wrapper_inner">
  205.                                           <h1><?= $community['community_name'] ?></h1>
  206.                                           <p><strong>Units 1-5 &amp; 28-35<br />
  207.                                           Units 6-7<br />
  208.                                           Units 8-11<br />
  209.                                             Units 12-13<br />
  210.                                           Units 14-15<br />
  211.                                           Units 16-21 &amp; 22-27 </strong></p>
  212.                                           <h2 style="margin-left: -10px">Rental Amenities</h2>
  213.                                                 <ul>
  214.                                                 <? $amen_arr = explode("~", $community['community_amenities']);
  215.                                               foreach ( $amen_arr as $a ) { ?>
  216.                                               <li><?= $a ?></li>
  217.                                                <? }  ?>
  218.                                                 </ul>
  219.  
  220.                                             <p>&nbsp;</p>
  221.  
  222.                                             <h2 style="margin-left: -10px">School Info</h2>
  223.                                                 <ul>
  224.                            <li><a href="<?= $community['community_school_district_url'] ?>"><?= $community['community_school_district'] ?></a></li>
  225.                             <li><?= $community['community_eschool'] ?></li>
  226.                             <li><?= $community['community_mschool'] ?></li>
  227.                             <li><?= $community['community_hschool'] ?></li>
  228.  
  229.                             </ul>
  230.  
  231.  
  232.                                       </div>
  233.  
  234.                                   </div>
  235.  
  236.                                     <div class="inside_content_col01_edge"></div>
  237.  
  238.                                 </div>
  239.  
  240.                          <script type="text/javascript">$(function(){$('.inside_content_col02_wrapper a').lightBox();});</script>
  241.  
  242.                       <div class="inside_content_col02_wrapper" style="margin-right: 0px; width: 495px;">
  243.  
  244.                               <h2><?= $community['community_name'] ?> Image Gallery</h2>
  245.  
  246.                               <div class="clear"></div>
  247.  
  248.                           <? if ($photo[0]) { ?><a href="CmImageDir/<?= $photo[0]['communityphoto_file'] ?>" title="<?= $photo[0]['communityphoto_name'] ?>"><span class="inside_content_col02_wrapper" style="margin-right: 0px; width: 495px;"><a href="CmImageDir/<?= $photo[0]['communityphoto_file'] ?>" title="<?= $photo[0]['communityphoto_name'] ?>"><img src="CmImageDir/<?= $photo[0]['communityphoto_file'] ?>" width="485"  class="photo_edge" border="0" /></a><? } else { ?>
  249.                                     <img src="common/images/noimage_300x250.png" alt="" width="485" height="405" class="photo_edge"/>
  250.                                 <? } ?>                                              
  251.                             <p style="padding-top: 10px;">Additional images (Click to enlarge)</p>
  252.  
  253.                                                  <? if (sizeof($photo) > 1) { ?>
  254.                                        <? for ( $p = 1; $p < sizeof($photo); $p++ ) { ?>
  255.                                         <a href="CmImageDir/<?= $photo[$p]['communityphoto_file'] ?>"  title="<?= $photo[$p]['communityphoto_name'] ?>">
  256.                                         <img src="CmImageDir/<?= $photo[$p]['communityphoto_file'] ?>" width="100" class="photo_edge" style="margin-right: 8px;" />                                        </a>
  257.                                         <? }  } ?>
  258.  
  259.                             <p>&nbsp;</p>
  260.  
  261.  
  262.                         <h2>Rental Description and Directions</h2>
  263.                         <div class="clear"></div>
  264.                         <p><?= nl2br($community['community_desc']) ?></p>
  265.  
  266.  
  267.  
  268.  
  269.                          </div> 
  270.                   </div>
  271.  
  272.  
  273.  
  274.  
  275.                   <?php include("inside_sidebar_right.php"); ?>
  276.  
  277.               </div></div>
  278.  
  279.       </div>
  280. <!-- content -->
  281.  
  282.             <div class="clear"></div>
  283.  
  284.             <!-- footer -->
  285.             <?php include("footer.php"); ?>
  286.             <!-- footer -->
  287.  
  288.  
  289. </div>
  290. <!--wrapper_inner -->
  291.  
  292.     </div>
  293. <!--wrapper -->
  294.  
  295.  
  296. </body></html>
Feb 18 '11 #1
0 988

Sign in to post your reply or Sign up for a free account.

Similar topics

22
by: Jonathan Snook | last post by:
I've been contemplating what the recommended usage of a "top of page" link should be? Should there only ever be one at the bottom of the page? Should they be sprinkled at various points on the...
10
by: Jeff Thies | last post by:
I'd like to embed navigation instructions in html. This would be so that these pages could be spidered and page links name could be extracted and navigation generated. I'm thinking of...
5
by: Janet | last post by:
The following html code appears in an ASP page. The hyperlink is set to white (see the page link color), but when the page renders in IE 6.0, it initially appears in maroon with a white border...
2
by: Kevin Lyons | last post by:
Hello, Can anyone assist me with what I am trying to do with the following code (six different scenarios to try to make the functionality work correctly)? I want to always (and ONLY) display...
6
by: SF RVN | last post by:
Hmmmm.. a wee bit of a problem: Background default.htm has a left-aligned table serving as a 'navigation menu' and a right-aligned iFrame (named 'viewframe') serving as the 'target' for...
0
by: dominosly | last post by:
Okay, this is a rather complicated problem, so here is the short of it: I am using a custom designed user control that simply writes out a plain old html submit button to the page. When the...
1
by: yatharth | last post by:
Hi, Its Urget plz help me out on this issue. I m working on a project in which we have used both java and .net, and the issue is how to maintain security ,if we move from java page link to...
0
by: =?Utf-8?B?TWljaGFlbCBkZSBWZXJh?= | last post by:
To all, I'm trying to use ajax in my web site project but everytime I hit the button on my webform the whole page posts back. The label control that I have in my update panel does what it is...
3
by: Dipti Singh | last post by:
Hi All, Please help me, I am trying it from 2 days. I have a login page in asp that is including other pages using #include..... after login user in the same page but enters in the database. I...
2
by: =?Utf-8?B?V2ViQnVpbGRlcjQ1MQ==?= | last post by:
I'm reying to get around the problem of cross page post back. I'm attempting to use an interface to cast the previous page. if (PreviousPage != null) { ICommonPostback frm = PreviousPage as...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.