Alternc  latest
Alternc logiel libre pour l'hébergement
adm_dorenew.php
Go to the documentation of this file.
1 <?php
2 /*
3  ----------------------------------------------------------------------
4  LICENSE
5 
6  This program is free software; you can redistribute it and/or
7  modify it under the terms of the GNU General Public License (GPL)
8  as published by the Free Software Foundation; either version 2
9  of the License, or (at your option) any later version.
10 
11  This program is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  GNU General Public License for more details.
15 
16  To read the license please visit http://www.gnu.org/copyleft/gpl.html
17  ----------------------------------------------------------------------
18 */
19 
20 /**
21  * Renew an account's access for a specific period
22  *
23  * @copyright AlternC-Team 2000-2017 https://alternc.com/
24  */
25 
26 require_once("../class/config.php");
27 
28 if (!$admin->enabled) {
29  $msg->raise("ERROR", "admin", _("This page is restricted to authorized staff"));
30  echo $msg->msg_html_all();
31  exit();
32 }
33 
34 $fields = array (
35  "uid" => array ("post", "integer", ""),
36  "periods" => array ("post", "integer", ""),
37 );
39 
40 if (!$admin->checkcreator($uid)) {
41  $msg->raise("ERROR", "admin", _("This page is restricted to authorized staff"));
42  echo $msg->msg_html_all();
43  exit();
44 }
45 
46 if (!$admin->renew_mem($uid, $periods)){
47  include("adm_edit.php");
48 } else {
49  $msg->raise("INFO", "admin", _("The member has been successfully renewed"));
50  include("adm_list.php");
51 }
52 ?>
exit
Definition: adm_doadd.php:70
if(! $admin->enabled) $fields
Renew an account's access for a specific period.
Definition: adm_dorenew.php:34
$msg
Definition: bootstrap.php:75
getFields($fields, $requestOnly=false)
Get the Fields of the posted form from $_REQUEST or POST or GET and check their type.
Definition: functions.php:688
$uid