function showTimeReport($searchInfo = '') { $fromTime = addslashes($searchInfo['time']); $toTime = $fromTime + 3600 * 24; $keywordId = intval($searchInfo['keyId']); $seId = intval($searchInfo['seId']); $seController = new SearchEngineController(); $this->set('seInfo', $seController->__getsearchEngineInfo($seId)); $conditions = empty($keywordId) ? "" : " and s.keyword_id={$keywordId}"; $conditions .= empty($seId) ? "" : " and s.searchengine_id={$seId}"; $sql = "select s.*,sd.url,sd.title,sd.description \r\n\t\t\t\t\t\t\t\tfrom searchresults s,searchresultdetails sd \r\n\t\t\t\t\t\t\t\twhere s.id=sd.searchresult_id \r\n\t\t\t\t\t\t\t\tand time>= {$fromTime} and time<{$toTime} {$conditions} \r\n\t\t\t\t\t\t\t\torder by s.rank"; $reportList = $this->db->select($sql); $this->set('list', $reportList); $this->render('report/timereport'); }
// if from popup if ($fromPopUp) { $logLink = scriptAJAXLinkHref('log.php', 'content', "sec=crawl_log_details&id=" . $listInfo['id'], $listInfo['id']); } else { $logLink = scriptAJAXLinkHrefDialog('log.php', 'content', "sec=crawl_log_details&id=" . $listInfo['id'], $listInfo['id']); } // crawl log is for keyword if ($listInfo['crawl_type'] == 'keyword') { // if ref is is integer find keyword name if (!empty($listInfo['keyword'])) { $listInfo['ref_id'] = $listInfo['keyword']; } // find search engine info if (preg_match("/^\\d+\$/", $listInfo['subject'])) { $seCtrler = new SearchEngineController(); $seInfo = $seCtrler->__getsearchEngineInfo($listInfo['subject']); $listInfo['subject'] = $seInfo['domain']; } } ?> <tr class="<?php echo $class; ?> "> <td class="<?php echo $leftBotClass; ?> "><input type="checkbox" name="ids[]" value="<?php echo $listInfo['id']; ?> "></td>