All pastes #831550 Raw Edit

Something

public text v1 · immutable
#831550 ·published 2007-12-25 02:17 UTC
rendered paste body
<?php require_once('Connections/DAS.php'); ?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") 
{
  $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;

  $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);

  switch ($theType) {
    case "text":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;    
    case "long":
    case "int":
      $theValue = ($theValue != "") ? intval($theValue) : "NULL";
      break;
    case "double":
      $theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL";
      break;
    case "date":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;
    case "defined":
      $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
      break;
  }
  return $theValue;
}
}
mysql_select_db($database_DAS, $DAS);
$query_rTest = "SELECT * FROM events, venues WHERE events.eventLocation = venues.venueID AND events.eventDate >= CURDATE() ORDER BY eventDate ASC";
$rTest = mysql_query($query_rTest, $DAS) or die(mysql_error());
$row_rTest = mysql_fetch_assoc($rTest);
$totalRows_rTest = mysql_num_rows($rTest);
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title></title>
<link href="main.css" rel="stylesheet" type="text/css">
<script type="text/javascript" charset="utf-8">
if (navigator.userAgent.match(/AppleWebKit/i) && navigator.userAgent.match(/Mobile/i)) {
window.location.replace('/indexiphone.php');
}
</script> 
<script type="text/javascript">
    var GB_ROOT_DIR = "./greybox/";
</script>
<script type="text/javascript" src="greybox/AJS.js"></script>
<script type="text/javascript" src="greybox/AJS_fx.js"></script>
<script type="text/javascript" src="greybox/gb_scripts.js"></script>
<link href="greybox/gb_styles.css" rel="stylesheet" type="text/css">
</head>
<body>
<div id="wrap">
<div id="mainnav">
<ul id="nav">
<li><a href="index.php">Home</a></li>
<li><a href="venues.php">Venues</a></li>
<li><a href="today.php">Today</a></li>
<li><a href="tomorrow.php">Tomorrow</a></li>
<li><a href="thisweek.php">This Week</a></li>
<li><a href="thismonth.php">This Month</a></li>
</ul>
<p class="clr">&nbsp;</p>
</div>
<div id="main">
<table>
<tr>
<th>Date</th>
<th>Where</th>
<th>When</th>
<th>Bands</th>
<th>Cost</th>
<th>Notes</th>
</tr>
<?php do { ?>
<tr>
<td class="evdate"><?php echo date('m-d',strtotime($row_rTest['eventDate'])); ?></td>
<td><span class="vname"><?php echo $row_rTest['venueName']; ?></span><br><a href="venueinfo.php?venueID=<?php echo $row_rTest['eventLocation']; ?>">More info</a></td>
<td><?php echo $row_rTest['eventTime']; ?></td>
<td>
<ul>
<?php 
if ($row_rTest['band1URL'] != NULL) {
echo "<li><a rel='gb_page_center[800,500]' href='$row_rTest[band1URL]'> <span class='headliner'>$row_rTest[band1]</span></a></li>";
} elseif($row_rTest['band1'] != NULL) {
echo "<li><span class='headliner'>$row_rTest[band1]</span></li>";
} 
?>

<?php 
if ($row_rTest['band2URL'] != NULL) {
echo "<li><a rel='gb_page_center[800,500]' href='$row_rTest[band2URL]'> $row_rTest[band2]</a></li>";
} elseif($row_rTest['band2'] != NULL) {
echo "<li>$row_rTest[band2]</li>";
} 
?>
          
<?php 
if ($row_rTest['band3URL'] != NULL) {
echo "<li><a rel='gb_page_center[800,500]' href='$row_rTest[band3URL]'> $row_rTest[band3]</a></li>";
} elseif($row_rTest['band3'] != NULL) {
echo "<li>$row_rTest[band3]</li>";
} 
?>
          
<?php 
if ($row_rTest['band4URL'] != NULL) {
echo "<li><a rel='gb_page_center[800,500]' href='$row_rTest[band4URL]'> $row_rTest[band4]</a></li>";
} elseif($row_rTest['band4'] != NULL) {
echo "<li>$row_rTest[band4]</li>";
} 
?>
          
<?php 
if ($row_rTest['band5URL'] != NULL) {
echo "<li><a rel='gb_page_center[800,500]' href='$row_rTest[band5URL]'> $row_rTest[band5]</a></li>";
} elseif($row_rTest['band5'] != NULL) {
echo "<li>$row_rTest[band5]</li>";
}
?>
          
<?php 
if ($row_rTest['band6URL'] != NULL) {
echo "<li><a rel='gb_page_center[800,500]' href='$row_rTest[band6URL]'> $row_rTest[band6]</a></li>";
} elseif($row_rTest['band6'] != NULL) {
echo "<li>$row_rTest[band6]</li>";
} 
?>
          
<?php 
if ($row_rTest['band7URL'] != NULL) {
echo "<li><a rel='gb_page_center[800,500]' href='$row_rTest[band7URL]'> $row_rTest[band7]</a></li>";
} elseif($row_rTest['band7'] != NULL) {
echo "<li>$row_rTest[band7]</li>";
} 
?>
        
<?php 
if ($row_rTest['band8URL'] != NULL) {
echo "<li><a rel='gb_page_center[800,500]' href='$row_rTest[band8URL]'> $row_rTest[band8]</a></li>";
} elseif($row_rTest['band8'] != NULL) {
echo "<li>$row_rTest[band8]</li>" ;
} 
?>
    
<?php 
if ($row_rTest['band9URL'] != NULL) {
echo "<li><a rel='gb_page_center[800,500]' href='$row_rTest[band9URL]'> $row_rTest[band9]</a></li>";
} elseif($row_rTest['band9'] != NULL) {
echo "<li>$row_rTest[band9]</li>";
} 
?>
     
<?php 
if ($row_rTest['band10URL'] != NULL) {
echo "<li><a rel='gb_page_center[800,500]' href='$row_rTest[band10URL]'> $row_rTest[band10]</a></li>";
} elseif($row_rTest['band10'] != NULL) {
echo "<li>$row_rTest[band10]</li>";
} 
?>
</ul>
</td>   
<td><?php if ($row_rTest['eventCost'] != NULL) echo $row_rTest['eventCost']; else echo "N/A"; ?></td>
<td><?php if ($row_rTest['eventNotes'] != NULL) echo $row_rTest['eventNotes']; else echo "N/A"; ?></td>
</tr>
<?php } while ($row_rTest = mysql_fetch_assoc($rTest)); ?>
</table>
</div>
</div>
</body>
</html>
<?php
mysql_free_result($rTest);
?>