static function admin_context($context) { $theme = Config::current()->theme; $theme_dir = THEME_DIR . "/"; $file = ltrim(isset($_GET['file']) ? $_GET['file'] : "info.yaml", "/"); $cur_file = $theme_dir . $file; $ext = array("css", "js", "php", "pot", "twig", "yaml"); $context["editor"]["list_all"] = php_file_tree($theme_dir, "?action=theme_editor&file=[link]", $ext); if (isset($cur_file) and is_file($cur_file)) { $context["editor"]["file_name"] = $file; $context["editor"]["file_path"] = $cur_file; $context["editor"]["file_content"] = htmlentities(file_get_contents($cur_file)); } return $context; }
<ul id="options"> <li> <input type="checkbox" id="logResults" name="logResults" value="1" checked="checked"/> Log results</li> <li> <input type="checkbox" id="consoleOutput" name="consoleOutput" value="1" checked="checked"/> Console output</li> <li> <input type="checkbox" id="showLog" name="showLog" value="1" checked="checked"/> Show log when completed</li> </ul> </div> <h3>Selecting a folder will <br /> include all tests inside</h3> <?php echo php_file_tree(Tst::$tests . 'suite/', "[link]"); ?> <?php } else { echo '<span class="disabled">' . Tst::$disabledMessage . '</span>'; } ?> </fieldset> </form> </div> <div id="viewLogs"> <form id="logs" name="logs"> <fieldset> <legend class="h2">Logs</legend> <?php if (Tst::access(array(1, 3))) {
function menu($whole = false) { global $main_folder, $return_link, $allowed_files, $ignored_files; echo php_file_tree($main_folder, $return_link, $whole, $allowed_files, $ignored_files); }
<div id="browser"> <?php include 'php_file_tree/php_file_tree.php'; // This links the user to http://example.com/?file=filename.ext and only shows media files //$allowed_extensions = array("gif", "jpg", "jpeg", "png", "mp3", "flv"); //echo php_file_tree($_SERVER['DOCUMENT_ROOT'], "http://example.com/?file=[link]/", $allowed_extensions); // This displays a JavaScript alert stating which file the user clicked on echo php_file_tree("uploads/", "javascript:parent.switch_media(\"[link]\");", array(), array("DS_Store", "db")); ?> </div>
<pre> echo php_file_tree($_SERVER['DOCUMENT_ROOT'], "javascript:alert('You clicked on [link]');");</pre> <p> The dynamic effects are enabled by including the jQuery library and one small JavaScript file: </p> <pre> <script src="jquery.js" type="text/javascript"></script> <script src="php_file_tree_jquery.js" type="text/javascript"></script></pre> <p> <a href="http://abeautifulsite.net/2007/06/php-file-tree/">Visit the project page</a> </p> <hr /> <h2>Browing...</h2> <?php // This links the user to http://example.com/?file=filename.ext //echo php_file_tree($_SERVER['DOCUMENT_ROOT'], "http://example.com/?file=[link]/"); // This links the user to http://example.com/?file=filename.ext and only shows image files //$allowed_extensions = array("gif", "jpg", "jpeg", "png"); //echo php_file_tree($_SERVER['DOCUMENT_ROOT'], "http://example.com/?file=[link]/", $allowed_extensions); // This displays a JavaScript alert stating which file the user clicked on echo php_file_tree("demo/", "javascript:alert('You clicked on [link]');"); ?> </body> </html>
<div class="col-lg-4 col-centered"> <img src="./Pics/dryer.jpg" class="img-responsive img-circle" /> <!-- Keep sm & xs from floating left --> <div class="clearfix visible-md"></div> <?php php_file_tree("Dryer", "[link]"); ?> </div> <div class="col-lg-4 col-centered"> <img src="./Pics/rto.jpg" class="img-responsive img-circle" /> <!-- Keep sm & xs from floating left --> <div class="clearfix visible-md"></div> <?php php_file_tree("Oxidizer", "[link]"); ?> </div> </div> </div> </div> <!-- Footer --> <footer class="text-center"> <div class="footer-above"> <div class="container"> <div class="row"> <div class="footer-col col-md-4"> <h3></h3> </div> <div class="footer-col col-md-4">
<?php include "php_file_tree.php"; ?> <link href="styles/default/default.css" rel="stylesheet" type="text/css" media="screen" /> <script src="script/php_file_tree_jquery.js" type="text/javascript"></script> <?php echo php_file_tree("arhiv/students/" . $_GET['student'], "[link]"); //echo php_file_tree($_SERVER['DOCUMENT_ROOT'], "javascript:alert('You clicked on [link]');"); ?>
<!-- EXPLORADOR DE ARCHIVOS --> <?php abrir_dialogo_modal("NavegadorArchivos", $MULTILANG_Explorar . ' - ' . $MULTILANG_CargarArchivo); ?> <i class="well well-sm btn-xs btn-block"><?php echo $MULTILANG_AyudaExplorador; ?> </i> <div id="marco_explorador" class="embed-responsive embed-responsive-4by3"> <?php //Presenta el arbol de carpetas //echo @php_file_tree($_SERVER['DOCUMENT_ROOT'], "http://example.com/?file=[link]/"); //echo @php_file_tree(".", "javascript:alert('You clicked on [link]');"); //echo @php_file_tree(".", "javascript:alert('You clicked on [link]');",$PCODER_ExtensionesPermitidas); //$PCODER_ExtensionesPermitidas = array("txt", "php", "inc", "css", "txt"); echo @php_file_tree(".", "javascript:PCODER_CargarArchivo('[link]');"); ?> </div> <?php $barra_herramientas_modal = ' <button type="button" class="btn btn-default" data-dismiss="modal">' . $MULTILANG_Cancelar . ' {<i class="fa fa-keyboard-o"></i> Esc}</button>'; cerrar_dialogo_modal($barra_herramientas_modal); ?> <!-- EXPLORADOR DE ARCHIVOS --> <?php abrir_dialogo_modal("VentanaAlmacenamiento", ""); echo '<i class="fa fa-save fa-fw fa-2x"></i>' . $MULTILANG_Guardar . ' ' . $MULTILANG_Finalizado; $barra_herramientas_modal = '
<div class="panel box"> <header> <h5><?php echo @$theme_name; ?> <button type="submit" class="btn top-btn-file save-file-theme btn-metis-2" id="save-file"><i class="icon-ok-sign"></i> <?php echo Save; ?> </button> <span class='file-title'></span></h5> </header> <div class="box-theme"> <div class="tree-theme scrolling"> <?php $target = "../themes/{$_GET['folder']}"; echo php_file_tree("{$target}", "#"); ?> </div> <div class="inn-theme"> <div class="col full first" style=" width: 100% !important; "> <div id="editor"><div style="padding: 30px; font-size: 3em; color: #ccc"> <?php echo Choose_file_on_left_side; ?> </div></div> </div> </div> </div> </div> </div>
<?php include PHP_DIR . '/model.php'; $data['directory_html'] = php_file_tree(APP_DIR); // 1.) split the directory path on a slash $directory_folders = explode("/", APP_DIR); // 2.) remove four or five folders from the left // remove /home/user/public_hmtl/S75-Sections $directory_folders = array_slice($directory_folders, 5); // 3.) join the new array into a path with slash $data['title'] = implode("/", $directory_folders); include PHP_DIR . '/view.php';
<?php $allowed_extensions = array("gif", "jpg", "jpeg", "png"); // Directory where we're storing uploaded images $upload_dir = './upload_files'; $upload_name = 'file_' . date("Y-m-d_His."); if (isset($_GET['file_tree'])) { include dirname(__FILE__) . "/extras/php_file_tree.php"; die(php_file_tree($upload_dir, "javascript:shoWImg('[link]',[id])", $allowed_extensions)); } if (isset($_GET['uploadfile'])) { require dirname(__FILE__) . '/extras/Uploader.php'; $Upload = new FileUpload('uploadfile'); $ext = $Upload->getExtension(); // Get the extension of the uploaded file $Upload->newFileName = $upload_name . $ext; $result = $Upload->handleUpload($upload_dir, $allowed_extensions); if (!$result) { die(json_encode(array('success' => false, 'msg' => $Upload->getErrorMsg()))); } else { die(json_encode(array('success' => true, 'FileName' => $Upload->getFileName(), 'Size' => $Upload->getFileSize(), 'SavedFile' => $Upload->getSavedFile(), 'Extension' => $Upload->getExtension()))); } } ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>تحميل الملفات</title>
<!--LEFT COMMON COLUMN--> <div class="left-common-colum"> <div class="portion full_width"> <h1><?php echo $t['forms']; ?> </h1> <div class="thick-hr-line wide-left"></div> <p><?php echo $t['can_download_various']; ?> </p> <div class="file-tree"> <?php echo php_file_tree("Documents", "http://necta.go.tz/[link]"); ?> </div> </div> </div> <!--END LEFT COMMON COLUMN--> <!--RIGHT COLUMN--> <div class="right-column"> <?php include './include/common-sidebar.php'; ?> </div> <!--END RIGHT COLUMN--> </div>
<div id="bd" class="clearfix"> <div class="row"> <div class="twelve columns"> <div class="clearfix"> <!--<div class="span-5" id="left-slot"> <div class="row"> <div class=" twelve columns"> <p style="margin:5px;padding:3px;border-bottom:1px solid #CCC;width:235px;font-size:14px;"> <img src='Images/directory.png'> <?php echo $_SESSION['name']; ?> Folder(s) </p> </div> <div class="twelve columns"> <div class="clearfix"> <?php echo php_file_tree($_SESSION['path'], "[link]"); ?> </div> </div> </div> </div> <!-- left-slot --> <div class="span-19" id="content-slot"> <div id="search-results"> <div class="clearfix"> <!-- Output basic HTML code -done --> <?php require 'FileManagement/OwnerFile.php'; ?> </div> </div>
} } else { $topn = 50; echo ' <div id="purgeTree" style="display:none;"> <form action="purge.php" method="post"> <ul class="nav nav-tabs" role="tablist"> <li role="presentation" class="active"><a href="#whisper" aria-controls="whisper" role="tab" data-toggle="tab">Whisper repository</a></li> <li role="presentation"><a href="#vcenter" aria-controls="vcenter" role="tab" data-toggle="tab">vCenter session files</a></li> <li role="presentation"><a href="#oldies" aria-controls="oldies" role="tab" data-toggle="tab">Top ' . $topn . ' oldest whisper files</a></li> </ul> <div class="tab-content" style="padding-top: 10px;"> <div role="tabpanel" class="tab-pane fade in active" id="whisper"> ' . php_file_tree_dir("/var/lib/graphite/whisper") . ' </div> <div role="tabpanel" class="tab-pane fade" id="vcenter"> ' . php_file_tree("/tmp", "dat") . ' </div> <div role="tabpanel" class="tab-pane fade" id="oldies"> ' . php_file_tree_top_oldest("/var/lib/graphite/whisper", $topn) . ' </div> </div> <button name="submit" class="btn btn-danger" value="purge-files">Purge</button> </form> </div><br /> <script type="text/javascript"> document.getElementById("purgeTree").style.display = "block"; document.getElementById("purgeLoading").style.display = "none"; </script>'; } ?> </div>
?> </div> </fieldset> <fieldset id="dashboardFieldset" style="width:50%; min-height:147px; float:left;"> <legend>Device Configurations</legend> <button id="expandAll" onclick="expandAll()" tabindex="7" class="smlButton">Show All</button> <button id="hideAll" onclick="hideAll()" tabindex="8" class="smlButton">Close All</button> <?php // For documentation and updates, visit http://abeautifulsite.net/notebook.php?article=21 // Main function file include "../classes/php_file_tree.php"; echo php_file_tree("/home/rconfig/data/" . $categoryName . "/" . $deviceName, "onclick=javascript:openFile('[link]');"); ?> <div id ="bottomButtons"> <button id="expandAll" onclick="expandAll()" class="smlButton">Show All</button> <button id="hideAll" onclick="hideAll()" class="smlButton">Close All</button> <button onClick="parent.location='#top'" class="smlButton">Top of Page</button> </div> </fieldset> </div><!-- End Content --> <div style="clear:both;"></div> </div><!-- End Main --> <!-- JS script Include --> <script type="text/JavaScript" src="js/devicemgmt.js"></script>
</head> <body> <div class="rounded-corners clearfix" id="page"><!-- column --> <div class="position_content" id="page_position_content"> <?php include 'include/header_nav.php'; ?> <div class="fadeInDown clearfix colelem" id="u18208-4"><!-- content --> <p>Downloads</p> </div> <div class="colelem" id="u18209"><!-- simple frame --></div> <div class="download-column-left" style="margin-left: -50px"> <div class="file-tree form-grp file-tree-container clearfix colelem" style="margin-top: 20px;"> <?php echo php_file_tree("download", "http://localhost/bumaco/[link]"); ?> </div> </div> <div class="download-column-right"> <div class="download-description"> <div class="download-instructions-title">Downloads</div> <div class="download-instructions-subtitle">Instructions</div> <div class="hr-line"></div> <div class="download-instructions">You can download various proposal and claim forms by clicking on the respective folder on the left hand side</div> </div> <div class="download-arrow"></div> <div style="clear: both;"></div> </div> <div style="clear: both"></div>
.box-alert { position: absolute; right: 10px; z-index: 9999; display: none; } </style> </head> <body> <div class="box-alert alert alert-success" role="alert" id="msg" onclick="$('#msg').hide('fast');"></div> <div class="row"> <div class="col-lg-2" style="padding-left: 25px"> <?php require dirname(__FILE__) . '/php_file_tree.php'; echo php_file_tree(dirname(dirname(__FILE__)), "javascript:loadFile('[link]');"); ?> </div> <div class="col-lg-10"> <div class="buttons"> <a href="javascript:save();" class="btn">Enregistrer</a> </div> <div id="editor"></div> </div> </div> <script> var currentFile = ''; var editor = ace.edit("editor"); editor.setTheme("ace/theme/ambiance"); editor.getSession().setMode("ace/mode/javascript");
<?php include "php_file_tree.php"; ?> <link href="styles/default/default.css" rel="stylesheet" type="text/css" media="screen" /> <script src="script/php_file_tree_jquery.js" type="text/javascript"></script> <?php echo php_file_tree($url, "[link]"); //echo php_file_tree($_SERVER['DOCUMENT_ROOT'], "javascript:alert('You clicked on [link]');"); ?>
$f = fopen("config/ssid", "r"); $ssid = fgets($f); fclose($f); $g = "usb/empty"; if (file_exists($g)) { echo "<div class='warning warning3'>"; echo "Insert USB stick to share files."; echo "</div>"; echo "<form method='get' id='sharerefresh' action='cgi-bin/config.cgi'>"; echo "<center><input name='sharerefresh' type='submit' value='Refresh' class='button'></center>"; echo "</form>"; } else { echo "<div class='warning warning3'>"; echo "The following files are available for download"; echo "</div>"; echo "<hr>"; echo "<div id='container_files'>"; echo "<form method='get' id='start' action='cgi-bin/config.cgi'>"; echo "<br>"; echo php_file_tree($_SERVER['DOCUMENT_ROOT'] . "/usb", "[link]"); echo "</div>"; echo "<hr>"; echo "<center><input name='umount' type='submit' value='Safely remove USB stick' class='button'></center>"; echo "</form>"; } ?> </div> </body> <br> <?php include 'footer.php';
// set option to return lines with checkboxes in class output echo php_file_tree("/home/rconfig/data/", "[link]", $allowed_a, $chkOn_a); ?> </div> <!-- end tree_aDiv --> </div> <!-- end comapareTreeLeft --> <div id="comapareTreeLeft"> <label>Right Configuration</label> <div id="tree_b_Div" style="display:none;"> <?php $allowed_b = array("txt"); $chkOn_b = true; // set option to return lines with checkboxes in class output echo php_file_tree("/home/rconfig/data/", "[link]", $allowed_b, $chkOn_b); ?> </div> <!-- end tree_aDiv --> </div> <!-- end comapareTreeLeft --> </form> </div> <!-- End mainformDiv --> <div style="clear:both;"></div> <div id="spacer"> </div> <div id ="linepaddingDiv"> <label for="linepadding">Line Padding:</label> <input name="linepadding" id="linepadding" title="number of lines to display before/after each difference" size="1" maxlength="2" tabindex='5'> </div>