예제 #1
0
파일: media.php 프로젝트: lorea/Hydra-dev
/**
 * Print the media upload form if permissions are correct
 *
 * @author Andreas Gohr <*****@*****.**>
 */
function media_uploadform($ns, $auth)
{
    global $lang;
    if ($auth < AUTH_UPLOAD) {
        return;
    }
    //fixme print info on missing permissions?
    // The default HTML upload form
    $form = new Doku_Form(array('id' => 'dw__upload', 'action' => DOKU_BASE . 'lib/exe/mediamanager.php', 'enctype' => 'multipart/form-data'));
    $form->addElement('<div class="upload">' . $lang['mediaupload'] . '</div>');
    $form->addElement(formSecurityToken());
    $form->addHidden('ns', hsc($ns));
    $form->addElement(form_makeOpenTag('p'));
    $form->addElement(form_makeFileField('upload', $lang['txt_upload'] . ':', 'upload__file'));
    $form->addElement(form_makeCloseTag('p'));
    $form->addElement(form_makeOpenTag('p'));
    $form->addElement(form_makeTextField('id', '', $lang['txt_filename'] . ':', 'upload__name'));
    $form->addElement(form_makeButton('submit', '', $lang['btn_upload']));
    $form->addElement(form_makeCloseTag('p'));
    if ($auth >= AUTH_DELETE) {
        $form->addElement(form_makeOpenTag('p'));
        $form->addElement(form_makeCheckboxField('ow', 1, $lang['txt_overwrt'], 'dw__ow', 'check'));
        $form->addElement(form_makeCloseTag('p'));
    }
    html_form('upload', $form);
    // prepare flashvars for multiupload
    $opt = array('L_gridname' => $lang['mu_gridname'], 'L_gridsize' => $lang['mu_gridsize'], 'L_gridstat' => $lang['mu_gridstat'], 'L_namespace' => $lang['mu_namespace'], 'L_overwrite' => $lang['txt_overwrt'], 'L_browse' => $lang['mu_browse'], 'L_upload' => $lang['btn_upload'], 'L_toobig' => $lang['mu_toobig'], 'L_ready' => $lang['mu_ready'], 'L_done' => $lang['mu_done'], 'L_fail' => $lang['mu_fail'], 'L_authfail' => $lang['mu_authfail'], 'L_progress' => $lang['mu_progress'], 'L_filetypes' => $lang['mu_filetypes'], 'L_info' => $lang['mu_info'], 'L_lasterr' => $lang['mu_lasterr'], 'O_ns' => ":{$ns}", 'O_backend' => 'mediamanager.php?' . session_name() . '=' . session_id(), 'O_maxsize' => php_to_byte(ini_get('upload_max_filesize')), 'O_extensions' => join('|', array_keys(getMimeTypes())), 'O_overwrite' => $auth >= AUTH_DELETE, 'O_sectok' => getSecurityToken(), 'O_authtok' => auth_createToken());
    $var = buildURLparams($opt);
    // output the flash uploader
    ?>
        <div id="dw__flashupload" style="display:none">
        <div class="upload"><?php 
    echo $lang['mu_intro'];
    ?>
</div>
        <?php 
    echo html_flashobject('multipleUpload.swf', '500', '190', null, $opt);
    ?>
        </div>
        <?php 
}
예제 #2
0
">
    <PARAM NAME = "host" VALUE="<?php 
echo $hostName;
?>
">
    <PARAM NAME = "pageName" VALUE="<?php 
echo $pageName;
?>
">
    <PARAM NAME = "edid" VALUE="<?php 
echo $edid;
?>
">
    <PARAM NAME = CODEBASE VALUE = "/somenonexistingcodebase" >    
    <PARAM NAME = "authtok" VALUE="<?php 
echo auth_createToken();
?>
">

Java 2 Standard Edition v 1.7 or above is required for this applet.<br/>
		Download it from <a href="http://java.sun.com">http://java.sun.com</a>.
</applet>
</embed>
</object>

<!--
<APPLET CODE = "com.hammurapi.jcapture.JCaptureApplet.class" ARCHIVE = "<?php 
echo DOKU_BASE;
?>
/lib/plugins/jcapture/lib/jcapture.jar" NAME = "jCapture">
<PARAM NAME = "dokuBase" VALUE="<?php