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


PHP Helper::mediaUrl方法代码示例

本文整理汇总了PHP中Helper::mediaUrl方法的典型用法代码示例。如果您正苦于以下问题:PHP Helper::mediaUrl方法的具体用法?PHP Helper::mediaUrl怎么用?PHP Helper::mediaUrl使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Helper的用法示例。


在下文中一共展示了Helper::mediaUrl方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: beforeSave

 public function beforeSave()
 {
     // 保存 Banner
     if ($this->bannerFile instanceof CUploadedFile && in_array(strtolower($this->bannerFile->extensionName), array('swf', 'jpg', 'jpeg', 'gif', 'png'))) {
         // 保存原文件
         $file = $this->bannerFile;
         $fileName = md5($file->tempName . uniqid()) . '.' . $file->extensionName;
         list($width, $height, $type, $attr) = getimagesize($file->tempName);
         $htmlOptions = array('width' => $width, 'height' => $height);
         $file->saveAs(Helper::mediaPath(Page::UPLOAD_BANNER_PATH . $fileName, FRONTEND));
         if ($this->moduleName == 'product') {
             $htmlOptions['class'] = 'ban';
         }
         // 生成 HTML 代码
         if (strtolower($file->extensionName) == 'swf') {
             $this->banner_section = Helper::renderFlashHtml(Helper::mediaUrl(Page::UPLOAD_BANNER_PATH . $fileName, FRONTEND), $htmlOptions);
         } else {
             $this->banner_section = CHtml::image(Helper::mediaUrl(Page::UPLOAD_BANNER_PATH . $fileName, FRONTEND), '', $htmlOptions);
         }
     }
     return parent::beforeSave();
 }
开发者ID:kinghinds,项目名称:kingtest2,代码行数:22,代码来源:PageI18n.php

示例2: run

    public function run()
    {
        list($name, $id) = $this->resolveNameID();
        if (isset($this->htmlOptions['id'])) {
            $id = $this->htmlOptions['id'];
        } else {
            $this->htmlOptions['id'] = $id;
        }
        if (isset($this->htmlOptions['name'])) {
            $name = $this->htmlOptions['name'];
        } else {
            $this->htmlOptions['name'] = $name;
        }
        if (isset($this->htmlOptions['language'])) {
            $this->language = $this->getLanguage($this->htmlOptions['language']);
        } else {
            $this->language = $this->getLanguage(null);
        }
        if (isset($this->htmlOptions['width'])) {
            $this->width = $this->htmlOptions['width'];
        } else {
            $this->width = self::DEFAULT_WIDTH;
        }
        if (isset($this->htmlOptions['height'])) {
            $this->height = $this->htmlOptions['height'];
        } else {
            $this->height = self::DEFAULT_HEIGHT;
        }
        if (isset($this->htmlOptions['class'])) {
            $this->class = $this->getClass($this->htmlOptions['class']);
        } else {
            $this->class = self::DEFAULT_CLASS;
        }
        $this->htmlOptions['class'] = $this->class;
        if ($this->hasModel()) {
            echo CHtml::activeTextArea($this->model, $this->attribute, $this->htmlOptions);
        } else {
            echo CHtml::textArea($name, $this->value, $this->htmlOptions);
        }
        $basePath = Yii::app()->basePath . '/extensions/tinymce/';
        $baseUrl = Yii::app()->getAssetManager()->publish($basePath);
        $editorUrl = $baseUrl . '/tiny_mce_' . self::TINYMCE_VERSION;
        $contentCssUrl = Helper::mediaUrl('inc/layout_backend.css', FRONTEND);
        $kcfinderUrl = $baseUrl . '/kcfinder-' . self::KCFINDER_VERSION;
        // 设置 KCFinder 图片默认排序
        if (isset($_COOKIES['KCFINDER_order']) == false) {
            setcookie('KCFINDER_order', 'date', time() + 86400 * 30);
        }
        if (isset($_COOKIES['KCFINDER_orderDesc']) == false) {
            setcookie('KCFINDER_orderDesc', 'on', time() + 86400 * 30);
        }
        Yii::app()->clientScript->registerCoreScript('jquery');
        $cs = Yii::app()->getClientScript();
        $cs->registerScriptFile($editorUrl . '/jquery.tinymce.js');
        $cs->registerScriptFile($editorUrl . '/tiny_mce_gzip.js');
        // TinyMCE PHP Compressor Config
        $js = <<<EOP
tinyMCE_GZ.init({
\tmode : 'exact',
\teditor_selector : '{$this->class}',
\tthemes : 'advanced',
\tplugins : 'autolink,lists,pagebreak,style,layer,table,advhr,advimage,advlink,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template,advlist',
\tlanguages : '{$this->language}',
\tdisk_cache : true,
\tdebug : false
});
EOP;
        $cs->registerScript(__CLASS__ . '_TinyMCE_Compressor', $js);
        // TinyMCE Config
        $js = <<<EOP
\$('.{$this->class}').tinymce({
\tscript_url : '{$editorUrl}/tiny_mce.js',
\tlanguage : '{$this->language}',
\ttheme : 'advanced',
\tplugins : 'autolink,lists,pagebreak,style,layer,table,advhr,advimage,advlink,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template,advlist',
\twidth : '{$this->width}',
\theight : '{$this->height}',
\ttheme_advanced_buttons1 : 'newdocument,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,styleselect,formatselect,fontselect,fontsizeselect',
\ttheme_advanced_buttons2 : 'cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,|,insertdate,inserttime,|,forecolor,backcolor',
\ttheme_advanced_buttons3 : 'tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,iespell,media,advhr,|,ltr,rtl',
\ttheme_advanced_buttons4 : 'insertlayer,moveforward,movebackward,absolute,|,styleprops,|,cite,abbr,acronym,del,ins,attribs,|,visualchars,nonbreaking,template,pagebreak,|,fullscreen,preview,code',
\ttheme_advanced_toolbar_location : 'top',
\ttheme_advanced_toolbar_align : 'left',
\ttheme_advanced_statusbar_location : 'bottom',
\ttheme_advanced_resizing : true,
\ttheme_advanced_fonts : '宋体=宋体;黑体=黑体;楷书=楷书;幼圆=幼圆;Andale Mono=andale mono,times;Arial=arial,helvetica,sans-serif;Arial Black=arial black,avant garde;Book Antiqua=book antiqua,palatino;Comic Sans MS=comic sans ms,sans-serif;Courier New=courier new,courier;Georgia=georgia,palatino;Helvetica=helvetica;;Impact=impact,chicago;;Symbol=symbol;Tahoma=tahoma,arial,helvetica,sans-serif;Terminal=terminal,monaco;Times New Roman=times new roman,times;Trebuchet MS=trebuchet ms,geneva;Verdana=verdana,geneva;Webdings=webdings;Wingdings=wingdings,zapf dingbats;',
\tkeep_styles : true,
\tconvert_fonts_to_spans : false,
\tconvert_newlines_to_brs : false,
\t// verify_css_classes : false,
\t// verify_html : false,
\t// forced_root_block : false,
\tvalid_elements : '*[*],img[class|src|border|alt=|title|hspace|vspace|width|height|align|onmouseover|onmouseout|name|style]',
\textended_valid_elements : '*[*],script[charset|defer|language|src|type]',
\tconvert_urls : false,
\tfile_browser_callback : openKcFinder,
\tcontent_css : '{$contentCssUrl}'
});
EOP;
        $cs->registerScript(__CLASS__ . '_TinyMCE', $js);
//.........这里部分代码省略.........
开发者ID:kinghinds,项目名称:kingtest2,代码行数:101,代码来源:TinyMCEWidget.php

示例3: run

 public function run()
 {
     list($name, $id) = $this->resolveNameID();
     if (isset($this->htmlOptions['id'])) {
         $id = $this->htmlOptions['id'];
     } else {
         $this->htmlOptions['id'] = $id;
     }
     if (isset($this->htmlOptions['name'])) {
         $name = $this->htmlOptions['name'];
     } else {
         $this->htmlOptions['name'] = $name;
     }
     if (isset($this->htmlOptions['language'])) {
         $this->setLanguage($this->htmlOptions['language']);
     } else {
         $this->setLanguage(null);
     }
     if (isset($this->htmlOptions['width'])) {
         $this->setWidth($this->htmlOptions['width']);
     } else {
         $this->setWidth(self::DEFAULT_WIDTH);
     }
     if (isset($this->htmlOptions['height'])) {
         $this->setHeight($this->htmlOptions['height']);
     } else {
         $this->setHeight(self::DEFAULT_HEIGHT);
     }
     if (isset($this->htmlOptions['class'])) {
         $this->setClass($this->htmlOptions['class']);
     } else {
         $this->setClass(self::DEFAULT_CLASS);
     }
     if ($this->hasModel()) {
         echo CHtml::activeTextArea($this->model, $this->attribute, $this->htmlOptions);
     } else {
         echo CHtml::textArea($name, $this->value, $this->htmlOptions);
     }
     $editorPath = Yii::app()->basePath . '/extensions/tinymce/tiny_mce_3.4.9';
     $editorBaseUrl = Yii::app()->getAssetManager()->publish($editorPath);
     Yii::app()->clientScript->registerCoreScript('jquery');
     $cs = Yii::app()->getClientScript();
     $cs->registerScriptFile($editorBaseUrl . '/jquery.tinymce.js');
     //$cs->registerScriptFile($editorBaseUrl . '/file_browser.js');
     $cs->registerScriptFile($editorBaseUrl . '/tiny_mce_gzip.js');
     /*
     $js = "tinyMCE_GZ.init({" . self::BR;
     $js .= self::TAB . "mode : 'exact'," . self::BR;
     //$js .= self::TAB . "elements : '" . $id . "'," . self::BR;
     $js .= self::TAB . "editor_selector : '" . $this->getClass() . "',"
     		. self::BR;
     $js .= self::TAB . "themes : 'advanced'," . self::BR;
     $js .= self::TAB
     		. "plugins : 'autolink,lists,pagebreak,style,layer,table,advhr,advimage,advlink,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template,advlist',"
     		. self::BR;
     $js .= self::TAB . "languages : '" . $this->getLanguage() . "',"
     		. self::BR;
     $js .= self::TAB . "disk_cache : true," . self::BR;
     $js .= self::TAB . "debug : false" . self::BR;
     $js .= "});" . self::BR;
     */
     $js = '';
     //$js .= "jQuery('#" . $id . "').tinymce({" . self::BR;
     $js .= "\$('." . self::DEFAULT_CLASS . "').tinymce({" . self::BR;
     // Location of TinyMCE script
     $js .= self::TAB . "script_url : '" . $editorBaseUrl . "/tiny_mce.js'," . self::BR;
     // General options
     $js .= self::TAB . "language : '" . $this->getLanguage() . "'," . self::BR;
     $js .= self::TAB . "theme : 'advanced'," . self::BR;
     $js .= self::TAB . "plugins : 'autolink,lists,pagebreak,style,layer,table,advhr,advimage,advlink,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template,advlist'," . self::BR;
     $js .= self::TAB . "width : '" . $this->getWidth() . "'," . self::BR;
     $js .= self::TAB . "height : '" . $this->getHeight() . "'," . self::BR;
     // Theme options
     $js .= self::TAB . "theme_advanced_buttons1 : 'newdocument,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,styleselect,formatselect,fontselect,fontsizeselect'," . self::BR;
     $js .= self::TAB . "theme_advanced_buttons2 : 'cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,|,insertdate,inserttime,|,forecolor,backcolor'," . self::BR;
     $js .= self::TAB . "theme_advanced_buttons3 : 'tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,iespell,media,advhr,|,ltr,rtl'," . self::BR;
     $js .= self::TAB . "theme_advanced_buttons4 : 'insertlayer,moveforward,movebackward,absolute,|,styleprops,|,cite,abbr,acronym,del,ins,attribs,|,visualchars,nonbreaking,template,pagebreak,|,fullscreen,preview,code'," . self::BR;
     $js .= self::TAB . "theme_advanced_toolbar_location : 'top'," . self::BR;
     $js .= self::TAB . "theme_advanced_toolbar_align : 'left'," . self::BR;
     $js .= self::TAB . "theme_advanced_statusbar_location : 'bottom'," . self::BR;
     $js .= self::TAB . "theme_advanced_resizing : true," . self::BR;
     $js .= self::TAB . "theme_advanced_fonts : '宋体=宋体;黑体=黑体;楷书=楷书;幼圆=幼圆;Andale Mono=andale mono,times;Arial=arial,helvetica,sans-serif;Arial Black=arial black,avant garde;Book Antiqua=book antiqua,palatino;Comic Sans MS=comic sans ms,sans-serif;Courier New=courier new,courier;Georgia=georgia,palatino;Helvetica=helvetica;;Impact=impact,chicago;;Symbol=symbol;Tahoma=tahoma,arial,helvetica,sans-serif;Terminal=terminal,monaco;Times New Roman=times new roman,times;Trebuchet MS=trebuchet ms,geneva;Verdana=verdana,geneva;Webdings=webdings;Wingdings=wingdings,zapf dingbats;'," . self::BR;
     // Cleanup/Output
     $js .= self::TAB . "keep_styles : true," . self::BR;
     $js .= self::TAB . "convert_fonts_to_spans : false," . self::BR;
     $js .= self::TAB . "convert_newlines_to_brs : false," . self::BR;
     $js .= self::TAB . "valid_children : false," . self::BR;
     $js .= self::TAB . "valid_elements : false," . self::BR;
     $js .= self::TAB . "verify_css_classes : false," . self::BR;
     //$js .= self::TAB . "verify_html : false," . self::BR;
     $js .= self::TAB . "forced_root_block : false," . self::BR;
     // URL
     $js .= self::TAB . "convert_urls : false," . self::BR;
     // Image Upload
     $js .= self::TAB . "image_upload_url : '" . Yii::app()->createUrl('site/tinymceImageUpload') . "&editor_base_url=" . $editorBaseUrl . "'," . self::BR;
     // Content Css
     $js .= self::TAB . "content_css : '" . Helper::mediaUrl('inc/layout_backend.css', FRONTEND) . "'" . self::BR;
     $js .= "});" . self::BR;
     //$cs->registerScript(__CLASS__ . '#' . $id, $js);
     $cs->registerScript(__CLASS__, $js);
//.........这里部分代码省略.........
开发者ID:kinghinds,项目名称:kingtest2,代码行数:101,代码来源:TinyMCEWidget.php

示例4: url

<?php

$this->beginClip('extraHead');
?>
<meta http-equiv="refresh" content="<?php 
echo $delay;
?>
; url=<?php 
echo $url;
?>
" />
<style type="text/css">
#pbody { background-image: url(<?php 
echo Helper::mediaUrl('images/banner_other.jpg');
?>
); }
</style>
<?php 
$this->endClip();
?>
<div class="content">
	<div class="container">
		<div style="padding:20px;">
			<div class="newstext">
				<div><?php 
echo CHtml::encode($message);
?>
</div>
				<div><?php 
echo Yii::t('common', 'Page is redirect, please wait ...');
?>
开发者ID:kinghinds,项目名称:kingtest2,代码行数:31,代码来源:redirect.php

示例5: actionTinymceImageUpload

 public function actionTinymceImageUpload()
 {
     require_once 'Image.php';
     if ($_FILES) {
         // 检查图片是否存在
         $file = CUploadedFile::getInstanceByName('imageFile');
         if (empty($file) == true) {
             //$this->tinymceShowMessage(false, null, '请选择需要上传的图片');
             $this->tinymceShowMessage(false, null, '\\u8BF7\\u9009\\u62E9\\u9700\\u8981\\u4E0A\\u4F20\\u7684\\u56FE\\u7247');
         }
         // 检查图片后缀是否被允许
         $imageExtList = array('jpg', 'jpeg', 'gif', 'png');
         if (in_array(strtolower($file->extensionName), $imageExtList) == false) {
             //$this->tinymceShowMessage(false, null, '不允许上传的图片格式');
             $this->tinymceShowMessage(false, null, '\\u4E0D\\u5141\\u8BB8\\u4E0A\\u4F20\\u7684\\u56FE\\u7247\\u683C\\u5F0F');
         }
         // 检查图片是否可以识别
         list($width, $height, $type, $attr) = getimagesize($file->tempName);
         if (empty($width) || empty($height)) {
             //$this->tinymceShowMessage(false, null, $file->name . ' 图片无法识别');
             $this->tinymceShowMessage(false, null, $file->name . ' \\u56FE\\u7247\\u65E0\\u6CD5\\u8BC6\\u522B');
         }
         try {
             // 保存原图片
             $fileName = md5($file->tempName . uniqid()) . '.' . $file->extensionName;
             $filePath = Helper::mediaPath('upload/editor/orig/' . $fileName, FRONTEND);
             $file->saveAs($filePath);
             list($width, $height, $type, $attr) = getimagesize($filePath);
             $imageWidthLimit = Yii::app()->params['editorUploadImageWidthLimit'];
             if ($width > $imageWidthLimit) {
                 // 裁切缩略图
                 $image = new Image($filePath);
                 $image->resize($imageWidthLimit, $imageWidthLimit / $width * $height, Image::RESIZE_SPECIFY_WIDTH)->save(Helper::mediaPath('upload/editor/large/' . $fileName, FRONTEND));
                 // $this->tinymceShowMessage(true, Helper::mediaUrl('upload/editor/large/' . $fileName, 'FRONTEND'), '图片上传成功');
                 $this->tinymceShowMessage(true, Helper::mediaUrl('upload/editor/large/' . $fileName, FRONTEND), '\\u56FE\\u7247\\u4E0A\\u4F20\\u6210\\u529F');
             } else {
                 // $this->tinymceShowMessage(true, Helper::mediaUrl('upload/orig/' . $fileName, 'FRONTEND'), '图片上传成功');
                 $this->tinymceShowMessage(true, Helper::mediaUrl('upload/editor/orig/' . $fileName, FRONTEND), '\\u56FE\\u7247\\u4E0A\\u4F20\\u6210\\u529F');
             }
         } catch (Exception $e) {
             // $this->tinymceShowMessage(false, null, '图片上传失败');
             $this->tinymceShowMessage(false, null, '\\u56FE\\u7247\\u4E0A\\u4F20\\u5931\\u8D25');
         }
     }
     $editorBaseUrl = Yii::app()->request->getQuery('editor_base_url');
     $this->layout = false;
     $this->render('tinymceImageUpload', array('editorBaseUrl' => $editorBaseUrl));
 }
开发者ID:kinghinds,项目名称:kingtest2,代码行数:48,代码来源:SiteController.php

示例6: array

?>
" type="image/x-icon" />
<meta name="Author" content="Shenzhen Doocom Technology Co., Ltd. http://www.doocom.cn, Dec 2012" />
<?php 
echo CHtml::tag('title', array(), $this->pageTitle) . "\r\n";
if ($this->metaKeywords) {
    echo CHtml::metaTag($this->metaKeywords, 'keywords') . "\r\n";
}
if ($this->metaDescription) {
    echo CHtml::metaTag($this->metaDescription, 'description') . "\r\n";
}
echo CHtml::cssFile(Helper::mediaUrl('inc/style.css')) . "\r\n";
echo CHtml::scriptFile(Helper::mediaUrl('inc/jquery.js')) . "\r\n";
echo CHtml::scriptFile(Helper::mediaUrl('inc/func.js')) . "\r\n";
echo CHtml::scriptFile(Helper::mediaUrl('inc/jquery.cycle.all.min.js')) . "\r\n";
echo CHtml::scriptFile(Helper::mediaUrl('inc/jquery.masonry.min.js')) . "\r\n";
?>

</head>

<body>
<div class="wrapper">
	<?php 
$this->widget('Header');
?>
    <?php 
echo $content;
?>
    <?php 
$this->widget('Footer');
?>
开发者ID:kinghinds,项目名称:kingtest2,代码行数:31,代码来源:sitemap.php

示例7: getBgImageUrl

 public function getBgImageUrl()
 {
     $bgImagePath = Helper::mediaPath(self::UPLOAD_BG_IMAGE_PATH . $this->bg_image_path, FRONTEND);
     if (is_file($bgImagePath)) {
         return Helper::mediaUrl(self::UPLOAD_BG_IMAGE_PATH . $this->bg_image_path, FRONTEND);
     } else {
         return false;
     }
 }
开发者ID:kinghinds,项目名称:kingtest2,代码行数:9,代码来源:Page.php

示例8: setTimeout

<head>
<?php 
echo CHtml::metaTag('text/html; charset=utf-8', null, 'Content-Type') . "\n";
echo CHtml::metaTag($delay . '; url=' . CHtml::normalizeUrl($url), null, 'refresh');
?>
<title><?php 
echo $this->pageTitle;
?>
</title>
<?php 
echo CHtml::cssFile(Helper::mediaUrl('resources/screen.css'), 'screen, projection');
echo CHtml::cssFile(Helper::mediaUrl('resources/print.css'), 'print');
?>
<!--[if lt IE 8]>
<?php 
echo CHtml::cssFile(Helper::mediaUrl('resources/ie.css'), 'screen, projection');
?>
<![endif]-->
<style type="text/css">
#redirectMessage {
	margin: 18px 0;
	text-align: center;
	font-size: 1.4em;
	font-family: "微软雅黑";
}
</style>
<script type="text/javascript">
//<![CDATA[
if ( navigator.product == 'Gecko' )
    setTimeout("moz_redirect()",<?php 
echo $delay * 1000 - 500;
开发者ID:kinghinds,项目名称:kingtest2,代码行数:31,代码来源:redirect.php

示例9: getThumbnailImageUrl

 public function getThumbnailImageUrl()
 {
     return Helper::mediaUrl(Product::UPLOAD_THUMBNAIL_IMAGE_PATH . $this->image_path, FRONTEND);
 }
开发者ID:kinghinds,项目名称:kingtest2,代码行数:4,代码来源:ProductImage.php

示例10: array

echo CHtml::tag('title', array(), $this->pageTitle) . "\r\n";
?>
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <?php 
if ($this->metaKeywords) {
    echo CHtml::metaTag($this->metaKeywords, 'keywords') . "\r\n";
}
?>
  <?php 
if ($this->metaDescription) {
    echo CHtml::metaTag($this->metaDescription, 'description') . "\r\n";
}
?>
  <!-- Stylesheets -->
  <?php 
echo CHtml::cssFile(Helper::mediaUrl('style/css/bootstrap.css')) . "\r\n";
?>
  <!-- Font awesome icon -->
  <link rel="stylesheet" href="/style/css/font-awesome.css">
  <!-- Flexslider -->
  <link rel="stylesheet" href="/style/css/flexslider.css">  
  <!-- prettyPhoto -->
  <link rel="stylesheet" href="/style/css/prettyPhoto.css">
  <!-- Main stylesheet -->
  <link href="/style/css/style.css" rel="stylesheet">
	<link href="/style/css/king.css" rel="stylesheet">
  <!-- Bootstrap responsive -->
  <link href="/style/css/bootstrap-responsive.css" rel="stylesheet">
  <script src="/style/js/jquery.js"></script>
  <!-- JiaThis Button BEGIN -->
  <script src="/style/js/share.js"></script>
开发者ID:kinghinds,项目名称:kingtest2,代码行数:31,代码来源:main.php

示例11: getImageUrl

 public function getImageUrl()
 {
     $imageUrl = false;
     if (empty($this->imageFileName) == false) {
         $imageFilePath = Helper::mediaPath(JobApply::UPLOAD_IMAGE_PATH . $this->imageFileName);
         if (is_file($imageFilePath)) {
             $imageUrl = Helper::mediaUrl(JobApply::UPLOAD_IMAGE_PATH . $this->imageFileName);
         }
     }
     return $imageUrl;
 }
开发者ID:kinghinds,项目名称:kingtest2,代码行数:11,代码来源:JobApplyForm1.php

示例12: array

if ($model->{'banner_path_' . $lang}) {
    ?>
 
			<br />
			<?php 
    if (FileHelper::getFileExt($model->{'banner_path_' . $lang}) == 'swf') {
        ?>
			<?php 
        echo CHtml::link(Helper::mediaUrl(Banner::UPLOAD_ORIGINAL_FILE_PATH . $model->i18nFormData['banner_path_' . $lang], FRONTEND), Helper::mediaUrl(Banner::UPLOAD_ORIGINAL_FILE_PATH . $model->i18nFormData['banner_path_' . $lang], FRONTEND), array('target' => '_blank'));
        ?>
			<?php 
    } else {
        ?>
 
			<?php 
        echo CHtml::image(Helper::mediaUrl(Banner::UPLOAD_LARGE_IMAGE_PATH . $model->i18nFormData['banner_path_' . $lang], FRONTEND));
        ?>
			<?php 
    }
    ?>
 
			<br />
			<?php 
    echo CHtml::checkBox(CHtml::activeName($model, 'i18nFormData') . '[deleteBannerFile_' . $lang . ']', $model->i18nFormData['deleteBannerFile_' . $lang]);
    ?>
			删除文件 
			<?php 
}
?>
 
			<?php 
开发者ID:kinghinds,项目名称:kingtest2,代码行数:31,代码来源:createI18n.php

示例13: getThumbFileUrl

 public function getThumbFileUrl()
 {
     $fileExt = CFileHelper::getExtension($this->image_path);
     if (in_array($fileExt, array('jpg', 'jpeg', 'gif', 'png'))) {
         return Helper::mediaUrl(self::UPLOAD_THUMBNAIL_IMAGE_PATH . $this->image_path, FRONTEND);
     } else {
         return Helper::mediaUrl(self::UPLOAD_ORIGINAL_FILE_PATH . $this->image_path, FRONTEND);
     }
 }
开发者ID:kinghinds,项目名称:kingtest2,代码行数:9,代码来源:Server.php

示例14: array

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en" xml:lang="en">
<head>
<meta content="text/html; charset=UTF-8" http-equiv="content-type" />
<?php 
echo CHtml::tag('title', array(), $this->pageTitle) . "\r\n";
?>
<!-- <?php 
echo CHtml::tag('title', array(), Yii::app()->name) . "\r\n";
?>
 -->
<?php 
echo CHtml::metaTag('Shenzhen Yunle Technology Co., Ltd. http://www.joy-cloud.com Aug 2013', 'author') . "\r\n";
echo CHtml::metaTag('noindex', 'robots') . "\r\n";
echo CHtml::metaTag('no', null, 'imagetoolbar') . "\r\n";
echo CHtml::cssFile(Helper::mediaUrl('stylesheet/stylesheet.css')) . "\r\n";
Yii::app()->clientScript->registerCoreScript('jquery');
echo CHtml::scriptFile(Yii::app()->baseUrl . '/javascript/superfish/js/superfish.js') . "\r\n";
?>
<script type="text/javascript">
$(function() {
	$('#menu > ul').superfish({
		hoverClass	 : 'sfHover',
		pathClass	 : 'overideThisToUse',
		delay		 : 0,
		animation	 : {height: 'show'},
		speed		 : 'normal',
		autoArrows   : false,
		dropShadows  : false, 
		disableHI	 : false, /* set to true to disable hoverIntent detection */
		onInit		 : function(){},
开发者ID:kinghinds,项目名称:kingtest2,代码行数:31,代码来源:main.php

示例15: getLargeUrl

 public function getLargeUrl()
 {
     return Helper::mediaUrl(self::UPLOAD_LARGE_IMAGE_PATH . $this->banner_path, FRONTEND);
 }
开发者ID:kinghinds,项目名称:kingtest2,代码行数:4,代码来源:Banner.php


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