rhymix/modules/referer/referer.model.php
haneul ae357bceb0 referer module (#279)
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@3106 201d5d3c-b55e-5fd7-737f-ddc643e51545
2007-11-28 17:45:32 +00:00

43 lines
1 KiB
PHP

<?php
/**
* @class refererModel
* @author haneul (haneul0318@gmail.com)
* @brief referer 모듈의 Model class
**/
class refererModel extends referer {
function init()
{
}
function isInsertedHost($host) {
$args->host = $host;
$output = executeQuery('referer.getHostStatus', $args);
return $output->data->count?true:false;
}
function getLogList($obj)
{
$query_id = 'referer.getRefererLogList';
$args->sort_index = 'regdate';
$args->page = $obj->page?$obj->page:1;
$args->list_count = $obj->list_count?$obj->list_count:20;
$args->page_count = $obj->page_count?$obj->page_count:10;
$output = executeQuery($query_id, $args);
// 결과가 없거나 오류 발생시 그냥 return
if(!$output->toBool()||!count($output->data)) return $output;
return $output;
}
function getRefererStatus()
{
$args->sort_index = 'count';
return executeQuery("referer.getRefererStatistics", $args);
}
}
?>