bcom/creating_discussion.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&egrave;res autoris&eacutes sont :<br/> abcdefghijklmnopqrstuvwxyz<wbr/>ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789<wbr/> &eacute;&egrave;&agrave;&mu;_-\'()[\\]\\\\/<wbr/>,;:.&sect;!&ugrave;%&pound;$&curren;=+-*\\#~"|&ccedil;@';
echo $_POST['name']; header('Location:discuts.php');
goto end;
}
header('Location:discuts.php');
end: