コード例 #1
0
ファイル: evaluator.php プロジェクト: wileybenet/mobile-docs
 public static function read_by_key($key)
 {
     $evaluator = self::read(['*'], TRUE, ["`key` = ?", $key]);
     if (isset($evaluator['id'])) {
         $evaluator['downloads'] = EvaluatorDownload::read_by_evaluator_id($evaluator['id']);
     }
     return $evaluator;
 }
コード例 #2
0
ファイル: evaluators.php プロジェクト: wileybenet/mobile-docs
  <div class="content left">
    <table class="data">
      <thead>
        <th>Evaluator/Email/Phone/Key</th>
        <th>Company/URL/Script</th>
        <th>Date/IP</th>
        <th>Platform</th>
        <th>Version</th>
        <th>Download</th>
        <th>Installed</th>
      </thead>
      <tbody>
        <?php 
$evaluators = Evaluator::read(['*'], FALSE, ['email_date > CURRENT_DATE - INTERVAL 2 MONTH'], 'email_date DESC');
foreach ($evaluators as $evaluator) {
    $downloads = EvaluatorDownload::read_by_evaluator_id($evaluator['id']);
    $downs = [];
    if (is_array($downloads)) {
        foreach ($downloads as $download) {
            if ($download['download_date']) {
                $installed = $download['installed_count'] > 0 ? $download['installed_date'] . '(' . $download['installed_count'] . ')' : '?';
                $downs[] = ['platform' => $download['platform'], 'version' => $download['version'], 'download' => $download['download_date'], 'installed' => $installed];
            }
        }
    }
    if (count($downs) == 0) {
        $downs[] = ['platform' => '', 'version' => '', 'download' => '', 'installed' => ''];
    }
    echo '<tr>';
    foreach (['name/email/phone/key', 'company/url/scripting', 'email_date/ip'] as $field) {
        $fields = explode('/', $field);