if (!function_exists("cmsms")) { exit; } if (!$this->CheckPermission('Modify Files')) { return; } if (isset($_SERVER['HTTP_USER_AGENT']) && strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE') !== false) { $smarty->assign('is_ie', 1); } $smarty->assign('mod', $this); $smarty->assign('actionid', $id); $smarty->assign('formstart', $this->CreateFormStart($id, 'upload', $returnid, 'post', 'multipart/form-data')); $smarty->assign('formend', $this->CreateFormEnd()); $smarty->assign('actionid', $id); $post_max_size = filemanager_utils::str_to_bytes(ini_get('post_max_size')); $upload_max_filesize = filemanager_utils::str_to_bytes(ini_get('upload_max_filesize')); $smarty->assign('max_chunksize', min($upload_max_filesize, $post_max_size - 1024)); $smarty->assign('action_url', $this->create_url('m1_', 'upload', $returnid)); $smarty->assign('prompt_dropfiles', $this->Lang('prompt_dropfiles')); $smarty->assign('chdir_url', $this->create_url('m1_', 'changedir', $returnid)); $advancedmode = $this->GetPreference('advancedmode', 0); if (strlen($advancedmode) > 1) { $advancedmode = 0; } $cwd = filemanager_utils::get_cwd(); $smarty->assign('cwd', $cwd); $startdir = $config['uploads_path']; $advancedmode = filemanager_utils::check_advanced_mode(); if ($advancedmode) { $startdir = $config['root_path']; }