<?php 
if ( ! defined( 'ABSPATH' ) ) {
    exit;
}

$attdata = XH_Social_Temp_Helper::clear('atts','templete');
$err = $attdata['err'];
$include_header_footer = $attdata['include_header_footer'];

if($err){
    if($err instanceof Exception){
        $err = "errcode:{$err->getCode()},errmsg:{$err->getMessage()}";
    }
    if($err instanceof XH_Social_Error){
        $err = "errcode:{$err->errcode},errmsg:{$err->errmsg}";
    }
    if($err instanceof WP_Error){
        $err = "errcode:{$err->get_error_code()},errmsg:{$err->get_error_message()}";
    }
    if(is_object($err)){
        $err = print_r($err,true);
    }
}

if(empty($err)){
    $err = XH_Social_Error::err_code(500)->errmsg;
}
if($include_header_footer){
    ?>
     <!DOCTYPE html>
            <html>
                <head>
                	<title>抱歉，出错了!</title>
                    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=0">
                   
                </head>
                <body>
<?php  } ?>
		<style type="text/css">
            @font-face {
              font-weight: normal;
              font-style: normal;
              font-family: "weui";
              src: url('data:application/octet-stream;base64, ') format('truetype');
            }
            [class^="weui_icon_"]:before,
            [class*=" weui_icon_"]:before {
              font-family: "weui";
              font-style: normal;
              font-weight: normal;
              speak: none;
              display: inline-block;
              vertical-align: middle;
              text-decoration: inherit;
              width: 1em;
              margin-right: .2em;
              text-align: center;
              /* opacity: .8; */
              /* For safety - reset parent styles, that can break glyph codes*/
              font-variant: normal;
              text-transform: none;
              /* fix buttons height, for twitter bootstrap */
              line-height: 1em;
              /* Animation center compensation - margins should be symmetric */
              /* remove if not needed */
              margin-left: .2em;
              /* you can be more comfortable with increased icons size */
              /* font-size: 120%; */
              /* Uncomment for 3D effect */
              /* text-shadow: 1px 1px 1px rgba(127, 127, 127, 0.3); */
            }
            .weui_icon_circle:before {
              content: "\EA01";
            }
            /* '顮€' */
            .weui_icon_download:before {
              content: "\EA02";
            }
            /* '顮€' */
            .weui_icon_info:before {
              content: "\EA03";
            }
            /* '顮€' */
            .weui_icon_safe_success:before {
              content: "\EA04";
            }
            /* '顮€' */
            .weui_icon_safe_warn:before {
              content: "\EA05";
            }
            /* '顮€' */
            .weui_icon_success:before {
              content: "\EA06";
            }
            /* '顮€' */
            .weui_icon_success_circle:before {
              content: "\EA07";
            }
            /* '顮€' */
            .weui_icon_success_no_circle:before {
              content: "\EA08";
            }
            /* '顮€' */
            .weui_icon_waiting:before {
              content: "\EA09";
            }
            /* '顮€' */
            .weui_icon_waiting_circle:before {
              content: "\EA0A";
            }
            /* '顮€' */
            .weui_icon_warn:before {
              content: "\EA0B";
            }
            /* '顮€' */
            .weui_icon_info_circle:before {
              content: "\EA0C";
            }
            /* '顮€' */
            .weui_icon_cancel:before {
              content: "\EA0D";
            }
            /* '顮€' */
            .weui_icon_search:before {
              content: "\EA0E";
            }
            /* '顮€' */
            .weui_icon_clear:before {
              content: "\EA0F";
            }
            /* '顮€' */
            [class^="weui_icon_"]:before,
            [class*=" weui_icon_"]:before {
              margin: 0;
            }
            .weui_icon_success:before {
              font-size: 23px;
              color: #09BB07;
            }
            .weui_icon_waiting:before {
              font-size: 23px;
              color: #10AEFF;
            }
            .weui_icon_warn:before {
              font-size: 23px;
              color: #F43530;
            }
            .weui_icon_info:before {
              font-size: 23px;
              color: #10AEFF;
            }
            .weui_icon_success_circle:before {
              font-size: 23px;
              color: #09BB07;
            }
            .weui_icon_success_no_circle:before {
              font-size: 23px;
              color: #09BB07;
            }
            .weui_icon_waiting_circle:before {
              font-size: 23px;
              color: #10AEFF;
            }
            .weui_icon_circle:before {
              font-size: 23px;
              color: #C9C9C9;
            }
            .weui_icon_download:before {
              font-size: 23px;
              color: #09BB07;
            }
            .weui_icon_info_circle:before {
              font-size: 23px;
              color: #09BB07;
            }
            .weui_icon_safe_success:before {
              color: #09BB07;
            }
            .weui_icon_safe_warn:before {
              color: #FFBE00;
            }
            .weui_icon_cancel:before {
              color: #F43530;
              font-size: 22px;
            }
            .weui_icon_search:before {
              color: #B2B2B2;
              font-size: 14px;
            }
            .weui_icon_clear:before {
              color: #B2B2B2;
              font-size: 14px;
            }
            .weui_icon_msg:before {
              font-size: 104px;
            }
            .weui_icon_warn.weui_icon_msg:before {
              color: #F76260;
            }
            .weui_icon_safe:before {
              font-size: 104px;
            }    
            .weui_msg {
              padding-top: 36px;
              text-align: center;
            }
            .weui_msg .weui_icon_area {
              margin-bottom: 30px;
            }
            .weui_msg .weui_text_area {
              margin-bottom: 25px;
              padding: 0 20px;
            }
            .weui_msg .weui_msg_title {
              margin-bottom: 5px;
              font-weight: 400;
              font-size: 20px;
            }
            .weui_msg .weui_msg_desc {
              font-size: 14px;
              color: #888;
            }
            .weui_msg .weui_opr_area {
              margin-bottom: 25px;
            }
            .weui_msg .weui_extra_area {
              margin-bottom: 15px;
              font-size: 14px;
              color: #888;
            }
            .weui_msg .weui_extra_area a {
              color: #61749B;
            }
        </style>
       <div class="weui_msg">
       <div class="weui_icon_area"><i class="weui_icon_warn weui_icon_msg"></i></div>
       <div class="weui_text_area">
       <h4 class="weui_msg_title">抱歉，出错了!</h4>
       <p class="weui_msg_desc"><?php echo $err;?></p>
       </div>
       </div>
<?php 
if($include_header_footer){
    ?>
        </body>
    </html>
    <?php 
}