Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
sucs-site
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
sucssite
sucs-site
Commits
0fc217a2
Commit
0fc217a2
authored
9 years ago
by
Imran Hussain
Browse files
Options
Downloads
Patches
Plain Diff
Use the built in sucs-site error handling stuff.
parent
d751ca21
No related branches found
No related tags found
3 merge requests
!32
Push changes from beta to live
,
!31
Deploy changes from dev to beta for public testing
,
!29
Use the built in sucs-site error handling stuff.
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
components/susignup-admin.php
+3
-0
3 additions, 0 deletions
components/susignup-admin.php
templates/susignup-admin.tpl
+2
-2
2 additions, 2 deletions
templates/susignup-admin.tpl
with
5 additions
and
2 deletions
components/susignup-admin.php
+
3
−
0
View file @
0fc217a2
...
...
@@ -38,16 +38,19 @@ if (isset($session->groups[$permission])) {
$smarty
->
assign
(
"error_text"
,
"Search term doesn't look like a valid student ID"
);
}
else
{
// they have given us a valid sid lets check to see if they have paid
$sid
=
$_REQUEST
[
'sid'
];
// make sure the user/admin/exec isn't an idiot
// check if they are already signed up and tell them so
$tmpresult
=
$sucsDB
->
Execute
(
"SELECT * FROM members WHERE sid=?"
,
array
(
$_REQUEST
[
'sid'
]));
if
(
$tmpresult
->
fields
[
"sid"
]
==
$sid
&&
$tmpresult
->
fields
[
"paid"
]
==
paidUntil
(
time
()))
{
// let them know they are already signed up and renewed
$mode
=
'error'
;
message_flash
(
"You are a numpty and have already signed up and paid for this year."
);
// else if check to see if they have signedup and paid for the new year but haven't renewed
}
else
if
(
$tmpresult
->
fields
[
"sid"
]
==
$sid
&&
$tmpresult
->
fields
[
"paid"
]
!=
paidUntil
(
time
()))
{
// renew them!
$mode
=
'error'
;
renew_membership
(
$tmpresult
->
fields
[
"username"
]);
// let them know that their account has been renewed
message_flash
(
"Your SUCS account has been renewed."
);
...
...
This diff is collapsed.
Click to expand it.
templates/susignup-admin.tpl
+
2
−
2
View file @
0fc217a2
{
if
$staff
==
TRUE
}
{
if
$mode
==
'error'
}
{*
{if $mode == 'error'}
<div class='errorbar'>
<strong>Error: </strong> {$error_text}
</div>
{/
if
}
{/if}
*}
{
if
$mode
==
'renewals'
}
<form
action=
'
{
$componentpath
}
'
method=
'post'
>
<table
id=
'susignup-renewals'
>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment