Fork de milfs para hacer limpieza de algunas cosas
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

348 lines
13KB

  1. <?php session_start();
  2. $timestamp=time();
  3. setcookie("timestamp",$timestamp,($timestamp + 5000));
  4. $_SESSION['timestamp']= $timestamp;
  5. if($_SESSION['grupo'] != "administrador") {
  6. // header("Location: ../");
  7. }
  8. if(isset($_REQUEST['debug'])) {ini_set('display_errors', 'On');}
  9. require ('xajax/xajax.inc.php');
  10. $xajax = new xajax();
  11. //$xajax = new xajax("https://tupale.co/milfs/index.php");
  12. include ('librerias/parsedown/Parsedown.php');
  13. require ('funciones/funciones.php');
  14. //require ('funciones/convert.php');
  15. require ('funciones/login.php');
  16. require ("includes/markdown.php");
  17. require ("includes/simple_html_dom.php");
  18. require ("funciones/conex.php");
  19. $xajax->processRequests();
  20. $embebido =0;
  21. if (isset($_REQUEST['form'])) {
  22. $form = $_REQUEST['form'];
  23. $opciones["formato"]= $_REQUEST['formato'];
  24. } else {$form = "";}
  25. if($form !='') {$embebido = 1;}
  26. if (isset($_REQUEST['identificador'])) {$identificador = $_REQUEST['identificador'];} else {$identificador = "";}
  27. if($identificador !='') {$embebido = 1;}
  28. if (isset($_REQUEST['id'])) {$id = $_REQUEST['id'];} else {$id = "";}
  29. if (isset($_REQUEST['campo'])) {$campo = $_REQUEST['campo'];} else {$campo = "";}
  30. if (isset($_REQUEST['consulta'])) {$consulta = $_REQUEST['consulta'];} else {$consulta = "";}
  31. if (isset($_REQUEST['t'])) {$t = $_REQUEST['t'];} else {$t = "";}
  32. ?>
  33. <!DOCTYPE html>
  34. <html lang="es">
  35. <head >
  36. <meta charset="utf-8">
  37. <meta name="viewport" content="user-scalable=no, width=device-width, maximum-scale=1, initial-scale=1">
  38. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  39. <meta name="viewport" content="width=device-width, initial-scale=1">
  40. <meta name="description" content="">
  41. <?php
  42. $xajax->printJavascript("xajax/");
  43. if(!isset($_REQUEST['experimental'])){
  44. $bootstrap= "
  45. <script
  46. src='https://code.jquery.com/jquery-3.3.1.min.js'
  47. integrity='sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8='
  48. crossorigin='anonymous'></script>
  49. <script src='https://code.jquery.com/jquery-3.3.1.slim.min.js' integrity='sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo' crossorigin='anonymous'></script>
  50. <script src='https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js' integrity='sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1' crossorigin='anonymous'></script>
  51. <script src='https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js' integrity='sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM' crossorigin='anonymous'></script>
  52. <link rel='stylesheet' href='https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css' integrity='sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T' crossorigin='anonymous'>
  53. <link href='https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css' rel='stylesheet'>
  54. ";
  55. }else{
  56. $bootstrap="
  57. <script src='../librerias/jquery/jquery-2.1.4.min.js'></script>
  58. <script src='../librerias/bootstrap/js/bootstrap.min.js'></script>
  59. <link href='../librerias/bootstrap/css/bootstrap.min.css' rel='stylesheet' type='text/css'>
  60. ";
  61. }
  62. // $xajax->debugOn();
  63. //$xajax->statusMessagesOn();
  64. ?>
  65. <link rel="shortcut icon" href="favicon-152.png">
  66. <link rel="apple-touch-icon-precomposed" href="favicon-152.png">
  67. <!-- <link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css" rel="stylesheet" integrity="sha256-k2/8zcNbxVIh5mnQ52A0r3a6jAgMGxFJFE2707UxGCk= sha512-ZV9KawG2Legkwp3nAlxLIVFudTauWuBpC10uEafMHYL0Sarrz5A7G79kXh5+5+woxQ5HM559XX2UZjMJ36Wplg==" crossorigin="anonymous"> -->
  68. <?php if($form !='') {
  69. //echo "<link href='css/embebidoXXX.css' rel='stylesheet'>";
  70. }else{
  71. //echo "<link href='css/estilos.php?dd' rel='stylesheet'>";
  72. } ?>
  73. <link rel="stylesheet" type="text/css" media="screen" href="css/milfs.css">
  74. <link rel="stylesheet" type="text/css" media="screen" href="css/bootstrap.css">
  75. <link rel="stylesheet" type="text/css" media="screen" href="css/bootstrap-markdown.css">
  76. <link rel="stylesheet" type="text/css" media="screen" href="css/bootstrap-markdown.min.css">
  77. <style>
  78. #map {width: 500px;height:200px;}
  79. </style>
  80. <title>I<3MILFS</title>
  81. <?php
  82. if($id !=''){$onload ="<script type=\"text/javascript\"> xajax_formulario_listado('','contenido','$id')</script>";}
  83. elseif($campo !=''){$onload ="<script type=\"text/javascript\"> xajax_formulario_crear_campo('','$campo','contenido')</script>";}
  84. elseif($consulta !=''){$onload ="<script type=\"text/javascript\"> xajax_consultar_formulario('$consulta','','','modal')</script>";}
  85. else{}
  86. if( isset($_REQUEST['psi'])){$onload ="<script type=\"text/javascript\"> xajax_mostrar_psi()</script>";}
  87. ?>
  88. <!-- <script src="js/jquery.min.js"></script>
  89. <script src="js/bootstrap.js"></script> -->
  90. <!-- <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script> -->
  91. <script src="js/jquery-2.1.4.min.js"></script>
  92. <!-- UPLOAD -->
  93. <script src="plugins/upload/js/vendor/jquery.ui.widget.js"></script>
  94. <script src="plugins/upload/js/jquery.iframe-transport.js"></script>
  95. <script src="plugins/upload/js/jquery.fileupload.js"></script>
  96. <!-- The Load Image plugin is included for the preview images and image resizing functionality -->
  97. <script src="plugins/upload/js/load-image.all.min.js"></script>
  98. <!-- The Canvas to Blob plugin is included for image resizing functionality -->
  99. <script src="plugins/upload/js/canvas-to-blob.min.js"></script>
  100. <script src="plugins/upload/js/jquery.fileupload-process.js"></script>
  101. <script src="plugins/upload/js/jquery.fileupload-image.js"></script>
  102. <script src="plugins/upload/js/jquery.fileupload-audio.js"></script>
  103. <script src="plugins/upload/js/jquery.fileupload-video.js"></script>
  104. <script src="plugins/upload/js/jquery.fileupload-validate.js"></script>
  105. <link rel="stylesheet" href="plugins/upload/css/jquery.fileupload.css">
  106. <!-- <link rel="stylesheet" href="plugins/upload/css/style.css"> -->
  107. <!-- JavaScript used to call the fileupload widget to upload files -->
  108. <!-- UPLOAD -->
  109. <!-- <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js"></script> -->
  110. <script src="../librerias/bootstrap/js/bootstrap.min.js" ></script>
  111. <script src="js/markdown.js"></script>
  112. <script src="js/to-markdown.js"></script>
  113. <script src="js/bootstrap-markdown.js"></script>
  114. <script src="js/scripts.js"></script>
  115. <!-- include codemirror (codemirror.css, codemirror.js, xml.js, formatting.js) -->
  116. <link rel="stylesheet" type="text/css" href="../librerias/codemirror/codemirror.css">
  117. <link rel="stylesheet" type="text/css" href="../librerias/codemirror/monokai.css">
  118. <script type="text/javascript" src="../librerias/codemirror/codemirror.js"></script>
  119. <script type="text/javascript" src="../librerias/codemirror/xml.js"></script>
  120. <script type="text/javascript" src="../librerias/codemirror/formatting.js"></script>
  121. <!-- wysiwyg -->
  122. <script src="../librerias/summernote/summernote.js"></script>
  123. <!-- include summernote css/js-->
  124. <link href="../librerias/summernote/summernote.css" rel="stylesheet">
  125. <script type="text/javascript">
  126. //Recoger elemento arrastrable//
  127. function evdragstart(ev,el) { //ev= el evento, el=elemento arrastrado.
  128. cont1=el.parentNode; //guardamos el elemento padre del elemento en una variable.
  129. ev.dataTransfer.setData("text",ev.target.id); //guardamos datos del elemento.
  130. }
  131. //mientras se arrastra:
  132. function evdragover (ev) { //ev=el evento.
  133. ev.preventDefault(); //quitar comportamiento por defecto.
  134. }
  135. //Al soltar el elemento arrastrado
  136. function evdrop(ev,el) { //ev=el evento; el=receptor de soltado
  137. ev.stopPropagation(); //impedir otras acciones
  138. ev.preventDefault(); //quitar comportamiento por defecto
  139. var data=ev.dataTransfer.getData("text"); //recogemos datos del elemento
  140. mielem=ev.target.appendChild(document.getElementById(data)); //obtenemos el elemento arrastrado
  141. cont1.appendChild(mielem); //ponemos el elemento arrastrado en el mismo sitio donde estaba.
  142. mielem2=mielem.cloneNode(true); //creamos una copia del elemento arrastrado.
  143. mielem2.setAttribute("draggable","false"); //impedimos que el nuevo elemento pueda volver a arrastrarse
  144. el.appendChild(mielem2); //colocamos la copia en el receptor de soltado
  145. }
  146. </script>
  147. <style>
  148. fieldset.fieldset-borde {
  149. border: 2px solid #EDEDED !important;
  150. border-radius:3px;
  151. padding: 0 1.4em 1.4em 1.4em !important;
  152. margin: 0 0 1.5em 0 !important;
  153. -webkit-box-shadow: 0px 0px 0px 0px #000;
  154. box-shadow: 0px 0px 0px 0px #000;
  155. }
  156. legend.legend-area {
  157. font-size: 1.2em !important;
  158. font-weight: bold !important;
  159. text-align: left !important;
  160. width:auto;
  161. padding:0 10px;
  162. border-bottom:none;
  163. }
  164. .modal-dialog {
  165. width: 95% !important;
  166. height: auto;
  167. padding: 0;
  168. }
  169. .modal-lg {
  170. width: 95% !important;
  171. height: auto;
  172. padding: 0;
  173. }
  174. .modal-content {
  175. height: auto;
  176. }
  177. .modal-body {
  178. max-height: calc(100vh - 220px);
  179. overflow-y: auto;
  180. }
  181. </style>
  182. </head>
  183. <body onload="revisarSession()"; >
  184. <?php if($embebido ==1) {
  185. if($form!=''){ echo formulario_embebido($form,$opciones);}
  186. elseif($identificador !='') { echo mostrar_identificador($identificador,$id);}
  187. //elseif($_REQUEST['psi'] !='') { include("psi.php") ; echo $aviso;}
  188. else{}
  189. }else{
  190. ?>
  191. <?php echo @$onload; ?>
  192. <?php
  193. if ( isset ( $_SESSION['id'] ) ) { ?>
  194. <div class="navbar navbar-inverse navbar-fixed-top " id="barra_milfs" role="navigation">
  195. <div class="container-fluid">
  196. <!-- Brand and toggle get grouped for better mobile display -->
  197. <div class="navbar-header">
  198. <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target=".navbar-collapse">
  199. <span class="sr-only">MILFS</span>
  200. <span class="icon-bar"></span>
  201. <span class="icon-bar"></span>
  202. <span class="icon-bar"></span>
  203. </button>
  204. <a class="navbar-brand" href="#"><img src="favicon-152.png" style="width:60px" alt="MILFS" title="Multi Interactive Light Form System"></a>
  205. </div>
  206. <?php echo milfs() ?>
  207. </div><!-- /.container-fluid -->
  208. </div>
  209. <?php }else{ } ?>
  210. <div id='debug'></div>
  211. <div class='container' id='contenedor_principal'>
  212. <div id='contenido'>
  213. <div class='row'>
  214. <div id='' class='col-sm-6'>
  215. <?php if(isset($_SESSION['id'])){ echo "
  216. <form id='manejo_sesion' name='form_session' class='navbar-form navbar-left'>
  217. <div class='input-group'>
  218. <input type='text' name='tiempo_session' size='18' class='form-control input-sm' readonly>
  219. <span class='input-group-addon'><a href='#' onclick=\"location.reload();\" title='Renovar'><span class='glyphicon glyphicon-refresh' aria-hidden='true'></span></a></span>
  220. </div>
  221. </form> "; } ?>
  222. <?php
  223. ///echo adjuntar_basico('33');
  224. if(!isset($_SESSION['id_empresa'])) {$id_empresa_portada='1';} else{$id_empresa_portada = $_SESSION['id_empresa'];}
  225. $encabezado = empresa_datos("$id_empresa_portada",'encabezado');
  226. $pie = empresa_datos("$id_empresa_portada",'pie');
  227. echo "$encabezado";
  228. //if(isset($_SESSION['id_empresa'])) {$id_empresa_portada='1'; echo panel_aplicaciones('1',"");}
  229. echo " </div>
  230. <div id='div_login' class='col-xs-12 col-sm-6'>";
  231. if(isset($_REQUEST['change'])){
  232. echo cambiar_password_formato("$_REQUEST[change]");
  233. }
  234. revisar_ingreso('');
  235. echo "</div>";
  236. echo $pie; ?>
  237. <img class='img-responsive center-block' src="images/logo.png" alt="MILFS">
  238. </div>
  239. </div>
  240. <!-- Modal -->
  241. <div class='modal fade ' id='muestraInfo' tabindex='-1' role='dialog' aria-labelledby='myModalLabel' aria-hidden='true'>
  242. <div class='modal-dialog' >
  243. <div class='modal-content'>
  244. <button type='button' class='close' data-dismiss='modal' aria-hidden='true'><i class='fa fa-times-circle'></i></button>
  245. <div class='modal-header' >
  246. <h4 class='modal-title' id='myModalLabel_info'><div id='titulo_modal'></div></h4>
  247. </div>
  248. <div class='modal-body'>
  249. <?php include("psi.php") ;?>
  250. <div id='muestra_form'></div>
  251. </div>
  252. <div class='modal-footer' id='pie_modal'>
  253. </div>
  254. </div>
  255. </div>
  256. </div>
  257. </div>
  258. <div class="">
  259. <div class="container">
  260. <a href='http://QWERTY.co/milfs'>&copy; MILFS Un proyecto de http://QWERTY.co</a> Se distribuye bajo licencia GPL V3
  261. <a href="?psi" target="_psi"><i class="fa fa-smile-o "></i> Políticas de privacidad y protección de datos.</a>
  262. </div>
  263. </div>
  264. <?php } ?>
  265. <script type="text/javascript">
  266. $(document).delegate('*[data-toggle="lightbox"]', 'click', function(event) {
  267. event.preventDefault();
  268. $(this).ekkoLightbox();
  269. });
  270. //// wysiwyg
  271. var edit = function() {
  272. $('.wysiwyg').summernote({height: 250, codemirror: { theme: 'default' },dialogsInBody: true});
  273. };
  274. var save = function() {
  275. var makrup = $('.wysiwyg').summernote('code');
  276. $('.wysiwyg').summernote('destroy');
  277. };
  278. $(document).ready(function() {
  279. $('.wysiwyg_auto').summernote({dialogsInBody: true});
  280. });
  281. </script>
  282. </body>
  283. </html>