Esempio n. 1
0
<?php

include_once "system.php";
include_once XOOPS_ROOT_PATH . '/modules/simantz/class/Window.inc.php';
$window = new Window();
$action = $_REQUEST['action'];
$window->updated = date("Y-m-d H:i:s", time());
$window->updatedby = $xoopsUser->getVar("uid");
switch ($action) {
    case "ajaxfetch":
        if ($window->fetchWindow($_REQUEST['window_id'])) {
            $window->returnWindowXML();
        } else {
            echo "<xml><errortext>Cannot retrieve window_id:" . $_REQUEST['window_id'] . "</errortext></xml>";
        }
        break;
    case "ajaxgetmodulewindows":
        $window->mid = $_REQUEST['mid'];
        echo $window->showParentWindowsTree($window->mid);
        break;
    case "ajaxdelete":
        $window->window_id = $_REQUEST['window_id'];
        if (!$window->deleteWindow($window->window_id)) {
            echo "Warning! Cannot delete this window due to unknown reason.";
        }
        break;
    case "ajaxsave":
        //print_r($_POST);
        $window->window_id = $_POST['window_id'];
        $window->window_name = $_POST['window_name'];
        if ($_POST['isactive'] == 'on') {