Пример #1
0
    }
    #image_search_form input, #image_search_form select {
        margin-right: 30px;
    }
  </style>
</HEAD><BODY>


<?php 
require_once 'AMP/BaseDB.php';
$filelist = AMPfile_list('img/thumb/', null, true);
unset($filelist['']);
# handy for debugging this
#$filelist = array_slice(  $filelist, 0, 200 );
require_once 'AMP/Renderer/HTML.php';
$renderer = new AMP_Renderer_HTML();
$folders = AMP_lookup('image_folders');
print "<form method='GET' action='/system/imgpreview.php' id='image_search_form'>\n";
print "<p>";
print $renderer->label('image_filename', "Search in file names");
print $renderer->input('image_filename', null, array('id' => 'search_image_filename'));
print "</p>";
if ($folders) {
    print "<p>";
    print $renderer->label('image_folder', "Show images in folder");
    print $renderer->select('image_folder', null, array('' => 'None') + $folders, array('id' => 'search_image_folder'));
    print "</p>";
}
print "\n</form>";
$index = 0;
foreach ($filelist as $picfile) {
Пример #2
0
</div>
<div id="letters">
<?php 
foreach ($letters as $letter) {
    $highlight_class = $letter == $current_index ? " class='current'" : "";
    print "<a href='imgpreview.php?index={$letter}'{$highlight_class}>{$letter}</a>";
}
?>
</div>
    </div>
    <div id="main">
    <?php 
$folders = AMP_lookup('image_folders');
print "<form method='GET' action='/system/imgpreview.php' id='image_search_form'>\n";
require_once 'AMP/Renderer/HTML.php';
$renderer = new AMP_Renderer_HTML();
#print $renderer->label( 'search_image_filename', "Search in file names" );
$query_text = $current_query ? $current_query : 'Search all...';
print $renderer->input('q', $query_text, array('id' => 'search_image_filename', 'default-value' => 'Search all...'));
print $renderer->submit('image_filename', "Go");
print "\n</form>";
$current_folder = AMP_params('image_folder');
if ($folders) {
    print "<form method='GET' action='/system/imgpreview.php' id='image_folder_form'>\n";
    print $renderer->select('image_folder', $current_folder, array('' => 'Show just the images in a folder') + $folders, array('id' => 'search_image_folder'));
    print "\n</form>";
}
?>
    <div id="images"></div>
    <div id="new-images"></div>
    <script type="text/javascript" src="/scripts/jquery/jquery-1.3.2.min.js"></script>