<?php
 $inativo = 1;
?>
 
<!-- Content Header (Page header) -->
<section class="content-header">
    <h1> Início <small>Painel de Controle</small> </h1>
    <ol class="breadcrumb">
        <li><a href="<?php echo base_url().'painel'; ?>"><i class="fa fa-home"></i> Início</a></li>
        <!--<li class="active">Dashboard</li>-->
    </ol>
</section>
 
<!-- Main content -->
<section class="content">
    <div class="row">
        <div class="col-xs-12 col-sm-12 col-md-12">
            <section>
                <div class="alert alert-<?php echo $vld_user['cor'] ?> alert-dismissible">
                   <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
                   <h4><i class="icon fa fa-<?php echo $vld_user['faicon'] ?>"></i> <?php echo $vld_user['titilo'] ?></h4> <?php echo $vld_user['msg'] ?>
               </div>
            </section>
        </div>
    </div>
    <div class="row">
        <div class="col-md-6">
            <div class="box box-success">
                <div class="box-header with-border">
                    <h3 class="box-title">Compartilhamento</h3>
                    <div class="box-tools pull-right">
                        <button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i></button>
                    </div>
                </div>
                <!-- /.box-header -->
                <div class="box-body">
                    <div class="row">
                        <div class="col-md-2 col-sm-4 col-xs-6 box-rs">
                            <a href="javascript: void(0);" onclick="window.open('https://www.facebook.com/sharer.php?u=<?php e(base_url().$profile->profile); ?>','ventanacompartir', 'toolbar=0, status=0, width=650, height=450');">
                                <span class="info-box-icon bg-blue"><i class="fa fa fa-facebook"></i></span>
                            </a>
                        </div>
                        <div class="col-md-2 col-sm-4 col-xs-6 box-rs">
                            <a href="javascript: void(0);" onclick="window.open('https://plus.google.com/share?url=<?php e(base_url().$profile->profile); ?>','ventanacompartir', 'toolbar=0, status=0, width=650, height=450');"><span class="info-box-icon bg-red"><i class="fa fa-google-plus"></i></span></a>
                        </div>
                        <div class="col-md-2 col-sm-4 col-xs-6 box-rs">
                            <a href="javascript: void(0);" onclick="window.open('https://twitter.com/share?text=<?php e($profile->descricao); ?>&url=<?php e(base_url().$profile->profile); ?>','ventanacompartir', 'toolbar=0, status=0, width=650, height=450');"><span class="info-box-icon bg-aqua"><i class="fa fa-twitter"></i></span></a>
                        </div>
                        <div class="col-md-2 col-sm-4 col-xs-6 box-rs">
                            <a href="javascript:void((function()%7Bvar%20e=document.createElement('script');e.setAttribute('type','text/javascript');e.setAttribute('charset','UTF-8');e.setAttribute('src','https://assets.pinterest.com/js/pinmarklet.js?r='+Math.random()*99999999);document.body.appendChild(e)%7D)());" target="_blank"><span class="info-box-icon bg-red-active"><i class="fa fa fa-pinterest"></i></span></a>
                        </div>
                        <div class="col-md-2 col-sm-4 col-xs-6 box-rs">
                            <span class="info-box-icon bg-gray-active"><i class="fa fa-envelope"></i></span>
                        </div>
                        <div class="col-xs-6 visible-xs">
                            <a href="whatsapp://send?text=<?php e($profile->descricao);; ?> - <?php e(base_url().$profile->profile); ?>" title="Compartilhar no WhatsApp" data-action="share/whatsapp/share" class="visible-whatsapp" ><span class="info-box-icon bg-green"><i class="fa fa-whatsapp"></i></span></a>
                        </div>
                    </div>
                </div>
                <!-- /.box-body -->
            </div>
            
            <div class="box box-default">
                <div class="box-header with-border">
                    <h3 class="box-title">Gerenciar mídias</h3>
                     
                    <div class="box-tools pull-right">
                        <button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i></button>
                    </div>
                </div>
                <!-- /.box-header -->
                <div class="box-body">
                    <?php if($inativo == 0) { ?>
                    <div class="callout callout-info">
                        <h4><i class="icon fa fa-info-circle"></i> Info</h4>
                        <p>Você ainda não fez uploads de imagens ou vídeos, saiba que aqui no seu BlogVB você pode postar seus artigos com imagens ou vídeos quando quiser.</p>
                    </div>
                    <?php } else {?>
                    <div class="box box-solid">
                        <div class="box-header with-border">
                            <span class="description">Últimos uploads de imagens ou vídeos</span>
                        </div>
                        <div class="box-body">
                            <img src="http://placehold.it/150x100" alt="..." class="margin">
                            <img src="http://placehold.it/150x100" alt="..." class="margin">
                            <img src="http://placehold.it/150x100" alt="..." class="margin">
                            <img src="http://placehold.it/150x100" alt="..." class="margin">
                            <img src="http://placehold.it/150x100" alt="..." class="margin">
                            <img src="http://placehold.it/150x100" alt="..." class="margin">
                            <img src="http://placehold.it/150x100" alt="..." class="margin">
                            <img src="http://placehold.it/150x100" alt="..." class="margin">
                        </div>
                    </div>
                    <?php } ?>
                </div>
                <!-- /.box-body -->
                <div class="box-footer text-center">
                    <a href="<?php echo base_url();?>blog/midias" class="btn btn-primary btn-flat pull-right">Ir para as mídias</a>
                </div>
                <!-- /.box-footer -->
            </div>
            
            <div class="box box-primary">
                <div class="box-header with-border">
                    <h3 class="box-title">Meu perfil</h3>
                     
                    <div class="box-tools pull-right">
                        <button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i></button>
                    </div>
                </div>
                <!-- /.box-header -->
                <div class="box-body">
                     
                    <div class="progress">
                        <div class="progress-bar progress-bar-danger" role="progressbar" aria-valuenow="25" aria-valuemin="0" aria-valuemax="100">   
                            <span class="popOver" data-toggle="tooltip" data-placement="top" title="25%"> </span>     
                        </div>
                    </div>
                     
                    <!--<div class="progress">
                        <div class="progress-bar progress-bar-warning" role="progressbar" aria-valuenow="50" aria-valuemin="0" aria-valuemax="100">   
                            <span class="popOver" data-toggle="tooltip" data-placement="top" title="50%"> </span>     
                        </div>
                    </div>
                     
                    <div class="progress">
                        <div class="progress-bar progress-bar-info" role="progressbar" aria-valuenow="75" aria-valuemin="0" aria-valuemax="100">   
                            <span class="popOver" data-toggle="tooltip" data-placement="top" title="75%"> </span>     
                        </div>
                    </div>
                     
                    <div class="progress">
                        <div class="progress-bar progress-bar-success" role="progressbar" aria-valuenow="100" aria-valuemin="0" aria-valuemax="100">   
                            <span class="popOver" data-toggle="tooltip" data-placement="top" title="100%"> </span>     
                        </div>
                    </div>-->
                     
                    <ul class="list-group list-group-unbordered">
                        <li class="list-group-item">
                            <span>Dados do Blog</span> <a class="pull-right"><i class="fa fa-square-o" aria-hidden="true"></i></a>
                        </li>
                        <li class="list-group-item">
                            <span>Logo & Favicon</span> <a class="pull-right"><i class="fa fa-square-o" aria-hidden="true"></i></a>
                        </li>
                        <li class="list-group-item">
                            <span>Sobre Mim</span> <a class="pull-right"><i class="fa fa-square-o" aria-hidden="true"></i></a>
                        </li>
                        <li class="list-group-item">
                            <span>Contato</span> <a class="pull-right"><i class="fa fa-check-square-o" aria-hidden="true"></i></a>
                        </li>
                        <li class="list-group-item">
                            <span>Redes Sociais</span> <a class="pull-right"><i class="fa fa-check-square-o" aria-hidden="true"></i></a>
                        </li>
                    </ul>
                </div>
                <!-- /.box-body -->
                <div class="box-footer text-center">
                    <a href="<?php echo base_url();?>blog/painel/configuracoes" class="btn btn-primary btn-flat pull-right">Completar cadastro</a>
                </div>
                <!-- /.box-footer -->
            </div>
            
            <div class="box box-warning">
                <div class="box-header with-border">
                    <h3 class="box-title">Slideshow</h3>
                     
                    <div class="box-tools pull-right">
                        <button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i></button>
                    </div>
                </div>
                <!-- /.box-header -->
                <div class="box-body">
                    <?php if($inativo == 0) { ?>
                    <div class="callout callout-info">
                        <h4><i class="icon fa fa-info-circle"></i> Info</h4>
                        <p>Com o Slideshow seu blog fica muito mais atrativo e dinâmico.</p>
                    </div>
                    <?php } else { ?>
                    <div id="carousel-example-generic" class="carousel slide" data-ride="carousel">
                        <ol class="carousel-indicators">
                            <li data-target="#carousel-example-generic" data-slide-to="0" class="active"></li>
                            <li data-target="#carousel-example-generic" data-slide-to="1" class=""></li>
                            <li data-target="#carousel-example-generic" data-slide-to="2" class=""></li>
                        </ol>
                        <div class="carousel-inner">
                            <div class="item active">
                                <img src="http://placehold.it/900x500/39CCCC/ffffff&amp;text=I+Love+Bootstrap" alt="First slide">
                                <div class="carousel-caption">First Slide</div>
                            </div>
                            <div class="item">
                                <img src="http://placehold.it/900x500/3c8dbc/ffffff&amp;text=I+Love+Bootstrap" alt="Second slide">
                                <div class="carousel-caption">Second Slide</div>
                            </div>
                            <div class="item">
                                <img src="http://placehold.it/900x500/f39c12/ffffff&amp;text=I+Love+Bootstrap" alt="Third slide">
                                <div class="carousel-caption">Third Slide</div>
                            </div>
                        </div>
                        <a class="left carousel-control" href="#carousel-example-generic" data-slide="prev">
                            <span class="fa fa-angle-left"></span>
                        </a>
                        <a class="right carousel-control" href="#carousel-example-generic" data-slide="next">
                            <span class="fa fa-angle-right"></span>
                        </a>
                    </div>
                    <?php } ?>
                </div>
                <!-- /.box-body -->
                <div class="box-footer text-center">
                    <a href="<?php echo base_url();?>blog/painel/slideshow" class="btn btn-primary btn-flat pull-right">Ir para o Slideshow</a>
                </div>
                <!-- /.box-footer -->
            </div>
        </div>
        <div class="col-md-6">
            <div class="box box-success">
                <div class="box-header with-border">
                    <h3 class="box-title">Financeiro</h3>
                     
                    <div class="box-tools pull-right">
                        <button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i></button>
                    </div>
                </div>
                <!-- /.box-header -->
                <?php if($fnc_assinatura != null){?>
                   <input id="assinaturaCode" type="hidden" value="<?php echo $fnc_assinatura->code?>">
                <?php } ?> 
                <div class="box-body">
                    <div class="table-responsive">
                       <table class="table no-margin">
                           <tbody>
                               <tr>
                                   <th>Produto</th>
                                   <td>BLOG VB</td>
                               </tr>
                               <tr>
                                   <th>Descrição</th>
                                   <td>Plano Anual do Blog VB no Valor Mensal de R$49,90</td>
                               </tr>
                               <tr>
                                   <th>Próximo Pagamento</th>
                                   <td><?php if($fnc_assinatura != null){?><span class="proximo_devido"><i class="fa fa-spinner fa-pulse fa-fw"></i></span><?php } else{ echo "-"; } ?></td>
                               </tr>
                               <tr>
                                   <th>Renovação Automática</th>
                                   <td><?php if($fnc_assinatura != null){?><span class="renovacao_automatica"><i class="fa fa-spinner fa-pulse fa-fw"></i></span><span class="renovacao_automatica_descricao"></span><?php } else { ?><span class="label label-warning">Desativado</span><?php } ?></td>
                               </tr>
                               <tr>
                                   <th>Status da Ordem</th>
                                   <td><?php if($fnc_assinatura != null){?><span class="status_ordem"><i class="fa fa-spinner fa-pulse fa-fw"></i> </span><span class="status_ordem_descricao"></span><?php } else { echo "-"; } ?></td>
                               </tr>
                               <tr>
                                   <th>Status do Pagamento</th>
                                   <td><?php if($fnc_assinatura != null){?><span class="status"><i class="fa fa-spinner fa-pulse fa-fw"></i></span><span class="status_descricao"></span><?php } else { echo "-"; } ?></td>
                               </tr>
                               <tr>
                                   <th>Valor</th>
                                   <td>R$49,90</td>
                               </tr>
                           </tbody>
                       </table>
                   </div>
                </div>
                <!-- /.box-body -->
                <div class="box-footer text-center">
                    <a href="<?php echo base_url();?>financeiro/assinatura" class="btn btn-success btn-flat pull-right">Ir para a assinatura</a>
                </div>
                <!-- /.box-footer -->
            </div>
            
            <div class="box box-default">
                <div class="box-header with-border">
                    <h3 class="box-title">Personalizar meu blog</h3>
                    <div class="box-tools pull-right">
                        <button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i></button>
                    </div>
                </div>
                <!-- /.box-header -->
                <div class="box-body">
                    <div class="row">
                        <div class="col-md-10 col-md-offset-1">
                            <div class="row m-b-25">
                                <div class="col-md-12">
                                    <div class="border-dotted example-header">
                                        Menu superior
                                    </div>
                                </div>
                            </div>
                            <div class="row m-b-25">
                                <div class="col-md-8">
                                    <div class="border-dotted example-content">
                                        Conteúdo principal
                                    </div>
                                </div>
                                <div class="col-md-4">
                                    <div class="border-dotted example-sidebar">
                                        lateral 
                                    </div>
                                </div>
                            </div>
                            <div class="row">
                                <div class="col-md-12">
                                    <div class="border-dotted">
                                        <div class="example-footer">
                                            Rodapé
                                        </div>
                                        <div class="border-dotted-top">
                                            Rodapé principal
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                <!-- /.box-body -->
                <div class="box-footer text-center">
                    <a href="<?php echo base_url();?>blog/painel/configuracoes" class="btn btn-primary btn-flat pull-right">Ir para Temas & Cores</a>
                </div>
                <!-- /.box-footer -->
            </div>
            
            <div class="box box-primary">
                <div class="box-header with-border">
                    <h3 class="box-title">Postagens</h3>
                     
                    <div class="box-tools pull-right">
                        <button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i></button>
                    </div>
                </div>
                <!-- /.box-header -->
                <div class="box-body">
                     
                    <?php if($inativo == 0) { ?>
                    <div class="callout callout-info">
                        <h4><i class="icon fa fa-info-circle"></i> Info</h4>
                        <p>Você ainda não fez nenhuma postagem. Não perca tempo os seus leitores estão a sua espera.</p>
                    </div>
                    <?php } else {?>
                    <div class="box box-widget widget-user">
                        <div class="widget-user-header bg-aqua-active">
                            <h3 class="widget-user-username">Título</h3>
                            <h5 class="widget-user-desc">Descrição</h5>
                        </div>
                        <div class="widget-user-image">
                            <img class="img-circle" src="https://adminlte.io/themes/AdminLTE/dist/img/user1-128x128.jpg" alt="User Avatar">
                        </div>
                        <div class="box-footer">
                            <div class="row">
                                <div class="col-sm-4 border-right">
                                    <div class="description-block last-post">
                                        <h5 class="description-header">24/05/2017</h5>
                                        <span class="description-text"><i class="fa fa-calendar-o" aria-hidden="true"></i></span>
                                    </div>
                                </div>
                                <div class="col-sm-4 border-right">
                                    <div class="description-block last-post">
                                        <h5 class="description-header">Blog VB</h5>
                                        <span class="description-text"><i class="fa fa-user" aria-hidden="true"></i></span>
                                    </div>
                                </div>
                                <div class="col-sm-4">
                                    <div class="description-block last-post">
                                        <h5 class="description-header">35</h5>
                                        <span class="description-text"><i class="fa fa-eye" aria-hidden="true"></i></span>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                    <?php } ?>
                </div>
                <!-- /.box-body -->
                <div class="box-footer text-center">
                    <a href="<?php echo base_url();?>blog/painel/postagem/add" class="btn btn-primary btn-flat pull-right">Nova postagem</a>
                </div>
                <!-- /.box-footer -->
            </div>
            
            <div class="box box-warning">
                <div class="box-header with-border">
                    <h3 class="box-title">Serviços</h3>
                     
                    <div class="box-tools pull-right">
                        <button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i></button>
                    </div>
                </div>
                <!-- /.box-header -->
                <div class="box-body">
                    <?php if($inativo == 0) { ?>
                    <div class="callout callout-info">
                        <h4><i class="icon fa fa-info-circle"></i> Info</h4>
                        <p>Torne seus serviços visíveis para os seus leitores.</p>
                    </div>
                    <?php } else { ?>
                    <div class="box box-solid">
                        <div class="box-header with-border">
                            <span class="description">Últimos serviços adicionados</span>
                        </div>
                        <div class="box-body">
                            <div class="box box-widget widget-user-2">
                                <div class="widget-user-header bg-yellow">
                                    <div class="widget-user-image">
                                        <img class="img-circle" src="https://adminlte.io/themes/AdminLTE/dist/img/user7-128x128.jpg" alt="User Avatar">
                                    </div>
                                    <h3 class="widget-user-username">Título do serviço 3</h3>
                                    <h5 class="widget-user-desc">Subtítulo do serviço 3</h5>
                                </div>
                            </div>
                            <div class="box box-widget widget-user-2">
                                <div class="widget-user-header bg-yellow">
                                    <div class="widget-user-image">
                                        <img class="img-circle" src="https://adminlte.io/themes/AdminLTE/dist/img/user7-128x128.jpg" alt="User Avatar">
                                    </div>
                                    <h3 class="widget-user-username">Título do serviço 2</h3>
                                    <h5 class="widget-user-desc">Subtítulo do serviço 2</h5>
                                </div>
                            </div>
                            <div class="box box-widget widget-user-2">
                                <div class="widget-user-header bg-yellow">
                                    <div class="widget-user-image">
                                        <img class="img-circle" src="https://adminlte.io/themes/AdminLTE/dist/img/user7-128x128.jpg" alt="User Avatar">
                                    </div>
                                    <h3 class="widget-user-username">Título do serviço 1</h3>
                                    <h5 class="widget-user-desc">Subtítulo do serviço 1</h5>
                                </div>
                            </div>
                        </div>
                    </div>
                    <?php } ?>
                </div>
                <!-- /.box-body -->
                <div class="box-footer text-center">
                    <a href="<?php echo base_url();?>blog/painel/servicos" class="btn btn-primary btn-flat pull-right">Ir para os Serviços</a>
                </div>
                <!-- /.box-footer -->
            </div>
        </div>
    </div>
    <div class="row">
        <div class="col-md-12">
            <div class="panel panel-default panel-ajuda">
                <div class="panel-heading">
                    <h3 class="panel-title">Ajuda</h3>
                </div>
                <div class="panel-body">
                    <div class="row">
                        <?php $this->load->helper('form'); ?>
                        <?php $attributes = array('accept-charset' => 'utf-8', 'id' => 'myform');?>
                        <?php echo form_open_multipart('painel/area_restrita',$attributes); ?>
 
                        <div class="col-md-2 hidden-xs">
                            <div class="icone" align="center">
                                <img src="<?php echo base_url().'assets/img/auth/des4.png'; ?>" class="img-responsive" />
                            </div>
                        </div>
                        <div class="col-md-8 col-xs-12">
                            Em caso de dúvida preencha o campo abaixo, com mensagem de texto e/ou arquivo de imagem (jpg).
                            <textarea name="mensagem" class="form-control"></textarea>
 
                            <div class="col-xs-6 box_upload">
                                <!-- <input type="file" name="arquivo">-->
                                <div class="fileinput fileinput-new" data-provides="fileinput">
                                    <span class="btn btn-default btn-file btn-flat">
                                        <span class="fileinput-new">Selecionar Arquivo</span>
                                        <span class="fileinput-exists">Trocar Arquivo</span>
                                        <input type="file" name="file" />
                                    </span>
                                    <span class="fileinput-filename"></span>
                                    <a href="#" class="close fileinput-exists" data-dismiss="fileinput" style="float: none">&times;</a>
                                </div>
                            </div>
 
                            <div class="col-xs-6 box_enviar">
                                <input type="submit" name="enviar" value="Enviar" class="btn btn-primary btn-dash btn-flat" />
                            </div>
 
                        </div>
                        <div class="col-md-2 hidden-xs">
                            <div class="icone_right" align="center">
                                <img src="<?php echo base_url().'assets/img/auth/des2.png'; ?>" class="img-responsive" />
                            </div>
                        </div>
                        <?php echo form_close(); ?>
                    </div>
                </div>
            </div>
        </div>
    </div>
</section>
<!-- /.content -->
 
<?php if(isset($mensagem) and !empty($mensagem)){?>
    <script type="text/javascript">
        $(document).ready(function()
        {
            alert('<?php echo $mensagem?>')
        })
    </script>
<?php }?>