Пример #1
0
 public function actionOfficeCampaignRanking($date = null, $is_selfOpearted = 1, $filename = 'office-campaign-results.csv')
 {
     $file = Yii::$app->getRuntimePath() . DIRECTORY_SEPARATOR . 'exported_data' . DIRECTORY_SEPARATOR . $filename;
     if ($date == null) {
         $date = date('Y-m-d');
     }
     $results = \app\models\MOfficeCampaignScore::getScoreRanking($is_selfOpearted, $date);
     $fh = fopen($file, "w");
     foreach ($results as $result) {
         $office = \app\models\MOffice::findOne(['office_id' => $result['office_id']]);
         fprintf($fh, "%s, %.2f" . PHP_EOL, $office->title, $result['score']);
     }
     fclose($fh);
 }
Пример #2
0
    ?>
">
              <span class="icon icon-left-nav"></span>
          </a>
      <?php 
}
?>

      <h1 class="title">
       <i class="fa fa-trophy" style="color:#fff"></i>&nbsp;渠道宣传竞赛评选排行榜
      </h1>
    </header>

    <?php 
$ranking = \app\models\MOfficeCampaignScore::getScoreRanking();
$ranking_2 = \app\models\MOfficeCampaignScore::getScoreRanking(1);
?>

    <!-- Wrap all non-bar HTML in the .content div (this is actually what scrolls) -->
    <div class="content">

        <div class="segmented-control">
          <a class="control-item active" href="#item1mobile">
           自营厅
          </a>
          <a class="control-item" href="#item2mobile">
           合作厅
          </a>
        </div>
        <div class="card">
          <span id="item1mobile" class="control-content active">