Пример #1
0
 case "download":
     if (isset($fatt) && strlen($fatt) > 0) {
         $attach = $fatt;
         header("Content-type: text/plain");
     } else {
         $attach = $fi;
         header("Content-type: hackru");
     }
     header("Content-disposition: attachment; filename=\"{$attach}\";");
     readfile($tm . "/" . $fi);
     break;
 case "download_mail":
     download_mail($tm, $fi);
     break;
 case "edit":
     editfile($tm, $fi);
     break;
 case "save":
     savefile($tm, $fi);
     break;
 case "uploadd":
     uploadtem();
     break;
 case "up":
     up($tm);
     break;
 case "newdir":
     newdir($tm);
     break;
 case "createdir":
     cdir($tm);
Пример #2
0
     break;
 case "uploadanother":
     smartsection_upload_file(true, true, $false);
     exit;
     break;
 case "mod":
     global $smartsection_file_handler;
     $fileid = isset($_GET['fileid']) ? $_GET['fileid'] : 0;
     $itemid = isset($_GET['itemid']) ? $_GET['itemid'] : 0;
     if ($fileid == 0 && $itemid == 0) {
         redirect_header("javascript:history.go(-1)", 3, _AM_SSECTION_NOITEMSELECTED);
         exit;
     }
     smartsection_xoops_cp_header();
     include_once XOOPS_ROOT_PATH . "/class/xoopsformloader.php";
     editfile(true, $fileid, $itemid);
     break;
 case "modify":
     global $xoopsUser;
     $fileid = isset($_POST['fileid']) ? intval($_POST['fileid']) : 0;
     // Creating the file object
     if ($fileid != 0) {
         $fileObj =& new SmartsectionFile($fileid);
     } else {
         $fileObj = $smartsection_file_handler->create();
     }
     // Putting the values in the file object
     $fileObj->setVar('name', $_POST['name']);
     $fileObj->setVar('description', $_POST['description']);
     $fileObj->setVar('status', intval($_POST['file_status']));
     // Storing the file
Пример #3
0
     break;
 case "uploadanother":
     smartpartner_upload_file(true, true, $false);
     exit;
     break;
 case "mod":
     global $smartpartner_file_handler;
     $fileid = isset($_GET['fileid']) ? $_GET['fileid'] : 0;
     $id = isset($_GET['id']) ? $_GET['id'] : 0;
     if ($fileid == 0 && $id == 0) {
         redirect_header("javascript:history.go(-1)", 3, _AM_SPARTNER_NOITEMSELECTED);
         exit;
     }
     smartpartner_xoops_cp_header();
     include_once XOOPS_ROOT_PATH . "/class/xoopsformloader.php";
     editfile(true, $fileid, $id);
     break;
 case "modify":
     global $xoopsUser;
     $fileid = isset($_POST['fileid']) ? intval($_POST['fileid']) : 0;
     // Creating the file object
     if ($fileid != 0) {
         $fileObj = new SmartpartnerFile($fileid);
     } else {
         $fileObj = $smartpartner_file_handler->create();
     }
     // Putting the values in the file object
     $fileObj->setVar('name', $_POST['name']);
     $fileObj->setVar('description', $_POST['description']);
     $fileObj->setVar('status', intval($_POST['file_status']));
     // Storing the file