2019-12-27 01:57:39 +01:00
< ? php
include ( 'config.php' );
include_once 'mail.php' ;
?>
<! DOCTYPE html >
< html >
< head >
< meta charset = " utf-8 " />
< link rel = " stylesheet " type = " text/css " href = " stylesheet.css " />
< link href = " <?php echo $design ; ?>/style.css " rel = " stylesheet " title = " Style " />
< script src = " jquery.js " ></ script >
< script src = " menus.js " ></ script >
< link rel = " shortcut icon " type = " image/x-icon " href = " Images/favicon_ie.ico " >
< title > Festiv ' Algo - Publier un algorithme </ title >
</ head >
< body >
< div id = " content " >
< ? php include ( " menu.php " ); ?>
< div id = " contenu " >
< ? php
$prog = str_replace ( '@' , ';' , $_COOKIE [ " algo " ]);
$prog = str_replace ( '¤' , '+' , $prog );
if ( isset ( $_POST [ 'titre' ], $_POST [ 'auteur' ], $_POST [ 'mail' ], $_POST [ 'description' ]) && $_POST [ 'titre' ] != " " && $_POST [ 'auteur' ] != " " && $_POST [ 'mail' ] != " " && $_POST [ 'description' ] != " " )
{
$titre = str_replace ( '\\' , '' , $_POST [ 'titre' ]);
$auteur = str_replace ( '\\' , '' , $_POST [ 'auteur' ]);
$mail = str_replace ( '\\' , '' , $_POST [ 'mail' ]);
$description = str_replace ( '\\' , '' , $_POST [ 'description' ]);
$prog = str_replace ( '\\' , '' , $prog );
mysql_query ( " INSERT INTO exemples_en_attente(titre, auteur, mail, description, programme) VALUES(' " . $titre . " ', ' " . $auteur . " ', ' " . $mail . " ', ' " . $description . " ', ' " . $prog . " ') " );
$id = mysql_insert_id ();
2019-12-27 02:42:56 +01:00
$message = " <b> " . $titre . " </b><br /><br /><i> " . $auteur . " <br /> " . $mail . " </i><br /><br /> " . $description . " <br /><br /> " . $prog . " <br /><br /><center><a href=' " . $base_url . " /publier_admin.php?id= " . $id . " '>>>> Publier <<<</a></center> " ;
2019-12-27 01:57:39 +01:00
send_mail ( " bruno-godefroy@sfr.fr " , 'Nouvel exemple : ' . $titre , $message );
echo " <div class='message'>Votre algorithme a été soumis. Vous recevrez une réponse par mail prochainement.<br /><br />Merci de votre participation.</div> " ;
}
else
{
if ( $_POST [ 'code' ] == '' )
echo " <div class='message'>Votre algorithme comporte des erreurs.<br />Corrigez les avant de le publier.</div> " ;
else
echo " <div class='message'>Une erreur s'est produite lors de la soumission de l'algorithme.</div> " ;
}
?>
</ div >
</ div >
< ? php include ( " bas_de_page.php " ); ?>
</ body >
</ html >