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


PHP SiteHelpers::showUploadedFile方法代码示例

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


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

示例1: foreach

					<td width="50"><input type="checkbox" class="ids" name="id[]" value="<?php 
    echo $row->id;
    ?>
" />  </td>
				 <?php 
    foreach ($tableGrid as $j => $field) {
        ?>
					 <?php 
        if ($field['view'] == '1') {
            ?>
					 <td>
					 	<?php 
            if ($field['attribute']['image']['active'] == '1') {
                ?>
							<?php 
                echo SiteHelpers::showUploadedFile($row->{$field}['field'], $field['attribute']['image']['path']);
                ?>
						<?php 
            } else {
                ?>
							<?php 
                $conn = isset($field['conn']) ? $field['conn'] : array();
                echo SiteHelpers::gridDisplay($row->{$field}['field'], $field['field'], $conn);
                ?>
						<?php 
            }
            ?>
					 </td>
					 <?php 
        }
        ?>
开发者ID:HRVConsultores,项目名称:elearning,代码行数:31,代码来源:index.php

示例2:

								  </div> 					
								  <div class="form-group  " >
									<label for="Avatar" class=" control-label col-md-4 text-left"><?php 
echo $this->lang->line('core.avatar');
?>
 </label>
									<div class="col-md-8">
									  <input  type='file' name='avatar' id='avatar' 
									  <?php 
if ($row['avatar'] == '') {
    echo "class='required'";
}
?>
 style='width:150px !important;'  />
					<?php 
echo SiteHelpers::showUploadedFile($row['avatar'], '/uploads/users/');
?>
				 <br />
									  <i> <small></small></i>
									 </div> 
								  </div> </fieldset>
			
			
			<fieldset>
				<legend><?php 
echo $this->lang->line('core.password');
?>
 </legend>
				  <div class="form-group">
					<label for="ipt" class=" control-label col-md-4"><?php 
echo $this->lang->line('core.password');
开发者ID:HRVConsultores,项目名称:elearning,代码行数:31,代码来源:form.php

示例3: gridFormater

 public static function gridFormater($val, $row, $attribute = array(), $arr = array())
 {
     if ($attribute['image']['active'] == '1' && $attribute['image']['active'] != '') {
         $val = SiteHelpers::showUploadedFile($val, $attribute['image']['path']);
     }
     // Handling Quick Display As
     if (isset($arr['valid']) && $arr['valid'] == 1) {
         $fields = str_replace("|", ",", $arr['display']);
         if (isset($arr['multiple']) && $arr['multiple'] == '1') {
             $Q = DB::select(" SELECT " . $fields . " FROM " . $arr['db'] . " WHERE " . $arr['key'] . " IN (" . $val . ") ");
             if (count($Q) >= 1) {
                 $fields = explode("|", $arr['display']);
                 $val = array();
                 foreach ($Q as $values) {
                     $v = '';
                     $v .= isset($fields[0]) && $fields[0] != '' ? $values->{$fields}[0] . ' ' : '';
                     $v .= isset($fields[1]) && $fields[1] != '' ? $values->{$fields}[1] . ' ' : '';
                     $v .= isset($fields[2]) && $fields[2] != '' ? $values->{$fields}[2] . ' ' : '';
                     $val[] = $v;
                 }
                 $val = implode(", ", $val);
             }
         } else {
             $Q = DB::select(" SELECT " . $fields . " FROM " . $arr['db'] . " WHERE " . $arr['key'] . " = '" . $val . "' ");
             if (count($Q) >= 1) {
                 $rowObj = $Q[0];
                 $fields = explode("|", $arr['display']);
                 $v = '';
                 $v .= isset($fields[0]) && $fields[0] != '' ? $rowObj->{$fields}[0] . ' ' : '';
                 $v .= isset($fields[1]) && $fields[1] != '' ? $rowObj->{$fields}[1] . ' ' : '';
                 $v .= isset($fields[2]) && $fields[2] != '' ? $rowObj->{$fields}[2] . ' ' : '';
                 $val = $v;
             }
         }
     }
     // Handling format function
     if (isset($attribute['formater']['active']) and $attribute['formater']['active'] == 1) {
         $val = $attribute['formater']['value'];
         foreach ($row as $k => $i) {
             if (preg_match("/{$k}/", $val)) {
                 $val = str_replace($k, $i, $val);
             }
         }
         $c = explode("|", $val);
         if (isset($c[0]) && class_exists($c[0])) {
             $val = call_user_func(array($c[0], $c[1]), str_replace(":", ",", $c[2]));
             //$val = $c[2];
         }
     }
     // Handling Link  function
     if (isset($attribute['hyperlink']['active']) && $attribute['hyperlink']['active'] == 1 && $attribute['hyperlink']['link'] != '') {
         $attr = '';
         $linked = $attribute['hyperlink']['link'];
         foreach ($row as $k => $i) {
             if (preg_match("/{$k}/", $attribute['hyperlink']['link'])) {
                 $linked = str_replace($k, $i, $linked);
             }
         }
         if ($attribute['hyperlink']['target'] == 'modal') {
             $attr = "onclick='SximoModal(this.href); return false'";
         }
         $val = "<a href='" . URL::to($linked) . "'  {$attr} style='display:block' >" . $val . " <span class='fa fa-arrow-circle-right pull-right'></span></a>";
     }
     return $val;
 }
开发者ID:Gadurp1,项目名称:420windycity,代码行数:65,代码来源:AjaxHelpers.php

示例4:

?>
" />  
			 </div> 
		  </div>    
	
		  <div class="form-group  " >
			<label for="ipt" class=" control-label col-md-4 text-right"> Avatar </label>
			<div class="col-md-8">
			<input type="file" name="avatar">
			<br />
			 <?php 
echo $this->lang->line('core.pge_imgdim');
?>
 80 x 80 px <br />
			<?php 
echo SiteHelpers::showUploadedFile($info->avatar, '/uploads/users/');
?>
			
			 </div> 
		  </div>  
	
		  <div class="form-group">
			<label for="ipt" class=" control-label col-md-4"> </label>
			<div class="col-md-8">
				<button class="btn btn-success" type="submit"><?php 
echo $this->lang->line('core.sb_savechanges');
?>
 </button>
			 </div> 
		  </div> 	
		
开发者ID:HRVConsultores,项目名称:elearning,代码行数:30,代码来源:profile.php


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