<html dir=rtl>
<style type="text/css">
a , input, textarea {
text-decoration: none;
font-size: 9pt;
font-family: arial, tahoma;
font-weight: bold;
color: Black;
}
</style>
<center>
<?php
require ("config.php");
$blaa = mysql_query ("SELECT * From colors");
$bla = mysql_fetch_array ($blaa);
echo "<font face=Arial size=2>";
$us = $_POST['username'];
if ( ! isset ($_COOKIE['users'])) {
echo "<br>";
echo "אורח, אתה חייב";
echo "<a href=#> להתחבר </a>";
echo "כדי להכנס לעמוד זה. ";
echo "במידה ואתה עוד לא רשום,";
echo "<a href=#> הירשם כעת. </a>"; }
else {
echo "<br><br>";
echo "<font face=Arial size=2>";
echo "<b><br>כתוב הודעה חדשה:<br></b>";
?>
<form method="POST">
<br>נושא: <input type="text" size="83" name="subject"><br><br>
<textarea style="visibility:hidden;position:absolute;top:-20;left:-20;width:1px;direction:rtl;height:1px" rows="5" cols="45" name="textare" id="textare"></textarea>
<style type='text/css'>@import url(richedit/styles/office2007/style.css);</style>
<script language="JavaScript" type="text/javascript" src="richedit/editor.js?version=4.2"></script>
<script language="JavaScript" type="text/javascript">
var getdata = document.getElementById("textare").value;
Instantiate("min","editor", getdata , "580px", "125px");
//For Vietnamese User. Edit file editor.js to enable vietnamese keyboard
if(enable_vietnamese_keyboard==1){
document.write("<script language=JavaScript type='text/javascript' src='richedit/avim.js'><
\\/script>");
var hoteditor_avim_method = hot_readCookie("hoteditor_avim_method");var him_auto_checked="";var him_telex_checked="";var him_vni_checked="";var him_viqr_checked="";var him_viqr2_checked="";var him_off_checked="";if(hoteditor_avim_method=="0"){him_auto_checked="checked";}else if(hoteditor_avim_method=="1"){him_telex_checked="checked";}else if(hoteditor_avim_method=="2"){him_vni_checked="checked";}else if(hoteditor_avim_method=="3"){him_viqr_checked="checked";}else if(hoteditor_avim_method=="4"){him_viqr2_checked="checked";}else if(hoteditor_avim_method=="-1"){him_off_checked="checked";}
document.write("<div style='width:580px;text-align:center;direction:rtl;font-family:Verdana;font-size:11px;'><input "+him_auto_checked+" id=him_auto onclick=setMethod(0); type=radio name=viet_method> Auto :: <input "+him_telex_checked+" id=him_telex onclick=setMethod(1); type=radio name=viet_method> Telex :: <input "+him_vni_checked+" id=him_vni onclick=setMethod(2); type=radio name=viet_method> VNI :: <input "+him_viqr_checked+" id=him_viqr onclick=setMethod(3); type=radio name=viet_method> VIQR :: <input "+him_viqr2_checked+" id=him_viqr2 onclick=setMethod(4); type=radio name=viet_method> VIQR* :: <input "+him_off_checked+" id=him_off onclick=setMethod(-1); type=radio name=viet_method> Off<br><img src="+styles_folder_path+"/vietnamese_symbol.gif></div>");
}
function get_hoteditor_data(){
if (HTML_ON == "no"){
alert ("Please uncheck the HTML checkbox");
return false;
}
setCodeOutput();
var bbcode_output=document.getElementById("hoteditor_bbcode_ouput_editor").value;//Output to BBCode
bbcode_output=bbcode_output.replace(/\\[(
\\/|)quote\\]/gi,"[$1quote]");
bbcode_output=bbcode_output.replace(/\\[(
\\/|)code\\]/gi,"[$1code]");
document.getElementById("textare").value = bbcode_output;
}
</script>
<?php
echo '<input type="submit" value="שלח הודעה חדשה" name="subit">';
$whosend = $_COOKIE['users'];
echo "<input type='hidden' value='$whosend' name='whosend'>\n";
$time = date ("G:i:s" , time());
$date = date ("j/n/Y" , time());
echo "<input type='hidden' value='$time' name='artime'>";
echo "<input type='hidden' value='$date' name='ardate'>";
if (isset ($_POST['subit']) ) {
$who = $_POST['whosend'];
$textar = $_POST['textare'] ;
$subject = $_POST['subject'];
$thetime = $_POST['artime'];
$thedate = $_POST['ardate'];
if ($subject == "")
echo "<br>לא כתבת נושא";
elseif ($textar == "")
echo "<br>הכתבה ללא תוכן";
elseif (preg_match("/^[\s]+$/", $textar))
echo "<br>תווים לא חוקיים";
else {
mysql_query ("INSERT INTO articles VALUES ('', '$subject', '$textar' , '$who', '$thetime' , '$thedate')");
echo mysql_error();
echo '<meta http-equiv="refresh" content="1;url=cpmain.php">';
}
}
echo "</form></font>";
}
?>
</html></center>