<?php
/**
 * The html template file of deny method of user module of ZDOO.
 *
 * @copyright   Copyright 2009-2018 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
 * @license     ZPL (http://zpl.pub/page/zplv12.html)
 * @author      Chunsheng Wang <chunsheng@cnezsoft.com>
 * @package     ZDOO
 * @version     $Id: deny.html.php 4029 2016-08-26 06:50:41Z liugang $
 */
include '../../common/view/header.lite.html.php';
$moduleName = isset($lang->$module->common)  ? $lang->$module->common:  $module;
$methodName = $method;
if(isset($lang->$module->$method))
{
    if(is_object($lang->$module->$method) || is_array($lang->$module->$method))
    {
        $methodName = zget($lang->$module->$method, 'common', '');
    }
    else
    {
        $methodName = $lang->$module->$method;
    }
}
else
{
    foreach($lang->$module as $key => $label)
    {
        if(strtolower($key) == $method) $methodName = $label;
    }
}
?>
<div class='container'>
  <div class='alert alert-danger'>
    <h2><?php echo $app->user->account, ' ', $lang->user->deny;?></h2>
    <p> <?php printf($lang->user->errorDeny, $moduleName, $methodName);?></p>
    <p>
      <?php
      echo html::a($this->createLink($config->default->module), $lang->index->common);
      if($refererBeforeDeny) echo html::a(helper::safe64Decode($refererBeforeDeny), $lang->user->goback);
      echo html::a('javascript:;', $lang->user->relogin, "onclick='logout()'");
      ?>
  </div>
</div>
</body>
<script>
function logout()
{
    top.document.location.href = '<?php echo $this->createLink('user', 'logout', "referer=" . helper::safe64Encode($denyPage));?>';
}
</script>
</html>
