Code: Select all
<?php require_once('../Connections/connAdmin.php'); ?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
if (PHP_VERSION < 6) {
$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;
}
}
$currentPage = $_SERVER["PHP_SELF"];
$colname_getRundate = "-1";
if (isset($_POST['rundate'])) {
$colname_getRundate = $_POST['rundate'];
}
mysql_select_db($database_connAdmin, $connAdmin);
$query_getRundate = sprintf("SELECT * FROM daily_budget WHERE rundate LIKE %s", GetSQLValueString("%" . $colname_getRundate . "%", "text"));
$getRundate = mysql_query($query_getRundate, $connAdmin) or die(mysql_error());
$row_getRundate = mysql_fetch_assoc($getRundate);
$totalRows_getRundate = mysql_num_rows($getRundate);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<script type="text/javascript" src="/new_budget/advanced_budgeting/jquery.min.js"></script>
<style type="text/css">
@import "/new_budget/advanced_budgeting/flora.datepick.css";.mainNav {
font-size: 20px;
font-weight: bold;
background-color: #FFF;
}
</style>
<script type="text/javascript" src="/new_budget/advanced_budgeting/jquery.datepick.min.js"></script>
</head>
<body><form action="" method="get" name="rundate">
<label for="rundate">Rundate:</label>
<input type="text" name="rundate" size="30" value="" id="multi999Picker"/>
</p>
<script type="text/javascript">
// BeginWebWidget jQuery_UI_Calendar: range2Picker
$('#multi999Picker').datepick({
multiSelect: 6, multiSeperator: ',', monthsToShow: 2,
showTrigger: '#calImg'});
// EndWebWidget jQuery_UI_Calendar: range2Picker
</script>
<input type="submit" align="middle" name="search" id="search" value="Search" />
</form>
<table id="results" width="100%" align="left" bgcolor="#FFFFFF">
<?php do { ?>
<tr>
<td><p><?php echo $row_getRundate['rundate']; ?>
<p><?php echo $row_getRundate['slug']; ?>
<p><?php echo $row_getRundate['reporter']; ?>
<p><?php echo $row_getRundate['budgetInfo']; ?><br/>
<hr />
<?php } while ($row_getRundate = mysql_fetch_assoc($getRundate)); ?>
</table>
</body>
</html>
<?php
mysql_free_result($getRundate);
?>