16 lines
814 B
PHP
16 lines
814 B
PHP
<?php
|
|
session_start();
|
|
include_once 'includes/inter.php';
|
|
if(!isConnected()){
|
|
header('Location:403.php');
|
|
goto end;
|
|
}if(getAdminLevel()<2){ header('Location:401.php'); goto end;}$regex = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 éèàµ_\\-\'()\\[\\]\\\\/,;:.§!ù%£$¤=+\\-*\\#~"|ç@';$regex = '#^['.$regex.']+$#';
|
|
if(preg_match($regex,$_POST['name']) == 1){
|
|
createDiscut();
|
|
}else{ $_SESSION['current_error'] = 'Le nom de la discussion est incorrect : les caractères autorisés sont :<br/> abcdefghijklmnopqrstuvwxyz<wbr/>ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789<wbr/> éèàμ_-\'()[\\]\\\\/<wbr/>,;:.§!ù%£$¤=+-*\\#~"|ç@';
|
|
echo $_POST['name']; header('Location:discuts.php');
|
|
goto end;
|
|
}
|
|
|
|
header('Location:discuts.php');
|
|
end: |