⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 localfile.php

📁 很棒的在线教学系统
💻 PHP
字号:
<?php    // $Id: localfile.php,v 1.6.4.3 2008/12/10 06:30:25 dongsheng Exp $    require('../../../../config.php');    require('../../lib.php');    $choose = required_param('choose', PARAM_FILE);    require_login();    if (!$CFG->resource_allowlocalfiles) {        error('You cannot access this script');    }    print_header(get_string('localfilechoose', 'resource'));    print_simple_box(get_string('localfileinfo', 'resource'), 'center');    ?>    <script type="text/javascript">    //<![CDATA[    function set_value(txt) {        if (txt.indexOf('/') > -1) {            path = txt.substring(txt.indexOf('/'),txt.length);        } else if (txt.indexOf('\\') > -1) {            path = txt.substring(txt.indexOf('\\'),txt.length);        } else {            window.close();        }        opener.document.getElementById('<?php echo $choose ?>').value = '<?php p(RESOURCE_LOCALPATH) ?>'+path;        window.close();    }    //]]>    </script>        <br />    <div class="form mdl-align">    <form id="myform">    <fieldset class="invisiblefieldset">    <input type="file" size="60" name="myfile" /><br />    <input type="button" value="<?php print_string('localfileselect','resource') ?>"            onClick="return set_value(getElementById('myform').myfile.value)">    <input type="button" value="<?php print_string('cancel') ?>"            onClick="window.close()">    </fieldset>    </form>    </div><?php    print_footer('empty');?>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -