本文整理汇总了PHP中get_images函数的典型用法代码示例。如果您正苦于以下问题:PHP get_images函数的具体用法?PHP get_images怎么用?PHP get_images使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了get_images函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: include_tinymce
/**
* 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>
';
}
开发者ID:2014c2g1,项目名称:2014cadp,代码行数:35,代码来源:init.php
示例2: get_images_data
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;
}
开发者ID:sathyz,项目名称:site_rn,代码行数:16,代码来源:gallery.php
示例3: create_album
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;
}
}
开发者ID:naehrstoff,项目名称:photo-promenade,代码行数:46,代码来源:application.php
示例4: str_replace
</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><p><a href="' . 'http://' . $_SERVER['HTTP_HOST'] . str_replace(" ", "%20", BASE_URL . 'albums/' . $album . '/') . $photo . '"><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;"/></a></p><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>';
开发者ID:scharlie,项目名称:photo-promenade,代码行数:31,代码来源:rss.php
示例5: get_list_trendy
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
//.........这里部分代码省略.........
开发者ID:ksan5835,项目名称:rankproperties,代码行数:101,代码来源:es_listing_functions.php
示例6: write_header
<?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>';
开发者ID:nmrugg,项目名称:Photos-Now,代码行数:14,代码来源:index.php
示例7: smarty_function_init_images
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)));
}
开发者ID:riho,项目名称:Saurus-CMS-Community-Edition,代码行数:97,代码来源:function.init_images.php
示例8: get_header
<?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>
开发者ID:peterbehr,项目名称:peterbehr,代码行数:31,代码来源:single.php
示例9: get_images_linked_html_bysize
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;
}
开发者ID:JJaicmkmy,项目名称:Chevereto,代码行数:27,代码来源:template.functions.php
示例10: usort
<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
开发者ID:peterbehr,项目名称:peterbehr,代码行数:31,代码来源:category.php
示例11: scan_for_images
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;
}
开发者ID:cyrilix,项目名称:rompr,代码行数:23,代码来源:functions.php
示例12: set_default_images
function set_default_images()
{
return get_images("http://img.amy.gy/obtainium");
}
开发者ID:rhiaro,项目名称:obtainium,代码行数:4,代码来源:index.php
示例13: basename
$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);
}
开发者ID:Nekrofage,项目名称:FJR,代码行数:31,代码来源:admin_adr_npc.php
示例14: smarty_function_init_albums
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));
}
开发者ID:sauruscms,项目名称:Saurus-CMS-Community-Edition,代码行数:95,代码来源:function.init_albums.php
示例15: error_reporting
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);
开发者ID:hackjob83,项目名称:Social-Media-Scraper,代码行数:30,代码来源:get_social_images.php
示例16: mysql_connect
<?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);
开发者ID:pilipchuk72,项目名称:panda2,代码行数:28,代码来源:parser_story_img.php
示例17: closedir
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>
开发者ID:jpm8705,项目名称:sajome,代码行数:30,代码来源:view.php
示例18: render_images
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);
}
开发者ID:nimral,项目名称:opraf,代码行数:31,代码来源:opraf.php
示例19: array
}
$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;
开发者ID:peterbehr,项目名称:peterbehr,代码行数:31,代码来源:index.php
示例20: file_get_contents
<?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'] . ") + ";
}
开发者ID:Pioneer11X,项目名称:quiz,代码行数:31,代码来源:getdata.php
注:本文中的get_images函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论