Ejemplo n.º 1
0
 function imagebox_headers()
 {
     $ci =& get_instance();
     if ($ci->config->item('imagebox_headers') !== TRUE) {
         $url = 'application/modules/imagebox/templates/js/lightbox/';
         $result = '<link rel="stylesheet" href="' . media_url($url . 'css/lightbox.css') . '" type="text/css" media="screen" />
         <script type="text/javascript" src="' . media_url($url . 'js/prototype.lite.js') . '"></script>
         <script type="text/javascript" src="' . media_url($url . 'js/moo.fx.js') . '"></script>
         <script type="text/javascript" src="' . media_url($url . 'js/litebox-1.0.js') . '"></script>
         <script type="text/javascript">
            window.onload = initLightbox; 
         </script>
         ';
         $ci->config->set_item('imagebox_headers', TRUE);
         return $result;
     }
 }
Ejemplo n.º 2
0
 public function latest_fotos($widget = array())
 {
     $this->load->helper('gallery');
     $this->load->model('gallery_m');
     if ($widget['settings']['order'] == 'latest') {
         $images = gallery_latest_images($widget['settings']['limit']);
     } else {
         $images = gallery_latest_images($widget['settings']['limit'], 'random');
     }
     if (!empty($images)) {
         for ($i = 0; $i < count($images); $i++) {
             $images[$i]['thumb_path'] = media_url('uploads/gallery/' . $images[$i]['album_id'] . '/_thumbs/' . $images[$i]['file_name'] . $images[$i]['file_ext']);
         }
     }
     $this->template->add_array(array('images' => $images));
     return $this->template->fetch('widgets/' . $widget['name'], $data);
 }
Ejemplo n.º 3
0
                </div>

                <div id="custom_notifications" class="custom-notifications dsp_none">
                    <ul class="list-unstyled notifications clearfix" data-tabbed_notifications="notif-group">
                    </ul>
                    <div class="clearfix"></div>
                    <div id="notif-group" class="tabbed_notifications"></div>
                </div>

                <script src="<?php 
echo media_url();
?>
/js/bootstrap.min.js"></script>
                <script src="<?php 
echo media_url();
?>
/js/jquery-ui.min.js"></script>

                <script src="<?php 
echo media_url();
?>
/js/custom.js"></script>
                <script src="<?php 
echo media_url();
?>
/js/jquery.nicescroll.min.js"></script>


            </body>

            </html>
Ejemplo n.º 4
0
 /**
  * Returns an XML valid attachment HTML string that handles missing thumbnail URLs.
  *
  * @param  \App\Board  $board  The board this thumbnail will belong to.
  * @param  int  $maxWidth  Optional. Maximum width constraint. Defaults null.
  * @return string  as HTML
  */
 public function getThumbnailHTML(Board $board, $maxDimension = null)
 {
     $ext = $this->guessExtension();
     $mime = $this->mime;
     $url = media_url("static/img/filetypes/{$ext}.svg", false);
     $spoil = $this->isSpoiler();
     $deleted = $this->isDeleted();
     $md5 = $deleted ? null : $this->hash;
     if ($deleted) {
         $url = $board->getAssetUrl('file_deleted');
     } else {
         if ($spoil) {
             $url = $board->getAssetUrl('file_spoiler');
         } else {
             if ($this->isImageVector()) {
                 $url = $this->getDownloadURL($board);
             } else {
                 if ($this->isAudio() || $this->isImage() || $this->isVideo() || $this->isDocument()) {
                     if ($this->hasThumb()) {
                         $url = $this->getThumbnailURL($board);
                     } else {
                         if ($this->isAudio()) {
                             $url = media_url("static/img/assets/audio.gif", false);
                         }
                     }
                 }
             }
         }
     }
     $classHTML = $this->getThumbnailClasses();
     // Measure dimensions.
     $height = "auto";
     $width = "auto";
     $maxWidth = "none";
     $maxHeight = "none";
     $minWidth = "none";
     $minHeight = "none";
     $oHeight = $this->thumbnail_height;
     $oWidth = $this->thumbnail_width;
     if ($this->has_thumbnail && !$this->isSpoiler() && !$this->isDeleted()) {
         $height = $oHeight . "px";
         $width = $this->thumbnail_width . "px";
         if (is_integer($maxDimension) && ($oWidth > $maxDimension || $oHeight > $maxDimension)) {
             if ($oWidth > $oHeight) {
                 $height = "auto";
                 $width = $maxDimension . "px";
             } else {
                 if ($oWidth < $oHeight) {
                     $height = $maxDimension . "px";
                     $width = "auto";
                 } else {
                     $height = $maxDimension;
                     $width = $maxDimension;
                 }
             }
         }
         $minWidth = $width;
         $minHeight = $height;
     } else {
         $maxWidth = Settings::get('attachmentThumbnailSize') . "px";
         $maxHeight = $maxWidth;
         $width = $maxWidth;
         $height = "auto";
         if (is_integer($maxDimension)) {
             $maxWidth = "{$maxDimension}px";
             $maxHeight = "{$maxDimension}px";
         }
         if ($this->isSpoiler() || $this->isDeleted()) {
             $minHeight = "none";
             $minWidth = "none";
             $width = $maxWidth;
         }
     }
     return "<div class=\"attachment-wrapper\" style=\"height: {$height}; width: {$width};\">" . "<img class=\"attachment-img {$classHTML}\" src=\"{$url}\" data-mime=\"{$mime}\" data-md5=\"{$md5}\" style=\"height: {$height}; width: {$width};\"/>" . "</div>";
 }
Ejemplo n.º 5
0
                                                        <br/>
                                                    </div>
                                                <?php 
            }
            ?>
                                            </div>
                                        <?php 
        } else {
            ?>
                                            <div class="img-album">
                                                <a href="<?php 
            echo site_url('/admin/media_manager/album/' . $image['id']);
            ?>
">
                                                    <img src="<?php 
            echo media_url('image/icon-album.png') . '?' . uniqid();
            ?>
" width="128px" >
                                                    <div class="info_album">
                                                        <div class="info_name"><?php 
            echo $image['label'];
            ?>
</div>
                                                        <div><?php 
            echo $image['count'];
            ?>
 images</div>
                                                    </div>
                                                </a>
                                            </div>
                                        <?php 
Ejemplo n.º 6
0
 public function registerJsFile($url, $position = 'before')
 {
     $position = $this->_check_postion($position);
     $this->_js_files[media_url($url)] = $position;
 }
Ejemplo n.º 7
0
 /**
  * Returns either the URL for an asset or their default item.
  *
  * @param  string  asset name
  * @return string  url
  */
 public function getAssetURL($asset)
 {
     $assetObj = $this->assets->where('asset_type', $asset)->first();
     if ($assetObj) {
         return $assetObj->getURL();
     }
     switch ($asset) {
         case "board_icon":
             return media_url("static/img/assets/Favicon_" . ($this->isWorksafe() ? "Burichan" : "Yotsuba") . ".ico", false);
         case "file_spoiler":
             return media_url("static/img/assets/spoiler.png", false);
         case "file_deleted":
             return media_url("static/img/assets/deleted.png", false);
     }
     return media_url("static/img/errors/404.jpg", false);
 }
Ejemplo n.º 8
0
 function create_albums_covers($albums = array())
 {
     $cnt = count($albums);
     for ($i = 0; $i < $cnt; $i++) {
         $thumb_url = $this->conf['upload_url'] . $albums[$i]['id'] . '/' . $this->conf['thumbs_folder'] . '/';
         $albums[$i]['cover_url'] = media_url($thumb_url . $albums[$i]['cover_name'] . $albums[$i]['cover_ext']);
         if ($albums[$i]['cover_name'] == NULL) {
             $image = $this->gallery_m->get_last_image($albums[$i]['id']);
             $albums[$i]['cover_url'] = media_url($thumb_url . $image['file_name'] . $image['file_ext']);
         } else {
             $albums[$i]['cover_url'] = media_url($thumb_url . $albums[$i]['cover_name'] . $albums[$i]['cover_ext']);
         }
     }
     return $albums;
 }
 function captcha()
 {
     $this->ci->load->helper('dx_captcha');
     // Load library SESSION
     $vals = array('img_path' => $this->ci->config->item('DX_captcha_path'), 'img_url' => media_url() . 'captcha/', 'font_path' => $this->ci->config->item('DX_captcha_fonts_path'), 'font_size' => $this->ci->config->item('DX_captcha_font_size'), 'img_width' => $this->ci->config->item('DX_captcha_width'), 'img_height' => $this->ci->config->item('DX_captcha_height'), 'show_grid' => $this->ci->config->item('DX_captcha_grid'), 'expiration' => $this->ci->config->item('DX_captcha_expire'));
     $cap = create_captcha($vals);
     $store = array('captcha_word' => $cap['word'], 'captcha_time' => $cap['time']);
     // Plain, simple but effective
     $this->ci->session->set_flashdata($store);
     // Set our captcha
     $this->_captcha_image = $cap['image'];
 }
Ejemplo n.º 10
0
 /**
  * Display category albums
  */
 public function category($id)
 {
     $albums = $this->gallery_m->get_albums('position', 'asc', $id);
     if ($albums != FALSE) {
         $cnt = count($albums);
         for ($i = 0; $i < $cnt; $i++) {
             // Create url to album cover
             $albums[$i]['cover_url'] = media_url($upload_url . $albums[$i]['id'] . '/' . $albums[$i]['cover_name'] . $albums[$i]['cover_ext']);
             $upload_url = $this->conf['upload_url'];
             if ($albums[$i]['cover_name'] == NULL) {
                 $image = $this->gallery_m->get_last_image($albums[$i]['id']);
                 if ($image != FALSE) {
                     $albums[$i]['cover_url'] = media_url($upload_url . $albums[$i]['id'] . '/' . $image['file_name'] . $image['file_ext']);
                 } else {
                     $albums[$i]['cover_url'] = 'empty';
                 }
             } else {
                 $albums[$i]['cover_url'] = media_url($upload_url . $albums[$i]['id'] . '/' . $albums[$i]['cover_name'] . $albums[$i]['cover_ext']);
             }
         }
         $this->template->add_array(array('albums' => $albums));
     }
     $this->template->add_array(array('category' => $this->gallery_m->get_category($id)));
     $this->display_tpl('album_list');
 }
Ejemplo n.º 11
0
 function captcha()
 {
     $this->ci->load->helper('dx_captcha');
     // Load library SESSION
     //        var_dumps_exit($this->ci->input->is_ajax_request());
     if ($this->ci->uri->segment(1) == 'feedback') {
         $this->ci->load->library('session');
     }
     $vals = array('img_path' => $this->ci->config->item('DX_captcha_path'), 'img_url' => media_url() . 'captcha/', 'font_path' => $this->ci->config->item('DX_captcha_fonts_path'), 'font_size' => $this->ci->config->item('DX_captcha_font_size'), 'img_width' => $this->ci->config->item('DX_captcha_width'), 'img_height' => $this->ci->config->item('DX_captcha_height'), 'show_grid' => $this->ci->config->item('DX_captcha_grid'), 'expiration' => $this->ci->config->item('DX_captcha_expire'));
     $cap = create_captcha($vals);
     $store = array('captcha_word' => $cap['word'], 'captcha_time' => $cap['time']);
     // Plain, simple but effective
     $this->ci->session->set_flashdata($store);
     // Set our captcha
     $this->_captcha_image = $cap['image'];
 }
Ejemplo n.º 12
0
                    </div>
                    <div id="collapseTwo" class="panel-collapse collapse in">
                        <div class="panel-body">
                            <div class="field-row row-fluid">
                                <div class="col-md-4">
                                    <?php 
echo form_label(__('Avatar', true), 'avator');
?>
                                </div>
                                <div class="col-md-8">

                                    <?php 
$avatar = isset($user->avatar) ? $user->avatar : 'media/users/avatar.png';
?>
                                    <img src="<?php 
echo media_url($avatar);
?>
" width="32" height="32" alt=".." class="pull-left img-circle"/> 
                                    <?php 
echo form_upload(array('name' => 'avatar', 'id' => 'profileAvatar'));
?>
                                    <span class="clearfix"></span>

                                </div>
                                <div class="clearfix"></div>
                            </div>
                            <br />
                            <div class="field-row row-fluid">
                                <div class="col-md-4">
                                    <?php 
echo form_label(__('Address', true), 'address');
Ejemplo n.º 13
0
<!DOCTYPE html>
<html>
<head>
  <title><?php 
echo $par['par_employe_name'];
?>
</title> 
  <link rel="icon" href="<?php 
echo media_url('ico/a.png');
?>
" type="image/x-icon">
  <style type="text/css">
   .upper { text-transform: uppercase; }
   .lower { text-transform: lowercase; }
   .cap   { text-transform: capitalize; }
   .small { font-variant:   small-caps; }
 </style>
 <style type="text/css">
  @page {
    margin-top: 0.4cm;
    margin-bottom: 0.1em;
    margin-left: 0.5cm;
    margin-right: 0.3cm;
  }
  body {
    font-family: sans-serif;
  }
  table {
    border-collapse: collapse;
  }