Пример #1
0
/**
 * 获取用户头像相对网站根目录的地址
 */
function sp_get_user_avatar_url($avatar)
{
    if ($avatar) {
        if (strpos($avatar, "http") === 0) {
            return $avatar;
        } else {
            return sp_get_asset_upload_path("../avatar/" . $avatar);
        }
    } else {
        return $avatar;
    }
}
            ?>
             	 
                <div class="item">
					<div class="tc-gridbox">
                        <div class="header">
                            
                      	<?php 
            if (!empty($smeta['thumb'])) {
                ?>
<div class="item-image">
                      		<a href="<?php 
                echo leuu('article/index', array('id' => $vo['tid']));
                ?>
">
								<img  src="<?php 
                echo sp_get_asset_upload_path($smeta['thumb']);
                ?>
" class="img-responsive" alt="<?php 
                echo $vo["post_title"];
                ?>
">
							</a>
						</div>
                      	<?php 
            } else {
            }
            ?>
                     
                            <h3><a href="<?php 
            echo leuu('article/index', array('id' => $vo['tid']));
            ?>
            <tr>
              <th width="80">相册图集 </th>
              <td>
				<fieldset class="blue pad-10">
		        <legend>图片列表</legend>
		        <ul id="photos" class="picList unstyled">
			        <?php 
if (is_array($smeta['photo'])) {
    foreach ($smeta['photo'] as $key => $vo) {
        ?>
<li id="savedimage<?php 
        echo $key;
        ?>
">
				        	<input type="text" name="photos_url[]" value="<?php 
        echo sp_get_asset_upload_path($vo['url']);
        ?>
" title='双击查看' style="width:310px;" ondblclick="image_priview(this.value);" class="input">
				        	<input type="text" name="photos_alt[]" value="<?php 
        echo $vo["alt"];
        ?>
" style="width:160px;" class="input" onfocus="if(this.value == this.defaultValue) this.value = ''" onblur="if(this.value.replace(' ','') == '') this.value = this.defaultValue;">
				        	<a href="javascript:remove_div('savedimage<?php 
        echo $key;
        ?>
')">移除</a>
				        </li><?php 
    }
}
?>
		        </ul>
        <tr>
          <td>
          	<div  style="text-align: center;"><input type='hidden' name='slide_pic' id='thumb' value='<?php 
echo $slide_pic;
?>
'>
			<a href='javascript:void(0);' onclick="flashupload('thumb_images', '附件上传','thumb',thumb_images,'1,jpg|jpeg|gif|png|bmp,1,,,1','','','');return false;">
				<?php 
if (empty($slide_pic)) {
    ?>
<img src="/statics/images/icon/upload-pic.png" id='thumb_preview' width='135' height='113' style='cursor:hand' />
				<?php 
} else {
    ?>
					<img src="<?php 
    echo sp_get_asset_upload_path($slide_pic);
    ?>
" id='thumb_preview' width='135' height='113' style='cursor:hand;height:113px;' /><?php 
}
?>
				
			</a>
            <input type="button"  class="btn" onclick="$('#thumb_preview').attr('src','/statics/images/icon/upload-pic.png');$('#thumb').val('');return false;" value="取消图片">
            </div>
			</td>
        </tr>
        
      </table>
    </div>
  </div>
  <div class="col-auto">
$home_slides = empty($home_slides) ? $default_home_slides : $home_slides;
?>
<ul id="homeslider" class="unstyled">
    <?php 
if (is_array($home_slides)) {
    foreach ($home_slides as $key => $vo) {
        ?>
<li>
            <div class="caption-wraper">

            </div>
            <a href="<?php 
        echo $vo["slide_url"];
        ?>
"><img src="<?php 
        echo sp_get_asset_upload_path($vo['slide_pic']);
        ?>
" alt=""></a>
        </li><?php 
    }
}
?>
</ul>
<link href="http://mooc2.edusoho.cn/assets/v2/bootstrap/css/bootstrap.css?1.4.9" rel="stylesheet">


<link rel="stylesheet" media="screen" href="http://mooc2.edusoho.cn/themes/mooc/css/theme.css?1.4.9">
<section class="es-section section-gray" id="course-list">
    <div class="container">
        <div class="course-filter section-header" id="course-filter">
            推荐课程