Add analytics
[bus.git] / busui / owa / modules / base / templates / report_domstreams.tpl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
<?php if (!empty($document)): require('item_document.php'); endif;?>


<?php if (!empty($domstreams)):?>
<table class="simpleTable">
	<thead>
		<tr>
			<th><?php echo $domstreams->getLabel('timestamp');?></th>
			<th><?php echo $domstreams->getLabel('page_url');?></th>
			<th><?php echo $domstreams->getLabel('duration');?></th>
			<th></th>
		</tr>
	</thead>
	<tbody>			
		<?php foreach($domstreams->rows as $ds): ?>
			
		<TR>
			<TD class="data_cell">
				<?php echo date("F j, Y, g:i a",$ds['timestamp']);?>
			</TD>
			<TD class="data_cell">
			<a href="<?php echo $ds['page_url'];?>">
				<?php echo $this->truncate($ds['page_url'], 150);?>			
			</a>
			</TD>
			
			<TD class="data_cell">
				<?php echo date("H:i:s", mktime(0,0,$ds['duration']));?>
			</TD>
			<TD class="data_cell">
				<a href="<?php $api_url = owa_coreAPI::getSetting('base', 'api_url'); echo $this->makeLink(array(
						'do' => 'base.overlayLauncher', 
						'document_id' => $ds['document_id'], 
						'overlay_params' => urlencode( 
								$this->makeParamString( 
									array(
										'action' => 'loadPlayer', 
										'api_url' => trim(owa_coreAPI::getSetting('base', 'api_url')),
										'domstream_guid' => $ds['domstream_guid']), 
									true, 
									'cookie'))));?>" target="_blank">Play</a>
			</TD>
		</TR>		
		<?php endforeach; ?>
	</tbody>
</table>

<?php echo $this->makePaginationFromResultSet($domstreams, array('do' => 'base.reportDomstreams'), true);?>

<?php else:?>
	There are no refering web pages for this time period.
<?php endif;?>