当前位置: 首页>>代码示例>>PHP>>正文


PHP Variable::getInteger方法代码示例

本文整理汇总了PHP中Variable::getInteger方法的典型用法代码示例。如果您正苦于以下问题:PHP Variable::getInteger方法的具体用法?PHP Variable::getInteger怎么用?PHP Variable::getInteger使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Variable的用法示例。


在下文中一共展示了Variable::getInteger方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: show

 public function show($id)
 {
     $this->cache_control('private', Variable::getInteger('status-refresh', 30));
     try {
         $this->report = new Report($id);
         if (!$this->report->isReadable()) {
             throw new fAuthorizationException('You are not allowed to view this report.');
         }
         global $cache;
         $this->board = $cache->get($this->report->getBoardCacheKey());
         if ($this->board === NULL) {
             $p = $this->report->getProblems();
             $un = $this->report->getUsernames();
             $up = $this->report->getUserPairs();
             $un[] = '';
             $up[] = array('id' => '', 'name' => '平均');
             $st = $this->report->getStartDatetime();
             $et = $this->report->getEndDatetime();
             $this->board = new BoardTable(ReportGenerator::headers($p), $up, ReportGenerator::scores($p, $un, $st, $et));
             $cache->set($this->report->getBoardCacheKey(), $this->board, 10);
         }
         if ($this->report->isHomework()) {
             $this->nav_class = 'homework';
         } else {
             $this->nav_class = 'reports';
         }
         $this->render('report/show');
     } catch (fExpectedException $e) {
         fMessaging::create('warning', $e->getMessage());
         fURL::redirect(Util::getReferer());
     } catch (fUnexpectedException $e) {
         fMessaging::create('error', $e->getMessage());
         fURL::redirect(Util::getReferer());
     }
 }
开发者ID:daerduoCarey,项目名称:oj,代码行数:35,代码来源:ReportController.php

示例2: ranklist

 /**
  * Authors Ranklist
  */
 public function ranklist()
 {
     $this->page = fRequest::get('page', 'integer', 1);
     if ($this->page <= 0) {
         $this->page = 1;
     }
     $this->user_stats = fRecordSet::build('UserStat', array(), array('solved' => 'desc', 'tried' => 'asc', 'submissions' => 'asc'), Variable::getInteger('users-per-page', 50), $this->page);
     $this->page_url = SITE_BASE . '/ranklist?page=';
     $this->page_records = $this->user_stats;
     $this->nav_class = 'ranklist';
     $this->render('user/ranklist');
 }
开发者ID:daerduoCarey,项目名称:oj,代码行数:15,代码来源:UserController.php

示例3: find

 public static function find($view_any, $page, $title, $author)
 {
     $conditions = array();
     if (!$view_any) {
         $conditions['secret_before<='] = Util::currentTime();
     }
     if (strlen($title)) {
         $conditions['title~'] = $title;
     }
     if (strlen($author)) {
         $conditions['author~'] = $author;
     }
     $limit = Variable::getInteger('problems-per-page', 10);
     return fRecordSet::build('Problem', $conditions, array('id' => 'asc'), $limit, $page);
 }
开发者ID:daerduoCarey,项目名称:oj,代码行数:15,代码来源:Problem.php

示例4: find

 public static function find($top, $owner, $problem_id, $language, $verdict, $page = 1)
 {
     $conditions = array();
     if (!empty($top)) {
         $conditions['id<='] = $top;
     }
     if (strlen($owner)) {
         $conditions['owner='] = $owner;
     }
     if (strlen($problem_id)) {
         $conditions['problem_id='] = $problem_id;
     }
     if (!empty($language)) {
         $conditions['code_language='] = $language - 1;
     }
     if (!empty($verdict)) {
         $conditions['verdict='] = $verdict;
     }
     $limit = Variable::getInteger('records-per-page', 50);
     return fRecordSet::build('Record', $conditions, array('id' => 'desc'), $limit, $page);
 }
开发者ID:daerduoCarey,项目名称:oj,代码行数:21,代码来源:Record.php

示例5:

        }
        ?>
          </td>
        <?php 
    }
    ?>
        <td><?php 
    echo $r->getTimeCost();
    ?>
</td>
        <td><?php 
    echo $r->getMemoryCost();
    ?>
</td>
        <td><?php 
    echo fHTML::encode($r->getLanguageName());
    ?>
</td>
        <td><?php 
    echo $r->getSubmitDatetime();
    ?>
</td>
      </tr>
    <?php 
}
?>
  </tbody>
</table>
<?php 
$meta_refresh = Variable::getInteger('status-refresh', 30);
include __DIR__ . '/../layout/footer.php';
开发者ID:daerduoCarey,项目名称:oj,代码行数:31,代码来源:index.php


注:本文中的Variable::getInteger方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。