I have a function and netbeans is saying I can only have 20 lines in my code.
Why is this and how could I fix this. I have another function with the same problem. Dreamweaver doesn't say anything so I don't know if this is a big problem.
my code:
function dispalyEvent($weekNr, $week, $year){
echo "<p>";
$gendate = new DateTime();
$gendate->setISODate($year,$week,$weekNr);
$month = $gendate->format('m');
$day = $gendate->format('d');
$event_query = mysql_query("SELECT * FROM calendar ORDER BY starttime");
while($event = mysql_fetch_array($event_query)) {
$startYear = $event['startyear'];
$startMonth = $event['startmonth'];
$startDay = $event['startdate'];
$endYear = $event['endyear'];
$endMonth = $event['endmonth'];
$endDay = $event['enddate'];
$period = new DatePeriod(
new DateTime($startYear.$startMonth.$startDay),
new DateInterval('P1D'),
new DateTime($endYear.$endMonth.$endDay +1)
);
$currentDate = $year."-".$month."-".$day;
foreach ($period as $savedDate) {
if ($currentDate == $savedDate->format('Y-m-d')){
if ($event['Approved'] == "Approved"){
echo "</p>";
echo "<p>";
if ($event['ad']) {
echo "<img src='images/".$event['ad']."' alt='event-ad' width='300' height='100' />";
} else { echo " "; }
echo "</p>";
echo "<p> </p>";
echo "<div class='toggleLink' style='cursor: pointer; color: #333;'>";
echo $event['starttime']." ".$event['title'];
echo "</p>";
echo "</div>";
echo " <div class='toggle'>";
echo "<p class='toggleLink'>";
echo "(".$event['starttime']."-".$event['endtime'].") ".$event['location']." - ".$event['address']." - Admission Price: $".$event['price']."<br>".$event['description'];
echo "</div>";
}}}}
echo "</p>";
}
?>
Related
I'm setting up a report with the following columns, Month, Teller, Week 1, Week 2, week 3, Week 4, and Week 5 and a Total collection of the Month.
I have difficulties to sum up the amount from the database for each week of a row.
Maybe if anyone can help me how to show the list of dates within each week of a month, could be helpfull!
That will show a monthly weekly collection of tellers.
I wan't to sum the collection from the database weekly from the month every tellers.
Database Table
My Code.
if($teller_cnt > 0) {
$new_start_week = 0;
$weeks_num = 5;
for($m = 1; $m<=12; $m++) {
$weeks_num = weeks_num($m, $year);
$num_of_weeks = $weeks_num;
$monthname = date_formating($m, '!m', 'F');
$total_per_month = 0;
$min_1 = 0;
if($m > 1) {
if($num_of_weeks == 4) {
$new_start_week = ($new_start_week + $weeks_num) + 1;
$weeks_num = ($weeks_num + $new_start_week);
$msg = '<span class="label label-danger">4 Months</span>';
}else{
$new_start_week = ($new_start_week + $weeks_num);
$weeks_num = ($weeks_num + $new_start_week);
$msg = '<span class="label label-info">5 Montsh</span>';
$min_1 = -1;
}
}else{
if($num_of_weeks == 4) {
$msg = '<span class="label label-danger">4 Months</span>';
}else{
$msg = '<span class="label label-info">5 Montsh</span>';
}
}
if(weeks_num(($m-1), $year)==4) {
$weeks_num = $weeks_num - 1;
$new_start_week = $new_start_week - 1;
}
echo '<tr>';
echo '<td rowspan="'.($teller_cnt+1).'">';
echo $monthname.' <br>';
//echo 'Num of Weeks per month: '.$num_of_weeks. ' <br> ';
//echo 'Start Of Week Num: ' . $new_start_week;
//echo $msg . '<br>';
echo '</td>';
echo '</tr>';
foreach ($qry_pay_tellers->result() as $row) {
$qry_total_payapplied = $this->db->query("SELECT SUM(amt) + SUM(intrst) AS amt FROM payapplied WHERE teller = {$row->teller} AND YEAR(tdate) = $year AND MONTH(tdate) = $m")->row();
$total_teller_amt = ($qry_total_payapplied) ? $qry_total_payapplied->amt : 0;
echo '<tr>';
echo '<td>' . $row->teller . '</td>';
/*
$firstDayOfMonth = new \DateTime("1st $monthname");
$lastDayOfMonth = new \DateTime($firstDayOfMonth->format('t M Y'));
$oneDay = new DateInterval('P1D');
$period = new \DatePeriod($firstDayOfMonth, $oneDay, $lastDayOfMonth->add($oneDay));
*/
$days_arr = array();
$begin = new DateTime('2019-01-01');
$end = new DateTime('2019-12-31');
$interval = DateInterval::createFromDateString('1 day');
$period = new DatePeriod($begin, $interval, $end);
foreach($period as $date)
{
$dates = $date->format('Y-m-d');
$week_num = $this->db->query("SELECT WEEK('$dates', 'Monday') AS weeknum;")->row();
$days_arr[$week_num->weeknum][] = array('dayname' => $date->format('D'), 'date' => $dates);
// echo $dates . ' - ' . $week_num->weeknum . '<br>';
}
for($w = $new_start_week; $w < $weeks_num; $w++) {
echo '<td>';
/*
echo $w . '<br>';
foreach($days_arr[$w] as $wrow) {
echo $wrow['date'] . '<br>';
}
*/
echo '</td>';
}
//echo '<td class="number">'.number_format($total_teller_amt, 2).'</td>';
if($num_of_weeks > 4) {
echo '<td class="number">'.number_format($total_teller_amt, 2).'</td>';
}else{
echo '<td colspan="2" class="number">'.number_format($total_teller_amt, 2).'</td>';
}
echo '</tr>';
$total_per_month += $total_teller_amt;
}
echo '<tr>';
echo '<td class="number" colspan="8">'.number_format($total_per_month, 2).'</td>';
echo '</tr>';
}
}
My Solution.
Thanks anyway.
Created Array of Days from Jan to December and identify its week numbers.
$begin = new DateTime( '2019-01-01' );
$end = new DateTime( '2019-12-31' );
$end = $end->modify( '+1 day' );
$interval = new DateInterval('P1D');
$daterange = new DatePeriod($begin, $interval ,$end);
$dates_arr = array();
foreach($daterange as $date){
$dates = $date->format('Y-m-d');
$week_num = $this->db->query("SELECT WEEK('$dates', 'Monday') AS weeknum;")->row();
$month_n = (int)$date->format('m');
$dates_arr[$month_n][] = array(
'week' => $week_num->weeknum,
'dayname' => $date->format('D'),
'dates' => $date->format('Y-m-d')
);
}
Then Create a table to index month and week and query loop tellers
echo '<div class="row">';
echo '<div class="col-md-12">';
echo '<table class="table table-hover table-condensed table-bordered table-striped table-small">';
echo '<thead>';
echo '<th>Month</th>';
echo '<th>Teller</th>';
echo '<th>Week 1</th>';
echo '<th>Week 2</th>';
echo '<th>Week 3</th>';
echo '<th>Week 4</th>';
echo '<th>Week 5</th>';
echo '<th></th>';
echo '<th>Total</th>';
echo '</thead>';
echo '<tbody>';
for($month = 1; $month<=12; $month++) {
$total_per_month = 0;
$weeks_r = array();
foreach ($dates_arr[$month] as $rw) {
$weeks_r[] = $rw['week'];
}
$u_week_r = array_unique($weeks_r);
$monthname = date_formating($month, '!m', 'F');
echo '<tr>';
echo '<td rowspan="' . ($teller_cnt + 1) . '">';
echo $monthname . ' <br>';
echo '</td>';
echo '</tr>';
$total_teller_amt = 0;
foreach ($qry_pay_tellers->result() as $row) {
echo '<tr>';
echo '<td>' . $row->teller . '</td>';
foreach ($u_week_r as $wrow) {
echo '<td class="number" style="font-size: 8px;">';
$dates_arr_s = array();
foreach ($dates_arr[$month] as $drow) {
if ($drow['week'] == $wrow) {
if(isWeekend($drow['dates']) == false) {
$dates_arr_s[] = $drow['dates'];
$qry_pay_applied_wamt = $this->db->query("
SELECT SUM(amt) + SUM(intrst) AS amt FROM payapplied WHERE teller = {$row->teller} AND CAST(tdate AS DATE) = '{$drow['dates']}'
")
->row();
$amt_per_week = ($qry_pay_applied_wamt) ? $qry_pay_applied_wamt->amt : 0;
$total_teller_amt += $amt_per_week;
echo '<span style="float: left !important;">'.$drow['dates'] . ' - ' . $drow['dayname'] . '</span><span class="pull-right">'.number_format($amt_per_week, 2).'</span><br>';
}
}
}
echo '</td>';
}
if(count($u_week_r) > 4) {
if(count($u_week_r) > 5) {
echo '<td class="number">' . number_format($total_teller_amt, 2) . '</td>';
}else{
echo '<td colspan="2" class="number">' . number_format($total_teller_amt, 2) . '</td>';
}
} else {
echo '<td colspan="3" class="number">' . number_format($total_teller_amt, 2) . '</td>';
}
echo '</tr>';
$total_per_month += $total_teller_amt;
}
echo '<tr>';
echo '<td class="number" colspan="9">'.number_format($total_per_month, 2).'</td>';
echo '</tr>';
}
echo '</tbody>';
echo '</table>';
echo '</div>';
echo '</div>';
I have following code to call and echo some API calls from a site.
function popular_uploads() {
// If no saved data exists in the cache
if ($json_data === false) {
// Fetch new data from remote URL
$gameid = $instance['code1'];
$url = ("http://thegamesdb.net/api/GetGame.php?id=".$gameid."");
$json = file_get_contents($url);
$json_data = json_decode($json, false);
set_transient('my_unique_identifier', $json_data, 3600); $json_data = get_transient('my_unique_identifier');
}
foreach ( $json_data->items as $item ) {
$title=$item->Game->GameTitle;
$boxartw=$item->Game->Images->boxart[0];
$boxart=$item->Game->Images->boxart[1];
if ($boxart == NULL) {
$boxart = $boxartw;}
$publisher=$item->Game->Publisher;
$releasedate=$item->Game->ReleaseDate;
$newdate = date("d/m/Y", strtotime($releasedate));
$newday = date("d", strtotime($releasedate));
$newmon = date("m", strtotime($releasedate));
$newyear = date("Y", strtotime($releasedate));
echo '<div class="upcoming_games_side">';
echo '<div class="upcomig_bg"style="background-image:url(http://thegamesdb.net/banners/_gameviewcache/' .$boxart. ');></div>';
echo '<div class="dark-screen-uc"></div>';
echo '<img class="game-boxart_uc" alt="" src="http://thegamesdb.net/banners/_gameviewcache/'.$boxart.'"/>';
if ($title == null){
echo "N/A"; }else{
echo '<h1 class="title_uc">'.$title.'</h1>';}
if ($publisher == null){
echo "N/A"; }else{
echo '<p class="pub_uc">'.$publisher.'</p>';
}
if ($newdate == "01-01-1970"){
echo "N/A";
}else{
echo '<date class="date_uc">'.$newdate.'</date>';
}
$target = mktime(0, 0, 0, $newday, $newmon, $newyear) ;
$today = time () ;
$difference =($target-$today) ;
$days =(int) ($difference/86400) ;
if ($days == "0"){
echo "N/A"; }else{
echo '<date class="count_uc">'.$days.'</date>';}
echo '</div>';
}
}
But it's not working and doesn't Cache API data. So Where is my mistake and wahts part's of my code's are Wrong? I'd appreciate any help.
By the way, it's a Wordpress plugin.
I'm trying to embed a facebook video gallery on a website.
My problem is that it only shows one video, while the facebook graph shows multiple. How can I make all the videos appear?
<?php
$json_link = "https://graph.facebook.com/sophia.deboer/videos?access_token=862683673820828|15Gx44NW43LHI92o__bRPA6lz44&fields=id,name,description,created_time,from,source&limit=10";
$json = file_get_contents($json_link);
$obj = json_decode($json, true);
$feed_item_count = count($obj['data']);
for ($x = 0; $x < 10; $x++) {
echo "<div class='item_box'>";
echo "<div style='overflow:hidden;'>";
// video source
$source = $obj['data'][$x]['source'];
echo "<div class='col-lg-6'>";
echo "<video src='{$source}' controls>";
echo "Your browser does not support the video tag.";
echo "</video>";
echo "</div>"; // end 'row'
echo "<div class='col-lg-6'>";
// user's custom message
$name = isset($obj['data'][$x]['name']) ? htmlspecialchars_decode($obj['data'][$x]['name']) : "Video #" . $obj['data'][$x]['id'];
$description = htmlspecialchars_decode(str_replace("\n", "<br>", $obj['data'][$x]['description']));
// when it was posted
$created_time = $obj['data'][$x]['created_time'];
$converted_date_time = date('Y-m-d H:i:s', strtotime($created_time));
$ago_value = time_elapsed_string($converted_date_time);
// from
$page_id = $obj['data'][$x]['from']['id'];
$page_name = $obj['data'][$x]['from']['name'];
echo "<h2 style='margin: 0 0 .5em 0;'>{$name}</h2>";
echo "<div>";
echo $description;
echo "</div>";
echo "<div style='margin:.5em 0 0 0; color: #999;'>";
echo "Posted {$ago_value} by <a href='https://facebook.com/{$page_id}' target='_blank'>{$page_name}</a>";
echo "</div>";
echo "</div>";
echo "</div>";
echo "<hr />";
echo "</div>"; // end 'item_box'
}
?>
Demo
After removing :
$ago_value = time_elapsed_string($converted_date_time);
The code loops all videos.
I also changed this:
$feed_item_count = count($obj['data']);
for ($x = 0; $x < 10; $x++)
To This:
$feed_item_count = count($obj['data']);
for ($x = 0; $x < $feed_item_count; $x++)
<?php
$json_link = "https://graph.facebook.com/sophia.deboer/videos?access_token=862683673820828|15Gx44NW43LHI92o__bRPA6lz44&fields=id,name,description,created_time,from,source&limit=10";
$json = file_get_contents($json_link);
$obj = json_decode($json, true);
$feed_item_count = count($obj['data']);
for ($x = 0; $x < $feed_item_count; $x++) {
echo "<div class='item_box'>";
echo "<div style='overflow:hidden;'>";
// video source
$source = $obj['data'][$x]['source'];
echo "<div class='col-lg-6'>";
echo "<video src='{$source}' controls>";
echo "Your browser does not support the video tag.";
echo "</video>";
echo "</div>"; // end 'row'
echo "<div class='col-lg-6'>";
// user's custom message
$name = isset($obj['data'][$x]['name']) ? htmlspecialchars_decode($obj['data'][$x]['name']) : "Video #" . $obj['data'][$x]['id'];
$description = htmlspecialchars_decode(str_replace("\n", "<br>", $obj['data'][$x]['description']));
// when it was posted
$created_time = $obj['data'][$x]['created_time'];
$converted_date_time = date('Y-m-d H:i:s', strtotime($created_time));
//$ago_value = time_elapsed_string($converted_date_time);
// from
$page_id = $obj['data'][$x]['from']['id'];
$page_name = $obj['data'][$x]['from']['name'];
echo "<h2 style='margin: 0 0 .5em 0;'>{$name}</h2>";
echo "<div>";
echo $description;
echo "</div>";
echo "<div style='margin:.5em 0 0 0; color: #999;'>";
echo "Posted {$ago_value} by <a href='https://facebook.com/{$page_id}' target='_blank'>{$page_name}</a>";
echo "</div>";
echo "</div>";
echo "</div>";
echo "<hr />";
echo "</div>"; // end 'item_box'
}
?>
I make a php page in which i get data from bar but when i click cmd=7 and mode=test it moves cmd=default,how i set the links to the desired pages.
Here is my code:
function default1(){
$mode=$_GET['mode'];
if($mode=='')
{
$mode=$_POST['mode'];
}
$dates = array();
$timestamp = strtotime('-30 days');
for ($i = 0 ; $i <=30 ; $i++) {
//insert the date
$dates[$i]= date('m-d-Y', $timestamp);
//increase the day
$timestamp += 24 * 3600;
}
//print_r ($dates);
$strQuery="select DATE_FORMAT(transactions.transaction_date,'%m-%d-%Y') as transaction_date,sum(amount)as Amount from transactions where mode='".$mode."' group by DATE_FORMAT(transactions.transaction_date,'%m-%d-%Y')";
$result = $GLOBALS ['mysqli']->query ($strQuery) or die ($GLOBALS ['mysqli']->error . __LINE__);
while($rs=$result->fetch_assoc ())
{
$res[]=$rs;
}
//print_r ($res);
$strXML = "<chart caption='Reports of transactions' xAxisName='Date' yAxisName='Amount' showValues='0' useRoundEdges='1' palette='3'>";
for ($i = 0 ; $i <=30 ; $i++) {
foreach($res as $r)
{
if($r['transaction_date']==$dates[$i]){
$str = $r['transaction_date'];
$dateObj = DateTime::createFromFormat('m-d-Y', $str);
$transactiondate=$dateObj->format('M d');
$substrXML = "<set label='".$transactiondate."' value='" .$r['Amount']."' />";
break;
}
else {
$str=$dates[$i];
$dateObj = DateTime::createFromFormat('m-d-Y', $str);
$transactiondate=$dateObj->format('M d');
$substrXML = "<set label='".$transactiondate."' value='0' />";
}
}
$strXML .=$substrXML;
}
$strXML .= "</chart>";
return $strXML;
}
function past7days(){
//$mode=$_GET['mode'];
//if($mode=='')
//{
//$mode=$_POST['mode'];
//}
$dates = array();
$timestamp = strtotime('-7 days');
for ($i = 0 ; $i <=7 ; $i++) {
$dates[$i]= date('m-d-Y', $timestamp);
$timestamp += 24 * 3600;
}
$strQuery="select DATE_FORMAT(transactions.transaction_date,'%m-%d-%Y') as transaction_date,sum(amount)as Amount from transactions WHERE transaction_date BETWEEN DATE_SUB(CURDATE(), INTERVAL 7 DAY) AND CURDATE() and mode='".$mode."' group by DATE_FORMAT(transactions.transaction_date,'%m-%d-%Y')
";
$result = $GLOBALS ['mysqli']->query ($strQuery) or die ($GLOBALS ['mysqli']->error . __LINE__);
while($rs = $result->fetch_assoc ())
{
$res[]=$rs;
}
$strXML = "<chart caption='Reports of transactions' xAxisName='Date' yAxisName='Amount' showValues='0' useRoundEdges='1' palette='3'>";
for ($i = 0 ; $i <=7 ; $i++) {
if(mysqli_num_rows($result)>0){
foreach($res as $r)
{
if($r['transaction_date']==$dates[$i]){
$str = $r['transaction_date'];
$dateObj = DateTime::createFromFormat('m-d-Y', $str);
$transactiondate=$dateObj->format('M d');
$substrXML.="<set label='".$transactiondate."' value='".$r['Amount']."' />";
break;
}
else {
$str=$dates[$i];
$dateObj = DateTime::createFromFormat('m-d-Y', $str);
$transactiondate=$dateObj->format('M d');
$substrXML = "<set label='".$transactiondate."' value='0' />";
}
}
}
else{
$str=$dates[$i];
$dateObj = DateTime::createFromFormat('m-d-Y', $str);
$transactiondate=$dateObj->format('M d');
$substrXML = "<set label='".$transactiondate."' value='0' />";
}
$strXML .=$substrXML;
}
$strXML .= "</chart>";
return $strXML;
}
if($_GET['cmd']=='' || $_GET['cmd']=='default' )
{
?>
<? echo date('M jS Y' ,strtotime($startdate)); ?> to <? echo date('M jS Y' ,strtotime($enddate)); ?>
<?
}
else
{
?>
<? echo date('M jS Y' ,strtotime($startdate)); ?> to <? echo date('M jS Y' ,strtotime($enddate)); ?>
<?
}
if($_GET['cmd']=='7')
{
?>
<span style="margin-left:10px;">Past 7 Days</span>
<?
}
else
{
?>
Past 7 Days
<?
try it
if($_GET['cmd']=='' || $_GET['cmd']=='default' )
{
echo date('M jS Y' ,strtotime($startdate))." To ".date('M jS Y' ,strtotime($enddate));
}
else
{
$url = "merchant/products/1/manage/reports?cmd=default&mode=".$_GET['mode'];
header("location:".$url);
exit;
}
if($_GET['cmd']=='7')
{
echo '<span style="margin-left:10px;">Past 7 Days</span>';
}
else
{
$url = "merchant/products/1/manage/reports?cmd=7&mode=".$_GET['mode'];
header("location:".$url);
exit;
}
<script type="text/javascript">
document.location.href = '/merchant/products/1/manage/reports?cmd=7&mode=<?php echo $_GET["mode"]; ?>';
</script>
I have a form that is updated yearly, so a user inputs a date and other information then submits the form which gets stored in a database. When they come back a year later they do the same to overwrite the old records, the problem is is that when they come back the old date is being Echoed, which shouldn't happen. All of the other fields are blank which should happen. I'm not calling for the date to be echoed in the code but it still is.
Code for defining the date pulldown
// parameters: $fname - main name of field
// $date - actual date value from database
// $beginYear - first value in year list
// $endYear - last value in year list
// return: none
function make_date_pulldown($fname, $date, $beginYear, $endYear)
{
// read the date and break it up into $Year, $Month and $Day
// so that we can set the "SELECTED" in the option list
if ($date == ""){
// set some default values to be safe
$Year = 0;
$Month = 0;
$Day = 0;
} else {
$Year = (int) substr($date,0,4);
$Month = (int) substr($date,5,2);
$Day = (int) substr($date,8,2);
}
// need to build a table around these guys so that there won't
// be any word wrap... it's going to be a 1 row by 5 cols.
echo "<table border=0 cellspacing=0 cellpadding=0>\n";
echo "<tr>\n";
// build month list
echo " <td><font class=bluetext face=verdana,arial size=-2>\n";
echo " <center>Month<br>\n";
echo "<select name='month_$fname'>\n";
echo " <option value='00'></option>\n";
for ($i=1;$i<=12;$i++){
printf (" <option value='%02d'",$i);
if ($i == $Month) {
printf (" SELECTED");
}
printf (">%02d</option>\n",$i);
}
echo "</select>\n";
echo " </center>\n";
echo " </td>\n";
echo " <td><font class=bluetext face=verdana,arial size=-2>\n";
echo "/";
echo " </td>\n";
// build day list
echo " <td><font class=bluetext face=verdana,arial size=-2>\n";
echo " <center>Day<br>\n";
echo "<select name='day_$fname'>\n";
echo " <option value='00'></option>\n";
for ($i=1;$i<=31;$i++){
printf (" <option value='%02d'",$i);
if ($i == $Day) {
printf (" SELECTED");
}
printf (">%02d</option>\n",$i);
}
echo "</select>\n";
echo " </center>\n";
echo " </td>\n";
echo " <td><font class=bluetext face=verdana,arial size=-2>\n";
echo "/";
echo " </td>\n";
// build year list
echo " <td><font class=bluetext face=verdana,arial size=-2>\n";
echo " <center>Year<br>\n";
echo "<select name='year_$fname'>\n";
echo " <option value='0000'></option>\n";
for ($i=$beginYear;$i<=$endYear;$i++){
printf (" <option value='%d'",$i);
if ($i == $Year) {
printf (" SELECTED");
}
printf (">%d</option>\n",$i);
}
echo "</select>\n";
echo " </center>\n";
echo " </td>\n";
echo "</tr>\n";
echo "</table>\n";
}
Code for the PHP form on the website
<u>Date Of Submittal</u><br>
<?php
$startYear = date("Y")-1;
$endYear = date("Y")+1;
make_date_pulldown("submitdate", $submitdate, $startYear, $endYear);
?>
Looks like you want to create a drop down menu based on year ....
$date = new DateTime();
//Years
echo makeSelect($date->format("Y")-1, $date->format("Y")+1,$date->format("Y"));
//Month
echo makeSelect(1, 12,$date->format("m"));
//Day
echo makeSelect(1, $date->format("t"),$date->format("d"));
Function Used
function makeSelect($start, $end, $default = null) {
$content = "<select>";
$range = range($start, $end);
$selected = "";
foreach ( $range as $value ) {
$selected = ($default == $value) ? "selected" : null;
$content .= sprintf('<option value="%s" %s>%1$s</option>', $value, $selected);
}
$content .= "</select>";
return $content;
}
Figured it out, in my get_() function to call the database table I was reading the row for the submitdate and it was pulling and displaying the date based on that command and the function for make_date_pulldown.
Here is what that function looked like (obviously trimmed down):
<?
function get_submit($id, &$submitdate)
{
$query = "select * from submit where id = $id";
$result = mysql_query($query);
if ($result) {
$total_rows = mysql_numrows($result);
} else { $total_rows = 0; }
if ($total_rows > 0) {
$submitdate = trim(mysql_result($result, "", "submitdate"));
} else {
$submitdate = "";
$found = 1;
}
}
?>