Advertisement
Guest User

Untitled

a guest
Jun 17th, 2019
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.02 KB | None | 0 0
  1. <div align="center" style=" padding:2px; border-right:solid 1px;float:left; width:210px; height:auto; float:left;">
  2. <?php
  3. include '../conexao.php';
  4. $codigo = $_POST['codigo'];
  5. $gale_fotos = $_POST['gale_fotos'];
  6. $gale_status = $_POST['gale_status'];
  7.  
  8. $query = mysql_query("SELECT * FROM menu");
  9. $res = mysql_fetch_array($query);
  10.  
  11. if(isset($_POST['gale'])){
  12.  
  13. $gale_fotos = $_POST['gale_fotos'];
  14. $gale_status = $_POST['gale_status'];
  15. $update = mysql_query("UPDATE menu SET gale_fotos = '$gale_fotos', gale_status = '$gale_status'");
  16.  
  17. if($update == ''){
  18. echo "<script language='javascript'>
  19. window.alert('Erro ao Habilitar Link Galeria de Fotos!');
  20. </script>";
  21. }else{
  22. echo "<meta http-equiv='refresh' content='0; URL= menu_halitar_link.php'>
  23. <script language='javascript'>
  24. window.alert('Link Galeria de Fotos Habilitado com sucesso!');
  25. </script>";
  26. }}?>
  27.  
  28. <form name="gale" action="" method="POST" enctype="multipart/form-data">
  29. <label>Habilitar o Link Galeria de Fotos?</label><br /><br />
  30.  
  31. <label>Sim</label>
  32. <input type='radio' name='gale_fotos' value='<li><a href="<?php echo $res['dominio'];?>galeria.php" class="nav1">Galeria de Fotos</a></li><li class="divider"></li>' />
  33. <input type='hidden' name='gale_status' value='Sim' /><br />
  34.  
  35. <label>Não</label>
  36. <input type="radio" name="gale_fotos" value="" />
  37. <input type="hidden" name="gale_status" value="Não" /><br />
  38. <input type="submit" name="gale" value="Atualizar" />
  39. </form>
  40. </div>
  41.  
  42. <input id="chkCamp1" name="rad" type="radio" data-check="1" value="elemento 1"> elemento 1
  43. <input id="chkCamp2" name="rad" type="radio" data-check="2" value="elemento 2"> elemento 2
  44. <input type="text" data-view>
  45. <input type="hidden" data-hide>
  46.  
  47. $(function() {
  48. $('[data-check]').on('click', function() {
  49. var myInput = {valor: $(this).val(), id: $(this).data('check')};
  50. $('[data-view]').val(myInput.valor);
  51. $('[data-hide]').val(myInput.valor);
  52. });
  53. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement