</div> <div class="form-group"> <label for="ordem" class="col-sm-2 control-label">Ordem</label> <div class="col-sm-2"> <input class="form-control" name="ordem" id="ordem" type="number"> </div> </div> <div class="form-group"> <label for="ativo" class="col-sm-2 control-label">Ativo</label> <div class="col-sm-4"> <input id="ativo" name="ativo" type="checkbox" /> </div> </div> </fieldset> </form> </div> </div> <?php if (isset($_GET['item'])) { $quemSomos = ConfiguracaoController::getConfiguracaoMultipla("quem-somos", $_GET['item']); echo "\t<script>\n\t\t\t\t\t\$('#item').val('" . $quemSomos["quem-somos-p"]->Item . "');\n\t\t\t\t\t\$('#texto').val('" . addslashes($quemSomos["quem-somos-p"]->Valor) . "');\n\t\t\t\t\t\$('#ordem').val('" . $quemSomos["quem-somos-p"]->Ordem . "');\n \$('#" . $quemSomos["quem-somos-p"]->Aux . "').attr('checked', true);\n \$('#" . $quemSomos["quem-somos-p"]->Aux . "').parent().addClass('active');\n \$('#ordem').val('" . $quemSomos["quem-somos-p"]->Ordem . "');\n \t\t\t\t " . ($quemSomos["quem-somos-p"]->Ativo == '1' ? "\$('#ativo').attr('checked', true);" : "") . "\n\t\t\t\t\t\$('#subtitle').text('/ Editar parágrafo');\n\t\t\t\t</script>"; } else { echo "\t<script>\n\t\t\t\t\t\$('#next-item').val('" . ConfiguracaoController::getNextItem("quem-somos") . "');\n\t\t\t\t\t// default align: justify\n\t\t\t\t\t\$('#justify').attr('checked', true);\n\t\t\t\t\t\$('#justify').parent().addClass('active');\n\t\t\t\t</script>"; } include "helper/rodape.php";
</form> </div> </div> <script> $("#div-background .remove").click(function(){ $("#delete-background").val("1"); }); $("#botao").change(function(){ if ($(this).val() == 0) { $("#botao-texto").hide(); } else { $("#botao-texto").show(); } $(".div-botao").hide(); $("#div-botao-" + $(this).val()).show(); }); </script> <?php if (isset($_GET['item'])) { $topoHome = ConfiguracaoController::getConfiguracaoMultipla("topo-home", $_GET['item']); echo "\t<script>\n\t\t\t\t\t\$('#item').val('" . $topoHome["topo-home-titulo"]->Item . "');\n\t\t\t\t\t" . ($topoHome["topo-home-background"]->Valor != "" ? "\t\$('#background').val('" . $topoHome["topo-home-background"]->Valor . "');\n\t\t\t\t\t\t\t\$('#div-background .fileinput-preview').html('<img src=\"img/topo-home/" . $topoHome["topo-home-background"]->Valor . "\">');\n\t\t\t\t\t\t\t\$('#div-background .fileinput-new').hide();\n\t\t\t\t\t\t\t\$('#div-background .fileinput-exists').show();" : "") . "\t\t \n\t\t\t\t\t\$('#titulo').val('" . addslashes($topoHome["topo-home-titulo"]->Valor) . "');\t\t\t\t\t\n\t\t\t\t\t\$('#texto').val('" . addslashes($topoHome["topo-home-texto"]->Valor) . "');\n \$('#acao-botao').val('" . addslashes($topoHome["topo-home-acao-botao"]->Valor) . "');\n\t\t\t\t \$('#ordem').val('" . $topoHome["topo-home-titulo"]->Ordem . "');\n\t\t\t\t " . ($topoHome["topo-home-titulo"]->Ativo == '1' ? "\$('#ativo').attr('checked', true);" : "") . "\n\t\t\t\t\t// texto botão\n\t\t\t\t\t" . (!empty($topoHome["topo-home-botao"]->Valor) ? "\t\$('#botao-texto').show();\n\t\t\t\t\t\t\t\$('#botao-texto').val('" . addslashes($topoHome["topo-home-botao"]->Valor) . "');" : "") . "\n\t\t\t\t\t// ação botão\n\t\t\t\t\t" . ($topoHome["topo-home-botao-acao"]->Aux == "scroll" ? "\t\$('#div-botao-scroll').show();\n\t\t\t\t\t\t\t\$('#botao').val('scroll');\n\t\t\t\t\t\t\t\$('#botao-scroll').val('" . addslashes($topoHome["topo-home-botao-acao"]->Valor) . "');" : "") . "\n\t\t\t\t\t" . ($topoHome["topo-home-botao-acao"]->Aux == "same" || $topoHome["topo-home-botao-acao"]->Aux == "blank" ? "\t\$('#div-botao-link').show();\n\t\t\t\t\t\t\t\$('#botao').val('link');\n\t\t\t\t\t\t\t\$('#botao-link').val('" . addslashes($topoHome["topo-home-botao-acao"]->Aux) . "');\n\t\t\t\t\t\t\t\$('#link').val('" . addslashes($topoHome["topo-home-botao-acao"]->Valor) . "');" : "") . "\n\t\t\t\t\t//\n\t\t\t\t\t\$('#subtitle').text('/ Editar topo');\n\t\t\t\t</script>"; } else { echo "\t<script>\n\t\t\t\t\t\$('#next-item').val('" . ConfiguracaoController::getNextItem("topo-home") . "');\n\t\t\t\t</script>"; } include "helper/rodape.php";
<label for="ativo" class="col-sm-2 control-label">Ativo</label> <div class="col-sm-4"> <input id="ativo" name="ativo" type="checkbox" /> </div> </div> </fieldset> </form> </div> </div> <script> $("#div-foto .remove").click(function(){ $("#delete-foto").val("1"); }); $("#div-logo .remove").click(function(){ $("#delete-logo").val("1"); }); </script> <?php if (isset($_GET['item'])) { $depoimento = ConfiguracaoController::getConfiguracaoMultipla("depoimento", $_GET['item']); echo "\t<script>\n\t\t\t\t\t\$('#item').val('" . $depoimento["depoimento-titulo"]->Item . "');\n\t\t\t\t\t" . ($depoimento["depoimento-foto"]->Valor != "" ? "\t\$('#foto').val('" . $depoimento["depoimento-foto"]->Valor . "');\n\t\t\t\t\t\t\t\$('#div-foto .fileinput-preview').html('<img src=\"img/depoimentos/" . $depoimento["depoimento-foto"]->Valor . "\">');\n\t\t\t\t\t\t\t\$('#div-foto .fileinput-new').hide();\n\t\t\t\t\t\t\t\$('#div-foto .fileinput-exists').show();" : "") . "\n\t\t\t\t\t\$('#titulo').val('" . addslashes($depoimento["depoimento-titulo"]->Valor) . "');\n\t\t\t\t\t\$('#subtitulo').val('" . addslashes($depoimento["depoimento-subtitulo"]->Valor) . "');\n\t\t\t\t\t\$('#texto').val('" . addslashes($depoimento["depoimento-texto"]->Valor) . "');\n\t\t\t\t\t" . ($depoimento["depoimento-logo"]->Valor != "" ? "\t\$('#logo').val('" . $depoimento["depoimento-logo"]->Valor . "');\n\t\t\t\t\t\t\t\$('#div-logo .fileinput-preview').html('<img src=\"img/depoimentos/" . $depoimento["depoimento-logo"]->Valor . "\">');\n\t\t\t\t\t\t\t\$('#div-logo .fileinput-new').hide();\n\t\t\t\t\t\t\t\$('#div-logo .fileinput-exists').show();" : "") . "\n\t\t\t\t \$('#ordem').val('" . $depoimento["depoimento-titulo"]->Ordem . "');\t\t\t \n\t\t\t\t " . ($depoimento["depoimento-titulo"]->Ativo == '1' ? "\$('#ativo').attr('checked', true);" : "") . "\n\t\t\t\t\t\$('#subtitle').text('/ Editar depoimento');\n\t\t\t\t</script>"; } else { echo "\t<script>\n\t\t\t\t\t\$('#next-item').val('" . ConfiguracaoController::getNextItem("depoimento") . "');\n\t\t\t\t</script>"; } include "helper/rodape.php";