当前位置: 首页>>代码示例>>PHP>>正文


PHP Main::getfileedit方法代码示例

本文整理汇总了PHP中Main::getfileedit方法的典型用法代码示例。如果您正苦于以下问题:PHP Main::getfileedit方法的具体用法?PHP Main::getfileedit怎么用?PHP Main::getfileedit使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Main的用法示例。


在下文中一共展示了Main::getfileedit方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: savevalidate

     $parrentdir = $_REQUEST['parentdir'];
     $fname = $_REQUEST['fname'];
     if ($subdir != "") {
         $parrentdir = $dir;
         $dir = $subdir;
     }
     $newid = $_REQUEST['id'];
     $main->savefile($access, $dir, $parrentdir, $fname, $newid);
 }
 if ($_REQUEST['do'] == "delete" and isset($_REQUEST['id'])) {
     if ($_REQUEST['id'] > 0) {
         $main->deletefile($_REQUEST['id']);
     }
 }
 if ($_REQUEST['do'] == "edit" and isset($_REQUEST['id'])) {
     $fileinfo = $main->getfileedit($_REQUEST['id']);
     print "<script type='text/javascript'>\n            function savevalidate(form)\n            {\n                error=\"\";\n                if ( form.fname.value == \"\" )\n                {\n                    error=\"" . str_replace(":", ",", " " . $main->edit_array($text['fname']) . " ") . "\";\n                }\n                if (error != '' )\n                {\n                    error=error.replace(\":\", \",\");\n                    alert('" . $main->edit_array($text['missingfields']) . "'+' '+error);\n                    return;\n                }\n                else\n                {\n                    form.submit();\n                }\n            }\n        </script>";
     print "<br /><br /><form enctype='multipart/form-data' action='?page=downloads' method='post'>\n            <table><tr><td>\n            <input type='hidden' name='rid' value='{$requestid}' />\n            <input type='hidden' name='id' value='{$_REQUEST['id']}' />\n            <input type='hidden' name='do' value='save' />\n            <input type='hidden' name='parentdir' value='" . $fileinfo->records['0']['parrentdir'] . "' />\n            <input type='hidden' name='dir' value='{$dir}' />\n            {$text['filename']}</td><td>" . $fileinfo->records['0']['filename'] . "</td></tr>\n            <tr><td>{$text['size']}</td><td>" . $fileinfo->records['0']['size'] . "</td></tr>\n            <tr><td>{$text['uploaded']}</td><td>" . $fileinfo->records['0']['date'] . "</td></tr>\n            \n";
     print "<tr><td><label for='fname'>{$text['fname']}</label></td><td><input name='fname' type='text' id='fname' value='" . $fileinfo->records['0']['name'] . "'/></td></tr>";
     print "<tr><td><label for='subdir'>{$text['subdir']}</label></td><td><input name='subdir' type='text' id='subdir' value='" . $fileinfo->records['0']['dir'] . "'/></td></tr>";
     print "<tr><td><label for='access'>{$text['access']}</label></td><td><select name='access'>";
     $editedfileaccess = $fileinfo->records['0']['access'];
     $selected = "";
     if ($editedfileaccess == 0) {
         $selected = "selected=selected";
     } else {
         $selected = "";
     }
     print "<option value='0' {$selected}>{$text['noaccess']}</option>\n";
     if ($editedfileaccess == 1) {
         $selected = "selected=selected";
开发者ID:michaelprem,项目名称:phc,代码行数:31,代码来源:index.php


注:本文中的Main::getfileedit方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。