コード例 #1
0
ファイル: base.php プロジェクト: uzura8/flockbird
 protected function check_auth_and_redirect($is_check_not_auth_action = true)
 {
     if ($is_check_not_auth_action && $this->check_not_auth_action()) {
         return;
     }
     if (IS_AUTH) {
         return;
     }
     if (IS_API) {
         throw new ApiNotAuthorizedException();
     }
     if (!$this->acl_has_access) {
         throw new HttpForbiddenException();
     }
     Session::set_flash('destination', urlencode(Uri::string_with_query()));
     Response::redirect($this->get_login_page_uri());
 }
コード例 #2
0
ファイル: list.php プロジェクト: uzura8/flockbird
<?php 
        } else {
            ?>
	<td class="small"><?php 
            echo symbol('noValue');
            ?>
</td>
<?php 
        }
        ?>

<?php 
        if (check_acl($uri = 'admin/member/delete')) {
            ?>
	<td class="small"><?php 
            echo btn('form.delete', '#', 'js-simplePost', false, 'xs', null, array('data-destination' => Uri::string_with_query(), 'data-uri' => $uri . '/' . $member->id, 'data-msg' => term('common.force', 'site.left') . 'します。よろしいですか?'));
            ?>
</td>
<?php 
        } else {
            ?>
	<td class="small"><?php 
            echo symbol('noValue');
            ?>
</td>
<?php 
        }
        ?>

	<td><?php 
        echo Html::anchor('admin/member/' . $member->id, $member->name);
コード例 #3
0
ファイル: list.php プロジェクト: uzura8/flockbird
            ?>
</td>
<?php 
        } else {
            ?>
	<td class="small"><?php 
            echo symbol('noValue');
            ?>
</td>
<?php 
        }
        ?>

<?php 
        if (check_acl('admin/news/publish')) {
            $attr = array('data-destination' => Uri::string_with_query());
            if ($news->is_published) {
                ?>
	<td class="small"><?php 
                echo btn('form.do_unpublish', '#', 'btn_publish', true, 'xs', null, $attr + array('data-uri' => 'admin/news/unpublish/' . $news->id, 'data-msg' => term('form.unpublish') . 'にしますか?'));
                ?>
</td>
<?php 
            } else {
                ?>
	<td class="small"><?php 
                echo btn('form.do_publish', '#', 'btn_publish', true, 'xs', null, $attr + array('data-uri' => 'admin/news/publish/' . $news->id, 'data-msg' => term('form.publish') . 'しますか?'));
                ?>
</td>
<?php 
            }
コード例 #4
0
        $view = View::forge('_parts/modal', array('block_attrs' => array('id' => 'modal_notice_navbar'), 'size' => 'sm', 'title' => term('notice'), 'is_display_footer_close_btn' => true));
        $view->set_safe('header_subinfo', render('notice::_parts/link_read_all', array('tag' => 'small')));
        echo $view->render();
        ?>
<script type="text/x-handlebars-template" id="notices-template">
<?php 
        echo render('notice::_parts/handlebars_template/list');
        ?>
</script>
<?php 
    }
} else {
    ?>

<?php 
    $destination = Session::get_flash('destination') ?: urlencode(Uri::string_with_query());
    $login_form = render('auth/_parts/login', array('in_popover' => true, 'destination' => $destination));
    switch (conf('auth.headerLoginForm.type')) {
        case 'popover':
            ?>
<script type="text/x-handlebars-template" id="login-template">
<?php 
            echo $login_form;
            ?>
</script>
<script>
	var source   = $("#login-template").html();
	var template = Handlebars.compile(source);
	var content = (template());
	var inputs = new Array('#form_email', '#form_password');
	loadPopover('#insecure_user_menu', '#insecure_user_popover', content, '', inputs);