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 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284
| <script>
function button_over(tdbutton)
{
tdbutton.style.borderLeft = "#f7f7f7 solid 1px";
tdbutton.style.borderRight = "#808080 solid 1px";
tdbutton.style.borderTop = "#f7f7f7 solid 1px";
tdbutton.style.borderBottom = "#808080 solid 1px";
}
function button_out(tdbutton)
{
tdbutton.style.borderLeft ="0";
tdbutton.style.borderRight ="0";
tdbutton.style.borderTop ="0";
tdbutton.style.borderBottom ="0";
}
function button_down(tdbutton)
{
tdbutton.style.borderRight = "#f7f7f7 solid 1px";
tdbutton.style.borderLeft = "#808080 solid 1px";
tdbutton.style.borderBottom = "#f7f7f7 solid 1px";
tdbutton.style.borderTop = "#808080 solid 1px";
}
function showcolorpop(showtype,ctype)
{
colorpop = document.getElementById("fontcolor");
cmenu = document.getElementById("colorMenu");
if(showtype == 1)
{
colorpop.innerHTML = cmenu.innerHTML;
if(ctype == 1)
{
// set colortype as forecolor
document.form1.colortype.value = 1;
}
else if(ctype == 2)
{
// set colortype as backcolor
document.form1.colortype.value = 2;
}
}
else
{
colorpop.innerHTML = '';
button_out(button_forecolor);
}
}
function showcolor(oColor)
{
colorcell = document.getElementById("selectedcolor");
colorcell.style.backgroundColor = oColor.id;
colorcell.innerHTML = oColor.id;
}
function setforecolor(oColor)
{
document.execCommand("ForeColor",false,oColor.id);
}
function setcolor(oColor)
{
if(document.form1.colortype.value == 1)
{
document.execCommand("ForeColor",false,oColor.id);
}
}
function storehtml()
{
document.form1.htmlcontent.value = areades.innerHTML;
}
document.onmousedown = showcolorpop;
</script>
<body>
<DIV ID="colorMenu" STYLE="display:none; position:absolute;" style="z-index:1999" onMouseOver="showcolorpop(1);" OnMouseOut="showcolorpop(0);">
<table id="colorMenuTable" cellpadding="5" cellspacing="5" border="1" bordercolor="#666666" style="cursor: hand;font-family: Verdana;font-size:2px; BORDER-LEFT: buttonhighlight 1px solid; BORDER-RIGHT: buttonshadow 2px solid; BORDER-TOP: buttonhighlight 1px solid; BORDER-BOTTOM: buttonshadow 1px solid; background-color: threedface;">
<tr><td colspan=12 id="selectedcolor" style="background-color:white;font-size:11px;color:white;font-weight:bold;"> </td></tr>
<tr>
<td onMouseDown="setcolor(this)" onMouseOver="showcolor(this)" style="background-color:#000000" id="#000000"> </td>
<td onMouseDown="setcolor(this)" onMouseOver="showcolor(this)" style="background-color:#333333" id="#333333"> </td>
<td onMouseDown="setcolor(this)" onMouseOver="showcolor(this)" style="background-color:#666666" id="#666666"> </td>
<td onMouseDown="setcolor(this)" onMouseOver="showcolor(this)" style="background-color:#999999" id="#999999"> </td>
<td onMouseDown="setcolor(this)" onMouseOver="showcolor(this)" style="background-color:#cccccc" id="#cccccc"> </td>
<td onMouseDown="setcolor(this)" onMouseOver="showcolor(this)" style="background-color:#ff0000" id="#ff0000"> </td>
<td onMouseDown="setcolor(this)" onMouseOver="showcolor(this)" style="background-color:#00ff00" id="#00ff00"> </td>
<td onMouseDown="setcolor(this)" onMouseOver="showcolor(this)" style="background-color:#0000ff" id="#0000ff"> </td>
<td onMouseDown="setcolor(this)" onMouseOver="showcolor(this)" style="background-color:#ffff00" id="#ffff00"> </td>
<td onMouseDown="setcolor(this)" onMouseOver="showcolor(this)" style="background-color:#00ffff" id="#00ffff"> </td>
<td onMouseDown="setcolor(this)" onMouseOver="showcolor(this)" style="background-color:#ff00ff" id="#ff00ff"> </td>
<td onMouseDown="setcolor(this)" onMouseOver="showcolor(this)" style="background-color:#ffccff" id="#ffccff"> </td>
</tr>
<tr>
<td onMouseDown="setcolor(this)" onMouseOver="showcolor(this)" style="background-color:#ffcccc" id="#ffcccc"> </td>
<td onMouseDown="setcolor(this)" onMouseOver="showcolor(this)" style="background-color:#ffcc99" id="#ffcc99"> </td>
<td onMouseDown="setcolor(this)" onMouseOver="showcolor(this)" style="background-color:#ffcc96" id="#ffcc96"> </td>
<td onMouseDown="setcolor(this)" onMouseOver="showcolor(this)" style="background-color:#66ccff" id="#66ccff"> </td>
<td onMouseDown="setcolor(this)" onMouseOver="showcolor(this)" style="background-color:#66cc99" id="#66cc99"> </td>
<td onMouseDown="setcolor(this)" onMouseOver="showcolor(this)" style="background-color:#669999" id="#669999"> </td>
<td onMouseDown="setcolor(this)" onMouseOver="showcolor(this)" style="background-color:#6699cc" id="#6699cc"> </td>
<td onMouseDown="setcolor(this)" onMouseOver="showcolor(this)" style="background-color:#6699ff" id="#6699ff"> </td>
<td onMouseDown="setcolor(this)" onMouseOver="showcolor(this)" style="background-color:#ff9900" id="#ff9900"> </td>
<td onMouseDown="setcolor(this)" onMouseOver="showcolor(this)" style="background-color:#ff9933" id="#ff9933"> </td>
<td onMouseDown="setcolor(this)" onMouseOver="showcolor(this)" style="background-color:#ffff33" id="#ffff33"> </td>
<td onMouseDown="setcolor(this)" onMouseOver="showcolor(this)" style="background-color:#666600" id="#666600"> </td>
</tr>
<tr>
<td onMouseDown="setcolor(this)" onMouseOver="showcolor(this)" style="background-color:#666699" id="#666699"> </td>
<td onMouseDown="setcolor(this)" onMouseOver="showcolor(this)" style="background-color:#6666ff" id="#6666ff"> </td>
<td onMouseDown="setcolor(this)" onMouseOver="showcolor(this)" style="background-color:#ff6600" id="#ff6600"> </td>
<td onMouseDown="setcolor(this)" onMouseOver="showcolor(this)" style="background-color:#ff6633" id="#ff6633"> </td>
<td onMouseDown="setcolor(this)" onMouseOver="showcolor(this)" style="background-color:#ff6699" id="#ff6699"> </td>
<td onMouseDown="setcolor(this)" onMouseOver="showcolor(this)" style="background-color:#ff66cc" id="#ff66cc"> </td>
<td onMouseDown="setcolor(this)" onMouseOver="showcolor(this)" style="background-color:#ff66ff" id="#ff66ff"> </td>
<td onMouseDown="setcolor(this)" onMouseOver="showcolor(this)" style="background-color:#660000" id="#660000"> </td>
<td onMouseDown="setcolor(this)" onMouseOver="showcolor(this)" style="background-color:#660033" id="#660033"> </td>
<td onMouseDown="setcolor(this)" onMouseOver="showcolor(this)" style="background-color:#660066" id="#660066"> </td>
<td onMouseDown="setcolor(this)" onMouseOver="showcolor(this)" style="background-color:#660099" id="#660099"> </td>
<td onMouseDown="setcolor(this)" onMouseOver="showcolor(this)" style="background-color:#6600cc" id="#6600cc"> </td>
</tr>
<tr>
<td onMouseDown="setcolor(this)" onMouseOver="showcolor(this)" style="background-color:#6600ff" id="#6600ff"> </td>
<td onMouseDown="setcolor(this)" onMouseOver="showcolor(this)" style="background-color:#00ff00" id="#00ff00"> </td>
<td onMouseDown="setcolor(this)" onMouseOver="showcolor(this)" style="background-color:#ff0033" id="#ff0033"> </td>
<td onMouseDown="setcolor(this)" onMouseOver="showcolor(this)" style="background-color:#ff0066" id="#ff0066"> </td>
<td onMouseDown="setcolor(this)" onMouseOver="showcolor(this)" style="background-color:#ff0099" id="#ff0099"> </td>
<td onMouseDown="setcolor(this)" onMouseOver="showcolor(this)" style="background-color:#ff00cc" id="#ff00cc"> </td>
<td onMouseDown="setcolor(this)" onMouseOver="showcolor(this)" style="background-color:#ff00ff" id="#ff00ff"> </td>
<td onMouseDown="setcolor(this)" onMouseOver="showcolor(this)" style="background-color:#33ff00" id="#33ff00"> </td>
<td onMouseDown="setcolor(this)" onMouseOver="showcolor(this)" style="background-color:#33ff33" id="#33ff33"> </td>
<td onMouseDown="setcolor(this)" onMouseOver="showcolor(this)" style="background-color:#33ff66" id="#33ff66"> </td>
<td onMouseDown="setcolor(this)" onMouseOver="showcolor(this)" style="background-color:#33ff99" id="#33ff99"> </td>
<td onMouseDown="setcolor(this)" onMouseOver="showcolor(this)" style="background-color:#33ffcc" id="#33ffcc"> </td>
</tr>
<tr>
<td onMouseDown="setcolor(this)" onMouseOver="showcolor(this)" style="background-color:#33ffff" id="#33ffff"> </td>
<td onMouseDown="setcolor(this)" onMouseOver="showcolor(this)" style="background-color:#ccff00" id="#ccff00"> </td>
<td onMouseDown="setcolor(this)" onMouseOver="showcolor(this)" style="background-color:#ccff33" id="#ccff33"> </td>
<td onMouseDown="setcolor(this)" onMouseOver="showcolor(this)" style="background-color:#ccff66" id="#ccff66"> </td>
<td onMouseDown="setcolor(this)" onMouseOver="showcolor(this)" style="background-color:#ccff99" id="#ccff99"> </td>
<td onMouseDown="setcolor(this)" onMouseOver="showcolor(this)" style="background-color:#ccffcc" id="#ccffcc"> </td>
<td onMouseDown="setcolor(this)" onMouseOver="showcolor(this)" style="background-color:#ccffff" id="#ccffff"> </td>
<td onMouseDown="setcolor(this)" onMouseOver="showcolor(this)" style="background-color:#33cc00" id="#33cc00"> </td>
<td onMouseDown="setcolor(this)" onMouseOver="showcolor(this)" style="background-color:#33cc33" id="#33cc33"> </td>
<td onMouseDown="setcolor(this)" onMouseOver="showcolor(this)" style="background-color:#33cc66" id="#33cc66"> </td>
<td onMouseDown="setcolor(this)" onMouseOver="showcolor(this)" style="background-color:#33cc99" id="#33cc99"> </td>
<td onMouseDown="setcolor(this)" onMouseOver="showcolor(this)" style="background-color:#33cccc" id="#33cccc"> </td>
</tr>
<tr>
<td onMouseDown="setcolor(this)" onMouseOver="showcolor(this)" style="background-color:#33ccff" id="#33ccff"> </td>
<td onMouseDown="setcolor(this)" onMouseOver="showcolor(this)" style="background-color:#cccc00" id="#cccc00"> </td>
<td onMouseDown="setcolor(this)" onMouseOver="showcolor(this)" style="background-color:#cccc33" id="#cccc33"> </td>
<td onMouseDown="setcolor(this)" onMouseOver="showcolor(this)" style="background-color:#cccc66" id="#cccc66"> </td>
<td onMouseDown="setcolor(this)" onMouseOver="showcolor(this)" style="background-color:#cccc99" id="#cccc99"> </td>
<td onMouseDown="setcolor(this)" onMouseOver="showcolor(this)" style="background-color:#cccccc" id="#cccccc"> </td>
<td onMouseDown="setcolor(this)" onMouseOver="showcolor(this)" style="background-color:#ccccff" id="#ccccff"> </td>
<td onMouseDown="setcolor(this)" onMouseOver="showcolor(this)" style="background-color:#339900" id="#339900"> </td>
<td onMouseDown="setcolor(this)" onMouseOver="showcolor(this)" style="background-color:#339933" id="#339933"> </td>
<td onMouseDown="setcolor(this)" onMouseOver="showcolor(this)" style="background-color:#339966" id="#339966"> </td>
<td onMouseDown="setcolor(this)" onMouseOver="showcolor(this)" style="background-color:#339999" id="#339999"> </td>
<td onMouseDown="setcolor(this)" onMouseOver="showcolor(this)" style="background-color:#3399cc" id="#3399cc"> </td>
</tr>
<tr>
<td onMouseDown="setcolor(this)" onMouseOver="showcolor(this)" style="background-color:#3399ff" id="#3399ff"> </td>
<td onMouseDown="setcolor(this)" onMouseOver="showcolor(this)" style="background-color:#cc9900" id="#cc9900"> </td>
<td onMouseDown="setcolor(this)" onMouseOver="showcolor(this)" style="background-color:#cc9933" id="#cc9933"> </td>
<td onMouseDown="setcolor(this)" onMouseOver="showcolor(this)" style="background-color:#cc9966" id="#cc9966"> </td>
<td onMouseDown="setcolor(this)" onMouseOver="showcolor(this)" style="background-color:#cc9999" id="#cc9999"> </td>
<td onMouseDown="setcolor(this)" onMouseOver="showcolor(this)" style="background-color:#cc99cc" id="#cc99cc"> </td>
<td onMouseDown="setcolor(this)" onMouseOver="showcolor(this)" style="background-color:#cc99ff" id="#cc99ff"> </td>
<td onMouseDown="setcolor(this)" onMouseOver="showcolor(this)" style="background-color:#336600" id="#336600"> </td>
<td onMouseDown="setcolor(this)" onMouseOver="showcolor(this)" style="background-color:#336633" id="#336633"> </td>
<td onMouseDown="setcolor(this)" onMouseOver="showcolor(this)" style="background-color:#336666" id="#336666"> </td>
<td onMouseDown="setcolor(this)" onMouseOver="showcolor(this)" style="background-color:#336699" id="#336699"> </td>
<td onMouseDown="setcolor(this)" onMouseOver="showcolor(this)" style="background-color:#3366cc" id="#3366cc"> </td>
</tr>
<tr>
<td onMouseDown="setcolor(this)" onMouseOver="showcolor(this)" style="background-color:#3366ff" id="#3366ff"> </td>
<td onMouseDown="setcolor(this)" onMouseOver="showcolor(this)" style="background-color:#cc6600" id="#cc6600"> </td>
<td onMouseDown="setcolor(this)" onMouseOver="showcolor(this)" style="background-color:#cc6633" id="#cc6633"> </td>
<td onMouseDown="setcolor(this)" onMouseOver="showcolor(this)" style="background-color:#cc6666" id="#cc6666"> </td>
<td onMouseDown="setcolor(this)" onMouseOver="showcolor(this)" style="background-color:#cc6699" id="#cc6699"> </td>
<td onMouseDown="setcolor(this)" onMouseOver="showcolor(this)" style="background-color:#cc66cc" id="#cc66cc"> </td>
<td onMouseDown="setcolor(this)" onMouseOver="showcolor(this)" style="background-color:#cc66ff" id="#cc66ff"> </td>
<td onMouseDown="setcolor(this)" onMouseOver="showcolor(this)" style="background-color:#333300" id="#333300"> </td>
<td onMouseDown="setcolor(this)" onMouseOver="showcolor(this)" style="background-color:#333333" id="#333333"> </td>
<td onMouseDown="setcolor(this)" onMouseOver="showcolor(this)" style="background-color:#333366" id="#333366"> </td>
<td onMouseDown="setcolor(this)" onMouseOver="showcolor(this)" style="background-color:#333399" id="#333399"> </td>
<td onMouseDown="setcolor(this)" onMouseOver="showcolor(this)" style="background-color:#3333cc" id="#3333cc"> </td>
</tr>
<tr>
<td onMouseDown="setcolor(this)" onMouseOver="showcolor(this)" style="background-color:#3333ff" id="#3333ff"> </td>
<td onMouseDown="setcolor(this)" onMouseOver="showcolor(this)" style="background-color:#cc3300" id="#cc3300"> </td>
<td onMouseDown="setcolor(this)" onMouseOver="showcolor(this)" style="background-color:#cc3333" id="#cc3333"> </td>
<td onMouseDown="setcolor(this)" onMouseOver="showcolor(this)" style="background-color:#cc3366" id="#cc3366"> </td>
<td onMouseDown="setcolor(this)" onMouseOver="showcolor(this)" style="background-color:#cc3399" id="#cc3399"> </td>
<td onMouseDown="setcolor(this)" onMouseOver="showcolor(this)" style="background-color:#cc33cc" id="#cc33cc"> </td>
<td onMouseDown="setcolor(this)" onMouseOver="showcolor(this)" style="background-color:#cc33ff" id="#cc33ff"> </td>
<td onMouseDown="setcolor(this)" onMouseOver="showcolor(this)" style="background-color:#330000" id="#330000"> </td>
<td onMouseDown="setcolor(this)" onMouseOver="showcolor(this)" style="background-color:#333333" id="#333333"> </td>
<td onMouseDown="setcolor(this)" onMouseOver="showcolor(this)" style="background-color:#333366" id="#333366"> </td>
<td onMouseDown="setcolor(this)" onMouseOver="showcolor(this)" style="background-color:#333399" id="#333399"> </td>
<td onMouseDown="setcolor(this)" onMouseOver="showcolor(this)" style="background-color:#3333cc" id="#3333cc"> </td>
</tr>
</tr>
</table>
</div>
<input type=hidden name="colortype" value=0>
<input type=hidden name="htmlcontent" value="">
<input type=hidden name="contentid" value="<?php echo $contentid;?>">
<input type=hidden name="canSave" value=1>
<table border=0 bgcolor=#cccccc cellpadding="5" cellspacing="0" width=100%>
<tr>
<!-- <td><input type=button value="B" onclick='document.execCommand("bold");'></td>-->
<td id="button_bold" style="cursor:hand" onclick='document.execCommand("bold")' onMouseOver="button_over(this)" onMouseDown="button_down(this)" onMouseOut="button_out(this)"><img src="images/bold.gif" alt="Bold"></td>
<td id="b1" style="cursor:hand" onclick='document.execCommand("italic")' onMouseOver="button_over(this)" onMouseDown="button_down(this)" onMouseOut="button_out(this)"><img src="images/italic.gif" alt="Italic"></td>
<td id="b1" style="cursor:hand" onclick='document.execCommand("underline")' onMouseOver="button_over(this)" onMouseDown="button_down(this)" onMouseOut="button_out(this)"><img src="images/underline.gif" alt="Underline"></td>
<td id="b1" style="cursor:hand" onclick='document.execCommand("cut");areades.focus();' onMouseOver="button_over(this)" onMouseDown="button_down(this)" onMouseOut="button_out(this)"><img src="images/cut.gif" alt="Cut"></td>
<td id="b1" style="cursor:hand" onclick='document.execCommand("copy");areades.focus();' onMouseOver="button_over(this)" onMouseDown="button_down(this)" onMouseOut="button_out(this)"><img src="images/copy.gif" alt="Copy"></td>
<td id="b1" style="cursor:hand" onclick='areades.focus();document.execCommand("paste");' onMouseOver="button_over(this)" onMouseDown="button_down(this)" onMouseOut="button_out(this)"><img src="images/paste.gif" alt="Paste"></td>
<td id="b1" style="cursor:hand" onclick='document.execCommand("JustifyLeft");areades.focus();' onMouseOver="button_over(this)" onMouseDown="button_down(this)" onMouseOut="button_out(this)"><img src="images/leftA.gif" alt="Align Left"></td>
<td id="b1" style="cursor:hand" onclick='document.execCommand("JustifyCenter");areades.focus();' onMouseOver="button_over(this)" onMouseDown="button_down(this)" onMouseOut="button_out(this)"><img src="images/center.gif" alt="Align Center"></td>
<td id="b1" style="cursor:hand" onclick='document.execCommand("JustifyRight");areades.focus();' onMouseOver="button_over(this)" onMouseDown="button_down(this)" onMouseOut="button_out(this)"><img src="images/rightA.gif" alt="Align Right"></td>
<td id="b1" style="cursor:hand" onclick='areades.focus();document.execCommand("InsertOrderedList");' onMouseOver="button_over(this)" onMouseDown="button_down(this)" onMouseOut="button_out(this)"><img src="images/bulletsO.gif" alt="Ordered List"></td>
<td id="b1" style="cursor:hand" onclick='areades.focus();document.execCommand("InsertUnOrderedList");' onMouseOver="button_over(this)" onMouseDown="button_down(this)" onMouseOut="button_out(this)"><img src="images/bulletsU.gif" alt="UnOrdered List"></td>
<td>
<select id="cboFontName" onChange='areades.focus();document.execCommand("FontName", false,this[this.selectedIndex].value);' unselectable="on">
<option selected>Font</option>
<option value="Times New Roman">Default</option>
<option value="Arial">Arial</option>
<option value="Verdana">Verdana</option>
<option value="Tahoma">Tahoma</option>
<option value="Geneva">Geneva</option>
<option value="Helvetica">Helvetica</option>
<option value="Courier New">Courier New</option>
<option value="Georgia">Georgia</option>
</select>
</td>
<td>
<select id="cboFontSize" onChange='areades.focus();document.execCommand("FontSize",false,this[this.selectedIndex].value);' unselectable="on">
<option selected>Font Size</option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
</select>
</td>
<td id="button_forecolor" style="cursor:hand" onClick="showcolorpop(1,1);" onMouseOver="button_over(this)" onMouseDown="button_down(this)" onMouseOut="button_out(this);"><img src="images/textcolor.gif" alt="Font Color"><br><div id="fontcolor" style="position:absolute;z-index:2000"></div></td>
<td id="b1" style="cursor:hand" onclick='areades.focus();document.execCommand("createLink",false);' onMouseOver="button_over(this)" onMouseDown="button_down(this)" onMouseOut="button_out(this)"><img src="images/hyperlink.gif" alt="Hyperlink"></td>
</tr>
</table>
<input type="hidden" name=hi value=6>
<div id=areades contenteditable align=left style="height:250; width:100%;overflow=auto;border:solid 1 c0c0c0" onblur="storehtml();">
<?php echo $itemdes; ?>
</div> |
Partager