? GR0V Shell

GR0V shell

Linux www.koreapackagetour.com 2.6.32-042stab145.3 #1 SMP Thu Jun 11 14:05:04 MSK 2020 x86_64

Path : /home/admin/domains/happytokorea.com/public_html/backend/modules/goods/
File Upload :
Current File : /home/admin/domains/happytokorea.com/public_html/backend/modules/goods/com_edit_topic.php

<?

require_once('function.php');
$topic_id=$_GET['id'];
$edit=$db->getDataOneRow('goods',$topic_id,'GoodsID');



?>

<script src="nicEdit/nicEdit.js" type="text/javascript"></script>
<script type="text/javascript">
bkLib.onDomLoaded(function() {
	new nicEditor({fullPanel : true}).panelInstance('ContentDetail');
});
</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.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.CatID.value.length != 0) 
    {
       if(isNaN(document.webForm.CatID.value))
		 {
			 errmsg="กรุณาระบุตัวเลข '";
             document.webForm.CatID.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"><img style="padding:10px 0 0 15px; float:left;" src="images/icons/dark/create.png" alt="" />
    	<h5>แก้ไขสินค้า</h5>
    	</div>
 
         <!-- Form begins -->
 <form action="<? echo"$PHPSELF?mod=goods&ac=edit_data_goods";?>" enctype="multipart/form-data" class="mainForm" id="webForm" method="post" name="webForm">
        
        	<!-- Input text fields -->
            <fieldset>
                <div class="widget first">
						<div class="rowElem" style="border-top:1px solid #cccccc;"><label>ชื่อบทความ</label><div class="formRight"><input name="ContentName" type="text" id="ContentName" value="<?=$edit['GoodsName']?>"  onChange="fun_name()"/>
						</div>
						<div class="fix"></div></div>
						<div class="rowElem"><label>Link บทความ</label><div class="formRight"><input name="ContentURL" type="text" id="ContentURL" value="<?=$edit['GoodsURL'];?>" style="color:#cccccc;background:#eef4fb" />
						</div>
						<div class="fix"></div></div>
						<div class="rowElem"><label>Meta Title (SEO)</label><div class="formRight"><input name="tentMetaTitle" type="text" id="tentMetaTitle" value="<?=$edit['GoodsMetaTitle']?>"  onChange="fun_name()" />
						</div>
						<div class="fix"></div></div>
						<div class="rowElem"><label>MetaKeyword (SEO)</label><div class="formRight"><input name="MetaKeyword" type="text" id="MetaKeyword" value="<?=$edit['GoodsMetaKeyword']?>"  onChange="fun_name()"/>
						</div>
						<div class="fix"></div></div>
					<div class="rowElem"><label>Meta Description (SEO)</label>
					  <div class="formRight">
					    <input name="ContentMetaDescription" type="text" id="ContentMetaDescription" value="<?=$edit['GoodsMetaDescription'];?>"  onChange="fun_name()"/>
					  </div>
				  <div class="fix"></div></div>
                          <div class="rowElem"><label>รูปประกอบบทความ (ขนาด 230 x 170)</label><div class="formRight">
                        <?
					
                        if($edit[GoodsPhoto]!=''){
						?>
						<table width="650" border="1" cellspacing="2" cellpadding="0">
		<td>
		<label> 
		<div align="right"><a href="<? echo"$PHPSELF?mod=goods&ac=de_photo&id={$_GET['id']}";?>"><img src="images/close.png"></a><br />
		    <img src="images/GoodsPhoto/<?=$edit[GoodsPhoto];?>" width="226"></div>
		</label>
		</td>		 
		</tr>
		</table>
                        <?
                        }
						?><input  type="file" name="ContentPhoto" class="basicBtn" size="45"></div><div class="fix"></div></div>
						<div class="rowElem"><label>ไฟล์ .pdf ประกอบบทความ</label><div class="formRight"> <?
					
                        if($edit[GoodsPdf]!=''){
						echo"<a href=\"images/ContentPdf/{$edit[GoodsPdf]}\"> $edit[GoodsPdf] </a> 	[ <a href=\"$PHPSELF?mod=goods&ac=de_pdf&id={$_GET['id']}\">ลบ</a> ]";
                        }
						?>
						  
				  <input  type="file" name="ContentPdf" id="ContentPdf" class="basicBtn" size="45"></div><div class="fix"></div></div>
						<div class="rowElem" style="border-top:1px solid #cccccc;"><label>ราคาสินค้า</label><div class="formRight"><input name="CatID" type="text" id="CatID" onChange="fun_name()" value="<?=$edit['CatID'];?>"/>
						</div><div class="fix"></div></div>
						<div class="rowElem"><label>คำอธิบายบทความ</label><div class="formRight"><textarea rows="6" cols="" name="ContentTitle" id="ContentTitle"  onChange="fun_name()"><?=$edit['GoodsTitle']?></textarea>
						</div><div class="fix"></div></div>
						<div class="rowElem"><label>เนื้อหาบทความ (ความกว้าง ตารางและรูปภาพ ไม่ควรเกิน 1080px)</label><div class="formRight"><textarea name="ContentDetail" cols="" rows="10"  id="ContentDetail"  onChange="fun_name()"><?=$edit['GoodsDetail'];?></textarea>
						</div><div class="fix"></div></div>
				<div class="rowElem"><label>เปิดให้อ่าน</label><div class="formRight"><input type="radio" name="ContentPublic" <? if($edit[GoodsPublic]==1){echo "checked";}?>  value="1"/>
					  <label>ใช่</label>
                      <input type="radio" name="ContentPublic"  <? if($edit[GoodsPublic]==0){echo "checked";}?> value="0"/>
                      <label>ไม่ใช่</label>
                      <input name="ContentID" type="hidden" id="ContentID" value="<?=$edit[GoodsID];?>" />
                      <input name="ContentPdf" type="hidden" id="ContentPdf" value="<?=$edit[GoodsPdf];?>" />
                      <input name="ContentPhoto" type="hidden" id="ContentPhoto" value="<?=$edit[GoodsPhoto];?>" />
				</div><div class="fix"></div></div>
					  <div class="rowElem"><label>&nbsp;</label><div class="formRight"><input type="submit" value="บันทึกบทความ" class="greyishBtn" />
						<input type="reset" value="ยกเลิกบทความ" class="basicBtn" /></div><div class="fix"></div></div>

                        <div class="fix"></div>

                </div>
            </fieldset>
             <div class="rowElem"><div class="formRight">
					  
                     
                 </div><div class="fix"></div></div>
        </form>
        
 
	</div>				

T1KUS90T
  root-grov@210.1.60.28:~$