<?php elgg_load_css('upload_groups.css'); elgg_load_js('jquery.form'); elgg_load_js('upload_groups.js'); $upload = new UploadGroups(); /// Get the upload form $body = $upload->getUploadForm(); echo $body;
<?php /** * Upload groups. Processes the uploaded file and prints a report of the cerated files. * * @package upload_groups * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2 * @author Jaakko Naakka / Mediamaisteri Group * @copyright Mediamaisteri Group 2009 * @link http://www.mediamaisteri.com/ */ $upload = new UploadGroups(); elgg_push_context('admin'); /// Get the input from the form or hidden fields $encoding = get_input('encoding'); $delimiter = get_input('delimiter'); $confirm = get_input('confirm', false); /// Set the parameters $upload->setEncoding($encoding); $upload->setDelimiter($delimiter); if (!$confirm) { /// Open the file if (!$upload->openFile('csvfile')) { forward("admin/groups/upload"); } /// Process the file if (!$upload->processFile()) { forward("admin/groups/upload"); } /// Check the groups $upload->checkGroups();