1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156
|
<?xml version="1.0"?>
<!--
-
- $Id$
-
- This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
- project.
-
- Copyright (C) 1998-2018 OpenLink Software
-
- This project is free software; you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the
- Free Software Foundation; only version 2 of the License, dated June 1991.
-
- This program is distributed in the hope that it will be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- General Public License for more details.
-
- You should have received a copy of the GNU General Public License along
- with this program; if not, write to the Free Software Foundation, Inc.,
- 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-
-->
<v:page name="blog-home-page"
xmlns:vm="http://www.openlinksw.com/vspx/ods/"
xmlns:v="http://www.openlinksw.com/vspx/"
style="index.xsl"
doctype="-//W3C//DTD XHTML 1.0 Transitional//EN"
doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<vm:page>
<v:on-init>
<![CDATA[
select U_NAME, WAM_MEMBER_TYPE, WAM_INST into self.nam, self.st, self.wam_inst
from SYS_USERS, WA_MEMBER, WA_INSTANCE
where WAM_USER = U_ID and WAM_INST = WAI_NAME and WAI_ID = self.wai_id and U_ID = self.wam_user;
]]>
</v:on-init>
<vm:header>
<vm:title>Members Edit Page</vm:title>
</vm:header>
<vm:pagewrapper>
<vm:variable name="nam" type="varchar" default="null" />
<vm:variable name="wam_inst" type="varchar" default="null" />
<vm:variable name="st" type="int" default="null" />
<vm:variable name="wai_id" type="int" default="null" param-name="wai_id"/>
<vm:variable name="wam_user" type="int" default="null" param-name="m"/>
<vm:navigation on="settings"/>
<vm:navigation1 on="members"/>
<vm:rawheader caption="Edit Member Settings"/>
<vm:body>
<vm:login redirect="index.vspx"/>
<div class="box">
<v:form type="simple" method="POST" name="embf1">
<table>
<tr>
<td>Member</td><td><b><v:label name="nam1" value="--self.nam" /></b></td>
</tr>
<tr>
<td>Status</td>
<td>
<v:select-list name="st1" value="--self.st">
<v:item value="-1" name="pending" />
<v:item value="1" name="owner" />
<v:item value="2" name="admin" />
<v:item value="3" name="member" />
</v:select-list>
</td>
</tr>
<tr>
<td>
<v:button action="simple" value="Accept" name="emb1">
<v:on-post><![CDATA[
if (self.st = 1 and self.st1.ufl_value <> '1')
signal ('22023', 'Owner of application can\'t be changed');
if (self.st <> 1 and self.st1.ufl_value = '1')
signal ('22023', 'Owner of application can\'t be changed');
if (self.st1.ufl_value in ('-1','2','3'))
{
declare inst web_app;
declare h any;
select WAI_INST into inst from WA_INSTANCE where WAI_NAME = self.wam_inst;
{
declare exit handler for sqlstate '*' {
self.vc_is_valid := 0;
declare _use_sys_errors, _sys_error, _error any;
_sys_error := concat (__SQL_STATE,' ',__SQL_MESSAGE);
_error := 'Due to a transient problem in the system, your approval could not be
processed at the moment. The system administrators have been notified. Please
try again later';
_use_sys_errors := (select top 1 WS_SHOW_SYSTEM_ERRORS from WA_SETTINGS);
if(_use_sys_errors) {
self.vc_error_message := _error || ' ' || _sys_error;
}
else {
self.vc_error_message := _error;
}
rollback work;
return;
};
update WA_MEMBER set WAM_MEMBER_TYPE = atoi (self.st1.ufl_value) where
WAM_USER = self.wam_user and WAM_INST = self.wam_inst;
}
h := udt_implements_method (inst, 'wa_join_approve');
if (h)
call (h) (inst, self.nam);
}
]]>
</v:on-post>
</v:button>
</td>
<td>
<v:button action="simple" value="Reject" name="emr1">
<v:on-post><![CDATA[
if (self.st = 1)
signal ('22023', 'Owner of application can\'t be deleted');
{
declare exit handler for sqlstate '*' {
self.vc_is_valid := 0;
declare _use_sys_errors, _sys_error, _error any;
_sys_error := concat (__SQL_STATE,' ',__SQL_MESSAGE);
_error := 'Due to a transient problem in the system, your rejection could not be
processed at the moment. The system administrators have been notified. Please
try again later';
_use_sys_errors := (select top 1 WS_SHOW_SYSTEM_ERRORS from WA_SETTINGS);
if(_use_sys_errors) {
self.vc_error_message := _error || ' ' || _sys_error;
}
else {
self.vc_error_message := _error;
}
rollback work;
return;
};
delete from WA_MEMBER where WAM_MEMBER_TYPE = -1 and WAM_USER = self.wam_user
and WAM_INST = self.wam_inst;
}
http_request_status ('HTTP/1.1 302 Found');
http_header (sprintf ('Location: inst.vspx?sid=%s&realm=%s\r\n', self.sid, self.realm));
]]>
</v:on-post>
</v:button>
</td>
</tr>
</table>
</v:form>
</div>
<div class="box">
<vm:home-link name="back">Back</vm:home-link>
</div>
</vm:body>
</vm:pagewrapper>
</vm:page>
</v:page>
|