Ejemplo n.º 1
0
<?php

/**
* $Id: visit.php,v 1.2 2005/08/02 03:47:51 mauriciodelima Exp $
* Module: SmartSection
* Author: marcan <*****@*****.**>
* Licence: GNU
*/
include_once "header.php";
$myts =& MyTextSanitizer::getInstance();
$fileid = isset($_GET['fileid']) ? intval($_GET['fileid']) : 0;
// Creating the item object for the selected item
$fileObj = new ssFile($fileid);
$fileObj->updateCounter();
if (!preg_match("/^ed2k*:\\/\\//i", $fileObj->getFileUrl())) {
    Header("Location: " . $fileObj->getFileUrl());
}
echo "<html><head><meta http-equiv=\"Refresh\" content=\"0; URL=" . $myts->oopsHtmlSpecialChars($fileObj->getFileUrl()) . "\"></meta></head><body></body></html>";
exit;
Ejemplo n.º 2
0
<?php

/**
* $Id: fileform.inc.php,v 1.2 2005/08/02 03:47:51 mauriciodelima Exp $
* Module: SmartSection
* Author: The SmartFactory <www.smartfactory.ca>
* Licence: GNU
*/
include_once XOOPS_ROOT_PATH . "/modules/smartsection/include/functions.php";
include_once XOOPS_ROOT_PATH . "/class/xoopstree.php";
include_once XOOPS_ROOT_PATH . "/class/xoopslists.php";
include_once XOOPS_ROOT_PATH . "/class/xoopsformloader.php";
global $smartsection_file_handler;
$fileid = isset($_GET['fileid']) ? intval($_GET['fileid']) : 0;
if ($fileid != 0) {
    $fileObj = new ssFile($fileid);
} else {
    $fileObj =& $smartsection_file_handler->create();
}
// FILES UPLOAD FORM
$files_form = new XoopsThemeForm(_MD_SS_UPLOAD_FILE, "files_form", xoops_getenv('PHP_SELF'));
$files_form->setExtra("enctype='multipart/form-data'");
// NAME
$name_text = new XoopsFormText(_MD_SS_FILENAME, 'name', 50, 255, $fileObj->name());
$name_text->setDescription(_MD_SS_FILE_NAME_DSC);
$files_form->addElement($name_text, true);
// DESCRIPTION
$description_text = new XoopsFormTextArea(_MD_SS_FILE_DESCRIPTION, 'description', $fileObj->description());
$description_text->setDescription(_MD_SS_FILE_DESCRIPTION_DSC);
$files_form->addElement($description_text, 7, 60);
// FILE TO UPLOAD