<?php
require_once("admin/inc/protecao-final.php");

$total_avisos_ativos = mysqli_num_rows(mysqli_query($conexao,"SELECT * FROM avisos WHERE area = 'streaming'"));
$checar_status_aviso = mysqli_num_rows(mysqli_query($conexao,"SELECT * FROM avisos_desativados WHERE area = 'streaming' AND login = '".$dados_stm["login"]."'"));
$total_avisos_exibir = ($total_avisos_ativos > $checar_status_aviso) ? $total_avisos_ativos-$checar_status_aviso : 0;

$dados_app_multi_plataforma = mysqli_fetch_array(mysqli_query($conexao,"SELECT * FROM app_multi_plataforma where codigo_stm = '".$dados_stm["codigo"]."'"));

$url_player = (!empty($dados_revenda["dominio_padrao"])) ? "playerv.".$dados_revenda["dominio_padrao"]."" : "playerv.".$dados_config["dominio_padrao"]."";

$dados_servidor_camera_studio = mysqli_fetch_array(mysqli_query($conexao,"SELECT * FROM servidores where codigo = '".$dados_stm["codigo_servidor_camera_studio"]."'"));

if($dados_servidor_camera_studio["nome_principal"]) {
$servidor_camera_studio = code_decode($dados_servidor_camera_studio["nome_principal"].".".$dados_config["dominio_padrao"],"E");
} else {
$servidor_camera_studio = code_decode($dados_servidor_camera_studio["nome"].".".$dados_config["dominio_padrao"],"E");
}

if($_POST["acao_form"]) {

if(empty($_POST["nome"]) or $_FILES['logo']['size'] == 0 or $_FILES['fundo']['size'] == 0) {
die ("<script> alert(\"Campo nome e imagens sao obrigatorios.\\n \\nPor favor volte e tente novamente.\"); 
     window.location = 'javascript:history.back(1)'; </script>");
}

if($_FILES["logo"]["tmp_name"]) {
@copy($_FILES["logo"]["tmp_name"],$_SERVER['DOCUMENT_ROOT']."/player/app-multi-plataforma/logo-".$dados_stm["login"].".png");
}
if($_FILES["fundo"]["tmp_name"]) {
@copy($_FILES["fundo"]["tmp_name"],$_SERVER['DOCUMENT_ROOT']."/player/app-multi-plataforma/background-".$dados_stm["login"].".jpg");
}

$url_chat = ($_POST["ativar_chat"]) ? $_POST["url_chat"] : "";

$whatsapp = str_replace("+", "", $_POST["whatsapp"]);
$whatsapp = str_replace(" ", "", $_POST["whatsapp"]);
$whatsapp = str_replace("(", "", $_POST["whatsapp"]);
$whatsapp = str_replace(")", "", $_POST["whatsapp"]);

if($_POST["acao_form"] == "configurar") {

mysqli_query($conexao,"Update app_multi_plataforma set nome = '".$_POST["nome"]."', email = '".$_POST["email"]."', whatsapp = '".$whatsapp."', url_facebook = '".$_POST["url_facebook"]."', url_instagram = '".$_POST["url_instagram"]."', url_twitter = '".$_POST["url_twitter"]."', url_site = '".$_POST["url_site"]."', cor_texto = '".$_POST["cor_texto"]."', cor_menu_claro = '".$_POST["cor_menu_claro"]."', cor_menu_escuro = '".$_POST["cor_menu_escuro"]."', cor_splash = '".$_POST["cor_splash"]."', url_logo = '/app-multi-plataforma/logo-".$dados_stm["login"].".png', url_background = '/app-multi-plataforma/background-".$dados_stm["login"].".jpg', url_chat = '".$url_chat."', text_prog = '".$_POST["text_prog"]."', text_hist = '".$_POST["text_hist"]."', url_youtube = '".$_POST["url_youtube"]."'where codigo = '".$dados_app_multi_plataforma["codigo"]."'");

}

if($_POST["acao_form"] == "criar") {

mysqli_query($conexao,"INSERT INTO app_multi_plataforma (codigo_stm,nome,email,url_facebook,url_instagram,url_twitter,url_youtube,url_site,url_chat,url_logo,url_background,whatsapp,cor_texto,cor_menu_claro,cor_menu_escuro,cor_splash,text_prog,text_hist) VALUES ('".$dados_stm["codigo"]."','".$_POST["nome"]."','".$_POST["email"]."','".$_POST["url_facebook"]."','".$_POST["url_instagram"]."','".$_POST["url_twitter"]."','".$_POST["url_youtube"]."','".$_POST["url_site"]."','".$_POST["url_chat"]."','/app-multi-plataforma/logo-".$dados_stm["login"].".png','/app-multi-plataforma/background-".$dados_stm["login"].".jpg','".$whatsapp."','".$_POST["cor_texto"]."','".$_POST["cor_menu_claro"]."','".$_POST["cor_menu_escuro"]."','".$_POST["cor_splash"]."','".$_POST["text_prog"]."','".$_POST["text_hist"]."')");
}

$_SESSION["status_acao"] = status_acao($lang['lang_info_config_painel_resultado_ok'],"ok");

header("Location: /app-multi-plataforma");
exit();
}

/////////////////////////////////////////////////
/////////////////// Idioma //////////////////////
/////////////////////////////////////////////////

if($dados_stm["idioma_painel"] == "pt-br") {

$lang[ 'lang_info_streaming_app_android_tab_app_pronto' ] = 'Prévia App' ;
$lang[ 'lang_info_streaming_app_android_tab_configurar_app' ] = 'Configurar App' ;
$lang[ 'lang_info_streaming_app_android_info_configuracoes' ] = '1-Preencha os dados abaixo para configurar seu App. Ap&oacute;s a configura&ccedil;&atilde;o ser&aacute; exibido a pr&eacute;via e c&oacute;digo para instala&ccedil;&atilde;o em seu site.<br>2-Insira em seu site o c&oacute;digo do bot&atilde;o de instala&ccedil;&atilde;o.<br>3-Seu visitante ir&aacute; clicar no bot&atilde;o de instala&ccedil;&atilde;o e o app ser&aacute; instalado de forma segura.' ;
$lang[ 'lang_info_streaming_app_android_info_desativar_campo' ] = '(deixe este campo em branco para desativa-lo)';
$lang[ 'lang_info_streaming_app_android_app_cor_texto' ] = 'Cor Texto';
$lang[ 'lang_info_streaming_app_android_app_cor_menu_claro' ] = 'Cor Menu Claro';
$lang[ 'lang_info_streaming_app_android_app_cor_menu_escuro' ] = 'Cor Menu Escuro';
$lang[ 'lang_info_streaming_app_android_app_cor_splash' ] = 'Cor Fundo Abertura(Splash)';
$lang[ 'lang_info_streaming_app_android_app_historia' ] = 'Texto Hist&oacute;ria';
$lang[ 'lang_info_streaming_app_android_app_programacao' ] = 'Texto Programa&ccedil;&atilde;o';
$lang[ 'lang_info_streaming_app_android_info_instalar_app' ] = 'Bot&atilde;o Instala&ccedil;&atilde;o:';
$lang[ 'lang_info_streaming_app_android_info_instalar_app2' ] = 'Insira o c&oacute;digo acima em seu site, ao clicar, ser&aacute; aberto o app no navegador do ouvinte e ser&aacute; exibido uma mensagem para instala&ccedil;&atilde;o do app.';

} else if($dados_stm["idioma_painel"] == "en") {

$lang[ 'lang_info_streaming_app_android_tab_app_pronto' ] = 'App Preview' ;
$lang[ 'lang_info_streaming_app_android_tab_configurar_app' ] = 'Configure App' ;
$lang[ 'lang_info_streaming_app_android_info_configuracoes' ] = '1-Fill in the data below to configure your App. After the configuration the preview and installation code on your website is displayed. <br> 2-Insert the code of the installation button on your website. <br> 3-Your visitor will click on the install button and the app will be safely installed .' ;
$lang[ 'lang_info_streaming_app_android_info_desativar_campo' ] = '(leave empty to disable displaying)';
$lang[ 'lang_info_streaming_app_android_app_cor_texto' ] = 'Text Color';
$lang[ 'lang_info_streaming_app_android_app_cor_menu_claro' ] = 'Menu Color Light';
$lang[ 'lang_info_streaming_app_android_app_cor_menu_escuro' ] = 'Menu Color Dark';
$lang[ 'lang_info_streaming_app_android_app_cor_splash' ] = 'Splash Color';
$lang[ 'lang_info_streaming_app_android_app_historia' ] = 'Text Radio Story';
$lang[ 'lang_info_streaming_app_android_app_programacao' ] = 'Text Radio Schedules';
$lang[ 'lang_info_streaming_app_android_info_instalar_app' ] = 'Install Button:';
$lang[ 'lang_info_streaming_app_android_info_instalar_app2' ] = 'Add the code above on your website, when clicking, it will be open the app in the listener\'s browser and a message is displayed to install the app.';

} else {

$lang[ 'lang_info_streaming_app_android_tab_app_pronto' ] = 'Vista Previa App' ;
$lang[ 'lang_info_streaming_app_android_tab_configurar_app' ] = 'Configurar App' ;
$lang[ 'lang_info_streaming_app_android_info_configuracoes' ] = '1-Complete los datos a continuaci&oacute;n para crear su aplicaci&oacute;n. Despu&eacute;s de la configuraci&oacute;n se mostrar&aacute; la previa y el c&oacute;digo de instalaci&oacute;n en su sitio web.<br>2-A&ntilde;ade el c&oacute;digo del bot&oacute;n de instalaci&oacute;n en su sitio web.<br>3-Su visitante har&aacute; clic en el bot&oacute;n de instalaci&oacute;n y se agregar&aacute; la aplicaci&oacute;n.' ;
$lang[ 'lang_info_streaming_app_android_info_desativar_campo' ] = '(deje este campo en blanco para deshabilitarlo)';
$lang[ 'lang_info_streaming_app_android_app_cor_texto' ] = 'Color Texto';
$lang[ 'lang_info_streaming_app_android_app_cor_menu_claro' ] = 'Color Menu Claro';
$lang[ 'lang_info_streaming_app_android_app_cor_menu_escuro' ] = 'Color Menu Oscuro';
$lang[ 'lang_info_streaming_app_android_app_cor_splash' ] = 'Color Inicio(Splash)';
$lang[ 'lang_info_streaming_app_android_app_historia' ] = 'Texto Historial';
$lang[ 'lang_info_streaming_app_android_app_programacao' ] = 'Texto Programaci&oacute;n';
$lang[ 'lang_info_streaming_app_android_info_instalar_app' ] = 'Botón de Instalación:';
$lang[ 'lang_info_streaming_app_android_info_instalar_app2' ] = 'A&ntilde;ade el c&oacute;digo anterior en su sitio web, al hacer clic, abra la aplicaci&oacute;n en el navegador del oyente y se muestra un mensaje para instalar la aplicaci&oacute;n.';

}
?>
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
  <title>Streaming <?php echo $dados_stm["login"]; ?></title>
  <link rel="stylesheet" href="/inc/materialdesignicons.min.css">
  <link rel="stylesheet" href="/inc/font-awesome.min.css">
  <link rel="stylesheet" href="/inc/vendor.bundle.base.css">
  <link rel="stylesheet" href="/inc/vendor.bundle.addons.css">  
  <?php if($dados_stm["tema_dark"] == "sim") { ?>
  <link rel="stylesheet" href="/inc/theme-dark.css">
  <?php } else { ?>
  <link rel="stylesheet" href="/inc/theme.css">
  <?php } ?>
  <link rel="shortcut icon" href="/img/favicon.ico" />
  <script type="text/javascript" src="/inc/ajax-streaming.js"></script>
  <script type="text/javascript" src="/inc/javascript.js"></script>
</head>
<body>
  <div class="container-scroller">
    <nav class="navbar col-lg-12 col-12 p-0 fixed-top d-flex flex-row">
      <div class="text-center navbar-brand-wrapper d-flex align-items-center justify-content-center">
        <?php if($dados_revenda["url_logo"]) { ?>
        <a class="navbar-brand brand-logo" href="/dashboard"><img id="logo" src="<?php echo $dados_revenda["url_logo"]; ?>" title="Painel" height="60" border="0"></a>
        <?php } else { ?>
        <a class="navbar-brand brand-logo" href="/dashboard"><span>Painel Streaming</span></a>
        <?php } ?>
        <a class="navbar-brand brand-logo-mini" href="/dashboard"><i class="fa fa-video-camera text-muted"></i></a>
      </div>
      <div class="navbar-menu-wrapper d-flex align-items-center justify-content-end justify-content-lg-start">
        <button class="navbar-toggler navbar-toggler align-self-center" type="button" data-toggle="minimize">
          <span class="mdi mdi-menu text-icones"></span>
        </button>
        <ul class="navbar-nav navbar-nav-right">
          <li class="nav-item nav-profile dropdown show">
            <a class="nav-link dropdown-toggle" href="#" data-toggle="dropdown" id="profileDropdown" aria-expanded="true">
              <i class="fa fa-power-off f-18 text-icones" data-toggle="tooltip" data-placement="bottom" title="<?php echo $lang['lang_botao_titulo_ligar']; ?>/<?php echo $lang['lang_botao_titulo_desligar']; ?>"></i>
            </a>
            <div class="dropdown-menu dropdown-menu-right navbar-dropdown" aria-labelledby="profileDropdown">
              <a class="dropdown-item text-success" href="javascript:ligar_streaming('<?php echo $login_code; ?>');"> <?php echo $lang['lang_botao_titulo_ligar']; ?> Streaming</a>
              <a class="dropdown-item text-warning" href="javascript:reiniciar_streaming('<?php echo $login_code; ?>');"> <?php echo $lang['lang_botao_titulo_reiniciar']; ?> Streaming</a>
              <?php if($dados_stm["srt_status"] == 'sim') { ?>
              <a class="dropdown-item text-primary" href="javascript:reiniciar_srt('<?php echo $login_code; ?>');"> <?php echo $lang['lang_botao_titulo_reiniciar']; ?> SRT</a>
              <?php } ?>
            </div>
          </li>
          <li class="nav-item dropdown">
            <a class="nav-link count-indicator dropdown-toggle d-flex align-items-center justify-content-center" id="notificationDropdown" href="#" data-toggle="dropdown" aria-expanded="false">
              <i class="mdi mdi-bell f-22 text-icones" data-toggle="tooltip" data-placement="bottom" title="<?php echo $lang['lang_info_pagina_informacoes_tab_avisos']; ?>"></i>
              <?php if($total_avisos_exibir > 0) { ?><span class="count bg-success"><?php echo $total_avisos_exibir; ?></span><?php } ?>           
            </a>
            <div class="dropdown-menu dropdown-menu-right navbar-dropdown preview-list" aria-labelledby="notificationDropdown">
              <a class="dropdown-item">
                <p class="mb-0 font-weight-normal float-left"><?php echo $lang['lang_info_pagina_informacoes_tab_avisos']; ?></p>
              </a>
              <div class="dropdown-divider"></div>
              <?php carregar_avisos_streaming($conexao,$dados_stm["porta"],$dados_servidor["codigo"]); ?>
            </div>
          </li>
          <li class="nav-item">
            <a class="nav-link" href="/sair"><i class="mdi mdi-logout f-22 text-icones" data-toggle="tooltip" data-placement="bottom" title="Sair/logout"></i></a>
          </li>
          <li>
            <button type="button" class="btn btn-info" id="status-streaming" onClick="status_streaming('<?php echo $login_code; ?>');" style="margin: 10px;min-width: 150px; min-height: 40px"><i class="fa fa-refresh"></i></button>
          </li>
        </ul>
        <button class="navbar-toggler navbar-toggler-right d-lg-none align-self-center" type="button" data-toggle="offcanvas">
          <span class="mdi mdi-menu text-icones"></span>
        </button>
      </div>
    </nav>
    <div class="container-fluid page-body-wrapper">
      <?php require_once("menu.php"); ?>
      <!-- partial -->
      <div class="main-panel">
        <div class="content-wrapper">
          <div id="local-status-acoes"><?php echo $_SESSION['status_acao'];unset($_SESSION['status_acao']); ?></div>
          <div class="row">            
            <?php if(!empty($dados_app_multi_plataforma["nome"]) && !empty($dados_app_multi_plataforma["url_logo"])) { ?>
            <div class="col-lg-12">
              <div class="card">
                  <div class="card-header">
                    <header><?php echo $lang['lang_info_streaming_app_android_tab_app_pronto']; ?></header>
                  </div>
                <div class="card-body">
                    <table width="100%" border="0" cellpadding="0" cellspacing="0">
                    <tr>
                      <td width="40%" height="400" align="center"><iframe src="https://<?php echo $url_player; ?>/player-app-multi-plataforma/<?php echo $dados_stm["login"]; ?>?app-multi=preview" style="width:300px; height:500px" frameborder="0" onmousewheel=""></iframe></td>
                      <td width="60%" align="center" style="padding:10px"><table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
                        <tr>
                          <td width="50%" height="85" align="center"><img src="https://<?php echo $url_player; ?>/app-multi-plataforma/img-instalar-app-android.png" width="150" height="48" /></td>
                          <td width="50%" align="center"><textarea name="textarea" readonly="readonly" style="width:95%; height:70px;font-size:10px" onmouseover="this.select()"><a href="https://<?php echo $url_player; ?>/player-app-multi-plataforma/<?php echo $dados_stm["login"]; ?>" target="_blank"><img src="https://<?php echo $url_player; ?>/app-multi-plataforma/img-instalar-app-android.png" width="150" height="48" /></a></textarea></td>
                        </tr>
                        <tr>
                          <td height="85" align="center"><img src="https://<?php echo $url_player; ?>/app-multi-plataforma/img-instalar-app-iphone.png" width="150" height="48" /></td>
                          <td align="center"><textarea name="textarea" readonly="readonly" style="width:95%; height:70px;font-size:10px" onmouseover="this.select()"><a href="https://<?php echo $url_player; ?>/player-app-multi-plataforma/<?php echo $dados_stm["login"]; ?>" target="_blank"><img src="https://<?php echo $url_player; ?>/app-multi-plataforma/img-instalar-app-iphone.png" width="150" height="48" /></a></textarea></td>
                        </tr>
                        <tr>
                          <td height="85" align="center"><img src="https://<?php echo $url_player; ?>/app-multi-plataforma/img-instalar-app-windows.png" width="150" height="48" /></td>
                          <td align="center"><textarea name="textarea" readonly="readonly" style="width:95%; height:70px;font-size:10px" onmouseover="this.select()"><a href="https://<?php echo $url_player; ?>/player-app-multi-plataforma/<?php echo $dados_stm["login"]; ?>" target="_blank"><img src="https://<?php echo $url_player; ?>/app-multi-plataforma/img-instalar-app-windows.png" width="150" height="48" /></a></textarea></td>
                        </tr>
                        <tr>
                          <td height="70" align="center"><img src="http://chart.apis.google.com/chart?cht=qr&chs=120x120&chl=https://<?php echo $url_player; ?>/player-app-multi-plataforma/<?php echo $dados_stm["login"]; ?>" /></td>
                          <td align="center"><textarea name="textarea" readonly="readonly" style="width:95%; height:60px;font-size:10px" onmouseover="this.select()"><img src="http://chart.apis.google.com/chart?cht=qr&chs=200x200&chl=https://<?php echo $url_player; ?>/player-app-multi-plataforma/<?php echo $dados_stm["login"]; ?>" /></textarea></td>
                        </tr>
                        <tr>
                          <td height="60" colspan="2" align="center" class="texto_padrao"><?php echo $lang['lang_info_streaming_app_android_info_instalar_app2']; ?></td>
                          </tr>
                      </table></td>
                    </tr>
                  </table>
                </div>
              </div>
            </div>     
            <?php } ?>

            <div class="col-lg-12">
              <div class="card">
                  <div class="card-header">
                    <header><?php echo $lang['lang_info_streaming_app_android_tab_configurar_app']; ?></header>
                  </div>
                <div class="card-body">
                    <form method="post" action="/app-multi-plataforma" style="padding:0px; margin:0px" enctype="multipart/form-data">
                    <div class="alert alert-info text-center" role="alert" style="text-align: left!important"><?php echo $lang['lang_info_streaming_app_android_info_configuracoes']; ?></div>
                     <table width="100%" border="0" cellpadding="0" cellspacing="0">
                     <tr>
                      <td width="20%" height="55" class="texto_padrao_destaque"><?php echo $lang['lang_info_streaming_app_android_tv_nome']; ?></td>
                      <td width="80%" class="texto_padrao_pequeno">
                        <input name="nome" type="text" id="nome" class="form-control" value="<?php echo $dados_app_multi_plataforma["nome"]; ?>" /></td>
                    </tr>
                    <tr>
                      <td width="20%" height="50" class="texto_padrao_destaque">E-mail</td>
                      <td width="80%" class="texto_padrao_pequeno">
                        <input name="email" type="text" id="email" class="form-control" value="<?php echo $dados_app_multi_plataforma["email"]; ?>" />
                        <small><?php echo $lang['lang_info_streaming_app_android_info_desativar_campo']; ?></small>
                        </td>
                    </tr>
                    <tr>
                      <td width="20%" height="50" class="texto_padrao_destaque">Site</td>
                      <td width="80%" class="texto_padrao_pequeno">
                        <input name="url_site" type="text" id="url_site" class="form-control" value="<?php echo $dados_app_multi_plataforma["url_site"]; ?>" />
                        <small><?php echo $lang['lang_info_streaming_app_android_info_desativar_campo']; ?></small></td>
                    </tr>
                    <tr>
                      <td width="20%" height="50" class="texto_padrao_destaque">FaceBook</td>
                      <td width="80%" class="texto_padrao_pequeno">
                        <input name="url_facebook" type="text" id="url_facebook" class="form-control" value="<?php echo $dados_app_multi_plataforma["url_facebook"]; ?>" />
                        <small><?php echo $lang['lang_info_streaming_app_android_info_desativar_campo']; ?></small></td>
                    </tr>
                    <tr>
                      <td width="20%" height="50" class="texto_padrao_destaque">Twitter</td>
                      <td width="80%" class="texto_padrao_pequeno">
                        <input name="url_twitter" type="text" id="url_twitter" class="form-control" value="<?php echo $dados_app_multi_plataforma["url_twitter"]; ?>" />
                        <small><?php echo $lang['lang_info_streaming_app_android_info_desativar_campo']; ?></small></td>
                    </tr>    
                    <tr>
                      <td width="20%" height="50" class="texto_padrao_destaque">Instagram</td>
                      <td width="80%" class="texto_padrao_pequeno">
                        <input name="url_instagram" type="text" id="url_instagram" class="form-control" value="<?php echo $dados_app_multi_plataforma["url_instagram"]; ?>" />
                        <small><?php echo $lang['lang_info_streaming_app_android_info_desativar_campo']; ?></small></td>
                    </tr> 
                    <tr>
                      <td width="20%" height="50" class="texto_padrao_destaque">Canal YouTube</td>
                      <td width="80%" class="texto_padrao_pequeno">
                        <input name="url_youtube" type="text" id="url_youtube" class="form-control" value="<?php echo $dados_app_multi_plataforma["url_youtube"]; ?>" />
                        <small><?php echo $lang['lang_info_streaming_app_android_info_desativar_campo']; ?></small></td>
                    </tr>
                    <tr>
                      <td width="20%" height="50" class="texto_padrao_destaque">WhatsApp</td>
                      <td width="80%" class="texto_padrao_pequeno">
                        <input name="whatsapp" type="text" id="whatsapp" class="form-control" value="<?php echo $dados_app_multi_plataforma["whatsapp"]; ?>" />
                        <small>+00 00000000000 <?php echo $lang['lang_info_streaming_app_android_info_desativar_campo']; ?></small>
                        </td>
                    </tr>
                    <tr>
                      <td width="20%" height="100" class="texto_padrao_destaque"><?php echo $lang['lang_info_streaming_app_android_app_programacao']; ?></td>
                      <td width="80%" class="texto_padrao_pequeno"><textarea name="text_prog" id="text_prog" class="form-control" rows="5"><?php echo $dados_app_multi_plataforma["text_prog"]; ?></textarea></td>
                    </tr>
                    <tr>
                      <td width="20%" height="100" class="texto_padrao_destaque"><?php echo $lang['lang_info_streaming_app_android_app_historia']; ?></td>
                      <td width="80%" class="texto_padrao_pequeno"><textarea name="text_hist" id="text_hist" class="form-control" rows="5"><?php echo $dados_app_multi_plataforma["text_hist"]; ?></textarea></td>
                    </tr>
                    <tr>
                      <td width="20%" height="50" class="texto_padrao_destaque">Modulo Chat</td>
                      <td width="80%" class="texto_padrao_pequeno"><input name="ativar_chat" type="checkbox" value="sim" <?php if($dados_app_multi_plataforma["url_chat"]) { echo ' checked="checked"'; } ?> />
                        <input name="url_chat" type="hidden" id="url_chat" value="<?php echo "/app-multi-plataforma/chat/".$dados_stm["login"].""; ?>" /></td>
                    </tr>
                    <tr>
                      <td height="50" class="texto_padrao_destaque"><?php echo $lang['lang_info_streaming_app_android_app_cor_texto']; ?></td>
                      <td class="texto_padrao_pequeno">
                        <input type="color" name="cor_texto" style="width:100px; height:30px" value="<?php echo $dados_app_multi_plataforma['cor_texto']; ?>" /></td>
                    </tr>
                    <tr>
                      <td height="50" class="texto_padrao_destaque"><?php echo $lang['lang_info_streaming_app_android_app_cor_menu_claro']; ?></td>
                      <td class="texto_padrao_pequeno">
                        <input type="color" name="cor_menu_claro" style="width:100px; height:30px" value="<?php echo $dados_app_multi_plataforma['cor_menu_claro']; ?>" /></td>
                    </tr>
                    <tr>
                      <td height="50" class="texto_padrao_destaque"><?php echo $lang['lang_info_streaming_app_android_app_cor_menu_escuro']; ?></td>
                      <td class="texto_padrao_pequeno">
                        <input type="color" name="cor_menu_escuro" style="width:100px; height:30px" value="<?php echo $dados_app_multi_plataforma['cor_menu_escuro']; ?>" /></td>
                    </tr>
                    <tr>
                      <td height="50" class="texto_padrao_destaque"><?php echo $lang['lang_info_streaming_app_android_app_cor_splash']; ?></td>
                      <td class="texto_padrao_pequeno">
                        <input type="color" name="cor_splash" style="width:100px; height:30px" value="<?php echo $dados_app_multi_plataforma['cor_splash']; ?>" /></td>
                    </tr>
                    <tr>
                      <td width="20%" height="50" class="texto_padrao_destaque">Logo</td>
                      <td width="80%" class="texto_padrao_pequeno"><input name="logo" type="file" id="logo" class="form-control" />
                        <br />PNG / 300x300</td>
                    </tr>
                    <tr>
                      <td height="50" class="texto_padrao_destaque">Background</td>
                      <td class="texto_padrao_pequeno"><input name="fundo" type="file" id="fundo" class="form-control" />
                        <br />JPG / 640x1136</td>
                    </tr>
                    <?php if(empty($dados_app_multi_plataforma["nome"])) { ?>
                          <tr>
                            <td height="40" colspan="2" align="center"><button type="submit" class="btn btn-info"><?php echo $lang['lang_info_streaming_app_android_botao_submit']; ?></button><input name="acao_form" type="hidden" id="acao_form" value="criar" /></td>
                          </tr>
                    <?php } else { ?>
                       <tr>
                            <td height="40" colspan="2" align="center"><button type="submit" class="btn btn-info"><?php echo $lang['lang_botao_titulo_alterar_config']; ?></button><input name="acao_form" type="hidden" id="acao_form" value="configurar" /></td>
                          </tr>
                    <?php } ?>
                  </table>
                  </form>
                </div>
              </div>
            </div>          

          </div>
        </div>
      </div>
      <!-- modal -->
      <div class="modal fade" id="avisos" tabindex="-1" role="dialog" aria-hidden="true">
        <div class="modal-dialog" role="document">
            <div class="modal-content">
                <div class="modal-header">
                    <h5 class="modal-title"><?php echo $lang['lang_info_pagina_informacoes_tab_avisos']; ?></h5>
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                </div>
                <div class="modal-body" id="avisos-conteudo"><img src="/img/ajax-loader.gif" align="center" /></div>
            </div>
        </div>
        </div>
                
        <div class="modal fade" id="log-sistema" tabindex="-1" role="dialog" aria-hidden="true">
        <div class="modal-dialog modal-dialog-centered" role="document">
            <div class="modal-content">
                <div class="modal-body" id="log-sistema-conteudo" style="text-align:center"><img src="/img/ajax-loader.gif" /></div>
            </div>
        </div>
      </div>
    </div>
  </div>
  <script src="/inc/vendor.bundle.base.js"></script>
  <script src="/inc/vendor.bundle.addons.js"></script>
  <script src="/inc/theme.js"></script>
  <script>
  status_streaming('<?php echo $login_code; ?>');
  setInterval("status_streaming('<?php echo $login_code; ?>')",60000);
  </script>
</body>
</html>