Example #1
0
function showFiles($path)
{
    $dir = opendir($path);
    $files = array();
    while ($current = readdir($dir)) {
        if ($current != "." && $current != "..") {
            if (is_dir($path . "/" . $current)) {
                showFiles($path . '/' . $current);
            } else {
                $files[] = $current;
            }
        }
    }
    echo "<h1>" . str_replace('galeria/imagen/', "", $path) . "</h1>";
    for ($i = 0; $i < count($files); $i++) {
        echo "<div>";
        echo '<a class="example-image-link" href="' . $path . "/" . $files[$i] . '" data-lightbox="example-set">
		<img class="posi" class="example-image" src="' . $path . "/" . $files[$i] . '" alt="" width="300px" height="300px"/>
		</a>';
        echo "</div>";
    }
}
Example #2
0
 public function route()
 {
     $action = 'upload';
     if (isset($_GET['action'])) {
         $action = $_GET['action'];
     }
     //routing for different tasks
     switch ($action) {
         case 'upload':
             if (!empty($_FILES)) {
                 $this->upload();
             }
             break;
         case 'remove':
             $filename = $_GET['name'];
             removeFile($filename);
             break;
         case 'show':
             showFiles();
             break;
     }
 }
        $step = JRequest::getInt('step', 1);
        $method = JRequest::getCmd('radiobutton', null, 'post');
        if (!$method) {
            $method = JRequest::getCmd('method', 'http');
        }
        uploadWizard($step, $method, $old_filename);
        break;
    case "remove":
        removeFile($cid);
        break;
    case "update":
        uploadWizard(2, 'http', $old_filename);
        break;
    case "show":
    default:
        showFiles();
}
function showFiles()
{
    global $option, $section;
    global $_DOCMAN;
    $database = JFactory::getDBO();
    $mainframe = JFactory::getApplication();
    $limit = $mainframe->getCfg('list_limit');
    $limit = $mainframe->getUserStateFromRequest("viewlistlimit", 'limit', $limit);
    $limitstart = $mainframe->getUserStateFromRequest("view{$option}{$section}limitstart", 'limitstart', 0);
    $levellimit = $mainframe->getUserStateFromRequest("view{$option}{$section}limit", 'levellimit', 10);
    $filter = $mainframe->getUserStateFromRequest("filterarc{$option}{$section}", 'filter', 0);
    $search = $mainframe->getUserStateFromRequest("search{$option}{$section}", 'search', '');
    // read directory content
    $folder = new DOCMAN_Folder($_DOCMAN->getCfg('dmpath'));
Example #4
0
defined('_JEXEC') or die('Restricted access');
set_include_path(get_include_path() . PATH_SEPARATOR . dirname(__FILE__) . DIRECTORY_SEPARATOR . 'classes');
require_once JApplicationHelper::getPath('html');
require_once 'PHPExcel/IOFactory.php';
switch ($task) {
    case 'download':
        //		$user =& JFactory::getUser();
        //		$firmId = $user->id;
        //		$examId = JRequest::getInt('files');
        //		$tableName = '#__deneme';
        //		returnExcelFileById ($tableName,$firmId,$examId,$option);
        databaseToExcel('#__deneme', 0, 2, 'components/com_kimport/tempdata/');
        break;
    default:
        showFiles($option);
        break;
}
function showFiles($option)
{
    $user =& JFactory::getUser();
    $firmId = $user->id;
    $db =& JFactory::getDBO();
    $sql = 'SELECT distinct(sinavId) as id FROM  #__deneme WHERE firmaId = ' . $firmId . ' ORDER BY sinavId';
    $results[] = JHTML::_('select.option', '0', '-' . JText::_('Select File') . '-');
    $db->setQuery($sql);
    $data = $db->loadObjectList();
    $i = 1;
    foreach ($data as $row) {
        $results[] = JHTML::_('select.option', "'" . $i . "'", JText::_('File') . $i);
        $i++;
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
<script type="text/javascript" src="lightbox/js/jquery.lightbox-0.5.pack.js"></script>
<script type="text/javascript" src="script.js"></script>

</head>

<body>

<div id="container">

<div id="heading">
<h1>Family Pictures</h1>
</div>

<div id="gallery">

<?php 
include 'listFileFolder.php';
$directory = $_GET['path'];
showFiles(@opendir($directory), $directory);
?>
	<div class="clear"></div>
	</div>

	<div id="footer">
	<h2>Bhatnagar's Family Pictures</h2>
	</div>
</div>
</body>
</html>
Example #6
0
<?php

require_once 'config.php';
$session->requireLoggedIn();
require 'design_head.php';
echo xhtmlMenu($profile_menu, 'blog_menu');
$userId = $session->id;
if (!empty($_GET['id']) && is_numeric($_GET['id'])) {
    $userId = $_GET['id'];
}
showFiles(FILETYPE_USERFILE, $userId);
require 'design_foot.php';
Example #7
0
<?php

require_once 'ebtmessage.php';
require_once 'eventhandler/ebtmsgreceived.php';
function showFiles($path)
{
    $dir = opendir($path);
    $files = array();
    while ($current = readdir($dir)) {
        if ($current != "." && $current != "..") {
            echo $path . $current . "\n";
            $file = $path . $current;
            $oMgsRcvd = new EBTMsgReceived($file);
            $oMgsRcvd->execute();
        }
    }
}
showFiles("/home/erick/Desktop/mensajes_fallidos/");
Example #8
0
	line-height:200%;
}
</style>
<!-- InstanceEndEditable -->
<!-- InstanceBeginEditable name="head" -->
<!-- InstanceEndEditable -->
<!--link href="../css/default/pft.css" rel="stylesheet" type="text/css" /-->
</head>
<body>
<div id="top">
	<div id="logo"></div>
</div>
<div id="menu">

</div>
<div id="mainbody">
<div class="filelist">
<?php 
showFiles($d);
?>
</div>
<div class="cls"></div>
<!-- InstanceEndEditable -->
<!--mainbody-->
</div>
<div id="footer">

</div>
</body>
<!-- InstanceEnd --></html>