"submitfiles", "processid" => $params['processid'])); } if ($id > 0) { // user is uploading to an object require_once CROOT."/midware/Factory.class.php"; require_once CROOT."/midware/Search.class.php"; // set the tab which this template belongs to; $tab = 'objects'; // global $metadata; moved to frame_vars // log action => increment object page view Tools::log_action($id, 1); try { $structure = Factory::getObjectByID($id); } catch (Exception $e) { $error = true; $msg = $e->getMessage(); } if (is_object($structure)) { $content_vars['object'] = $structure->getDisplayData(); } } $content_vars['removedatepicker'] = true; $content_vars['author_name'] = $_SESSION['account_fileownername']; // overwrite, when we have another name later??? // get licenses include CROOT."/midware/License.class.php"; $content_vars['licenses'] = License::getLicenseNameKey($_SESSION['account_id']); // get pricemodels include CROOT."/midware/Pricemodel.class.php"; $content_vars['pricemodels'] = Pricemodel::getPricemodelNameKey($_SESSION['account_id']); // get ownerships $query = "SELECT id, longtext FROM fileownership WHERE NOT id = 2 ORDER BY sort;"; $content_vars['ownerships'] = query($query); // get categories // > we have them already in framevars // var_dump($frame_vars['cattree']); $content_vars['cattree'] = $frame_vars['cattree']; // get collections $query = sprintf("SELECT l.name, l.id FROM lightbox l WHERE (NOT l.deleted) AND foraccountid = %u AND NOT visibility = 'invisible' ORDER BY l.setupdate DESC NULLS LAST;", $_SESSION['account_id']); $content_vars['albums'] = query($query); // get available languages $query = sprintf('SELECT languageid, "name", isocode FROM language WHERE NOT deleted ORDER BY languageid', $_SESSION['lng']); $content_vars['languages'] = query($query); /* dooley 2011-04-04 when &o=numeric, we come possible from phorio object page and want to upload a file to this object with this is */ if (isset($id) && is_numeric($id)){ if (is_object($structure)) { // only when object exists $content_vars['to_object'] = $id; } } /* below is not used ? */ /* switch (strip_tags($_GET['c'])){ case "showupload"; show_uploaded_files(); default: uploader_standard(); break; } */ function show_uploaded_files(){ global $app_vars; if ($_FILES){ // handle file upload here (make thumbs, save, move and that... $app_vars['showuploadedfiles'] = true; $app_vars['files'] = $_FILES; $app_vars['postdata'] = $_POST; } } function get_lightbox_names_html(){ $coll = array( 'lightbox_id1' => 'my upload collection', 'lightbox_id2' => 'dooleys public collection', 'lightbox_id3' => 'another collection' ); $tmp = ''; return $tmp; } function uploader_standard(){ global $app_vars; $app_vars['upload_collections'] = get_lightbox_names_html(); $app_vars['accordion'] = true; } ?>