コード例 #1
0
ファイル: clientfiledetail.php プロジェクト: ColBT/php_tut
        $num = $lastId[0];
        unset($lastId);
    }
    if ($task != "0") {
        if ($docopy == "true") {
            uploadFile("files/{$project}/{$task}", $_FILES['upload']['tmp_name'], $upload_name);
            $size = file_info_size("../files/{$project}/{$task}/{$upload_name}");
            //$dateFile = file_info_date("../files/$project/$task/$upload_name");
            $chaine = strrev("../files/{$project}/{$task}/{$upload_name}");
            $tab = explode(".", $chaine);
            $extension = strtolower(strrev($tab[0]));
        }
    } else {
        if ($docopy == "true") {
            uploadFile("files/{$project}", $_FILES['upload']['tmp_name'], $upload_name);
            $size = file_info_size("../files/{$project}/{$upload_name}");
            //$dateFile = file_info_date("../files/$project/$upload_name");
            $chaine = strrev("../files/{$project}/{$upload_name}");
            $tab = explode(".", $chaine);
            $extension = strtolower(strrev($tab[0]));
        }
    }
    if ($docopy == "true") {
        $name = "{$upload_name}";
        $tmpquery = "UPDATE " . $tableCollab["files"] . " SET name='{$name}',date='{$dateheure}',size='{$size}',extension='{$extension}',vc_version='{$oldversion}' WHERE id = '{$num}'";
        connectSql("{$tmpquery}");
        headerFunction("clientfiledetail.php?id={$sendto}&msg=addFile&" . session_name() . "=" . session_id());
        exit;
    }
}
//---------------------------------------------------------------------------------------------------
コード例 #2
0
ファイル: addfile.php プロジェクト: ColBT/php_tut
     $num = $lastId[0];
     unset($lastId);
 }
 if ($task != "0") {
     if ($docopy == "true") {
         uploadFile("files/{$project}/{$task}", $_FILES['upload']['tmp_name'], "{$num}--" . $filename);
         $size = file_info_size("../files/" . $project . "/" . $task . "/" . $num . "--" . $filename);
         //$dateFile = file_info_date("../files/".$project."/".$task."/".$num."--".$filename);
         $chaine = strrev("../files/" . $project . "/" . $task . "/" . $num . "--" . $filename);
         $tab = explode(".", $chaine);
         $extension = strtolower(strrev($tab[0]));
     }
 } else {
     if ($docopy == "true") {
         uploadFile("files/{$project}", $_FILES['upload']['tmp_name'], "{$num}--" . $filename);
         $size = file_info_size("../files/" . $project . "/" . $num . "--" . $filename);
         //$dateFile = file_info_date("../files/".$project."/".$num."--".$filename);
         $chaine = strrev("../files/" . $project . "/" . $num . "--" . $filename);
         $tab = explode(".", $chaine);
         $extension = strtolower(strrev($tab[0]));
     }
 }
 if ($docopy == "true") {
     $name = $num . "--" . $filename;
     $tmpquery = "UPDATE " . $tableCollab["files"] . " SET name='{$name}',date='{$dateheure}',size='{$size}',extension='{$extension}' WHERE id = '{$num}'";
     connectSql("{$tmpquery}");
     if ($notifications == "true") {
         require "../projects_site/noti_uploadfile.php";
     }
     headerFunction("../linkedcontent/viewfile.php?id={$num}&msg=addFile&" . session_name() . "=" . session_id());
 }
コード例 #3
0
        $num = $lastId[0];
        unset($lastId);
    }
    if ($task != "0") {
        if ($cpy == "true") {
            uploadFile("files/{$project}/{$task}", $_FILES['upload']['tmp_name'], "{$num}--" . $_FILES['upload']['name']);
            $size = file_info_size("../files/" . $project . "/" . $task . "/" . $num . "--" . $_FILES['upload']['name']);
            // $dateFile = file_info_date("../files/".$project."/".$task."/".$num."--".$_FILES['upload']['name']);
            $chaine = strrev("../files/" . $project . "/" . $task . "/" . $num . "--" . $_FILES['upload']['name']);
            $tab = explode(".", $chaine);
            $extension = strtolower(strrev($tab[0]));
        }
    } else {
        if ($cpy == "true") {
            uploadFile("files/{$project}", $_FILES['upload']['tmp_name'], "{$num}--" . $_FILES['upload']['name']);
            $size = file_info_size("../files/" . $project . "/" . $num . "--" . $_FILES['upload']['name']);
            // $dateFile = file_info_date("../files/".$project."/".$num."--".$_FILES['upload']['name']);
            $chaine = strrev("../files/" . $project . "/" . $num . "--" . $_FILES['upload']['name']);
            $tab = explode(".", $chaine);
            $extension = strtolower(strrev($tab[0]));
        }
    }
    if ($cpy == "true") {
        $name = $num . "--" . $_FILES['upload']['name'];
        $tmpquery = "UPDATE " . $tableCollab["files"] . " SET name='{$name}',date='{$dateheure}',size='{$size}',extension='{$extension}' WHERE id = '{$num}'";
        connectSql("{$tmpquery}");
        header("Location: ../linkedcontent/viewfile.php?id={$num}&msg=addFile");
        exit;
    }
}
$tmpquery = "WHERE pro.id = '{$project}'";
コード例 #4
0
ファイル: addfile.php プロジェクト: jgatica/Netoffice
            $versionFile = $versionFile . ".0";
        }
        if ($versionFile == "") {
            $versionFile = "0.0";
        }
        $c = convertData($c);
        $tmpquery = "INSERT INTO " . $tableCollab["meetings_attachment"] . "(owner,project,meeting,comments,upload,published,status,vc_version,vc_parent) VALUES('" . $_SESSION['idSession'] . "','{$project}','{$meeting}','{$c}','{$dateheure}','1','{$statusField}','{$versionFile}','0')";
        connectSql("{$tmpquery}");
        $tmpquery = $tableCollab["meetings_attachment"];
        last_id($tmpquery);
        $num = $lastId[0];
        unset($lastId);
    }
    if ($cpy == "true") {
        uploadFile("files/{$project}/meetings/{$meeting}", $_FILES['upload']['tmp_name'], $filename_prefix . "--{$num}." . $extension);
        $size = file_info_size("../files/" . $project . "/meetings/" . $meeting . "/" . $filename_prefix . "--{$num}." . $extension);
        $chaine = strrev("../files/" . $project . "/meetings/" . $meeting . "/" . $filename_prefix . "--{$num}." . $extension);
        $tab = explode(".", $chaine);
        $extension = strtolower(strrev($tab[0]));
    }
    if ($cpy == "true") {
        $name = $filename_prefix . "--{$num}." . $extension;
        $tmpquery = "UPDATE " . $tableCollab["meetings_attachment"] . " SET name='{$name}',date='{$dateheure}',size='{$size}',extension='{$extension}' WHERE id = '{$num}'";
        connectSql("{$tmpquery}");
        header("Location: ../meetings/viewfile.php?id={$num}&msg=addFile");
        exit;
    }
}
$tmpquery = "WHERE pro.id = '{$project}'";
$projectDetail = new request();
$projectDetail->openProjects($tmpquery);