Woooh, plein de nouveaux fichiers. Ajout des discussions avec des jolies classes.
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
<?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:
|
||||
Reference in New Issue
Block a user