Advertisement
yeshuadesign

post.php

Jun 11th, 2015
341
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.16 KB | None | 0 0
  1. <?php
  2.  
  3.  
  4. $acao = filter_input(INPUT_POST, 'acao', FILTER_SANITIZE_STRING);
  5.  
  6. switch($acao) {
  7. case 'form_cad':
  8. ?>
  9. <div class="retorno"></div>
  10. <form action="" name="form_cad" method="post">
  11. <div class="form-group">
  12. <label for="Capa">Enviar Capa:</label>
  13. <input type="file" name="thumb" class="form-control" placeholder="Digite seu nome">
  14.  
  15. <div class="form-group">
  16. <label for="Titulo">Titulo</label>
  17. <input type="text" name="titulo" class="form-control" placeholder="Digite um login">
  18. </div>
  19. <script type="text/javascript">
  20. tinyMCE.init({
  21. // General options
  22. mode: "specific_textareas",
  23. editor_selector: "js_editor",
  24. language: "pt",
  25. theme: "advanced",
  26. elements: 'abshosturls',
  27. relative_urls: false,
  28. remove_script_host: false,
  29. skin: "o2k7",
  30. skin_variant: "silver",
  31. plugins: "autolink,lists,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template,wordcount,advlist,autosave",
  32. theme_advanced_blockformats: "p,h2,h3,h4,pre,address",
  33. // Theme options
  34. theme_advanced_buttons1: "fullscreen,|,undo,redo,|,code,|,pastetext,|,removeformat,|,formatselect,bold,italic,underline,|,strikethrough,|,forecolor,backcolor,|,bullist,numlist,|,justifyleft,justifycenter,justifyright",
  35. theme_advanced_buttons2: "link,unlink,|,anchor,|,image,|,media,|,blockquote,|,hr,|,outdent,indent,|,charmap",
  36. theme_advanced_buttons3: "",
  37. theme_advanced_buttons4: "",
  38. theme_advanced_toolbar_location: "top",
  39. theme_advanced_toolbar_align: "center",
  40. theme_advanced_statusbar_location: "bottom",
  41. theme_advanced_resizing: false,
  42. // Example content CSS (should be your site CSS)
  43. content_css: "css/tiny.css",
  44. // Drop lists for link/image/media/template dialogs
  45. template_external_list_url: "lists/template_list.js",
  46. external_link_list_url: "lists/link_list.js",
  47. external_image_list_url: "lists/image_list.js",
  48. media_external_list_url: "lists/media_list.js",
  49. file_browser_callback: "tinyBrowser",
  50. // Style formats
  51. style_formats: [
  52. {title: 'Bold text', inline: 'b'},
  53. {title: 'Red text', inline: 'span', styles: {color: '#ff0000'}},
  54. {title: 'Red header', block: 'h1', styles: {color: '#ff0000'}},
  55. {title: 'Example 1', inline: 'span', classes: 'example1'},
  56. {title: 'Example 2', inline: 'span', classes: 'example2'},
  57. {title: 'Table styles'},
  58. {title: 'Table row 1', selector: 'tr', classes: 'tablerow1'}
  59. ],
  60. // Replace values for the template plugin
  61. template_replace_values: {
  62. username: "GLOBAL TECNO",
  63. staffid: "xxxxxx"
  64. }
  65.  
  66. setup : function(ed) {
  67. ed.onChange.add(function(ed) {
  68. tinyMCE.triggerSave();
  69. });
  70. }
  71. });
  72.  
  73. </script>
  74.  
  75.  
  76. <div class="form-group">
  77. <label for="Conteudo">Conteudo</label>
  78. <textarea class=" js_editor form-control" name="txt" id="txt" cols="108" rows="23"></textarea>
  79.  
  80. </div>
  81. <div class="form-group">
  82. <label for="Data">Data</label>
  83. <input type="text" class="form-control" name="data" value="<?php echo date('d/m/Y H:i:s');?>"/>
  84. </div>
  85. <div class="form-group">
  86. <label for="nivel">Nivel</label>
  87. <select class="form-control" name="nivel">
  88. <option value="">Escolha uma opção</option>
  89. <option value="1">Administrador</option>
  90. <option value="2">Editor</option>
  91. </select>
  92. </div>
  93. <div class="checkbox">
  94.  
  95. <p class="pull-right">
  96. <img src="img/ajax-loader.gif" class="load" alt="Carregando" style="display: none;" />
  97. <button type="submit" class="btn btn-primary">Cadastrar</button>
  98. </p>
  99. </div>
  100. </form>
  101.  
  102. <?php
  103. break;
  104. default:
  105. echo 'Nada';
  106. break;
  107. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement