/** * Defines the base template details object * * Templates should extend this object and customise to their own needs * * @param none * @return stdClass * **/ protected static function _details() { $_d = new stdClass(); $_d->iam = get_called_class(); $_reflect = new ReflectionClass($_d->iam); // The human friendly name of this template $_d->label = 'Widget'; // A brief description of the template, optional $_d->description = ''; // Any additional fields to request // TODO: use the form builder library $_d->additional_fields = array(); // Empty manual_config object $_d->manual_config = ''; // An icon/preview to render $_d->img = new stdClass(); $_d->img->icon = ''; // Try to detect the icon $_extensions = array('png', 'jpg', 'jpeg', 'gif'); $_path = $_reflect->getFileName(); $_path = dirname($_path); foreach ($_extensions as $ext) { $_icon = $_path . '/icon.' . $ext; if (is_file($_icon)) { $_url = ''; if (preg_match('#^' . preg_quote(NAILS_PATH, '#') . '#', $_icon)) { // Nails asset $_d->img->icon = preg_replace('#^' . preg_quote(NAILS_PATH, '#') . '#', NAILS_URL, $_icon); } elseif (preg_match('#^' . preg_quote(FCPATH . APPPATH, '#') . '#', $_icon)) { if (page_is_secure()) { $_d->img->icon = preg_replace('#^' . preg_quote(FCPATH . APPPATH, '#') . '#', SECURE_BASE_URL . APPPATH . '', $_icon); } else { $_d->img->icon = preg_replace('#^' . preg_quote(FCPATH . APPPATH, '#') . '#', BASE_URL . APPPATH . '', $_icon); } } break; } } // an array of the widget-able areas $_d->widget_areas = array(); // -------------------------------------------------------------------------- // Automatically calculated properties $_d->slug = ''; // -------------------------------------------------------------------------- // Work out slug - this should uniquely identify a type of template $_d->slug = $_reflect->getFileName(); $_d->slug = pathinfo($_d->slug); $_d->slug = explode('/', $_d->slug['dirname']); $_d->slug = array_pop($_d->slug); // -------------------------------------------------------------------------- // Define any assets need to be loaded by the template $_d->assets_editor = array(); $_d->assets_render = array(); // -------------------------------------------------------------------------- // Path $_d->path = dirname($_reflect->getFileName()) . '/'; // -------------------------------------------------------------------------- // Return the D return $_d; }
public function __construct() { parent::__construct(); // -------------------------------------------------------------------------- $this->_available = NULL; $this->_module_extension = '-shop-shipping'; // Module locations // This must be an array with 2 indexes: // `path` => The absolute path to the directory containing the modules (required) // `url` => The URL to access the modules (required) $this->_module_locations = array(); // Nails modules $this->_module_locations[] = array('path' => NAILS_PATH . 'modules/shop/shipping', 'url' => NAILS_URL . 'modules/shop/shipping'); // 'Official' modules $this->_module_locations[] = array('path' => FCPATH . 'vendor/nailsapp', 'url' => site_url('vendor/nailsapp', page_is_secure())); // App Modules $this->_module_locations[] = array('path' => FCPATH . APPPATH . 'modules/shop/shipping', 'url' => site_url(APPPATH . 'modules/shop/shipping', page_is_secure())); }
public function __construct() { parent::__construct(); // -------------------------------------------------------------------------- $this->_available = NULL; $this->_skin_prefix = 'skin-shop-'; // Skin locations // The model will search these directories for skins; to add more directories extend this // This must be an array with 2 indexes: // `path` => The absolute path to the directory containing the skins (required) // `url` => The URL to access the skins (required) // `regex` => If the directory doesn't only contain skins then specify a regex to filter by if (empty($this->_skin_locations)) { $this->_skin_locations = array(); } // 'Official' skins $this->_skin_locations[] = array('path' => FCPATH . 'vendor/nailsapp', 'url' => site_url('vendor/nailsapp', page_is_secure()), 'regex' => '/^skin-shop-(.*)$/'); // App Skins $this->_skin_locations[] = array('path' => FCPATH . APPPATH . 'modules/shop/skins', 'url' => site_url(APPPATH . 'modules/shop/skins', page_is_secure())); }
public function site_url($uri = '', $force_secure = FALSE) { // Prepare the URI as normal $_uri = parent::site_url($uri); // -------------------------------------------------------------------------- // If forcing secure just return now if ($force_secure) { return preg_replace('#^' . BASE_URL . '#', SECURE_BASE_URL, $_uri); } // -------------------------------------------------------------------------- // If SSL routing is enabled then parse the URL if (APP_SSL_ROUTING) { $_prefix = 'https://'; $this->load('routes_ssl'); // -------------------------------------------------------------------------- // Fetch SSL routes if (!$this->routes_ssl) { $this->routes_ssl = $this->item('routes_ssl'); if (!$this->routes_ssl) { $this->routes_ssl = array(); } } // -------------------------------------------------------------------------- // Analyse target URL, if it matches a route then change it to be an https URL $_is_secure_route = FALSE; foreach ($this->routes_ssl as $route) { // Swap out the pseudo regex's $route = str_replace(':any', '.*', $route); $route = str_replace(':num', '[0-9]*', $route); // See if any of the routes match, if they do halt the loop. // We need to do an optional prefix for the hosts if (BASE_URL !== SECURE_BASE_URL) { $_pattern = '#^(' . preg_quote(BASE_URL, '#') . '|' . preg_quote(SECURE_BASE_URL, '#') . ')?' . $route . '#'; } else { $_pattern = '#^(' . preg_quote(BASE_URL, '#') . ')?' . $route . '#'; } if (preg_match($_pattern, $_uri)) { $_is_secure_route = TRUE; break; } } // -------------------------------------------------------------------------- // If there was a match replace http:// with https://; also replace any // calls for anything to the assets folder or the favicon (so secure content // is shown). // HTTPS is considered on if the domain matches that given in SECURE_BASE_URL // or if the page is being served through HTTPS if (isset($_SERVER)) { $_page_is_secure = page_is_secure(); if ($_is_secure_route || $_page_is_secure && preg_match('#^' . BASE_URL . 'assets.*#', $_uri) || $_page_is_secure && preg_match('#^' . NAILS_ASSETS_URL . '.*#', $_uri) || $_page_is_secure && preg_match('#^' . BASE_URL . 'favicon\\.ico#', $_uri)) { // SSL is off and there was a match, turn SSL on $_uri = preg_replace('#^' . BASE_URL . '#', SECURE_BASE_URL, $_uri); } } } // -------------------------------------------------------------------------- // Spit back our result return $_uri; }
<small><?php echo lang('email_index_subject', $email->subject); ?> </small> </td> <td class="reads"><?php echo $email->read_count; ?> </td> <td class="clicks"><?php echo $email->link_click_count; ?> </td> <td class="actions"> <?php echo anchor(site_url('email/view_online/' . $email->ref, page_is_secure()), lang('action_preview'), 'class="awesome small fancybox fancybox.iframe" target="_blank"'); ?> </td> </tr> <?php } } else { ?> <tr> <td class="no-data" colspan="9"><?php echo lang('email_index_noemail'); ?> </td> </tr> <?php }
$_uri .= $_query ? '?' . http_build_query($_query) : ''; echo anchor($_uri, 'Thumbnails', 'class="thumbnail ' . $_selected . '"'); // -------------------------------------------------------------------------- // Item is selected? $_selected = $_filter_view == 'list' ? 'selected' : ''; // Build the URI for this item $_query['filter-view'] = 'list'; $_uri = site_url(uri_string(), page_is_secure()); $_uri .= $_query ? '?' . http_build_query($_query) : ''; echo anchor($_uri, 'List', 'class="list ' . $_selected . '"'); // -------------------------------------------------------------------------- // Item is selected? $_selected = $_filter_view == 'detail' ? 'selected' : ''; // Build the URI for this item $_query['filter-view'] = 'detail'; $_uri = site_url(uri_string(), page_is_secure()); $_uri .= $_query ? '?' . http_build_query($_query) : ''; echo anchor($_uri, 'Details', 'class="detail ' . $_selected . '"'); ?> </span> </li> <li class="progress"> uploading › <span class="track"> <span class="bar" style="width:75%;"></span> </span> </li> <li class="files"> <?php if ($bucket->objects) { if ($_filter_view == 'list') {
echo isset($page->title) ? $page->title . ' - ' : NULL; echo APP_NAME; ?> </title> <meta name="keywords" content="" /> <meta name="description" content="" /> <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" /> <!-- NAILS JS GLOBALS --> <script style="text/javascript"> window.ENVIRONMENT = '<?php echo ENVIRONMENT; ?> '; window.SITE_URL = '<?php echo site_url('', page_is_secure()); ?> '; window.NAILS = {}; window.NAILS.URL = '<?php echo NAILS_ASSETS_URL; ?> '; window.NAILS.LANG = {}; window.NAILS.USER = {}; window.NAILS.USER.ID = <?php echo active_user('id'); ?> ; window.NAILS.USER.FNAME = '<?php echo active_user('first_name');
function form_field_multiimage($field, $help = '') { // Set var defaults $_field_id = isset($field['id']) ? $field['id'] : NULL; $_field_type = isset($field['type']) ? $field['type'] : 'text'; $_field_oddeven = isset($field['oddeven']) ? $field['oddeven'] : NULL; $_field_key = isset($field['key']) ? $field['key'] : NULL; $_field_label = isset($field['label']) ? $field['label'] : NULL; $_field_default = isset($field['default']) ? $field['default'] : NULL; $_field_sub_label = isset($field['sub_label']) ? $field['sub_label'] : NULL; $_field_required = isset($field['required']) ? $field['required'] : FALSE; $_field_placeholder = isset($field['placeholder']) ? $field['placeholder'] : NULL; $_field_readonly = isset($field['readonly']) ? $field['readonly'] : FALSE; $_field_error = isset($field['error']) ? $field['error'] : FALSE; $_field_bucket = isset($field['bucket']) ? $field['bucket'] : FALSE; $_field_class = isset($field['class']) ? $field['class'] : FALSE; $_help = array(); $_help['src'] = is_array($help) && isset($help['src']) ? $help['src'] : NAILS_ASSETS_URL . 'img/form/help.png'; $_help['class'] = is_array($help) && isset($help['class']) ? $help['class'] : 'help'; $_help['rel'] = is_array($help) && isset($help['rel']) ? $help['rel'] : 'tipsy-left'; $_help['title'] = is_array($help) && isset($help['title']) ? $help['title'] : NULL; $_help['title'] = is_string($help) ? $help : $_help['title']; $_error = form_error($_field_key) || $_field_error ? 'error' : ''; $_error_class = $_error ? 'error' : ''; $_readonly = $_field_readonly ? 'readonly="readonly"' : ''; $_readonly_cls = $_field_readonly ? 'readonly' : ''; // -------------------------------------------------------------------------- // Generate a unique ID for this field $_id = 'field_multiimage_' . md5(microtime()); // -------------------------------------------------------------------------- // Sanitize the key $_field_key .= substr($_field_key, -2) != '[]' ? '[]' : ''; // -------------------------------------------------------------------------- // Is the label required? $_field_label .= $_field_required ? '*' : ''; // Prep sublabel $_field_sub_label = $_field_sub_label ? '<small>' . $_field_sub_label . '</small>' : ''; // -------------------------------------------------------------------------- // Set the defaults $_field_default = set_value($_field_key, $_field_default); $_default_html = ''; // Render any defaults if (is_array($_field_default)) { foreach ($_field_default as $file) { $_default_html .= '<li class="item">'; $_default_html .= '<a href="#" class="delete" data-object_id="' . $file . '"></a>'; $_default_html .= img(cdn_thumb($file, 92, 92)); $_default_html .= form_hidden($_field_key, $file); $_default_html .= '</li>'; } } // -------------------------------------------------------------------------- // Error if ($_error && $_field_error) { $_error = '<span class="error">' . $_field_error . '</span>'; } elseif ($_error) { $_error = form_error($_field_key, '<span class="error">', '</span>'); } // -------------------------------------------------------------------------- // Tip $_tip = $_help['title'] ? img($_help) : ''; $_filelist_class = $_help['title'] ? 'has-tip ' : ''; // -------------------------------------------------------------------------- // Quick script to instantiate the field, not indented due to heredoc syntax get_instance()->load->library('cdn'); $_movie_url = NAILS_ASSETS_URL . 'swf/jquery.uploadify/uploadify.swf'; $_upload_url = site_url('api/cdnapi/object_create/script.php', page_is_secure()); $_upload_token = get_instance()->cdn->generate_api_upload_token(); $_bucket = $_field_bucket; $_out = <<<EOT \t<div class="field multiimage {$_error_class} {$_field_oddeven} {$_readonly_cls} {$_field_type}" id="{$_id}"> \t\t<label> \t\t\t<span class="label"> \t\t\t\t{$_field_label} \t\t\t\t{$_field_sub_label} \t\t\t</span> \t\t\t<span class="input"> \t\t\t\t<p class="system-alert error" id="{$_id}-uploadify-not-available"> \t\t\t\t\t<strong>Configuration Error.</strong> Uploadify is not available. \t\t\t\t</p> \t\t\t\t<span id="{$_id}-uploadify-available" style="display:none;"> \t\t\t\t\t<ul id="{$_id}-filelist" class="filelist empty"> \t\t\t\t\t\t{$_default_html} \t\t\t\t\t\t<li class="empty">No Images, add some now.</li> \t\t\t\t\t</ul> \t\t\t\t\t<button id="{$_id}-uploadify">Choose Images</button> \t\t\t\t</span> \t\t\t\t{$_error} \t\t\t<span> \t\t</label> \t</div> \t<script type="text/template" id="{$_id}-template-uploadify"> \t\t<li class="item uploadify-queue-item" id="{$_id}-\${fileID}" data-instance_id="\${instanceID}" data-file_id="\${fileID}"> \t\t\t<a href="#" data-instance_id="\${instanceID}" data-file_id="\${fileID}" class="remove"></a> \t\t\t<div class="progress" style="height:0%"></div> \t\t\t<div class="data data-cancel">CANCELLED</div> \t\t</li> \t</script> \t<script type="text/template" id="{$_id}-template-item"> \t\t<li class="item crunching"> \t\t\t<div class="crunching"></div> \t\t\t<input type="hidden" name="{$_field_key}" /> \t\t</li> \t</script> \t<div id="{$_id}-dialog-confirm-delete" title="Confirm Delete" style="display:none;"> \t\t<p> \t\t\t<span class="ui-icon ui-icon-alert" style="float: left; margin: 0 7px 0 0;"></span> \t\t\tThis item will be removed from the interface and cannot be recovered. \t\t\t<strong>Are you sure?</strong> \t\t</p> \t</div> \t<script type="text/javascript"> \tif ( typeof( \$.fn.uploadify ) === 'function' ) \t{ \t\t\$( '#{$_id}-uploadify-not-available' ).hide(); \t\t\$( '#{$_id}-uploadify-available' ).show(); \t\t// -------------------------------------------------------------------------- \t\t\$( '#{$_id}-uploadify' ).uploadify( \t\t{ \t\t\t'debug': false, \t\t\t'auto': true, \t\t\t'swf': '{$_movie_url}', \t\t\t'buttonText':'Add Images', \t\t\t'uploader': '{$_upload_url}', \t\t\t'fileObjName': 'upload', \t\t\t'fileTypeExts': '*.gif; *.jpg; *.jpeg; *.png', \t\t\t'queueID': '{$_id}-filelist', \t\t\t'formData': \t\t\t{ \t\t\t\t'token': '{$_upload_token}', \t\t\t\t'bucket': '{$_bucket}', \t\t\t\t'return': 'URL|THUMB|92x92' \t\t\t}, \t\t\t'itemTemplate': \$('#{$_id}-template-uploadify').html(), \t\t\t'onSelect': function() \t\t\t{ \t\t\t\tif ( \$( '#{$_id}-filelist li' ).length ) \t\t\t\t{ \t\t\t\t\t\$('#{$_id}-filelist').removeClass( 'empty' ); \t\t\t\t} \t\t\t}, \t\t\t'onUploadStart': function() \t\t\t{ \t\t\t\twindow.onbeforeunload = function() \t\t\t\t{ \t\t\t\t\treturn 'Uploads are in progress. Leaving this page will cause them to stop.'; \t\t\t\t}; \t\t\t\t//\tDisable tabs - SWFUpload aborts uploads if it is hidden. \t\t\t\t\$('ul.tabs li a').addClass('disabled'); \t\t\t}, \t\t\t'onQueueComplete': function() \t\t\t{ \t\t\t\twindow.onbeforeunload = null; \t\t\t\t\$('ul.tabs li a').removeClass('disabled'); \t\t\t}, \t\t\t'onUploadProgress': function(file, bytesUploaded, bytesTotal) \t\t\t{ \t\t\t\tvar _percent = bytesUploaded / bytesTotal * 100; \t\t\t\t\$('#{$_id}-' + file.id + ' .progress').css('height', _percent + '%'); \t\t\t}, \t\t\t'onUploadSuccess': function(file, data) \t\t\t{ \t\t\t\tvar _data = JSON.parse(data); \t\t\t\t// -------------------------------------------------------------------------- \t\t\t\tvar _html = \$.trim(\$('#{$_id}-template-item').html()); \t\t\t\tvar _item = \$(\$.parseHTML(_html)); \t\t\t\t_item.attr('id', '{$_id}-' + file.id + '-complete'); \t\t\t\t\$('#{$_id}-' + file.id).replaceWith(_item); \t\t\t\t// -------------------------------------------------------------------------- \t\t\t\tvar _target = \$('#{$_id}-' + file.id + '-complete'); \t\t\t\tif (!_target.length) \t\t\t\t{ \t\t\t\t\t_html = \$.trim(\$('#{$_id}-template-item').html()); \t\t\t\t\t_item = \$(\$.parseHTML(_html)); \t\t\t\t\t_item.attr('id', '{$_id}-' + file.id + '-complete'); \t\t\t\t\t\$('#' + file.id).replaceWith(_item); \t\t\t\t\t_target = \$('#{$_id}-' + file.id + '-complete'); \t\t\t\t} \t\t\t\t// -------------------------------------------------------------------------- \t\t\t\t//\tSwitch the response code \t\t\t\tif (_data.status === 200) \t\t\t\t{ \t\t\t\t\t//\tInsert the image \t\t\t\t\tvar _img = \$('<img>').attr('src', _data.object_url[0]).on('load', function() { \t\t\t\t\t\t_target.removeClass('crunching'); \t\t\t\t\t}); \t\t\t\t\tvar _del = \$('<a>').attr({ \t\t\t\t\t\t'href': '#', \t\t\t\t\t\t'class': 'delete', \t\t\t\t\t\t'data-object_id': _data.object_id \t\t\t\t\t}); \t\t\t\t\t_target.append(_img).append(_del).find('input').val(_data.object_id); \t\t\t\t} \t\t\t\telse \t\t\t\t{ \t\t\t\t\t//\tAn error occurred \t\t\t\t\tvar _filename = \$('<p>').addClass('filename').text(file.name); \t\t\t\t\tvar _message = \$('<p>').addClass('message').text(_data.error); \t\t\t\t\t_target.addClass('error').append(_filename).append(_message).removeClass('crunching'); \t\t\t\t} \t\t\t}, \t\t\t'onUploadError': function(file, errorCode, errorMsg, errorString) \t\t\t{ \t\t\t\tvar _target = \$('#{$_id}-' + file.id + '-complete'); \t\t\t\tif (!_target.length) \t\t\t\t{ \t\t\t\t\tvar _html = \$.trim(\$('#{$_id}-template-item').html()); \t\t\t\t\tvar _item = \$(\$.parseHTML(_html)); \t\t\t\t\t_item.attr('id', '{$_id}-' + file.id + '-complete'); \t\t\t\t\t\$('#{$_id}-' + file.id).replaceWith(_item); \t\t\t\t\t_target = \$('#{$_id}-' + file.id + '-complete'); \t\t\t\t} \t\t\t\tvar _filename = \$('<p>').addClass('filename').text(file.name); \t\t\t\tvar _message = \$('<p>').addClass('message').text(errorString); \t\t\t\t_target.addClass('error').append(_filename).append(_message).removeClass('crunching'); \t\t\t} \t\t}); \t\tif ( typeof( \$.fn.sortable ) === 'function' ) \t\t{ \t\t\t\$('#{$_id}-filelist').disableSelection().sortable({ \t\t\t\tplaceholder: 'item placeholder', \t\t\t\titems: "li.item" \t\t\t}); \t\t} \t\t//\tRemove an item from the queue \t\t\$(document).on('click', '#{$_id}-filelist .item .remove', function() \t\t{ \t\t\tvar _instance_id = \$(this).data('instance_id'); \t\t\tvar _file_id = \$(this).data('file_id'); \t\t\t\$('#{$_id}-' + _instance_id).uploadify('cancel', _file_id); \t\t\t\$('#{$_id}-' + _file_id + ' .data-cancel').text('Cancelled').show(); \t\t\t\$('#{$_id}-' + _file_id).addClass('cancelled'); \t\t\tif (\$('#{$_id}-filelist li.item:not(.cancelled)').length === 0) \t\t\t{ \t\t\t\t\$('#{$_id}-filelist').addClass('empty'); \t\t\t\t\$('#{$_id}-filelist li.empty').css('opacity', 0).delay(1000).animate({ \t\t\t\t\topacity: 1 \t\t\t\t}, 250); \t\t\t} \t\t\treturn false; \t\t}); \t\t//\tDeletes an uploaded image \t\t\$(document).on('click', '#{$_id}-filelist .item .delete', function() \t\t{ \t\t\tvar _object = this; \t\t\t\$('#{$_id}-dialog-confirm-delete').dialog( \t\t\t{ \t\t\t\tresizable: false, \t\t\t\tdraggable: false, \t\t\t\tmodal: true, \t\t\t\tdialogClass: "no-close", \t\t\t\tbuttons: \t\t\t\t{ \t\t\t\t\t"Delete Image": function() \t\t\t\t\t{ \t\t\t\t\t\tvar _object_id = \$(_object).data('object_id'); \t\t\t\t\t\t//\tSend off the delete request \t\t\t\t\t\tvar _call = { \t\t\t\t\t\t\t'controller'\t: 'cdnapi', \t\t\t\t\t\t\t'method'\t\t: 'object_delete', \t\t\t\t\t\t\t'action'\t\t: 'POST', \t\t\t\t\t\t\t'data'\t\t\t: \t\t\t\t\t\t\t{ \t\t\t\t\t\t\t\t'object_id': _object_id \t\t\t\t\t\t\t} \t\t\t\t\t\t}; \t\t\t\t\t\tvar _api = new window.NAILS_API(); \t\t\t\t\t\t_api.call( _call ); \t\t\t\t\t\t// -------------------------------------------------------------------------- \t\t\t\t\t\t\$(_object).closest('li.item').addClass('deleted').fadeOut('slow', function() \t\t\t\t\t\t{ \t\t\t\t\t\t\t\$(_object).remove(); \t\t\t\t\t\t}); \t\t\t\t\t\t// -------------------------------------------------------------------------- \t\t\t\t\t\t//\tShow the empty screens \t\t\t\t\t\tif (\$('#{$_id}-filelist li.item:not(.deleted)').length === 0) \t\t\t\t\t\t{ \t\t\t\t\t\t\t\$('#{$_id}-filelist').addClass('empty'); \t\t\t\t\t\t} \t\t\t\t\t\t// -------------------------------------------------------------------------- \t\t\t\t\t\t//\tClose dialog \t\t\t\t\t\t\$(this).dialog("close"); \t\t\t\t\t}, \t\t\t\t\tCancel: function() \t\t\t\t\t{ \t\t\t\t\t\t\$(this).dialog("close"); \t\t\t\t\t} \t\t\t\t} \t\t\t}); \t\t\treturn false; \t\t}); \t} \t</script> EOT; // -------------------------------------------------------------------------- return $_out; }
public function delete_tag() { // Returning to...? $_return = site_url('cdn/manager/browse', page_is_secure()); $_return .= $this->input->server('QUERY_STRING') ? '?' . $this->input->server('QUERY_STRING') : ''; // -------------------------------------------------------------------------- $_deleted = $this->cdn->bucket_tag_delete($this->data['bucket'], $this->uri->segment(4)); if ($_deleted) { $this->session->set_flashdata('success', '<strong>Success!</strong> Tag deleted successfully!'); } else { $this->session->set_flashdata('error', '<strong>Sorry,</strong> ' . $this->cdn->last_error()); } // -------------------------------------------------------------------------- redirect($_return); }
protected function _url_make_secure($url) { return site_url($url, page_is_secure()); }
// MP3 echo '<span class="ion-music-note" style="font-size:14em"></span>'; $_fancybox_class = 'cdn-fancybox'; $_fancybox_type = 'iframe'; $_url = cdn_serve($object->id); $_action = 'Play'; } elseif ($object->mime == 'application/pdf') { // PDF echo '<span class="ion-document" style="font-size:14em"></span>'; $_fancybox_class = 'cdn-fancybox'; $_fancybox_type = 'iframe'; $_url = cdn_serve($object->id); $_action = 'View'; } else { // Generic file, force download echo '<span class="ion-document" style="font-size:14em"></span>'; $_fancybox_class = ''; $_fancybox_type = ''; $_url = cdn_serve($object->id, TRUE); $_action = 'Download'; } // Actions echo '<div class="actions">'; echo '<a href="#" data-fieldid="' . $this->input->get('fieldid') . '" data-id="' . $object->id . '" data-bucket="' . $bucket->slug . '" data-file="' . $object->filename . '" class="awesome green small insert">Insert</a>'; echo anchor(site_url('cdn/manager/delete/' . $object->id . $_query_string, page_is_secure()), 'Delete', 'class="awesome red small delete"'); echo anchor($_url, $_action, 'data-fancybox-title="' . $object->filename_display . '" data-fancybox-type="' . $_fancybox_type . '" class="' . $_fancybox_class . ' awesome small"'); echo '</div>'; echo '</div>'; // Filename echo '<p class="filename">' . $object->filename_display . '</p>'; echo '</li>';
/** * Output the assets for HTML * * @access public * @param string * @param boolean * @return object **/ public function output($type = 'ALL', $return = FALSE) { // Unload anything first if (count($this->unload_assets)) { foreach ($this->unload_assets as $asset) { // CSS unset($this->css[$asset]); unset($this->css_bower[$asset]); unset($this->css_nails[$asset]); unset($this->css_nails_bower[$asset]); // JS unset($this->js[$asset]); unset($this->js_bower[$asset]); unset($this->js_nails[$asset]); unset($this->js_nails_bower[$asset]); } } // -------------------------------------------------------------------------- // Now output $_out = ''; switch (strtoupper($type)) { case 'CSS': $_out .= $this->_print_css_nails_bower(); $_out .= $this->_print_css_nails(); $_out .= $this->_print_css_bower(); $_out .= $this->_print_css(); break; case 'CSS-INLINE': $_out = $this->_print_css_inline(); break; case 'JS': $_out .= $this->_print_js_nails_bower(); $_out .= $this->_print_js_nails(); $_out .= $this->_print_js_bower(); $_out .= $this->_print_js(); break; case 'JS-INLINE': $_out .= $this->_print_js_inline(); break; case 'ALL': $_out .= $this->_print_css_nails_bower(); $_out .= $this->_print_css_nails(); $_out .= $this->_print_css_bower(); $_out .= $this->_print_css(); $_out .= $this->_print_js_nails_bower(); $_out .= $this->_print_js_nails(); $_out .= $this->_print_js_bower(); $_out .= $this->_print_js(); break; } // -------------------------------------------------------------------------- // Force SSL for assets if running on non-standard port if (page_is_secure()) { $_out = str_replace(BASE_URL, SECURE_BASE_URL, $_out); } // -------------------------------------------------------------------------- if ($return) { return $_out; } else { echo $_out; } }
protected function _url_make_secure($url, $is_processing = TRUE) { if (page_is_secure()) { // Make the URL secure if ($is_processing) { $url = str_replace(DEPLOY_CDN_DRIVER_AWS_CLOUDFRONT_URL_PROCESSING, DEPLOY_CDN_DRIVER_AWS_CLOUDFRONT_URL_PROCESSING_SECURE, $url); } else { $url = str_replace(DEPLOY_CDN_DRIVER_AWS_CLOUDFRONT_URL_SERVING, DEPLOY_CDN_DRIVER_AWS_CLOUDFRONT_URL_SERVING_SECURE, $url); } } return $url; }
protected function _define_constants() { $_nails_data = get_nails_data(); // -------------------------------------------------------------------------- // Define some generic Nails constants, allow dev to override these - just in case if (!defined('NAILS_VERSION')) { define('NAILS_VERSION', $this->_nails_data->version); } if (!defined('NAILS_VERSION_RELEASED')) { define('NAILS_VERSION_RELEASED', $this->_nails_data->released); } if (!defined('NAILS_PACKAGE_NAME')) { define('NAILS_PACKAGE_NAME', 'Nails'); } if (!defined('NAILS_PACKAGE_URL')) { define('NAILS_PACKAGE_URL', 'http://nailsapp.co.uk/'); } if (!defined('NAILS_APP_STRAPLINE')) { define('NAILS_APP_STRAPLINE', 'A webapp powered by <a href="' . NAILS_PACKAGE_URL . '">' . NAILS_PACKAGE_NAME . '</a>, ooh la la!'); } // -------------------------------------------------------------------------- // Environment if (!defined('ENVIRONMENT')) { define('ENVIRONMENT', 'development'); } // -------------------------------------------------------------------------- // Cache Directory if (!defined('DEPLOY_CACHE_DIR')) { define('DEPLOY_CACHE_DIR', FCPATH . APPPATH . 'cache/'); } // -------------------------------------------------------------------------- // Check routes_app.php exists if (!defined('NAILS_STARTUP_GENERATE_APP_ROUTES')) { if (is_file(DEPLOY_CACHE_DIR . 'routes_app.php')) { define('NAILS_STARTUP_GENERATE_APP_ROUTES', FALSE); } else { // Not found, crude hook seeing as basically nothing has loaded yet define('NAILS_STARTUP_GENERATE_APP_ROUTES', TRUE); } } // -------------------------------------------------------------------------- // Database if (!defined('DEPLOY_DB_HOST')) { define('DEPLOY_DB_HOST', 'localhost'); } if (!defined('DEPLOY_DB_USERNAME')) { define('DEPLOY_DB_USERNAME', ''); } if (!defined('DEPLOY_DB_PASSWORD')) { define('DEPLOY_DB_PASSWORD', ''); } if (!defined('DEPLOY_DB_DATABASE')) { define('DEPLOY_DB_DATABASE', ''); } // -------------------------------------------------------------------------- // These settings can be specified wherever it makes most sense (e.g if // maintenance mode needs enabled app wide, then specify it in app.php, if // only a single server needs to be put in maintenance mode then define in // deploy.php if (!defined('PROFILING')) { define('PROFILING', FALSE); } if (!defined('MAINTENANCE')) { define('MAINTENANCE', FALSE); } if (!defined('MAINTENANCE_WHITELIST')) { define('MAINTENANCE_WHITELIST', '127.0.0.1'); } // -------------------------------------------------------------------------- // Default app constants (if not already defined) // These should be specified in config/app.php if (!defined('NAILS_DB_PREFIX')) { define('NAILS_DB_PREFIX', 'nails_'); } if (!defined('APP_PRIVATE_KEY')) { define('APP_PRIVATE_KEY', ''); } if (!defined('APP_NAME')) { define('APP_NAME', 'Untitled'); } if (!defined('APP_NAILS_MODULES')) { define('APP_NAILS_MODULES', ''); } if (!defined('APP_STAGING_USERPASS')) { define('APP_STAGING_USERPASS', serialize(array())); } if (!defined('APP_SSL_ROUTING')) { define('APP_SSL_ROUTING', FALSE); } if (!defined('APP_NATIVE_LOGIN_USING')) { define('APP_NATIVE_LOGIN_USING', 'EMAIL'); } // [EMAIL|USERNAME|BOTH] if (!defined('APP_ADMIN_IP_WHITELIST')) { define('APP_ADMIN_IP_WHITELIST', json_encode(array())); } // -------------------------------------------------------------------------- // Deployment specific constants (if not already defined) // These should be specified in config/deploy.php if (!defined('DEPLOY_SYSTEM_TIMEZONE')) { define('DEPLOY_SYSTEM_TIMEZONE', 'UTC'); } // If this is changed, update CORE_NAILS_Log.php too if (!defined('DEPLOY_LOG_DIR')) { define('DEPLOY_LOG_DIR', FCPATH . APPPATH . 'logs/'); } // -------------------------------------------------------------------------- // Email if (!defined('APP_DEVELOPER_EMAIL')) { define('APP_DEVELOPER_EMAIL', ''); } if (!defined('APP_EMAIL_FROM_NAME')) { define('APP_EMAIL_FROM_NAME', APP_NAME); } if (!defined('APP_EMAIL_FROM_EMAIL')) { define('APP_EMAIL_FROM_EMAIL', ''); } if (!defined('DEPLOY_SMTP_HOST')) { define('DEPLOY_SMTP_HOST', 'localhost'); } if (!defined('DEPLOY_SMTP_USERNAME')) { define('DEPLOY_SMTP_USERNAME', ''); } if (!defined('DEPLOY_SMTP_PASSWORD')) { define('DEPLOY_SMTP_PASSWORD', ''); } if (!defined('DEPLOY_SMTP_PORT')) { define('DEPLOY_SMTP_PORT', '25'); } if (!defined('EMAIL_DEBUG')) { define('EMAIL_DEBUG', FALSE); } if (!defined('EMAIL_OVERRIDE')) { define('EMAIL_OVERRIDE', ''); } // -------------------------------------------------------------------------- // CDN if (!defined('APP_CDN_DRIVER')) { define('APP_CDN_DRIVER', 'LOCAL'); } if (!defined('DEPLOY_CDN_MAGIC')) { define('DEPLOY_CDN_MAGIC', ''); } if (!defined('DEPLOY_CDN_PATH')) { define('DEPLOY_CDN_PATH', FCPATH . 'assets/uploads/'); } // Define how long CDN items should be cached for, this is a maximum age in seconds // According to http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html this shouldn't be // more than 1 year. if (!defined('APP_CDN_CACHE_MAX_AGE')) { define('APP_CDN_CACHE_MAX_AGE', '31536000'); } // 1 year // -------------------------------------------------------------------------- // SSL // If a SECURE_BASE_URL is not defined then assume the secure URL is simply // https://BASE_URL if (!defined('SECURE_BASE_URL')) { // Not defined, play it safe and just copy the BASE_URL define('SECURE_BASE_URL', BASE_URL); } // -------------------------------------------------------------------------- // Set NAILS_URL here as it's dependent on knowing whether SSL is set or not // and if the current page is secure. if (!defined('NAILS_URL')) { if (APP_SSL_ROUTING && page_is_secure()) { define('NAILS_URL', SECURE_BASE_URL . 'vendor/nailsapp/common/'); } else { define('NAILS_URL', BASE_URL . 'vendor/nailsapp/common/'); } } // -------------------------------------------------------------------------- // Set the NAILS_ASSETS_URL if (!defined('NAILS_ASSETS_URL')) { define('NAILS_ASSETS_URL', NAILS_URL . 'assets/'); } // -------------------------------------------------------------------------- // Database Debug if (!defined('DEPLOY_DB_DEBUG')) { if (ENVIRONMENT == 'production') { define('DEPLOY_DB_DEBUG', FALSE); } else { define('DEPLOY_DB_DEBUG', TRUE); } } // -------------------------------------------------------------------------- // Bootstrap columns // Define constants for Bootstrap columns and offsets. Two flavours of the // Bootstrap grid are available: 12 col and 24 col. Modules use these constants // to specify their column widths so that it can accommodate either grid cleanly. // Firstly, which grid? Assume 12 unless specified otherwise if (!defined('APP_BOOTSTRAP_GRID')) { define('APP_BOOTSTRAP_GRID', 12); } switch ((int) APP_BOOTSTRAP_GRID) { case 24: // COLUMNS // LG if (!defined('BS_COL_LG_1')) { define('BS_COL_LG_1', 'col-lg-2'); } if (!defined('BS_COL_LG_2')) { define('BS_COL_LG_2', 'col-lg-4'); } if (!defined('BS_COL_LG_3')) { define('BS_COL_LG_3', 'col-lg-6'); } if (!defined('BS_COL_LG_4')) { define('BS_COL_LG_4', 'col-lg-8'); } if (!defined('BS_COL_LG_5')) { define('BS_COL_LG_5', 'col-lg-10'); } if (!defined('BS_COL_LG_6')) { define('BS_COL_LG_6', 'col-lg-12'); } if (!defined('BS_COL_LG_7')) { define('BS_COL_LG_7', 'col-lg-14'); } if (!defined('BS_COL_LG_8')) { define('BS_COL_LG_8', 'col-lg-16'); } if (!defined('BS_COL_LG_9')) { define('BS_COL_LG_9', 'col-lg-18'); } if (!defined('BS_COL_LG_10')) { define('BS_COL_LG_10', 'col-lg-20'); } if (!defined('BS_COL_LG_11')) { define('BS_COL_LG_11', 'col-lg-22'); } if (!defined('BS_COL_LG_12')) { define('BS_COL_LG_12', 'col-lg-24'); } // MD if (!defined('BS_COL_MD_1')) { define('BS_COL_MD_1', 'col-md-2'); } if (!defined('BS_COL_MD_2')) { define('BS_COL_MD_2', 'col-md-4'); } if (!defined('BS_COL_MD_3')) { define('BS_COL_MD_3', 'col-md-6'); } if (!defined('BS_COL_MD_4')) { define('BS_COL_MD_4', 'col-md-8'); } if (!defined('BS_COL_MD_5')) { define('BS_COL_MD_5', 'col-md-10'); } if (!defined('BS_COL_MD_6')) { define('BS_COL_MD_6', 'col-md-12'); } if (!defined('BS_COL_MD_7')) { define('BS_COL_MD_7', 'col-md-14'); } if (!defined('BS_COL_MD_8')) { define('BS_COL_MD_8', 'col-md-16'); } if (!defined('BS_COL_MD_9')) { define('BS_COL_MD_9', 'col-md-18'); } if (!defined('BS_COL_MD_10')) { define('BS_COL_MD_10', 'col-md-20'); } if (!defined('BS_COL_MD_11')) { define('BS_COL_MD_11', 'col-md-22'); } if (!defined('BS_COL_MD_12')) { define('BS_COL_MD_12', 'col-md-24'); } // SM if (!defined('BS_COL_SM_1')) { define('BS_COL_SM_1', 'col-sm-2'); } if (!defined('BS_COL_SM_2')) { define('BS_COL_SM_2', 'col-sm-4'); } if (!defined('BS_COL_SM_3')) { define('BS_COL_SM_3', 'col-sm-6'); } if (!defined('BS_COL_SM_4')) { define('BS_COL_SM_4', 'col-sm-8'); } if (!defined('BS_COL_SM_5')) { define('BS_COL_SM_5', 'col-sm-10'); } if (!defined('BS_COL_SM_6')) { define('BS_COL_SM_6', 'col-sm-12'); } if (!defined('BS_COL_SM_7')) { define('BS_COL_SM_7', 'col-sm-14'); } if (!defined('BS_COL_SM_8')) { define('BS_COL_SM_8', 'col-sm-16'); } if (!defined('BS_COL_SM_9')) { define('BS_COL_SM_9', 'col-sm-18'); } if (!defined('BS_COL_SM_10')) { define('BS_COL_SM_10', 'col-sm-20'); } if (!defined('BS_COL_SM_11')) { define('BS_COL_SM_11', 'col-sm-22'); } if (!defined('BS_COL_SM_12')) { define('BS_COL_SM_12', 'col-sm-24'); } // XS if (!defined('BS_COL_XS_1')) { define('BS_COL_XS_1', 'col-xs-2'); } if (!defined('BS_COL_XS_2')) { define('BS_COL_XS_2', 'col-xs-4'); } if (!defined('BS_COL_XS_3')) { define('BS_COL_XS_3', 'col-xs-6'); } if (!defined('BS_COL_XS_4')) { define('BS_COL_XS_4', 'col-xs-8'); } if (!defined('BS_COL_XS_5')) { define('BS_COL_XS_5', 'col-xs-10'); } if (!defined('BS_COL_XS_6')) { define('BS_COL_XS_6', 'col-xs-12'); } if (!defined('BS_COL_XS_7')) { define('BS_COL_XS_7', 'col-xs-14'); } if (!defined('BS_COL_XS_8')) { define('BS_COL_XS_8', 'col-xs-16'); } if (!defined('BS_COL_XS_9')) { define('BS_COL_XS_9', 'col-xs-18'); } if (!defined('BS_COL_XS_10')) { define('BS_COL_XS_10', 'col-xs-20'); } if (!defined('BS_COL_XS_11')) { define('BS_COL_XS_11', 'col-xs-22'); } if (!defined('BS_COL_XS_12')) { define('BS_COL_XS_12', 'col-xs-24'); } // -------------------------------------------------------------------------- // OFFSETS // LG if (!defined('BS_COL_LG_OFFSET_1')) { define('BS_COL_LG_OFFSET_1', 'col-lg-offset-2'); } if (!defined('BS_COL_LG_OFFSET_2')) { define('BS_COL_LG_OFFSET_2', 'col-lg-offset-4'); } if (!defined('BS_COL_LG_OFFSET_3')) { define('BS_COL_LG_OFFSET_3', 'col-lg-offset-6'); } if (!defined('BS_COL_LG_OFFSET_4')) { define('BS_COL_LG_OFFSET_4', 'col-lg-offset-8'); } if (!defined('BS_COL_LG_OFFSET_5')) { define('BS_COL_LG_OFFSET_5', 'col-lg-offset-10'); } if (!defined('BS_COL_LG_OFFSET_6')) { define('BS_COL_LG_OFFSET_6', 'col-lg-offset-12'); } if (!defined('BS_COL_LG_OFFSET_7')) { define('BS_COL_LG_OFFSET_7', 'col-lg-offset-14'); } if (!defined('BS_COL_LG_OFFSET_8')) { define('BS_COL_LG_OFFSET_8', 'col-lg-offset-16'); } if (!defined('BS_COL_LG_OFFSET_9')) { define('BS_COL_LG_OFFSET_9', 'col-lg-offset-18'); } if (!defined('BS_COL_LG_OFFSET_10')) { define('BS_COL_LG_OFFSET_10', 'col-lg-offset-20'); } if (!defined('BS_COL_LG_OFFSET_11')) { define('BS_COL_LG_OFFSET_11', 'col-lg-offset-22'); } if (!defined('BS_COL_LG_OFFSET_12')) { define('BS_COL_LG_OFFSET_12', 'col-lg-offset-24'); } // MD if (!defined('BS_COL_MD_OFFSET_1')) { define('BS_COL_MD_OFFSET_1', 'col-md-offset-2'); } if (!defined('BS_COL_MD_OFFSET_2')) { define('BS_COL_MD_OFFSET_2', 'col-md-offset-4'); } if (!defined('BS_COL_MD_OFFSET_3')) { define('BS_COL_MD_OFFSET_3', 'col-md-offset-6'); } if (!defined('BS_COL_MD_OFFSET_4')) { define('BS_COL_MD_OFFSET_4', 'col-md-offset-8'); } if (!defined('BS_COL_MD_OFFSET_5')) { define('BS_COL_MD_OFFSET_5', 'col-md-offset-10'); } if (!defined('BS_COL_MD_OFFSET_6')) { define('BS_COL_MD_OFFSET_6', 'col-md-offset-12'); } if (!defined('BS_COL_MD_OFFSET_7')) { define('BS_COL_MD_OFFSET_7', 'col-md-offset-14'); } if (!defined('BS_COL_MD_OFFSET_8')) { define('BS_COL_MD_OFFSET_8', 'col-md-offset-16'); } if (!defined('BS_COL_MD_OFFSET_9')) { define('BS_COL_MD_OFFSET_9', 'col-md-offset-18'); } if (!defined('BS_COL_MD_OFFSET_10')) { define('BS_COL_MD_OFFSET_10', 'col-md-offset-20'); } if (!defined('BS_COL_MD_OFFSET_11')) { define('BS_COL_MD_OFFSET_11', 'col-md-offset-22'); } if (!defined('BS_COL_MD_OFFSET_12')) { define('BS_COL_MD_OFFSET_12', 'col-md-offset-24'); } // SM if (!defined('BS_COL_SM_OFFSET_1')) { define('BS_COL_SM_OFFSET_1', 'col-sm-offset-2'); } if (!defined('BS_COL_SM_OFFSET_2')) { define('BS_COL_SM_OFFSET_2', 'col-sm-offset-4'); } if (!defined('BS_COL_SM_OFFSET_3')) { define('BS_COL_SM_OFFSET_3', 'col-sm-offset-6'); } if (!defined('BS_COL_SM_OFFSET_4')) { define('BS_COL_SM_OFFSET_4', 'col-sm-offset-8'); } if (!defined('BS_COL_SM_OFFSET_5')) { define('BS_COL_SM_OFFSET_5', 'col-sm-offset-10'); } if (!defined('BS_COL_SM_OFFSET_6')) { define('BS_COL_SM_OFFSET_6', 'col-sm-offset-12'); } if (!defined('BS_COL_SM_OFFSET_7')) { define('BS_COL_SM_OFFSET_7', 'col-sm-offset-14'); } if (!defined('BS_COL_SM_OFFSET_8')) { define('BS_COL_SM_OFFSET_8', 'col-sm-offset-16'); } if (!defined('BS_COL_SM_OFFSET_9')) { define('BS_COL_SM_OFFSET_9', 'col-sm-offset-18'); } if (!defined('BS_COL_SM_OFFSET_10')) { define('BS_COL_SM_OFFSET_10', 'col-sm-offset-20'); } if (!defined('BS_COL_SM_OFFSET_11')) { define('BS_COL_SM_OFFSET_11', 'col-sm-offset-22'); } if (!defined('BS_COL_SM_OFFSET_12')) { define('BS_COL_SM_OFFSET_12', 'col-sm-offset-24'); } // XS if (!defined('BS_COL_XS_OFFSET_1')) { define('BS_COL_XS_OFFSET_1', 'col-xs-offset-2'); } if (!defined('BS_COL_XS_OFFSET_2')) { define('BS_COL_XS_OFFSET_2', 'col-xs-offset-4'); } if (!defined('BS_COL_XS_OFFSET_3')) { define('BS_COL_XS_OFFSET_3', 'col-xs-offset-6'); } if (!defined('BS_COL_XS_OFFSET_4')) { define('BS_COL_XS_OFFSET_4', 'col-xs-offset-8'); } if (!defined('BS_COL_XS_OFFSET_5')) { define('BS_COL_XS_OFFSET_5', 'col-xs-offset-10'); } if (!defined('BS_COL_XS_OFFSET_6')) { define('BS_COL_XS_OFFSET_6', 'col-xs-offset-12'); } if (!defined('BS_COL_XS_OFFSET_7')) { define('BS_COL_XS_OFFSET_7', 'col-xs-offset-14'); } if (!defined('BS_COL_XS_OFFSET_8')) { define('BS_COL_XS_OFFSET_8', 'col-xs-offset-16'); } if (!defined('BS_COL_XS_OFFSET_9')) { define('BS_COL_XS_OFFSET_9', 'col-xs-offset-18'); } if (!defined('BS_COL_XS_OFFSET_10')) { define('BS_COL_XS_OFFSET_10', 'col-xs-offset-20'); } if (!defined('BS_COL_XS_OFFSET_11')) { define('BS_COL_XS_OFFSET_11', 'col-xs-offset-22'); } if (!defined('BS_COL_XS_OFFSET_12')) { define('BS_COL_XS_OFFSET_12', 'col-xs-offset-24'); } // -------------------------------------------------------------------------- // ORDERING - PULL // LG if (!defined('BS_COL_LG_PULL_1')) { define('BS_COL_LG_PULL_1', 'col-lg-pull-2'); } if (!defined('BS_COL_LG_PULL_2')) { define('BS_COL_LG_PULL_2', 'col-lg-pull-4'); } if (!defined('BS_COL_LG_PULL_3')) { define('BS_COL_LG_PULL_3', 'col-lg-pull-6'); } if (!defined('BS_COL_LG_PULL_4')) { define('BS_COL_LG_PULL_4', 'col-lg-pull-8'); } if (!defined('BS_COL_LG_PULL_5')) { define('BS_COL_LG_PULL_5', 'col-lg-pull-10'); } if (!defined('BS_COL_LG_PULL_6')) { define('BS_COL_LG_PULL_6', 'col-lg-pull-12'); } if (!defined('BS_COL_LG_PULL_7')) { define('BS_COL_LG_PULL_7', 'col-lg-pull-14'); } if (!defined('BS_COL_LG_PULL_8')) { define('BS_COL_LG_PULL_8', 'col-lg-pull-16'); } if (!defined('BS_COL_LG_PULL_9')) { define('BS_COL_LG_PULL_9', 'col-lg-pull-18'); } if (!defined('BS_COL_LG_PULL_10')) { define('BS_COL_LG_PULL_10', 'col-lg-pull-20'); } if (!defined('BS_COL_LG_PULL_11')) { define('BS_COL_LG_PULL_11', 'col-lg-pull-22'); } if (!defined('BS_COL_LG_PULL_12')) { define('BS_COL_LG_PULL_12', 'col-lg-pull-24'); } // MD if (!defined('BS_COL_MD_PULL_1')) { define('BS_COL_MD_PULL_1', 'col-md-pull-2'); } if (!defined('BS_COL_MD_PULL_2')) { define('BS_COL_MD_PULL_2', 'col-md-pull-4'); } if (!defined('BS_COL_MD_PULL_3')) { define('BS_COL_MD_PULL_3', 'col-md-pull-6'); } if (!defined('BS_COL_MD_PULL_4')) { define('BS_COL_MD_PULL_4', 'col-md-pull-8'); } if (!defined('BS_COL_MD_PULL_5')) { define('BS_COL_MD_PULL_5', 'col-md-pull-10'); } if (!defined('BS_COL_MD_PULL_6')) { define('BS_COL_MD_PULL_6', 'col-md-pull-12'); } if (!defined('BS_COL_MD_PULL_7')) { define('BS_COL_MD_PULL_7', 'col-md-pull-14'); } if (!defined('BS_COL_MD_PULL_8')) { define('BS_COL_MD_PULL_8', 'col-md-pull-16'); } if (!defined('BS_COL_MD_PULL_9')) { define('BS_COL_MD_PULL_9', 'col-md-pull-18'); } if (!defined('BS_COL_MD_PULL_10')) { define('BS_COL_MD_PULL_10', 'col-md-pull-20'); } if (!defined('BS_COL_MD_PULL_11')) { define('BS_COL_MD_PULL_11', 'col-md-pull-22'); } if (!defined('BS_COL_MD_PULL_12')) { define('BS_COL_MD_PULL_12', 'col-md-pull-24'); } // SM if (!defined('BS_COL_SM_PULL_1')) { define('BS_COL_SM_PULL_1', 'col-sm-pull-2'); } if (!defined('BS_COL_SM_PULL_2')) { define('BS_COL_SM_PULL_2', 'col-sm-pull-4'); } if (!defined('BS_COL_SM_PULL_3')) { define('BS_COL_SM_PULL_3', 'col-sm-pull-6'); } if (!defined('BS_COL_SM_PULL_4')) { define('BS_COL_SM_PULL_4', 'col-sm-pull-8'); } if (!defined('BS_COL_SM_PULL_5')) { define('BS_COL_SM_PULL_5', 'col-sm-pull-10'); } if (!defined('BS_COL_SM_PULL_6')) { define('BS_COL_SM_PULL_6', 'col-sm-pull-12'); } if (!defined('BS_COL_SM_PULL_7')) { define('BS_COL_SM_PULL_7', 'col-sm-pull-14'); } if (!defined('BS_COL_SM_PULL_8')) { define('BS_COL_SM_PULL_8', 'col-sm-pull-16'); } if (!defined('BS_COL_SM_PULL_9')) { define('BS_COL_SM_PULL_9', 'col-sm-pull-18'); } if (!defined('BS_COL_SM_PULL_10')) { define('BS_COL_SM_PULL_10', 'col-sm-pull-20'); } if (!defined('BS_COL_SM_PULL_11')) { define('BS_COL_SM_PULL_11', 'col-sm-pull-22'); } if (!defined('BS_COL_SM_PULL_12')) { define('BS_COL_SM_PULL_12', 'col-sm-pull-24'); } // XS if (!defined('BS_COL_XS_PULL_1')) { define('BS_COL_XS_PULL_1', 'col-xs-pull-2'); } if (!defined('BS_COL_XS_PULL_2')) { define('BS_COL_XS_PULL_2', 'col-xs-pull-4'); } if (!defined('BS_COL_XS_PULL_3')) { define('BS_COL_XS_PULL_3', 'col-xs-pull-6'); } if (!defined('BS_COL_XS_PULL_4')) { define('BS_COL_XS_PULL_4', 'col-xs-pull-8'); } if (!defined('BS_COL_XS_PULL_5')) { define('BS_COL_XS_PULL_5', 'col-xs-pull-10'); } if (!defined('BS_COL_XS_PULL_6')) { define('BS_COL_XS_PULL_6', 'col-xs-pull-12'); } if (!defined('BS_COL_XS_PULL_7')) { define('BS_COL_XS_PULL_7', 'col-xs-pull-14'); } if (!defined('BS_COL_XS_PULL_8')) { define('BS_COL_XS_PULL_8', 'col-xs-pull-16'); } if (!defined('BS_COL_XS_PULL_9')) { define('BS_COL_XS_PULL_9', 'col-xs-pull-18'); } if (!defined('BS_COL_XS_PULL_10')) { define('BS_COL_XS_PULL_10', 'col-xs-pull-20'); } if (!defined('BS_COL_XS_PULL_11')) { define('BS_COL_XS_PULL_11', 'col-xs-pull-22'); } if (!defined('BS_COL_XS_PULL_12')) { define('BS_COL_XS_PULL_12', 'col-xs-pull-24'); } // -------------------------------------------------------------------------- // ORDERING - PUSH // LG if (!defined('BS_COL_LG_PUSH_1')) { define('BS_COL_LG_PUSH_1', 'col-lg-push-2'); } if (!defined('BS_COL_LG_PUSH_2')) { define('BS_COL_LG_PUSH_2', 'col-lg-push-4'); } if (!defined('BS_COL_LG_PUSH_3')) { define('BS_COL_LG_PUSH_3', 'col-lg-push-6'); } if (!defined('BS_COL_LG_PUSH_4')) { define('BS_COL_LG_PUSH_4', 'col-lg-push-8'); } if (!defined('BS_COL_LG_PUSH_5')) { define('BS_COL_LG_PUSH_5', 'col-lg-push-10'); } if (!defined('BS_COL_LG_PUSH_6')) { define('BS_COL_LG_PUSH_6', 'col-lg-push-12'); } if (!defined('BS_COL_LG_PUSH_7')) { define('BS_COL_LG_PUSH_7', 'col-lg-push-14'); } if (!defined('BS_COL_LG_PUSH_8')) { define('BS_COL_LG_PUSH_8', 'col-lg-push-16'); } if (!defined('BS_COL_LG_PUSH_9')) { define('BS_COL_LG_PUSH_9', 'col-lg-push-18'); } if (!defined('BS_COL_LG_PUSH_10')) { define('BS_COL_LG_PUSH_10', 'col-lg-push-20'); } if (!defined('BS_COL_LG_PUSH_11')) { define('BS_COL_LG_PUSH_11', 'col-lg-push-22'); } if (!defined('BS_COL_LG_PUSH_12')) { define('BS_COL_LG_PUSH_12', 'col-lg-push-24'); } // MD if (!defined('BS_COL_MD_PUSH_1')) { define('BS_COL_MD_PUSH_1', 'col-md-push-2'); } if (!defined('BS_COL_MD_PUSH_2')) { define('BS_COL_MD_PUSH_2', 'col-md-push-4'); } if (!defined('BS_COL_MD_PUSH_3')) { define('BS_COL_MD_PUSH_3', 'col-md-push-6'); } if (!defined('BS_COL_MD_PUSH_4')) { define('BS_COL_MD_PUSH_4', 'col-md-push-8'); } if (!defined('BS_COL_MD_PUSH_5')) { define('BS_COL_MD_PUSH_5', 'col-md-push-10'); } if (!defined('BS_COL_MD_PUSH_6')) { define('BS_COL_MD_PUSH_6', 'col-md-push-12'); } if (!defined('BS_COL_MD_PUSH_7')) { define('BS_COL_MD_PUSH_7', 'col-md-push-14'); } if (!defined('BS_COL_MD_PUSH_8')) { define('BS_COL_MD_PUSH_8', 'col-md-push-16'); } if (!defined('BS_COL_MD_PUSH_9')) { define('BS_COL_MD_PUSH_9', 'col-md-push-18'); } if (!defined('BS_COL_MD_PUSH_10')) { define('BS_COL_MD_PUSH_10', 'col-md-push-20'); } if (!defined('BS_COL_MD_PUSH_11')) { define('BS_COL_MD_PUSH_11', 'col-md-push-22'); } if (!defined('BS_COL_MD_PUSH_12')) { define('BS_COL_MD_PUSH_12', 'col-md-push-24'); } // SM if (!defined('BS_COL_SM_PUSH_1')) { define('BS_COL_SM_PUSH_1', 'col-sm-push-2'); } if (!defined('BS_COL_SM_PUSH_2')) { define('BS_COL_SM_PUSH_2', 'col-sm-push-4'); } if (!defined('BS_COL_SM_PUSH_3')) { define('BS_COL_SM_PUSH_3', 'col-sm-push-6'); } if (!defined('BS_COL_SM_PUSH_4')) { define('BS_COL_SM_PUSH_4', 'col-sm-push-8'); } if (!defined('BS_COL_SM_PUSH_5')) { define('BS_COL_SM_PUSH_5', 'col-sm-push-10'); } if (!defined('BS_COL_SM_PUSH_6')) { define('BS_COL_SM_PUSH_6', 'col-sm-push-12'); } if (!defined('BS_COL_SM_PUSH_7')) { define('BS_COL_SM_PUSH_7', 'col-sm-push-14'); } if (!defined('BS_COL_SM_PUSH_8')) { define('BS_COL_SM_PUSH_8', 'col-sm-push-16'); } if (!defined('BS_COL_SM_PUSH_9')) { define('BS_COL_SM_PUSH_9', 'col-sm-push-18'); } if (!defined('BS_COL_SM_PUSH_10')) { define('BS_COL_SM_PUSH_10', 'col-sm-push-20'); } if (!defined('BS_COL_SM_PUSH_11')) { define('BS_COL_SM_PUSH_11', 'col-sm-push-22'); } if (!defined('BS_COL_SM_PUSH_12')) { define('BS_COL_SM_PUSH_12', 'col-sm-push-24'); } // XS if (!defined('BS_COL_XS_PUSH_1')) { define('BS_COL_XS_PUSH_1', 'col-xs-push-2'); } if (!defined('BS_COL_XS_PUSH_2')) { define('BS_COL_XS_PUSH_2', 'col-xs-push-4'); } if (!defined('BS_COL_XS_PUSH_3')) { define('BS_COL_XS_PUSH_3', 'col-xs-push-6'); } if (!defined('BS_COL_XS_PUSH_4')) { define('BS_COL_XS_PUSH_4', 'col-xs-push-8'); } if (!defined('BS_COL_XS_PUSH_5')) { define('BS_COL_XS_PUSH_5', 'col-xs-push-10'); } if (!defined('BS_COL_XS_PUSH_6')) { define('BS_COL_XS_PUSH_6', 'col-xs-push-12'); } if (!defined('BS_COL_XS_PUSH_7')) { define('BS_COL_XS_PUSH_7', 'col-xs-push-14'); } if (!defined('BS_COL_XS_PUSH_8')) { define('BS_COL_XS_PUSH_8', 'col-xs-push-16'); } if (!defined('BS_COL_XS_PUSH_9')) { define('BS_COL_XS_PUSH_9', 'col-xs-push-18'); } if (!defined('BS_COL_XS_PUSH_10')) { define('BS_COL_XS_PUSH_10', 'col-xs-push-20'); } if (!defined('BS_COL_XS_PUSH_11')) { define('BS_COL_XS_PUSH_11', 'col-xs-push-22'); } if (!defined('BS_COL_XS_PUSH_12')) { define('BS_COL_XS_PUSH_12', 'col-xs-push-24'); } break; case 12: default: // COLUMNS // LG if (!defined('BS_COL_LG_1')) { define('BS_COL_LG_1', 'col-lg-1'); } if (!defined('BS_COL_LG_2')) { define('BS_COL_LG_2', 'col-lg-2'); } if (!defined('BS_COL_LG_3')) { define('BS_COL_LG_3', 'col-lg-3'); } if (!defined('BS_COL_LG_4')) { define('BS_COL_LG_4', 'col-lg-4'); } if (!defined('BS_COL_LG_5')) { define('BS_COL_LG_5', 'col-lg-5'); } if (!defined('BS_COL_LG_6')) { define('BS_COL_LG_6', 'col-lg-6'); } if (!defined('BS_COL_LG_7')) { define('BS_COL_LG_7', 'col-lg-7'); } if (!defined('BS_COL_LG_8')) { define('BS_COL_LG_8', 'col-lg-8'); } if (!defined('BS_COL_LG_9')) { define('BS_COL_LG_9', 'col-lg-9'); } if (!defined('BS_COL_LG_10')) { define('BS_COL_LG_10', 'col-lg-10'); } if (!defined('BS_COL_LG_11')) { define('BS_COL_LG_11', 'col-lg-11'); } if (!defined('BS_COL_LG_12')) { define('BS_COL_LG_12', 'col-lg-12'); } // MD if (!defined('BS_COL_MD_1')) { define('BS_COL_MD_1', 'col-md-1'); } if (!defined('BS_COL_MD_2')) { define('BS_COL_MD_2', 'col-md-2'); } if (!defined('BS_COL_MD_3')) { define('BS_COL_MD_3', 'col-md-3'); } if (!defined('BS_COL_MD_4')) { define('BS_COL_MD_4', 'col-md-4'); } if (!defined('BS_COL_MD_5')) { define('BS_COL_MD_5', 'col-md-5'); } if (!defined('BS_COL_MD_6')) { define('BS_COL_MD_6', 'col-md-6'); } if (!defined('BS_COL_MD_7')) { define('BS_COL_MD_7', 'col-md-7'); } if (!defined('BS_COL_MD_8')) { define('BS_COL_MD_8', 'col-md-8'); } if (!defined('BS_COL_MD_9')) { define('BS_COL_MD_9', 'col-md-9'); } if (!defined('BS_COL_MD_10')) { define('BS_COL_MD_10', 'col-md-10'); } if (!defined('BS_COL_MD_11')) { define('BS_COL_MD_11', 'col-md-11'); } if (!defined('BS_COL_MD_12')) { define('BS_COL_MD_12', 'col-md-12'); } // SM if (!defined('BS_COL_SM_1')) { define('BS_COL_SM_1', 'col-sm-1'); } if (!defined('BS_COL_SM_2')) { define('BS_COL_SM_2', 'col-sm-2'); } if (!defined('BS_COL_SM_3')) { define('BS_COL_SM_3', 'col-sm-3'); } if (!defined('BS_COL_SM_4')) { define('BS_COL_SM_4', 'col-sm-4'); } if (!defined('BS_COL_SM_5')) { define('BS_COL_SM_5', 'col-sm-5'); } if (!defined('BS_COL_SM_6')) { define('BS_COL_SM_6', 'col-sm-6'); } if (!defined('BS_COL_SM_7')) { define('BS_COL_SM_7', 'col-sm-7'); } if (!defined('BS_COL_SM_8')) { define('BS_COL_SM_8', 'col-sm-8'); } if (!defined('BS_COL_SM_9')) { define('BS_COL_SM_9', 'col-sm-9'); } if (!defined('BS_COL_SM_10')) { define('BS_COL_SM_10', 'col-sm-10'); } if (!defined('BS_COL_SM_11')) { define('BS_COL_SM_11', 'col-sm-11'); } if (!defined('BS_COL_SM_12')) { define('BS_COL_SM_12', 'col-sm-12'); } // XS if (!defined('BS_COL_XS_1')) { define('BS_COL_XS_1', 'col-xs-1'); } if (!defined('BS_COL_XS_2')) { define('BS_COL_XS_2', 'col-xs-2'); } if (!defined('BS_COL_XS_3')) { define('BS_COL_XS_3', 'col-xs-3'); } if (!defined('BS_COL_XS_4')) { define('BS_COL_XS_4', 'col-xs-4'); } if (!defined('BS_COL_XS_5')) { define('BS_COL_XS_5', 'col-xs-5'); } if (!defined('BS_COL_XS_6')) { define('BS_COL_XS_6', 'col-xs-6'); } if (!defined('BS_COL_XS_7')) { define('BS_COL_XS_7', 'col-xs-7'); } if (!defined('BS_COL_XS_8')) { define('BS_COL_XS_8', 'col-xs-8'); } if (!defined('BS_COL_XS_9')) { define('BS_COL_XS_9', 'col-xs-9'); } if (!defined('BS_COL_XS_10')) { define('BS_COL_XS_10', 'col-xs-10'); } if (!defined('BS_COL_XS_11')) { define('BS_COL_XS_11', 'col-xs-11'); } if (!defined('BS_COL_XS_12')) { define('BS_COL_XS_12', 'col-xs-12'); } // -------------------------------------------------------------------------- // OFFSETS // LG if (!defined('BS_COL_LG_OFFSET_1')) { define('BS_COL_LG_OFFSET_1', 'col-lg-offset-1'); } if (!defined('BS_COL_LG_OFFSET_2')) { define('BS_COL_LG_OFFSET_2', 'col-lg-offset-2'); } if (!defined('BS_COL_LG_OFFSET_3')) { define('BS_COL_LG_OFFSET_3', 'col-lg-offset-3'); } if (!defined('BS_COL_LG_OFFSET_4')) { define('BS_COL_LG_OFFSET_4', 'col-lg-offset-4'); } if (!defined('BS_COL_LG_OFFSET_5')) { define('BS_COL_LG_OFFSET_5', 'col-lg-offset-5'); } if (!defined('BS_COL_LG_OFFSET_6')) { define('BS_COL_LG_OFFSET_6', 'col-lg-offset-6'); } if (!defined('BS_COL_LG_OFFSET_7')) { define('BS_COL_LG_OFFSET_7', 'col-lg-offset-7'); } if (!defined('BS_COL_LG_OFFSET_8')) { define('BS_COL_LG_OFFSET_8', 'col-lg-offset-8'); } if (!defined('BS_COL_LG_OFFSET_9')) { define('BS_COL_LG_OFFSET_9', 'col-lg-offset-9'); } if (!defined('BS_COL_LG_OFFSET_10')) { define('BS_COL_LG_OFFSET_10', 'col-lg-offset-10'); } if (!defined('BS_COL_LG_OFFSET_11')) { define('BS_COL_LG_OFFSET_11', 'col-lg-offset-11'); } if (!defined('BS_COL_LG_OFFSET_12')) { define('BS_COL_LG_OFFSET_12', 'col-lg-offset-12'); } // MD if (!defined('BS_COL_MD_OFFSET_1')) { define('BS_COL_MD_OFFSET_1', 'col-md-offset-1'); } if (!defined('BS_COL_MD_OFFSET_2')) { define('BS_COL_MD_OFFSET_2', 'col-md-offset-2'); } if (!defined('BS_COL_MD_OFFSET_3')) { define('BS_COL_MD_OFFSET_3', 'col-md-offset-3'); } if (!defined('BS_COL_MD_OFFSET_4')) { define('BS_COL_MD_OFFSET_4', 'col-md-offset-4'); } if (!defined('BS_COL_MD_OFFSET_5')) { define('BS_COL_MD_OFFSET_5', 'col-md-offset-5'); } if (!defined('BS_COL_MD_OFFSET_6')) { define('BS_COL_MD_OFFSET_6', 'col-md-offset-6'); } if (!defined('BS_COL_MD_OFFSET_7')) { define('BS_COL_MD_OFFSET_7', 'col-md-offset-7'); } if (!defined('BS_COL_MD_OFFSET_8')) { define('BS_COL_MD_OFFSET_8', 'col-md-offset-8'); } if (!defined('BS_COL_MD_OFFSET_9')) { define('BS_COL_MD_OFFSET_9', 'col-md-offset-9'); } if (!defined('BS_COL_MD_OFFSET_10')) { define('BS_COL_MD_OFFSET_10', 'col-md-offset-10'); } if (!defined('BS_COL_MD_OFFSET_11')) { define('BS_COL_MD_OFFSET_11', 'col-md-offset-11'); } if (!defined('BS_COL_MD_OFFSET_12')) { define('BS_COL_MD_OFFSET_12', 'col-md-offset-12'); } // SM if (!defined('BS_COL_SM_OFFSET_1')) { define('BS_COL_SM_OFFSET_1', 'col-sm-offset-1'); } if (!defined('BS_COL_SM_OFFSET_2')) { define('BS_COL_SM_OFFSET_2', 'col-sm-offset-2'); } if (!defined('BS_COL_SM_OFFSET_3')) { define('BS_COL_SM_OFFSET_3', 'col-sm-offset-3'); } if (!defined('BS_COL_SM_OFFSET_4')) { define('BS_COL_SM_OFFSET_4', 'col-sm-offset-4'); } if (!defined('BS_COL_SM_OFFSET_5')) { define('BS_COL_SM_OFFSET_5', 'col-sm-offset-5'); } if (!defined('BS_COL_SM_OFFSET_6')) { define('BS_COL_SM_OFFSET_6', 'col-sm-offset-6'); } if (!defined('BS_COL_SM_OFFSET_7')) { define('BS_COL_SM_OFFSET_7', 'col-sm-offset-7'); } if (!defined('BS_COL_SM_OFFSET_8')) { define('BS_COL_SM_OFFSET_8', 'col-sm-offset-8'); } if (!defined('BS_COL_SM_OFFSET_9')) { define('BS_COL_SM_OFFSET_9', 'col-sm-offset-9'); } if (!defined('BS_COL_SM_OFFSET_10')) { define('BS_COL_SM_OFFSET_10', 'col-sm-offset-10'); } if (!defined('BS_COL_SM_OFFSET_11')) { define('BS_COL_SM_OFFSET_11', 'col-sm-offset-11'); } if (!defined('BS_COL_SM_OFFSET_12')) { define('BS_COL_SM_OFFSET_12', 'col-sm-offset-12'); } // XS if (!defined('BS_COL_XS_OFFSET_1')) { define('BS_COL_XS_OFFSET_1', 'col-xs-offset-1'); } if (!defined('BS_COL_XS_OFFSET_2')) { define('BS_COL_XS_OFFSET_2', 'col-xs-offset-2'); } if (!defined('BS_COL_XS_OFFSET_3')) { define('BS_COL_XS_OFFSET_3', 'col-xs-offset-3'); } if (!defined('BS_COL_XS_OFFSET_4')) { define('BS_COL_XS_OFFSET_4', 'col-xs-offset-4'); } if (!defined('BS_COL_XS_OFFSET_5')) { define('BS_COL_XS_OFFSET_5', 'col-xs-offset-5'); } if (!defined('BS_COL_XS_OFFSET_6')) { define('BS_COL_XS_OFFSET_6', 'col-xs-offset-6'); } if (!defined('BS_COL_XS_OFFSET_7')) { define('BS_COL_XS_OFFSET_7', 'col-xs-offset-7'); } if (!defined('BS_COL_XS_OFFSET_8')) { define('BS_COL_XS_OFFSET_8', 'col-xs-offset-8'); } if (!defined('BS_COL_XS_OFFSET_9')) { define('BS_COL_XS_OFFSET_9', 'col-xs-offset-9'); } if (!defined('BS_COL_XS_OFFSET_10')) { define('BS_COL_XS_OFFSET_10', 'col-xs-offset-10'); } if (!defined('BS_COL_XS_OFFSET_11')) { define('BS_COL_XS_OFFSET_11', 'col-xs-offset-11'); } if (!defined('BS_COL_XS_OFFSET_12')) { define('BS_COL_XS_OFFSET_12', 'col-xs-offset-12'); } // -------------------------------------------------------------------------- // ORDERING - PULL // LG if (!defined('BS_COL_LG_PULL_1')) { define('BS_COL_LG_PULL_1', 'col-lg-pull-1'); } if (!defined('BS_COL_LG_PULL_2')) { define('BS_COL_LG_PULL_2', 'col-lg-pull-2'); } if (!defined('BS_COL_LG_PULL_3')) { define('BS_COL_LG_PULL_3', 'col-lg-pull-3'); } if (!defined('BS_COL_LG_PULL_4')) { define('BS_COL_LG_PULL_4', 'col-lg-pull-4'); } if (!defined('BS_COL_LG_PULL_5')) { define('BS_COL_LG_PULL_5', 'col-lg-pull-5'); } if (!defined('BS_COL_LG_PULL_6')) { define('BS_COL_LG_PULL_6', 'col-lg-pull-6'); } if (!defined('BS_COL_LG_PULL_7')) { define('BS_COL_LG_PULL_7', 'col-lg-pull-7'); } if (!defined('BS_COL_LG_PULL_8')) { define('BS_COL_LG_PULL_8', 'col-lg-pull-8'); } if (!defined('BS_COL_LG_PULL_9')) { define('BS_COL_LG_PULL_9', 'col-lg-pull-9'); } if (!defined('BS_COL_LG_PULL_10')) { define('BS_COL_LG_PULL_10', 'col-lg-pull-10'); } if (!defined('BS_COL_LG_PULL_11')) { define('BS_COL_LG_PULL_11', 'col-lg-pull-11'); } if (!defined('BS_COL_LG_PULL_12')) { define('BS_COL_LG_PULL_12', 'col-lg-pull-12'); } // MD if (!defined('BS_COL_MD_PULL_1')) { define('BS_COL_MD_PULL_1', 'col-md-pull-1'); } if (!defined('BS_COL_MD_PULL_2')) { define('BS_COL_MD_PULL_2', 'col-md-pull-2'); } if (!defined('BS_COL_MD_PULL_3')) { define('BS_COL_MD_PULL_3', 'col-md-pull-3'); } if (!defined('BS_COL_MD_PULL_4')) { define('BS_COL_MD_PULL_4', 'col-md-pull-4'); } if (!defined('BS_COL_MD_PULL_5')) { define('BS_COL_MD_PULL_5', 'col-md-pull-5'); } if (!defined('BS_COL_MD_PULL_6')) { define('BS_COL_MD_PULL_6', 'col-md-pull-6'); } if (!defined('BS_COL_MD_PULL_7')) { define('BS_COL_MD_PULL_7', 'col-md-pull-7'); } if (!defined('BS_COL_MD_PULL_8')) { define('BS_COL_MD_PULL_8', 'col-md-pull-8'); } if (!defined('BS_COL_MD_PULL_9')) { define('BS_COL_MD_PULL_9', 'col-md-pull-9'); } if (!defined('BS_COL_MD_PULL_10')) { define('BS_COL_MD_PULL_10', 'col-md-pull-10'); } if (!defined('BS_COL_MD_PULL_11')) { define('BS_COL_MD_PULL_11', 'col-md-pull-11'); } if (!defined('BS_COL_MD_PULL_12')) { define('BS_COL_MD_PULL_12', 'col-md-pull-12'); } // SM if (!defined('BS_COL_SM_PULL_1')) { define('BS_COL_SM_PULL_1', 'col-sm-pull-1'); } if (!defined('BS_COL_SM_PULL_2')) { define('BS_COL_SM_PULL_2', 'col-sm-pull-2'); } if (!defined('BS_COL_SM_PULL_3')) { define('BS_COL_SM_PULL_3', 'col-sm-pull-3'); } if (!defined('BS_COL_SM_PULL_4')) { define('BS_COL_SM_PULL_4', 'col-sm-pull-4'); } if (!defined('BS_COL_SM_PULL_5')) { define('BS_COL_SM_PULL_5', 'col-sm-pull-5'); } if (!defined('BS_COL_SM_PULL_6')) { define('BS_COL_SM_PULL_6', 'col-sm-pull-6'); } if (!defined('BS_COL_SM_PULL_7')) { define('BS_COL_SM_PULL_7', 'col-sm-pull-7'); } if (!defined('BS_COL_SM_PULL_8')) { define('BS_COL_SM_PULL_8', 'col-sm-pull-8'); } if (!defined('BS_COL_SM_PULL_9')) { define('BS_COL_SM_PULL_9', 'col-sm-pull-9'); } if (!defined('BS_COL_SM_PULL_10')) { define('BS_COL_SM_PULL_10', 'col-sm-pull-10'); } if (!defined('BS_COL_SM_PULL_11')) { define('BS_COL_SM_PULL_11', 'col-sm-pull-11'); } if (!defined('BS_COL_SM_PULL_12')) { define('BS_COL_SM_PULL_12', 'col-sm-pull-12'); } // XS if (!defined('BS_COL_XS_PULL_1')) { define('BS_COL_XS_PULL_1', 'col-xs-pull-1'); } if (!defined('BS_COL_XS_PULL_2')) { define('BS_COL_XS_PULL_2', 'col-xs-pull-2'); } if (!defined('BS_COL_XS_PULL_3')) { define('BS_COL_XS_PULL_3', 'col-xs-pull-3'); } if (!defined('BS_COL_XS_PULL_4')) { define('BS_COL_XS_PULL_4', 'col-xs-pull-4'); } if (!defined('BS_COL_XS_PULL_5')) { define('BS_COL_XS_PULL_5', 'col-xs-pull-5'); } if (!defined('BS_COL_XS_PULL_6')) { define('BS_COL_XS_PULL_6', 'col-xs-pull-6'); } if (!defined('BS_COL_XS_PULL_7')) { define('BS_COL_XS_PULL_7', 'col-xs-pull-7'); } if (!defined('BS_COL_XS_PULL_8')) { define('BS_COL_XS_PULL_8', 'col-xs-pull-8'); } if (!defined('BS_COL_XS_PULL_9')) { define('BS_COL_XS_PULL_9', 'col-xs-pull-9'); } if (!defined('BS_COL_XS_PULL_10')) { define('BS_COL_XS_PULL_10', 'col-xs-pull-10'); } if (!defined('BS_COL_XS_PULL_11')) { define('BS_COL_XS_PULL_11', 'col-xs-pull-11'); } if (!defined('BS_COL_XS_PULL_12')) { define('BS_COL_XS_PULL_12', 'col-xs-pull-12'); } // -------------------------------------------------------------------------- // ORDERING - PUSH // LG if (!defined('BS_COL_LG_PUSH_1')) { define('BS_COL_LG_PUSH_1', 'col-lg-push-1'); } if (!defined('BS_COL_LG_PUSH_2')) { define('BS_COL_LG_PUSH_2', 'col-lg-push-2'); } if (!defined('BS_COL_LG_PUSH_3')) { define('BS_COL_LG_PUSH_3', 'col-lg-push-3'); } if (!defined('BS_COL_LG_PUSH_4')) { define('BS_COL_LG_PUSH_4', 'col-lg-push-4'); } if (!defined('BS_COL_LG_PUSH_5')) { define('BS_COL_LG_PUSH_5', 'col-lg-push-5'); } if (!defined('BS_COL_LG_PUSH_6')) { define('BS_COL_LG_PUSH_6', 'col-lg-push-6'); } if (!defined('BS_COL_LG_PUSH_7')) { define('BS_COL_LG_PUSH_7', 'col-lg-push-7'); } if (!defined('BS_COL_LG_PUSH_8')) { define('BS_COL_LG_PUSH_8', 'col-lg-push-8'); } if (!defined('BS_COL_LG_PUSH_9')) { define('BS_COL_LG_PUSH_9', 'col-lg-push-9'); } if (!defined('BS_COL_LG_PUSH_10')) { define('BS_COL_LG_PUSH_10', 'col-lg-push-10'); } if (!defined('BS_COL_LG_PUSH_11')) { define('BS_COL_LG_PUSH_11', 'col-lg-push-11'); } if (!defined('BS_COL_LG_PUSH_12')) { define('BS_COL_LG_PUSH_12', 'col-lg-push-12'); } // MD if (!defined('BS_COL_MD_PUSH_1')) { define('BS_COL_MD_PUSH_1', 'col-md-push-1'); } if (!defined('BS_COL_MD_PUSH_2')) { define('BS_COL_MD_PUSH_2', 'col-md-push-2'); } if (!defined('BS_COL_MD_PUSH_3')) { define('BS_COL_MD_PUSH_3', 'col-md-push-3'); } if (!defined('BS_COL_MD_PUSH_4')) { define('BS_COL_MD_PUSH_4', 'col-md-push-4'); } if (!defined('BS_COL_MD_PUSH_5')) { define('BS_COL_MD_PUSH_5', 'col-md-push-5'); } if (!defined('BS_COL_MD_PUSH_6')) { define('BS_COL_MD_PUSH_6', 'col-md-push-6'); } if (!defined('BS_COL_MD_PUSH_7')) { define('BS_COL_MD_PUSH_7', 'col-md-push-7'); } if (!defined('BS_COL_MD_PUSH_8')) { define('BS_COL_MD_PUSH_8', 'col-md-push-8'); } if (!defined('BS_COL_MD_PUSH_9')) { define('BS_COL_MD_PUSH_9', 'col-md-push-9'); } if (!defined('BS_COL_MD_PUSH_10')) { define('BS_COL_MD_PUSH_10', 'col-md-push-10'); } if (!defined('BS_COL_MD_PUSH_11')) { define('BS_COL_MD_PUSH_11', 'col-md-push-11'); } if (!defined('BS_COL_MD_PUSH_12')) { define('BS_COL_MD_PUSH_12', 'col-md-push-12'); } // SM if (!defined('BS_COL_SM_PUSH_1')) { define('BS_COL_SM_PUSH_1', 'col-sm-push-1'); } if (!defined('BS_COL_SM_PUSH_2')) { define('BS_COL_SM_PUSH_2', 'col-sm-push-2'); } if (!defined('BS_COL_SM_PUSH_3')) { define('BS_COL_SM_PUSH_3', 'col-sm-push-3'); } if (!defined('BS_COL_SM_PUSH_4')) { define('BS_COL_SM_PUSH_4', 'col-sm-push-4'); } if (!defined('BS_COL_SM_PUSH_5')) { define('BS_COL_SM_PUSH_5', 'col-sm-push-5'); } if (!defined('BS_COL_SM_PUSH_6')) { define('BS_COL_SM_PUSH_6', 'col-sm-push-6'); } if (!defined('BS_COL_SM_PUSH_7')) { define('BS_COL_SM_PUSH_7', 'col-sm-push-7'); } if (!defined('BS_COL_SM_PUSH_8')) { define('BS_COL_SM_PUSH_8', 'col-sm-push-8'); } if (!defined('BS_COL_SM_PUSH_9')) { define('BS_COL_SM_PUSH_9', 'col-sm-push-9'); } if (!defined('BS_COL_SM_PUSH_10')) { define('BS_COL_SM_PUSH_10', 'col-sm-push-10'); } if (!defined('BS_COL_SM_PUSH_11')) { define('BS_COL_SM_PUSH_11', 'col-sm-push-11'); } if (!defined('BS_COL_SM_PUSH_12')) { define('BS_COL_SM_PUSH_12', 'col-sm-push-12'); } // XS if (!defined('BS_COL_XS_PUSH_1')) { define('BS_COL_XS_PUSH_1', 'col-xs-push-1'); } if (!defined('BS_COL_XS_PUSH_2')) { define('BS_COL_XS_PUSH_2', 'col-xs-push-2'); } if (!defined('BS_COL_XS_PUSH_3')) { define('BS_COL_XS_PUSH_3', 'col-xs-push-3'); } if (!defined('BS_COL_XS_PUSH_4')) { define('BS_COL_XS_PUSH_4', 'col-xs-push-4'); } if (!defined('BS_COL_XS_PUSH_5')) { define('BS_COL_XS_PUSH_5', 'col-xs-push-5'); } if (!defined('BS_COL_XS_PUSH_6')) { define('BS_COL_XS_PUSH_6', 'col-xs-push-6'); } if (!defined('BS_COL_XS_PUSH_7')) { define('BS_COL_XS_PUSH_7', 'col-xs-push-7'); } if (!defined('BS_COL_XS_PUSH_8')) { define('BS_COL_XS_PUSH_8', 'col-xs-push-8'); } if (!defined('BS_COL_XS_PUSH_9')) { define('BS_COL_XS_PUSH_9', 'col-xs-push-9'); } if (!defined('BS_COL_XS_PUSH_10')) { define('BS_COL_XS_PUSH_10', 'col-xs-push-10'); } if (!defined('BS_COL_XS_PUSH_11')) { define('BS_COL_XS_PUSH_11', 'col-xs-push-11'); } if (!defined('BS_COL_XS_PUSH_12')) { define('BS_COL_XS_PUSH_12', 'col-xs-push-12'); } break; } }
} elseif ($object->mime == 'application/pdf') { // PDF echo '<span class="ion-document" style="font-size:14em"></span>'; $_fancybox_class = 'cdn-fancybox'; $_fancybox_type = 'iframe'; $_url = cdn_serve($object->id); $_action = 'View'; } else { // Generic file, force download echo '<span class="ion-document" style="font-size:14em"></span>'; $_fancybox_class = ''; $_fancybox_type = ''; $_url = cdn_serve($object->id, TRUE); $_action = 'Download'; } echo '</div>'; // Filename echo '<div class="details">'; echo '<span class="filename">' . $object->filename_display . '</span>'; echo '<div class="type"><strong>Type:</strong> ' . $object->mime . '</div>'; echo '<div class="filesize"><strong>Filesize:</strong> ' . format_bytes($object->filesize) . '</div>'; echo '<div class="created"><strong>Created:</strong> ' . user_datetime($object->created) . '</div>'; echo '<div class="modified"><strong>Modified:</strong> ' . user_datetime($object->modified) . '</div>'; echo '<div class="actions">'; echo '<a href="#" data-fieldid="' . $this->input->get('fieldid') . '" data-id="' . $object->id . '" data-bucket="' . $bucket->slug . '" data-file="' . $object->filename . '" class="awesome green small insert">Insert</a>'; echo anchor(site_url('cdn/manager/delete/' . $object->id . '?' . $_SERVER['QUERY_STRING'], page_is_secure()), 'Delete', 'class="awesome red small delete"'); echo anchor($_url, $_action, 'data-fancybox-title="' . $object->filename_display . '" data-fancybox-type="' . $_fancybox_type . '" class="' . $_fancybox_class . ' awesome small"'); echo '</div>'; echo '</div>'; echo '<div class="clear"></div>'; echo '</li>';