/**
  * 定时脚本,用于完成统计任务
  * 脚本每次执行只统计一组数据
  * @return void
  * @throws 100 If 无效的授权信息
  */
 public function countTask()
 {
     #参数检查
     $this->params = $this->require_params(array('token'));
     if ($this->params['token'] != self::COUNT_TASK_TOKEN) {
         throw new Exception('无效的授权信息', 100);
     }
     #获取待统计数据
     $this->statisticsModel = F::load_model('statistics', array());
     $countDataAll = $this->statisticsModel->getCountTaskData();
     if (empty($countDataAll)) {
         F::rest()->show_result();
     }
     foreach ($countDataAll as $countData) {
         #执行统计
         $this->returnData = $this->statisticsModel->count($countData);
         #通知脚本执行完毕
         $this->userModel = F::load_model('user', array());
         $this->userModel->sendCountTaskEmail($countData['email']);
     }
     F::rest()->show_result();
 }
Beispiel #2
0
</div>
<div class="singlecontent padding-10px">
<table  id="t2" class="table  table-striped  table-hover table-autosort table-autofilter table-autopage:10 table-stripeclass:alternate table-page-number:t2page table-page-count:t2pages table-filtered-rowcount:t2filtercount table-rowcount:t2allcount">
<thead>
    <tr>    
    <th class="table-filterable table-sortable:date" style="text-align: center" >Day</th>
    <th class="table-filterable table-sortable:numeric" style="text-align: center">#Of Menu Items</th>
    <th class="table-filterable table-sortable:default" style="text-align: center">Name</th>
    </tr>
</thead>
<tbody>
<?php
$this->load->model('statistics_model');

//.date("Y-m-j",strtotime($date)).
foreach(statistics_model::frequency_hourly() as $data){
    echo       "
        <tr >
        <td  style='text-align: center'>$data->time_constraint</td>
        <td  style='text-align: center'>$data->number</td>
        <td  style='text-align: center'>".substr($data->name,0,20)."</td>
        </tr>
        ";
}
  
///alt\
?>

</tbody>
<tfoot>
<tr>
Beispiel #3
0
</div>
<div class="singlecontent padding-10px">
<table  id="t4" class="table  table-striped  table-hover table-autosort table-autofilter table-autopage:10 table-stripeclass:alternate table-page-number:t4page table-page-count:t4pages table-filtered-rowcount:t4filtercount table-rowcount:t4allcount">
<thead>
    <tr>    
    <th class="table-filterable table-sortable:numeric" style="text-align: center">Number of orders</th>
    <th class="table-filterable table-sortable:default" style="text-align: center">Waiter</th>
    </tr>
</thead>
<tbody>
<?php
$this->load->model('statistics_model');

//.date("Y-m-j",strtotime($date)).

foreach(statistics_model::items_compensated_per_waiter() as $data){
    echo       "
        <tr >
        <td  style='text-align: center'>$data->number</td>
        <td  style='text-align: center'>(".$data->fname.",".$data->lname .")</td>
        </tr>
        ";
}
  
///alt\
?>

</tbody>
<tfoot>
<tr>
Beispiel #4
0
    Compensations Per Day
</div>
<div class="singlecontent padding-10px">
<table  id="t1" class="table  table-striped  table-hover table-autosort table-autofilter table-autopage:10 table-stripeclass:alternate table-page-number:t1page table-page-count:t1pages table-filtered-rowcount:t1filtercount table-rowcount:t1allcount">
<thead>
    <tr>    
    <th class="table-filterable table-sortable:date" style="text-align: center" >Day</th>
    <th class="table-filterable table-sortable:numeric" style="text-align: center">Compensations</th>
    </tr>
</thead>
<tbody>
<?php
$this->load->model('statistics_model');

//.date("Y-m-j",strtotime($date)).
foreach(statistics_model::compensations_per_day() as $data){
    echo       "
        <tr >
        <td  style='text-align: center'>$data->time_constraint</td>
        <td  style='text-align: center'>$data->number</td>
        </tr>
        ";
}
  
///alt\
?>

</tbody>
<tfoot>
<tr>