Click to See Complete Forum and Search --> : echo hr in phph


davidjmorin
February 16th, 2008, 03:05 PM
hey everyone i want to have a hr after each event how would i do that in php?
heres the code



<html>

<head>
<meta http-equiv="Content-Language" content="en-us">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>{$PageTitle}</title>
<link rel="stylesheet" type="text/css" href="{$Style}">
{literal}
<script type="text/javascript">
function openWindow(url,custom_width,custom_height)
{
newWindow = window.open(url,"newWindow","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,width="+custom_width+",innerWidth="+custom_width+",height="+custom_height+",innerHeight="+custom_height+"");
newWindow.moveTo(180,320);
}

function openCenterWindow(url, name, custom_height, custom_width) {
var str = "height=" + custom_height + ",innerHeight=" + custom_height;
str += ",width=" + custom_width + ",innerWidth=" + custom_width;
if (window.screen) {
var ah = screen.availHeight - 30;
var aw = screen.availWidth - 10;

var xc = (aw - custom_width) / 2;
var yc = (ah - custom_height) / 2;

str += ",left=" + xc + ",screenX=" + xc;
str += ",top=" + yc + ",screenY=" + yc;
}
newWindow = window.open(url, name, str);
}
</script>
{/literal}
</head>

<body text="#ffffff" bgcolor="#000000" link="red" vlink="green" alink="yellow" topmargin="0" leftmargin="0">

<table border="0" cellpadding="10" cellspacing="0" style="border-collapse: collapse" bordercolor="#ff0000" width="100%" id="AutoNumber1">
<tr>
<td width="100%">
<table border="1" cellpadding="3" cellspacing="0" style="border-collapse: collapse" bordercolor="#ff0000" width="100%" id="AutoNumber2" bgcolor="#000000">
<tr>
<td width="100%">
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#ff0000" width="100%" id="AutoNumber8">
<tr>
<td width="70%"><a href="index.php">Calendar List</a></td>
<td width="30%" align="right"><a href="day.php?c={$CalendarNumber}">Today:
{$FullTodayDate}</a></td>
</tr>
</table> </td>
</tr>
</table> </td>
</tr>
<tr>
<td width="75%" valign="top">
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#ff0000" width="100%" id="AutoNumber4">
<tr>
<td width="100%">
<table border="1" cellpadding="3" cellspacing="0" style="border-collapse: collapse" bordercolor="#ff0000" width="100%" id="AutoNumber5" bgcolor="#000000">
<tr>
<td width="100%" align="center"><font face="Verdana" size="2">Events on {$SelectedDay}</font></td>
</tr>
</table> </td>
</tr>
<tr>
<td width="100%" align="center">&nbsp; </td>
</tr>
<tr>
<td width="100%">
<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#ff0000" width="100%" id="AutoNumber7">
<tr>
<td width="100%">{$DayEvents}</td>
</tr>
</table> </td>
</tr>
</table> </td>
</tr>
<tr>
<td width="100%" valign="top" align="center">
<hr color="#ff0000" width="80%" size="1">
<p>

</tr>
<tr>
<td width="100%" valign="top" align="center">
<font face="Verdana" size="1">{$Footer}</font></td>
</tr>
</table>
</body></html>

davidjmorin
February 16th, 2008, 03:07 PM
sorry wrong forum. its actually in html here is the php sorry!!


<?php

// start session for login to work
session_start();

// load required files
require_once("include/config.php"); //include configuration
require_once($calendar['fs_path_to_program']."/include/db.". $db_type .".php"); //include db class file
require_once($calendar['fs_path_to_program']."/include/functions.php"); //include calendar function files
require_once($calendar['fs_path_to_program']."/include/smarty/Smarty.class.php"); //include the Smarty template class

// define classes
$db = new sql_db;
$smarty = new Smarty; //define smarty template system
$db->sql_connect($db_host, $db_user, $db_pass, $db_name);

// assign smarty directories
$smarty->template_dir = $smarty_config['template_dir'];
$smarty->compile_dir = $smarty_config['compile_dir'];
$smarty->cache_dir = $smarty_config['cache_dir'];
//*****************************************************

$url_day = $_GET['d'];
$url_month = $_GET['m'];
$url_year = $_GET['y'];
$url_calno = $_GET['c'];

if($url_calno != "")
{
$sel_calendars_sql = "SELECT calendar_title FROM ".$calendar['db_prefix']."_calendars WHERE calendar_id='".$url_calno."'";
$sel_calendars_query = $db->sql_query($sel_calendars_sql);
$sel_calendars_rs = $db->sql_fetch_array($sel_calendars_query);



$title = $calendar['title']." - ".$sel_calendars_rs['calendar_title'];

}
else
$title = $calendar['title'];

$smarty->assign("PageTitle",$title);
$smarty->assign("Style",$calendar['stylesheet_screen']);
$smarty->assign("CalendarNumber",$url_calno);
$smarty->assign("FullTodayDate",date("F j, Y"));
$smarty->assign("SelectedDay",date("l, F j, Y",display_selected_day($url_year, $url_month, $url_day)));
$smarty->assign("StartTime",date("h:i:s A",$startTime));
$smarty->assign("DayEvents",display_day_events($url_calno,$url_year,$url_month,$url_day));
$smarty->display('day.tpl');

$db->sql_close();
?>

scvinodkumar
February 19th, 2008, 08:56 AM
simply add the style border-bottom:1px solid #FFFRGT; at the beginnning of event starts at td or in table