<<InsertPage page='CssStyles'>>

<<JOpen>>

<<JCss

#header{
    display:none!important;
}

#actionsBottom.pageactions{
    display:none!important;
}



p > a.createpage {
    color : #ffffff !important;
    background-color : #4D589F;
    font-size : 14px;
    padding : 0.5em 0.6em 0.5em 0.6em;
    margin: 10px 0px;
    border : 1px outset #ffffff;
}



h1{
    font-size:18px;
    text-transform: uppercase;
    text-align:center;
}
h3{
    font-size:15px;
    margin: 10px 0 !important;
    text-align:center;
    text-transform: uppercase;
}

.outerTable{
    width:100%;
}

.wikitable td {
    padding: 5px 10px!important;
}

.wikitable {
    margin:20px 0;
    font-size:13px;
    line-height:21px;
}

>>

<<JScript includes='QuestionnaireFunctions/functions'

// ======================= SHOWING MESSAGES ========================================
    var messages = jglobal.get('messages');
    if(messages != null ) {

        for (var i = 0; i < messages.size(); i++){
            var message = messages.get(i);
            jout.println("%%" + message.type +"\n " + message.message + "\n%%");
        }
        jglobal.set("messages", null);
    }


    if(juser.hasRole("Authenticated")) {
        var title_link = 'ÜBERSICHT DER PROJEKTE';
        var link_print = [[*
          [{JHtml

            <div id='headerLayout'>
              <h1 class="page_title">$title_link</h1>
            </div>
          }]
        *]];

        var link_print = jutil.replace(link_print, "$title_link", title_link);
        jout.println(link_print);

        var tcon = null;

        try {
          var tcon = jrt.exclusiveCon("Home.sendMail",false);
          tcon.commit();
          authorisationUser(tcon);
          tcon.commit();
          showAllProjects(tcon);
          tcon.commit();
          showAllUsers(tcon);
        } catch(e) {
            if(tcon != null) tcon.rollback();
            throw "jreturn:" + e;
        } finally {
            if(tcon != null)jrt.release(tcon);
        }

    } else {
      var html = [[*
                [{JHtml


                <div id='headerLayout'>

                <center><h1>Administrationsbereich</h1></center>
                <center><h3 style='font-weight: normal'> BITTE MELDEN SIE SICH AN, UM IHRE PROJEKTE ZU VERWALTEN.</h3></center>
                <br/>
                <center>
                       }]
            *]];


             var html1 = [[*
                [{JHtml


           </center>

                </div>


                }]
            *]];


    jout.println('\\\\');
            jout.println(html);
            jout.println(" [{JLink name='Anmelden' title='ANMELDEN' page='Login'   }]");
            jout.println(html1);
    }

>>



<<JAction name='onStatusChanged' includes='QuestionnaireFunctions/functions'

var tcon = null;
try {
    var tcon = jrt.exclusiveCon("QuestionnaireFunctions.onStatusChanged",false);
    tcon.commit();
    changeProjectStatus(tcon);
    tcon.commit();
} catch(e) {
    if(tcon != null) {
        tcon.rollback();
    }
    throw "jreturn:" + e;
} finally {
    if(tcon != null) {
        jrt.release(tcon);
    }
}

>>


<<JAction name='onUsersPersitent' includes='QuestionnaireFunctions/functions'

var tcon = null;
try
{
    var tcon = jrt.exclusiveCon("QuestionnaireFunctions.Login",false);
    tcon.commit();
    saveUserPersistent(tcon);
    tcon.commit();
}
catch(e)
{
    if(tcon != null) tcon.rollback();
    throw " Loginj return:" + e;
}
finally
{
    if(tcon != null)jrt.release(tcon);
}

>>

<<JClose>>