示例#1
0
/**
 * Writes the basic JS of the editor to $hjs. No editors are actually created.
 * Multiple calls are allowed; all but the first should be ignored.
 * This is called from init_EDITOR() automatically, but not from EDITOR_replace().
 *
 * @global string $hjs
 * @return void
 */
function include_tinymce()
{
    global $adm, $pth, $h, $u, $l, $sn, $hjs;
    static $again = FALSE;
    if ($again) {
        return;
    }
    $again = TRUE;
    if ($adm) {
        include_once $pth['folder']['plugins'] . 'tinymce/' . 'links.php';
        $imageList = 'var myImageList = new Array(' . get_images($pth['folder']['images']) . ');';
        $linkList = 'var myLinkList = new Array(' . get_internal_links($h, $u, $l, $sn, $pth['folder']['downloads']) . ');';
    } else {
        $imageList = $linkList = '';
    }
    $hjs .= '
        <script language="javascript" type="text/javascript" src="' . $pth['folder']['plugins'] . 'tinymce/' . 'tiny_mce/tiny_mce.js"></script>
        <script type="text/javascript" src="' . $pth['folder']['plugins'] . 'tinymce/init.js"></script>
	<script type="text/javascript">
	/* <![CDATA[ */
	' . tinymce_filebrowser() . '
	' . $imageList . '
	' . $linkList . '
	/* ]]> */
	</script>
	';
}
示例#2
0
function get_images_data($conn, $model)
{
    $images = get_images($conn, $model);
    //close_db($conn);
    $ini = parse_ini_file(SETTINGS, true);
    $data = '';
    if ($images) {
        $data .= "<ul class='ul-bags' id='thumbs_ul'>";
        foreach ($images as $image) {
            // FIXME handle pagination
            $data .= "<li> " . "<a href='/{$ini['dir']['root']}/{$ini['dir']['album']}/{$image['model']}/{$image['file']}' rel=lightbox-bags>" . "<img class='thumb_img' src='/{$ini['dir']['root']}/{$ini['dir']['thumbs']}/{$image['model']}/{$image['file']}'>" . "</a>" . "</li>";
        }
        $data .= "</ul> <!-- / ul-bags-->";
    }
    return $data;
}
function create_album($id, $sizes)
{
    global $params;
    $album_path = album_dir($id);
    if (is_dir(album_dir($id))) {
        //--Create configuration file
        if (!file_exists(album_dir($id) . "info.yml")) {
            // There could be more parameters if necessary
            $info_yaml = Spyc::YAMLDump(array('album_title' => $params['album'], 'album_description' => ''));
            if (!($fp = fopen(album_dir($id) . 'info.yml', 'a'))) {
                $params['flash'] = 'Album info file could not be created in <code>' . album_dir($id) . 'info.yml</code>.';
                render('error');
            }
            if (!fwrite($fp, $info_yaml)) {
                $params['flash'] = 'Could not write to file <code>' . album_dir($id) . 'info.yml</code>.';
                render('error');
            }
            fclose($fp);
        }
        $originals = get_images(album_dir($id));
        //--Create ZIP-Archive to download
        //$zip = new PclZip('archive.zip');
        foreach ($originals as $image) {
            $images[] = album_dir($id) . $image;
        }
        $zip = new PclZip(album_dir($id) . 'archive.zip');
        $test = $zip->create($images, PCLZIP_OPT_REMOVE_ALL_PATH);
        if ($test == 0) {
            die("Error: " . $zip->errorInfo(true));
        }
        //--Resize images
        foreach ($sizes as $size_name => $size_pixels) {
            $resized_album_path = album_dir($id, $size_name);
            if (!is_dir($resized_album_path)) {
                mkdir($resized_album_path, 0755);
            }
            foreach ($originals as $photo) {
                scale(album_dir($id) . $photo, "{$resized_album_path}/{$photo}", $size_pixels);
            }
        }
    } else {
        $params['flash'] = "Resizing the images in <code>{$album_path}</code> failed. Could there be a permission problem?";
        render('error');
        exit;
    }
}
示例#4
0
</title>
			<link><?php 
echo 'http://' . $_SERVER['HTTP_HOST'] . BASE_URL . 'index.php?rss=' . str_replace(" ", "%20", $params['rss']);
?>
</link>
		</image>

	      <?php 
if ($params['rss']) {
    $albums[] = str_replace("%20", " ", $params['rss']);
} else {
    $albums = get_folders(ALBUMS_ROOT);
}
foreach ($albums as $album) {
    if (is_dir(ALBUMS_ROOT . '/' . $album)) {
        $photos = get_images(ALBUMS_ROOT . '/' . $album);
    } else {
        $photos = array();
    }
    $first = true;
    foreach ($photos as $photo) {
        $title = '<title>' . $photo . '</title>';
        $desc = '<description>&lt;p>&lt;a href="' . 'http://' . $_SERVER['HTTP_HOST'] . str_replace(" ", "%20", BASE_URL . 'albums/' . $album . '/') . $photo . '">&lt;img src="' . 'http://' . $_SERVER['HTTP_HOST'] . str_replace(" ", "%20", BASE_URL . 'albums/' . $album . '/thumb/') . $photo . '" alt="photo" title="" style="float:left; padding-right:10px; padding-bottom:10px;"/>&lt;/a>&lt;/p>&lt;br clear=all></description>';
        $link = '<link>' . 'http://' . $_SERVER['HTTP_HOST'] . str_replace(" ", "%20", BASE_URL . 'albums/' . '/' . $album) . $photo . '</link>';
        $last_modified = exif_read_data(ALBUMS_ROOT . '/' . $album . '/' . $photo);
        $last_modified = mktime(substr($last_modified['DateTimeOriginal'], 11, 2), substr($last_modified['DateTimeOriginal'], 14, 2), substr($last_modified['DateTimeOriginal'], 17, 2), substr($last_modified['DateTimeOriginal'], 5, 2), substr($last_modified['DateTimeOriginal'], 8, 2), substr($last_modified['DateTimeOriginal'], 0, 4));
        if ($last_modified < 950000000) {
            $last_modified = filemtime(ALBUMS_ROOT . '/' . $album . '/' . $photo);
        }
        $pubdate = '<pubDate>' . date("D, d M Y H:i:s T", $last_modified) . '</pubDate>';
        $cat = '<category>' . $album . '</category>';
function get_list_trendy($where, $order, $esLayout)
{
    global $es_settings, $wpdb, $wp_query;
    $paged = isset($_GET['page_no']) ? $_GET['page_no'] : 0;
    if (empty($order)) {
        $order = get_order();
    }
    $sql = "SELECT * FROM {$wpdb->prefix}estatik_properties {$where} {$order} LIMIT {$paged}, {$es_settings->no_of_listing}";
    $es_my_listing = $wpdb->get_results($sql);
    if (!empty($es_my_listing)) {
        ?>


    <h1><?php 
        echo $wp_query->post->post_title;
        ?>
</h1>
    <div class="es_my_listing">
        <div class="es_listing_change">
            <?php 
        if ($es_settings->view_first_on_off == 1) {
            include 'es_view_first.php';
        }
        ?>

        </div>

        <ul class="clearfix <?php 
        echo es_get_layout($esLayout);
        ?>
">
        <?php 
        foreach ($es_my_listing as $list) {
            $photo_info = get_images($list->prop_id);
            $image_url = $photo_info[0];
            // $uploaded_images_count = $photo_info[1];
            ?>

            <li class="es_listing_item prop_id-<?php 
            echo $list->prop_id;
            ?>
">
                <a href="<?php 
            echo get_permalink($list->prop_id);
            ?>
"
                   class="es_my_list_in"
                   style="background-image: url(<?php 
            echo $image_url;
            ?>
)">
                </a>

                <div class="es_my_list_title">
                    <h3>
                        <a href="<?php 
            echo get_permalink($list->prop_id);
            ?>
">
                            <?php 
            echo es_excerpt($list->prop_address, 90);
            ?>

                        </a>
                    </h3>
                    <h2><?php 
            echo get_price($list->prop_price);
            ?>
</h2>
                    <div class="description"><?php 
            echo es_excerpt($list->prop_description, 150);
            ?>
</div>
                    <?php 
            show_specs($list, $photo_info[1], 'black');
            ?>


                    <div class="clearfix"></div>
                    <?php 
            show_props($list);
            ?>

                </div>

                <div class="hover">
                    <div class="overlay">
                        <div class="es_my_list_more clearfix">
                            <a href="<?php 
            if ($list->prop_latitude != "" && $list->prop_longitude != "") {
                echo "{$list->prop_latitude}, {$list->prop_longitude}";
            }
            ?>
" class="es_button es_map_view">
                               <?php 
            _e("View on map", 'es-plugin');
            ?>

                            </a>
                            <a href="<?php 
            echo get_permalink($list->prop_id);
            ?>
"
                               class="es_button es_detail_btn">
                               <?php 
            _e("Details", 'es-plugin');
            ?>

                            </a>
                        </div>
                        <?php 
            show_specs($list, $photo_info[1], 'white');
            ?>

                    </div>
                    <div class="bottom"></div>
                </div>
            </li>

        <?php 
        }
    } else {
        echo '<li class="es_no_record">' . __("No record found.", 'es-plugin') . '</li>';
    }
    ?>

        </ul>

        <div id="es_content">
            <div id="es_map_pop_outer">
                <div id="es_map_pop">
                    <h2><?php 
    _e("Map", 'es-plugin');
    ?>
<a id="es_closePop" href="javascript:void(0)">×</a></h2>
                    <div id="es_map"></div>
                </div>
            </div>            
        </div>

        <div id="es_more_pagi">
            <?php 
    es_pagination(array(), $where);
    ?>

        </div>
    </div>

<?php 
}
示例#6
0
<?php

require 'functions.php';
write_header();
if (!isset($_REQUEST['dir']) || $_REQUEST['dir'] == "" || substr($_REQUEST['dir'], 0, 1) == "." || !is_dir(__DIR__ . '/' . PHOTOS_PATH . $_REQUEST['dir'])) {
    $_REQUEST['dir'] = "";
}
echo '<div class=gallery>';
if ($_REQUEST['dir'] !== "") {
    show_back(PHOTOS_PATH . $_REQUEST['dir']);
}
list_dirs(get_dirs($_REQUEST['dir']));
list_photos(get_images(PHOTOS_PATH . $_REQUEST['dir']));
echo '</div>';
function smarty_function_init_images($params, &$smarty)
{
    if (!function_exists('search_obj_array')) {
        function search_obj_array($needle, $field, $array = array())
        {
            if ($array) {
                foreach ($array as $key => $data) {
                    if ($data->all[$field] == $needle) {
                        return $key;
                    }
                }
            }
            return false;
        }
    }
    global $class_path, $site, $leht;
    extract($params);
    if (!isset($name)) {
        $name = 'images';
    }
    if (!isset($parent)) {
        $parent = $leht->id;
    }
    $album = new Objekt(array('objekt_id' => $parent));
    $conf = new CONFIG($album->all['ttyyp_params']);
    //$alamlist->debug->print_msg();
    $files = array();
    if ($conf->get('path')) {
        $path = (string) $conf->get('path');
        $path = preg_replace('#^/#', '', $path);
        $path = preg_replace('#/$#', '', $path);
        $sql = $site->db->prepare('select objekt_id from obj_folder where relative_path = ?', '/' . $path);
        $result = new SQL($sql);
        $folder_id = $result->fetchsingle();
        if ($folder_id) {
            $alamlistSQL = new AlamlistSQL(array('parent' => $folder_id, 'klass' => 'file', 'order' => ' filename ', 'where' => $where));
            $alamlistSQL->add_select(" obj_file.filename, obj_file.size, obj_file.kirjeldus ");
            $alamlistSQL->add_from("LEFT JOIN obj_file ON objekt.objekt_id=obj_file.objekt_id");
            $alamlist = new Alamlist(array('alamlistSQL' => $alamlistSQL));
            $files = array();
            $new_button = $alamlist->get_edit_buttons(array('tyyp_idlist' => '21', 'publish' => 1));
            while ($obj = $alamlist->next()) {
                $obj->buttons = $obj->get_edit_buttons(array('tyyp_idlist' => 21, 'nupud' => array('edit', 'delete', 'new')));
                $files[] = $obj;
            }
        }
        $path = $site->absolute_path . $path;
        include_once $class_path . 'picture.inc.php';
        $imgs = get_images($path, $conf->get('path'));
    } else {
        //veateade et path pole paika pandud or something ...
    }
    $start_from = 0;
    if ($limit) {
        $end_at = $limit;
    } else {
        $end_at = sizeof($imgs);
    }
    if ($start) {
        $total_pages = ceil(sizeof($imgs) / $limit);
        $start_from = $start;
        $end_at = $start_from + $limit;
    }
    if ($end_at > sizeof($imgs)) {
        $end_at = sizeof($imgs);
    }
    $j = 0;
    $images = array();
    for ($i = $start_from; $i < $end_at; $i++) {
        $images[$j]->thumb_path = $site->CONF['wwwroot'] . '/' . $imgs[$i]['thumb'];
        # relative path
        $images[$j]->thumb_height = $imgs[$i]['thumb_height'];
        # in pixels
        $images[$j]->thumb_width = $imgs[$i]['thumb_width'];
        $images[$j]->image_path = $site->CONF['wwwroot'] . '/' . $imgs[$i]['image'];
        $images[$j]->image_height = $imgs[$i]['image_height'];
        $images[$j]->image_width = $imgs[$i]['image_width'];
        $images[$j]->actual_image_path = $site->CONF['wwwroot'] . '/' . $imgs[$i]['actual_image'];
        $images[$j]->actual_image_height = $imgs[$i]['actual_image_height'];
        $images[$j]->actual_image_width = $imgs[$i]['actual_image_width'];
        $images[$j]->actual_image_size =& $images[$j]->size;
        # original
        $images[$j]->filename = $imgs[$i]['filename'];
        $key = search_obj_array($imgs[$i]['filename'], 'filename', $files);
        if ($key !== false) {
            $images[$j]->id = $files[$key]->all['objekt_id'];
            $images[$j]->title = $files[$key]->pealkiri;
            $images[$j]->description = $files[$key]->all['kirjeldus'];
            $images[$j]->size = $files[$key]->all['size'];
            # final display
            $images[$j]->buttons = $files[$key]->buttons;
        }
        $j++;
    }
    //printr($images);
    $smarty->assign(array($name => $images, $name . '_newbutton' => $new_button, $name . '_title' => $album->pealkiri, $name . '_first_image' => $images[0]->image_path, $name . '_last_image' => $images[sizeof($images) - 1]->image_path, $name . '_count' => sizeof($images), $name . '_counttotal' => sizeof($imgs)));
}
示例#8
0
<?php

get_header();
?>

<?php 
the_post();
$image = get_images($post->ID, 'full');
?>

<div class="section bright bald slim project">
    <div class="grid_container centered">
        <div class="grid_3_3">
            <div class="image"><?php 
echo $image;
?>
</div>
        </div>
        <div class="grid_3_3 text">
            <h2><?php 
echo $post->post_title;
?>
</h2>
            <?php 
echo $post->post_content;
?>
        </div>
    </div>
    <div class="clear zero">
    </div>
</div>
function get_images_linked_html_bysize($link = '', $target = '', $template = '', $raw = true, $code = 'html', $before = '', $after = '', $size = '')
{
    $images = get_images();
    if ($template == 'default') {
        $template = '';
    }
    global $image;
    foreach ($images as $image) {
        $array_value = '<a href="' . get_image_link($link) . '"' . set_image_link_target($target) . '>';
        switch ($size) {
            default:
            case 'full':
                $array_value .= get_image_raw_html($template, $before, $after);
                break;
            case 'thumb':
                $array_value .= get_image_thumb_raw_html($template, $before, $after);
                break;
        }
        $array_value .= '</a>';
        if ($code == 'bbcode') {
            $array[] = convert_html_to_bbcode($array_value);
        } else {
            $array[] = $raw ? $array_value : htmlentities($array_value);
        }
    }
    return $array;
}
示例#10
0
<div class="section project <?php 
        echo $section_class;
        ?>
">
    <div class="grid_container centered">
        <div class="grid_3_3">
            <h2><?php 
        echo $key;
        ?>
</h2>
        </div>
<?php 
        usort($value, 'cmp_date');
        $counter = 0;
        foreach ($value as $item) {
            $image = get_images($item['post']->ID, 'crop');
            $href = get_permalink($item['post']->ID);
            $counter++;
            ?>
        <a class="block" href="<?php 
            echo $href;
            ?>
">
            <div class="grid_1_3 left">
                <div class="image"><?php 
            echo $image;
            ?>
</div>
                <div class="text">
                    <h3 class="bold">
                        <?php 
示例#11
0
function scan_for_images($albumpath)
{
    debuglog("Album Path Is " . $albumpath, "LOCAL IMAGE SCAN");
    $result = array();
    if (is_dir("prefs/MusicFolders") && $albumpath != ".") {
        $albumpath = munge_filepath($albumpath);
        $result = array_merge($result, get_images($albumpath));
        // Is the album dir part of a multi-disc set?
        if (preg_match('/^CD\\s*\\d+$|^disc\\s*\\d+$/i', basename($albumpath))) {
            $albumpath = dirname($albumpath);
            $result = array_merge($result, get_images($albumpath));
        }
        // Are there any subdirectories?
        $globpath = preg_replace('/(\\*|\\?|\\[)/', '[$1]', $albumpath);
        $lookfor = glob($globpath . "/*", GLOB_ONLYDIR);
        foreach ($lookfor as $i => $f) {
            if (is_dir($f)) {
                $result = array_merge($result, get_images($f));
            }
        }
    }
    return $result;
}
示例#12
0
function set_default_images()
{
    return get_images("http://img.amy.gy/obtainium");
}
示例#13
0
    $filename = basename(__FILE__);
    $module['ADR-Zones']['NPC'] = $filename;
    return;
}
$phpbb_root_path = "./../";
require $phpbb_root_path . 'extension.inc';
require './pagestart.' . $phpEx;
include_once $phpbb_root_path . 'adr/includes/adr_global.' . $phpEx;
if (isset($HTTP_POST_VARS['mode']) || isset($HTTP_GET_VARS['mode'])) {
    $mode = isset($HTTP_POST_VARS['mode']) ? $HTTP_POST_VARS['mode'] : $HTTP_GET_VARS['mode'];
    $mode = htmlspecialchars($mode);
} else {
    $mode = "";
}
// WYSIWYG IMAGE VIEWER
$xxx_images = get_images("adr/images/zones/npc");
$filename_list = get_filenames($xxx_images);
if (isset($HTTP_POST_VARS['add']) || isset($HTTP_GET_VARS['add'])) {
    adr_template_file('admin/config_adr_npc_edit_body.tpl');
    $template->assign_block_vars('npc_add', array());
    $s_hidden_fields = '<input type="hidden" name="mode" value="savenew" />';
    //
    //BEGIN lists
    //
    //destinations lists
    $zone_list = '<select name="npc_zone[]" size="4" multiple>';
    $zone_list .= '<option value="0" SELECTED class="post">' . $lang['Adr_zone_acp_zones_all'] . '</option>';
    $sql = "SELECT * FROM " . ADR_ZONES_TABLE . "\r\n\t\t\tORDER BY zone_id ASC";
    if (!($result = $db->sql_query($sql))) {
        message_die(GENERAL_ERROR, 'Could not query area list', '', __LINE__, __FILE__, $sql);
    }
function smarty_function_init_albums($params, &$smarty)
{
    global $site, $leht, $template, $class_path;
    $content_template =& $leht->content_template;
    $albumlist = array();
    ##############
    # default values
    extract($params);
    if (!isset($name)) {
        $name = 'albumlist';
    }
    if (!isset($thumbnail_type)) {
        $thumbnail_type = 'first';
    }
    if (!isset($parent)) {
        $parent = $leht->id;
    }
    switch ($on_create) {
        case "publish":
            $publish = 1;
            break;
        case "hide":
            $publish = 0;
            break;
        default:
            $publish = 0;
    }
    # for language compatibility, replace with search string existing db field name
    $order = preg_replace('#\\btitle\\b#i', "pealkiri", $order);
    $order = preg_replace('#\\bdate\\b#i', "aeg", $order);
    $parent_id = trim($parent);
    if ($parent_id) {
        $alamlist = new Alamlist(array(parent => $parent_id, klass => "album", start => $start, limit => $limit, asukoht => $position, order => $order, where => $where));
        # if parameter "limit" is provided then "counttotal" element is needed (shows total rows)
        if (isset($limit)) {
            $alamlist_count = new Alamlist(array(parent => $parent_id, klass => "album", asukoht => $position, on_counter => 1));
        }
        ##############
        # load variables
        $new_button = $alamlist->get_edit_buttons(array(tyyp_idlist => "16", publish => $publish));
        while ($obj = $alamlist->next()) {
            $obj->buttons = $obj->get_edit_buttons(array(tyyp_idlist => "16", publish => $publish));
            $obj->id =& $obj->objekt_id;
            $obj->get_object_href();
            //$obj->href = $site->self.'?id='.$obj->objekt_id;
            $obj->class = translate_en($obj->all[klass]);
            # translate it to english
            $obj->is_selected = $leht->parents->on_parent($obj->objekt_id);
            $obj->title = $obj->pealkiri;
            $obj->date = $site->db->MySQL_ee_short($obj->all['aeg']);
            $obj->datetime = $site->db->MySQL_ee($obj->all['aeg']);
            $obj->fdate = substr($obj->all['aeg'], 0, strpos($obj->all['aeg'], ' '));
            $obj->fdatetime = $obj->all['aeg'];
            $obj->last_modified = date('Y', $obj->all['last_modified']) > 1970 ? date('d.m.Y H:i', $obj->all['last_modified']) : '';
            ## crap data
            $obj->flast_modified = $obj->all['last_modified'];
            $obj->details_link = $site->self . '?id=' . $obj->objekt_id;
            $obj->details_title = $site->sys_sona(array(sona => "loe edasi", tyyp => "kujundus"));
            $obj->created_user_id = $obj->all['created_user_id'];
            $obj->created_user_name = $obj->all['created_user_name'];
            $obj->changed_user_id = $obj->all['changed_user_id'];
            $obj->changed_user_name = $obj->all['changed_user_name'];
            $obj->created_time = $site->db->MySQL_ee($obj->all['created_time']);
            $obj->fcreated_time = $obj->all['created_time'];
            $obj->changed_time = $site->db->MySQL_ee($obj->all['changed_time']);
            $obj->fchanged_time = $obj->all['changed_time'];
            $obj->last_commented_time = $site->db->MySQL_ee($obj->all['last_commented_time']);
            $obj->comment_count = $obj->all['comment_count'];
            ### custom conf parameters
            $conf = new CONFIG($obj->all['ttyyp_params']);
            $obj->description = $conf->get('desc');
            if ($conf->get('path')) {
                include_once $class_path . 'picture.inc.php';
                # full relative path to the first/random thumbnail
                $obj->thumbnail = $site->CONF['wwwroot'] . '/' . get_images($site->absolute_path . $conf->get('path'), $conf->get('path'), $thumbnail_type);
            }
            #printr($obj->all['ttyyp_params']);
            $obj->thumbnail_size = $conf->get('tn_size');
            # in pixels
            $obj->image_size = $conf->get('pic_size');
            # in pixels
            $obj->folder_id = $conf->get('folder_id');
            # source folder ID
            $obj->folder_path = $conf->get('path');
            # source folder path, eg "public/images"
            ### / custom conf parameters
            array_push($albumlist, $obj);
        }
    }
    ##############
    # assign to template variables
    $count = $alamlist->rows;
    $counttotal = isset($limit) ? $alamlist_count->rows : $count;
    $smarty->assign(array($name => $albumlist, $name . '_newbutton' => $new_button, $name . '_counttotal' => $counttotal, $name . '_rows' => $counttotal, $name . '_count' => $count));
}
error_reporting(E_ALL);
ini_set('display_errors', 'On');
// for production
// error_reporting(E_ALL);
// ini_set('display_errors', 0);
// ini_set("log_errors", 1);
// ini_set("error_log", "/path/to/error_log.log");
require_once '../globals.php';
function get_images($dbh)
{
    $query = "SELECT post_id,source_url FROM posts WHERE disq = 0 AND downloaded = 0";
    $stmt = $dbh->prepare($query);
    $stmt->execute();
    $result = $stmt->fetchAll(PDO::FETCH_OBJ);
    if (!empty($result)) {
        foreach ($result as $row) {
            $link = $row->source_url;
            $post_id = $row->post_id;
            // get image and save to dir
            file_put_contents('/path/to/where/images/will/live/' . $post_id . '.jpg', file_get_contents($link));
            $query2 = "UPDATE posts SET downloaded = 1 WHERE post_id = '" . $post_id . "'";
            $stmt2 = $dbh->prepare($query2);
            $stmt2->execute();
            echo $post_id . " - image downloaded \n";
        }
    } else {
        echo "No images to import. \n";
    }
}
get_images($DBH);
示例#16
0
<?php

require 'phpQuery-onefile.php';
require 'config.php';
require 'controler.php';
$conn = mysql_connect($HOST, $USER, $PASS);
mysql_select_db($DB, $conn);
$tabVM = 'products';
$qUrl = "SELECT * FROM {$tabVM} limit 2290,1000  ";
$res_Url = run_sql($qUrl);
$j = 0;
while ($row = mysql_fetch_array($res_Url)) {
    $URL = $row['url'];
    $id = $row['id'];
    pq_page($URL);
    // Замена путей к картинкам в описании, загрузка картинок в images/story
    $allStoryImges = pq('div.std>img');
    foreach ($allStoryImges as $StoryImge) {
        $imgSrc = pq($StoryImge)->attr('src');
        echo $j . '---' . $URL . '+++' . $imgSrc . '<br>';
        if ($imgSrc != '') {
            get_images($imgSrc, 'D:/OpenServer/domains/panda2/images/story', basename($imgSrc));
        }
    }
    echo $j . '-----' . $id . '<br>';
    $j++;
}
mysql_close($conn);
示例#17
0
文件: view.php 项目: jpm8705/sajome
            closedir($handle);
        }
    }
    return $images;
}
?>

<table style="width:100%">
	<tr>
		<td style="width:140px;vertical-align:top">
			<ul id="folder_list">
				<?php 
echo get_dirs();
?>
			</ul>
		</td>
		<td style="vertical-align:top">
			<div id="library_cont">
				<div class="info">Mappe: "<?php 
echo $_REQUEST['folder'];
?>
"</div>
					<?php 
echo get_images();
?>
			<div style="clear:both"></div>
			</div>
		</td>
	</tr>
</table>
示例#18
0
文件: opraf.php 项目: nimral/opraf
function render_images()
{
    #TODO
    global $pdf_file;
    global $img_dir;
    global $img_uri;
    global $lock;
    $pdf_base = strip_ext($pdf_file);
    $imgs = get_images($pdf_base);
    if (count($imgs) == 0) {
        render_regen_form($pdf_file, 'Obrázky je nutné nejdříve vygenerovat.');
        return;
    }
    render_check_update($pdf_base, $imgs[0]);
    foreach ($imgs as $idx => $img) {
        $img_uri_path = "{$img_uri}/{$img}";
        $img_path = "{$img_dir}/{$img}";
        list($w, $h) = getimagesize($img_path);
        $id = "img-{$idx}";
        if ($lock) {
            echo "<b>Od " . $lock["cas"] . " zanáší " . $lock["au"] . " korektury.</b>";
        }
        render_image($img_path, $id, $w, $h);
    }
    if ($lock) {
        render_unlock($pdf_file);
    } else {
        render_lock($pdf_file);
    }
    render_delall($pdf_file);
}
示例#19
0
    }
    $posts[] = array('post' => $post, 'date' => $date);
    usort($posts, 'cmp_date');
}
foreach ($posts as $post_array) {
    if ($polarity) {
        $section_class = 'dark';
        $clear_class = 'shadow';
        $polarity = 0;
    } else {
        $section_class = 'bright';
        $clear_class = 'zero';
        $polarity = 1;
    }
    $post = $post_array['post'];
    $image = get_images($post->ID, 'crop');
    $href = get_permalink($post->ID);
    ?>

<div class="section project <?php 
    echo $section_class;
    ?>
">
    <div class="grid_container centered">
        <a href="<?php 
    echo $href;
    ?>
" class="block">
            <div class="grid_2_3 left">
                <div class="image"><?php 
    echo $image;
示例#20
0
<?php

$itemData = "../resources/itemdata.json";
$string = file_get_contents($itemData);
$array = json_decode($string, true);
get_images($array);
function get_images($array)
{
    // We get the array and need to download all the images for the items that are combined.
    foreach ($array['itemdata'] as $itemName => $itemArray) {
        if ($itemArray['created'] != false) {
            // We get the final Item Name via this.
            $itemPrice = $itemArray['cost'];
            $testPrice = 0;
            // Now we need to get the component names
            $components = $itemArray['components'];
            $componentData = array();
            foreach ($components as $component) {
                $name = $array['itemdata']["{$component}"]['dname'];
                $price = $array['itemdata']["{$component}"]['cost'];
                $componentData[] = array("name" => $component, "dname" => $name, "price" => $price);
                $testPrice += $price;
            }
            if ($testPrice != $itemPrice) {
                $price = $itemPrice - $testPrice;
                $componentData[] = array("name" => "recipe", "dname" => "recipe", "price" => $price);
            }
            $print = $itemArray['dname'] . "({$itemPrice}) = ";
            foreach ($componentData as $comp) {
                $print .= $comp['dname'] . "(" . $comp['price'] . ") + ";
            }
示例#21
0
    <span class="btn" title="Show next image" id="next"><a href="#">next</a></span>
  </div>
</div>

<div id="main_image_wrapper">
  <div id="main_image">
    <!-- placeholder for image -->
  </div>
</div>

<div id="scroller">
  <div id="albums"></div>
  <div id="images">
    <ul id="carousel_list" class="image_list">
      <?php 
foreach (get_images(ALBUMS_ROOT . $params['album']) as $image) {
    ?>
        <li>
          <a href="<?php 
    echo url_for_image($image, 'big');
    ?>
">
            <img src="<?php 
    echo url_for_image($image, 'thumb');
    ?>
" alt="" />
          </a>
        </li>
      <?php 
}
?>
示例#22
0
<?php

include "../model/imagedb.php";
if ($_POST['method'] == "insert") {
    insert_image();
}
if ($_POST['method'] == "getAll") {
    get_all_images();
}
if ($_POST['method'] == "getImage") {
    get_images();
}
if ($_POST['method'] == "getUserImage") {
    get_user_images();
}
if ($_POST['method'] == "updateImage") {
    changeImgInfo();
}
if ($_POST['method'] == "del") {
    //echo json_encode("ha");
    delect_images();
}
if ($_POST['method'] == "like") {
    insert_like();
}
示例#23
0
        pq($td)->removeAttr('class');
    }
    $DESCR = $DESCR->html();
    $DESCR = str_replace("<span>", "", $DESCR);
    $DESCR = str_replace("</span>", "", $DESCR);
    $DESCR = $mysqli->real_escape_string($DESCR);
    // Замена путей к картинкам в описании, загрузка картинок в images/story
    // поиск больших изображений товара 4 первые шт
    $allLargeImg = pq('.gallery-media-slider>li>a');
    $i = 0;
    $IMGS_LARGE = '';
    foreach ($allLargeImg as $LargeImg) {
        $imgSrc = pq($LargeImg)->attr('onclick');
        $imgSrc = str_replace("switchImages(", '', $imgSrc);
        $imgSrc = str_replace(");", '', $imgSrc);
        $imgSrc = str_replace(" return false;", '', $imgSrc);
        $imgSrc = explode(",", $imgSrc);
        $imgSrc = str_replace("'", "", $imgSrc[0]);
        $imgLarge = 'l_' . $ID_PRODUCT . '_' . $i . '.jpg';
        get_images($imgSrc, 'D:/OpenServer/domains/panda2/images/large', $imgLarge);
        $IMGS_LARGE = $IMGS_LARGE . '^' . $imgLarge;
        $i++;
        if ($i > 4) {
            break;
        }
    }
    $qUpdateProduct = "UPDATE {$tabVM}  SET description='{$DESCR}',\n                        status=2,\n                        img_large='{$IMGS_LARGE}',\n                        price={$PRICE}\n                    WHERE id={$ID_PRODUCT}";
    // $res_Url = $mysqli->query($qUpdateProduct);
    run_sql($qUpdateProduct);
}
$mysqli->close();
示例#24
0
/**
 * Gets one product by slug
 */
function get_product_by_slug($slug)
{
    $db = get_connection();
    $sql = <<<SQL
        SELECT *
        FROM products
        WHERE
            slug = :slug
SQL;
    $statement = $db->prepare($sql);
    $statement->execute([':slug' => $slug]);
    $product = (array) $statement->fetch(PDO::FETCH_ASSOC);
    $product['images'] = get_images($product['id']);
    return $product;
}
}
$url = $_SERVER["PHP_SELF"] . '?sess=' . $_GET['sess'] . '&amp;author_id=' . $_GET['author_id'];
// now bring in our functions
//include_once(WW_ROOT.'/ww_config/model_functions.php');
//include_once(WW_ROOT.'/ww_config/controller_functions.php');
include_once WW_ROOT . '/ww_config/author_controller_functions.php';
include_once WW_ROOT . '/ww_config/author_view_functions.php';
include_once WW_ROOT . '/ww_config/combined_functions.php';
// pagination parameters
$page = empty($_GET['page']) ? '1' : (int) $_GET['page'];
// upload image
if (isset($_POST['upload_image']) && $_POST['upload_image'] == 'upload') {
    $upload_success = insert_image();
}
// get images
$all_images = get_images(7);
// $author_images = list_images(7,1);
$total_pages = !empty($all_images) ? $all_images[0]['total_pages'] : 0;
$total_images = !empty($all_images) ? $all_images[0]['total_images'] : 0;
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
	<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
	<head>
	<script type="text/javascript" src="<?php 
echo WW_WEB_ROOT;
?>
/ww_edit/_js/jquery.js"></script>
	<script type="text/javascript">
		
		$(document).ready(function(){  
		
示例#26
0
if (isset($_GET['filename'])) {
    $filepath = WW_ROOT . '/ww_files/images/' . $_GET['filename'];
    if (file_exists($filepath)) {
        $filename = $_GET['filename'];
    }
}
if (!empty($image_id)) {
    $image = get_image($_GET['image_id']);
    // file usage
    $usage = file_usage($image['filename']);
} elseif (isset($filename)) {
    $image = get_file_details($filepath);
    // file usage
    $usage = file_usage($image['filename']);
} else {
    $images = get_images($images_per_page);
    $orphans = get_image_orphans();
    $total_images = !empty($images) ? $images[0]['total_images'] : 0;
    $total_pages = !empty($images) ? $images[0]['total_pages'] : 0;
}
// construct page header
$left_text = '<a href="' . $_SERVER["PHP_SELF"] . '?page_name=files">files</a>';
$left_text .= isset($image) ? ': <a href="' . $_SERVER["PHP_SELF"] . '?page_name=images">images</a>' : ': images';
$right_text = isset($image) ? $image['filename'] : $total_images . ' found';
$page_header = show_page_header($left_text, $right_text);
// output main content
$main_content = $page_header;
// if a single image is selected then show it
if (isset($image) && !empty($image)) {
    // confirm file delete
    if (isset($_POST['action']) && $_POST['action'] == 'delete') {
示例#27
0
function parse_contents($str)
{
    global $wrap;
    global $site_url;
    /* it can be:
       <a href="speciesdetail.cfm?genus=Abyssopathes&subgenus=&species=lyra&subspecies=&synseniorid=9266&validspecies=Abyssopathes%20lyra&authorship=%28Brook%2C%201889%29">Abyssopathes lyra (Brook, 1889)</a>
       or
       <a href="speciesdetail_for_nosyn.cfm?species=dentata&genus=Sandalolitha&subgenus=&subspecies=">Sandalolitha dentata Quelch, 1884</a>
       //
       */
    $temp = '';
    $beg = 'speciesdetail.cfm?';
    $end1 = '</a>';
    $temp = trim(parse_html($str, $beg, $end1, $end1, $end1, $end1, ""));
    if ($temp == '') {
        $beg = 'speciesdetail_for_nosyn.cfm?';
        $end1 = '</a>';
        $temp = trim(parse_html($str, $beg, $end1, $end1, $end1, $end1, ""));
    }
    //anemone2/speciesdetail_for_nosyn.cfm?spe
    $temp = '<a href="' . $site_url . '' . $beg . $temp . "</a>";
    //get url_for_main_menu
    $beg = '="';
    $end1 = '">';
    $url_for_main_menu = trim(parse_html($temp, $beg, $end1, $end1, $end1, $end1, ""));
    //print"$wrap [<a href='$url_for_main_menu'>url_for_main_menu</a>]";
    //end url_for_main_menu
    //get sciname
    $beg = '">';
    $end1 = '</a>';
    $taxa = trim(parse_html($temp, $beg, $end1, $end1, $end1, $end1, ""));
    print "{$wrap} taxa[{$taxa}]";
    //end sciname
    $main_menu = Functions::get_remote_file($url_for_main_menu);
    //get url for images page
    $url_for_images_page = "";
    //"images.cfm?&genus=Abyssopathes&subgenus=&species=lyra&subspecies=&seniorid=9266&validspecies=Abyssopathes%20lyra&authorship=%28Brook%2C%201889%29">Images</a>
    $beg = 'images.cfm';
    $end1 = '">';
    $temp = trim(parse_html($main_menu, $beg, $end1, $end1, $end1, $end1, ""));
    $arr_images = array();
    if ($temp != "") {
        $url_for_images_page = $site_url . $beg . $temp;
        //print"$wrap [<a href='$url_for_images_page'>images</a>]";
        ///*
        $arr_images = get_images($url_for_images_page);
        //*/
    } else {
        print "{$wrap} no images";
    }
    //end url for images page
    //get url for classification
    $url_for_classification = "";
    //"showclassification2.cfm?synseniorid=2914&genus=Aiptasiogeton&subgenus=&species=eruptaurantia&subspecies=&origgenus=Actinothoe&origspecies=eruptaurantia&origsubspecies=&origsubgenus=&&validspecies=Aiptasiogeton%20eruptaurantia&authorship=%28Field%2C%201949%29">Classification</a>
    $beg = 'showclassification2.cfm';
    $end1 = '">';
    $temp = trim(parse_html($main_menu, $beg, $end1, $end1, $end1, $end1, ""));
    if ($temp == "") {
        //http://hercules.kgs.ku.edu/hexacoral/anemone2/classification_path_no_syn.cfm?genus=Astr%C3%A6a&subgenus=&species=abdita&subspecies=
        $beg = 'classification_path_no_syn.cfm';
        $end1 = '">';
        $temp = trim(parse_html($main_menu, $beg, $end1, $end1, $end1, $end1, ""));
    }
    if ($temp != "") {
        $url_for_classification = $site_url . $beg . $temp;
        //print"$wrap [<a href='$url_for_classification'>classification</a>]";
        $arr_classification = get_tabular_data($url_for_classification, "classification");
        if ($arr_classification) {
            $arr_classification = parse_classification($arr_classification);
        }
    } else {
        print "{$wrap} no classification";
    }
    //end url for classification
    //get url for strict_synonymy
    $url_for_strict_synonymy = "";
    //"synonymy_strict.cfm?seniorid=2914&validspecies=Aiptasiogeton%20eruptaurantia&authorship=%28Field%2C%201949%29">Strict synonymy</a>
    $beg = 'synonymy_strict.cfm';
    $end1 = '">';
    $temp = trim(parse_html($main_menu, $beg, $end1, $end1, $end1, $end1, ""));
    if ($temp != "") {
        $url_for_strict_synonymy = $site_url . $beg . $temp;
        //print"$wrap [<a href='$url_for_strict_synonymy'>strict_synonymy</a>]";
        $arr_synonyms = get_tabular_data($url_for_strict_synonymy, "synonyms");
    } else {
        print "{$wrap} no strict_synonymy";
    }
    //end url for strict_synonymy
    //get url for references
    $url_for_references = "";
    //"all_mentions_of_names2.cfm?species...
    $beg = 'all_mentions_of_names.cfm';
    $end1 = '">';
    $temp = trim(parse_html($main_menu, $beg, $end1, $end1, $end1, $end1, ""));
    if ($temp == "") {
        $beg = 'all_mentions_of_names2.cfm';
        $end1 = '">';
        $temp = trim(parse_html($main_menu, $beg, $end1, $end1, $end1, $end1, ""));
    }
    $arr_references = array();
    if ($temp != "") {
        $url_for_references = $site_url . $beg . $temp;
        //print"$wrap [<a href='$url_for_references'>references</a>]";
        $arr_references = get_tabular_data($url_for_references, "references");
        //start process
        $arr = array();
        foreach ($arr_references as $value) {
            $temp = "";
            foreach ($value as $item) {
                $temp .= "." . $item;
            }
            $temp = trim(substr($temp, 1, strlen($temp)));
            //to remove the '.' on the first char
            //<a href="reference_detail.cfm?ref_number=58&type=Article">
            $temp = str_ireplace("reference_detail.cfm", $site_url . "reference_detail.cfm", $temp);
            //if we want to remove the anchor
            //$temp = get_str_from_anchor_tag($temp);
            $arr["{$temp}"] = 1;
        }
        $arr_references = array_keys($arr);
    } else {
        print "{$wrap} no references";
    }
    //end url for references
    //get url for common_names
    $url_for_common_names = "";
    //"common.cfm?seniorid=2914&validspecies=Aiptasiogeton%20eruptaurantia&authorship=%28Field%2C%201949%29">Strict synonymy</a>
    $beg = 'common.cfm';
    $end1 = '">';
    $temp = trim(parse_html($main_menu, $beg, $end1, $end1, $end1, $end1, ""));
    $arr_common_names = array();
    if ($temp != "") {
        $url_for_common_names = $site_url . $beg . $temp;
        //print"$wrap [<a href='$url_for_common_names'>common_names</a>]";
        $arr_common_names = get_tabular_data($url_for_common_names, "common_names");
        //start process
        $arr = array();
        foreach ($arr_common_names as $value) {
            //$temp = strtolower($value[0]); //not a good idea especially for special chars
            $temp = $value[0];
            $temp = trim(get_str_from_anchor_tag($temp));
            //print"[$temp]";
            $arr["{$temp}"] = 1;
        }
        $arr_common_names = array_keys($arr);
    } else {
        print "{$wrap} no common_names";
    }
    //end url for common_names
    //get url for skeletons
    //e.g. for species (Favites abdita) with skeleton
    $url_for_skeletons = "";
    //http://hercules.kgs.ku.edu/hexacoral/anemone2/skeleton.cfm?genus=Favites&subgenus=&species=abdita&subspecies=
    $beg = 'skeleton.cfm';
    $end1 = '">';
    $temp = trim(parse_html($main_menu, $beg, $end1, $end1, $end1, $end1, ""));
    $html_skeletons = "";
    if ($temp != "") {
        $url_for_skeletons = $site_url . $beg . $temp;
        //print"$wrap [<a href='$url_for_skeletons'>skeletons</a>]";
        $arr_skeletons = get_tabular_data($url_for_skeletons, "skeletons");
        if ($arr_skeletons) {
            $arr_fields = array("Author", "Skeleton?", "Mineral or Organic?", "Mineral", "Percent Magnesium");
            $html_skeletons = arr2html($arr_skeletons, $arr_fields, $url_for_main_menu);
            $html_skeletons = "<div style='font-size : small;'>{$html_skeletons}</div>";
        }
    } else {
        print "{$wrap} no skeletons";
    }
    //end url for skeleton
    //get url for biological_associations
    $url_for_biological_associations = "";
    $beg = 'symbiont_info.cfm';
    $end1 = '">';
    $temp = trim(parse_html($main_menu, $beg, $end1, $end1, $end1, $end1, ""));
    $html_biological_associations = "";
    if ($temp != "") {
        $url_for_biological_associations = $site_url . $beg . $temp;
        //print"$wrap [<a href='$url_for_biological_associations'>biological_associations</a>]";
        $arr_biological_associations = get_tabular_data($url_for_biological_associations, "biological_associations");
        $arr_fields = array("Algal symbionts");
        $html_biological_associations = arr2html($arr_biological_associations, $arr_fields, $url_for_main_menu);
        $html_biological_associations = "<div style='font-size : small;'>{$html_biological_associations}</div>";
    } else {
        print "{$wrap} no biological_associations";
    }
    //end url for biological_associations
    //get url for nematocysts
    $url_for_nematocysts = "";
    $beg = 'cnidae_information.cfm';
    $end1 = '">';
    $temp = trim(parse_html($main_menu, $beg, $end1, $end1, $end1, $end1, ""));
    $html_nematocysts = "";
    if ($temp != "") {
        $url_for_nematocysts = $site_url . $beg . $temp;
        //print"$wrap [<a href='$url_for_nematocysts'>nematocysts</a>]";
        $arr_nematocysts = get_tabular_data($url_for_nematocysts, "nematocysts");
        $arr_fields = array("Location", "Image", "Cnidae Type", "Range of <br> Lengths (m)", " ", "Range of <br >Widths (m)", "n", "N", "State");
        $html_nematocysts = arr2html($arr_nematocysts, $arr_fields, $url_for_main_menu);
        $html_nematocysts = "<div style='font-size : small;'>{$html_nematocysts}</div>";
        //to have the 2nd row have colspan=9
        $html_nematocysts = str_ireplace("</th></tr><tr><td>", "</th></tr><tr><td colspan='9'>", $html_nematocysts);
    } else {
        print "{$wrap} no nematocysts";
    }
    //end url for nematocysts
    //get url for specimens
    /*
        $url_for_specimens="";
        //all_specimens_xml.cfm?
        $beg='all_specimens_xml.cfm'; $end1='">';
        $temp = trim(parse_html($main_menu,$beg,$end1,$end1,$end1,$end1,""));
        $arr_specimens=array();
        if($temp != "")
        {
            $url_for_specimens = $site_url . $beg . $temp;
            print"$wrap [<a href='$url_for_specimens'>specimens</a>]";
            $arr_specimens = get_tabular_data($url_for_specimens,"specimens");
            //start process
            $arr=array();
            foreach ($arr_specimens as $value)
            {
                $temp = @$value[5];
                $arr["$temp"]=1;
            }
            $arr_specimens = array_keys($arr);
        }else print"$wrap no specimens";
    */
    //end url for specimens
    //print"<hr>$main_menu";
    //========================================================================================
    //return array ($id,$image_url,$description,$desc_pic,$desc_taxa,$categories,$taxa,$copyright,$providers,$creation_date,$photo_credit,$outlinks);
    return array($taxa, $url_for_main_menu, $arr_classification, $arr_images, $html_skeletons, $url_for_skeletons, $html_biological_associations, $url_for_biological_associations, $arr_common_names, $arr_references, $html_nematocysts, $url_for_nematocysts);
}
/**
 * Writes the basic JS of the editor to $hjs. No editors are actually created.
 * Multiple calls are allowed; all but the first should be ignored.
 * This is called from init_EDITOR() automatically, but not from EDITOR_replace().
 *
 * @global string $hjs
 * @return void
 */
function include_tinymce4()
{
    global $edit, $pth, $h, $u, $l, $hjs, $plugin_cf;
    static $again = false;
    if ($again) {
        return;
    }
    $again = true;
    if (TINYMCE4_VARIANT == 'CDN') {
        $tiny_src = $plugin_cf['tinymce4']['CDN_src'];
    } else {
        $tiny_src = $pth['folder']['plugins'] . 'tinymce4/' . 'tinymce/tinymce.min.js';
    }
    if (XH_ADM && $edit) {
        include_once $pth['folder']['plugins'] . 'tinymce4/' . 'links.php';
        $imageList = 'myImageList = ' . get_images($pth['folder']['images']) . ';';
        $linkList = 'var myLinkList = ' . get_internal_links($h, $u, $l, $pth['folder']['downloads']) . ';';
    } else {
        $imageList = $linkList = '';
    }
    $hjs .= '
        <script language="javascript" type="text/javascript" src="' . $tiny_src . '"></script>
	<script type="text/javascript">
	/* <![CDATA[ */
	' . tinymce4_filebrowser() . '
    var myImageList;
	' . $imageList . '
    var myLinkList;
	' . $linkList . '
	/* ]]> */
	</script>
    <style type="text/css">
        div.mce-fullscreen {z-index: 999;}  /*fullscreen overlays admin toolbar */
    </style>
	';
}
示例#29
0
 $gallery_folder = "../../upload/";
 $sg_path = $_POST['sg_path'];
 $sg_main_category = $_POST['sg_main_category'];
 $sg_twidth = $_POST['sg_twidth'];
 $sg_theight = $_POST['sg_theight'];
 $idWpisu = $_POST['idWpisu'];
 if ($_POST['action'] == "loadData") {
     $crumbs = get_crumbs($gallery_folder, $sg_main_category);
     $dirs = get_dirs($gallery_folder);
     $images = get_images($gallery_folder);
 } else {
     if ($_POST['action'] == "changeDir") {
         $newdir = $_POST['newdir'];
         $crumbs = get_crumbs($newdir, $sg_main_category);
         $dirs = get_dirs($newdir);
         $images = get_images($newdir);
     }
 }
 if ($sg_path == '') {
     echo '<script type="text/javascript" src="simplegallery/js/fancybox/jquery.fancybox.js?v=2.0.6"></script>';
     echo '<link rel="stylesheet" type="text/css" href="simplegallery/css/style.css" media="screen" />';
     echo '<link rel="stylesheet" type="text/css" href="simplegallery/js/fancybox/jquery.fancybox.css?v=2.0.6" media="screen" />';
 } else {
     echo '<script type="text/javascript" src="' . $sg_path . '/js/fancybox/jquery.fancybox.js?v=2.0.6"></script>';
     echo '<link rel="stylesheet" type="text/css" href="' . $sg_path . '/css/style.css" media="screen" />';
     echo '<link rel="stylesheet" type="text/css" href="' . $sg_path . '/js/fancybox/jquery.fancybox.css?v=2.0.6" media="screen" />';
 }
 if ($_POST['action'] == "changeDir") {
     echo '<script>sg_reload("' . $sg_path . '", "' . $sg_main_category . '", "' . $sg_twidth . '", "' . $sg_theight . '");</script>';
 }
 if ($crumbs) {
示例#30
0
</image>

<?php 
if (array_key_exists('album', $params)) {
    $albums = array($params['album']);
} else {
    $albums = get_folders(ALBUMS_ROOT);
    print_r($albums);
}
?>

<?php 
foreach ($albums as $album) {
    ?>
  <?php 
    foreach (get_images(ALBUMS_ROOT . $album) as $photo) {
        ?>
  <item>
    <?php 
        $exif = exif_read_data(ALBUMS_ROOT . "{$album}/{$photo}");
        $last_modified = $exif['FileDateTime'];
        ?>
    <title><?php 
        echo $photo;
        ?>
</title>
    <description>
      <a href="<?php 
        echo url("albums/{$album}/{$photo}", FALSE);
        ?>
">