Subversion Repositories DevTools

Rev

Rev 5590 | Rev 6048 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 5590 Rev 5983
Line 15... Line 15...
15
<!--#include file="common/common_dbedit.asp"-->
15
<!--#include file="common/common_dbedit.asp"-->
16
<!--#include file="common/_popup_window_common.asp"-->
16
<!--#include file="common/_popup_window_common.asp"-->
17
<%
17
<%
18
'------------ ACCESS CONTROL ------------------
18
'------------ ACCESS CONTROL ------------------
19
%>
19
%>
20
<!--#include file="_access_control_login.asp"-->
-
 
21
<!--#include file="_access_control_general.asp"-->
20
<!--#include file="_access_control_general.asp"-->
22
<%
21
<%
23
'------------ Variable Definition -------------
22
'------------ Variable Definition -------------
24
Dim parProj
23
Dim parProj
25
Dim sMessage
24
Dim sMessage
-
 
25
Dim bCanEdit
26
'------------ Constants Declaration -----------
26
'------------ Constants Declaration -----------
27
'------------ Variable Init -------------------
27
'------------ Variable Init -------------------
28
parProj = QStrPar("FRproj")
28
parProj = QStrPar("FRproj")
29
sMessage = NULL
29
sMessage = NULL
-
 
30
bCanEdit = canActionControl("CreateNewProject")
30
'----------------------------------------------
31
'----------------------------------------------
31
%>
32
%>
32
<%
33
<%
33
Function Create_New_Project( SSprojectname )
34
Function Create_New_Project( SSprojectname )
34
   Dim SEQ_proj_id
35
   Dim SEQ_proj_id
Line 65... Line 66...
65
<%
66
<%
66
'Process submition
67
'Process submition
67
If CBool(QStrPar("action")) Then
68
If CBool(QStrPar("action")) Then
68
    If NOT objAccessControl.UserLogedIn Then
69
    If NOT objAccessControl.UserLogedIn Then
69
        sMessage = "User is no longer logged in"
70
        sMessage = "User is no longer logged in"
-
 
71
    ElseIf NOT bCanEdit Then
-
 
72
        sMessage = "User is no longer authorised to create a new Projects"
70
    ElseIf NOT parProj <> "" Then
73
    ElseIf NOT parProj <> "" Then
71
        sMessage = "No Project name specified"
74
        sMessage = "No Project name specified"
72
    ElseIf LEN(parProj) < 4 Then
75
    ElseIf LEN(parProj) < 4 Then
73
        sMessage = "Project Name is too short."
76
        sMessage = "Project Name is too short."
74
    ElseIf Project_Name_Exists( parProj ) Then
77
    ElseIf Project_Name_Exists( parProj ) Then
75
        sMessage = "Project Name already exists"
78
        sMessage = "Project Name already exists"
76
    Else
79
    Else
77
        Call Create_New_Project ( parProj ) 
80
        Call Create_New_Project ( parProj ) 
78
    End If
81
    End If
-
 
82
Else
-
 
83
    If NOT objAccessControl.UserLogedIn Then
-
 
84
        sMessage = "User is not logged in and can't create a new Project"
-
 
85
    ElseIf NOT bCanEdit Then
-
 
86
        sMessage = "User is not authorised to create a new Projects"
-
 
87
    End If
79
End If
88
End If
80
%>
89
%>
81
<html>
90
<html>
82
<head>
91
<head>
83
<meta HTTP-EQUIV="Pragma" CONTENT="no-cache">
92
<meta HTTP-EQUIV="Pragma" CONTENT="no-cache">
Line 109... Line 118...
109
          </td>
118
          </td>
110
        </tr>
119
        </tr>
111
        <tr> 
120
        <tr> 
112
          <td><%=ProgressBar()%></td>
121
          <td><%=ProgressBar()%></td>
113
          <td align="right">
122
          <td align="right">
-
 
123
          <%If bCanEdit Then%>
114
            <input type="submit" name="btn" value="Create" class="form_btn_comp">
124
            <input type="submit" name="btn" value="Create" class="form_btn_comp">
-
 
125
          <%End If%>
115
            <input type="reset" name="btn" value="Cancel" class="form_btn_comp" onclick="parent.closeIFrame();">
126
            <input type="reset" name="btn" value="Cancel" class="form_btn_comp" onclick="parent.closeIFrame();">
116
          </td>
127
          </td>
117
        </tr>
128
        </tr>
118
      </table>
129
      </table>
119
    </form>
130
    </form>