コード例 #1
0
 public function get_articles_list($interval, $type = NULL)
 {
     if (!empty($type) and !in_array($type, $this->_special_type)) {
         $this->query['where'] = "`type` = '{$type}'";
         $this->query['order'] = '`creation`';
     } else {
         $this->query['order'] = '`creation` DESC';
     }
     $lang = Buffer::get(URL_LANG);
     if (!empty($lang)) {
         $this->query['where'] = empty($this->query['where']) ? "`lang` = '{$lang}'" : $this->query['where'] . " AND `lang` = '{$lang}'";
     }
     $from = ($interval - 1) * $this->_count;
     $to = $interval * $this->_count;
     $this->query['select'] = '`id`, `header`, `type`, `structure`, `creation`';
     $this->query['limit'] = ($from <= 0 and $to <= 0) ? '' : "{$from},{$to}";
     $non_format = $this->rows(TRUE);
     $result = array();
     foreach ($non_format as $item) {
         $structure = json_decode($item['structure'], TRUE);
         $structure['header'] = $item['header'];
         $structure['image'] = image_url('types/' . $item['type'] . '.jpg');
         $structure['link'] = base_url("articles/read/{$item['id']}");
         $structure['footer'] = get_string('url_naming', $item['type']);
         $result[] = $structure;
     }
     return $result;
 }
コード例 #2
0
ファイル: bbcode_helper.php プロジェクト: Tapha/pyrocms
/**
* Parse bbCode
*
* Takes a string as input and replace bbCode by (x)HTML tags
*
* @access    public
* @param    string    the text to be parsed
* @return    string
*/
function parse_bbcode($str, $clear = 0, $parse_smileys = FALSE)
{
    $bbcode_to_parse = _get_bbcode_to_parse_array();
    if (FALSE === $bbcode_to_parse) {
        return FALSE;
    }
    foreach ($bbcode_to_parse as $key => $val) {
        for ($i = 1; $i <= $bbcode_to_parse[$key][2]; $i++) {
            $str = preg_replace($key, $bbcode_to_parse[$key][$clear], $str);
        }
    }
    $str = break_lines($str);
    if ($parse_smileys) {
        // All this funky code applys smileys to anything OUTSIDE code blocks
        preg_match_all('/<code>.*?<\\/code>/s', $str, $code_blocks, PREG_PATTERN_ORDER);
        $block_num = 0;
        foreach ($code_blocks[0] as $block) {
            $str = str_replace($block, "{block_{$block_num}}", $str);
            $block_num++;
        }
        $str = parse_smileys($str, image_url("smileys/"));
        $block_num = 0;
        foreach ($code_blocks[0] as $block) {
            $str = str_replace("{block_{$block_num}}", $block, $str);
            $block_num++;
        }
    }
    $str = preg_replace('/<code>*\\s*/s', '<code>', $str);
    return preg_replace('/\\s*<\\/code>/s', '</code>', $str);
}
コード例 #3
0
 public function getThumbAttribute()
 {
     if ($this->Staff) {
         return image_url('sm', 'quarter', $this->Staff->image);
     }
     return "http://www.gravatar.com/avatar/" . md5(strtolower(trim($this->email))) . "?s=200";
 }
コード例 #4
0
/**
 * Parse Textile
 *
 * Takes a string as input and parse the Textile
 *
 * @param	string	$str			The string to be parsed
 * @param	bool	$parse_smileys	Parse the smileys or not
 * @return	string
 */
function parse($str, $clear = 0, $parse_smileys = FALSE)
{
    $ci =& get_instance();
    if (!class_exists('Textile')) {
        $ci->load->library('Textile');
    }
    $str = htmlspecialchars_decode($str);
    $str = $ci->textile->TextileThis($str);
    if ($parse_smileys) {
        // All this funky code applys smileys to anything OUTSIDE code blocks
        preg_match_all('/<code>.*?<\\/code>/s', $str, $code_blocks, PREG_PATTERN_ORDER);
        $block_num = 0;
        foreach ($code_blocks[0] as $block) {
            $str = str_replace($block, "{block_{$block_num}}", $str);
            $block_num++;
        }
        $str = parse_smileys($str, image_url("smileys/"));
        $block_num = 0;
        foreach ($code_blocks[0] as $block) {
            $str = str_replace("{block_{$block_num}}", $block, $str);
            $block_num++;
        }
    }
    $str = preg_replace('/<code>*\\s*/s', '<code>', $str);
    return preg_replace('/\\s*<\\/code>/s', '</code>', $str);
}
コード例 #5
0
    function _display_colorbox_gallery($images, $mode = null)
    {
        $mode = $mode != '' ? 'colorbox-' . $mode : 'colorbox';
        if (!empty($images)) {
            foreach ($images as $image) {
                $image_url = image_url($image['image']);
                $image_thumb_url = image_process_nowm($image_url, 180, 120);
                ?>

                        <div class="image-container">
                            <a href="<?php 
                echo $image_url;
                ?>
" title="<?php 
                echo isset($image['title']) ? html_escape($image['title']) : '';
                ?>
" target="blank" rel="<?php 
                echo html_escape($mode);
                ?>
"><img src="<?php 
                echo $image_thumb_url;
                ?>
" /></a>
                        </div>

<?php 
            }
        }
    }
コード例 #6
0
ファイル: functions.php プロジェクト: radicaldesigns/momcards
function og_url($id)
{
    if ($id) {
        return image_url($id);
    }
    return home_url() . '/images/icons/fb-icon.png';
}
コード例 #7
0
 public function run($options)
 {
     $attributes = array();
     if (is_numeric($options['width'])) {
         $attributes['width'] = $options['width'];
     }
     if (is_numeric($options['height'])) {
         $attributes['height'] = $options['height'];
     }
     $this->load->model('photos/photos_m');
     $p = new $this->photos_m();
     $photos = $p->limit($options['limit'])->order_by('updated_on', 'DESC')->get_all();
     $result['images'] = FALSE;
     if (sizeof($photos) > 0) {
         foreach ($photos as $key => $image) {
             $arr = explode('.', $image->filename);
             $thumb = $arr[0] . '_thumb.' . $arr[1];
             $img = image("photos/{$image->album_id}/{$thumb}", NULL, $attributes);
             $url = image_url("photos/{$image->album_id}/{$thumb}");
             $url = str_replace('_thumb', '', $url);
             $images[] = anchor($url, $img);
         }
         $result['images'] = $images;
     }
     return $result;
 }
コード例 #8
0
function display_picture($filename, $size = 'big', $target_size = null, $title = 'Click to display original image')
{
    $image_url = image_url($filename, $size);
    $target_image_url = image_url($filename, $target_size, true);
    $absolute_url = absolute_link($target_image_url, true);
    $image_options = empty($title) ? null : array('title' => $title, 'alt' => $title);
    return '<figure class="picture"><a title="' . __($title) . '" href="' . $absolute_url . '" itemprop="contentUrl">' . image_tag($image_url, $image_options) . '</a></figure><div class="picture_right"></div>';
}
コード例 #9
0
ファイル: ui.inc.php プロジェクト: founderio/thebuggenie
/**
 * Returns an <img> tag with a specified image
 *
 * @param string $image image source
 * @param array $params [optional] html parameters
 * @param boolean $notheme [optional] whether this is a themed image or a top level path
 * @param string $module whether this is a module image or in the core image set
 * @param boolean $relative whether the path is relative or absolute
 *
 * @return string
 */
function image_tag($image, $params = array(), $notheme = false, $module = 'core', $relative = true)
{
    $params['src'] = image_url($image, $notheme, $module, $relative);
    if (!isset($params['alt'])) {
        $params['alt'] = $image;
    }
    return "<img " . parseHTMLoptions($params) . '>';
}
コード例 #10
0
 public function index()
 {
     $php_min = '5.3';
     if (!is_php($php_min)) {
         $this->output->set_output('PHP ' . $php_min . ' is required for Lex parser.');
         return;
     }
     $countries = $this->_get_country_data();
     $countries_10 = array_slice($countries, 0, 10);
     $this->template->set('br', '<br />')->set('hr', '<hr />')->set('name', 'John')->set('array_1', array('one', 'two', 'three'))->set('array_2', array('one', 'two', 'three', array('four', 'five')))->set('string_123', 'one, two, three')->set('json_123', json_encode(array('one', 'two', 'three')))->set('very_long_text', 'Very long text. Very long text. Very long text. Very long text.')->set('value_0', 0)->set('value_1', 1)->set('value_2', 2)->set('value_3', 3)->set('boolean_true', true)->set('value_null', null)->set('string_10', '10')->set('object_123', (object) array('one', 'two', 'three'))->set('dog', "I'll \"walk\" the <b>dog</b> now.")->set('dog_entities', htmlentities("I'll \"walk\" the <b>dog</b> now.", ENT_QUOTES, 'UTF-8'))->set('countries', $countries)->set('countries_10', $countries_10)->set('with_a_new_line', "a new\nline")->set('my_image', image_url('playground.jpg'))->set('string_markdown', 'Formatted **text**')->set('string_textile', 'Formatted _text_')->set('dangerous_value', 'A dangerous value <script>alert("Hi, I am dangerous.")</script>')->build('lex_parser');
 }
コード例 #11
0
 public static function my_image_url($src = null, $width = null, $height = null, $no_crop = null, $keep_canvas_size = null)
 {
     $src = isset($src) && $src != '' ? $src : image_url('lib/blank.png');
     if ($no_crop !== null) {
         $no_crop = empty($no_crop) ? 0 : 1;
     }
     if ($keep_canvas_size !== null) {
         $keep_canvas_size = empty($keep_canvas_size) ? 0 : 1;
     }
     return http_build_url(site_url('playground/image-process'), array('query' => http_build_query(array('src' => $src, 'w' => $width, 'h' => $height, 'no_crop' => $no_crop, 'keep_canvas_size' => $keep_canvas_size))), HTTP_URL_JOIN_QUERY);
 }
コード例 #12
0
 public function index()
 {
     $php_min = '5.3';
     if (!is_php($php_min)) {
         $this->output->set_output('PHP ' . $php_min . ' is required for Lex parser.');
         return;
     }
     $countries = $this->_get_country_data();
     $countries_10 = array_slice($countries, 0, 10);
     $lex_parser_layout_test = $this->curl->create(site_url('playground/lex-parser-layout-test'))->get()->execute();
     $this->template->set('br', '<br />')->set('hr', '<hr />')->set('name', 'John')->set('array_1', array('one', 'two', 'three'))->set('array_2', array('one', 'two', 'three', array('four', 'five')))->set('string_123', 'one, two, three')->set('json_123', json_encode(array('one', 'two', 'three')))->set('very_long_text', 'Very long text. Very long text. Very long text. Very long text.')->set('value_0', 0)->set('value_1', 1)->set('value_2', 2)->set('value_3', 3)->set('boolean_true', true)->set('value_null', null)->set('string_10', '10')->set('object_123', (object) array('one', 'two', 'three'))->set('float_value', 250.5)->set('dog', "I'll \"walk\" the <b>dog</b> now.")->set('dog_entities', htmlentities("I'll \"walk\" the <b>dog</b> now.", ENT_QUOTES, 'UTF-8'))->set('countries', $countries)->set('countries_10', $countries_10)->set('with_a_new_line', "a new\nline")->set('my_image', image_url('playground.jpg'))->set('string_markdown', 'Formatted **text**')->set('string_textile', 'Formatted _text_')->set('dangerous_value', 'A dangerous value <script>alert("Hi, I am dangerous.")</script>')->set('my_blog', array('posts' => array(array('title' => 'Blog Post One'), array('title' => 'Blog Post Two'))))->set('lex_parser_layout_test', $lex_parser_layout_test)->set_partial('lex_partial', 'lex_partial')->set_metadata('description', 'Lex parser testing page')->set_metadata('keywords', 'CodeIgniter Lex Template Parser')->build('lex_parser');
 }
コード例 #13
0
 function SetHeader()
 {
     $this->SetFont('Arial', 'B', 16);
     $this->Image(image_url() . '/ufma.png', 10, 10);
     parent::Ln(7);
     $this->Cell(0, 7, specialChars('UNIVERSIDADE FEDERAL DO MARANHÃO'), 0, 0, 'C');
     parent::Ln(7);
     $this->SetFont('Arial', '', 11);
     $this->Cell(0, 7, specialChars('Fundação Instituída nos termos da Lei 5.152 de 21/10/1966'), 0, 0, 'C');
     parent::Ln(7);
     $this->Cell(0, 7, specialChars('São Luís - Maranhão'), 0, 0, 'C');
     parent::Ln(7);
 }
コード例 #14
0
function make_thumbnail_slideshow($images)
{
    if (!count($images)) {
        return '';
    }
    $output = '<div class="popup_slideshow"><ul class="popup_slideimages">';
    $count = 0;
    foreach ($images as $image) {
        $count += 1;
        $caption = $image['name'];
        $class = $count != 1 ? '' : ' class="popup-img-active"';
        $output .= "<li{$class}>" . image_tag(image_url($image['filename'], 'medium'), array('alt' => $caption, 'title' => $caption)) . '</li>';
    }
    $output .= '</ul></div>';
    return $output;
}
コード例 #15
0
 public function parse_string($template, $data = array(), $return = FALSE, $config = array())
 {
     if (!is_array($config)) {
         $config = array();
     }
     $config = array_merge($this->config, $config);
     if ($config['image_url'] == '') {
         $config['image_url'] = image_url('lib/smileys/');
     }
     $ci = $this->ci;
     $is_mx = false;
     if (!$return) {
         list($ci, $is_mx) = $this->detect_mx();
     }
     $template = parse_smileys($template, (string) $config['image_url'], $config['smileys']);
     return $this->output($template, $return, $ci, $is_mx);
 }
コード例 #16
0
 public function index()
 {
     $php_min = '5.2.7';
     if (!is_php($php_min)) {
         $this->output->set_output('PHP ' . $php_min . ' is required for Twig parser.');
         return;
     }
     $countries = $this->_get_country_data();
     $countries_10 = array_slice($countries, 0, 10);
     // Miscellaneous Tests
     $twig_test_name = 'test.html.twig';
     $twig_test_path = $this->load->path($twig_test_name);
     $twig_test_source = @(string) file_get_contents($twig_test_path);
     $twig_test_1 = $this->parser->parse_string($twig_test_source, array(), true, 'twig');
     $twig_test_2 = $this->load->view($twig_test_name, array(), true);
     $this->template->set('br', '<br />')->set('hr', '<hr />')->set('name', 'John')->set('array_1', array('one', 'two', 'three'))->set('array_2', array('one', 'two', 'three', array('four', 'five')))->set('string_123', 'one, two, three')->set('string_empty', '')->set('json_123', json_encode(array('one', 'two', 'three')))->set('very_long_text', 'Very long text. Very long text. Very long text. Very long text.')->set('value_0', 0)->set('value_1', 1)->set('value_2', 2)->set('value_3', 3)->set('boolean_true', true)->set('value_null', null)->set('string_10', '10')->set('object_123', (object) array('one', 'two', 'three'))->set('float_value', 250.5)->set('dog', "I'll \"walk\" the <b>dog</b> now.")->set('dog_entities', htmlentities("I'll \"walk\" the <b>dog</b> now.", ENT_QUOTES, 'UTF-8'))->set('countries', $countries)->set('countries_10', $countries_10)->set('with_a_new_line', "a new\nline")->set('my_image', image_url('playground.jpg'))->set('string_markdown', 'Formatted **text**')->set('string_textile', 'Formatted _text_')->set('dangerous_value', 'A dangerous value <script>alert("Hi, I am dangerous.")</script>')->set('my_blog', array('posts' => array(array('title' => 'Blog Post One'), array('title' => 'Blog Post Two'))))->set('twig_test_name', $twig_test_name)->set('twig_test_source', $twig_test_source)->set('twig_test_1', $twig_test_1)->set('twig_test_2', $twig_test_2)->set_partial('twig_partial', 'twig_partial')->set_metadata('description', 'Twig parser testing page')->set_metadata('keywords', 'CodeIgniter Twig Template Parser')->build('twig_parser');
 }
コード例 #17
0
 public function resize($img_path, $width = NULL, $height = NULL)
 {
     $setting = $this->config->item('image_tool');
     if (isset($setting['root_folder']) and (strpos($setting['root_folder'], '/') !== 0 or strpos($setting['root_folder'], './') === FALSE)) {
         $root_folder = $setting['root_folder'] . '/';
     } else {
         $root_folder = 'data/';
     }
     if (strpos($img_path, $root_folder) === 0) {
         $img_path = str_replace($root_folder, '', $img_path);
     }
     if (!file_exists(IMAGEPATH . $root_folder . $img_path) or !is_file(IMAGEPATH . $root_folder . $img_path) or strpos($img_path, '/') === 0) {
         $img_path = 'no_photo.png';
     }
     if (empty($width) and empty($height)) {
         return image_url($root_folder . $img_path);
     }
     $thumbs_path = IMAGEPATH . 'thumbs';
     if (!is_dir($thumbs_path)) {
         $this->_createFolder($thumbs_path);
     }
     if (is_dir(IMAGEPATH . $root_folder . $img_path) and !is_dir($thumbs_path . '/' . $img_path)) {
         $this->_createFolder($thumbs_path . '/' . $img_path);
     }
     $info = pathinfo($img_path);
     $extension = $info['extension'];
     $old_path = IMAGEPATH . $root_folder . $img_path;
     $new_path = IMAGEPATH . 'thumbs/' . substr($img_path, 0, strrpos($img_path, '.')) . '-' . $width . 'x' . $height . '.' . $extension;
     $new_image = 'thumbs/' . substr($img_path, 0, strrpos($img_path, '.')) . '-' . $width . 'x' . $height . '.' . $extension;
     if (file_exists($old_path) and !file_exists($new_path)) {
         $this->load->library('image_lib');
         $this->image_lib->clear();
         $config['image_library'] = 'gd2';
         $config['source_image'] = $old_path;
         $config['new_image'] = $new_path;
         $config['width'] = $width;
         $config['height'] = $height;
         $this->image_lib->initialize($config);
         if (!$this->image_lib->resize()) {
             return FALSE;
         }
     }
     return image_url($new_image);
 }
コード例 #18
0
function field_html($args)
{
    switch ($args[2]) {
        case 'textarea':
            return text_area($args);
        case 'checkbox':
            // Checkbox
            return check_box($args);
        case 'background_variant':
            // Dropmenu
            return background_variant($args);
        case 'image_url':
            // Image URL
            return image_url($args);
        case 'text':
        default:
            return text_field($args);
    }
}
コード例 #19
0
ファイル: image_helper.php プロジェクト: toni-leigh/shlinks
function image_tag($img, $size, $resize = null, $classes = '')
{
    $img = get_image($img);
    // get the dimension values for the image tag
    if (null == $resize) {
        $width = $size;
        $height = ceil($size / $img['ratio']);
    } else {
        $width = $size * ($resize / $size);
        $height = ceil($width / $img['ratio']);
    }
    // set a classes value
    if (strlen($classes) > 0 ? $class = "class='" . $classes . "'" : ($class = '')) {
    }
    $img_url = image_url($img, 300);
    $image_tag = "<img id='img" . $img['image_id'] . "' " . $class . " itemprop='image' src='" . $img_url . "' alt='thumbail of " . $img['image_name'] . "' width='" . $width . "' height='" . $height . "'/>";
    $image_tag .= "<script type='text/javascript'>";
    $image_tag .= "   rimg_ids[rimg_ids.length]=new Array(" . $img['image_id'] . "," . $size . ");";
    $image_tag .= "</script>";
    return $image_tag;
}
コード例 #20
0
ファイル: poly_block.php プロジェクト: viking2000/web-antarix
function list__poly_block(array $options = array())
{
    Builder::add_css("widgets/list/poly_block");
    if (empty($options)) {
        return '';
    }
    $body = '';
    foreach ($options as $item) {
        $img_link = '#';
        $total_link = '#';
        $header = '';
        $content = '';
        if (!empty($item['content'])) {
            $content = $item['content'];
        }
        if (!empty($item['header'])) {
            $header = $item['header'];
        }
        if (!empty($item['img_title'])) {
            $img_link = image_url($item['img_title']);
        }
        if (!empty($item['link'])) {
            $total_link = base_url($item['link']);
        }
        $body .= <<<EOT
            <div class="view view-tenth">
                    <img src="{$img_link}" />
                    <div class="mask">
                        <h2>{$header}</h2>
                        <p>{$content}</p>
                        <a href="{$total_link}" class="info">Подробнее</a>
                    </div>
                </div>
EOT;
    }
    return "<article class=\"list-poly_block\">{$body}<div class=\"clear\"></div></article>";
}
コード例 #21
0
ファイル: viewProfile.php プロジェクト: khanals/rbs-ext
?>
</td>
                                  <td class="dt2"><?php 
$cnt = '';
foreach ($userContacts->result() as $urow) {
    if ($urow->msn != "") {
        $cnt .= '<img src="' . image_url('msn.png') . '" width="21" height="19" title="msn"/>' . " ";
    }
    if ($urow->gtalk != "") {
        $cnt .= '<img src="' . image_url('gtalk.png') . '" width="24" height="19" title="gtalk"/>' . " ";
    }
    if ($urow->yahoo != "") {
        $cnt .= '<img src="' . image_url('yahoo.png') . '" width="23" height="19" title="yahoo"/>' . " ";
    }
    if ($urow->skype != "") {
        $cnt .= '<img src="' . image_url('skype.png') . '" width="19" height="19" title="skype"/>' . " ";
    }
    echo $cnt;
}
?>
</td>								  
                                </tr>
								<tr>
                                  <td class="dt1 dt0"><?php 
echo $this->lang->line('Member Since:');
?>
</td>
                                  <td class="dt1"><?php 
echo get_datetime($user->created);
?>
</td>								  
コード例 #22
0
 /**
  * Output message stack
  *
  * @param $field
  * @return string
  */
 function output($field)
 {
     if (sizeof($this->messages) > 0) {
         $messages = '<ul>';
         for ($i = 0, $n = sizeof($this->messages); $i < $n; $i++) {
             if ($this->messages[$i]['field'] == $field) {
                 switch ($this->messages[$i]['type']) {
                     case 'error':
                         $bullet_image = image_url('icons/error.gif');
                         break;
                     case 'warning':
                         $bullet_image = image_url('icons/warning.gif');
                         break;
                     case 'success':
                         $bullet_image = image_url('icons/success.gif');
                         break;
                     default:
                         $bullet_image = image_url('icons/bullet_default.gif');
                 }
                 $messages .= '<li style="list-style-image: url(\'' . $bullet_image . '\')">' . output_string($this->messages[$i]['message']) . '</li>';
             }
         }
         $messages .= '</ul>';
         return '<div class="alert alert-info">' . $messages . '</div>';
     }
     return '';
 }
コード例 #23
0
	
	#container{
		margin: 10px;
		border: 1px solid #D0D0D0;
		-webkit-box-shadow: 0 0 8px #D0D0D0;
	}
	</style>
	<?php 
echo js('less-1.3.0.min.js');
?>
</head>
<body>

<div id="container">
    <img src="<?php 
echo image_url('site/header.jpg');
?>
" alt="header" />
	<h1>Welcome to CodeIgniter!</h1>

	<div id="body">
		<p>The page you are looking at is being generated dynamically by CodeIgniter.</p>

		<p>If you would like to edit this page you'll find it located at:</p>
		<code>application/views/welcome_message.php</code>

		<p>The corresponding controller for this page is found at:</p>
		<code>application/controllers/welcome.php</code>

		<p>If you are exploring CodeIgniter for the very first time, you should start by reading the <a href="user_guide/">User Guide</a>.</p>
	</div>
コード例 #24
0
<div class="rounded_box lightgrey borderless cut_bottom dashboard_view_header" style="margin-top: 5px;">
	<?php 
if ($rss == true) {
    ?>
		<?php 
    echo link_tag(make_url('search', array_merge($parameters, array('format' => 'rss'))), image_tag('icon_rss.png'), array('title' => __('Download feed'), 'style' => 'float: right; margin-left: 5px;', 'class' => 'image'));
    ?>
	<?php 
}
?>
		<?php 
echo image_tag('collapse_small.png', array('id' => 'dashboard_' . $id . '_collapse', 'style' => 'float: left; margin: 3px 5px 0 2px;', 'onclick' => "\$('dashboard_{$id}').toggle(); this.src = (this.src == '" . image_url('collapse_small.png', false, 'core', false) . "') ? '" . image_url('expand_small.png', false, 'core', false) . "' : '" . image_url('collapse_small.png', false, 'core', false) . "'"));
?>
		<?php 
//echo image_tag('collapse.png', array('id' => 'dashboard_'.$id.'_collapse', 'onclick' => "$('dashboard_{$id}').toggle(); this.src = (this.src == '" . image_url('collapse.png', false, 'core', false) . "') ? '" . image_url('expand.png', false, 'core', false) . "' : '" . image_url('collapse.png', false, 'core', false) . "'"));
?>
		<?php 
echo __($title);
?>
</div>
<div id="dashboard_<?php 
echo $id;
?>
">
	<?php 
if (count($issues) > 0) {
    ?>
		<table cellpadding=0 cellspacing=0 style="margin: 5px;">
		<?php 
    foreach ($issues as $theIssue) {
        ?>
コード例 #25
0
 private function getList($data, $filter)
 {
     $url = '?';
     if ($this->input->get('page')) {
         $filter['page'] = (int) $this->input->get('page');
     } else {
         $filter['page'] = 1;
     }
     if ($this->config->item('page_limit')) {
         $filter['limit'] = $this->config->item('page_limit');
     } else {
         $filter['limit'] = '';
     }
     if ($this->input->get('filter_search')) {
         $filter['filter_search'] = $data['filter_search'] = $this->input->get('filter_search');
     } else {
         $data['filter_search'] = '';
     }
     if ($this->input->get('filter_access')) {
         $filter['filter_access'] = $data['filter_access'] = $this->input->get('filter_access');
         $url .= 'filter_access=' . $filter['filter_access'] . '&';
     } else {
         $filter['filter_access'] = $data['filter_access'] = '';
     }
     if ($this->input->get('filter_date')) {
         $filter['filter_date'] = $data['filter_date'] = $this->input->get('filter_date');
         $url .= 'filter_date=' . $filter['filter_date'] . '&';
     } else {
         $filter['filter_date'] = $data['filter_date'] = '';
     }
     if ($this->input->get('sort_by')) {
         $filter['sort_by'] = $data['sort_by'] = $this->input->get('sort_by');
     } else {
         $filter['sort_by'] = $data['sort_by'] = 'date_added';
     }
     if ($this->input->get('order_by')) {
         $filter['order_by'] = $data['order_by'] = $this->input->get('order_by');
         $data['order_by_active'] = $this->input->get('order_by') . ' active';
     } else {
         $filter['order_by'] = $data['order_by'] = 'DESC';
         $data['order_by_active'] = '';
     }
     if ($filter['filter_type'] === 'online') {
         $data['text_empty'] = $this->lang->line('text_empty');
     } else {
         $data['text_empty'] = $this->lang->line('text_empty_report');
     }
     $order_by = (isset($filter['order_by']) and $filter['order_by'] == 'ASC') ? 'DESC' : 'ASC';
     $data['sort_date'] = site_url('customers_online' . $url . 'sort_by=date_added&order_by=' . $order_by);
     $customers_online = $this->Customer_online_model->getList($filter);
     $data['customers_online'] = array();
     foreach ($customers_online as $online) {
         $country_code = $online['country_code'] ? strtolower($online['country_code']) : 'no_flag';
         $data['customers_online'][] = array('activity_id' => $online['activity_id'], 'ip_address' => $online['ip_address'], 'customer_name' => $online['customer_id'] ? $online['first_name'] . ' ' . $online['last_name'] : $this->lang->line('text_guest'), 'access_type' => ucwords($online['access_type']), 'browser' => $online['browser'], 'user_agent' => $online['user_agent'], 'request_uri' => !empty($online['request_uri']) ? $online['request_uri'] : '--', 'referrer_uri' => !empty($online['referrer_uri']) ? $online['referrer_uri'] : '--', 'request_url' => !empty($online['request_uri']) ? root_url($online['request_uri']) : '#', 'referrer_url' => !empty($online['referrer_uri']) ? root_url($online['referrer_uri']) : '#', 'date_added' => time_elapsed($online['date_added']), 'country_code' => image_url('data/flags/' . $country_code . '.png'), 'country_name' => $online['country_name'] ? $online['country_name'] : $this->lang->line('text_private'));
     }
     $data['types'] = array('online' => array('badge' => '', 'url' => site_url('customers_online'), 'title' => $this->lang->line('text_online')), 'all' => array('badge' => '', 'url' => site_url('customers_online/all'), 'title' => $this->lang->line('text_all')));
     $data['online_dates'] = array();
     $online_dates = $this->Customer_online_model->getOnlineDates($filter);
     foreach ($online_dates as $date) {
         $month_year = mdate('%Y-%m', strtotime($date['year'] . '-' . $date['month']));
         $data['online_dates'][$month_year] = mdate('%F %Y', strtotime($date['date_added']));
     }
     if ($this->input->get('sort_by') and $this->input->get('order_by')) {
         $url .= 'sort_by=' . $filter['sort_by'] . '&';
         $url .= 'order_by=' . $filter['order_by'] . '&';
     }
     $config['base_url'] = page_url() . $url;
     $config['total_rows'] = $this->Customer_online_model->getCount($filter);
     $config['per_page'] = $filter['limit'];
     $this->pagination->initialize($config);
     $data['pagination'] = array('info' => $this->pagination->create_infos(), 'links' => $this->pagination->create_links());
     return $data;
 }
コード例 #26
0
ファイル: transferMoney.php プロジェクト: khanals/rbs-ext
                echo site_url('buyer/viewProfile/' . $user->id);
            }
            if ($user->role_id == '2') {
                echo site_url('programmer/viewProfile/' . $user->id);
            }
            ?>
"> <?php 
            echo $user->user_name;
            $condition = array('subscriptionuser.username' => $user->id);
            $certified1 = $this->certificate_model->getCertificateUser($condition);
            ?>
								 <?php 
            if (count($certified1->result()) > 0) {
                ?>
								<img src="<?php 
                echo image_url('certified.gif');
                ?>
" />
								<?php 
            }
            break;
        }
    }
    ?>
</a></td>
									  
									  
									  <td class="<?php 
    echo $class1;
    ?>
"><?php 
コード例 #27
0
  <tr class="logToday">
<?php 
        } elseif ($application_log_entry->isYesterday()) {
            ?>
  <tr class="logYesterday">
<?php 
        } else {
            ?>
  <tr class="logOlder">
<?php 
        }
        // if
        ?>

    <td class="logTypeIcon"><img src="<?php 
        echo image_url('logtypes/' . strtolower($application_log_entry->getRelObjectManager()) . '.gif');
        ?>
" alt="<?php 
        echo $application_log_entry->getObjectTypeName();
        ?>
" title="<?php 
        echo $application_log_entry->getObjectTypeName();
        ?>
" /></td>
    <td class="logDetails">
<?php 
        if ($application_log_entry_url = $application_log_entry->getObjectUrl()) {
            ?>
      <a href="<?php 
            echo $application_log_entry_url;
            ?>
コード例 #28
0
                </div>

                <div class="text-center" style="margin-bottom: 20px;">
                    <button class="btn btn-default btn-sm" data-toggle="modal" id="assign_ratings" data-target="#ratings_modal"><i class="fa fa-star-o"></i> <?php 
echo $this->lang->line('ui_assign_rating');
?>
</button>
                </div>

                <div class="row">

                    <div class="col-md-12">

                        <div class="pull-left" style="margin-right: 20px; margin-bottom: 20px;">
                            <img src="<?php 
echo image_url('lib/bootstrap3-dialog/pig.png');
?>
" />
                        </div>

                        <p>
                            Very long text. Very long text. Very long text. Very long text. Very long text. Very long text. Very long text. Very long text.
                            Very long text. Very long text. Very long text. Very long text. Very long text. Very long text. Very long text. Very long text.
                            Very long text. Very long text. Very long text. Very long text. Very long text. Very long text. Very long text. Very long text.
                            Very long text. Very long text. Very long text. Very long text. Very long text. Very long text. Very long text. Very long text.
                            Very long text. Very long text. Very long text. Very long text. Very long text. Very long text. Very long text. Very long text.
                            Very long text. Very long text. Very long text. Very long text. Very long text. Very long text. Very long text. Very long text.
                            Very long text. Very long text. Very long text. Very long text. Very long text. Very long text. Very long text. Very long text.
                            Very long text. Very long text. Very long text. Very long text. Very long text. Very long text. Very long text. Very long text.
                            Very long text. Very long text. Very long text. Very long text. Very long text. Very long text. Very long text. Very long text.
                            Very long text. Very long text. Very long text. Very long text. Very long text. Very long text. Very long text. Very long text.
コード例 #29
0
ファイル: contact_us.php プロジェクト: colonia/tomatocart-v2
		</div>
		<div class="span6">
            <h6><?php 
echo lang('contact_title');
?>
</h6>
            
            <div class="content">
                <div class="storeName"><?php 
echo nl2br(config('STORE_NAME_ADDRESS'));
?>
</div>
                <div class="storeAddress">
                	<strong><?php 
echo lang('contact_store_address_title');
?>
</strong><br /><img src="<?php 
echo image_url('arrow_south_east.gif');
?>
" />
                </div>
                <p><?php 
echo lang('contact');
?>
</p>
            </div>
		</div>
	</div>
</div>

コード例 #30
0
 public function getThumbnail($file_name, $sub_folder = '')
 {
     list($img_width, $img_height, $img_type, $attr) = getimagesize($this->_image_path . $this->_root_folder . $sub_folder . $file_name);
     $img_dimension = $img_width . ' x ' . $img_height;
     if ($img_width < $this->_thumb_width and $img_height < $this->_thumb_height) {
         $thumb_url = image_url($this->_root_folder . $sub_folder . $file_name);
     } else {
         $this->CI->load->model('Image_tool_model');
         $thumb_url = $this->CI->Image_tool_model->resize($sub_folder . $file_name, $this->_thumb_width, $this->_thumb_height);
     }
     return array('dimension' => $img_dimension, 'url' => $thumb_url);
 }