Repositorio para la herramienta Tupale completo https://tupale.co
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.

600 lines
19KB

  1. <?php session_start();
  2. //ini_set('display_errors', 'On');
  3. if(isset($_REQUEST['debug'])) {ini_set('display_errors', 'On');}
  4. require ('milfs/xajax/xajax.inc.php');
  5. $xajax = new xajax();
  6. require ("milfs/funciones/conex.php");
  7. require ('milfs/funciones/funciones.php');
  8. require ("milfs/includes/markdown.php");
  9. $xajax->processRequests(); ?>
  10. <!DOCTYPE html>
  11. <html lang="en">
  12. <head >
  13. <meta http-equiv="Cache-control" content="public">
  14. <meta charset="utf-8">
  15. <meta name="viewport" content="user-scalable=no, width=device-width, maximum-scale=1, initial-scale=1">
  16. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  17. <meta name="viewport" content="width=device-width, initial-scale=1">
  18. <meta name="description" content="">
  19. <meta name="author" content="fredyrivera" >
  20. <link rel="shortcut icon" href="favicon-152.png">
  21. <link rel="apple-touch-icon-precomposed" href="favicon-152.png">
  22. <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css" integrity="sha512-dTfge/zgoMYpP7QbHy4gWMEGsbsdZeCXz7irItjcC3sPUFtf0kuFbDz/ixG7ArTxmDjLXDmezHubeNikyKGVyQ==" crossorigin="anonymous">
  23. <?php $xajax->printJavascript("xajax/"); ?>
  24. <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">
  25. <?php
  26. //$xajax->debugOn('');
  27. $embebido =0;
  28. if( isset($_REQUEST['empresa']) OR empty($_REQUEST) OR isset($_REQUEST['set']) OR isset($_REQUEST['identificador']) ) {
  29. $acceso = 0;
  30. if( @$_REQUEST['empresa'] =="") { $id_empresa = "1";}
  31. else { $id_empresa = $_REQUEST['empresa'];}
  32. $id = remplacetas('empresa','id',"$id_empresa",'id','') ;
  33. if($id[0]=="") { $id_empresa = "1";}
  34. if(!isset($_REQUEST['set'])){
  35. $titulo = remplacetas('empresa','id',"$id_empresa",'razon_social','') ;
  36. $descripcion = remplacetas('empresa','id',"$id_empresa",'slogan','') ;
  37. $background_imagen = buscar_imagen('',"","","$id_empresa");
  38. $uri_set = "";
  39. $acceso = 1;
  40. }
  41. else {
  42. $empresa = remplacetas('form_id','id',$_REQUEST['set'],'id_empresa',"") ;
  43. $id_empresa = $empresa[0];
  44. $titulo = remplacetas('form_id','id',$_REQUEST['set'],'nombre',"") ;
  45. $descripcion = remplacetas('form_id','id',$_REQUEST['set'],'descripcion',"") ;
  46. $background_imagen = buscar_imagen($_REQUEST['set'],"","","$id_empresa");
  47. $uri_set = "";
  48. $publico = remplacetas('form_id','id',$_REQUEST['set'],'publico',"") ;
  49. if($publico[0] =='1') {$acceso = 1;}
  50. }
  51. if( isset($_REQUEST['identificador'])){
  52. $empresa = remplacetas('form_datos','control',$_REQUEST['identificador'],'id_empresa',"") ;
  53. $id_empresa = $empresa[0];
  54. $form = remplacetas('form_datos','control',$_REQUEST['identificador'],'form_id',"") ;
  55. $titulo = remplacetas('form_id','id',$form['0'],'nombre',"") ;
  56. $descripcion = remplacetas('form_id','id',$form['0'],'descripcion',"") ;
  57. $background_imagen = buscar_imagen($form[0],"","","$id_empresa");
  58. $uri_set = "<a class='' href='?set=$form[0]'>$titulo[0]</a>";
  59. $publico = remplacetas('form_id','id',$form[0],'publico',"") ;
  60. if($publico[0] =='1') {$acceso = 1;}
  61. }
  62. $logo = remplacetas('empresa','id',"$id_empresa",'imagen','') ;
  63. $direccion = remplacetas('empresa','id',"$id_empresa",'direccion','') ;
  64. $telefono = remplacetas('empresa','id',"$id_empresa",'telefono','') ;
  65. $email = remplacetas('empresa','id',"$id_empresa",'email','') ;
  66. $facebook = remplacetas('empresa','id',"$id_empresa",'facebook','') ;
  67. $twitter = remplacetas('empresa','id',"$id_empresa",'twitter','') ;
  68. $razon_social = remplacetas('empresa','id',"$id_empresa",'razon_social','') ;
  69. $sigla = remplacetas('empresa','id',"$id_empresa",'sigla','') ;
  70. ?>
  71. <!-- Custom CSS -->
  72. <!-- Custom Fonts -->
  73. <link href="http://fonts.googleapis.com/css?family=Lato:300,400,700,300italic,400italic,700italic" rel="stylesheet" type="text/css">
  74. <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
  75. <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
  76. <!--[if lt IE 9]>
  77. <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
  78. <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
  79. <![endif]-->
  80. <style type="text/css">
  81. /*!
  82. * Start Bootstrap - Landing Page Bootstrap Theme (http://startbootstrap.com)
  83. * Code licensed under the Apache License v2.0.
  84. * For details, see http://www.apache.org/licenses/LICENSE-2.0.
  85. */
  86. body,
  87. html {
  88. background-color: #A4A4A4;
  89. width: 100%;
  90. height: 100%;
  91. }
  92. body,
  93. h1,
  94. h2,
  95. h3,
  96. h4,
  97. h5,
  98. h6 {
  99. font-family: "Lato","Helvetica Neue",Helvetica,Arial,sans-serif;
  100. font-weight: 700;
  101. }
  102. .topnav {
  103. font-size: 14px;
  104. }
  105. .lead {
  106. font-size: 18px;
  107. font-weight: 400;
  108. }
  109. .intro-header {
  110. padding-top: 50px; /* If you're making other pages, make sure there is 50px of padding to make sure the navbar doesn't overlap content! */
  111. padding-bottom: 50px;
  112. text-align: center;
  113. color: #f8f8f8;
  114. background: url(milfs/images/secure/?file=600/<?php echo $background_imagen; ?> ) no-repeat center center;
  115. background-size: cover;
  116. }
  117. .intro-message {
  118. position: relative;
  119. padding-top: 20%;
  120. padding-bottom: 20%;
  121. /*background: url(milfs/images/transparente50.png ) ;*/
  122. }
  123. .intro-message > h1 {
  124. margin: 0;
  125. text-shadow: 2px 2px 3px rgba(0,0,0,0.6);
  126. font-size: 5em;
  127. border-radius: 3px;
  128. background: url(milfs/images/oscuro40.png ) ;
  129. }
  130. .intro-divider {
  131. width: 400px;
  132. border-top: 1px solid #f8f8f8;
  133. border-bottom: 1px solid rgba(0,0,0,0.2);
  134. }
  135. .intro-message > h3 {
  136. text-shadow: 2px 2px 3px rgba(0,0,0,0.6);
  137. background: url(milfs/images/oscuro40.png ) ;
  138. border-radius: 3px;
  139. }
  140. @media(max-width:767px) {
  141. .intro-message {
  142. padding-bottom: 15%;
  143. }
  144. .intro-message > h1 {
  145. font-size: 3em;
  146. }
  147. ul.intro-social-buttons > li {
  148. display: block;
  149. margin-bottom: 20px;
  150. padding: 0;
  151. }
  152. ul.intro-social-buttons > li:last-child {
  153. margin-bottom: 0;
  154. }
  155. .intro-divider {
  156. width: 100%;
  157. }
  158. }
  159. .network-name {
  160. text-transform: uppercase;
  161. font-size: 14px;
  162. font-weight: 400;
  163. letter-spacing: 2px;
  164. }
  165. .content-section-a {
  166. padding: 50px 0;
  167. background-color: #f8f8f8;
  168. }
  169. .content-section-b {
  170. padding: 50px 0;
  171. border-top: 1px solid #e7e7e7;
  172. border-bottom: 1px solid #e7e7e7;
  173. }
  174. .section-heading {
  175. margin-bottom: 30px;
  176. }
  177. .section-heading-spacer {
  178. float: left;
  179. width: 200px;
  180. border-top: 3px solid #e7e7e7;
  181. }
  182. .banner {
  183. padding: 100px 0;
  184. color: #f8f8f8;
  185. background: url(../img/banner-bg.jpg) no-repeat center center;
  186. background-size: cover;
  187. }
  188. .banner h2 {
  189. margin: 0;
  190. text-shadow: 2px 2px 3px rgba(0,0,0,0.6);
  191. font-size: 3em;
  192. }
  193. .banner ul {
  194. margin-bottom: 0;
  195. }
  196. .banner-social-buttons {
  197. float: right;
  198. margin-top: 0;
  199. }
  200. @media(max-width:1199px) {
  201. ul.banner-social-buttons {
  202. float: left;
  203. margin-top: 15px;
  204. }
  205. }
  206. @media(max-width:767px) {
  207. .banner h2 {
  208. margin: 0;
  209. text-shadow: 2px 2px 3px rgba(0,0,0,0.6);
  210. font-size: 3em;
  211. }
  212. ul.banner-social-buttons > li {
  213. display: block;
  214. margin-bottom: 20px;
  215. padding: 0;
  216. }
  217. ul.banner-social-buttons > li:last-child {
  218. margin-bottom: 0;
  219. }
  220. }
  221. footer {
  222. padding: 50px 0;
  223. background-color: #f8f8f8;
  224. }
  225. p.copyright {
  226. margin: 15px 0 0;
  227. }
  228. </style>
  229. </head>
  230. <body>
  231. <!-- Navigation -->
  232. <nav class="navbar navbar-default navbar-fixed-top topnav" role="navigation">
  233. <div class="container topnav">
  234. <!-- Brand and toggle get grouped for better mobile display -->
  235. <div class="navbar-header">
  236. <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
  237. <span class="sr-only">Toggle navigation</span>
  238. <span class="icon-bar"></span>
  239. <span class="icon-bar"></span>
  240. <span class="icon-bar"></span>
  241. </button>
  242. <a class="navbar-brand topnav" href="?empresa=<?php echo $id_empresa; ?>"><i class='fa fa-home'></i> <?php echo $sigla[0]; ?></a>
  243. </div>
  244. <!-- Collect the nav links, forms, and other content for toggling -->
  245. <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
  246. <ul class="nav navbar-nav ">
  247. <li><?php echo $uri_set; ?></li>
  248. </ul>
  249. <ul class="nav navbar-nav navbar-right">
  250. <li>
  251. <a href="?ingresar">Ingresar</a>
  252. </li>
  253. </ul>
  254. </div>
  255. <!-- /.navbar-collapse -->
  256. </div>
  257. <!-- /.container -->
  258. </nav>
  259. <!-- Header -->
  260. <a name="about"></a>
  261. <div class="intro-header">
  262. <div class="container">
  263. <div class="row">
  264. <div class="col-lg-12">
  265. <div class="intro-message">
  266. <h1><?php echo $titulo[0]; ?></h1>
  267. <h3><?php echo $descripcion[0]; ?></h3>
  268. <hr class="intro-divider">
  269. <ul class="list-inline intro-social-buttons">
  270. <li>
  271. <a target='redes' href="https://twitter.com/<?php echo $twitter[0]; ?>" class="btn btn-default btn-lg"><i class="fa fa-twitter fa-fw"></i> <span class="network-name">@<?php echo $twitter[0]; ?></span></a>
  272. </li>
  273. <li>
  274. <a target='redes' href="https://github.com/humano/milfs/" class="btn btn-default btn-lg"><i class="fa fa-github fa-fw"></i> <span class="network-name">Github</span></a>
  275. </li>
  276. <li>
  277. <a target='redes' href="https://www.facebook.com/<?php echo $facebook[0]; ?>" class="btn btn-default btn-lg"><i class="fa fa-facebook fa-fw"></i> <span class="network-name"><?php echo $facebook[0]; ?></span></a>
  278. </li>
  279. </ul>
  280. </div>
  281. </div>
  282. </div>
  283. </div>
  284. <!-- /.container -->
  285. </div>
  286. <!-- /.intro-header -->
  287. <!-- Page Content -->
  288. <a name="formularios"></a>
  289. <?php
  290. if($acceso ==1) {
  291. if(isset($_REQUEST['set'])) {
  292. echo landingpage_contenido_formulario($_REQUEST['set']); }
  293. elseif(isset($_REQUEST['identificador'])) { echo landingpage_contenido_identificador($_REQUEST['identificador']); }
  294. else{ echo landingpage_contenido($id_empresa);}
  295. }
  296. ?>
  297. <a name="contact"></a>
  298. <div class="banner">
  299. <div class="container">
  300. <div class="row">
  301. <div class="col-lg-4">
  302. <h2>Conéctate:</h2>
  303. </div>
  304. <div class="col-lg-8">
  305. <ul class="list-inline banner-social-buttons">
  306. <li>
  307. <a target='redes' href="https://twitter.com/<?php echo $twitter[0]; ?>" class="btn btn-default btn-lg"><i class="fa fa-twitter fa-fw"></i> <span class="network-name">@<?php echo $twitter[0]; ?></span></a>
  308. </li>
  309. <li>
  310. <a target='redes' href="https://github.com/humano/milfs/" class="btn btn-default btn-lg"><i class="fa fa-github fa-fw"></i> <span class="network-name">Github</span></a>
  311. </li>
  312. <li>
  313. <a target='redes' href="https://www.facebook.com/<?php echo $facebook[0]; ?>" class="btn btn-default btn-lg"><i class="fa fa-facebook fa-fw"></i> <span class="network-name"><?php echo $facebook[0]; ?></span></a>
  314. </li>
  315. </ul>
  316. </div>
  317. </div>
  318. </div>
  319. <!-- /.container -->
  320. </div>
  321. <!-- /.banner -->
  322. <!-- Footer -->
  323. <footer>
  324. <div class="container">
  325. <div class="row">
  326. <div class="col-lg-12">
  327. <ul class="list-inline">
  328. <li>
  329. <a href="#">Home</a>
  330. </li>
  331. <li class="footer-menu-divider">&sdot;</li>
  332. <li>
  333. <a href="#formularios">Contenido</a>
  334. </li>
  335. <li class="footer-menu-divider">&sdot;</li>
  336. <li>
  337. <a href="#contact">Contacto</a>
  338. </li>
  339. </ul>
  340. <p class="copyright text-muted small"> <a href='http://QWERTY.co/milfs'>&copy; MILFS Un proyecto de http://QWERTY.co</a> Se distribuye bajo licencia GPL V3
  341. <a href="?psi" target="_psi"><i class="fa fa-smile-o "></i> Políticas de privacidad y protección de datos.</a></p>
  342. </div>
  343. </div>
  344. </div>
  345. </footer>
  346. <!-- jQuery -->
  347. <script src="js/jquery.js"></script>
  348. <!-- Bootstrap Core JavaScript -->
  349. <script src="js/bootstrap.min.js"></script>
  350. </body>
  351. </html>
  352. <?php
  353. return;
  354. }
  355. //require ('funciones/funciones.php');
  356. require ('funciones/convert.php');
  357. require ('funciones/login.php');
  358. require ("includes/simple_html_dom.php");
  359. if (isset($_REQUEST['form'])) {
  360. $form = $_REQUEST['form'];
  361. $opciones= array();
  362. if(isset($_REQUEST['formato']) ){ $opciones['formato']= $_REQUEST['formato']; }
  363. } else {$form = "";}
  364. if($form !='') {$embebido = 1;}
  365. if (isset($_REQUEST['identificador'])) {$identificador = $_REQUEST['identificador'];} else {$identificador = "";}
  366. if($identificador !='') {$embebido = 1;}
  367. if (isset($_REQUEST['id'])) {$id = $_REQUEST['id'];} else {$id = "";}
  368. if (isset($_REQUEST['c'])) {$c = $_REQUEST['c'];} else {$c = "";}
  369. if (isset($_REQUEST['f'])) {$f = $_REQUEST['f'];} else {$f = "";}
  370. if (isset($_REQUEST['t'])) {$t = $_REQUEST['t'];} else {$t = "";}
  371. ?>
  372. <link rel="stylesheet" type="text/css" media="screen" href="css/bootstrap-markdown.css">
  373. <link rel="stylesheet" type="text/css" media="screen" href="css/bootstrap-markdown.min.css">
  374. <link href='css/estilos.php?dd' rel='stylesheet'>
  375. <style>
  376. #map {width: 500px;height:200px;}
  377. </style>
  378. <title>I<3MILFS</title>
  379. <?php
  380. if($id !='' OR $c ){$onload ="<script type=\"text/javascript\"> xajax_formulario_modal('".$id."','','".$c."','".$t."')</script>";}
  381. if( isset($_REQUEST['psi'])){$onload ="<script type=\"text/javascript\"> xajax_mostrar_psi()</script>";}
  382. ?>
  383. <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
  384. <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js"></script>
  385. <script src="js/markdown.js"></script>
  386. <script src="js/to-markdown.js"></script>
  387. <script src="js/bootstrap-markdown.js"></script>
  388. <script src="js/scripts.js"></script>
  389. <script type="text/javascript">
  390. function evdragstart(ev,el) { //ev= el evento, el=elemento arrastrado.
  391. cont1=el.parentNode; //guardamos el elemento padre del elemento en una variable.
  392. ev.dataTransfer.setData("text",ev.target.id); //guardamos datos del elemento.
  393. }
  394. function evdragover (ev) { //ev=el evento.
  395. ev.preventDefault(); //quitar comportamiento por defecto.
  396. }
  397. function evdrop(ev,el) { //ev=el evento; el=receptor de soltado
  398. ev.stopPropagation(); //impedir otras acciones
  399. ev.preventDefault(); //quitar comportamiento por defecto
  400. var data=ev.dataTransfer.getData("text"); //recogemos datos del elemento
  401. mielem=ev.target.appendChild(document.getElementById(data)); //obtenemos el elemento arrastrado
  402. cont1.appendChild(mielem); //ponemos el elemento arrastrado en el mismo sitio donde estaba.
  403. mielem2=mielem.cloneNode(true); //creamos una copia del elemento arrastrado.
  404. mielem2.setAttribute("draggable","false"); //impedimos que el nuevo elemento pueda volver a arrastrarse
  405. el.appendChild(mielem2); //colocamos la copia en el receptor de soltado
  406. }
  407. </script>
  408. <style>
  409. .modal-dialog {
  410. width: 98%;
  411. height: auto;
  412. padding: 0;
  413. }
  414. .modal-content {
  415. height: auto;
  416. }
  417. </style>
  418. </head>
  419. <body >
  420. <?php if($embebido ==1) {
  421. if($form!=''){ echo formulario_embebido($form,$opciones);}
  422. elseif($identificador !='') { echo mostrar_identificador($identificador,$id);}
  423. //elseif($_REQUEST['psi'] !='') { include("psi.php") ; echo $aviso;}
  424. else{}
  425. }else{
  426. ?>
  427. <?php echo @$onload; ?>
  428. <?php
  429. if ( isset ( $_SESSION['id'] ) ) { ?>
  430. <div class="navbar navbar-inverse navbar-fixed-top " role="navigation">
  431. <div class="container-fluid">
  432. <!-- Brand and toggle get grouped for better mobile display -->
  433. <div class="navbar-header">
  434. <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
  435. <span class="sr-only">MILFS</span>
  436. <span class="icon-bar"></span>
  437. <span class="icon-bar"></span>
  438. <span class="icon-bar"></span>
  439. </button>
  440. <a class="navbar-brand" href="#"><img src="favicon-152.png" style="width:60px" alt="MILFS" title="Multi Interactive Light Form System"></a>
  441. </div>
  442. <?php echo milfs() ?>
  443. </div>
  444. </div>
  445. <?php }else{ } ?>
  446. <div id='debug'></div>
  447. <div class='container'>
  448. <div id='contenido'>
  449. <?php
  450. if(!isset($_SESSION['id_empresa'])) {$id_empresa_portada='1';} else{$id_empresa_portada = $_SESSION['id_empresa'];}
  451. $encabezado = empresa_datos("$id_empresa_portada",'encabezado');
  452. $pie = empresa_datos("$id_empresa_portada",'pie');
  453. echo "$encabezado";
  454. ?>xxx
  455. <?php echo buscar_imagen("21","","",""); ?>
  456. xxx
  457. <?php if(isset($_REQUEST['change'])){
  458. echo cambiar_password_formato("$_REQUEST[change]");
  459. }
  460. revisar_ingreso('');
  461. ?>
  462. <?php echo $pie; ?>
  463. <img class='img-responsive center-block' src="images/logo.png" alt="MILFS">
  464. </div>
  465. <?php
  466. ?>
  467. <!-- Modal -->
  468. <div class='modal fade ' id='muestraInfo' tabindex='-1' role='dialog' aria-labelledby='myModalLabel' aria-hidden='true'>
  469. <div class='modal-dialog' >
  470. <div class='modal-content'>
  471. <div class='modal-header' >
  472. <button type='button' class='close' data-dismiss='modal' aria-hidden='true'>&times;</button>
  473. <h4 class='modal-title' id='myModalLabel_info'><div id='titulo_modal'></div></h4>
  474. </div>
  475. <div class='modal-body'>
  476. <?php include("psi.php") ;?>
  477. <div id='muestra_form'></div>
  478. </div>
  479. <div class='modal-footer' id='pie_modal'>
  480. </div>
  481. </div>
  482. </div>
  483. </div>
  484. </div>
  485. <div class="">
  486. <div class="container">
  487. <a href='http://QWERTY.co/milfs'>&copy; MILFS Un proyecto de http://QWERTY.co</a> Se distribuye bajo licencia GPL V3
  488. <a href="?psi" target="_psi"><i class="fa fa-smile-o "></i> Políticas de privacidad y protección de datos.</a>
  489. </div>
  490. </div>
  491. <?php } ?>
  492. </body>
  493. </html>