thelorax Posted October 29, 2009 Share Posted October 29, 2009 Hi - I have 2 problems with a new website - homeswapvacations.com, which I need help solving. The first problem - In the left column (on all pages) is "Featured Listing" column (in the admin panel, a listing can be selected to be featured in that column). When you click the thumbnail there, it should take you to the full listing for that house, but instead it returns multiple PHP errors. I can't figure out the problem. The second problem - When you view an individual full listing for a house (Browse Listings--->then click the thumbnail for a house), there is a GHOST at the top of the listing that I need to remove. I call it a ghost because it looks like an image but I can't right click view image to see the file name. It's a blue button that says "SAVED THIS". How can I remove it? it has no working function. Hope I can get good help here fast, I really need it, thank you. Link to comment https://forums.phpfreaks.com/topic/179444-two-problems-multiple-php-errors-when-clicking-a-linkandremoving-a-ghost/ Share on other sites More sharing options...
mikesta707 Posted October 29, 2009 Share Posted October 29, 2009 OH GOD GHOSTS But yeah.. what are the errors you are receiving, and post the code for that page. Can't really help without more information. As far as your "Ghost" You are going to have to provide some code where the ghost is or describe it more. I honestly don't understand what you are describing at all. Link to comment https://forums.phpfreaks.com/topic/179444-two-problems-multiple-php-errors-when-clicking-a-linkandremoving-a-ghost/#findComment-946800 Share on other sites More sharing options...
thelorax Posted October 29, 2009 Author Share Posted October 29, 2009 Ok here is an image attachment of the "ghost", and I pasted the code from the files containing the PHP errors below (to see the errors, please go to the website): homeView.php - errors in lines 144, 145, 305, 317, 321, 333, 337, 341, 364, 368, 372, 376, 380 <?php include("includes/header_in.php"); ?> <script type='text/javascript'> function initG() { var oimg = document.getElementsByTagName('a'); for(var i =0; i<oimg.length;i++) { if(oimg[i].className.indexOf('oimg') != -1) { oimg[i].onclick = changeImg; } } } function changeImg() { var start = this.href.lastIndexOf('/') + 1; //var end = this.href.lastIndexOf('.'); var menuName = this.href.substring(start); var imgp = document.getElementById('imgp'); imgp.src = '<?php echo $base . "uploads/"; ?>'+ menuName; if(document.getElementById('imgcaption')) { var capt = document.getElementById('imgcaption'); capt.innerHTML = document.getElementById(menuName).innerHTML; } return false; } </script> <style type='text/css'> #imgp { display: block; float: left; } #imgGal { height: 350px; margin-left: 50px; margin-top: 10px; } #imgGal ul { height: 350px; width: 300px; margin-left: 320px; } #imgGal li { float: left; margin-right: 10px; display: inline; } span { color: red; } span.lbl { color: green; display: block; width: 150px; float: left; margin-right: 5px; text-align: right; } #info { position: relative; } #info h2 { margin-top: 20px; margin-bottom: 5px; } #info p { clear: both; margin-top: 0; padding: 5px 0; } #imgwc { float: left; width: 300px; } #imgcaption { text-align: center } </style> <p style="margin: 0 0 10px 0;"><a href="<?php echo $base . "view_listings"; ?>" class="back-arrow">Return to listings</a></p> <?php $htype = array( 'house' => 'House', 'apartment' => 'Aparment/Unit', 'flat' => 'Flat', 'condo' => 'Condo', 'cottage' => 'Cottage/Cabin', 'hhouse' => 'Holiday House', 'duplex' => 'Duplex', 'farm' => 'Farm House', 'motor' => 'Motor Home/Caravan', 'caravan' => 'Caravan on site', 'houseboat' => 'Houseboat/Yacht', 'bb' => 'B&B/Hotel/Motel', 'others' => 'Other' ); if(isset($members)) { $imgv = array(); foreach($members as $v) { if($v['booked'] != '0000-00-00') { $booked = $v['booked']; } else { $booked = 'available'; } if(!empty($v['country'])) { $ctv = $v['country']; } else { $ctv = ''; } if(!empty($v['state'])) { $stv = $v['state']; } else { $stv = ''; } if(!empty($v['address'])) { $atv = $v['address']; } else { $atv = ''; } if(!empty($v['house_type'])) { $htv = $v['house_type']; } else { $htv = ''; } if(!empty($v['bedrooms'])) { $btv = $v['bedrooms']; } else { $btv = '0'; } if(!empty($v['swap_date'])) { $swapdv = $v['swap_date']; } else { $swapdv = ''; } if(!empty($v['destination'])) { $destv = $v['destination']; } else { $destv =''; } if(!empty($v['offer'])) { $offerv = $v['offer']; } else { $offerv =''; } if(!empty($v['description'])) { $desc = $v['description']; } else { $desc = ''; } if(!empty($v['bath'])) { $bath = $v['bath']; } else { $bath = ''; } if(!empty($v['sleeps'])) { $sleeps = $v['sleeps']; } else { $sleeps = ''; } if(!empty($v['hd'])) { $hd = $v['hd']; } else { $hd = ''; } if(!empty($v['swap_exp'])) { $swap_exp = $v['swap_exp']; } else { $swap_exp = ''; } if(!empty($v['image1'])) { $imgv[] = $v['image1']; $imgc[] = $v['cap1']; } if(!empty($v['image2'])) { $imgv[] = $v['image2']; $imgc[] = $v['cap2']; } if(!empty($v['image3'])) { $imgv[] = $v['image3']; $imgc[] = $v['cap3']; } if(!empty($v['image4'])) { $imgv[] = $v['image4']; $imgc[] = $v['cap4']; } if(!empty($v['image5'])) { $imgv[] = $v['image5']; $imgc[] = $v['cap5']; } } } ?> <form action="<?php echo $base . 'view_listings/home';?>" method="post"> <input type='hidden' name='hid' value='<?php echo $v['house_id']; ?>' /> <input type='submit' class='button' name='submit' value='Saved this listing' /> </form> <div class="boxwrap"> <div class="formbox-head"> <h3>House Details</h3> </div> <div id='imgGal'> <div id='imgwc' > <?php if(!empty($imgv[0])) { echo "<img id='imgp' src='" . $base . "uploads/" . $imgv[0] . "' width=300 height=300 />"; } if(!empty($imgc[0])) { ?> <p id='imgcaption'><strong style='font-weight: bold'><?php echo $imgc[0]; ?></strong></p> <?php } ?> </div> <ul> <?php $i = 0; foreach($imgv as $iv) { echo "<li><a class='oimg' href='$iv'><img src='" .$base . 'uploads/' . $iv . "' width=100 height=100 /></a></li>"; echo "<span style='display: none' id='$iv'><strong style='font-weight: bold'>" . $imgc[$i] . "</strong></span>"; $i++; } ?> </ul> </div> </div> <?php echo '<div class="boxwrap"> <div class="formbox-head"> <h3>House Details</h3> </div> <div class="boxwrap-content">'; echo ' <table border=0> <tr> <td><strong>House ID:</strong></td> <td>'. $v['house_id'] .'</td> </tr> <tr> <td><strong>Booked Until:</strong></td> <td>'. $booked .'</td> </tr> <tr> <td><strong>Description:</strong></td> <td>'. $hd .'</td> </tr> <tr> <td><strong>Date of home post:</strong></td> <td>'. date("Y-m-d", strtotime($v['date_activated'])) .'</td> </tr> <tr> <td><strong>User name:</strong></td> <td>'. $v['user_name'] . '</td> </tr> <tr> <td><strong>Country:</strong></td> <td>'. $ctv .'</td> </tr> <tr> <td><strong>State:</strong></td> <td>'. $stv .'</td> </tr> <tr> <td><strong>City:</strong></td> <td>'. $v['city'] .'</td> </tr> <tr> <td><strong>Do you have a 2nd home / <br/>Non-simultaneous exchange ok?:</strong></td> <td>'. $v['shome'] .'</td> </tr> <tr> <td><strong>User Address:</strong></td> <td>'. $v['address'] .'</td> </tr> <tr> <td><strong>Destination:</strong></td> <td>'. $destv .'</td> </tr> </table> '; echo '</div></div>'; ?> <?php echo '<div class="boxwrap"> <div class="formbox-head"> <h3>Info</h3> </div> <div class="boxwrap-content">'; echo ' <table border=0> <tr> <td><strong>Number of adults:</strong></td> <td>'. $v['num_adults'] .'</td> </tr> <tr> <td><strong>Number of kids:</strong></td> <td>'. $v['num_kids'] .'</td> </tr> <tr> <td><strong>Age(s) of female child(ren):</strong></td> <td>'. $v['age_female'] .'</td> </tr> <tr> <td><strong>Age(s) of male child(ren):</strong></td> <td>'. $v['age_male'] .'</td> </tr> <tr> <td><strong>Number of previous home exchanges:</strong></td> <td>'. $v['swap_exp'] .'</td> </tr> </table> '; echo '</div></div>'; ?> <br /> <?php echo '<div class="boxwrap"> <div class="formbox-head"> <h3>Location Details</h3> </div> <div class="boxwrap-content">'; echo " <table border=0> <tr> <td><strong>Location:</strong> </td><td>"; if(!empty($v['location'])) { foreach($v['location'] as $locv) { if($locv == end($v['location'])) { echo "$locv->location_type"; } else { echo "$locv->location_type, "; } } } else { echo '<td>no</td>'; } echo "</td></tr>"; echo "<tr><td><strong>Other Location type:</strong></td><td>"; if(!empty($v['other_location'])) { foreach($v['other_location'] as $olv) { echo "$olv->other_lt_name"; } } else { echo "none"; } echo "</td></tr></table>"; echo "</div> <div class='clear'></div> </div>"; ?> <?php echo '<div class="boxwrap"> <div class="formbox-head"> <h3>Travel Dates</h3> </div> <div class="boxwrap-content">'; echo " <table> <tr> <td><strong>Preferred swap date:</strong></td><td>" . $swapdv . "</td></tr><tr>"; echo "<td><strong>Preferred swap length:</strong> </td><td>"; if(!empty($v['swap_length'])) { foreach($v['swap_length'] as $slv) { if($slv == end($v['swap_length'])) { echo "$slv->time"; } else { echo "$slv->time, "; } } } else { echo 'no'; } echo "</td></tr>"; echo "<tr><td><strong>Open to offer:</strong> </td><td>" . $offerv . "</td></tr>"; echo "</table> <div class='clear'></div> </div>"; ?> <?php echo '<div class="boxwrap"> <div class="formbox-head"> <h3>Contact this member</h3> </div> <div class="boxwrap-content">'; if(isset($message)) { echo "<form action='$base"."message"."' name='homeForm' method='post'>"; echo "<input type='hidden' name='id' value='$id' />"; echo "<p>$message</p>"; echo "</form>"; } echo "</div> <div class='clear'></div> </div>"; ?> <?php echo '<div class="boxwrap"> <div class="formbox-head"> <h3>Member Profile</h3> </div> <div class="boxwrap-content">'; echo "<p>$desc</p>"; echo '</div></div>'; ?> <?php if(!empty($htv)) { $hstype = $htype[$htv]; } else { $hstype = ''; } echo '<div class="boxwrap"> <div class="formbox-head"> <h3>House Details</h3> </div> <div class="boxwrap-content">'; echo ' <table border=0> <tr> <td><strong>Type:</strong></td> <td>'. $hstype .'</td> </tr> <tr> <td><strong>Bathrooms:</strong></td> <td>'.$bath.'</td> </tr> <tr> <td><strong>Bedrooms:</strong></td> <td>'.$btv.'</td> </tr> <tr> <td><strong>Sleeps:</strong></td> <td>'.$sleeps.'</td> </tr> <tr> <td><strong>About the house:</strong></td> <td>'.$hd.'</td> </tr> </table> '; echo'</div></div>'; ?> <p style='border: none'> <?php echo '<div class="boxwrap"> <div class="formbox-head"> <h3>House Features</h3> </div> <div class="boxwrap-content">'; if(!empty($v['feat'])) { foreach($v['feat'] as $ftv) { if($ftv == end($v['feat'])) { echo "<strong> $ftv->features</strong> "; } else { echo "<strong> $ftv->features</strong>, "; } } } echo '</div></div>'; ?> </p> <?php echo '<div class="boxwrap"> <div class="formbox-head"> <h3>Local Attractions</h3> </div> <div class="boxwrap-content">'; if(!empty($v['locala'])) { foreach($v['locala'] as $locav) { if($locav == end($v['locala'])) { echo "<strong> $locav->attractions</strong> "; } else { echo "<strong> $locav->attractions</strong>, "; } } } echo "</p>"; echo '</div></div>'; ?> <?php echo '<div class="boxwrap"> <div class="formbox-head"> <h3>Special requests</h3> </div> <div class="boxwrap-content">'; if(!empty($v['notes'])) { foreach($v['notes'] as $nv) { if($nv == end($v['notes'])) { echo "<strong> $nv->note</strong> "; } else { echo "<strong> $nv->note</strong>, "; } } } echo'</div></div>'; ?> <?php include("includes/footer_in.php"); ?> view_listings.php - errors in lines 489, 501 <?php class View_listings extends Controller { function View_listings() { parent::Controller(); $this->load->database(); $this->load->library('pagination'); $this->load->model('Get_model'); } function index() { $data['base'] = base_url(); $data['pageTitle'] = 'View Listings'; $data['bodyId'] = 'viewlistingspage'; //start landmarks $tbl = 'landmarks'; $this->Get_model->getAll($tbl); if($this->Get_model->err == true) { $data['land'] = $this->Get_model->getRand('landmarks', 4); } //end landmarks //start featured $tbl = 'members'; $se = "house.house_country, house.house_type, house.image1, house.image2, house.image3, house.image4, house.image5, members.swap_date"; $id = array ( 'house.featured' => 'YES' ); $join = array( 'tblj' => 'house', 'jv' => 'house.member_id = members.member_id' ); $limit = 6; $or = 'house.featured_date'; $orv = 'desc'; $data['featured'] = $this->Get_model->joinF($se, $tbl, $join, $id, $limit, $or, $orv); //end featured $config['base_url'] = base_url() . 'view_listings'; if(!isset($_POST['id']) && $this->session->userdata('country') == null && $this->session->userdata('memid') == null && !isset($_POST['header']) && $this->session->userdata('cont') == null && $this->uri->segment(3) == false) { $url = base_url() . 'view_listings/all' ; redirect($url); } if($this->uri->segment(2) == true) { $strt = $this->uri->segment(2); } else { $strt = 0; } $config['per_page'] = '6'; $config['uri_segment'] = 2; $tbl = 'members'; $join = array( 'tblj' => 'house', 'jv' => 'house.member_id = members.member_id' ); if(isset($_POST['header'])) { if(isset($_POST['ct']) && $_POST['ct'] != "none") { if(isset($_POST['st'])) { $st = $_POST['st']; } $ct = $_POST['ct']; $tbl = 'country'; $in = array( 'country_id' => $ct ); $cName = $this->Get_model->get($tbl, $in); if($this->Get_model->err == true) { foreach($cName as $cNamev) { $ct = $cNamev->name; } } //added a st as a variable of state $tbl = 'house'; $in = array( 'house.house_country' => $ct, ); $this->Get_model->get($tbl, $in); if($this->Get_model->err == false) { $data['text'][] = "Sorry, there are no listings for $ct"; $config['total_rows'] = $this->db->count_all('members'); $tbl = 'members'; $id = array( 'house.house_country !=' => "" ); $mem = $this->Get_model->joinW($tbl, $join, $id, $config['per_page'], $strt); $count = $this->Get_model->joinWW($id, $tbl, $join); if($this->session->userdata('memid') != null) { $this->session->unset_userdata('memid'); } if($this->session->userdata('cont') != null) { $this->session->unset_userdata('cont'); } if($this->session->userdata('country') != null) { $this->session->unset_userdata('country'); } } else { if($this->session->userdata('memid') != null) { $this->session->unset_userdata('memid'); } if($this->session->userdata('cont') != null) { $this->session->unset_userdata('cont'); } //condition if there is state <from fritz if(!empty($st)) { $tbl = 'members'; $id = array( 'house.house_country' => $ct, 'house.house_state' => $st ); } else { $tbl = 'members'; $id = array( 'house.house_country' => $ct ); } $mem = $this->Get_model->joinW($tbl, $join, $id, $config['per_page'], $strt); $count = $this->Get_model->joinWCount($tbl, $join, $id); $config['total_rows'] = count($count); $this->session->set_userdata('country', $ct); } } else { if($_POST['ct'] == "none") { $contid = $_POST['mydropdown']; $data['contid'] = $contid; $tbl = 'house'; $id = $contid; $join = array( 'tblj' => 'country', 'jv' => 'house.house_country = country.name' ); $this->Get_model->conJoin($config['per_page'], $strt, $id); if($this->Get_model->err == true) { if($this->session->userdata('country') != null) { $this->session->unset_userdata('country'); } if($this->session->userdata('memid') != null) { $this->session->unset_userdata('memid'); } $contid = $contid; $this->session->set_userdata('cont', $contid); } else { $conti = array( '1' => 'Africa', '2' => 'Asia', '3'=> 'Europe', '4'=> 'North America', '5'=> 'South America', '6'=> 'Australia' ); $data['text'][] = "Sorry, there are no listings for " . $conti[$contid]; $id = array( 'house.house_country !=' => "" ); $tbl = 'members'; $join = array( 'tblj' => 'house', 'jv' => 'house.member_id = members.member_id' ); $mem = $this->Get_model->joinW($tbl, $join, $id, $config['per_page'], $strt); $count = $this->Get_model->joinWCount($tbl, $join, $id); } } else { $id = array( 'house.house_country !=' => "" ); $mem = $this->Get_model->joinW($tbl, $join, $id, $config['per_page'], $strt); } } } elseif($this->session->userdata('country') != null) { $id = array( 'house.house_country' => $this->session->userdata('country') ); $mem = $this->Get_model->joinW($tbl, $join, $id, $config['per_page'], $strt); $count = $this->Get_model->joinWCount($tbl, $join, $id); $config['total_rows'] = count($count); } if(isset($_POST['id']) || $this->session->userdata('memid') != null) { if($this->session->userdata('country') != null) { $this->session->unset_userdata('country'); } if($this->session->userdata('cont') != null) { $this->session->unset_userdata('cont'); } if(isset($_POST['id'])) { $mid = $_POST['id']; $this->session->set_userdata('memid', $mid); } else { $mid = $this->session->userdata('memid'); } $id = array(); foreach($mid as $midv) { $id[] = $midv; } $wfld = 'house.house_id'; $count = $this->Get_model->joinS($tbl, $join, $wfld, $id); $mem = $this->Get_model->joinSL($tbl, $join, $wfld, $id, $config['per_page'], $strt); $config['total_rows'] = count($count); } if($this->uri->segment(3) == true || $this->session->userdata('cont') != null) { if($this->session->userdata('country') != null) { $this->session->unset_userdata('country'); } if($this->session->userdata('memid') != null) { $this->session->unset_userdata('memid'); } if($this->uri->segment(3) == true) { $contid = $this->uri->segment(3); $this->session->set_userdata('cont', $contid); } else { $contid = $this->session->userdata('cont'); } $data['contid'] = $contid; $tbl = 'house'; $id = $contid; $join = array( 'tblj' => 'country', 'jv' => 'house.house_country = country.name' ); $this->Get_model->conJoin($config['per_page'], $strt, $id); if($this->Get_model->err == true) { $mem = $this->Get_model->conJoin($config['per_page'], $strt, $id); $count = $this->Get_model->conJoinCount($id); } else { $conti = array( '1' => 'Africa', '2' => 'Asia', '3'=> 'Europe', '4'=> 'North America', '5'=> 'South America', '6'=> 'Australia' ); $data['text'][] = "Sorry, there are no listings for " . $conti[$contid]; $id = array( 'house.house_country !=' => "" ); $tbl = 'members'; $join = array( 'tblj' => 'house', 'jv' => 'house.member_id = members.member_id' ); $mem = $this->Get_model->joinW($tbl, $join, $id, $config['per_page'], $strt); $count = $this->Get_model->joinWCount($tbl, $join, $id); } } if(!empty($mem)) { foreach($mem as $v) { $memd = $v->house_id; $data['members'][$memd]['member_id'] = $v->member_id; $data['members'][$memd]['country'] = $v->house_country; $data['members'][$memd]['state'] = $v->house_state; $data['members'][$memd]['address'] = $v->house_address; $data['members'][$memd]['bedrooms'] = $v->bedrooms; $data['members'][$memd]['house_type'] = $v->house_type; $in = array( 'member_id' => $v->member_id, 'house_id' => $v->house_id, 'with' => 'YES' ); $tbl = 'location'; $data['members'][$memd]['location'] = $this->Get_model->get($tbl, $in); $data['members'][$memd]['swap_date'] = $v->swap_date; $data['members'][$memd]['destination'] = $v->destination; $data['members'][$memd]['offer'] = $v->offer; $data['members'][$memd]['city'] = $v->nearest_city; $in = array( 'member_id' => $v->member_id, 'house_id' => $v->house_id, 'with' => 'YES' ); $tbl = 'swap_time'; $data['members'][$memd]['swap_length'] = $this->Get_model->get($tbl, $in); $data['members'][$memd]['image1'] = $v->image1; $data['members'][$memd]['image2'] = $v->image2; $data['members'][$memd]['image3'] = $v->image3; $data['members'][$memd]['image4'] = $v->image4; $data['members'][$memd]['image5'] = $v->image5; $data['members'][$memd]['house_id'] = $v->house_id; } } $this->pagination->initialize($config); $data['start'] = $strt ; $data['display'] = $config['per_page']; if(!empty($count)) { $data['num_pages'] = ceil(count($count)/$config['per_page']); } else { $data['num_pages'] = ''; } $this->load->view('view_listingsView', $data); } function home() { //start landmarks $tbl = 'landmarks'; $this->Get_model->getAll($tbl); if($this->Get_model->err == true) { $data['land'] = $this->Get_model->getRand('landmarks', 4); } //end landmarks if($this->uri->segment(3) == TRUE) { $memd = $this->uri->segment(3); $data['base'] = base_url(); $data['pageTitle'] = 'View Listings'; $data['bodyId'] = 'viewlistingspage'; //start featured $tbl = 'members'; $se = "house.house_country, house.house_type, house.image1, house.image2, house.image3, house.image4, house.image5, members.swap_date"; $id = array ( 'house.featured' => 'YES' ); $join = array( 'tblj' => 'house', 'jv' => 'house.member_id = members.member_id' ); $limit = 6; $or = 'house.featured_date'; $orv = 'desc'; $data['featured'] = $this->Get_model->joinF($se, $tbl, $join, $id, $limit, $or, $orv); //end featured $this->load->model('Get_model'); $tbl = 'members'; $join = array( 'tblj' => 'house', 'jv' => 'house.member_id = members.member_id' ); $id = array( 'house.house_id' => $memd ); $mem = $this->Get_model->joinWCount($tbl, $join, $id); if(!empty($mem)) { foreach($mem as $v) { $memd = $v->house_id; $data['members'][$memd]['member_id'] = $v->member_id; $data['members'][$memd]['country'] = $v->house_country; $data['members'][$memd]['state'] = $v->house_state; $data['members'][$memd]['address'] = $v->house_address; $data['members'][$memd]['bedrooms'] = $v->bedrooms; $data['members'][$memd]['house_type'] = $v->house_type; $data['members'][$memd]['swap_exp'] = $v->swap_exp; $data['members'][$memd]['num_adults'] = $v->num_adults; $data['members'][$memd]['num_kids'] = $v->num_kids; $data['members'][$memd]['age_male'] = $v->age_male; $data['members'][$memd]['age_female'] = $v->age_female; $in = array( 'member_id' => $v->member_id, 'house_id' => $memd, 'with' => 'YES' ); $tbl = 'location'; $data['members'][$memd]['location'] = $this->Get_model->get($tbl, $in); $in = array( 'member_id' => $v->member_id, 'house_id' => $memd ); $tbl = 'other_location_type'; $data['members'][$memd]['other_location'] = $this->Get_model->get($tbl, $in); $data['members'][$memd]['swap_date'] = $v->swap_date; $data['members'][$memd]['destination'] = $v->destination; $data['members'][$memd]['offer'] = $v->offer; $data['members'][$memd]['date_activated'] = $v->date_activated; $data['members'][$memd]['user_name'] = $v->user_name; $data['members'][$memd]['booked'] = $v->booked; $data['members'][$memd]['city'] = $v->nearest_city; $data['members'][$memd]['shome'] = $v->shome; $data['members'][$memd]['address'] = $v->address; $in = array( 'member_id' => $v->member_id, 'house_id' => $memd, 'with' => 'YES' ); $tbl = 'swap_time'; $data['members'][$memd]['swap_length'] = $this->Get_model->get($tbl, $in); $data['members'][$memd]['image1'] = $v->image1; $data['members'][$memd]['image2'] = $v->image2; $data['members'][$memd]['image3'] = $v->image3; $data['members'][$memd]['image4'] = $v->image4; $data['members'][$memd]['image5'] = $v->image5; $data['members'][$memd]['cap1'] = $v->caption1; $data['members'][$memd]['cap2'] = $v->caption2; $data['members'][$memd]['cap3'] = $v->caption3; $data['members'][$memd]['cap4'] = $v->caption4; $data['members'][$memd]['cap5'] = $v->caption5; $data['members'][$memd]['house_id'] = $v->house_id; $data['members'][$memd]['description'] = $v->description; $data['members'][$memd]['bath'] = $v->bathrooms; $data['members'][$memd]['sleeps'] = $v->sleeps; $data['members'][$memd]['hd'] = $v->house_details; $in = array( 'member_id' => $v->member_id, 'house_id' => $memd, 'with' => 'YES' ); $tbl = 'local_attractions'; $data['members'][$memd]['locala'] = $this->Get_model->get($tbl, $in); $in = array( 'member_id' => $v->member_id, 'house_id' => $memd, 'approved' => 'YES' ); $tbl = 'notes'; $data['members'][$memd]['notes'] = $this->Get_model->get($tbl, $in); } } $in = array( 'member_id' => $v->member_id, 'house_id' => $memd, 'with' => 'YES' ); $tbl = 'features'; $data['members'][$memd]['feat'] = $this->Get_model->get($tbl, $in); if($this->session->userdata('mid') != null) { $data['message'] = "<a href='javascript:document.homeForm.submit()'>Send this member a message</a>"; } else { $data['message'] = "You need to <a href='". base_url() ."login'>login</a> to send a message"; } $data['id'] = $v->member_id; $this->load->view('homeView', $data); } else { redirect(base_url()); } } function all() { $data['base'] = base_url(); $data['pageTitle'] = 'View Listings'; $data['bodyId'] = 'viewlistingspage'; //start landmarks $tbl = 'landmarks'; $this->Get_model->getAll($tbl); if($this->Get_model->err == true) { $data['land'] = $this->Get_model->getRand('landmarks', 4); } //end landmarks //start featured $tbl = 'members'; $se = "house.house_country, house.house_type, house.image1, house.image2, house.image3, house.image4, house.image5, members.swap_date"; $id = array ( 'house.featured' => 'YES' ); $join = array( 'tblj' => 'house', 'jv' => 'house.member_id = members.member_id' ); $limit = 6; $or = 'house.featured_date'; $orv = 'desc'; $data['featured'] = $this->Get_model->joinF($se, $tbl, $join, $id, $limit, $or, $orv); //end featured $config['base_url'] = base_url() . 'view_listings/all'; if($this->uri->segment(3) == true) { $strt = $this->uri->segment(3); } else { $strt = 0; } $config['per_page'] = '6'; $tbl = 'members'; $join = array( 'tblj' => 'house', 'jv' => 'house.member_id = members.member_id' ); $id = array( 'house.house_country !=' => "" ); $mem = $this->Get_model->joinW($tbl, $join, $id, $config['per_page'], $strt); $count = $this->Get_model->joinWW($id, $tbl, $join); $config['total_rows'] = count($count); if(!empty($mem)) { foreach($mem as $v) { $memd = $v->house_id; $data['members'][$memd]['member_id'] = $v->member_id; $data['members'][$memd]['country'] = $v->house_country; $data['members'][$memd]['state'] = $v->house_state; $data['members'][$memd]['address'] = $v->house_address; $data['members'][$memd]['bedrooms'] = $v->bedrooms; $data['members'][$memd]['house_type'] = $v->house_type; $in = array( 'member_id' => $v->member_id, 'house_id' => $v->house_id, 'with' => 'YES' ); $tbl = 'location'; $data['members'][$memd]['location'] = $this->Get_model->get($tbl, $in); $data['members'][$memd]['swap_date'] = $v->swap_date; $data['members'][$memd]['destination'] = $v->destination; $data['members'][$memd]['offer'] = $v->offer; $data['members'][$memd]['city'] = $v->nearest_city; $in = array( 'member_id' => $v->member_id, 'house_id' => $v->house_id, 'with' => 'YES' ); $tbl = 'swap_time'; $data['members'][$memd]['swap_length'] = $this->Get_model->get($tbl, $in); $data['members'][$memd]['image1'] = $v->image1; $data['members'][$memd]['image2'] = $v->image2; $data['members'][$memd]['image3'] = $v->image3; $data['members'][$memd]['image4'] = $v->image4; $data['members'][$memd]['image5'] = $v->image5; $data['members'][$memd]['house_id'] = $v->house_id; } } $this->pagination->initialize($config); $data['start'] = $strt; $data['num_pages'] = ceil(count($count)/$config['per_page']); $data['display'] = $config['per_page']; $data['forall'] = 'true'; $this->load->view('view_listingsView', $data); } //for the dropdown of the state <from fritz function state() { $result = ""; $country = $this->input->post('id'); $get = $this->db->query(" SELECT * FROM state,country WHERE state.country_id = country.country_id AND country.country_id = '$country' ORDER BY name ASC "); if($get->num_rows() > 0 ) { $result = $get->result_array(); } if($result!="") { echo '<select name="st" class="dropdwn" >'; echo '<option value="" selected="selected"></option>'; foreach($result as $key => $var) { echo '<option value="'.$var['state'].'">'.$var['state'].'</option>'; } echo '</select>'; } else { echo '<select name="st" class="dropdwn">'; echo '<option value=""></option>'; echo '</select>'; } } function state1() { $result = ""; $country = $this->input->post('id'); $get = $this->db->query(" SELECT * FROM state,country WHERE state.country_id = country.country_id AND country.country_id = '$country' ORDER BY name ASC "); if($get->num_rows() > 0 ) { $result = $get->result_array(); } if($result!="") { echo '<select name="state2" class="dropdwn" >'; echo '<option value="" selected="selected"></option>'; foreach($result as $key => $var) { echo '<option value="'.$var['state'].'">'.$var['state'].'</option>'; } echo '</select>'; } else { echo '<select name="state2" class="dropdwn">'; echo '<option value=""></option>'; echo '</select>'; } } } ?> [attachment deleted by admin] Link to comment https://forums.phpfreaks.com/topic/179444-two-problems-multiple-php-errors-when-clicking-a-linkandremoving-a-ghost/#findComment-946851 Share on other sites More sharing options...
thelorax Posted October 30, 2009 Author Share Posted October 30, 2009 any help with this? please. Link to comment https://forums.phpfreaks.com/topic/179444-two-problems-multiple-php-errors-when-clicking-a-linkandremoving-a-ghost/#findComment-947563 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.