Пример #1
0
<?php

require_once "Test.php";
set_include_dir(dirname(__FILE__) . "/../../Framework/Extensions/xajax/-");
if (empty($_POST) && !$_GET["oDataRequest"]) {
    require 'Extensions/wGui/wGui.includes.php';
}
include 'xajax_core/xajax.inc.php';
require_once "Extensions/wGui/wUI.php";
require_once "gspanel_class.php";
$xajax = new xajax();
$FormWindow = new wWindow("FormWindow");
$FormWindow->type = WINDOW . FIXED;
$FormWindow->title = "Prueba";
$label = new wLabel("Registros de pruebas", $FormWindow, "Registros de pruebas");
$GSPAnel = new GSControlPanel($FormWindow, "Ejemplo", "example");
$aumentaButton = new wButton("aumbutton", $GSPAnel->dForm->buttonPane);
$aumentaButton->setCSS("width", "100px");
$aumentaButton->label = "Aumentar visitas";
$aumentaButton->addListener("onclick", "aumentarVisitas");
$aumentaButton->Listener["onclick"]->addParameter(XAJAX_FORM_VALUES, $GSPAnel->dForm->id);
$disminuyeButton = new wButton("disbutton", $GSPAnel->dForm->buttonPane);
$disminuyeButton->setCSS("width", "100px");
$disminuyeButton->label = "Diminuir visitas";
$disminuyeButton->addListener("onclick", "disminuirVisitas");
$disminuyeButton->Listener["onclick"]->addParameter(XAJAX_FORM_VALUES, $GSPAnel->dForm->id);
function aumentarVisitas($source, $event, $formData)
{
    global $GSPAnel;
    $objResponse = new xajaxResponse();
    $task = newObject("example", $formData["ID"]);
Пример #2
0
<?php

require "GlobalSche.php";
set_include_dir(dirname(__FILE__) . "/../../Framework/Extensions/xajax/-");
if (empty($_POST) && !$_GET["oDataRequest"]) {
    require 'Extensions/wGui/wGui.includes.php';
}
include 'xajax_core/xajax.inc.php';
require_once "Extensions/wGui/wUI.php";
require_once "gspanel_class.php";
$xajax = new xajax();
$FormWindow = new wWindow("FormWindow");
$FormWindow->title = "Tareas Definidas";
$FormWindow->setCSS("width", "900px");
$FormWindow->type = WINDOW . FIXED;
$GSPAnel = new GSControlPanel($FormWindow, "Tareas", "gtask");
$GSPAnel->addTab("Pasos", "gstep", "gtask_id");
if (empty($_POST) && !$_GET["oDataRequest"]) {
    $FormWindow->render();
    $xajax->printJavascript($SYS["ROOT"] . "/Framework/Extensions/xajax");
} else {
    if ($_GET["oDataRequest"]) {
        $GSPAnel->aj_RequestData($_GET["instance"]);
    } else {
        $xajax->processRequest();
    }
}
$TestTaskButton = new wButton("runTestTask", $GSPAnel->aForms[1]->buttonPane);
$TestTaskButton->label = "Probar";
$TestTaskButton->addListener("onclick", "runTestTask");
$TestTaskButton->Listener["onclick"]->addParameter(XAJAX_FORM_VALUES, $GSPAnel->aForms[1]->id);
/* Programaciones */
$FormWindowSche = new wWindow("FormWindowSche", $mainPanel, false);
$FormWindowSche->setCSS("display", "none");
$FormWindowSche->title = "Programaciones Definidas";
$FormWindowSche->setCSS("width", "1100px");
$GSPAnelSche = new GSControlPanel($FormWindowSche, "Planificaciones", "schedule");
/* Hosts */
$FormWindowHost = new wWindow("FormHost", $mainPanel, false);
$FormWindowHost->setCSS("display", "none");
$FormWindowHost->title = "Conexiones";
$FormWindowHost->setCSS("width", "1100px");
$GSPAnelScheHost = new GSControlPanel($FormWindowHost, "Conexiones", "ghost");
if (empty($_POST) && !$_GET["oDataRequest"]) {
    $layout->render();
    //$FormWindowSche->render();
    $xajax->printJavascript($SYS["ROOT"] . "/Framework/Extensions/xajax");
} else {
    if ($_GET["oDataRequest"]) {
        /* Data Request */
        if ($_GET["instance"] == "gtask" || $_GET["instance"] == "gstep") {
            $GSPAnel->aj_RequestData($_GET["instance"]);
        } else {
            if ($_GET["instance"] == "schedule") {
                $GSPAnelSche->aj_RequestData($_GET["instance"]);
            } else {
                if ($_GET["instance"] == "ghost") {
                    $GSPAnelScheHost->aj_RequestData($_GET["instance"]);