Пример #1
0
<?php

require "init.inc.php";
if (sotf_Utils::getParameter('newProg')) {
    $smarty->assign("PAGETITLE", $page->getlocalized("New_prog_step1"));
} else {
    $smarty->assign("PAGETITLE", $page->getlocalized("Edit_files"));
}
$page->forceLogin();
sotf_Utils::registerGlobalParameters('id', 'okURL', 'copy');
$ok = sotf_Utils::getParameter('ok');
$okURL = sotf_Utils::getParameter('okURL');
$send = sotf_Utils::getParameter('send');
$selectedUserFiles = sotf_Utils::getParameter('userfiles');
$selectedOtherFiles = sotf_Utils::getParameter('otherfiles');
$deluser = sotf_Utils::getParameter('deluser');
$delother = sotf_Utils::getParameter('delother');
$itemtoftp = sotf_Utils::getParameter('itemtoftp');
$ftptoaudio = sotf_Utils::getParameter('ftptoaudio');
$ftptoother = sotf_Utils::getParameter('ftptoother');
$ftptoicon = sotf_Utils::getParameter('ftptoicon');
$smarty->assign("OKURL", $okURL);
$prg =& new sotf_Programme($id);
// admins or owners can change files
if (!$prg->isEditable()) {
    raiseError("no permission to change files in this programme");
    exit;
}
if ($ok) {
    if ($okURL) {
        $page->redirect($okURL);
Пример #2
0
<?php

require "init.inc.php";
// todo id must be  sql safe
sotf_Utils::registerGlobalParameters('id', 'popup');
$smarty->assign("PAGETITLE", $page->getlocalized("get"));
$smarty->assign("OKURL", $_SERVER['PHP_SELF'] . "?id=" . rawurlencode($id));
if ($id) {
    $smarty->assign('ID', $id);
    $prg =& new sotf_Programme($id);
    $smarty->assign_by_ref('PRG', $prg);
    if ($prg->isEditable()) {
        $smarty->assign('EDIT_PERMISSION', true);
    }
    /* rights have to be get from sotf_files table
      $smarty->assign('RIGHT_DOWNLOAD',$right_download);
      $smarty->assign('RIGHT_DOWNLOAD24',$right_download24);
      $smarty->assign('RIGHT_LISTEN',$right_listen);
      $smarty->assign('RIGHT_LISTEN24',$right_listen24);
      */
    // ??? $smarty->assign('UPLOAD_PERMISSION',$page->getPermission('upload',$idObj->stationId));
    $smarty->assign('OTHERFILES', $prg->listOtherFiles());
    $smarty->assign('AUDIOFILES', $prg->listAudioFiles());
    $smarty->assign('PAGETITLE', htmlspecialchars($prg->get('title')));
    $smarty->assign('REFERENCES', $prg->getRefs());
    /** stats and refs are collected via xml-rpc ??
      if($localItem) {
        $smarty->assign($repo->getStats($idObj));
        $smarty->assign('REFS', $repo->getRefs($idObj));
      }
      */