103 |
- |
1 |
<?php
|
|
|
2 |
$borderCollapseVal = $pdfVersion ? "border-collapse: collapse;" : "";
|
|
|
3 |
$hrefAttr = $pdfVersion ? "" : "href='javascript:void(0)'";
|
|
|
4 |
|
|
|
5 |
if(!empty($printVersion) || !empty($pdfVersion)) {
|
|
|
6 |
$doPrint = empty($cronUserId) ? true : false;
|
|
|
7 |
$pdfVersion ? showPdfHeader($sectionHead) : showPrintHeader($sectionHead, $doPrint);
|
|
|
8 |
?>
|
|
|
9 |
<table class="search">
|
|
|
10 |
<?php if (!empty($websiteUrl)) {?>
|
|
|
11 |
<tr>
|
|
|
12 |
<th><?php echo $spText['common']['Website']?>:</th>
|
|
|
13 |
<td>
|
|
|
14 |
<?php echo $websiteUrl; ?>
|
|
|
15 |
</td>
|
|
|
16 |
</tr>
|
|
|
17 |
<?php }?>
|
|
|
18 |
<tr>
|
|
|
19 |
<th><?php echo $spText['common']['Period']?>:</th>
|
|
|
20 |
<td>
|
|
|
21 |
<?php echo $fromTime?> - <?php echo $toTime?>
|
|
|
22 |
</td>
|
|
|
23 |
</tr>
|
|
|
24 |
</table>
|
|
|
25 |
<?php } else {?>
|
|
|
26 |
<?php echo showSectionHead($sectionHead); ?>
|
|
|
27 |
<form id='search_form'>
|
|
|
28 |
<table width="100%" class="search">
|
|
|
29 |
<tr>
|
|
|
30 |
<th><?php echo $spText['common']['Name']?>: </th>
|
|
|
31 |
<td>
|
|
|
32 |
<input type="text" name="search_name" value="<?php echo htmlentities($searchInfo['search_name'], ENT_QUOTES)?>" onblur="<?php echo $submitLink?>">
|
|
|
33 |
</td>
|
|
|
34 |
<th><?php echo $spText['common']['Period']?>:</th>
|
|
|
35 |
<td colspan="2">
|
|
|
36 |
<input type="text" value="<?php echo $fromTime?>" name="from_time" id="from_time"/>
|
|
|
37 |
<input type="text" value="<?php echo $toTime?>" name="to_time" id="to_time"/>
|
|
|
38 |
<script>
|
|
|
39 |
$( function() {
|
|
|
40 |
$( "#from_time, #to_time").datepicker({dateFormat: "yy-mm-dd"});
|
|
|
41 |
} );
|
|
|
42 |
</script>
|
|
|
43 |
</td>
|
|
|
44 |
<tr>
|
|
|
45 |
<tr>
|
|
|
46 |
<th><?php echo $spText['common']['Website']?>: </th>
|
|
|
47 |
<td>
|
|
|
48 |
<select name="website_id" id="website_id" onchange="scriptDoLoadPost('archive.php', 'search_form', 'content')" style="width: 180px;">
|
|
|
49 |
<option value="">-- <?php echo $spText['common']['Select']?> --</option>
|
|
|
50 |
<?php foreach($siteList as $websiteInfo){?>
|
|
|
51 |
<?php if($websiteInfo['id'] == $websiteId){?>
|
|
|
52 |
<option value="<?php echo $websiteInfo['id']?>" selected><?php echo $websiteInfo['name']?></option>
|
|
|
53 |
<?php }else{?>
|
|
|
54 |
<option value="<?php echo $websiteInfo['id']?>"><?php echo $websiteInfo['name']?></option>
|
|
|
55 |
<?php }?>
|
|
|
56 |
<?php }?>
|
|
|
57 |
</select>
|
|
|
58 |
</td>
|
|
|
59 |
<th><?php echo $spText['label']['Report Type']?>: </th>
|
|
|
60 |
<td>
|
|
|
61 |
<select name="report_type" id="report_type" onchange="scriptDoLoadPost('archive.php', 'search_form', 'content')" style="width: 210px;">
|
|
|
62 |
<option value="">-- <?php echo $spText['common']['Select']?> --</option>
|
|
|
63 |
<?php foreach($reportTypes as $type => $info){?>
|
|
|
64 |
<?php if($type == $searchInfo['report_type']){?>
|
|
|
65 |
<option value="<?php echo $type?>" selected><?php echo $info?></option>
|
|
|
66 |
<?php }else{?>
|
|
|
67 |
<option value="<?php echo $type?>"><?php echo $info?></option>
|
|
|
68 |
<?php }?>
|
|
|
69 |
<?php }?>
|
|
|
70 |
</select>
|
|
|
71 |
<a href="javascript:void(0);" onclick="scriptDoLoadPost('archive.php', 'search_form', 'content')" class="actionbut"><?php echo $spText['button']['Search']?></a>
|
|
|
72 |
</td>
|
|
|
73 |
</tr>
|
|
|
74 |
</table>
|
|
|
75 |
<br>
|
|
|
76 |
</form>
|
|
|
77 |
<?php
|
|
|
78 |
// url parameters
|
|
|
79 |
$mainLink = SP_WEBPATH."/archive.php?$urlarg";
|
|
|
80 |
$directLink = $mainLink . "&order_col=$orderCol&order_val=$orderVal&pageno=$pageNo";
|
|
|
81 |
|
|
|
82 |
// export links
|
|
|
83 |
$pdfLink = "$directLink&doc_type=pdf";
|
|
|
84 |
$csvLink = "$directLink&doc_type=export";
|
|
|
85 |
$printLink = "$directLink&doc_type=print";
|
|
|
86 |
showExportDiv($pdfLink, $csvLink, $printLink);
|
|
|
87 |
?>
|
|
|
88 |
<?php }?>
|
|
|
89 |
|
|
|
90 |
<div id='subcontent' class="dashboard">
|
|
|
91 |
<?php
|
|
|
92 |
$seCount = count($seList);
|
|
|
93 |
if (!empty($keywordPos) && !empty($seCount)) {
|
|
|
94 |
$colCount = empty($websiteId) ? ($seCount * 3) + 2 : ($seCount * 3) + 1;
|
|
|
95 |
?>
|
|
|
96 |
<br>
|
|
|
97 |
<div class="table-responsive">
|
|
|
98 |
<?php
|
|
|
99 |
echo showSectionHead($spTextTools['Keyword Position Summary']);
|
|
|
100 |
if (empty($pdfVersion)) echo $keywordPagingDiv;
|
|
|
101 |
?>
|
|
|
102 |
<table id="cust_tab">
|
|
|
103 |
<tr>
|
|
|
104 |
<?php
|
|
|
105 |
$linkClass = "";
|
|
|
106 |
if ($orderCol == 'keyword') {
|
|
|
107 |
$oVal = ($orderVal == 'DESC') ? "ASC" : "DESC";
|
|
|
108 |
$linkClass .= "sort_".strtolower($oVal);
|
|
|
109 |
} else {
|
|
|
110 |
$oVal = 'ASC';
|
|
|
111 |
}
|
|
|
112 |
|
|
|
113 |
$hrefAttr = $pdfVersion ? "" : "href='javascript:void(0)'";
|
|
|
114 |
|
|
|
115 |
$linkName = "<a id='sortLink' class='$linkClass' $hrefAttr onclick=\"scriptDoLoad('$mainLink&order_col=keyword&order_val=$oVal', 'content')\">{$spText['common']['Keyword']}</a>";
|
|
|
116 |
?>
|
|
|
117 |
<?php if (empty($websiteId)) {?>
|
|
|
118 |
<th id="head" rowspan="2"><?php echo $spText['common']['Website']?></th>
|
|
|
119 |
<th rowspan="2" id="head"><?php echo $linkName?></th>
|
|
|
120 |
<?php } else { ?>
|
|
|
121 |
<th id="head" rowspan="2" style="border-right:1px solid #B0C2CC;"><?php echo $linkName?></th>
|
|
|
122 |
<?php }?>
|
|
|
123 |
<?php
|
|
|
124 |
foreach ($seList as $i => $seInfo){
|
|
|
125 |
|
|
|
126 |
$linkClass = "";
|
|
|
127 |
if ($seInfo['id'] == $orderCol) {
|
|
|
128 |
$oVal = ($orderVal == 'DESC') ? "ASC" : "DESC";
|
|
|
129 |
$linkClass .= "sort_".strtolower($oVal);
|
|
|
130 |
} else {
|
|
|
131 |
$oVal = 'ASC';
|
|
|
132 |
}
|
|
|
133 |
$linkName = "<a id='sortLink' class='$linkClass' $hrefAttr onclick=\"scriptDoLoad('$mainLink&order_col={$seInfo['id']}&order_val=$oVal', 'content')\">{$seInfo['domain']}</a>";
|
|
|
134 |
?>
|
|
|
135 |
<th id="head" colspan="3"><?php echo $linkName; ?></th>
|
|
|
136 |
<?php
|
|
|
137 |
}
|
|
|
138 |
?>
|
|
|
139 |
</tr>
|
|
|
140 |
<tr>
|
|
|
141 |
<?php
|
|
|
142 |
$pTxt = str_replace("-", "/", substr($fromTime, -5));
|
|
|
143 |
$cTxt = str_replace("-", "/", substr($toTime, -5));
|
|
|
144 |
foreach ($seList as $i => $seInfo) {
|
|
|
145 |
?>
|
|
|
146 |
<th><?php echo $pTxt; ?></th>
|
|
|
147 |
<th><?php echo $cTxt; ?></th>
|
|
|
148 |
<th>+ / -</th>
|
|
|
149 |
<?php
|
|
|
150 |
}
|
|
|
151 |
?>
|
|
|
152 |
</tr>
|
|
|
153 |
<?php
|
|
|
154 |
if (count($list) > 0) {
|
|
|
155 |
foreach($indexList as $keywordId => $rankValue){
|
|
|
156 |
$listInfo = $list[$keywordId];
|
|
|
157 |
$positionInfo = $listInfo['position_info'];
|
|
|
158 |
$rangeFromTime = date('Y-m-d', strtotime('-14 days', strtotime($fromTime)));
|
|
|
159 |
$scriptLink = "website_id=$websiteId&keyword_id={$listInfo['id']}&rep=1&from_time=$rangeFromTime&to_time=$toTime";
|
|
|
160 |
?>
|
|
|
161 |
<tr>
|
|
|
162 |
<?php if (empty($websiteId)) {?>
|
|
|
163 |
<td><a href="javascript:void(0)"><?php echo $listInfo['weburl']; ?></a></td>
|
|
|
164 |
<td><?php echo $listInfo['name'] ?></td>
|
|
|
165 |
<?php } else { ?>
|
|
|
166 |
<td><?php echo $listInfo['name']; ?></td>
|
|
|
167 |
<?php }?>
|
|
|
168 |
<?php
|
|
|
169 |
foreach ($seList as $index => $seInfo){
|
|
|
170 |
$rankInfo = $positionInfo[$seInfo['id']];
|
|
|
171 |
$prevRank = isset($rankInfo[$fromTime]) ? $rankInfo[$fromTime] : "";
|
|
|
172 |
$currRank = isset($rankInfo[$toTime]) ? $rankInfo[$toTime] : "";
|
|
|
173 |
$rankDiffTxt = "";
|
|
|
174 |
|
|
|
175 |
// if both ranks are existing
|
|
|
176 |
if ($prevRank != '' && $currRank != '') {
|
|
|
177 |
$rankDiff = $prevRank - $currRank;
|
|
|
178 |
|
|
|
179 |
if ($rankDiff > 0) {
|
|
|
180 |
$rankDiffTxt = "<font class='green'>($rankDiff)</font>";
|
|
|
181 |
} else if ($rankDiff < 0) {
|
|
|
182 |
$rankDiffTxt = "<font class='red'>($rankDiff)</font>";
|
|
|
183 |
} else {
|
|
|
184 |
$rankDiffTxt = "0";
|
|
|
185 |
}
|
|
|
186 |
}
|
|
|
187 |
|
|
|
188 |
$prevRankLink = scriptAJAXLinkHrefDialog('reports.php', 'content', $scriptLink."&se_id=".$seInfo['id'], $prevRank);
|
|
|
189 |
$currRankLink = scriptAJAXLinkHrefDialog('reports.php', 'content', $scriptLink."&se_id=".$seInfo['id'], $currRank);
|
|
|
190 |
$graphLink = scriptAJAXLinkHrefDialog('graphical-reports.php', 'content', $scriptLink."&se_id=".$seInfo['id'], ' ', 'graphicon');
|
|
|
191 |
|
|
|
192 |
// if pdf report remove links
|
|
|
193 |
if ($pdfVersion) {
|
|
|
194 |
$prevRankLink = str_replace("href='javascript:void(0);'", "", $prevRankLink);
|
|
|
195 |
$currRankLink = str_replace("href='javascript:void(0);'", "", $currRankLink);
|
|
|
196 |
$graphLink = str_replace("href='javascript:void(0);'", "", $graphLink);
|
|
|
197 |
}
|
|
|
198 |
|
|
|
199 |
$diffOut = empty($cronUserId) ? $graphLink . " " . $rankDiffTxt : $rankDiffTxt;
|
|
|
200 |
?>
|
|
|
201 |
<td><?php echo $prevRankLink; ?></td>
|
|
|
202 |
<td><?php echo $currRankLink; ?></td>
|
|
|
203 |
<td><?php echo $diffOut; ?></td>
|
|
|
204 |
<?php
|
|
|
205 |
}
|
|
|
206 |
?>
|
|
|
207 |
</tr>
|
|
|
208 |
<?php
|
|
|
209 |
}
|
|
|
210 |
} else {
|
|
|
211 |
echo showNoRecordsList($colCount - 2, '', true);
|
|
|
212 |
}
|
|
|
213 |
?>
|
|
|
214 |
</table>
|
|
|
215 |
</div>
|
|
|
216 |
<?php
|
|
|
217 |
}
|
|
|
218 |
?>
|
|
|
219 |
|
|
|
220 |
<br>
|
|
|
221 |
<div class="table-responsive">
|
|
|
222 |
<?php
|
|
|
223 |
if (!empty($websiteStats)) {
|
|
|
224 |
echo showSectionHead($spTextHome['Website Statistics']);
|
|
|
225 |
$colSpan = 15;
|
|
|
226 |
if (empty($pdfVersion)) echo $websitePagingDiv;
|
|
|
227 |
?>
|
|
|
228 |
<table id="cust_tab">
|
|
|
229 |
<tr>
|
|
|
230 |
<th id="head" rowspan="2"><?php echo $spText['common']['Website']?></th>
|
|
|
231 |
<th id="head" colspan="4"><?php echo $spTextHome['Ranks']?></th>
|
|
|
232 |
<th id="head" colspan="3"><?php echo $spTextHome['Backlinks']?></th>
|
|
|
233 |
<th id="head" colspan="2"><?php echo $spTextHome['Pages Indexed']?></th>
|
|
|
234 |
<th id="head" colspan="3"><?php echo $spTextPS['Page Speed']?></th>
|
|
|
235 |
<th id="head" colspan="2"><?php echo $spTextHome['Directory Submission']?></th>
|
|
|
236 |
</tr>
|
|
|
237 |
<tr>
|
|
|
238 |
<th>Moz</th>
|
|
|
239 |
<th><?php echo $spText['common']['Domain Authority']?></th>
|
|
|
240 |
<th><?php echo $spText['common']['Page Authority']?></th>
|
|
|
241 |
<th>Alexa</th>
|
|
|
242 |
<th>Google</th>
|
|
|
243 |
<th>Alexa</th>
|
|
|
244 |
<th>Bing</th>
|
|
|
245 |
<th>Google</th>
|
|
|
246 |
<th>Bing</th>
|
|
|
247 |
<th><?php echo $spTextPS['Desktop Speed']?></th>
|
|
|
248 |
<th><?php echo $spTextPS['Mobile Speed']?></th>
|
|
|
249 |
<th><?php echo $spTextPS['Mobile Usability']?></th>
|
|
|
250 |
<th><?php echo $spText['common']['Total']?></th>
|
|
|
251 |
<th><?php echo $spText['common']['Active']?></th>
|
|
|
252 |
</tr>
|
|
|
253 |
<?php
|
|
|
254 |
if(count($websiteRankList) > 0){
|
|
|
255 |
|
|
|
256 |
foreach($websiteRankList as $websiteInfo){
|
|
|
257 |
$rangeFromTime = date('Y-m-d', strtotime('-14 days', strtotime($fromTime)));
|
|
|
258 |
$timeArg = "&from_time=$rangeFromTime&to_time=$toTime";
|
|
|
259 |
$googleRankLink = scriptAJAXLinkHrefDialog('rank.php', 'content', "sec=reports&website_id=".$websiteInfo['id'] . $timeArg, $websiteInfo['mozrank']);
|
|
|
260 |
$alexaRankLink = scriptAJAXLinkHrefDialog('rank.php', 'content', "sec=reports&website_id=".$websiteInfo['id'] . $timeArg, $websiteInfo['alexarank']);
|
|
|
261 |
$daLink = scriptAJAXLinkHrefDialog('rank.php', 'content', "sec=reports&website_id=".$websiteInfo['id'] . $timeArg, $websiteInfo['domain_authority']);
|
|
|
262 |
$paLink = scriptAJAXLinkHrefDialog('rank.php', 'content', "sec=reports&website_id=".$websiteInfo['id'] . $timeArg, $websiteInfo['page_authority']);
|
|
|
263 |
$googleBackLInk = scriptAJAXLinkHrefDialog('backlinks.php', 'content', "sec=reports&website_id=".$websiteInfo['id'] . $timeArg, $websiteInfo['google']['backlinks']);
|
|
|
264 |
$alexaBackLInk = scriptAJAXLinkHrefDialog('backlinks.php', 'content', "sec=reports&website_id=".$websiteInfo['id'] . $timeArg, $websiteInfo['alexa']['backlinks']);
|
|
|
265 |
$bingBackLInk = scriptAJAXLinkHrefDialog('backlinks.php', 'content', "sec=reports&website_id=".$websiteInfo['id'] . $timeArg, $websiteInfo['msn']['backlinks']);
|
|
|
266 |
$googleIndexLInk = scriptAJAXLinkHrefDialog('saturationchecker.php', 'content', "sec=reports&website_id=".$websiteInfo['id'] . $timeArg, $websiteInfo['google']['indexed']);
|
|
|
267 |
$bingIndexLInk = scriptAJAXLinkHrefDialog('saturationchecker.php', 'content', "sec=reports&website_id=".$websiteInfo['id'] . $timeArg, $websiteInfo['msn']['indexed']);
|
|
|
268 |
$totaldirLink = scriptAJAXLinkHrefDialog('directories.php', 'content', "sec=reports&website_id=".$websiteInfo['id'] . $timeArg, $websiteInfo['dirsub']['total']);
|
|
|
269 |
$activeDirLink = scriptAJAXLinkHrefDialog('directories.php', 'content', "sec=reports&active=approved&&website_id=".$websiteInfo['id'] . $timeArg, $websiteInfo['dirsub']['active']);
|
|
|
270 |
$desktopPageSpeedLink = scriptAJAXLinkHrefDialog('pagespeed.php', 'content', "sec=reports&website_id=".$websiteInfo['id'] . $timeArg, $websiteInfo['desktop_speed_score']);
|
|
|
271 |
$mobilePageSpeedLink = scriptAJAXLinkHrefDialog('pagespeed.php', 'content', "sec=reports&website_id=".$websiteInfo['id'] . $timeArg, $websiteInfo['mobile_speed_score']);
|
|
|
272 |
$mobileUsabilityLink = scriptAJAXLinkHrefDialog('pagespeed.php', 'content', "sec=reports&website_id=".$websiteInfo['id'] . $timeArg, $websiteInfo['mobile_usability_score']);
|
|
|
273 |
?>
|
|
|
274 |
<tr>
|
|
|
275 |
<td>
|
|
|
276 |
<a href="javascript:void(0)"><?php echo $websiteInfo['url'];?></a>
|
|
|
277 |
</td>
|
|
|
278 |
<td><?php echo $googleRankLink;?></td>
|
|
|
279 |
<td><?php echo $daLink; ?></td>
|
|
|
280 |
<td><?php echo $paLink; ?></td>
|
|
|
281 |
<td><?php echo $alexaRankLink; ?></td>
|
|
|
282 |
<td><?php echo $googleBackLInk; ?></td>
|
|
|
283 |
<td><?php echo $alexaBackLInk; ?></td>
|
|
|
284 |
<td><?php echo $bingBackLInk; ?></td>
|
|
|
285 |
<td><?php echo $googleIndexLInk; ?></td>
|
|
|
286 |
<td><?php echo $bingIndexLInk; ?></td>
|
|
|
287 |
<td><?php echo $desktopPageSpeedLink; ?></td>
|
|
|
288 |
<td><?php echo $mobilePageSpeedLink; ?></td>
|
|
|
289 |
<td><?php echo $mobileUsabilityLink; ?></td>
|
|
|
290 |
<td><?php echo $totaldirLink?></td>
|
|
|
291 |
<td><?php echo $activeDirLink?></td>
|
|
|
292 |
</tr>
|
|
|
293 |
<?php
|
|
|
294 |
}
|
|
|
295 |
} else {
|
|
|
296 |
echo showNoRecordsList($colSpan - 2, '', true);
|
|
|
297 |
}?>
|
|
|
298 |
</table>
|
|
|
299 |
<?php
|
|
|
300 |
}
|
|
|
301 |
?>
|
|
|
302 |
</div>
|
|
|
303 |
|
|
|
304 |
<?php
|
|
|
305 |
if (!empty($websiteSearchReport)) {
|
|
|
306 |
?>
|
|
|
307 |
<br>
|
|
|
308 |
<div class="table-responsive"><?php echo $websiteSearchReport;?></div>
|
|
|
309 |
<?php
|
|
|
310 |
}
|
|
|
311 |
?>
|
|
|
312 |
|
|
|
313 |
<?php
|
|
|
314 |
if (!empty($sitemapReport)) {
|
|
|
315 |
?>
|
|
|
316 |
<br>
|
|
|
317 |
<div class="table-responsive"><?php echo $sitemapReport;?></div>
|
|
|
318 |
<?php
|
|
|
319 |
}
|
|
|
320 |
?>
|
|
|
321 |
|
|
|
322 |
<?php
|
|
|
323 |
if (!empty($keywordSearchReport)) {
|
|
|
324 |
?>
|
|
|
325 |
<br>
|
|
|
326 |
<div class="table-responsive"><?php echo $keywordSearchReport;?></div>
|
|
|
327 |
<?php
|
|
|
328 |
}
|
|
|
329 |
?>
|
|
|
330 |
|
|
|
331 |
<?php
|
|
|
332 |
if (!empty($socialMediaReport)) {
|
|
|
333 |
?>
|
|
|
334 |
<br>
|
|
|
335 |
<div class="table-responsive"><?php echo $socialMediaReport;?></div>
|
|
|
336 |
<?php
|
|
|
337 |
}
|
|
|
338 |
?>
|
|
|
339 |
|
|
|
340 |
<?php
|
|
|
341 |
if (!empty($analyticsReport)) {
|
|
|
342 |
?>
|
|
|
343 |
<br>
|
|
|
344 |
<div class="table-responsive"><?php echo $analyticsReport;?></div>
|
|
|
345 |
<?php
|
|
|
346 |
}
|
|
|
347 |
?>
|
|
|
348 |
|
|
|
349 |
<?php
|
|
|
350 |
if (!empty($reviewReport)) {
|
|
|
351 |
?>
|
|
|
352 |
<br>
|
|
|
353 |
<div class="table-responsive"><?php echo $reviewReport;?></div>
|
|
|
354 |
<?php
|
|
|
355 |
}
|
|
|
356 |
?>
|
|
|
357 |
|
|
|
358 |
</div>
|
|
|
359 |
<br>
|
|
|
360 |
<?php
|
|
|
361 |
if(empty($cronUserId) && (!empty($printVersion) || !empty($pdfVersion))) {
|
|
|
362 |
echo $pdfVersion ? showPdfFooter($spText) : showPrintFooter($spText);
|
|
|
363 |
}
|
|
|
364 |
?>
|