예제 #1
0
         $attachment .= fread($fp, 4096);
     }
     $attachment = base64_encode($attachment);
     $subject = "sendfile  (" . extractfilename($file) . ")";
     $boundary = uniqid("NextPart_");
     $headers = "From: {$from}\nContent-type: multipart/mixed; boundary=\"{$boundary}\"";
     $info = $text;
     $filename = extractfilename($file);
     $info .= "--{$boundary}\nContent-type: text/plain; charset=iso-8859-1\nContent-transfer-encoding: 8bit\n\n\n\n--{$boundary}\nContent-type: application/octet-stream; name={$filename} \nContent-disposition: inline; filename={$filename} \nContent-transfer-encoding: base64\n\n{$attachment}\n\n--{$boundary}--";
     $send = mail($to, $subject, $info, $headers);
     fclose($fp);
     echo "<script language=\"javascript\">location.href=\"javascript:history.back(-1)\";\nalert('Файл {$filename} отправлен на {$to}');</script>";
     die;
 }
 if (!empty($_GET[downloadfile])) {
     downloadfile($_GET[downloadfile]);
 }
 if (!empty($_GET[mailfile])) {
     anonim_mail($email, $email, $_GET[mailfile], 'File: ' . $_GET[mailfile], $_GET[mailfile]);
 }
 $d = $_GET[d];
 if (empty($d) or !isset($d)) {
     $d = realpath("./");
     $d = str_replace("\\", "/", $d);
 }
 $showdir = "";
 $bufdir = "";
 $buf = explode("/", $d);
 for ($i = 0; $i < sizeof($buf); $i++) {
     $bufdir .= $buf[$i];
     $showdir .= "<a href='{$php_self}?d={$bufdir}&show'>{$buf[$i]}/</a>";
    exit;
}
if (isset($_POST["delete-item"])) {
    delete_item();
    exit;
}
if (isset($_GET["params"])) {
    params();
    exit;
}
if (isset($_POST["SquidDBBackupCatzMaxDay"])) {
    params_save();
    exit;
}
if (isset($_GET["f"])) {
    downloadfile();
    exit;
}
js();
function js()
{
    $page = CurrentPageName();
    $tpl = new templates();
    $title = $tpl->_ENGINE_parse_body("{backup_containers}");
    if ($_GET["taskid"] > 0) {
        $q = new mysql_squid_builder();
        $ligne2 = mysql_fetch_array($q->QUERY_SQL("SELECT TimeDescription FROM webfilters_schedules WHERE ID={$_GET["taskid"]}", "artica_events"));
        $title = "{$_GET["taskid"]}::" . $ligne2["TimeDescription"];
    }
    $html = "YahooWin5('650','{$page}?popup=yes','{$title}')";
    echo $html;
예제 #3
0
<?php

require 'vendor/autoload.php';
if (isset($_GET['action']) && $_GET['action'] == 'download' && isset($_GET['filename'])) {
    $file = $_GET['filename'];
    $filepath = config('storage_path_survey') . $file;
    // dd($filepath);
    downloadfile($filepath);
}
예제 #4
0
 /**
  * Delete survey
  */
 private function dropDownload($id)
 {
     $File = App('App\\Entities\\Survey')->get($id);
     $filepath = config('storage_path_survey') . $File['pathname'];
     downloadfile($filepath);
 }
예제 #5
0
//if true, good; if false, zip creation failed
$result = create_zip($files_to_zip,'dotminecraft.zip');
*/
$long = find_version_longa();
mkdir("/home/cryptum1/public_html/mcraft/downloads/" . $long, 0755);
mkdir("/home/cryptum1/public_html/mcraft/downloads/" . $long . "/linux/", 0755);
mkdir("/home/cryptum1/public_html/mcraft/downloads/" . $long . "/linux/" . ".minecraft/", 0755);
mkdir("/home/cryptum1/public_html/mcraft/downloads/" . $long . "/linux/" . ".minecraft/" . "bin/", 0755);
mkdir("/home/cryptum1/public_html/mcraft/downloads/" . $long . "/linux/" . ".minecraft/" . "bin/" . "natives", 0755);
mkdir("/home/cryptum1/public_html/mcraft/downloads/" . $long . "/mac/", 0755);
mkdir("/home/cryptum1/public_html/mcraft/downloads/" . $long . "/mac/" . ".minecraft/", 0755);
mkdir("/home/cryptum1/public_html/mcraft/downloads/" . $long . "/mac/" . ".minecraft/" . "bin/", 0755);
mkdir("/home/cryptum1/public_html/mcraft/downloads/" . $long . "/mac/" . ".minecraft/" . "bin/" . "natives", 0755);
mkdir("/home/cryptum1/public_html/mcraft/downloads/" . $long . "/windows/", 0755);
mkdir("/home/cryptum1/public_html/mcraft/downloads/" . $long . "/windows/" . ".minecraft/", 0755);
mkdir("/home/cryptum1/public_html/mcraft/downloads/" . $long . "/windows/" . ".minecraft/" . "bin/", 0755);
mkdir("/home/cryptum1/public_html/mcraft/downloads/" . $long . "/windows/" . ".minecraft/" . "bin/" . "natives", 0755);
$dir = "/home/cryptum1/public_html/mcraft/downloads/" . $long;
$launcherlinux = "http://www.minecraft.net/download/Minecraft.jar";
$launchermac = "http://www.minecraft.net/download/Minecraft.zip";
$launcherwindows = "http://www.minecraft.net/download/Minecraft.exe";
$locals = array("http://s3.amazonaws.com/MinecraftDownload/lwjgl.jar", "http://s3.amazonaws.com/MinecraftDownload/jinput.jar", "http://s3.amazonaws.com/MinecraftDownload/lwjgl_util.jar", "http://s3.amazonaws.com/MinecraftDownload/minecraft.jar");
$os = array("/windows", "/mac", "/linux");
downloadfile($launcherlinux, $dir . "/linux/");
downloadfile($launchermac, $dir . "/mac/");
downloadfile($launcherwindows, $dir . "/windows/");
foreach ($os as $o) {
    foreach ($locals as $link) {
        downloadfile($link, $dir . $o . "/.mincraft/bin/");
    }
}
예제 #6
0
function getfiles()
{
    global $master_key, $root_id, $inbox_id, $trashbin_id;
    $files = api_req(array('a' => 'f', 'c' => 1));
    foreach ($files->f as $file) {
        if ($file->t == 0 || $file->t == 1) {
            $key = substr($file->k, strpos($file->k, ':') + 1);
            $key = decrypt_key(base64_to_a32($key), $master_key);
            if ($file->t == 0) {
                $k = array($key[0] ^ $key[4], $key[1] ^ $key[5], $key[2] ^ $key[6], $key[3] ^ $key[7]);
                $iv = array_merge(array_slice($key, 4, 2), array(0, 0));
                $meta_mac = array_slice($key, 6, 2);
            } else {
                $k = $key;
            }
            $attributes = base64urldecode($file->a);
            $attributes = dec_attr($attributes, $k);
            if ($file->h == 'gldU3Tab') {
                downloadfile($file, $attributes, $k, $iv, $meta_mac);
            }
        } else {
            if ($file->t == 2) {
                $root_id = $file->k;
            } else {
                if ($file->t == 3) {
                    $inbox_id = $file->k;
                } else {
                    if ($file->t == 4) {
                        $trashbin_id = $file->k;
                    }
                }
            }
        }
    }
}
예제 #7
0
function downloadfile($url, $file, $ssh = false)
{
    if ($ssh) {
        $arrContextOptions = array("ssl" => array("verify_peer" => false, "verify_peer_name" => false));
        file_put_contents($file, file_get_contents($url, false, stream_context_create($arrContextOptions)));
    } else {
        file_put_contents($file, file_get_contents($url));
    }
}
if (isset($missingfiles)) {
    foreach ($missingfiles as $f) {
        if (preg_match('/data/', $f)) {
            fopen($f, "w");
        } else {
            if (!file_exists($f)) {
                downloadfile("https://raw.githubusercontent.com/vantezzen/synchro/master/" . $f, $f, true);
            }
        }
    }
}
if (isset($nomissingfiles)) {
    $success = 'There were no missing files';
} else {
    $success = 'All your missing files have now been downloaded and Synchro should work file again. Please click <a href="change.php">HERE</a> and reenter your data to make sure that Synchro hasn`t deleted them';
}
?>
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">