예제 #1
0
    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>
            <tr>
                <td>Descripci&oacute;n</td><td colspan = "2"><textarea  rows="10" cols="40" name = "descripcion" 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;"/><?php 
echo $instancia["descripcion"];
예제 #2
0
파일: logs.php 프로젝트: kailIII/pos-erp
<?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>";
/*