当前位置: 首页>>代码示例>>PHP>>正文


PHP uploads_url函数代码示例

本文整理汇总了PHP中uploads_url函数的典型用法代码示例。如果您正苦于以下问题:PHP uploads_url函数的具体用法?PHP uploads_url怎么用?PHP uploads_url使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了uploads_url函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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 &copy; 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


注:本文中的uploads_url函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。