Copyright Intermesh 2003 Author: Merijn Schering <*****@*****.**> Version: 1.0 Release date: 08 July 2003 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. */ require "../../Group-Office.php"; $GO_SECURITY->authenticate(); $GO_MODULES->authenticate('email'); require $GO_CONFIG->class_path . "imap.class.inc"; require $GO_MODULES->class_path . "email.class.inc"; require $GO_CONFIG->class_path . "filetypes.class.inc"; $filetypes = new filetypes(); $mail = new imap(); $email = new email(); require $GO_LANGUAGE->get_language_file('email'); $em_settings = $email->get_settings($GO_SECURITY->user_id); $link_back = isset($_REQUEST['link_back']) && $_REQUEST['link_back'] != '' ? $_REQUEST['link_back'] : $_SERVER['REQUEST_URI']; $to = ''; $texts = ''; $images = ''; $account_id = isset($_REQUEST['account_id']) ? $_REQUEST['account_id'] : 0; $task = isset($_REQUEST['task']) ? $_REQUEST['task'] : ''; $mailbox = isset($_REQUEST['mailbox']) ? $_REQUEST['mailbox'] : "INBOX"; $uid = isset($_REQUEST['uid']) ? $_REQUEST['uid'] : 0; $max_rows = isset($_REQUEST['max_rows']) ? $_REQUEST['max_rows'] : $_SESSION['GO_SESSION']['max_rows_list']; $first_row = isset($_REQUEST['first_row']) ? $_REQUEST['first_row'] : 0; $table_tabindex = isset($_REQUEST['table_tabindex']) ? $_REQUEST['table_tabindex'] : null;
Copyright Intermesh 2003 Author: Merijn Schering <*****@*****.**> Version: 1.0 Release date: 08 July 2003 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. */ require "../../Group-Office.php"; $GO_SECURITY->authenticate(); $GO_MODULES->authenticate('email'); require $GO_CONFIG->class_path . "imap.class.inc"; require $GO_MODULES->class_path . "email.class.inc"; require $GO_CONFIG->class_path . 'filetypes.class.inc'; $filetypes = new filetypes(); $mail = new imap(); $email = new email(); $account = $email->get_account($_REQUEST['account_id']); if ($mail->open($account['host'], $account['type'], $account['port'], $account['username'], $GO_CRYPTO->decrypt($account['password']), $_REQUEST['mailbox'], 0, $account['use_ssl'], $account['novalidate_cert'])) { $file = $mail->view_part($_REQUEST['uid'], $_REQUEST['part'], $_REQUEST['transfer'], $_REQUEST['mime']); $mail->close(); $filename = smartstrip($_REQUEST['filename']); $extension = get_extension($filename); $type = $filetypes->get_type($extension); $browser = detect_browser(); //header('Content-Length: '.strlen($file)); header('Expires: ' . gmdate('D, d M Y H:i:s') . ' GMT'); if ($browser['name'] == 'MSIE') { header('Content-Type: application/download'); header('Content-Disposition: attachment; filename="' . $filename . '"');
/* Copyright Intermesh 2003 Author: Merijn Schering <*****@*****.**> Version: 1.0 Release date: 08 July 2003 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. */ require "../../Group-Office.php"; $GO_SECURITY->authenticate(true); require $GO_LANGUAGE->get_base_language_file('filetypes'); //load file management class require $GO_CONFIG->class_path . "filetypes.class.inc"; $filetypes = new filetypes(); if ($_SERVER['REQUEST_METHOD'] == "POST") { if (is_uploaded_file($_FILES['uploaded_file'])) { if (eregi("gif", $_FILES['uploaded_file']['type'])) { $filetype = $filetypes->get_type($_POST['extension']); $filetypes->update_filetype($extension, $filetype['friendly'], $uploaded_file); echo "<script type=\"text/javascript\">\nopener.document.location.reload();\nwindow.close();\n</script>"; exit; } } else { $feedback = "<p class=\"Error\">" . $ft_no_file . "</p>"; } } $page_title = "File upload"; require $GO_THEME->theme_path . "simple_header.inc"; ?>
require $GO_LANGUAGE->get_language_file('filesystem'); $email_module = $GO_MODULES->get_module('email'); if (!$email_module) { die($strDataError); } require $GO_CONFIG->class_path . "imap.class.inc"; require $email_module['class_path'] . "email.class.inc"; $mail = new imap(); $email = new email(); $task = isset($_REQUEST['task']) ? $_REQUEST['task'] : ''; $filename = isset($_REQUEST['filename']) ? $_REQUEST['filename'] : ''; if ($filename != '' && $_SERVER['REQUEST_METHOD'] != 'POST') { $filename = stripslashes($filename); $_SESSION['email_tmp_file'] = $GO_CONFIG->tmpdir . $filename; require $GO_CONFIG->class_path . 'filetypes.class.inc'; $filetypes = new filetypes(); $extension = get_extension($filename); if (!($type = $filetypes->get_type($extension))) { $filetypes->add_type($extesnion, $mime); } } if ($filename == '') { $filename = basename($_SESSION['email_tmp_file']); } else { $filename = smartstrip($filename); } if (isset($task) && $task == 'GO_HANDLER') { require $GO_CONFIG->class_path . 'filesystem.class.inc'; $fs = new filesystem(); if (file_exists(smartstrip($_REQUEST['path']) . '/' . $filename)) { $feedback = '<p class="Error">' . $fbNameExists . '</p>';
*/ require "../../Group-Office.php"; $GO_SECURITY->authenticate(); $GO_MODULES->authenticate('filesystem'); require $GO_LANGUAGE->get_language_file('email'); $email_module = $GO_MODULES->get_module('email'); if (!$email_module) { die($strDataError); } //load file management class require $GO_CONFIG->class_path . "filesystem.class.inc"; require $email_module['class_path'] . 'email.class.inc'; require $GO_CONFIG->class_path . 'filetypes.class.inc'; $email = new email(); $fs = new filesystem(); $filetypes = new filetypes(); $path = stripslashes($_REQUEST['path']); $task = ''; if (!$fs->has_read_permission($GO_SECURITY->user_id, $path)) { header('Location: ' . $GO_CONFIG->host . 'error_docs/401.php'); exit; } $attachments_size = 0; if (isset($_SESSION['attach_array'])) { for ($i = 1; $i <= sizeof($_SESSION['attach_array']); $i++) { $attachments_size += $_SESSION['attach_array'][$i]->file_size; } } if (isset($_REQUEST['files'])) { for ($i = 0; $i < count($_REQUEST['files']); $i++) { $attachments_size += filesize(smartstrip($_REQUEST['files'][$i]));
require $GO_CONFIG->root_path . 'error_docs/403.inc'; require $GO_THEME->theme_path . "footer.inc"; exit; } //set the folder id we are in $folder_id = isset($_REQUEST['folder_id']) ? $_REQUEST['folder_id'] : $site['root_folder_id']; $link_back = $GO_MODULES->url . 'browse.php?site_id=' . $site_id . '&folder_id=' . $folder_id; //what to do before output $task = isset($_REQUEST['task']) ? $_REQUEST['task'] : ''; switch ($task) { case 'upload': if ($_SERVER['REQUEST_METHOD'] == 'POST') { $task = 'list'; if (isset($_FILES['file'])) { require_once $GO_CONFIG->class_path . 'filetypes.class.inc'; $filetypes = new filetypes(); for ($i = 0; $i < count($_FILES['file']['tmp_name']); $i++) { if (is_uploaded_file($_FILES['file']['tmp_name'][$i])) { $extension = get_extension($_FILES['file']['name'][$i]); if (!$filetypes->get_type($extension)) { $filetypes->add_type($extension, $_FILES['file']['type'][$i]); } $name = $_FILES['file']['name'][$i]; $x = 0; while ($cms->file_exists($folder_id, $name)) { $x++; $name = strip_extension($_FILES['file']['name'][$i]) . ' (' . $x . ').' . get_extension($_FILES['file']['name'][$i]); } $fp = fopen($_FILES['file']['tmp_name'][$i], 'r'); $content = addslashes(fread($fp, $_FILES['file']['size'][$i])); fclose($fp);
<?php /* Copyright Intermesh 2003 Author: Merijn Schering <*****@*****.**> Version: 1.0 Release date: 08 July 2003 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. */ require "../Group-Office.php"; //load filetypes management class require $GO_CONFIG->class_path . "filetypes.class.inc"; $filetypes = new filetypes(); $mime = isset($_REQUEST['mime']) ? $_REQUEST['mime'] : ''; if (!($filetype = $filetypes->get_type($_REQUEST['extension'], true))) { $filetype = $filetypes->add_type($_REQUEST['extension'], $mime, '', '', true); } header("Cache-Control: max-age=2592000\n"); header("Content-type: image/gif\n"); header("Content-Disposition: filename=" . $filetype['extension'] . ".gif\n"); header("Content-Transfer-Encoding: binary\n"); echo $filetype['image'];