?
Path : /home/admin/domains/happytokorea.com/public_html/modules/content/ |
Current File : /home/admin/domains/happytokorea.com/public_html/modules/content/com_new_topic.php |
<? require_once('function.php'); $selected=$_GET[CATID]; ?> <!--bkLib.onDomLoaded(function() { new nicEditor({fullPanel : true}).panelInstance('ContentMap'); }); bkLib.onDomLoaded(function() { new nicEditor({fullPanel : true}).panelInstance('ContentComment'); }); bkLib.onDomLoaded(function() { new nicEditor({fullPanel : true}).panelInstance('ContentFacilities'); }); bkLib.onDomLoaded(function() { new nicEditor({fullPanel : true}).panelInstance('ContentCondition'); });--> <script type="text/javascript" src="http://js.nicedit.com/nicEdit-latest.js"></script> <script type="text/javascript"> //<![CDATA[ bkLib.onDomLoaded(function() { nicEditors.allTextAreas({fullPanel : true}) }); //]]> </script> <script language="javascript" src="js/jquery-1.4.4.js"></script> <script type="text/javascript"> $(document).ready(function(){ var i = 1; $('#addRow').click(function(){ var tr = "<tr><td><input type=\"file\" name=\"files["+i+"]\" id=\"files["+i+"]\" multiple=\"ture\" accept=\"image/*\" class=\"basicBtn\" size=\"45\" /></td></tr>"; i += 1; $('#myTbl').append(tr); }); }) </script> <SCRIPT language=JavaScript> function fun_name() { var temp; var digital="'"; if (document.webForm.ContentName.value.length != 0) { for (var i=0;i<document.webForm.ContentName.value.length;i++) { temp=document.webForm.ContentName.value.substring(i,i+1) if (digital.indexOf(temp)!=-1) { errmsg="ห้ามใส่เครื่องหมาย '"; document.webForm.ContentName.select(); alert(errmsg); return false; } } } if (document.webForm.city.value.length != 0) { for (var i=0;i<document.webForm.city.value.length;i++) { temp=document.webForm.city.value.substring(i,i+1) if (digital.indexOf(temp)!=-1) { errmsg="ห้ามใส่เครื่องหมาย '"; document.webForm.city.select(); alert(errmsg); return false; } } } if (document.webForm.Period.value.length != 0) { for (var i=0;i<document.webForm.Period.value.length;i++) { temp=document.webForm.Period.value.substring(i,i+1) if (digital.indexOf(temp)!=-1) { errmsg="ห้ามใส่เครื่องหมาย '"; document.webForm.Period.select(); alert(errmsg); return false; } } } if (document.webForm.starting.value.length != 0) { for (var i=0;i<document.webForm.starting.value.length;i++) { temp=document.webForm.starting.value.substring(i,i+1) if (digital.indexOf(temp)!=-1) { errmsg="ห้ามใส่เครื่องหมาย '"; document.webForm.starting.select(); alert(errmsg); return false; } } } if (document.webForm.hotels.value.length != 0) { for (var i=0;i<document.webForm.hotels.value.length;i++) { temp=document.webForm.hotels.value.substring(i,i+1) if (digital.indexOf(temp)!=-1) { errmsg="ห้ามใส่เครื่องหมาย '"; document.webForm.hotels.select(); alert(errmsg); return false; } } } if (document.webForm.tentMetaTitle.value.length != 0) { for (var i=0;i<document.webForm.tentMetaTitle.value.length;i++) { temp=document.webForm.tentMetaTitle.value.substring(i,i+1) if (digital.indexOf(temp)!=-1) { errmsg="ห้ามใส่เครื่องหมาย '"; document.webForm.tentMetaTitle.select(); alert(errmsg); return false; } } } if (document.webForm.ContentMetaKeyword.value.length != 0) { for (var i=0;i<document.webForm.ContentMetaKeyword.value.length;i++) { temp=document.webForm.ContentMetaKeyword.value.substring(i,i+1) if (digital.indexOf(temp)!=-1) { errmsg="ห้ามใส่เครื่องหมาย '"; document.webForm.ContentMetaKeyword.select(); alert(errmsg); return false; } } } if (document.webForm.ContentMetaDescription.value.length != 0) { for (var i=0;i<document.webForm.ContentMetaDescription.value.length;i++) { temp=document.webForm.ContentMetaDescription.value.substring(i,i+1) if (digital.indexOf(temp)!=-1) { errmsg="ห้ามใส่เครื่องหมาย '"; document.webForm.ContentMetaDescription.select(); alert(errmsg); return false; } } } if (document.webForm.ContentTitle.value.length != 0) { for (var i=0;i<document.webForm.ContentTitle.value.length;i++) { temp=document.webForm.ContentTitle.value.substring(i,i+1) if (digital.indexOf(temp)!=-1) { errmsg="ห้ามใส่เครื่องหมาย '"; document.webForm.ContentTitle.select(); alert(errmsg); return false; } } } if (document.webForm.ContentDetail.value.length != 0) { for (var i=0;i<document.webForm.ContentDetail.value.length;i++) { temp=document.webForm.ContentDetail.value.substring(i,i+1) if (digital.indexOf(temp)!=-1) { errmsg="ห้ามใส่เครื่องหมาย '"; document.webForm.ContentDetail.select(); alert(errmsg); return false; } } } if (document.webForm.ContentTags.value.length != 0) { for (var i=0;i<document.webForm.ContentTags.value.length;i++) { temp=document.webForm.ContentTags.value.substring(i,i+1) if (digital.indexOf(temp)!=-1) { errmsg="ห้ามใส่เครื่องหมาย '"; document.webForm.ContentTags.select(); alert(errmsg); return false; } } } } </SCRIPT> <div class="content"> <div class="title" style="border-bottom:1px solid #cccccc;"> <i class="fa fa-clipboard fa-2x" aria-hidden="true"></i><h1 style="display:inline;"> เขียนรีวิว</h1> </div> <div style="padding-top:20px;"> <form action="<? echo"$PHPSELF?mod=content&ac=add_data_con";?>" enctype="multipart/form-data" class="mainForm" id="webForm" method="post" name="webForm"> <div class="form-group" align="left"> <div class=" col-md-3 col-md-4 col-xs-12"> <label class="control-label">หัวข้อรีวิว</label> </div> <div class=" col-md-9 col-md-8 col-xs-12"> <input name="ContentName" class="form-control" type="text" id="ContentName" onChange="fun_name()"/> <input name="CatID" type="hidden" value="135" /> <input name="Cat_sub" type="hidden" value="0" /> </div> </div> <div class="form-group" align="left"> <div class=" col-md-3 col-md-4 col-xs-12"> <label class="control-label">ภาพหน้าปกรีวิว</label> </div> <div class=" col-md-9 col-md-8 col-xs-12"> <table id="myTbl" width="650" border="1" cellspacing="2" cellpadding="0"> <tr id="firstTr"> <td> <input type="file" name="files[0]" id="files[0]" multiple accept="image/*" class="basicBtn" size="45" /> </td> </tr> </table> </div> </div> <div class="form-group" align="left"> <div class=" col-md-3 col-md-4 col-xs-12"> <label class="control-label">รายละเอียด</label> </div> <div class=" col-md-9 col-md-8 col-xs-12"> <textarea name="ContentDetail" class="form-control" cols="" rows="20" id="ContentDetail" onChange="fun_name()"></textarea> </div> </div> <div class="form-group" align="left"> <div class=" col-md-3 col-md-4 col-xs-12"> <label class="control-label">รายละเอียดย่อ</label> </div> <div class=" col-md-9 col-md-8 col-xs-12"> <input type="text" class="form-control" name="ContentTitle" id="ContentTitle" /> </div> </div> <?php /*?><div class="rowElem"> <label>คอมเม้น</label><div class="formRight"><iframe src="modules/content/comment.php?id=<?=$_GET['id'];?>" width="100%" height="200"></iframe> </div><div class="fix"></div></div><?php */?> <input name="ContentBlog" type="hidden" value="<?=$_SESSION["user_login"]['Nickname']?>" /> <input name="ContentBlogID" type="hidden" value="<?=$_SESSION["user_login"]['ID']?>" /> <input name="ContentPublic" type="hidden" value="0" /> <?php /*?><div class="rowElem"><label>ชื่อคนเขียน blog</label><div class="formRight"><input type="text" name="ContentBlog" id="ContentBlog" /> </div><div class="fix"></div></div><?php */?> <input name="ContentMetaTitle" class="form-control" type="hidden" id="ContentMetaTitle" onChange="fun_name()"/> <input name="ContentMetaKeyword" class="form-control" type="hidden" id="ContentMetaKeyword" onChange="fun_name()"/> <input name="ContentMetaDescription" class="form-control" type="hidden" id="ContentMetaDescription" onChange="fun_name()"/> <div class="form-group" align="center"> <input type="submit" value="บันทึกบทความ" class="btn btn-default" /> <input type="reset" value="ยกเลิกบทความ" class="btn btn-default" /></div> </form> </div> </div>