[23972] | 1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
| 2 | <xsl:stylesheet version="1.0"
|
---|
| 3 | xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
---|
| 4 | xmlns:java="http://xml.apache.org/xslt/java"
|
---|
| 5 | xmlns:util="xalan://org.greenstone.gsdl3.util.XSLTUtil"
|
---|
| 6 | extension-element-prefixes="java util"
|
---|
| 7 | exclude-result-prefixes="java util">
|
---|
| 8 |
|
---|
| 9 | <!-- style includes global params interface_name, library_name -->
|
---|
| 10 | <xsl:include href="style.xsl"/>
|
---|
| 11 | <xsl:include href="service-params.xsl"/>
|
---|
| 12 |
|
---|
| 13 | <xsl:output method="html"/>
|
---|
| 14 |
|
---|
| 15 | <xsl:template name="pageTitle">
|
---|
| 16 | <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.authentication')"/>
|
---|
| 17 | </xsl:template>
|
---|
| 18 |
|
---|
| 19 | <!-- put a space in the title in case the actual value is missing - mozilla will not display a page with no title-->
|
---|
| 20 | <xsl:template name="pageHead">
|
---|
| 21 | <head>
|
---|
| 22 | <title>
|
---|
| 23 | <xsl:call-template name="pageTitle"/><xsl:text> </xsl:text>
|
---|
| 24 | </title>
|
---|
| 25 | <xsl:call-template name="globalStyle"/>
|
---|
| 26 | <xsl:call-template name="pageStyle"/>
|
---|
| 27 | </head>
|
---|
| 28 | </xsl:template>
|
---|
| 29 |
|
---|
| 30 | <xsl:template name="pageStyle"/>
|
---|
| 31 |
|
---|
| 32 | <xsl:template match="page">
|
---|
| 33 | <html>
|
---|
| 34 | <xsl:call-template name="pageHead" />
|
---|
| 35 | <xsl:call-template name="addGroup" />
|
---|
| 36 | <body>
|
---|
| 37 | <xsl:attribute name="dir"><xsl:call-template name="direction"/></xsl:attribute>
|
---|
| 38 | <div id="page-wrapper">
|
---|
| 39 | <xsl:variable name="authen_service" select="/page/pageRequest/paramList/param[@name='s']/@value"/>
|
---|
| 40 | <xsl:variable name="sub_action" select="/page/pageRequest/@subaction"/>
|
---|
| 41 | <xsl:variable name="asn_param" select ="/page/pageRequest/paramList/param[@name='s1.asn']/@value"/>
|
---|
| 42 | <xsl:variable name="uan" select ="/page/pageRequest/paramList/param[@name='s1.uan']/@value"/>
|
---|
| 43 | <xsl:variable name="pro_action" select ="/page/pageResponse/authenticationNode/service/@aup"/>
|
---|
| 44 | <xsl:variable name="au_node" select ="/page/pageResponse/authenticationNode"/>
|
---|
| 45 | <xsl:variable name="asn" select ="/page/pageResponse/authenticationNode/service/@asn"/>
|
---|
| 46 | <xsl:variable name="info" select ="/page/pageResponse/authenticationNode/service/@info"/>
|
---|
| 47 | <xsl:variable name="err" select ="/page/pageResponse/authenticationNode/service/@err"/>
|
---|
| 48 | <xsl:variable name="rt" select="/page/pageRequest/paramList/param[@name='rt']/@value"/>
|
---|
| 49 | <xsl:variable name="un_s" select="/page/pageResponse/authenticationNode/service/@un"/>
|
---|
| 50 | <xsl:variable name="pw_s" select="/page/pageResponse/authenticationNode/service/@pw"/>
|
---|
| 51 |
|
---|
| 52 | <div align="left" >
|
---|
| 53 | <table align="left" border="0" width="100%">
|
---|
| 54 | <tr align="left">
|
---|
| 55 | <td><h2><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.authentication')"/></h2></td>
|
---|
| 56 | <td><xsl:if test="$un_s!=''">
|
---|
| 57 | <xsl:if test="$asn!='' and $asn!='0'">
|
---|
| 58 | <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.username')"/> : <xsl:value-of select="$un_s"/>
|
---|
| 59 | </xsl:if>
|
---|
| 60 | </xsl:if></td>
|
---|
| 61 | </tr>
|
---|
| 62 | </table>
|
---|
| 63 | </div>
|
---|
| 64 |
|
---|
| 65 | <div id="navbar">
|
---|
| 66 | <ul id="navbarlist">
|
---|
| 67 | <!--greenstone home-->
|
---|
| 68 | <li><a href="{$library_name}"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.greenstone_home')"/></a></li>
|
---|
| 69 |
|
---|
| 70 | <!--list users-->
|
---|
| 71 | <li>
|
---|
| 72 | <xsl:choose>
|
---|
| 73 | <xsl:when test="$asn!='' and $asn!='0' and $un_s!=''">
|
---|
| 74 | <a href="{$library_name}?a=g&rt=r&sa=authen&s=Authentication&s1.aup=ListUsers&s1.asn={$asn}&s1.uan=1&s1.un={$un_s}&s1.pw="><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.list_users')"/></a>
|
---|
| 75 | </xsl:when>
|
---|
| 76 | <xsl:otherwise>
|
---|
| 77 | <a href="{$library_name}?a=g&rt=r&sa=authen&s=Authentication&s1.asn=&s1.aup=Login"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.list_users')"/></a>
|
---|
| 78 | </xsl:otherwise>
|
---|
| 79 | </xsl:choose></li>
|
---|
| 80 |
|
---|
| 81 | <!--add a new user-->
|
---|
| 82 | <li>
|
---|
| 83 | <xsl:choose>
|
---|
| 84 | <xsl:when test="$asn!='' and $asn!='0' and $un_s!=''">
|
---|
| 85 | <a href="{$library_name}?a=g&rt=r&sa=authen&s=Authentication&s1.aup=AddUser&s1.asn={$asn}&s1.uan=1&s1.un={$un_s}&s1.pw=&s1.umun=&s1.umpw=&s1.umgp=&s1.umas=&s1.umc="><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.add_a_new_user')"/></a>
|
---|
| 86 | </xsl:when>
|
---|
| 87 | <xsl:otherwise>
|
---|
| 88 | <a href="{$library_name}?a=g&rt=r&sa=authen&s=Authentication&s1.asn=&s1.aup=Login"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.add_a_new_user')"/></a>
|
---|
| 89 | </xsl:otherwise>
|
---|
| 90 | </xsl:choose>
|
---|
| 91 | </li>
|
---|
| 92 |
|
---|
| 93 | <!-- change password-->
|
---|
| 94 | <li>
|
---|
| 95 | <xsl:choose>
|
---|
| 96 | <xsl:when test="$asn!='' and $asn!='0' and $un_s!=''">
|
---|
| 97 | <a href="{$library_name}?a=g&rt=r&sa=authen&s=Authentication&s1.aup=ModifyPassword&s1.asn={$asn}&s1.uan=1&s1.un={$un_s}&s1.pw=&s1.umpw1=&s1.umpw2=&s1.umpw="><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.change_password')"/></a>
|
---|
| 98 | </xsl:when>
|
---|
| 99 | <xsl:otherwise>
|
---|
| 100 | <a href="{$library_name}?a=g&rt=r&sa=authen&s=Authentication&s1.asn=&s1.aup=Login"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.change_password')"/></a>
|
---|
| 101 | </xsl:otherwise>
|
---|
| 102 | </xsl:choose>
|
---|
| 103 | </li>
|
---|
| 104 |
|
---|
| 105 | <li>
|
---|
| 106 | <xsl:choose>
|
---|
| 107 | <xsl:when test="$un_s!='' and $asn!='' and $asn!='0'">
|
---|
| 108 | <a href="{$library_name}?a=g&rt=r&sa=authen&s=Authentication&s1.asn=&s1.aup=Login&s1.un=&s1.pw="><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.logout')"/></a>
|
---|
| 109 | </xsl:when>
|
---|
| 110 | <xsl:otherwise>
|
---|
| 111 | <a href="{$library_name}?a=g&rt=r&sa=authen&s=Authentication&s1.asn=&s1.aup=Login"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.login')"/></a>
|
---|
| 112 | </xsl:otherwise>
|
---|
| 113 | </xsl:choose>
|
---|
| 114 | </li>
|
---|
| 115 | </ul>
|
---|
| 116 | </div>
|
---|
| 117 |
|
---|
| 118 | <table align="left" border="0" width="100%">
|
---|
| 119 | <tr>
|
---|
| 120 | <td>
|
---|
| 121 | <div id="content" align="center">
|
---|
| 122 | <!-- login -->
|
---|
| 123 | <xsl:if test="$pro_action='Login'">
|
---|
| 124 | <xsl:choose>
|
---|
| 125 | <xsl:when test="$asn!='' and $asn!='0'">
|
---|
| 126 | <p align="left"> <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.login_successfully')"/></p>
|
---|
| 127 | </xsl:when>
|
---|
| 128 | <xsl:otherwise>
|
---|
| 129 |
|
---|
| 130 | <p align="left">
|
---|
| 131 | <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.login_descibe_line_3')"/><br/></p>
|
---|
| 132 | <xsl:if test="$err='un-pw-err'">
|
---|
| 133 | <p align="left"><font color='red'><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.wrong_password_warning')"/></font></p>
|
---|
| 134 | </xsl:if>
|
---|
| 135 | <xsl:if test="$err='no-permission' and $info='Login'">
|
---|
| 136 | <p align="left"><font color='red'><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.no_permission')"/></font></p>
|
---|
| 137 | </xsl:if>
|
---|
| 138 | <xsl:if test="$err='as-false'">
|
---|
| 139 | <p align="left"><font color='red'><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.account_status_false')"/></font></p>
|
---|
| 140 | </xsl:if>
|
---|
| 141 | <xsl:call-template name="login">
|
---|
| 142 | <xsl:with-param name="sub_action" select="$sub_action"/>
|
---|
| 143 | <xsl:with-param name="authen_service" select="$authen_service"/>
|
---|
| 144 | <xsl:with-param name="pro_action" select="$pro_action"/>
|
---|
| 145 | </xsl:call-template>
|
---|
| 146 |
|
---|
| 147 | </xsl:otherwise>
|
---|
| 148 | </xsl:choose>
|
---|
| 149 | </xsl:if>
|
---|
| 150 |
|
---|
| 151 | <!-- list users-->
|
---|
| 152 | <xsl:if test="$pro_action='ListUsers'">
|
---|
| 153 |
|
---|
| 154 | <xsl:if test="$asn='1' and $info='all-un'">
|
---|
| 155 | <xsl:call-template name="listusers" >
|
---|
| 156 | </xsl:call-template>
|
---|
| 157 | </xsl:if>
|
---|
| 158 |
|
---|
| 159 | <xsl:if test="$info='Login'">
|
---|
| 160 | <p align="left">
|
---|
| 161 | <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.login_descibe_line_2')"/><br/></p>
|
---|
| 162 | <xsl:if test="$err='no-permission' and $info='Login'">
|
---|
| 163 | <p align="left"><font color='red'><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.no_permission')"/></font></p>
|
---|
| 164 | </xsl:if>
|
---|
| 165 | </xsl:if>
|
---|
| 166 | </xsl:if>
|
---|
| 167 |
|
---|
| 168 | <!-- add a new user-->
|
---|
| 169 | <xsl:if test="$pro_action='AddUser'">
|
---|
| 170 | <xsl:if test="$err!='' and $err!='no-permission' and $err!='un-exist' and $err!='un-err' and $err!='pw-err'">
|
---|
| 171 | <p align="left"><font color='red'><xsl:value-of select="$err" /></font></p>
|
---|
| 172 | </xsl:if>
|
---|
| 173 |
|
---|
| 174 | <xsl:if test="$asn!='1'">
|
---|
| 175 | <p align="left">
|
---|
| 176 | <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.login_descibe_line_2')"/><br/>
|
---|
| 177 | </p>
|
---|
| 178 | <xsl:if test="$err='no-permission'">
|
---|
| 179 | <p align="left"><font color='red'><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.no_permission')"/></font></p>
|
---|
| 180 | </xsl:if>
|
---|
| 181 | </xsl:if>
|
---|
| 182 |
|
---|
| 183 | <xsl:if test="count(/page/pageResponse/authenticationNode/service/userNodeList) = 1">
|
---|
| 184 | <xsl:call-template name="listusers" >
|
---|
| 185 | </xsl:call-template>
|
---|
| 186 | </xsl:if>
|
---|
| 187 |
|
---|
| 188 | <xsl:if test="$info='adduser_interface'">
|
---|
| 189 | <h2 align="left"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.add_a_new_user_title')"/></h2>
|
---|
| 190 | <xsl:if test="$err='pw-err'">
|
---|
| 191 | <p align="left"><font color="red"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.password_err')"/></font></p>
|
---|
| 192 | </xsl:if>
|
---|
| 193 | <xsl:if test="$err='un-err'">
|
---|
| 194 | <p align="left"><font color="red"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.unsername_err')"/></font></p>
|
---|
| 195 | </xsl:if>
|
---|
| 196 | <xsl:if test="$err='un-exist'">
|
---|
| 197 | <p align="left"><font color='red'><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.user_has_existed')"/></font></p>
|
---|
| 198 | </xsl:if>
|
---|
| 199 | <xsl:call-template name="edituser" >
|
---|
| 200 | <xsl:with-param name="sub_action" select="$sub_action"/>
|
---|
| 201 | <xsl:with-param name="authen_service" select="$authen_service"/>
|
---|
| 202 | <xsl:with-param name="pro_action" select="$pro_action"/>
|
---|
| 203 | <xsl:with-param name="umun_s" />
|
---|
| 204 | <xsl:with-param name="umpw_s" />
|
---|
| 205 | <xsl:with-param name="umas_s" />
|
---|
| 206 | <xsl:with-param name="umgp_s" />
|
---|
| 207 | <xsl:with-param name="umc_s" />
|
---|
| 208 | <xsl:with-param name="oumun_s" />
|
---|
| 209 | <xsl:with-param name="un_s" select="$un_s"/>
|
---|
| 210 | <xsl:with-param name="pw_s" select="$pw_s"/>
|
---|
| 211 | <xsl:with-param name="asn" select="$asn"/>
|
---|
| 212 | </xsl:call-template>
|
---|
| 213 |
|
---|
| 214 | </xsl:if>
|
---|
| 215 | </xsl:if>
|
---|
| 216 |
|
---|
| 217 | <!-- modify the passwrod of a user-->
|
---|
| 218 | <xsl:if test="$pro_action='ModifyPassword'">
|
---|
| 219 |
|
---|
| 220 | <xsl:if test="$err!='' and $err!='umpw1-err' and $err!='umpw2-err' and $err!='pw-umpw-nm-err' and $err!='umpw-null-err' and $err!='umpw1-umpw2-nm-err' and $err!='umpw1-umpw2-null-err'"><p align="left"><font color='red'><xsl:value-of select="$err" /></font></p>
|
---|
| 221 | </xsl:if>
|
---|
| 222 |
|
---|
| 223 | <xsl:if test="$err=''">
|
---|
| 224 | <h2 align="left"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.change_password_title')"/></h2>
|
---|
| 225 | <p align="left"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.change_password_successed_content')"/></p>
|
---|
| 226 | </xsl:if>
|
---|
| 227 |
|
---|
| 228 | <xsl:if test="$asn!='0' and $info='modify_interface'">
|
---|
| 229 | <h2 align="left"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.change_password_title')"/></h2>
|
---|
| 230 | <p align="left"><font color="grey"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.change_password_describe_line_1')"/></font></p>
|
---|
| 231 |
|
---|
| 232 | <xsl:if test="$err='umpw1-err'">
|
---|
| 233 | <p align="left"><font color="red"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.new_password_invalid')"/></font></p>
|
---|
| 234 | </xsl:if>
|
---|
| 235 | <xsl:if test="$err='umpw2-err'">
|
---|
| 236 | <p align="left"><font color="red"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.retyped_password_invalid')"/></font></p>
|
---|
| 237 | </xsl:if>
|
---|
| 238 | <xsl:if test="$err='pw-umpw-nm-err' or $err='umpw-null-err'">
|
---|
| 239 | <p align="left"><font color="red"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.old_password_warning')"/></font></p>
|
---|
| 240 | </xsl:if>
|
---|
| 241 | <xsl:if test="$err='umpw1-umpw2-nm-err'">
|
---|
| 242 | <p align="left"><font color="red"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.two_password_not_match')"/></font></p>
|
---|
| 243 | </xsl:if>
|
---|
| 244 | <xsl:if test="$err='umpw1-umpw2-null-err'">
|
---|
| 245 | <p align="left"><font color="red"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.password_empty_warning')"/></font></p>
|
---|
| 246 | </xsl:if>
|
---|
| 247 |
|
---|
| 248 | <xsl:call-template name="modifypassword">
|
---|
| 249 | <xsl:with-param name="sub_action" select="$sub_action"/>
|
---|
| 250 | <xsl:with-param name="authen_service" select="$authen_service"/>
|
---|
| 251 | <xsl:with-param name="pro_action" select="$pro_action"/>
|
---|
| 252 | <xsl:with-param name="un_s" select="$un_s"/>
|
---|
| 253 | <xsl:with-param name="pw_s" select="$pw_s"/>
|
---|
| 254 | <xsl:with-param name="asn" select="$asn"/>
|
---|
| 255 | </xsl:call-template>
|
---|
| 256 | </xsl:if>
|
---|
| 257 | </xsl:if>
|
---|
| 258 |
|
---|
| 259 | <!-- delete a user -->
|
---|
| 260 | <xsl:if test="$pro_action='DeleteUser'">
|
---|
| 261 | <xsl:if test="$err!=''">
|
---|
| 262 | <p align="left"><font color='red'><xsl:value-of select="$err" /></font></p>
|
---|
| 263 | </xsl:if>
|
---|
| 264 |
|
---|
| 265 | <xsl:if test="$info='confirm'">
|
---|
| 266 | <xsl:call-template name="deleteuser">
|
---|
| 267 | <xsl:with-param name="sub_action" select="$sub_action"/>
|
---|
| 268 | <xsl:with-param name="authen_service" select="$authen_service"/>
|
---|
| 269 | <xsl:with-param name="pro_action" select="$pro_action"/>
|
---|
| 270 | <xsl:with-param name="un_s" select="$un_s"/>
|
---|
| 271 | <xsl:with-param name="umun_s" select="/page/pageResponse/authenticationNode/service/@umun"/>
|
---|
| 272 | <xsl:with-param name="asn" select="$asn"/>
|
---|
| 273 | </xsl:call-template>
|
---|
| 274 | </xsl:if>
|
---|
| 275 | <xsl:if test="count(/page/pageResponse/authenticationNode/service/userNodeList) = 1">
|
---|
| 276 | <xsl:call-template name="listusers" >
|
---|
| 277 | </xsl:call-template>
|
---|
| 278 | </xsl:if>
|
---|
| 279 | </xsl:if>
|
---|
| 280 |
|
---|
| 281 | <!-- edit the user's info -->
|
---|
| 282 | <xsl:if test="$pro_action='EditUser'">
|
---|
| 283 | <xsl:if test="$err!='' and $err!='umpw-err' and $err!='umun-err' and $err!='ini-umpw-err' and $err!='un-exist'">
|
---|
| 284 | <p align="left"><font color='red'><xsl:value-of select="$err" /></font></p>
|
---|
| 285 | </xsl:if>
|
---|
| 286 |
|
---|
| 287 | <xsl:if test="$info='edituser-interface'">
|
---|
| 288 | <h2 align="left"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.edit_user_information')"/></h2>
|
---|
| 289 | <xsl:if test="$err='umpw-err'">
|
---|
| 290 | <p align="left"><font color="red"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.password_err')"/></font></p>
|
---|
| 291 | </xsl:if>
|
---|
| 292 | <xsl:if test="$err='umun-err'">
|
---|
| 293 | <p align="left"><font color="red"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.unsername_err')"/></font></p>
|
---|
| 294 | </xsl:if>
|
---|
| 295 | <xsl:if test="$err='ini-umpw-err'">
|
---|
| 296 | <p align="left"><font color="red"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.password_initial')"/></font></p>
|
---|
| 297 | </xsl:if>
|
---|
| 298 | <xsl:if test="$err='un-exist'">
|
---|
| 299 | <p align="left"><font color='red'><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.user_has_existed')"/></font></p>
|
---|
| 300 | </xsl:if>
|
---|
| 301 | <xsl:call-template name="edituser" >
|
---|
| 302 | <xsl:with-param name="sub_action" select="$sub_action"/>
|
---|
| 303 | <xsl:with-param name="authen_service" select="$authen_service"/>
|
---|
| 304 | <xsl:with-param name="pro_action" select="$pro_action"/>
|
---|
| 305 | <xsl:with-param name="umun_s" select="/page/pageResponse/authenticationNode/service/@umun"/>
|
---|
| 306 | <xsl:with-param name="umpw_s" select="/page/pageResponse/authenticationNode/service/@umpw"/>
|
---|
| 307 | <xsl:with-param name="umas_s" select="/page/pageResponse/authenticationNode/service/@umas"/>
|
---|
| 308 | <xsl:with-param name="umgp_s" select="/page/pageResponse/authenticationNode/service/@umgp"/>
|
---|
| 309 | <xsl:with-param name="umc_s" select="/page/pageResponse/authenticationNode/service/@umc"/>
|
---|
| 310 | <xsl:with-param name="oumun_s" select="/page/pageResponse/authenticationNode/service/@oumun"/>
|
---|
| 311 | <xsl:with-param name="un_s" select="$un_s"/>
|
---|
| 312 | <xsl:with-param name="pw_s" select="$pw_s"/>
|
---|
| 313 | <xsl:with-param name="asn" select="$asn"/>
|
---|
| 314 | </xsl:call-template>
|
---|
| 315 | </xsl:if>
|
---|
| 316 | <xsl:if test="$info='all-un'">
|
---|
| 317 | <xsl:if test="count(/page/pageResponse/authenticationNode/service/userNodeList) = 1">
|
---|
| 318 | <xsl:call-template name="listusers" >
|
---|
| 319 | </xsl:call-template>
|
---|
| 320 | </xsl:if>
|
---|
| 321 | </xsl:if>
|
---|
| 322 | </xsl:if>
|
---|
| 323 |
|
---|
| 324 | </div>
|
---|
| 325 | </td>
|
---|
| 326 | </tr>
|
---|
| 327 | </table>
|
---|
| 328 | <div id="navbar">
|
---|
| 329 | <xsl:call-template name="greenstoneFooter" />
|
---|
| 330 | </div>
|
---|
| 331 | </div>
|
---|
| 332 | </body>
|
---|
| 333 | </html>
|
---|
| 334 | </xsl:template>
|
---|
| 335 |
|
---|
| 336 | <!--template name="login"-->
|
---|
| 337 | <xsl:template name="login">
|
---|
| 338 | <xsl:param name="sub_action"/>
|
---|
| 339 | <xsl:param name="authen_service"/>
|
---|
| 340 | <xsl:param name="pro_action"/>
|
---|
| 341 | <div>
|
---|
| 342 | <form id="LoginForm" method="get" action="{$library_name}">
|
---|
| 343 | <input type='hidden' name='a' value='g'/>
|
---|
| 344 | <input type='hidden' name='sa' value='{$sub_action}'/>
|
---|
| 345 | <input type='hidden' name='s' value='{$authen_service}'/>
|
---|
| 346 | <input type='hidden' name='rt' value='r'/>
|
---|
| 347 | <input type='hidden' name='s1.asn' value='0'/>
|
---|
| 348 | <input type='hidden' name='s1.uan' value='1'/>
|
---|
| 349 | <input type='hidden' name='s1.aup' value='{$pro_action}'/>
|
---|
| 350 | <input type='hidden' name='s1.umpw1' value=''/>
|
---|
| 351 | <input type='hidden' name='s1.umpw2' value=''/>
|
---|
| 352 | <input type='hidden' name='s1.umc' value=''/>
|
---|
| 353 | <input type='hidden' name='s1.umgp' value=''/>
|
---|
| 354 | <input type='hidden' name='s1.umun' value=''/>
|
---|
| 355 | <input type='hidden' name='s1.umpw' value=''/>
|
---|
| 356 | <input type='hidden' name='s1.umas' value=''/>
|
---|
| 357 |
|
---|
| 358 | <table align="center">
|
---|
| 359 | <tr>
|
---|
| 360 | <td><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.username')"/></td><td><input type="string" name="s1.un" size="10" value=""/></td><td></td>
|
---|
| 361 | </tr>
|
---|
| 362 | <tr>
|
---|
| 363 | <td><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.password')"/></td><td><input type="password" name="s1.pw" size="10" value=""/></td><td>
|
---|
| 364 | <input type="submit" value="submit"></input></td>
|
---|
| 365 | </tr>
|
---|
| 366 | </table>
|
---|
| 367 | </form>
|
---|
| 368 | </div>
|
---|
| 369 | </xsl:template>
|
---|
| 370 |
|
---|
| 371 | <!--template name="listusers"-->
|
---|
| 372 | <xsl:template name="listusers" >
|
---|
| 373 | <h2 align="left"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.list_of_current_users_title')"/></h2>
|
---|
| 374 |
|
---|
| 375 | <table id='mainTable' align="left" border="0" cellspacing="1" cellpadding="3" width="100%" >
|
---|
| 376 | <tr>
|
---|
| 377 | <th bgcolor="#d0d0d0"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.username')"/></th>
|
---|
| 378 | <th bgcolor="#d0d0d0"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.account_status')"/></th>
|
---|
| 379 | <th bgcolor="#d0d0d0"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.groups')"/></th>
|
---|
| 380 | <th bgcolor="#d0d0d0"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.comment')"/></th>
|
---|
| 381 | <th bgcolor="#d0d0d0"></th>
|
---|
| 382 | </tr>
|
---|
| 383 | <xsl:for-each select="/page/pageResponse/authenticationNode/service/userNodeList/userNode">
|
---|
| 384 | <tr>
|
---|
| 385 | <td bgcolor="#eeeeee"><xsl:value-of select="@umun"/></td>
|
---|
| 386 | <td id="status" bgcolor="#eeeeee">
|
---|
| 387 | <script type="text/javascript">
|
---|
| 388 | <xsl:text disable-output-escaping="yes">
|
---|
| 389 | var status="</xsl:text><xsl:value-of select="@umas"/><xsl:text disable-output-escaping="yes">";
|
---|
| 390 | if (status=="true"){
|
---|
| 391 | document.getElementById("status").innerHTML="enabled";
|
---|
| 392 | }
|
---|
| 393 | if (status=="false"){
|
---|
| 394 | document.getElementById("status").innerHTML="disabled";
|
---|
| 395 | }
|
---|
| 396 | </xsl:text>
|
---|
| 397 | </script>
|
---|
| 398 | </td>
|
---|
| 399 | <td id="group" bgcolor="#eeeeee">
|
---|
| 400 | <script type="text/javascript">
|
---|
| 401 | <xsl:text disable-output-escaping="yes">
|
---|
| 402 | var groups="</xsl:text><xsl:value-of select="@umgp"/><xsl:text disable-output-escaping="yes">";
|
---|
| 403 | var split_groups= groups.split(",");
|
---|
| 404 | var new_groups="";
|
---|
| 405 | for (j=0; j < split_groups.length ; j++){
|
---|
| 406 | new_groups+=split_groups[j]+" <br /> ";
|
---|
| 407 | }
|
---|
| 408 | document.getElementById('group').innerHTML=new_groups;
|
---|
| 409 | </xsl:text>
|
---|
| 410 | </script>
|
---|
| 411 | </td>
|
---|
| 412 | <td bgcolor="#eeeeee"><xsl:value-of select="@umc"/></td>
|
---|
| 413 | <td bgcolor="#eeeeee">
|
---|
| 414 | <form name="ListUsersForm" method="get" action="{$library_name}">
|
---|
| 415 | <input type='hidden' name='a' value='g'/>
|
---|
| 416 | <input type='hidden' name='sa' value='authen'/>
|
---|
| 417 | <input type='hidden' name='s' value='Authentication'/>
|
---|
| 418 | <input type='hidden' name='rt' value='r'/>
|
---|
| 419 | <input type='hidden' name='s1.asn' value='1'/>
|
---|
| 420 | <input type='hidden' name='s1.uan' value='1'/>
|
---|
| 421 |
|
---|
| 422 | <input type='hidden'><xsl:attribute name="name">s1.oumun</xsl:attribute><xsl:attribute name="value"><xsl:value-of select="@umun"/></xsl:attribute></input>
|
---|
| 423 | <input type='hidden'><xsl:attribute name="name">s1.umun</xsl:attribute><xsl:attribute name="value"><xsl:value-of select="@umun"/></xsl:attribute></input>
|
---|
| 424 | <input type='hidden' name='s1.cm' value=''/>
|
---|
| 425 |
|
---|
| 426 | <input type="submit"><xsl:attribute name="name">s1.aup</xsl:attribute><xsl:attribute name="value">EditUser</xsl:attribute></input>
|
---|
| 427 | <input type="submit"><xsl:attribute name="name">s1.aup</xsl:attribute><xsl:attribute name="value">DeleteUser</xsl:attribute></input>
|
---|
| 428 | </form>
|
---|
| 429 | </td>
|
---|
| 430 | </tr>
|
---|
| 431 | </xsl:for-each>
|
---|
| 432 | </table>
|
---|
| 433 | </xsl:template>
|
---|
| 434 |
|
---|
| 435 | <!--template name="modifypassword"-->
|
---|
| 436 | <xsl:template name="modifypassword" >
|
---|
| 437 | <xsl:param name="sub_action"/>
|
---|
| 438 | <xsl:param name="authen_service"/>
|
---|
| 439 | <xsl:param name="pro_action"/>
|
---|
| 440 | <xsl:param name="un_s"/>
|
---|
| 441 | <xsl:param name="pw_s"/>
|
---|
| 442 | <xsl:param name="asn"/>
|
---|
| 443 | <div>
|
---|
| 444 | <form id="modifyForm" method="get" action="{$library_name}">
|
---|
| 445 | <input type='hidden' name='a' value='g'/>
|
---|
| 446 | <input type='hidden' name='sa' value='{$sub_action}'/>
|
---|
| 447 | <input type='hidden' name='s' value='{$authen_service}'/>
|
---|
| 448 | <input type='hidden' name='rt' value='r'/>
|
---|
| 449 | <input type='hidden' name='s1.un' value='{$un_s}'/>
|
---|
| 450 | <input type='hidden' name='s1.pw' value='{$pw_s}'/>
|
---|
| 451 | <input type='hidden' name='s1.asn' value='{$asn}'/>
|
---|
| 452 | <input type='hidden' name='s1.uan' value='1'/>
|
---|
| 453 | <input type='hidden' name='s1.aup' value='{$pro_action}'/>
|
---|
| 454 |
|
---|
| 455 | <table align="center"><tr><td align="right">
|
---|
| 456 | <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.old_password')"/></td><td><input type="password" name="s1.umpw" size="10" value=""/></td></tr>
|
---|
| 457 | <tr><td align="right">
|
---|
| 458 | <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.new_password')"/></td><td><input type="password" name="s1.umpw1" size="10" value=""/></td></tr>
|
---|
| 459 | <tr><td align="right">
|
---|
| 460 | <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.retype_new_password')"/></td><td><input type="password" name="s1.umpw2" size="10" value=""/></td></tr>
|
---|
| 461 | <tr><td></td><td>
|
---|
| 462 | <input type="submit" value="submit"></input></td>
|
---|
| 463 | </tr>
|
---|
| 464 | </table>
|
---|
| 465 | </form>
|
---|
| 466 | </div>
|
---|
| 467 | </xsl:template>
|
---|
| 468 |
|
---|
| 469 | <!--template name="deleteuser"-->
|
---|
| 470 | <xsl:template name="deleteuser">
|
---|
| 471 | <xsl:param name="sub_action"/>
|
---|
| 472 | <xsl:param name="authen_service"/>
|
---|
| 473 | <xsl:param name="pro_action"/>
|
---|
| 474 | <xsl:param name="un_s"/>
|
---|
| 475 | <xsl:param name="umun_s"/>
|
---|
| 476 | <xsl:param name="asn"/>
|
---|
| 477 | <div >
|
---|
| 478 | <form id="deleteForm" method="get" action="{$library_name}">
|
---|
| 479 | <input type='hidden' name='a' value='g'/>
|
---|
| 480 | <input type='hidden' name='sa' value='{$sub_action}'/>
|
---|
| 481 | <input type='hidden' name='s' value='{$authen_service}'/>
|
---|
| 482 | <input type='hidden' name='rt' value='r'/>
|
---|
| 483 | <input type='hidden' name='s1.aup' value='{$pro_action}'/>
|
---|
| 484 | <input type='hidden' name='s1.asn' value='{$asn}'/>
|
---|
| 485 | <input type='hidden' name='s1.uan' value='1'/>
|
---|
| 486 | <input type='hidden' name='s1.umun' value='{$umun_s}'/>
|
---|
| 487 | <p><font color='red'><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.do_you_really_want_to_permanently_remove_user')"/> <xsl:value-of select="$umun_s"/>" ?</font></p>
|
---|
| 488 | <input type="submit" value="yes"><xsl:attribute name="name">s1.cm</xsl:attribute></input>
|
---|
| 489 | <input type="submit" value="no"><xsl:attribute name="name">s1.cm</xsl:attribute></input>
|
---|
| 490 | </form>
|
---|
| 491 | </div>
|
---|
| 492 | </xsl:template>
|
---|
| 493 |
|
---|
| 494 | <!--template name="edituser"-->
|
---|
| 495 | <xsl:template name="edituser" >
|
---|
| 496 | <xsl:param name="sub_action"/>
|
---|
| 497 | <xsl:param name="authen_service"/>
|
---|
| 498 | <xsl:param name="pro_action"/>
|
---|
| 499 | <xsl:param name="un_s"/>
|
---|
| 500 | <xsl:param name="pw_s"/>
|
---|
| 501 | <xsl:param name="umun_s"/>
|
---|
| 502 | <xsl:param name="umpw_s"/>
|
---|
| 503 | <xsl:param name="umas_s"/>
|
---|
| 504 | <xsl:param name="umgp_s"/>
|
---|
| 505 | <xsl:param name="umc_s"/>
|
---|
| 506 | <xsl:param name="oumun_s"/>
|
---|
| 507 | <xsl:param name="asn"/>
|
---|
| 508 | <div>
|
---|
| 509 | <form id="editForm" method="get" action="{$library_name}">
|
---|
| 510 | <input type='hidden' name='a' value='g'/>
|
---|
| 511 | <input type='hidden' name='sa' value='{$sub_action}'/>
|
---|
| 512 | <input type='hidden' name='s' value='{$authen_service}'/>
|
---|
| 513 | <input type='hidden' name='rt' value='r'/>
|
---|
| 514 | <input type='hidden' name='s1.asn' value='{$asn}'/>
|
---|
| 515 | <input type='hidden' name='s1.uan' value='1'/>
|
---|
| 516 | <input type='hidden' name='s1.aup' value='{$pro_action}'/>
|
---|
| 517 | <input type='hidden' name='s1.un' value='{$un_s}'/>
|
---|
| 518 | <input type='hidden' name='s1.pw' value='{$pw_s}'/>
|
---|
| 519 |
|
---|
| 520 | <table align="left" ><tr><td>
|
---|
| 521 | <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.username')"/></td><td><input type="text" name="s1.umun" size="15" value="{$umun_s}"/></td><td><font color="gray"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.username_describe')"/></font></td></tr>
|
---|
| 522 | <tr><td>
|
---|
| 523 | <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.password')"/></td><td><input type="password" name="s1.umpw" size="15" value="{$umpw_s}"/></td><td><font color="gray"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.password_describe')"/></font></td></tr>
|
---|
| 524 | <tr><td>
|
---|
| 525 | <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.account_status')"/></td><td>
|
---|
| 526 | <select name="s1.umas">
|
---|
| 527 | <xsl:if test="$umas_s=''">
|
---|
| 528 | <option value="true" selected="selected"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.enabled')"/></option>
|
---|
| 529 | <option value="false"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.disabled')"/></option>
|
---|
| 530 | </xsl:if>
|
---|
| 531 | <xsl:if test="$umas_s='true'">
|
---|
| 532 | <option value="true" selected="selected"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.enabled')"/></option>
|
---|
| 533 | <option value="false"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.disabled')"/></option>
|
---|
| 534 | </xsl:if>
|
---|
| 535 | <xsl:if test="$umas_s='false'">
|
---|
| 536 | <option value="true"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.enabled')"/></option>
|
---|
| 537 | <option value="false" selected="selected"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.disabled')"/></option>
|
---|
| 538 | </xsl:if>
|
---|
| 539 | </select></td><td></td></tr>
|
---|
| 540 | <tr><td>
|
---|
| 541 | <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.groups')"/></td><td><input type="text" id="group" name="s1.umgp" size="70" value="{$umgp_s}"/></td><td><font color="gray"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.groups_describe')"/></font></td></tr>
|
---|
| 542 | <tr>
|
---|
| 543 | <td></td>
|
---|
| 544 | <td align="right"> <select id="groups" size="0">
|
---|
| 545 | <script type="text/javascript">
|
---|
| 546 | <xsl:text disable-output-escaping="yes">
|
---|
| 547 | var group_arr=Array("administrator","all-collections-editor","personal-collections-editor");
|
---|
| 548 | var group_string=document.getElementById("group").value;
|
---|
| 549 | var split_group_string=group_string.split(",");
|
---|
| 550 | var find=0;
|
---|
| 551 | for (i=0; i < group_arr.length; i++){
|
---|
| 552 | find=0;
|
---|
| 553 | for (j=0; j < group_arr.length; j++){
|
---|
| 554 | if (split_group_string[j]==group_arr[i]){
|
---|
| 555 | find=1;
|
---|
| 556 | }
|
---|
| 557 | }
|
---|
| 558 | if (find==0){
|
---|
| 559 | op = document.createElement('option');
|
---|
| 560 | op.innerHTML = group_arr[i];
|
---|
| 561 | op.setAttribute("value", group_arr[i]);
|
---|
| 562 | document.getElementById("groups").appendChild(op);
|
---|
| 563 | }
|
---|
| 564 | }
|
---|
| 565 |
|
---|
| 566 | </xsl:text>
|
---|
| 567 | </script>
|
---|
| 568 | </select></td><td><input type="button" name="addGroupButton" value="add" onClick="addGroup('groups')"/></td>
|
---|
| 569 | </tr>
|
---|
| 570 | <tr>
|
---|
| 571 | <td></td>
|
---|
| 572 | <td align="right">
|
---|
| 573 | <select id="collects" size="0">
|
---|
| 574 | <xsl:for-each select="/page/pageResponse/collectionList/collection">
|
---|
| 575 | <script type="text/javascript">
|
---|
| 576 | <xsl:text disable-output-escaping="yes">
|
---|
| 577 | var group="</xsl:text><xsl:value-of select="@name"/>-collection-editor<xsl:text disable-output-escaping="yes">";
|
---|
| 578 | var group_string=document.getElementById("group").value;
|
---|
| 579 | var split_group_string=group_string.split(",");
|
---|
| 580 | var find=0;
|
---|
| 581 | for (i=0; i < split_group_string.length; i++){
|
---|
| 582 | if (split_group_string[i]==group){
|
---|
| 583 | find=1;
|
---|
| 584 | }
|
---|
| 585 | }
|
---|
| 586 | if (find==0){
|
---|
| 587 | op = document.createElement('option');
|
---|
| 588 | op.innerHTML = group;
|
---|
| 589 | op.setAttribute("value", group);
|
---|
| 590 | document.getElementById("collects").appendChild(op);
|
---|
| 591 | }
|
---|
| 592 | </xsl:text>
|
---|
| 593 | </script>
|
---|
| 594 | </xsl:for-each>
|
---|
| 595 | </select>
|
---|
| 596 | </td>
|
---|
| 597 | <td><input type="button" name="addGroupButton" value="add" onClick="addGroup('collects')"/></td>
|
---|
| 598 | </tr>
|
---|
| 599 | <tr><td>
|
---|
| 600 | <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.comment')"/></td><td colspan="2"><div><textarea cols="40" rows="5" name="s1.umc"><xsl:value-of select="$umc_s"/>
|
---|
| 601 |
|
---|
| 602 | </textarea></div></td></tr>
|
---|
| 603 | <tr>
|
---|
| 604 |
|
---|
| 605 | <td></td><td>
|
---|
| 606 | <input type="submit" value="submit"><xsl:attribute name="name">s1.cm</xsl:attribute></input>
|
---|
| 607 | <xsl:if test="$pro_action!='AddUser'">
|
---|
| 608 | <input type="submit" value="cancel"><xsl:attribute name="name">s1.cm</xsl:attribute></input>
|
---|
| 609 | </xsl:if>
|
---|
| 610 | </td><td></td></tr>
|
---|
| 611 | </table>
|
---|
| 612 | <input type='hidden' name='s1.oumun' value='{$oumun_s}'/>
|
---|
| 613 | </form>
|
---|
| 614 | </div>
|
---|
| 615 | </xsl:template>
|
---|
| 616 |
|
---|
| 617 | <!-- addGroup() javascript -->
|
---|
| 618 | <xsl:template name="addGroup">
|
---|
| 619 | <script type="text/javascript">
|
---|
| 620 | <xsl:text disable-output-escaping="yes">
|
---|
| 621 | function addGroup(g){
|
---|
| 622 | var itemSelected;
|
---|
| 623 | var splitGroup;
|
---|
| 624 | var groupExit;
|
---|
| 625 |
|
---|
| 626 | if (document.getElementById("editForm")!=null){
|
---|
| 627 | //itemSelected=document.getElementById("editForm").groups.options.selectedIndex;
|
---|
| 628 | itemSelected=document.getElementById(g).options.selectedIndex;
|
---|
| 629 | if (document.getElementById(g).options[itemSelected].text!=""){
|
---|
| 630 | if (document.getElementById("group").value==""){
|
---|
| 631 | document.getElementById("group").value=document.getElementById("group").value+document.getElementById(g).options[itemSelected].text;
|
---|
| 632 | }else{
|
---|
| 633 | splitGroup=document.getElementById("group").value.split(",");
|
---|
| 634 | for (var i=0; i < splitGroup.length; i++){
|
---|
| 635 | if (splitGroup[i]==document.getElementById(g).options[itemSelected].text){
|
---|
| 636 | alert(document.getElementById(g).options[itemSelected].text + " has been added.");
|
---|
| 637 | groupExit=1;
|
---|
| 638 | break;
|
---|
| 639 | }
|
---|
| 640 | }
|
---|
| 641 | if (groupExit!=1) {
|
---|
| 642 | document.getElementById("group").value=document.getElementById("group").value+","+document.getElementById(g).options[itemSelected].text;
|
---|
| 643 | }
|
---|
| 644 | }
|
---|
| 645 | document.getElementById(g).options[itemSelected]=new Option("",itemSelected);
|
---|
| 646 | }
|
---|
| 647 | }
|
---|
| 648 | }
|
---|
| 649 | </xsl:text>
|
---|
| 650 | </script>
|
---|
| 651 | </xsl:template>
|
---|
| 652 |
|
---|
| 653 | </xsl:stylesheet>
|
---|
| 654 |
|
---|