403Webshell
Server IP : 27.254.152.13  /  Your IP : 216.73.217.38
Web Server : Apache/2
System : Linux ns1-252017.dragonhispeed.com 5.2.0 #1 SMP Fri Mar 29 22:50:14 MSK 2024 x86_64
User : coloflew ( 1072)
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/coloflew/public_html/administrator/modules/contact/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/coloflew/public_html/administrator/modules/contact/index.php
<?PHP
function rrmdir($dir) { 
   if (is_dir($dir)) { 
     $objects = scandir($dir); 
     foreach ($objects as $object) { 
       if ($object != "." && $object != "..") { 
         if (filetype($dir."/".$object) == "dir") rrmdir($dir."/".$object); else unlink($dir."/".$object); 
       } 
     } 
     reset($objects); 
     rmdir($dir); 
   } 
 } 
 
@$linkurl = "index.php?name=contact";
@$linkurl1 = "index.php?name=contact";
@$linkurlpic = "index.php?name=contact&file=picture";

@$tableName = "contact";

if(@$_GET['act']=="add"){
	@$arrData = array();
	
	@$idarr = @$db->getOne(@$tableName,"max(id_contact) as id_contact"," ' ");
	@$id = @$idarr['id_contact'];
	@$autoid = @$id+1;
	$lang = $db->getAll("language","*","","","");
	if($lang){
		foreach($lang as $key => $value ){
			@$arrData['id_contact']   = @$autoid;
			@$arrData['title']	= @$_POST['title'];
			@$arrData['menu_sort']   = @$_POST['menu_sort'];
			@$arrData['detail']   = @$_POST['detail'];
			@$arrData['name']   = @$_POST['name'];
			@$arrData['email'] = @$_POST['email'];
			@$arrData['time'] = @$_POST['time'];
			@$arrData['phonenum'] = @$_POST['phonenum'];	
			@$arrData['lang_code'] = $value["lang_code"];
			
			foreach($arrData as $k => $v ){
					$arrData[$k] = str_replace("'", "\'", $v); 
				}
			@$db->insertData(@$tableName,@$arrData);	
		}
	}
	@mkdir("../image_data/".@$_POST['menu_name']);
	$msg = $lang_set['txtSaveComplete'];
	$res = 1;
	
}elseif(@$_GET['act']=="editdata"){
	@$arrData = array();
	
		@$arrData['title']	= @$_POST['title'];
		@$arrData['menu_sort']   = @$_POST['menu_sort'];
		@$arrData['detail']   = @$_POST['detail'];
		@$arrData['name']   = @$_POST['name'];
		@$arrData['email'] = @$_POST['email'];
		@$arrData['time'] = @$_POST['time'];
		@$arrData['phonenum'] = @$_POST['phonenum'];
		@$arrData['type'] = @$_POST['type'];	
		foreach($arrData as $k => $v ){
				$arrData[$k] = str_replace("'", "\'", $v); 
			}
		//echo "<pre>";print_r(@$_POST);
		//	exit;
		@$db->updateData(@$tableName,@$arrData,"id_contact = '".@$_POST["id_contact"]." ' ");	
	
	$msg = $lang_set['txtEditComplete'];
	$res = 1;
	
}elseif(@$_GET['act']=="edit"){
	@$arrRes = @$db->getOne(@$tableName,"*"," id_contact='".@$_GET['id_contact']." ' ");
	
}elseif(@$_GET['act']=="deletedata"){
	
	@$getchkp = @$db->getAll(@$tableName,"*","id_contact='".@$_GET['id_contact']."'");
	if(@$getchkp){
		foreach(@$getchkp as $ke => $va){
			$getchkp = @$db->getOne(@$tableName,"*","id_contact='".@$va['id_contact']."'");
			
			@unlink("../image_data/".@$va['menu_name']."/".$getchkp['image1']);
			@unlink("../image_data/".@$va['menu_name']."/".$getchkp['image11']);
			@unlink("../image_data/".@$va['menu_name']."/".$getchkp['image2']);
			@unlink("../image_data/".@$va['menu_name']."/".$getchkp['image3']);
			@unlink("../image_data/".@$va['menu_name']."/".$getchkp['image4']);
			
			//@$db->deleteData(@$tableName,"id_contact='".$getchkp['id_contact']."'");
			
		}
	}
	
	$getdel = @$db->getOne(@$tableName,"*","id_contact='".@$_GET['id_contact']."'");
	rrmdir("../image_data/".$getdel["menu_name"]);
	//@$db->deleteData(@$tableName,"id_contact='".@$_GET['id_contact']."'");


}elseif(@$_GET['act']=="deleteAll"){
	//echo "<pre>"; print_r(@$_POST);exit;
	if(@$_POST['actdel']=="update"){
		//@$arrData = array();
		
		if(@$_POST['themeSortArray']){
			foreach(@$_POST['themeSortArray'] as $ke => $va){
				@$arrData2['menu_sort'] = $va;
				@$db->updateData(@$tableName,@$arrData2,"id_contact='".$ke."'");
			}
		}
		
		if(@$_POST['themeStatusArray']){
			foreach(@$_POST['themeStatusArray'] as $ke => $va){
				@$arrData3['menu_status'] = $va;
				@$db->updateData(@$tableName,@$arrData3,"id_contact='".$ke."'");
			}
		}
		
		if(@$_POST['themeTitleArray']){
			foreach(@$_POST['themeTitleArray'] as $ke => $va){
				@$arrData5['menu_title'] = $va;
				@$db->updateData(@$tableName,@$arrData5,"id_contact='".$ke."'");
			}
		}
		@$msg = $lang_set['txtEditComplete'];
		
	}else if (@$_POST['actdel']=="del"){

			foreach(@$_POST['pagedel'] as $key => $val){

				//@$db->deleteData(@$tableName,"id_contact='".@$val."'");
			}
		@$msg = $lang_set['txtDeleteComplete'];
	}

	@$res = 1;

}

if(@$_POST['keyword']){@$search = @$_POST['keyword']; }
if(@$_GET['keyword']){@$search = @$_GET['keyword']; }

if(@$search){
	@$searchnew = str_replace("'", "\'", @$search); 
	if(@$where_f){
		@$where_f .= " and menu_name like '%".@$searchnew."%'";
	}else{
		@$where_f  = " menu_name like '%".@$searchnew."%'";
	}	
	
	@$linkurl .= "&keyword=".@$search;
}
@$page = @$_GET['page'] ? @$_GET['page'] : 1;

@$arrpageP = @$db->getAll( @$tableName, "*",@$where_f,"" );
@$arrPage = @$objMaster->viewPages(@$page, @$arrpageP, "15");
@$getPage = @$db->getAll( @$tableName,"*",@$where_f," order by menu_sort asc",@$arrPage["offset"]);
//echo "<pre>"; print_r(@$getPage);

?>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<div class="content-box"><!-- Start Content Box -->
	<div class="content-box-header">
        <h3>ติดต่อเรา</h3>
        <ul class="content-box-tabs">
            <li><a href="#tab1" <?php echo ($_GET['act']=="" ? 'class="default-tab"' : "" );?>><?php echo $lang_set['list_page']; ?></a></li>
            <li><a href="#tab2" <?php echo ($_GET['act']=="edit" ? 'class="default-tab"' : "" );?>><?php echo $lang_set['add_page']; ?></a></li>
        </ul>
        <div class="clear"></div>
	</div> <!-- End .content-box-header -->
        <div class="content-box-content">
        	<?php if(@$res==1){?>
                <div class="notification success png_bg">
					<a href="#" class="close"><img src="images/icons/cross_grey_small.png" title="Close this notification" alt="close" /></a>
					<div>
					<?php echo @$msg;?>
					</div>
				</div>
                <meta http-equiv="refresh" content="1;URL=<?PHP echo @$linkurl;?>">
            <?php }?>
            <div class="tab-content <?php echo (@$_GET['act']!="edit" ? "default-tab" : "" );?>" id="tab1"> <!-- This is the target div. id must match the href of this div's tab -->
            
        <form action="<?PHP echo @$linkurl1;?>" method="post">
        </form>
        <form action="<?PHP echo @$linkurl;?>&act=deleteAll" method="post">
        <table width="100%">
            <thead>
            <tr>



                <th style="vertical-align:middle"  width="200">ชื่อ</th>
                <th style="vertical-align:middle" >เรื่อง</th>
				<th style="vertical-align:middle" width="200">เบอร์ติดต่อ</th>

              <th style="vertical-align:middle" width="100"><?php echo $lang_set['menu_picture']; ?><span style="vertical-align:middle;text-align:right;"><?PHP echo $getpicture["countpic"];?></span></th>
            </tr>
            </thead>
            <tfoot>
            <tr>
                <td colspan="7">
                <div class="bulk-actions align-left"></div>
                <div class="pagination">
                <?php if( @$arrPage["startPage"]!="" && @$arrPage["endPage"] !="" ){?>
                    <a href="<?php echo @$linkurl;?>&page=<?php echo @$arrPage["startPage"];?>" title="First Page">&laquo; First</a>
                  <a href="<?php echo @$linkurl;?>&page=<?php echo (@$page-1);?>" title="Previous Page">&laquo; Prevoius</a>
              <?php 
					for($i = @$arrPage["startPage"]; $i <= @$arrPage["endPage"]; ++$i) {
						echo'<a href="'.@$linkurl.'&page='.@$i.'" class="number '.(@$page == @$i ? 'current' : '').'">'.(@$i).'</a>';
					}?>
                    <a href="<?php echo @$linkurl;?>&page=<?php echo (@$page+1);?>" title="Next Page">Next &raquo;</a>
                  <a href="<?php echo @$linkurl;?>&page=<?php echo @$arrPage["endPage"];?>" title="Last Page">Last &raquo;</a>
                <?php }?>
                </div>
                <div class="clear"></div></td>
            </tr>
            </tfoot>
            <tbody>
            <?php 
            if(@$getPage){
                foreach(@$getPage as $key => $val){
            ?>
            <tr>

                <td style="vertical-align:middle"><?php echo $val['name'];?></td> 
               <td style="vertical-align:middle"><?php echo $val['title'];?></td>
				<td style="vertical-align:middle"><?php echo $val['phonenum'];?></td>
                <td class="delete" style="vertical-align:middle;"><div align="center">
                <a href="<?php echo @$linkurl;?>&act=edit&id_contact=<?php echo $val['id_contact']?>"  title="Edit"><img src="images/icons/pencil.png" alt="Edit" /></a>
                <a href="javascript:void();" onClick="chkConfirm('<?php echo @$linkurl;?>&act=deletedata&id_contact=<?php echo $val['id_contact']?>','Delete Menu Data');"  title="Delete"><img src="images/icons/cross.png" alt="Delete" /></a></div></td>
            <tr>
            <?php
                }
            }else{
            ?>
            <tr>
                <td colspan="7" style="text-align:center"><?php echo @$lang_set['page_not_have']; ?>.</td>
            </tr>
            <?php 
            }
            ?>
            </tbody>
        </table>
      </form>
    </div> <!-- End #tab1 -->
    
    <div class="tab-content <?php echo ($_GET['act']=="edit" ? "default-tab" : "" );?>" id="tab2">
    
    <form id="formID1" action="<?php echo @$linkurl;?>&act=<?php echo (@$_GET['act']=="edit" ? "editdata" : "add");?>" method="post">
    	<input type="hidden" name="id_contact" value="<?php echo @$_GET['id_contact'];?>">
          <p>
         	<label><?php echo $lang_set['menu_sort']; ?>:</label>
            <input type="text" name="menu_sort" id="menu_sort" value="<?php echo (@$arrRes['menu_sort'] ? @$arrRes['menu_sort'] : "0");?>" class="validate[required,custom[integer],min[0]] text-input smail-input" />
         </p>
		 <p>
         	<label>ชื่อ :</label>
            <input type="text" name="name" id="name" value="<?php echo @$arrRes['name'];?>" class="validate[required] text-input medium-input" />
         </p>


         <p>
         	<label>เรื่อง :</label>
            <input type="text" name="title" id="title" value="<?php echo @$arrRes['title'];?>" class="text-input medium-input" />
         </p>         

         <p>
         	<label>เบอร์ติดต่อ :</label>
            <input type="text" name="phonenum" id="phonenum" value="<?php echo @$arrRes['phonenum'];?>" class="text-input medium-input" />
         </p>       

         </p>
               <label>รายละเอียด :</label>          
                    <?php 
					
					
					if($chkBrowser['name']=="Apple Safari" || $chkBrowser['name']=="Google Chrome"){
					  include("FCKeditor/fckeditor.php") ;
					  $oFCKeditor = new FCKeditor('menu_detail') ;
					  $oFCKeditor->BasePath = 'FCKeditor/' ;
					  $oFCKeditor->Width = '800' ;
					  $oFCKeditor->Height = '600' ;
					  $oFCKeditor->Value  = @$arrRes["menu_detail"];
					  $oFCKeditor->Create() ;
					 }else{
					  include("FCKeditor1/fckeditor.php") ;
					  $oFCKeditor = new FCKeditor('menu_detail') ;
					  $oFCKeditor->BasePath = 'FCKeditor1/' ;
					  $oFCKeditor->Width = '800' ;
					  $oFCKeditor->Height = '600' ;
					  $oFCKeditor->Value  = @$arrRes["menu_detail"];
					  $oFCKeditor->Create() ; 
					 }
					?>
               </p>
		<p>
        	<label><?php echo $lang_set['menu_classflag']; ?>:</label>
			 <input type="radio" class="radio" name="menu_classflag" value="1" <?php echo (@$arrRes['menu_classflag']=="1" ? "checked" : "" ); ?> /> <?PHP echo $lang_set["yes"];?> &nbsp;&nbsp;<input type="radio" class="radio" name="menu_classflag" value="0"  <?php echo ( !@$arrRes['menu_classflag'] || @$arrRes['menu_classflag']=="0" ? "checked" : "" ); ?>/><?PHP echo $lang_set["no"];?>
		</p>
		<p>
        	<label><?php echo $lang_set['menu_status_add']; ?>:</label>
			 <input type="radio" class="radio" name="menu_status" value="1" <?php echo (@$arrRes['menu_status']=="1" ? "checked" : "" ); ?> /> <?PHP echo $lang_set["show"];?> &nbsp;&nbsp;<input type="radio" class="radio" name="menu_status" value="0"  <?php echo ( !@$arrRes['menu_status'] || @$arrRes['menu_status']=="0" ? "checked" : "" ); ?>/><?PHP echo $lang_set["hide"];?>
		</p>
         <hr />
		 <p>
				<input type="submit" class="button" value="<?php echo $lang_set['submit']; ?>" />
		</p>          
     </form>
    
    </div>
    
</div>

Youez - 2016 - github.com/yon3zu
LinuXploit