Subversion Repositories cheapmusic

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
103 - 1
<?php echo showSectionHead($spTextTools['PageSpeed Reports']); ?>
2
<form id='search_form'>
3
<table width="100%" class="search">
4
	<tr>
5
		<th><?php echo $spText['common']['Website']?>: </th>
6
		<td>
7
			<select name="website_id" id="website_id" style='width:190px;' onchange="scriptDoLoadPost('pagespeed.php', 'search_form', 'content', '&sec=reports')">
8
				<?php foreach($websiteList as $websiteInfo){?>
9
					<?php if($websiteInfo['id'] == $websiteId){?>
10
						<option value="<?php echo $websiteInfo['id']?>" selected><?php echo $websiteInfo['name']?></option>
11
					<?php }else{?>
12
						<option value="<?php echo $websiteInfo['id']?>"><?php echo $websiteInfo['name']?></option>
13
					<?php }?>
14
				<?php }?>
15
			</select>
16
		</td>
17
		<th><?php echo $spText['common']['Period']?>:</th>
18
		<td>
19
			<input type="text" value="<?php echo $fromTime?>" name="from_time"/>
20
			<input type="text" value="<?php echo $toTime?>" name="to_time"/>
21
			<script type="text/javascript">
22
			$(function() {
23
				$( "input[name='from_time'], input[name='to_time']").datepicker({dateFormat: "yy-mm-dd"});
24
			});
25
		  	</script>
26
		</td>
27
		<td colspan="2"><a href="javascript:void(0);" onclick="scriptDoLoadPost('pagespeed.php', 'search_form', 'content', '&sec=reports')" class="actionbut"><?php echo $spText['button']['Show Records']?></a></td>
28
	</tr>
29
</table>
30
</form>
31
 
32
<?php
33
if(empty($websiteId)){
34
	?>
35
	<p class='note error'><?php echo $spText['common']['No Records Found']?>!</p>
36
	<?php
37
	exit;
38
}
39
?>
40
 
41
<div id='subcontent'>
42
<table width="100%" class="list">
43
	<tr class="listHead">
44
		<td class="left"><?php echo $spText['common']['Date']?></td>
45
		<td><?php echo $spTextPS['Desktop Speed']?></td>
46
		<td><?php echo $spTextPS['Mobile Speed']?></td>
47
		<td class="right"><?php echo $spTextPS['Mobile Usability']?></td>
48
	</tr>
49
	<?php
50
	$colCount = 4;
51
	if(count($list) > 0){
52
		$catCount = count($list);
53
		$i = 0;
54
		foreach($list as $listInfo){
55
 
56
			$class = ($i % 2) ? "blue_row" : "white_row";
57
            if($catCount == ($i + 1)){
58
                $leftBotClass = "tab_left_bot";
59
                $rightBotClass = "tab_right_bot";
60
            }else{
61
                $leftBotClass = "td_left_border td_br_right";
62
                $rightBotClass = "td_br_right";
63
            }
64
			?>
65
			<tr class="<?php echo $class?>">
66
				<td class="<?php echo $leftBotClass?>"><?php echo $listInfo['result_date']; ?></td>
67
				<td class='td_br_right' style='text-align:left;padding-left:40px;'><a><?php echo $listInfo['desktop_speed_score'].'</a> '. $listInfo['rank_diff_desktop_speed_score']?></td>
68
				<td class='td_br_right' style='text-align:left;padding-left:40px;'><a><?php echo $listInfo['mobile_speed_score'].'</a> '. $listInfo['rank_diff_mobile_speed_score']?></td>
69
				<td class='<?php echo $rightBotClass?>' style='text-align:left;padding-left:40px;'>
70
					<a><?php echo $listInfo['mobile_usability_score'].'</a> '. $listInfo['rank_diff_mobile_usability_score']?>
71
					<?php
72
					if ($i == 0) {
73
 
74
						// if loaded through popup
75
						if ($fromPopUp) {
76
							$detailsLink = "scriptDoLoad('index.php', 'popup_tmp', 'sec=showdiv&div_id=details_id')";
77
						} else {
78
							$detailsLink = "scriptDoLoadDialog('index.php', 'tmp', 'sec=showdiv&div_id=details_id', 1000, 800)";
79
						}
80
						?>
81
						&nbsp;&nbsp;
82
						<a href="javascript:void(0);" onclick="<?php echo $detailsLink;?>"><?php echo $spText['common']['Details']?> >></a>
83
						<div id="details_id" style="display: none;">
84
							<?php
85
							$url = "http://website:com";
86
							$reportList[$url]['desktop']['details'] = unserialize($detailsInfo['desktop_score_details']);
87
							$reportList[$url]['desktop']['speed_score'] = $listInfo['desktop_speed_score'];
88
							$reportList[$url]['mobile']['details'] = unserialize($detailsInfo['mobile_score_details']);
89
							$reportList[$url]['mobile']['speed_score'] = $listInfo['mobile_speed_score'];
90
							$reportList[$url]['mobile']['usability_score'] = $listInfo['mobile_usability_score'];
91
							include(SP_VIEWPATH."/pagespeed/pagespeeddetails.ctp.php");
92
							?>
93
						</div>
94
					<?php }?>
95
				</td>
96
			</tr>
97
			<?php
98
			$i++;
99
		}
100
	}else{
101
		echo showNoRecordsList($colCount-2);
102
	}
103
	?>
104
	<tr class="listBot">
105
		<td class="left" colspan="<?php echo ($colCount-1)?>"></td>
106
		<td class="right"></td>
107
	</tr>
108
</table>
109
</div>