• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP print_cell函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中print_cell函数的典型用法代码示例。如果您正苦于以下问题:PHP print_cell函数的具体用法?PHP print_cell怎么用?PHP print_cell使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



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

示例1: displaydir


//.........这里部分代码省略.........
        if ($is_morsle_dept = $DB->get_record('morsle_active', array('shortname' => $deptaccount)) && has_capability('moodle/course:update', $coursecontext)) {
            $dirdetails[$deptstr] = new stdClass();
            $dirdetails[$deptstr]->updated = date('Y-m-d');
        }
    }
    // Create a 2D array of files and sort
    $filedetails = array();
    $filetitles = array();
    foreach ($filelist as $name => $file) {
        $filedetails[$name] = new stdClass();
        $filedetails[$name]->updated = docdate($file);
        $filedetails[$name]->link = $file->alternateLink;
        //        $row = array($filename, $filedate);
        //		array_push($filedetails, $row);
        //		usort($filedetails, create_function('$a,$b', $sortcmp));
    }
    // TODO: fix this hack so we're back to being able to sort
    //    ksort($filedetails); // sets the locked in sorting to name
    // need this in order to look up the link for the file based on doc title (key)
    /*
        if (sizeof($filelist) > 0) {
                $filevalues = array_values($filelist);
                $filelist = array_combine($filetitles, $filevalues);
        }
    */
    //    $count = 0;
    //    $countdir = 0;
    $edittext = $padchoose . $padedit . $padunzip . $padlist . $padrestore;
    if ($wdir !== '') {
        $pathparts = explode('/', $wdir);
        array_pop($pathparts);
        $wdir = implode('/', $pathparts);
        echo "<tr class=\"folder\">";
        print_cell();
        print_cell('left', '<a href="morslefiles.php?courseid=' . $courseid . '&amp;wdir=' . $wdir . '&amp;choose=' . $choose . '&amp;name=' . $name . '"><img src="' . $OUTPUT->pix_url('f/folder') . '" class="icon" alt="" />&nbsp;' . get_string('parentfolder') . '</a>', 'name');
        //        print_cell('left', '<a  style="padding-left:0px" href="morslefiles.php?courseid='.$courseid.'&amp;wdir='.$wdir.'/&amp;choose='.$choose.'">&nbsp;'.get_string('parentfolder').'</a>', 'parent');
        echo "</tr>";
    }
    if (!empty($dirdetails)) {
        foreach ($dirdetails as $name => $dir) {
            echo html_writer::start_tag('tr', array('class' => 'folder'));
            $filedate = $dir->updated;
            $filesafe = rawurlencode($name);
            $filename = $name;
            $fileurl = $dir->link;
            //           	$countdir++;
            // TODO: fix the parent directory
            if ($name == '..') {
                //                $fileurl = rawurlencode(dirname($wdir));
                print_cell();
                // alt attribute intentionally empty to prevent repetition in screen reader
                //CLAMP #289 change padding-left from 10 to 0px
                //Kevin Wiliarty 2011-03-08
                print_cell('left', '<a  style="padding-left:0px" href="morslefiles.php?courseid=' . $courseid . '&amp;wdir=' . $wdir . '/' . $fileurl . '&amp;choose=' . $choose . '"><img src="' . $OUTPUT->pix_url('f/parent.gif') . '" class="icon" alt="" />&nbsp;' . get_string('parentfolder') . '</a>', 'name');
                print_cell();
                print_cell();
                print_cell();
                /*
                            } else if ($name === $userstr) { // if departmental account or user collection
                            	// TODO: need to determine what $wdir is if we're coming in from one of the course subcollections
                                // don't know where this fits in
                		$branchdir = strpos($wdir,'read') !== false || strpos($wdir,'write') !== false  || $wdir === '' ? $filesafe : "$wdir/$filesafe";
                                 print_cell();
                                // alt attribute intentionally empty to prevent repetition in screen reader
                				//CLAMP #289 change padding-left from 10 to 0px
                				//Kevin Wiliarty 2011-03-08
开发者ID:rlorenzo,项目名称:moodle-block_morsle,代码行数:67,代码来源:morslelib.php


示例2: displaydir

function displaydir($wdir)
{
    //  $wdir == / or /a or /a/b/c/d  etc
    global $basedir;
    global $usecheckboxes;
    global $id;
    global $USER, $CFG;
    $fullpath = $basedir . $wdir;
    $directory = opendir($fullpath);
    // Find all files
    while (false !== ($file = readdir($directory))) {
        if ($file == "." || $file == "..") {
            continue;
        }
        if (is_dir($fullpath . "/" . $file)) {
            $dirlist[] = $file;
        } else {
            $filelist[] = $file;
        }
    }
    closedir($directory);
    $strfile = get_string("file");
    $strname = get_string("name");
    $strsize = get_string("size");
    $strmodified = get_string("modified");
    $straction = get_string("action");
    $strmakeafolder = get_string("makeafolder");
    $struploadafile = get_string("uploadafile");
    $strwithchosenfiles = get_string("withchosenfiles");
    $strmovetoanotherfolder = get_string("movetoanotherfolder");
    $strmovefilestohere = get_string("movefilestohere");
    $strdeletecompletely = get_string("deletecompletely");
    $strcreateziparchive = get_string("createziparchive");
    $strrename = get_string("rename");
    $stredit = get_string("edit");
    $strunzip = get_string("unzip");
    $strlist = get_string("list");
    $strchoose = get_string("choose");
    echo "<form action=\"coursefiles.php\" method=\"post\" name=\"dirform\">\n";
    echo "<table border=\"0\" cellspacing=\"2\" cellpadding=\"2\" width=\"100%\">\n";
    if ($wdir == "/") {
        $wdir = "";
    } else {
        $bdir = str_replace("/" . basename($wdir), "", $wdir);
        if ($bdir == "/") {
            $bdir = "";
        }
        print "<tr>\n<td colspan=\"5\">";
        print "<a href=\"coursefiles.php?id={$id}&amp;wdir={$bdir}&amp;usecheckboxes={$usecheckboxes}\" onclick=\"return reset_value();\">";
        print "<img src=\"{$CFG->wwwroot}/lib/editor/htmlarea/images/folderup.gif\" height=\"14\" width=\"24\" border=\"0\" alt=\"" . get_string('parentfolder') . "\" />";
        print "</a></td>\n</tr>\n";
    }
    $count = 0;
    if (!empty($dirlist)) {
        asort($dirlist);
        foreach ($dirlist as $dir) {
            $count++;
            $filename = $fullpath . "/" . $dir;
            $fileurl = $wdir . "/" . $dir;
            $filedate = userdate(filemtime($filename), "%d %b %Y, %I:%M %p");
            echo "<tr>";
            if ($usecheckboxes) {
                print_cell("center", "<input type=\"checkbox\" name=\"file{$count}\" value=\"{$fileurl}\" onclick=\"return set_rename('{$dir}');\" />");
            }
            print_cell("left", "<a href=\"coursefiles.php?id={$id}&amp;wdir={$fileurl}\" onclick=\"return reset_value();\"><img src=\"{$CFG->pixpath}/f/folder.gif\" class=\"icon\" alt=\"" . get_string('folder') . "\" /></a> <a href=\"coursefiles.php?id={$id}&amp;wdir={$fileurl}&amp;usecheckboxes={$usecheckboxes}\" onclick=\"return reset_value();\">" . htmlspecialchars($dir) . "</a>");
            print_cell("right", "&nbsp;");
            print_cell("right", $filedate);
            echo "</tr>";
        }
    }
    if (!empty($filelist)) {
        asort($filelist);
        foreach ($filelist as $file) {
            $icon = mimeinfo("icon", $file);
            $imgtype = mimeinfo("type", $file);
            $count++;
            $filename = $fullpath . "/" . $file;
            $fileurl = "{$wdir}/{$file}";
            $filedate = userdate(filemtime($filename), "%d %b %Y, %I:%M %p");
            $dimensions = get_image_size($filename);
            if ($dimensions) {
                $imgwidth = $dimensions[0];
                $imgheight = $dimensions[1];
            } else {
                $imgwidth = "Unknown";
                $imgheight = "Unknown";
            }
            unset($dimensions);
            echo "<tr>\n";
            if ($usecheckboxes) {
                print_cell("center", "<input type=\"checkbox\" name=\"file{$count}\" value=\"{$fileurl}\" onclick=\";return set_rename('{$file}');\" />");
            }
            echo "<td align=\"left\" nowrap=\"nowrap\">";
            $ffurl = get_file_url($id . $fileurl);
            link_to_popup_window($ffurl, "display", "<img src=\"{$CFG->pixpath}/f/{$icon}\" class=\"icon\" alt=\"{$strfile}\" />", 480, 640);
            $file_size = filesize($filename);
            echo "<a onclick=\"return set_value(info = {url: '" . $ffurl . "',";
            echo " isize: '" . $file_size . "', itype: '" . $imgtype . "', iwidth: '" . $imgwidth . "',";
            echo " iheight: '" . $imgheight . "', imodified: '" . $filedate . "' })\" href=\"#\">{$file}</a>";
            echo "</td>\n";
//.........这里部分代码省略.........
开发者ID:r007,项目名称:PMoodle,代码行数:101,代码来源:coursefiles.php


示例3: fm_unzip_show_status

function fm_unzip_show_status($list, $removepath)
{
    //This function shows the results of the unzip execution
    //depending of the value of the $CFG->zip, results will be
    //text or an array of files.
    global $CFG;
    if (empty($CFG->unzip)) {
        // Use built-in php-based zip function
        $strname = get_string("name");
        $strsize = get_string("size");
        $strmodified = get_string("modified");
        $strstatus = get_string("status");
        echo "<table cellpadding=\"4\" cellspacing=\"2\" border=\"0\" width=\"640\">";
        echo "<tr><th class=\"header\" align=\"left\">{$strname}</th>";
        echo "<th class=\"header\" align=\"right\">{$strsize}</th>";
        echo "<th class=\"header\" align=\"right\">{$strmodified}</th>";
        echo "<th class=\"header\" align=\"right\">{$strstatus}</th></tr>";
        foreach ($list as $item) {
            echo "<tr>";
            $item['filename'] = str_replace(cleardoubleslashes($removepath) . '/', "", $item['filename']);
            print_cell("left", $item['filename']);
            if (!$item['folder']) {
                print_cell("right", display_size($item['size']));
            } else {
                echo "<td>&nbsp;</td>";
            }
            $filedate = userdate($item['mtime'], get_string("strftimedatetime"));
            print_cell("right", $filedate);
            print_cell("right", $item['status']);
            echo "</tr>";
        }
        echo "</table>";
    } else {
        // Use external zip program
        print_simple_box_start("center");
        echo "<pre>";
        foreach ($list as $item) {
            echo str_replace(cleardoubleslashes($removepath . '/'), '', $item) . '<br />';
        }
        echo "</pre>";
        print_simple_box_end();
    }
}
开发者ID:nadavkav,项目名称:MoodleTAO,代码行数:43,代码来源:lib.php


示例4: displaydir

function displaydir($wdir)
{
    //  $wdir == / or /a or /a/b/c/d  etc
    global $basedir;
    global $id;
    global $USER, $CFG;
    global $choose;
    $fullpath = $basedir . $wdir;
    $dirlist = array();
    $directory = opendir($fullpath);
    // Find all files
    while (false !== ($file = readdir($directory))) {
        if ($file == "." || $file == "..") {
            continue;
        }
        if (is_dir($fullpath . "/" . $file)) {
            $dirlist[] = $file;
        } else {
            $filelist[] = $file;
        }
    }
    closedir($directory);
    $strname = get_string("name");
    $strsize = get_string("size");
    $strmodified = get_string("modified");
    $straction = get_string("action");
    $strmakeafolder = get_string("makeafolder");
    $struploadafile = get_string("uploadafile");
    $strselectall = get_string("selectall");
    $strselectnone = get_string("deselectall");
    $strwithchosenfiles = get_string("withchosenfiles");
    $strmovetoanotherfolder = get_string("movetoanotherfolder");
    $strmovefilestohere = get_string("movefilestohere");
    $strdeletecompletely = get_string("deletecompletely");
    $strcreateziparchive = get_string("createziparchive");
    $strrename = get_string("rename");
    $stredit = get_string("edit");
    $strunzip = get_string("unzip");
    $strlist = get_string("list");
    $strrestore = get_string("restore");
    $strchoose = get_string("choose");
    $strfolder = get_string("folder");
    $strfile = get_string("file");
    echo "<form action=\"index.php\" method=\"post\" id=\"dirform\">";
    echo "<div>";
    echo '<input type="hidden" name="choose" value="' . $choose . '" />';
    // echo "<hr align=\"center\" noshade=\"noshade\" size=\"1\" />";
    echo "<hr/>";
    echo "<table border=\"0\" cellspacing=\"2\" cellpadding=\"2\" width=\"640\" class=\"files\">";
    echo "<tr>";
    echo "<th class=\"header\" scope=\"col\"></th>";
    echo "<th class=\"header name\" scope=\"col\">{$strname}</th>";
    echo "<th class=\"header size\" scope=\"col\">{$strsize}</th>";
    echo "<th class=\"header date\" scope=\"col\">{$strmodified}</th>";
    echo "<th class=\"header commands\" scope=\"col\">{$straction}</th>";
    echo "</tr>\n";
    if ($wdir != "/") {
        $dirlist[] = '..';
    }
    $count = 0;
    if (!empty($dirlist)) {
        asort($dirlist);
        foreach ($dirlist as $dir) {
            echo "<tr class=\"folder\">";
            if ($dir == '..') {
                $fileurl = rawurlencode(dirname($wdir));
                print_cell();
                // alt attribute intentionally empty to prevent repetition in screen reader
                print_cell('left', '<a href="index.php?id=' . $id . '&amp;wdir=' . $fileurl . '&amp;choose=' . $choose . '"><img src="' . $CFG->pixpath . '/f/parent.gif" class="icon" alt="" />&nbsp;' . get_string('parentfolder') . '</a>', 'name');
                print_cell();
                print_cell();
                print_cell();
            } else {
                $count++;
                $filename = $fullpath . "/" . $dir;
                $fileurl = rawurlencode($wdir . "/" . $dir);
                $filesafe = rawurlencode($dir);
                $filesize = display_size(get_directory_size("{$fullpath}/{$dir}"));
                $filedate = userdate(filemtime($filename), get_string("strftimedatetime"));
                if ($wdir . $dir === '/moddata') {
                    print_cell();
                } else {
                    print_cell("center", "<input type=\"checkbox\" name=\"file{$count}\" value=\"{$fileurl}\" />", 'checkbox');
                }
                print_cell("left", "<a href=\"index.php?id={$id}&amp;wdir={$fileurl}&amp;choose={$choose}\"><img src=\"{$CFG->pixpath}/f/folder.gif\" class=\"icon\" alt=\"{$strfolder}\" />&nbsp;" . htmlspecialchars($dir) . "</a>", 'name');
                print_cell("right", $filesize, 'size');
                print_cell("right", $filedate, 'date');
                if ($wdir . $dir === '/moddata') {
                    print_cell();
                } else {
                    print_cell("right", "<a href=\"index.php?id={$id}&amp;wdir={$wdir}&amp;file={$filesafe}&amp;action=rename&amp;choose={$choose}\">{$strrename}</a>", 'commands');
                }
            }
            echo "</tr>";
        }
    }
    if (!empty($filelist)) {
        asort($filelist);
        foreach ($filelist as $file) {
            $icon = mimeinfo("icon", $file);
//.........这里部分代码省略.........
开发者ID:edwinphillips,项目名称:moodle-485cb39,代码行数:101,代码来源:index.php


示例5: print_cell

    if ($verbose) {
        print_cell("<pre>\n" . urldecode($row['comments']) . "\n\t</pre>");
        print_cell(gather_enum_multi_print("sdram", 4, $row));
        print_cell(gather_enum_multi_print("flash", 4, $row));
        print_cell(gather_enum_multi_print("zbt", 16, $row));
        print_cell(gather_enum_multi_print("xlxtyp", 4, $row));
        print_cell(gather_enum_multi_print("xlxspd", 4, $row));
        print_cell(gather_enum_multi_print("xlxtmp", 4, $row));
        print_cell(gather_enum_multi_print("xlxgrd", 4, $row));
        print_cell($row['cputyp']);
        print_cell($row['cpuspd']);
        print_cell($row['cpmspd']);
        print_cell($row['busspd']);
        print_cell($row['hstype']);
        print_cell($row['hschin']);
        print_cell($row['hschout']);
    }
    echo "</tr>\n";
}
?>
</table>
<p></p>
<table width="100%">
<tr>
  <td align=center><?php 
printf("<a href=\"%s?submit=Browse&offset=%d&verbose=%d%s\">%s Listing</a>\n", $PHP_SELF, $offset, $verbose ? 0 : 1, $serno != '' ? "&serno={$serno}" : '', $verbose ? "Terse" : "Verbose");
?>
</td>
  <td align=center><a href="index.php">Back to Start</a></td>
</tr>
</table>
开发者ID:thealessandro,项目名称:bbbandroid-u-boot,代码行数:31,代码来源:browse.php


示例6: displaydir

function displaydir($wdir)
{
    //  $wdir == / or /a or /a/b/c/d  etc
    global $basedir;
    global $usecheckboxes;
    global $id;
    global $USER, $CFG, $isteacher, $isstudent;
    $fullpath = $basedir . $wdir;
    $directory = opendir($fullpath);
    // Find all files
    while ($file = readdir($directory)) {
        if ($file == "." || $file == ".." || $file == "tmp") {
            continue;
        }
        if (is_dir($fullpath . "/" . $file)) {
            $dirlist[] = $file;
        }
    }
    $test = str_replace("/", "", $wdir);
    if (empty($test)) {
        $wdir = "";
    }
    $images = netpublish_get_images($id, $wdir);
    /*print "<pre>";
      print_r($images);
      print "</pre>";
      exit;*/
    $filelist = array();
    if (!empty($images)) {
        $i = 0;
        foreach ($images as $img) {
            $filelist[$i]['id'] = $img->id;
            $filelist[$i]['course'] = $img->course;
            $filelist[$i]['name'] = $img->name;
            $filelist[$i]['mime'] = $img->mimetype;
            $filelist[$i]['size'] = $img->size;
            $filelist[$i]['dir'] = $img->dir;
            $filelist[$i]['filedate'] = userdate($img->timemodified, "%d %b %Y, %I:%M %p");
            $filelist[$i]['width'] = $img->width;
            $filelist[$i]['height'] = $img->height;
            $filelist[$i]['owner'] = $img->owner;
            $i++;
        }
    }
    //closedir($directory);
    $strfile = get_string("file");
    $strname = get_string("name");
    $strsize = get_string("size");
    $strmodified = get_string("modified");
    $straction = get_string("action");
    $strmakeafolder = get_string("makeafolder");
    $struploadafile = get_string("uploadafile");
    $strwithchosenfiles = get_string("withchosenfiles");
    $strmovetoanotherfolder = get_string("movetoanotherfolder");
    $strmovefilestohere = get_string("movefilestohere");
    $strdeletecompletely = get_string("deletecompletely");
    $strcreateziparchive = get_string("createziparchive");
    $strrename = get_string("rename");
    $stredit = get_string("edit");
    $strunzip = get_string("unzip");
    $strlist = get_string("list");
    $strchoose = get_string("choose");
    echo "<form action=\"imagebank.php\" method=\"post\" name=\"dirform\">\n";
    echo "<table border=\"0\" cellspacing=\"2\" cellpadding=\"0\" width=\"100%\">\n";
    if (empty($wdir)) {
        $wdir = "";
    } else {
        $bdir = str_replace("/" . basename($wdir), "", $wdir);
        if ($bdir == "/") {
            $bdir = "";
        }
        print "<tr>\n<td colspan=\"5\">";
        print "<a href=\"imagebank.php?id={$id}&amp;wdir={$bdir}&amp;usecheckboxes={$usecheckboxes}\" onclick=\"return reset_value();\">";
        print "<img src=\"{$CFG->wwwroot}/lib/editor/images/folderup.gif\" height=\"14\" width=\"24\" border=\"0\" alt=\"Move up\" />";
        print "</a></td>\n</tr>\n";
    }
    $count = 0;
    if (!empty($dirlist)) {
        asort($dirlist);
        foreach ($dirlist as $dir) {
            $count++;
            $filename = $fullpath . "/" . $dir;
            $fileurl = rawurlencode($wdir . "/" . $dir);
            $filesafe = rawurlencode($dir);
            $filedate = userdate(filemtime($filename), "%d %b %Y, %I:%M %p");
            echo "<tr>";
            if ($usecheckboxes && $isteacher) {
                print_cell("center", "<input type=\"checkbox\" name=\"file{$count}\" value=\"{$fileurl}\" onclick=\"return set_rename('{$filesafe}');\" />");
            } else {
                print_cell("left");
            }
            print_cell("left", "<a href=\"imagebank.php?id={$id}&amp;wdir={$fileurl}\" onclick=\"return reset_value();\"><img src=\"{$CFG->pixpath}/f/folder.gif\" height=\"16\" width=\"16\" border=\"0\" alt=\"folder\" /></a> <a href=\"imagebank.php?id={$id}&amp;wdir={$fileurl}&amp;usecheckboxes={$usecheckboxes}\" onclick=\"return reset_value();\">" . htmlspecialchars($dir) . "</a>");
            print_cell("right", "&nbsp;");
            print_cell("right", $filedate);
            echo "</tr>";
        }
    }
    if (!empty($filelist)) {
        foreach ($filelist as $file) {
            $icon = mimeinfo("icon", $file['name']);
//.........这里部分代码省略.........
开发者ID:hmatulis,项目名称:RTL-BIDI-Hebrew-Moodle-Plugins,代码行数:101,代码来源:imagebank.php


示例7: displaydir

function displaydir($file_info)
{
    global $CFG;
    $children = $file_info->get_children();
    $parent_info = $file_info->get_parent();
    $strname = get_string('name');
    $strsize = get_string('size');
    $strmodified = get_string('modified');
    $strfolder = get_string('folder');
    $strfile = get_string('file');
    $strdownload = get_string('download');
    $strdelete = get_string('delete');
    $straction = get_string('action');
    $path = array();
    $params = $file_info->get_params_rawencoded();
    $params = implode('&amp;', $params);
    $path[] = $file_info->get_visible_name();
    $level = $parent_info;
    while ($level) {
        $params = $level->get_params_rawencoded();
        $params = implode('&amp;', $params);
        $path[] = '<a href="index.php?' . $params . '">' . $level->get_visible_name() . '</a>';
        $level = $level->get_parent();
    }
    $path = array_reverse($path);
    $path = implode(' / ', $path);
    echo $path . ' /';
    echo "<div>";
    echo "<hr/>";
    echo "<table border=\"0\" cellspacing=\"2\" cellpadding=\"2\" width=\"740\" class=\"files\">";
    echo "<tr>";
    echo "<th class=\"header\" scope=\"col\"></th>";
    echo "<th class=\"header name\" scope=\"col\">{$strname}</th>";
    echo "<th class=\"header size\" scope=\"col\">{$strsize}</th>";
    echo "<th class=\"header date\" scope=\"col\">{$strmodified}</th>";
    echo "<th class=\"header commands\" scope=\"col\">{$straction}</th>";
    echo "</tr>\n";
    $parentwritable = $file_info->is_writable();
    if ($parent_info) {
        $params = $parent_info->get_params_rawencoded();
        $params = implode('&amp;', $params);
        echo "<tr class=\"folder\">";
        print_cell();
        print_cell('left', '<a href="index.php?' . $params . '"><img src="' . $CFG->pixpath . '/f/parent.gif" class="icon" alt="" />&nbsp;' . get_string('parentfolder') . '</a>', 'name');
        print_cell();
        print_cell();
        print_cell();
        echo "</tr>";
    }
    if ($children) {
        foreach ($children as $child_info) {
            $filename = $child_info->get_visible_name();
            $filesize = $child_info->get_filesize();
            $filesize = $filesize ? display_size($filesize) : '';
            $filedate = $child_info->get_timemodified();
            $filedate = $filedate ? userdate($filedate) : '';
            $mimetype = $child_info->get_mimetype();
            $params = $child_info->get_params_rawencoded();
            $params = implode('&amp;', $params);
            if ($child_info->is_directory()) {
                echo "<tr class=\"folder\">";
                print_cell();
                print_cell("left", "<a href=\"index.php?{$params}\"><img src=\"{$CFG->pixpath}/f/folder.gif\" class=\"icon\" alt=\"{$strfolder}\" />&nbsp;" . s($filename) . "</a>", 'name');
                print_cell("right", $filesize, 'size');
                print_cell("right", $filedate, 'date');
                if ($parentwritable) {
                    print_cell("right", "<a href=\"index.php?{$params}&amp;sesskey=" . sesskey() . "&amp;delete=1\"><img src=\"{$CFG->pixpath}/t/delete.gif\" class=\"iconsmall\" alt=\"{$strdelete}\" /></a>", 'command');
                } else {
                    print_cell();
                }
                echo "</tr>";
            } else {
                $icon = mimeinfo_from_type("icon", $mimetype);
                if ($downloadurl = $child_info->get_url(true)) {
                    $downloadurl = "&nbsp;<a href=\"{$downloadurl}\" title=\"" . get_string('downloadfile') . "\"><img src=\"{$CFG->pixpath}/t/down.gif\" class=\"iconsmall\" alt=\"{$strdownload}\" /></a>";
                } else {
                    $downloadurl = '';
                }
                if ($viewurl = $child_info->get_url()) {
                    $viewurl = "&nbsp;" . link_to_popup_window($viewurl, "display", "<img src=\"{$CFG->pixpath}/t/preview.gif\" class=\"iconsmall\" alt=\"{$strfile}\" />&nbsp;", 480, 640, get_string('viewfileinpopup'), null, true);
                } else {
                    $viewurl = '';
                }
                echo "<tr class=\"file\">";
                print_cell();
                print_cell("left", "<img src=\"{$CFG->pixpath}/f/{$icon}\" class=\"icon\" alt=\"{$strfile}\" />&nbsp;" . s($filename) . $downloadurl . $viewurl, 'name');
                print_cell("right", $filesize, 'size');
                print_cell("right", $filedate, 'date');
                if ($parentwritable) {
                    print_cell("right", "<a href=\"index.php?{$params}&amp;sesskey=" . sesskey() . "&amp;delete=1\"><img src=\"{$CFG->pixpath}/t/delete.gif\" class=\"iconsmall\" alt=\"{$strdelete}\" /></a>", 'command');
                } else {
                    print_cell();
                }
                echo "</tr>";
            }
        }
    }
    echo "</table>";
    echo "</div>";
    echo "<hr/>";
//.........这里部分代码省略.........
开发者ID:nicolasconnault,项目名称:moodle2.0,代码行数:101,代码来源:index.php


示例8: displaydir


//.........这里部分代码省略.........
    $strmovetoanotherfolder = get_string("movetoanotherfolder");
    $strmovefilestohere = get_string("movefilestohere");
    $strdeletecompletely = get_string("deletecompletely");
    $strcreateziparchive = get_string("createziparchive");
    $strrename = get_string("rename");
    $stredit = get_string("edit");
    $strunzip = get_string("unzip");
    $strlist = get_string("list");
    $strchoose = get_string("choose");
    $strbrowserepo = get_string('browserepository', 'repository');
    $strdownloadlocal = get_string('downloadlocally', 'repository');
    echo "<form action=\"{$CFG->wwwroot}/file/repository/alfresco/coursefiles.php\" method=\"post\" name=\"dirform\">\n";
    echo '<input type="hidden" name="oid" value="' . $oid . '" />' . "\n";
    echo '<input type="hidden" name="shared" value="' . $shared . '" />' . "\n";
    echo '<input type="hidden" name="userid" value="' . $userid . '" />' . "\n";
    echo '<input type="hidden" name="uuid" value="' . $uuid . '" />' . "\n";
    echo "<table border=\"0\" cellspacing=\"2\" cellpadding=\"2\" width=\"100%\">\n";
    if (!empty($parentdir->uuid)) {
        print "<tr>\n<td colspan=\"5\">";
        print '<a href=' . $CFG->wwwroot . '/file/repository/alfresco/coursefiles.php?id=' . $id . '&amp;uuid=' . $parentdir->uuid . '&amp;shared=' . $shared . '&amp;oid=' . $oid . '&amp;userid=' . $userid . '&amp;wdir=/&amp;usecheckboxes=' . $usecheckboxes . '" ' . 'onclick="return reset_value();">';
        print "<img src=\"{$CFG->wwwroot}/lib/editor/htmlarea/images/folderup.gif\" height=\"14\" width=\"24\" border=\"0\" alt=\"" . get_string('parentfolder') . "\" />";
        print "</a></td>\n</tr>\n";
    }
    $count = 0;
    if (!empty($dirlist)) {
        foreach ($dirlist as $dir) {
            if (empty($dir->uuid)) {
                continue;
            }
            $count++;
            if ($dir->title == '..' || $dir->title == $strbrowserepo) {
                if (!empty($dir->url)) {
                    if ($usecheckboxes) {
                        print_cell();
                    }
                    if (!empty($search)) {
                        print_cell('left', '<a href="' . $dir->url . '"><img src="' . $CFG->pixpath . '/f/parent.gif" height="16" width="16" alt="' . $strbrowserepo . '" /></a> <a href="' . $dir->url . '">' . $strbrowserepo . '</a>', 'name');
                    } else {
                        print_cell('left', '<a href="' . $dir->url . '"><img src="' . $CFG->pixpath . '/f/parent.gif" height="16" width="16" alt="' . get_string('parentfolder') . '" /></a> <a href="' . $dir->url . '">' . get_string('parentfolder') . '</a>', 'name');
                    }
                    print_cell();
                    print_cell();
                }
            } else {
                $pdir = urlencode($dir->title);
                $fileurl = $dir->uuid;
                //$filename = $fullpath."/".$dir;
                //$fileurl  = $wdir."/".$dir;
                $filedate = userdate($dir->modified, "%d %b %Y, %I:%M %p");
                echo "<tr>";
                if ($usecheckboxes) {
                    print_cell("center", "<input type=\"checkbox\" name=\"file{$count}\" value=\"{$fileurl}\" onclick=\"return set_rename('{$dir->title}');\" />");
                }
                $astr = $CFG->wwwroot . '/file/repository/alfresco/coursefiles.php?id=' . $id . '&amp;oid=' . $oid . '&amp;uuid=' . $fileurl . '&amp;shared=' . $shared . '&amp;userid=' . $userid . '&amp;wdir=/&amp;usecheckboxes=' . $usecheckboxes . '" ' . 'onclick=" return reset_value();"';
                print_cell('left', '<a href="' . $astr . '><img src="' . $CFG->pixpath . '/f/folder.gif" class="icon" ' . 'alt=""' . get_string('folder') . '" /></a> <a href="' . $astr . '>' . htmlspecialchars($dir->title) . '</a>');
                print_cell("right", "&nbsp;");
                print_cell("right", $filedate);
            }
            echo "</tr>";
        }
    }
    if (!empty($filelist)) {
        foreach ($filelist as $file) {
            $icon = mimeinfo('icon', $file->title);
            $imgtype = mimeinfo('type', $file->title);
            $count++;
开发者ID:remotelearner,项目名称:elis.alfresco,代码行数:67,代码来源:coursefiles.php


示例9: mimeinfo

        } else {
            $icon = mimeinfo("icon", $file);
            echo "<img src=\"{$CFG->pixpath}/f/{$icon}\"  height=\"16\" width=\"16\" alt=\"\" /> {$file}<br />";
        }
    }
}
function print_cell($alignment = 'center', $text = '&nbsp;', $class = '')
{
    if ($class) {
        $class = ' class="' . $class . '"';
    }
    echo '<td align="' . $alignment . '" nowrap="nowrap"' . $class . '>' . $text . '</td>';
}
function displaydir($wdir)
{
    //  $wdir == / or /a or /a/b/c/d  etc
    global $basedir;
    global $podcast;
    global $id;
    global $USER, $CFG;
    global $choose;
    $fullpath = $basedir . $wdir;
    $dirlist = array();
    $directory = opendir($fullpath);
    // Find all files
    while (false !== ($file = readdir($directory))) {
        if ($file == "." || $file == "..") {
            continue;
        }
        if (is_dir($fullpath . "/" . $file)) {
            $dirlist[] = $file;
        } else {
            $filelist[] = $file;
        }
    }
    closedir($directory);
    $strname = get_string("name");
    $strsize = get_string("size");
    $strmodified = get_string("modified");
    $straction = get_string("action");
    $strmakeafolder = get_string("makeafolder");
    $struploadafile = get_string("uploadafile");
    $strselectall = get_string("selectall");
    $strselectnone = get_string("deselectall");
    $strwithchosenfiles = get_string("withchosenfiles");
    $strmovetoanotherfolder = get_string("movetoanotherfolder");
    $strmovefilestohere = get_string("movefilestohere");
    $strdeletecompletely = get_string("deletecompletely");
    $strcreateziparchive = get_string("createziparchive");
    $strrename = get_string("rename");
    $stredit = get_string("edit");
    $strunzip = get_string("unzip");
    $strlist = get_string("list");
    $strrestore = get_string("restore");
    $strchoose = get_string("choose");
    echo "<form action=\"index.php\" method=\"post\" name=\"dirform\">";
    echo '<input type="hidden" name="choose" value="' . $choose . '" />';
    echo "<hr width=\"640\" align=\"center\" noshade=\"noshade\" size=\"1\" />";
    echo "<table border=\"0\" cellspacing=\"2\" cellpadding=\"2\" width=\"640\" class=\"files\">";
    echo "<tr>";
    echo "<th width=\"5\"></th>";
    echo "<th align=\"left\" class=\"header name\">{$strname}</th>";
    echo "<th align=\"right\" class=\"header size\">{$strsize}</th>";
    echo "<th align=\"right\" class=\"header date\">{$strmodified}</th>";
    echo "<th align=\"right\" class=\"header commands\">{$straction}</th>";
    echo "</tr>\n";
    if ($wdir != "/") {
        $dirlist[] = '..';
    }
    $count = 0;
    if (!empty($dirlist)) {
        asort($dirlist);
        foreach ($dirlist as $dir) {
            echo "<tr class=\"folder\">";
            if ($dir == '..') {
                $fileurl = rawurlencode(dirname($wdir));
                print_cell();
                print_cell('left', '<a href="index.php?id=' . $id . '&amp;pod=' . $podcast . '&amp;wdir=' . $fileurl . '&amp;choose=' . $choose . '"><img src="' . $CFG->pixpath . '/f/parent.gif" height="16" width="16" alt="' . get_string('parentfolder') . '" /></a> <a href="index.php?id=' . $id . '&amp;pod=' . $podcast . '&amp;wdir=' . $fileurl . '&amp;choose=' . $choose . '">' . get_string('parentfolder') . '</a>', 'name');
                print_cell();
                print_cell();
                print_cell();
            } else {
                $count++;
                $filename = $fullpath . "/" . $dir;
                $fileurl = rawurlencode($wdir . "/" . $dir);
                $filesafe = rawurlencode($dir);
                $filesize = display_size(get_directory_size("{$fullpath}/{$dir}"));
                $filedate = userdate(filemtime($filename), "%d %b %Y, %I:%M %p");
                print_cell("center", "<input type=\"checkbox\" name=\"file{$count}\" value=\"{$fileurl}\" />", 'checkbox');
                print_cell("left", "<a href=\"index.php?id={$id}&amp;pod={$podcast}&amp;wdir={$fileurl}&amp;choose={$choose}\"><img src=\"{$CFG->pixpath}/f/folder.gif\" height=\"16\" width=\"16\" border=\"0\" alt=\"Folder\" /></a> <a href=\"index.php?id={$id}&amp;pod={$podcast}&amp;wdir={$fileurl}&amp;choose={$choose}\">" . htmlspecialchars($dir) . "</a>", 'name');
                print_cell("right", $filesize, 'size');
                print_cell("right", $filedate, 'date');
                print_cell("right", "<a href=\"index.php?id={$id}&amp;pod={$podcast}&amp;wdir={$wdir}&amp;file={$filesafe}&amp;action=rename&amp;choose={$choose}\">{$strrename}</a>", 'commands');
            }
            echo "</tr>";
        }
    }
    if (!empty($filelist)) {
        asort($filelist);
        foreach ($filelist as $file) {
//.........这里部分代码省略.........
开发者ID:hmatulis,项目名称:RTL-BIDI-Hebrew-Moodle-Plugins,代码行数:101,代码来源:index.php


示例10: mysql_query

?>
<table width="100%" border=1 cellpadding=10>
<tr valign=top>
<th>logno / edit</th>
<th>date</th>
<th>who</th>
<th width="70%">details</th>
</tr>
<?php 
$r = mysql_query("select * from log where serno={$serno} order by logno limit {$offset},{$limit}");
while ($row = mysql_fetch_array($r)) {
    echo "<tr>\n";
    print_cell("<a href=\"edlog.php?serno={$row['serno']}&logno={$row['logno']}\">{$row['logno']}</a>");
    print_cell($row['date']);
    print_cell($row['who']);
    print_cell("<pre>" . urldecode($row['details']) . "</pre>");
    echo "</tr>\n";
}
mysql_free_result($r);
?>
</table>
<hr></hr>
<p></p>
<table width="100%">
<tr>
  <td align=center>
    <a href="newlog.php?serno=<?php 
echo "{$serno}";
?>
">Add to Log</a>
  </td>
开发者ID:yangkkokk,项目名称:Linux_SourceCode,代码行数:31,代码来源:brlog.php


示例11: print_header

print_header("Heutige Aktivität");
print_cell("Brennerlaufzeit", $changes[SensorBetriebszeit]);
print_cell("Brennerstarts", $changes[SensorBrennerstarts]);
print_cell("Heizungs-Brennerlaufzeit", $changes[SensorHeizZeit]);
print_cell("Warmwasserbereitungszeit", $changes[SensorWarmwasserbereitungsZeit]);
print_cell("Warmwasserbereitungen", $changes[SensorWarmwasserBereitungen]);
?>
            </table>
          </td>
          <td width=20></td>
          <td width=390>
            <?php 
print_header("Betriebsstatus");
print_cell("Brennerlaufzeit", $sensors[SensorBetriebszeit]);
print_cell("Brennerstarts", $sensors[SensorBrennerstarts]);
print_cell("Systemdruck", $sensors[SensorSystemdruck]);
print_cell("Servicecode", $sensors[SensorServiceCode]);
print_cell("Fehlercode", $sensors[SensorFehlerCode]);
# TODO: Fehler
?>
            </table>
          </td>
        </tr>
      </table>
    </td></tr>
  </table>
</body>

</html>

开发者ID:patrykk,项目名称:ems-collector,代码行数:29,代码来源:status.php


示例12: displaydir

function displaydir($file_info)
{
    global $CFG, $OUTPUT;
    $children = $file_info->get_children();
    $parent_info = $file_info->get_parent();
    $strname = get_string('name');
    $strsize = get_string('size');
    $strmodified = get_string('modified');
    $strfolder = get_string('folder');
    $strfile = get_string('file');
    $strdownload = get_string('download');
    $strdelete = get_string('delete');
    $straction = get_string('action');
    $path = array();
    $params = $file_info->get_params_rawencoded();
    $params = implode('&amp;', $params);
    $path[] = $file_info->get_visible_name();
    $level = $parent_info;
    while ($level) {
        $params = $level->get_params_rawencoded();
        $params = implode('&amp;', $params);
        $path[] = '<a href="index.php?' . $params . '">' . $level->get_visible_name() . '</a>';
        $level = $level->get_parent();
    }
    $path = array_reverse($path);
    $path = implode(' / ', $path);
    echo $path . ' /';
    echo "<div>";
    echo "<hr/>";
    echo "<table border=\"0\" cellspacing=\"2\" cellpadding=\"2\" width=\"740\" class=\"files\">";
    echo "<tr>";
    echo "<th class=\"header\" scope=\"col\"></th>";
    echo "<th class=\"header name\" scope=\"col\">{$strname}</th>";
    echo "<th class=\"header size\" scope=\"col\">{$strsize}</th>";
    echo "<th class=\"header date\" scope=\"col\">{$strmodified}</th>";
    echo "<th class=\"header commands\" scope=\"col\">{$straction}</th>";
    echo "</tr>\n";
    $parentwritable = $file_info->is_writable();
    if ($parent_info) {
        $params = $parent_info->get_params_rawencoded();
        $params = implode('&amp;', $params);
        echo "<tr class=\"folder\">";
        print_cell();
        print_cell('left', '<a href="index.php?' . $params . '"><img src="' . $OUTPUT->old_icon_url('f/parent') . '" class="icon" alt="" />&nbsp;' . get_string('parentfolder') . '</a>', 'name');
        print_cell();
        print_cell();
        print_cell();
        echo "</tr>";
    }
    if ($children) {
        foreach ($children as $child_info) {
            $filename = $child_info->get_visible_name();
            $filesize = $child_info->get_filesize();
            $filesize = $filesize ? display_size($filesize) : '';
            $filedate = $child_info->get_timemodified();
            $filedat 

鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP print_cells_row函数代码示例发布时间:2022-05-15
下一篇:
PHP print_category_option_list函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap