403Webshell
Server IP : 119.59.102.212  /  Your IP : 3.141.244.88
Web Server : Apache/2
System : Linux narin 2.6.32-042stab142.1 #1 SMP Tue Jan 28 23:44:17 MSK 2020 x86_64
User : yangkam ( 1022)
PHP Version : 5.6.40
Disable Function : exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
MySQL : ON  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/yangkam/domains/yangkam.go.th/public_html/coremain/module/link/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/yangkam/domains/yangkam.go.th/public_html/coremain/module/link/addlink_form.php
<?php
if(id_sub_permission($id_sub)!=1){	
	permission_fail();			
}
$navig['link']=$data_name_menu_sub[name];
$navig['addlink_form']="เพิ่มหัวข้อลิงค์ย่อย";
navigator($navig);
echo "<br>";
bar_header("เพิ่มหัวข้อลิงค์ย่อย"); // Bar_Header
fieldset_top("ลิงค์");


import_request_variables('pG', 'p_');
if($p_add!="")							{  $add=trim($p_add);											}
if($p_topic!="")							{  $topic=trim($p_topic);										}
if($p_link_url!="")						{  $link_url=trim($p_link_url);								}
if($p_id_group!="")					{  $id_group=trim($p_id_group);							}
if($p_text!="")							{	     $text=trim($p_text);							}

if($p_evar!="")										{  $fulltexts=trim($p_evar);													}

$userfile1_name=trim($_FILES['userfile1']['name']);
$userfile2_name=trim($_FILES['userfile2']['name']);
$userfile3_name=trim($_FILES['userfile3']['name']);

// add topic link
if ($add == "1" && $topic != "") {


// Create_Filename 1
  if ($userfile1_name != "") {     // กำหนดชื่อไฟล์ที่ upload ใหม่ ทั้งนี้เพื่อให้ ไฟล์ไม่ซ้ำกัน
	$name1 = create_filename($userfile1_name);
    $dlink = "$_SESSION[web_name]/mainfile/" . $name1;
    $temp_name = $_FILES['userfile1']['tmp_name'];
    if (is_uploaded_file($_FILES['userfile1']['tmp_name'])) {
      if (!move_uploaded_file($temp_name, $dlink)) {
        
      }
    }
  }

  // Create_Filename 2
  if ($userfile2_name != "") {     // กำหนดชื่อไฟล์ที่ upload ใหม่ ทั้งนี้เพื่อให้ ไฟล์ไม่ซ้ำกัน
	$name2 = create_filename($userfile2_name);
    $dlink = "$_SESSION[web_name]/mainfile/" . $name2;
    $temp_name = $_FILES['userfile2']['tmp_name'];
    if (is_uploaded_file($_FILES['userfile2']['tmp_name'])) {
      if (!move_uploaded_file($temp_name, $dlink)) {
        
      }
    }
  }

  // Create_Filename 3
  if ($userfile3_name != "") {     // กำหนดชื่อไฟล์ที่ upload ใหม่ ทั้งนี้เพื่อให้ ไฟล์ไม่ซ้ำกัน
	$name3 = create_filename($userfile3_name);
    $dlink = "$_SESSION[web_name]/mainfile/" . $name3;
    $temp_name = $_FILES['userfile3']['tmp_name'];
    if (is_uploaded_file($_FILES['userfile3']['tmp_name'])) {
      if (!move_uploaded_file($temp_name, $dlink)) {
        
      }
    }
  }

  $sqls= "ALTER TABLE  `cms_link` CHANGE  `status`  `status` TEXT CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL";
  mysql_query($sqls);

$sqla= "ALTER TABLE `cms_link` ADD `text_full` TEXT NOT NULL AFTER `position`, ADD `picture1` VARCHAR(60) NOT NULL AFTER `text_full`, ADD `picture2` VARCHAR(60) NOT NULL AFTER `picture1`";
  mysql_query($sqla);


  $sql = "INSERT INTO `cms_link` (`id_link` ,`id_group` ,`url` ,`msg` ,`picture` ,`state` ,`status` ,`position`,`text_full`,`picture1`,`picture2` ) VALUES (NULL , '$id_group', '$link_url', '$topic','$name1', '1', '1', '1', '$fulltexts', '$name2','$name3')";

  $result = mysql_query($sql);



  echo"<br><br><center>ข้อมูลได้ถูกเพิ่มแล้ว<br><br></enter>";
  echo "<meta http-equiv='refresh' content='2; url=index.php?mod=link&path=link'>";
}else{
?>


<table width="550" border="0" align="center" cellpadding="1" cellspacing="3">
<form  name="add" action="index.php?mod=addlink_form&path=link&add=1&id_group=<?php echo $id_group;?>" method="post" onSubmit="return checkadd()" enctype="multipart/form-data">

  <tr height='35'>
     <td width=5%></td> 	
     <td width=25%><div align="left"><img src='coremain/images/marker.gif'> ใส่หัวข้อ</div></td> 
	 <td width=65%><div align="left"><input name="topic" type="text" size="40"></td> 
  </tr>



  <tr height='35'>
     <td width=5%></td> 	
              <?php text_editor(300, 200, 'ข้อความ', 3); ?>

  </tr>

  <tr height='35'>
     <td width=5%></td> 	
     <td width=25%><div align="left"><img src='coremain/images/marker.gif'> กรอก URL กรณี Link ไปยังเว็บอื่น</div></td> 
	 <td width=65%><div align="left"><input name="link_url" type="text" size="40" value=""><br>
	     ให้ COPY URL ทั้งหมดมาใส่ในช่องนี้เลย เช่น  https://www.google.co.th/
	 </td> 
  </tr>


  <tr height='35'>
     <td width=5%></td> 	
     <td width=25%><div align="left"><img src='coremain/images/marker.gif'> Upload ไฟล์ที่ 1</div></td> 
	 <td width=65%><div align="left"><input name="userfile1" type="file" size="40"></td> 
  </tr>

    <tr height='35'>
     <td width=5%></td> 	
     <td width=25%><div align="left"><img src='coremain/images/marker.gif'> Upload ไฟล์ที่ 2</div></td> 
	 <td width=65%><div align="left"><input name="userfile2" type="file" size="40"></td> 
  </tr>

    <tr height='35'>
     <td width=5%></td> 	
     <td width=25%><div align="left"><img src='coremain/images/marker.gif'> Upload ไฟล์ที่ 3</div></td> 
	 <td width=65%><div align="left"><input name="userfile3" type="file" size="40"></td> 
  </tr>
  
  <?php  text_button_insert(3) ?>

<!--	<tr height='35'>
     <td width=5%></td> 	
     <td width=15%></td> 
	 <td width=80%><div align="left">       
			<input type="submit" name="Submit" value="เพิ่มข้อมูล" onmouseover=this.style.cursor='hand'>
</td> 
  </tr>-->

</form> 
</table>

<?php }
fieldset_down();
?>

<script language="javascript">
function checkadd() {
if(document.add.topic.value=="") {
alert("กรุณากรอก ชื่อลิงค์!") ;
document.add.topic.focus() ;
return false ;
}
else if(document.add.link_url.value=="http://") {
alert("กรุณากรอก URL ให้ถูกต้อง!") ;
document.add.link_url.focus() ;
return false ;
}
else 
return true ;
}
</script>

Youez - 2016 - github.com/yon3zu
LinuXploit