							
										

									<?
									
										// Banner Ads Start

											$servername = "localhost";
											$username = "landscap_lol";
											$password = "meow2meow";
											$dbname = "landscap_lollive";
	
										// Create connection
											$conn = new mysqli($servername, $username, $password, $dbname);
										// Check connection
											if ($conn->connect_error) {
   												 die("Connection failed: " . $conn->connect_error);
											} 
			
											$cat1 = $_GET['ad'];
											$cat2 = $_GET['number'];
											$cat3 = $_GET['catMain'];
	  
			
										

										// start for the banner add counting and getting from table
										
											// $ad = $_GET["ad"];
											$ad = 1;

											if ($ad=='1') {

											$sql = "SELECT * FROM banner_ups3 where ROS = 'yes' ORDER BY RAND()";
											$result = $conn->query($sql);									
									
										// banner rotating section
											while($row = mysqli_fetch_array($result)) {
												
												$links = substr('' . $row[picture]. '', 0, 5);
												
												// echo $links;
												
													if ($links == 'vista'){
														
														
													?><section><ins class='dcmads' style='display:inline-block;width:240px;height:240px'
													data-dcm-placement='N46002.2575001LANDSCAPEONLINE.CO/B11050930.207463698'
													data-dcm-rendering-mode='iframe'
													data-dcm-https-only
													data-dcm-resettable-device-id=''
													data-dcm-app-id=''>
													<script src='https://www.googletagservices.com/dcm/dcmads.js'></script>
												</ins><br><br>
										
												<?
												

														
											} else {
														
													echo "<section><a href='" . $row['web'] . "' onclick='window.open(trackOutboundLink('" . $row['web'] . "'); return false;)' target='_blank'><img class='adSize' src='https://landscapearchitect.com/banner/" . $row[picture] . "' alt='' /></a></section><br>";														
														
										}
												
												
											}
												
												
												
										}else{
											$sql = "SELECT * FROM banner_ups where product = '" . $ad . "' ORDER BY RAND()";
											$result = $conn->query($sql);									
									
										// banner rotating section
											while($row = mysqli_fetch_array($result)) {
													if (empty($row[web])) { 
													echo "&nbsp;";
													}else{
													echo "<section><a href='" . $row['web'] . "' onclick='window.open(trackOutboundLink('" . $row['web'] . "'); return false;)' target='_blank'><img class='adSize' src='https://landscapearchitect.com/banner/" . $row[picture] . "' alt='' /></a>
													</section><br>";													
													}
											}										
										}
				  
												mysqli_close($conn);
				  
				  
									?>  
									