本文整理汇总了PHP中uploads_url函数的典型用法代码示例。如果您正苦于以下问题:PHP uploads_url函数的具体用法?PHP uploads_url怎么用?PHP uploads_url使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了uploads_url函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: delete
public function delete()
{
$this->check_current_user();
if ($this->input->server('REQUEST_METHOD') === 'POST') {
$data = $this->input->post($this->data['controller']);
$this->check_akses_page($this->data['controller'], 'delete', $this->data['controller']);
if (empty($data['id'])) {
$this->session->set_flashdata('alert', array('type' => 'warning', 'message' => 'Tidak ada data pejabat pembuat komitmen yang dipilih'));
redirect(base_url($this->data['controller']));
}
$this->db->trans_begin();
$this->db->delete($this->pejabat->table, array('id' => $data['id']));
if ($this->db->trans_status() === FALSE) {
$this->db->trans_rollback();
$this->session->set_flashdata('alert', array('type' => 'error', 'message' => 'Data pejabat pembuat komitmen gagal dihapus'));
} else {
$this->db->trans_commit();
$this->session->set_flashdata('alert', array('type' => 'success', 'message' => 'Data pejabat pembuat komitmen telah dihapus'));
if (!empty($data['photo'])) {
unlink(uploads_url($this->data['controller'] . '/' . $data['photo']));
}
}
redirect(base_url($this->data['controller']));
}
}
开发者ID:dedetrisnandar,项目名称:simonro,代码行数:25,代码来源:pejabat.php
示例2: foundation_form_input
?>
<?php
echo foundation_form_input('name', array('default_value' => isset($room->name) ? $room->name : null));
?>
<?php
echo foundation_form_input('rate', array('default_value' => isset($room->rate) ? $room->rate : null));
?>
<?php
echo foundation_form_input('description', array('as' => 'text', 'default_value' => isset($room->description) ? $room->description : null));
?>
<?php
if (isset($room->image)) {
?>
<label>Current Featured Image</label>
<img src="<?php
echo uploads_url($room->image);
?>
" />
<label>Upload New Featured Image <input type="file" name="image" /></label>
<?php
} else {
?>
<label>Upload Featured Image <input type="file" name="image" /></label>
<?php
}
?>
<?php
echo form_submit(array('class' => 'button'), 'Submit');
?>
开发者ID:chloereimer,项目名称:sleepy-me-hotel,代码行数:30,代码来源:room_form.php
示例3: uploads_url
<div class="copy-left">
<p>Copyright © 2015.</p>
<a href="#page-home" class="btn btn-totop btn-totop-hide"><i class="fa fa-angle-up"></i></a>
</div>
</div>
<div class="col-md-6 col-sm-6 col-xs-12">
<ul class="social-links">
<li><a href=""><i class="fa fa-twitter"></i></a></li>
<li><a href=""><i class="fa fa-facebook"></i></a></li>
<li><a href=""><i class="fa fa-instagram"></i></a></li>
<li><a href=""><i class="fa fa-google-plus"></i></a></li>
<li><a href=""><i class="fa fa-dribbble"></i></a></li>
<li><a href=""><i class="fa fa-linkedin"></i></a></li>
<li><a href=""><i class="fa fa-github"></i></a></li>
</ul>
</div>
</div>
</div>
</div>
end:footer
-->
</section>
<!-- end:content-wrapper -->
<input type="text" id="poster_path" type="hidden" value="<?php
echo uploads_url() . 'events/posters/' . $event_details->poster;
?>
" />
开发者ID:nitishdola,项目名称:99fest,代码行数:31,代码来源:view2_old.php
示例4: foreach
foreach ($images as $k => $image) {
?>
<tbody>
<tr>
<td><?php
echo $k + 1;
?>
</td>
<td><?php
echo ucfirst($image->type);
?>
</td>
<td>
<?php
echo anchor(uploads_url() . "default/" . $image->path, img(array("src" => uploads_url() . "default/" . $image->path, "border" => "0", "height" => "80", "width" => "180", "alt" => $image->type . " default image")), array('data-toggle' => 'lightbox'));
?>
<td>
<?php
if ($image->status) {
?>
<?php
echo anchor('disable-default-image/' . $image->id, 'Disable');
?>
<?php
} else {
?>
<?php
echo anchor('enable-default-image/' . $image->id, 'Enable');
?>
<?php
开发者ID:nitishdola,项目名称:99fest,代码行数:31,代码来源:view_default_image.php
示例5: foreach
</ul>
</div>
<div class="panel-body">
<?php
if (!empty($vendor_images)) {
?>
<?php
foreach ($vendor_images as $vimg) {
?>
<div class="col-md-4">
<p><b>Category : <?php
echo $vimg->name;
?>
</b></p>
<img src="<?php
echo uploads_url() . 'vendors/images/' . $vimg->path;
?>
" width="300" height="160" />
</div>
<?php
}
?>
<?php
} else {
?>
<b>No Image uploaded !</b>
<?php
}
?>
</div>
</div>
开发者ID:nitishdola,项目名称:99fest,代码行数:31,代码来源:view_images.php
示例6: get_uploaded_files_markup
public static function get_uploaded_files_markup($results = array())
{
$url = uploads_url();
ob_start();
if (!empty($results)) {
?>
<ul id="selectable" class=""><?php
$num = 0;
foreach ($results as $id => $filename) {
//$img = $results[$num];
$thumbsize = GlobalsRevSlider::IMAGE_SIZE_THUMBNAIL;
$mediumsize = GlobalsRevSlider::IMAGE_SIZE_MEDIUM;
$largesize = GlobalsRevSlider::IMAGE_SIZE_LARGE;
$filerealname = substr($filename, 0, strrpos($filename, '.'));
$fileext = substr($filename, strrpos($filename, '.'), strlen($filename) - strlen($filerealname));
$thumbimg = $img = "{$filerealname}-{$thumbsize}x{$thumbsize}{$fileext}";
$mediumimg = "{$filerealname}-{$mediumsize}x{$mediumsize}{$fileext}";
$largeimg = "{$filerealname}-{$largesize}x{$largesize}{$fileext}";
if (++$num % 4 === 1) {
?>
<li data-image="<?php
echo $filename;
?>
" data-large="<?php
echo $largeimg;
?>
" data-medium="<?php
echo $mediumimg;
?>
" data-thumb="<?php
echo $thumbimg;
?>
" class="last"><a href="#"><img alt="<?php
echo $img;
?>
" src="<?php
echo $url . $img;
?>
" /></a></li><?php
} else {
?>
<li data-image="<?php
echo $filename;
?>
" data-large="<?php
echo $largeimg;
?>
" data-medium="<?php
echo $mediumimg;
?>
" data-thumb="<?php
echo $thumbimg;
?>
"><a href="#"><img alt="<?php
echo $img;
?>
" src="<?php
echo $url . $img;
?>
" /></a></li><?php
}
}
?>
</ul><?php
}
$content = ob_get_contents();
ob_end_clean();
return $content;
}
开发者ID:rinodung,项目名称:opencart-15x-flat-admin,代码行数:69,代码来源:base_admin.class.php
示例7: uploads_url
<dt>Rate</dt>
<dd><?php
echo $room->rate;
?>
</dd>
<dt>Description</dt>
<dd><?php
echo $room->description;
?>
</dd>
<dt>Image</dt>
<dd>
<img src='<?php
echo uploads_url("{$room->image}");
?>
' />
</dd>
</dl>
<div class="actions">
<a href="<?php
echo site_url('admin/edit_room/' . $room->id);
?>
" class="button">Edit</a>
<a href="<?php
echo site_url('admin/delete_room/' . $room->id);
?>
" class="button">Delete</a>
</div>
开发者ID:chloereimer,项目名称:sleepy-me-hotel,代码行数:31,代码来源:show_room.php
示例8: uploads_url
<img src="<?php
echo uploads_url() . $selected_image->file_name;
?>
" alt="Yet another banana picture" class="img-responsive banana">
<div class="comments">
<p class="text-center">
<a class="btn btn-default" href="<?php
echo uploads_url() . $selected_image->file_name;
?>
" title="Full size picture"><span class="glyphicon glyphicon-zoom-in" aria-hidden="true"></span> Open full size</a>
</p>
<?php
if ($selected_image->description) {
?>
<h3>Description: </h3>
<div class="panel panel-default">
<div class="panel-body">
<?php
echo $selected_image->description;
?>
</div>
<div class="panel-footer">
<span class="glyphicon glyphicon-user" aria-hidden="true"></span> Uploader
<span class="glyphicon glyphicon-time" aria-hidden="true"></span> <?php
echo $selected_image->timestamp;
?>
</div>
开发者ID:krkv,项目名称:bananagram,代码行数:31,代码来源:view_one.php
示例9: get_image_real_size
function get_image_real_size($image)
{
$filepath = uploads_url() . $image;
if (file_exists($filepath)) {
return list($width, $height) = getimagesize($filepath);
}
return false;
}
开发者ID:rinodung,项目名称:opencart-15x-flat-admin,代码行数:8,代码来源:revslideropencart_loader.php
示例10: wp_get_attachment_image_src
function wp_get_attachment_image_src($attach_id, $size = 'thumbnail', $args = array())
{
$wpdb = rev_db_class::rev_db_instance();
$tablename = $wpdb->prefix . GlobalsRevSlider::TABLE_ATTACHMENT_IMAGES;
$filename = $wpdb->get_var("SELECT file_name FROM {$tablename} WHERE ID={$attach_id}");
if (!empty($filename)) {
$filerealname = substr($filename, 0, strrpos($filename, '.'));
$fileext = substr($filename, strrpos($filename, '.'), strlen($filename) - strlen($filerealname));
$newfilename = $filerealname;
if (gettype($size) == 'string') {
switch ($size) {
case "thumbnail":
$px = GlobalsRevSlider::IMAGE_SIZE_THUMBNAIL;
$newfilename .= "-{$px}x{$px}";
break;
case "medium":
$px = GlobalsRevSlider::IMAGE_SIZE_MEDIUM;
$newfilename .= "-{$px}x{$px}";
break;
case "large":
$px = GlobalsRevSlider::IMAGE_SIZE_LARGE;
$newfilename .= "-{$px}x{$px}";
break;
default:
break;
}
$newfilename .= $fileext;
$imagesize = get_image_real_size($newfilename);
return array(uploads_url($newfilename), $imagesize[0], $imagesize[1]);
// return array(rev_media_url($newfilename),$imagesize[0],$imagesize[1]);
}
}
return false;
}
开发者ID:evgrishin,项目名称:se1614,代码行数:34,代码来源:revprestashoploader.php
示例11: upload_photo
public function upload_photo($config = array())
{
$config = array('upload_path' => uploads_url($this->data['controller']), 'file_name' => strtotime(date('Y-m-d H:i')), 'allowed_types' => 'gif|jpg|jpeg|png', 'max_size' => '500KB', 'max_width' => '3000', 'max_height' => '3000');
return $this->load->library('upload', $config);
}
开发者ID:dedetrisnandar,项目名称:simonro,代码行数:5,代码来源:MY_Controller.php
示例12: foreach
<section class="content">
<h1 class="page-title">Rooms & Rates</h1>
<?php
foreach ($rooms as $room) {
?>
<article class="room">
<img src="<?php
echo uploads_url($room['image']);
?>
" class="featured-image" />
<div class="info">
<h1 class="number_name" >
<span class="number">Room <?php
echo $room['number'];
?>
</span>
<span><?php
echo $room['name'];
?>
</span>
</h1>
<div class="rate"><?php
echo money_format('%=i.2n/night', $room['rate']);
?>
</div>
开发者ID:chloereimer,项目名称:sleepy-me-hotel,代码行数:30,代码来源:rooms.php
示例13: uploads_url
</div>
</div>
<div class="form-group">
<label class="col-md-3 col-xs-12 control-label">Logo</label>
<div class="col-md-6 col-xs-12">
<?php
if ($details->logo != '') {
?>
<img src="<?php
echo uploads_url() . 'vendors/logos/' . $details->logo;
?>
" width="300" height="160" />
<?php
} else {
?>
<b>No logo added</b>
<?php
}
?>
</div>
</div>
</div>
</div>
开发者ID:nitishdola,项目名称:99fest,代码行数:30,代码来源:profile.php
示例14: get_avatar
public function get_avatar($user)
{
if (!empty($user)) {
$user_folder = uploads_url($user);
$avatar_png = $user_folder . 'avatar.png';
$avatar_jpg = $user_folder . 'avatar.jpg';
$avatar_jpeg = $user_folder . 'avatar.jpeg';
if (file_exists($avatar_png)) {
return $avatar_png;
} elseif (file_exists($avatar_jpg)) {
return $avatar_jpg;
} elseif (file_exists($avatar_jpeg)) {
return $avatar_jpeg;
} else {
return uploads_url($user) . 'avatar.jpg';
}
} else {
return uploads_url() . 'avatar.jpg';
}
}
开发者ID:usmananwer1209,项目名称:usman-dev,代码行数:20,代码来源:users_model.php
示例15: get_uploaded_files_markup
public static function get_uploaded_files_markup($results = array())
{
$lan_iso = Context::getcontext()->language->iso_code;
include_once _PS_ROOT_DIR_ . '/modules/revsliderprestashop/views/config/config.php';
// include_once(_PS_ROOT_DIR_.'/modules/revsliderprestashop/views/lang/'.$lan_iso.'.php');
include_once _PS_ROOT_DIR_ . '/modules/revsliderprestashop/views/include/utils.php';
$upload_dir = __PS_BASE_URI__ . 'modules/revsliderprestashop/uploads/';
$current_path = _PS_ROOT_DIR_ . '/modules/revsliderprestashop/uploads/';
$url = uploads_url();
ob_start();
if (!empty($results)) {
?>
<div id="divImageList" > <ul id="selectable" class="">
<?php
$num = 0;
foreach ($results as $id => $filename) {
//$img = $results[$num];
$thumbsize = GlobalsRevSlider::IMAGE_SIZE_THUMBNAIL;
$mediumsize = GlobalsRevSlider::IMAGE_SIZE_MEDIUM;
$largesize = GlobalsRevSlider::IMAGE_SIZE_LARGE;
$filerealname = substr($filename, 0, strrpos($filename, '.'));
$fileext = substr($filename, strrpos($filename, '.'), strlen($filename) - strlen($filerealname));
$thumbimg = $img = "{$filerealname}-{$thumbsize}x{$thumbsize}{$fileext}";
$mediumimg = "{$filerealname}-{$mediumsize}x{$mediumsize}{$fileext}";
$largeimg = "{$filerealname}-{$largesize}x{$largesize}{$fileext}";
$file_path = $file_path = $current_path . $largeimg;
$date = filemtime($file_path);
$size = filesize($file_path);
// $file_ext = substr(strrchr($file, '.'), 1);
$file_infos = pathinfo($file_path);
$file_ext = $file_infos['extension'];
// $sorted[$k] = array('file' => $file, 'date' => $date, 'size' => $size, 'extension' => $file_ext);
$extension_lower = fix_strtolower($file_ext);
$is_img = true;
list($img_width, $img_height, $img_type, $attr) = getimagesize($file_path);
// if (++$num % 4 === 1):
?>
<li data-image="<?php
echo $filename;
?>
" data-large="<?php
echo $upload_dir . $img;
?>
" data-medium="<?php
echo $upload_dir . $img;
?>
" data-thumb="<?php
echo $upload_dir . $img;
?>
" class="ff-item-type-2 file">
<figure data-type="img" data-name="1117858_1577750_graph-1024x1024.png">
<a data-function="apply" data-field_id="" data-file="<?php
echo $upload_dir . $img;
?>
" class="link" href="javascript:void('')">
<div class="img-precontainer">
<div class="img-container">
<span></span>
<img alt="<?php
echo $img;
?>
" src="<?php
echo $upload_dir . $img;
?>
" class="original " >
</div>
</div>
<div class="img-precontainer-mini original-thumb">
<div class="filetype png hide">png</div>
<div class="img-container-mini">
<span></span>
<img src="<?php
echo $upload_dir . $img;
?>
" class=" " alt="<?php
echo $img;
?>
thumbnails">
</div>
</div>
</a>
<div class="box">
<h4 class="ellipsis">
<a data-function="apply" data-field_id="" data-file="<?php
echo $img;
?>
" class="link" href="javascript:void('')">
<?php
echo $img;
?>
</a></h4>
</div>
<?php
$date = filemtime($current_path . $img);
?>
<input type="hidden" class="date" value="<?php
echo $date;
?>
"/>
<input type="hidden" class="size" value="<?php
//.........这里部分代码省略.........
开发者ID:evgrishin,项目名称:se1614,代码行数:101,代码来源:base_admin.class.php
示例16: isset
?>
</p></div>
<div class="col s1"><p id="pontuacao_producao_<?php
echo $producao['id_producao'];
?>
" class="truncate"><?php
echo $producao['pontuacao_producao'];
?>
</p></div>
<div class="col s1">
<p id="documento_producao_<?php
echo $producao['id_producao'];
?>
" class="truncate">
<?php
echo isset($producao['documento_producao']) ? '<a target="_blank" href="' . uploads_url() . '/' . $producao['documento_producao'] . '">Comprovante</a>' : 'Pendente';
?>
</p>
</div>
</div>
<div class="collapsible-body col s12 blue lighten-5">
<form id="<?php
echo $formid;
?>
" class="editProducao">
<div class="input-field col s12" style="margin-top: 3em;">
<input id="nome_producao" name="nome_producao" type="text" value="<?php
echo $producao['nome_producao'];
?>
" class="autoupdate-producao validate">
<label for="nome_producao">Alias</label>
开发者ID:sidneyaraujomelo,项目名称:sigprog,代码行数:31,代码来源:pendent.php
示例17: process
public function process($url, $width = null, $height = null, $crop = null, $single = true, $upscale = false)
{
if (!$url || !$width && !$height) {
return false;
}
$upload_dir = UniteFunctionsWPRev::getUrlUploads();
$upload_url = uploads_url();
$http_prefix = "http://";
$https_prefix = "https://";
if (!strncmp($url, $https_prefix, strlen($https_prefix))) {
$upload_url = str_replace($http_prefix, $https_prefix, $upload_url);
} elseif (!strncmp($url, $http_prefix, strlen($http_prefix))) {
$upload_url = str_replace($https_prefix, $http_prefix, $upload_url);
}
if (false === strpos($url, $upload_url)) {
return false;
}
$rel_path = str_replace($upload_url, '', $url);
$img_path = $upload_dir . $rel_path;
if (!file_exists($img_path) or !getimagesize($img_path)) {
return false;
}
$info = pathinfo($img_path);
$ext = $info['extension'];
list($orig_w, $orig_h) = getimagesize($img_path);
$dims = image_resize_dimensions($orig_w, $orig_h, $width, $height, $crop);
$dst_w = $dims[4];
$dst_h = $dims[5];
if (!$dims && (null === $height && $orig_w == $width xor null === $width && $orig_h == $height xor $height == $orig_h && $width == $orig_w)) {
$img_url = $url;
$dst_w = $orig_w;
$dst_h = $orig_h;
} else {
$suffix = "{$dst_w}x{$dst_h}";
$dst_rel_path = str_replace('.' . $ext, '', $rel_path);
$destfilename = "{$upload_dir}{$dst_rel_path}-{$suffix}.{$ext}";
if (!$dims || true == $crop && false == $upscale && ($dst_w < $width || $dst_h < $height)) {
return false;
} elseif (file_exists($destfilename) && getimagesize($destfilename)) {
$img_url = "{$upload_url}{$dst_rel_path}-{$suffix}.{$ext}";
} else {
$editor = wp_get_image_editor($img_path);
if (is_wp_error($editor) || is_wp_error($editor->resize($width, $height, $crop))) {
return false;
}
$resized_file = $editor->save();
if (!is_wp_error($resized_file)) {
$resized_rel_path = str_replace($upload_dir, '', $resized_file['path']);
$img_url = $upload_url . $resized_rel_path;
} else {
return false;
}
}
}
if (true === $upscale) {
remove_filter('image_resize_dimensions', array($this, 'aq_upscale'));
}
if ($single) {
$image = $img_url;
} else {
$image = array(0 => $img_url, 1 => $dst_w, 2 => $dst_h);
}
return $image;
}
开发者ID:evgrishin,项目名称:se1614,代码行数:64,代码来源:aq_resizer.class.php
示例18: define
include_once 'config/config.php';
$iso = '';
if (!defined('ABSPATH')) {
define('ABSPATH', dirname(__FILE__));
}
$up_media_url = _MODULE_DIR_ . "revsliderprestashop/views/";
$plugins_url = _MODULE_DIR_ . "revsliderprestashop/";
/*
$views_urls = admin_url('?view=dialog');
$upload_urls = admin_url('?view=upload');*/
$views_urls = controller_upload_url('&view=dialog');
$upload_urls = controller_upload_url('&view=upload');
$ajax_calls_url = $up_media_url . "ajax_calls.php";
$hash = Tools::encrypt(GlobalsRevSlider::MODULE_NAME);
$tablename = _DB_PREFIX_ . 'revslider_attachment_images';
$url = uploads_url();
// $db_results = Db::getInstance()->executeS("SELECT * FROM {$tablename}");
$results = array();
// foreach($db_results as $dres){
// $results[$dres['ID']] = $dres['file_name'];
// }
$results = UniteBaseAdminClassRev::get_uploaded_files_result();
$_SESSION["verify"] = "RESPONSIVEfilemanager";
if (isset($_POST['submit'])) {
include $upload_urls;
} else {
include 'include/utils.php';
if (isset($_GET['fldr']) && !empty($_GET['fldr']) && preg_match('/\\.{1,2}[\\/|\\\\]/', urldecode($_GET['fldr'])) === 0) {
$subdir = urldecode(trim($_GET['fldr'], '/') . '/');
} else {
$subdir = '';
开发者ID:evgrishin,项目名称:se1614,代码行数:31,代码来源:dialog.php
示例19: import_media
public static function import_media($file_url)
{
$folder = uploads_url();
$file_urls = explode('#', $file_url);
$randnum = rand(00, 9999999);
$filename = basename($file_urls[1]);
$filename = "{$randnum}_{$filename}";
if ($fp = fopen($file_url, "r")) {
fclose($fp);
return self::import_media_img($file_url, $folder, $filename);
}
return false;
}
开发者ID:rinodung,项目名称:opencart-15x-flat-admin,代码行数:13,代码来源:functions_wordpress.class.php
示例20: uploads_url
<img src="<?php
echo uploads_url() . 'vendors/logos/' . $details->logo;
?>
" width="300" height="160" />
</div>
</div>
<span class="help-block"></span>
</div>
<div class="form-group">
<label class="col-md-3 col-xs-12 control-label">Featured Image</label>
<div class="col-md-6 col-xs-12">
<img src="<?php
echo uploads_url() . 'vendors/images/' . $details->featured_img;
?>
" width="300" height="160" />
</div>
</div>
<span class="help-block"></span>
</div>
<!--
<div class="form-group">
<label class="col-md-3 col-xs-12 control-label">Checkbox</label>
<div class="col-md-6 col-xs-12">
<label class="check"><input type="checkbox" class="icheckbox" checked="checked"/> Checkbox title</label>
开发者ID:nitishdola,项目名称:99fest,代码行数:30,代码来源:viewdetails.php
注:本文中的uploads_url函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论