Beispiel #1
0
            include "../class/SelectCtrl.inc.php";
            $ctrl = new SelectCtrl();
            $window->modulectrl = $ctrl->getSelectModule($findmodule_id, "Y");
        }
        $xoTheme->addStylesheet("{$url}/modules/simantz/include/window.css");
        $xoTheme->addStylesheet("{$url}/modules/simantz/include/popup.css");
        $xoTheme->addScript("{$url}/modules/simantz/include/popup.js");
        $xoTheme->addScript('browse.php?Frameworks/jquery/jquery.js');
        if ($_GET['findmodule_id'] >= 1) {
            $findmodule_id = $_GET['findmodule_id'];
        } else {
            $findmodule_id = 0;
        }
        $window->showSearchForm();
        $windowlist = $window->showParentWindowsTree($findmodule_id);
        $formname = $window->getInputForm($findmodule_id);
        echo <<<EOF
<div id='blanket' style='display:none;'></div>
<div id='popUpDiv' style='display:none;verticle-align:center'>

     <div id='popupmessage' style='text-align:center'></div>
     <div id='progressimage' style='text-align:center'><img src='../images/ajax_indicator_01.gif'></div>
</div>


    <script>
        function reloadWindows(){
            var data="action=ajaxgetmodulewindows&mid="+{$findmodule_id};
            \$.ajax({
                 url: "window.php",type: "GET",data: data,cache: false,
                     success: function (xml) {
Beispiel #2
0
    $o->isactive = 'Y';
} else {
    $o->isactive = 'N';
}
switch ($action) {
    //When user submit new organization
    case "create":
        // if the token is exist and not yet expired
        $log->showLog(4, "Accessing create record event, with window name={$o->window_name}");
        if ($s->check(false, $token, "CREATE_WDW")) {
            if ($o->insertWindow()) {
                $latest_id = $o->getLatestWindowID();
                redirect_header("window.php?action=edit&window_id={$latest_id}", $pausetime, "Your data is saved, the new id={$latest_id}");
            } else {
                $token = $s->createToken($tokenlife, "CREATE_WDW");
                $o->getInputForm("new", -1, $token);
                $o->showWindowTable();
            }
        } else {
            // if the token is not valid or the token is expired, it back to previous form with previous inputed data
            $token = $s->createToken($tokenlife, "CREATE_WDW");
            $o->getInputForm("new", -1, $token);
            $o->showWindowTable();
        }
        break;
        //when user request to edit particular organization
    //when user request to edit particular organization
    case "edit":
        if ($o->fetchWindow($o->window_id)) {
            //create a new token for editing a form
            $token = $s->createToken($tokenlife, "CREATE_WDW");