// if we have no gallery we can upload our stuff into and we can't create a new one, we can't upload a file if (empty($galleryList) && !$gBitUser->hasPermission('p_treasury_create_gallery')) { $gBitSystem->fatalPermission('p_treasury_upload_item'); } if (!empty($_REQUEST['content_id'])) { $galleryContentIds[] = $_REQUEST['content_id']; $gBitSmarty->assign('galleryContentIds', $galleryContentIds); } if (!empty($_REQUEST['treasury_store'])) { $treasuryItem = new TreasuryItem(); if ($treasuryItem->batchStore($_REQUEST)) { bit_redirect($_REQUEST['redirect']); } else { vd($treasuryItem->mErrors); } } if ($gBitSystem->isPackageActive('gigaupload')) { gigaupload_smarty_setup(TREASURY_PKG_URL . 'upload.php'); } elseif ($gBitSystem->isFeatureActive('treasury_extended_upload_slots')) { $gBitThemes->loadAjax('mochikit'); } else { $gBitThemes->loadJavascript(UTIL_PKG_PATH . 'javascript/libs/multifile.js', TRUE); } $gContent->invokeServices('content_edit_function'); $gBitSmarty->assign('feedback', !empty($feedback) ? $feedback : NULL); // get the ajax file browser working if ($gBitSystem->isFeatureActive('treasury_file_import_path') && $gBitUser->hasPermission('p_treasury_import_item')) { //$_REQUEST['ajax_path_conf'] = 'treasury_file_import_path'; require_once KERNEL_PKG_PATH . 'ajax_file_browser_inc.php'; } $gBitSystem->display('bitpackage:treasury/upload.tpl', tra('Upload File'), array('display_mode' => 'upload'));
# Software distributed under the License is distributed on an "AS # IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or # implied. See the License for the specific language governing # rights and limitations under the License. # # The Initial Developer of the Original Code is Raditha Dissanayake. # Portions created by Raditha are Copyright (C) 2003 # Raditha Dissanayake. All Rights Reserved. # # CHANGES: # 1.00 cookies were abolished! # 1.20 changed the form submit mechanism to filter for certain types # of files require_once '../kernel/setup_inc.php'; $gBitSmarty->assign('sid', $gBitUser->mUserId . '_' . md5(uniqid(rand()))); /* * if your php installation cannot produce md5 hashes delete the above line and * uncomment the line below. * * $sid = urlencode(uniqid(rand())); */ /* * improved user interface contributed by Rad Inks * http://www.radinks.com/ */ gigaupload_smarty_setup(GIGAUPLOAD_PKG_URL); if (!empty($_FILES)) { $gBitSmarty->assign('gigafiles', $_FILES); } $gBitSystem->display('bitpackage:gigaupload/generic.tpl', 'Upload Files', array('display_mode' => 'display')); //include("../inc/head.php");