コード例 #1
0
    error('You are not allowed to do so');
}
$item = $channel->get_item($id);
if (!$item) {
    error('This item does not exist');
}
if ($confirm == 0) {
    $strdeletecheck = get_string('deletecheck', '', $item->title);
    $strdeletecheckfull = get_string('deletecheckfull', '', "{$channel->name} '{$item->title}'");
    $strdeletefilehint = get_string('deletefilehint', 'podcaster', $item->enclosure);
    $strdeletefilelabel = get_string('deletefilelabel', 'podcaster', $item->enclosure);
    $candeletefile = false;
    print_header_simple($strdeletecheck, '', $strdeletecheck);
    print_simple_box_start('center', '60%', '#FFAAAA', 20, 'noticebox');
    print_heading($strdeletecheckfull);
    if ($item->enclosure != '' && count(podcaster_util::get_filerefs($course, $channel, $item->enclosure)) == 1) {
        $candeletefile = true;
    }
    ?>
<form id="form" method="post" action="./deleteitem.php">
  <input type="hidden" name="channel" value="<?php 
    p($channel->id);
    ?>
" />
  <input type="hidden" name="id"      value="<?php 
    p($id);
    ?>
" />
  <input type="hidden" name="delete"  value="<?php 
    p('1');
    ?>