1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88
| <?
session_start();
include("configuration.php");
include("fonctions.php");
include("recup_config.php");
$peum = $_SESSION["pseudo"];
$Requete = mysql_query("select * from membre where id_membre='$idcon'") or die(mysql_error());
$membress = mysql_fetch_array($Requete);
$Pseudo_Membre = $pseudo_membre;
$ID_Membre = $idcon;
$act = $_GET["act"];
if ($act == envoi) {
$titre = $_POST["titre"];
$texte = $_POST["test1"];
$texte = nl2br($texte);
$time = time();
if(empty($_POST["fichier"])) {
include("upload.php");
}
$sql_insert_article= "INSERT INTO article_blog (id, id_membre, id_blog, titre, texte, date, maj, image) VALUES ('', '$idcon', '' , '$titre', '$texte', '$time', '', '$image')";
if (mysql_query($sql_insert_article) ) {
?>
Article Publier
<? } else { ?>
Erreur
<?
}
}
else {
?>
<textarea id="textarea1" name="test1" style="height: 170px; width: 500px;">
<table border="0" cellpadding="0" cellspacing="0" style="margin-left: 10px;">
<tr>
<td style="padding: 0 10 10 0;"><a href="http://www.openwebware.com/products/openwysiwyg/"><img src="http://www.openwebware.com/images/openwysiwyg/logo9060.gif" border="0" height="60" width="90" alt="openWYSIWYG - Cross-browser WYSIWYG editor"></a></td>
<td style="font-family: verdana; font-size: 11px; line-height: 130%; color: #494949;" valign="top">
<b><a href="http://www.openwebware.com/products/openwysiwyg/" style="font-family: arial; font-size: 12px; color: #055F92;">openWYSIWYG - Cross-browser WYSIWYG editor</a></b><br />
<?php
echo "Hello World";
?>
</td>
</tr>
</table>
</textarea>
<script language="javascript">
generate_wysiwyg('textarea1');
</script>
<input type="submit" id="button" />
</form>
<form action ="?mod=ecrire_article&act=envoi" name="example" enctype="multipart/form-data" method="POST">
Titre : <br>
<input type="text" name="titre" size="41">
<P>
Image : <br>
<input type ="file" name="fichier" size="41">
<p>
Texte : <br>
<textarea id="textarea1" name="test1" style="height: 170px; width: 500px;">
</textarea>
<input type="submit" name="submit" value="Envoyer">
</form>
<? } ?> |
Partager