$response = null; function dispatcher() { global $response; switch ($_GET["action"]) { case "mod": $response = json_decode(InstanciasController::Editar($_GET["id"], $_GET["activa"], $_GET["descripcion"], $_GET["token"], $_GET["status"])); break; default: return; } } if (isset($_GET["action"])) { dispatcher(); } $p = new JediComponentPage("Editar instancia"); $p->requireParam("id", "GET", "Esta instancia no existe.", "InstanciasController::Detalles"); $instancia = InstanciasController::Detalles($_GET["id"]); $p->partialRender(); ?> <h2>Editar Instancia</h2> <table style = "width:100%;"> <form name = "form1" action = "instancias.editar.php"> <tr> <td>Token</td><td><input type = "text" name = "token" value = "<?php echo $instancia["instance_token"]; ?> " style = " width:100%; border-color: #1D2A5B; margin: 0; border: 1px solid #BDC7D8; font-size: 11px; margin: 0; padding: 3px; -webkit-appearance: none; -webkit-border-radius: 0;"/></td><td><input type = "button" value = "Generar Token Aleatorio" class="POS Boton" onClick = "generarAleatorio();"/></td> </tr>
fseek($file, $range); } while (!feof($file) && !connection_aborted() && $bytes_send < $new_length) { $buffer = fread($file, $chunksize); print $buffer; //echo($buffer); // is also possible flush(); $bytes_send += strlen($buffer); } fclose($file); } else { die('Error - can not open file.'); } die; } $page = new JediComponentPage(); require_once "libs/zip.php"; /* Make sure script execution doesn't time out. Set maximum execution time in seconds (0 means no limit). */ set_time_limit(0); $ids = json_decode($_GET["instance_ids"]); $ids = $ids->instance_ids; $prefix = time() . rand(); $files = array(); $file_id = array(); for ($i = 0; $i < sizeof($ids); $i++) { //validar que existan $r = InstanciasController::BuscarPorId($ids[$i]); if (is_null($r)) {
?> ); location.href="instancias.bd.php" })(); </script> <?php break; } Logger::log("Restauracion(es) realizada(s) con éxito"); header("Location: instancias.lista.php"); break; default: } } if (isset($_GET["do"])) { parseRequests(); } $p = new JediComponentPage(); $p->partialRender(); ?> <script> var ids= new Array(); function addId(instance_id){ var esta = false; for(i = 0; i < ids.length; i++) { if(ids[i] == instance_id) { esta = true; if(!Ext.get('chk_'+instance_id).dom.checked)
} else { ?> <script> (function(){alert("Instancia eliminada correctamente");location.href="instancias.lista.php";})(); </script> <?php } break; default: return; } } if (isset($_GET["action"])) { dispatcher(); } $p = new JediComponentPage("Detalles de la instancia"); $p->requireParam("id", "GET", "Esta instancia no existe.", "InstanciasController::Detalles"); $instancia = InstanciasController::Detalles($_GET["id"]); $p->addComponent(new TitleComponent("Detalles de la instancia")); $p->addComponent("<br><a href='../" . $instancia["instance_token"] . "/' target='_new'><div class='POS Boton'>Visitar la instancia</div></a>"); $p->addComponent("<a href='./instancias.editar.php?id=" . $_GET["id"] . "'><div class='POS Boton'>Editar Información</div></a>"); $p->addComponent("<div class='POS Boton' onClick = \"eliminarInstancia();\">Eliminar Instancia</div>"); $p->addComponent(new TitleComponent($instancia["instance_token"], 3)); $t = new TableComponent(array("instance_id" => "Id", "instance_token" => "Token", "descripcion" => "Descripcion", "fecha_creacion" => "Creación", "activa" => "Activa", "status" => "status"), array($instancia)); $t->addColRender("fecha_creacion", "FormatTime"); $t->addColRender("activa", "FormatBoolean"); $t->addColRender("pos_instance", "FormatBoolean"); function FormatBoolean($activa) { if ($activa === "0") { return "<font style = \"color:red;\">no</font>";
<?php define("BYPASS_INSTANCE_CHECK", true); require_once "../../server/bootstrap.php"; require_once "../../server/bootstrap.php"; $p = new JediComponentPage(); $p->addComponent(new TitleComponent("POS ERP JEDI INTERFACE")); $p->render();
<?php define("BYPASS_INSTANCE_CHECK", true); require_once "../../server/bootstrap.php"; $request = InstanciasController::BuscarRequests($_GET["rid"]); $this_request = $request[0]; /*** * * Page Rendering * * * */ $p = new JediComponentPage(); $m = new MenuComponent(); $m->addItem("Reenviar correo de confirmacion", ""); $m->addItem("Re-instalar instancia", "javascript:forceValidate();"); $p->addComponent($m); $headers = array("id_request" => "request_id", "email" => "email", "ip" => "ip", "fecha" => "date_requested", "date_validated" => "date_validated", "date_installed" => "date_installed"); $t = new TableComponent($headers, $request); function FormatTimeSpecial($ut) { if (is_null($ut) or strlen($ut) == 0) { return ""; } return FormatTime($ut); } $t->addColRender("fecha", "FormatTimeSpecial"); $t->addColRender("date_validated", "FormatTimeSpecial"); $t->addColRender("date_installed", "FormatTimeSpecial"); $p->addComponent($t); $p->addComponent('
<?php define("BYPASS_INSTANCE_CHECK", true); require_once "../../server/bootstrap.php"; /*** * * Page Rendering * * * */ $page = new JediComponentPage(); $page->partialRender(); $lines = Logger::read("access", 1000); $this_ip = "127.0.0.1"; echo "<pre style='overflow: scroll; padding: 5px; margin-left:-10px; width: 103%; background: whiteSmoke; margin-bottom:5px; font-size:8.5px;'>"; for ($a = sizeof($lines) - 1; $a >= 0; $a--) { //echo "<div style='color: black; '>" . $lines[$a] . "\n</div>" ; $linea = explode("|", $lines[$a]); if (sizeof($linea) > 1 && filter_var(trim($linea[1]), FILTER_VALIDATE_IP)) { $ip = $linea[1]; $octetos = explode(".", $ip); if (($epos = strpos($lines[$a], "ERROR:")) !== false) { $lines[$a] = substr_replace($lines[$a], "<span style='color:red; background-color:white'>ERROR:", $epos, 6) . "</span>"; } echo "<div style='color: rgb(" . (255 - $octetos[1]) . ", 0, " . (255 - $octetos[3]) . "); background-color: rgb( " . $octetos[1] . " , " . $octetos[2] . " , " . $octetos[3] . ")'>" . $lines[$a] . "\n</div>"; } else { echo "<div>" . $lines[$a] . "\n</div>"; } } echo "</pre>"; /*
<?php define("BYPASS_INSTANCE_CHECK", true); require_once "../../server/bootstrap.php"; $p = new JediComponentPage(); $p->addComponent(new TitleComponent("Instancias")); $p->addComponent(new TitleComponent("Instancias instaladas", 3)); $headers = array("instance_id" => "instance_id", "instance_token" => "instance_token", "fecha_creacion" => "creada", "descripcion" => "descripcion", "activa" => "activa", "status" => "status"); $t = new TableComponent($headers, InstanciasController::Buscar()); $t->addColRender("activa", "FormatBoolean"); $t->addColRender("pos_instance", "FormatBoolean"); function FormatBoolean($activa) { if ($activa === "0") { return "<font style = \"color:red;\">no</font>"; } if ($activa === "1") { return "sí"; } return "undefined"; } $t->addColRender("fecha_creacion", "FormatTime"); $t->addOnClick("instance_id", "(function(i){window.location='instancias.ver.php?id='+i; })"); $p->addComponent(new FreeHtmlComponent('<div class="POS Boton OK" onclick="window.location=\'instancias.bd.php\'">BD de Instancias</div>')); $p->addComponent($t); $p->render();
//todo salio bien... header("Location: instancias.ver.php?id=" . $N_I_ID); break; default: } } if (isset($_GET["do"])) { parseRequests(); } /*** * * Page Rendering * * * */ $p = new JediComponentPage(); /** * * Nueva instancia * **/ $p->addComponent(new TitleComponent("Nueva instancia")); $p->addComponent(new FreeHtmlComponent('<input type="text" style="font-size: 17px;" placeholder="Token" id="_new_instance_toke"> ')); $p->addComponent(new FreeHtmlComponent('<input type="text" style="font-size: 17px;" placeholder="Descripcion" id="_new_instance_desc"> ')); //$p->addComponent( new FreeHtmlComponent( '<div class="POS Boton OK" onclick="window.location=\'instancias.nueva.php?do=nueva&d=\'+HtmlEncode(Ext.get(\'_new_instance_desc\').getValue());">Nueva Instancia</div>') ); $p->addComponent(new FreeHtmlComponent('<div class="POS Boton OK" onclick="window.location=\'instancias.nueva.php?do=nueva&d=\'+ HtmlEncode(Ext.get(\'_new_instance_desc\').getValue()) + \'&t=\'+HtmlEncode(Ext.get(\'_new_instance_toke\').getValue());">Nueva Instancia</div>')); $p->addComponent(new FreeHtmlComponent("<hr>")); $p->addComponent(new TitleComponent("Utilizando una base de datos externa", 2)); $form = new FormComponent(); $form->addField("descripcion", "Descripcion", "text"); $form->addField("instance_token", "instance_token", "text");
<?php define("BYPASS_INSTANCE_CHECK", true); require_once "../../server/bootstrap.php"; $page = new JediComponentPage(); $page->render();
<?php define("BYPASS_INSTANCE_CHECK", true); require_once "../../server/bootstrap.php"; /*** * * Page Rendering * * * */ $p = new JediComponentPage(); $headers = array("id_request" => "request_id", "email" => "email", "ip" => "ip", "fecha" => "date_requested", "date_validated" => "date_validated", "date_installed" => "date_installed"); $t = new TableComponent($headers, InstanciasController::BuscarRequests()); function FormatTimeSpecial($ut) { if (is_null($ut) or strlen($ut) == 0) { return ""; } return FormatTime($ut); } $t->addOnClick("id_request", "(function(a){window.location = 'requests.ver.php?rid='+a;})"); $t->addColRender("fecha", "FormatTimeSpecial"); $t->addColRender("date_validated", "FormatTimeSpecial"); $t->addColRender("date_installed", "FormatTimeSpecial"); $p->addComponent($t); $p->render();