Log on your website
Single log
If you have just one log use below code. Remember to change URL to link to your log. You will find it in
My Logs in [Public log URL]
<iframe src="http://lf11.pl/lf11_log.php?log_id=1" frameborder="0" style="width:100%; height: 500px;"></iframe>
Multiple logs
If you have more than one log you can use that code. Description below :) -
log_on_your_www.zip
Live demo - http://161at215.nstrefa.pl/index.php?show=log
- Define log list
$log['url'][1] = 'http://lf11.pl/lf11_log.php?log_id=1';
$log['call'][1] = '161AT215';
$log['url'][2] = 'http://lf11.pl/lf11_log.php?log_id=2';
$log['call'][2] = '47AT215';
$log['url'][3] = 'http://lf11.pl/lf11_log.php?log_id=22';
$log['call'][3] = '161AT/ID40 - 2012';
- Create select field with your logs
if(!$_GET['log'] || $_GET['log'] == '')
{
$id = 2; // get 47AT215 log
}
else
{
$id = $_GET['log'];
}
for($i=1; $i<=count($log['call']); $i++)
{
if(($i == $_GET['log']) || (!isset($_GET['id']) && $i == $id)) $selected = 'selected'; else $selected = '';
$llist.= '<option type="text" '.$selected.' value="' . $i . '">' . strtoupper($log['call'][$i]) . '</option>';
}
$content .= '
<TABLE border="0" width="98%">
<TR>
<TD>
<form action="index.php?show=log" method="get" name="CheckLog">
<input type="hidden" name="show" value="log">
<select name="log" onchange="this.form.submit();">'.$llist.'</select>
</form>
</TD>
</TR>
</TABLE>';
- Present data on your website
$content .= '<h1>'.$log['call'][$id].'</h1>';
$content .= '<iframe src="'.$log['url'][$id].'" frameborder="0" style="width:100%; height: 500px;"></iframe>';