예제 #1
0
파일: actions.php 프로젝트: kzfk/emlauncher
 public function executeIndex()
 {
     // httpsが使えるならlogin画面はhttpsを強制
     if (Config::get('enable_https')) {
         if (strpos(mfwRequest::url(), 'http://') === 0) {
             return $this->redirect(mfwrequest::makeUrl('/login', 'https'));
         }
     }
     return $this->build();
 }
예제 #2
0
 protected function saveUrlBeforeLogin()
 {
     if (mfwRequest::method() === 'GET') {
         $url = mfwRequest::url();
         if (Config::get('enable_https')) {
             $url = preg_replace('/^http:/', 'https:', $url);
         }
         mfwSession::set(self::SESKEY_URL_BEFORE_LOGIN, $url);
     } else {
         mfwSession::clear(self::SESKEY_URL_BEFORE_LOGIN);
     }
 }
예제 #3
0
파일: pull_alert.php 프로젝트: ELN/metahub
<?php

$anchor = "pull_{$alert['pull']->getId()}";
$linkid = mfwRequest::makeLinkId(mfwRequest::url() . "#{$anchor}");
?>
<div class="alert_block" id="<?php 
echo $anchor;
?>
">
<div class="block_head">
<ul class="repo_name">
<li><a href="<?php 
echo url("/pulls/repo?repo_id={$alert['repo']->getId()}");
?>
"><?php 
echo $alert['repo']->getProject();
?>
</a></li>
</ul>
<h3><a href="<?php 
echo $alert['github_url'];
?>
" target="_blank"><span class="number"><?php 
echo $alert['pull']->getNumber();
?>
:</span> <?php 
echo $alert['pull']->getTitle();
?>
</a></h3>
<ul class="info">
<li><span class="tag">Login Name:</span> <?php 
예제 #4
0
파일: mfwRequest.php 프로젝트: ELN/metahub
 /**
  * このリクエストのURL.
  */
 public static function url()
 {
     if (self::$url === null) {
         $scheme = 'http';
         if (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on') {
             $scheme = 'https';
         }
         self::$url = "{$scheme}://{$_SERVER['HTTP_HOST']}{$_SERVER['REQUEST_URI']}";
     }
     return self::$url;
 }
예제 #5
0
파일: index.php 프로젝트: kzfk/emlauncher
<?php 
} else {
    ?>
      <li class="previous"><a href="<?php 
    echo mfwHttp::composeURL(mfwRequest::url(), array('page' => $current_page - 1));
    ?>
">Previous</a></li>
<?php 
}
?>

<?php 
if ($has_next_page) {
    ?>
      <li class="next"><a href="<?php 
    echo mfwHttp::composeURL(mfwRequest::url(), array('page' => $current_page + 1));
    ?>
">Next</a></li>
<?php 
} else {
    ?>
      <li class="next disabled"><span>Next</span></li>
<?php 
}
?>
    </ul>

  </div>
</div>

<div class="visible-xs">
예제 #6
0
파일: pager.php 프로젝트: ELN/metahub
<div class="pager">
<?php 
if (!isset($paramname)) {
    $paramname = 'page';
}
list($base, $param) = mfwHttp::extractURL(mfwRequest::url());
unset($param[$paramname]);
$baseurl = mfwHttp::composeUrl($base, $param);
if ($page > 1) {
    $url = mfwHttp::composeUrl($baseurl, array($paramname => $page - 1));
    echo "<a class=\"prev\" href=\"{$url}\">Prev</a>\n";
} else {
    echo "<span class=\"prev\">Prev</span>\n";
}
if ($page_max <= 9) {
    for ($i = 1; $i <= $page_max; ++$i) {
        if ($i != $page) {
            $url = mfwHttp::composeUrl($baseurl, array($paramname => $i));
            echo "<a href=\"{$url}\">{$i}</a>\n";
        } else {
            echo "<span>{$i}</span>\n";
        }
    }
} elseif ($page <= 5) {
    for ($i = 1; $i <= 7; ++$i) {
        if ($i != $page) {
            $url = mfwHttp::composeUrl($baseurl, array($paramname => $i));
            echo "<a href=\"{$url}\">{$i}</a>\n";
        } else {
            echo "<span>{$i}</span>\n";
        }
예제 #7
0
파일: comment.php 프로젝트: kzfk/emlauncher
    ?>
            (<?php 
    echo $c->getCreated('Y-m-d H:i');
    ?>
)
          </div>
        </li>
<?php 
}
?>
      </ul>
    </div>

    <div class="text-center">
      <?php 
echo block('paging', array('urlbase' => mfwRequest::url()));
?>
    </div>

  </div>
</div>

<div class="visible-xs">
  <?php 
echo block('app_infopanel');
?>
</div>

<script type="text/javascript">

$('#comment-form form').submit(function(){