本文整理汇总了PHP中file_icon函数的典型用法代码示例。如果您正苦于以下问题:PHP file_icon函数的具体用法?PHP file_icon怎么用?PHP file_icon使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了file_icon函数的17个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: foreach
</td>
</tr>
<?php
foreach ($orders as $k => $v) {
$color = $k % 2 == 0 ? 'color1' : 'color4';
?>
<tr class="<?php
echo $color;
?>
">
<td><a href="<?php
echo $settings[phpdisk_url];
echo urr("viewfile", "file_id={$v['file_id']}");
?>
" target="_blank"><?php
echo file_icon($v[file_extension]);
echo $v[file_name];
?>
</a></td>
<td><?php
echo $v['action'];
?>
</td>
<td class="txtgreen" align="center"><?php
echo $v['credit'];
?>
</td>
<td class="txtgray" align="right"><?php
echo $v['in_time'];
?>
</td>
开发者ID:saintho,项目名称:phpdisk,代码行数:31,代码来源:profile.tpl.php
示例2: L
echo L("parent_directory");
?>
</td></a>
</tr>
<?php
}
if (is_array($list)) {
foreach ($list as $v) {
$filename = basename($v);
?>
<tr>
<?php
if (is_dir($v)) {
echo '<td align="left"><img src="' . IMG_PATH . 'folder-closed.gif" /> <a href="?m=attachment&c=attachments&a=album_dir&dir=' . (isset($_GET['dir']) && !empty($_GET['dir']) ? stripslashes($_GET['dir']) . '/' : '') . $filename . '"><b>' . $filename . '</b></a></td>';
} else {
echo '<td align="left" onclick="javascript:album_cancel(this)"><img src="' . file_icon($filename, 'gif') . '" /> <a href="javascript:;" rel="' . $url . $filename . '" title="' . $filename . '">' . $filename . '</a></td>';
}
?>
</tr>
<?php
}
}
?>
</table>
</div>
</div>
</body>
<script type="text/javascript">
$(document).ready(function(){
set_status_empty();
});
开发者ID:zhouzhouxs,项目名称:Progect,代码行数:31,代码来源:album_dir.tpl.php
示例3: file_icon
?>
<tr class="<?php
echo $color;
?>
" id="tr_<?php
echo $v['file_id'];
?>
" onclick="load_file_addr('<?php
echo $v[file_id];
?>
');" title="点击可加载此文件下载地址,可实现直接下载查看">
<td><input type="checkbox" name="file_ids[]" id="file_ids" value="<?php
echo $v['file_id'];
?>
" /><?php
echo file_icon($v['file_extension']);
?>
<?php
if ($v['is_image']) {
?>
<a href="<?php
echo $v['a_viewfile'];
?>
" id="p_<?php
echo $k;
?>
" target="_blank"><?php
echo $v['file_name'];
?>
</a>
<div id="c_<?php
开发者ID:saintho,项目名称:phpdisk,代码行数:31,代码来源:public.tpl.php
示例4: __
if (!$action) {
?>
<div class="r">
<?php
if ($file['is_del']) {
?>
<div class="msg_box f14"><img src="images/light.gif" align="absmiddle" border="0"/><?php
echo __('file_is_delete');
?>
<br /><br /><br /></div>
<?php
} else {
?>
<div class="file_box">
<h3 class="file_tit"><?php
echo file_icon($file['file_extension'], 'filetype_32', 'absbottom');
echo $file['file_name'];
?>
</h3>
<div class="fb_l">
<table width="100%" cellpadding="4" cellspacing="0" align="center" class="td_line f14">
<tr>
<td colspan="2"><?php
echo __('file_category');
?>
: <?php
echo get_cate_path($file[cate_id]);
?>
</td>
</tr>
<tr>
开发者ID:saintho,项目名称:phpdisk,代码行数:31,代码来源:pd_viewfile.tpl.php
示例5: att_not_used
/**
* 获取临时未处理的图片
* @return type
*/
protected function att_not_used()
{
//获取临时未处理文件列表
// 水平凡 修复如果cookie里面有加反斜杠,去除
$att_json = \Input::getVar(cookie('att_json'));
if ($att_json) {
if ($att_json) {
$att_cookie_arr = explode('||', $att_json);
}
foreach ($att_cookie_arr as $_att_c) {
$att[] = json_decode($_att_c, true);
}
if (is_array($att) && !empty($att)) {
foreach ($att as $n => $v) {
$ext = fileext($v['src']);
if (in_array($ext, array('jpg', 'gif', 'png', 'bmp', 'jpeg'))) {
$att[$n]['fileimg'] = $v['src'];
$att[$n]['width'] = '80';
$att[$n]['filename'] = urldecode($v['filename']);
} else {
$att[$n]['fileimg'] = file_icon($v['src']);
$att[$n]['width'] = '64';
$att[$n]['filename'] = urldecode($v['filename']);
}
$this->cookie_att .= '|' . $v['src'];
}
}
}
return $att;
}
开发者ID:sandom123,项目名称:king400,代码行数:34,代码来源:AttachmentsController.class.php
示例6: if
</tr>
<?php if ($dir !='' && $dir != '.'):?>
<tr>
<td align="left"><a href="<?php echo '?m=attachment&c=manage&a=dir&dir='.stripslashes(dirname($dir))?>"><img src="<?php echo IMG_PATH?>folder-closed.gif" /><?php echo L("parent_directory")?></a></td><td></td>
</tr>
<?php endif;?>
<?php
if(is_array($list)) {
foreach($list as $v) {
$filename = basename($v)
?>
<tr>
<?php if (is_dir($v)) {
echo '<td align="left"><img src="'.IMG_PATH.'folder-closed.gif" /> <a href="?m=attachment&c=manage&a=dir&dir='.(isset($_GET['dir']) && !empty($_GET['dir']) ? stripslashes($_GET['dir']).'/' : '').$filename.'"><b>'.$filename.'</b></a></td><td width="10%"></td>';
} else {
echo '<td align="left" ><img src="'.file_icon($filename,'gif').'" /><a rel="'.$local.'/'.$filename.'">'.$filename.'</a></td><td width="10%"><a href="javascript:;" onclick="preview(\''.$local.'/'.$filename.'\')">'.L('preview').'</a> | <a href="javascript:;" onclick="att_delete(this,\''.urlencode($filename).'\',\''.urlencode($local).'\')">'.L('delete').'</a> </td>';
}?>
</tr>
<?php
}
}
?>
</table>
</div>
</div>
</body>
<script type="text/javascript">
function preview(filepath) {
if(IsImg(filepath)) {
window.top.art.dialog({title:'<?php echo L('preview')?>',fixed:true, content:'<img src="'+filepath+'" />',time:8});
} else {
开发者ID:hxzyzz,项目名称:ddc,代码行数:31,代码来源:attachment_dir.tpl.php
示例7: att_not_used
private function att_not_used()
{
$this->att_db = pc_base::load_model('attachment_model');
//获取临时未处理文件列表
if ($att_json = param::get_cookie('att_json')) {
if ($att_json) {
$att_cookie_arr = explode('||', $att_json);
}
foreach ($att_cookie_arr as $_att_c) {
$att[] = json_decode($_att_c, true);
}
if (is_array($att) && !empty($att)) {
foreach ($att as $n => $v) {
$ext = fileext($v['src']);
if (in_array($ext, $this->imgext)) {
$att[$n]['fileimg'] = $v['src'];
$att[$n]['width'] = '80';
$att[$n]['filename'] = urldecode($v['filename']);
} else {
$att[$n]['fileimg'] = file_icon($v['src']);
$att[$n]['width'] = '64';
$att[$n]['filename'] = urldecode($v['filename']);
}
$this->cookie_att .= '|' . $v['src'];
}
}
}
return $att;
}
开发者ID:baowzh,项目名称:renfang,代码行数:29,代码来源:attachments.php
示例8: get_day_down_file
function get_day_down_file($stat_time, $stat_type = 'd_day', $cate_id = 0, $uid = 0, $num = 10)
{
global $db, $tpf;
$sql_uid = $uid ? " and dd.userid='{$uid}'" : '';
$q = $db->query("select fl.file_id,file_name,file_extension,file_time,file_size from {$tpf}files fl," . get_table_day_down() . " dd where dd.{$stat_type}='{$stat_time}' and fl.file_id=dd.file_id and in_share=1 and cate_id='{$cate_id}' and is_del=0 {$sql_uid} order by dd.down_count desc limit {$num}");
$file = array();
while ($rs = $db->fetch_array($q)) {
$tmp_ext = $rs['file_extension'] ? '.' . $rs['file_extension'] : "";
$rs['file_name'] = filter_word($rs['file_name'] . $tmp_ext);
$rs['a_viewfile'] = urr("viewfile", "file_id={$rs['file_id']}");
$rs['file_time'] = is_today($rs['file_time']) ? '<span class="txtred" style="float:right">' . date('m/d', $rs['file_time']) . '</span>' : '<span class="txtgray" style="float:right">' . date('m/d', $rs['file_time']) . '</span>';
$rs['file_icon'] = file_icon($rs['file_extension']);
$rs[file_size] = '<span class="txtgray" style="float:right">' . get_size($rs[file_size]) . '</span>';
$file[] = $rs;
}
$db->free($q);
unset($rs);
return $file;
}
开发者ID:saintho,项目名称:phpdisk,代码行数:19,代码来源:global.cache.php
示例9: db_table
?>
</td>
<td>
<table class="nospacing">
<?php
$attachments = db_table('SELECT
id,
title,
extension
FROM helpdesk_tickets_attachments
WHERE ticketID = ' . $_GET["id"]);
foreach ($attachments as $a) {
?>
<tr height="21">
<td width="18"><?php
echo file_icon($a['extension'], 'download.php?id=' . $a["id"]);
?>
</td>
<td><a href="download.php?id=<?php
echo $a["id"];
?>
"><?php
echo $a["title"];
?>
</a></td>
</tr>
<?php
}
?>
</table>
</td>
开发者ID:Rhenan,项目名称:intranet-1,代码行数:31,代码来源:ticket.php
示例10: L
<th width="15%" ><?php echo L('operations_manage')?></th>
</tr>
</thead>
<tbody>
<?php
if(is_array($infos)){
foreach($infos as $info){
$thumb = glob(dirname($this->upload_path.$info['filepath']).'/thumb_*'.basename($info['filepath']));
?>
<tr>
<td width="10%" align="center"><input type="checkbox" name="aid[]" value="<?php echo $info['aid']?>" id="att_<?php echo $info['aid']?>" /></td>
<td width="5%" align="center"><?php echo $info['aid']?></td>
<td width="8%" align="center"><?php echo $modules[$info['module']]['name']?></td>
<td width="8%" align="center"><?php echo $category[$info['catid']]['catname']?></td>
<td width="20%"><img src="<?php echo file_icon($info['filename'],'gif')?>" /> <?php echo $info['filename']?> <?php echo $thumb ? '<img title="'.L('att_thumb_manage').'" src="statics/images/admin_img/havthumb.png" onclick="showthumb('.$info['aid'].', \''.new_addslashes($info['filename']).'\')"/>':''?> <?php echo $info['status'] ? '<img src="statics/images/admin_img/link.png"':''?></td>
<td width="10%" align="center"><?php echo $this->attachment->size($info['filesize'])?></td>
<td width="12%" align="center"><?php echo date('Y-m-d H:i:s',$info['uploadtime'])?></td>
<td align="center"><a href="javascript:preview(<?php echo $info['aid']?>, '<?php echo $info['filename']?>','<?php echo $this->upload_url.$info['filepath']?>')"><?php echo L('preview')?></a> | <a href="javascript:;" onclick="att_delete(this,'<?php echo $info['aid']?>')"><?php echo L('delete')?></a></td>
</tr>
<?php
}
}
?>
</tbody>
</table>
<div class="btn"><a href="#" onClick="javascript:$('input[type=checkbox]').attr('checked', true)"><?php echo L('selected_all')?></a>/<a href="#" onClick="javascript:$('input[type=checkbox]').attr('checked', false)"><?php echo L('cancel')?></a> <input type="submit" class="button" name="dosubmit" value="<?php echo L('delete')?>" onClick="document.myform.action='?m=attachment&c=manage&a=public_delete_all';return confirm('<?php echo L('del_confirm')?>')"/></div>
<div id="pages"> <?php echo $pages?></div>
</form>
开发者ID:panhongsheng,项目名称:zl_cms,代码行数:30,代码来源:attachment_list.tpl.php
示例11: urlencode
continue;
}
?>
<?php
$new_path = $path . $item;
?>
<?php
$new_path_escape = $path . urlencode($item);
?>
<?php
if (!in_blacklist_file($item)) {
?>
<?php
$file_icon = file_icon($item);
?>
<li>
<a href="<?php
echo $base_url . $new_path_escape;
?>
" target="_blank"><em class="<?php
echo $file_icon;
?>
"></em><?php
echo $item;
?>
</a>
</li>
<?php
}
开发者ID:furic-zhao,项目名称:jquerycomps,代码行数:31,代码来源:filelist.php
示例12: tcc_attachments2
function tcc_attachments2($post_id = 0)
{
$attachments = get_posts(array(
'post_type' => 'attachment',
'posts_per_page' => -1,
'post_parent' => $post_id
));
if ($attachments) {
foreach ($attachments as $attachment) {
$filetype = file_icon($attachment->post_mime_type);
echo '<a href="' . wp_get_attachment_url($attachment->ID) . '" title="' . $attachment->post_title . '(' . format_bytes(filesize(get_attached_file($attachment->ID))) . ')"><i class="filetype_16 i-' . $filetype . '"></i></a>';
}
}
}
开发者ID:TCCinTaiwan,项目名称:KUAS_CSIE_Wordpress_Themes_TCC-Department,代码行数:14,代码来源:message.php
示例13: preg_replace
$file_description = preg_replace("/<(\\/?i?frame.*?)>/si", "", $file_description);
$file_description = preg_replace("/<(\\/?script.*?)>/si", "", $file_description);
}
if (!$error) {
if ($auth[pd_a]) {
update_seo('viewfile', $file_id, $meta_title, $meta_keywords, $meta_description);
update_seo('download', $file_id, $meta_title2, $meta_keywords2, $meta_description2);
}
$db->query_unbuffered("update {$tpf}files set file_description='{$file_description}' where file_id='{$file_id}'");
$sysmsg[] = __('file_edit_success');
redirect($ref, $sysmsg);
} else {
redirect('back', $sysmsg);
}
} else {
$rs = $db->fetch_one_array("select file_description,file_name,file_extension from {$tpf}files where file_id='{$file_id}'");
if ($rs) {
$file_description = str_replace('<br>', LF, $rs[file_description]);
$tmp_ext = $rs[file_extension] ? '.' . $rs[file_extension] : '';
$file_name = file_icon($rs['file_extension']) . $rs[file_name] . $tmp_ext;
}
unset($rs);
$ref = $_SERVER['HTTP_REFERER'];
if ($auth[pd_a]) {
$s = get_seo('viewfile', $file_id);
$s2 = get_seo('download', $file_id);
}
require_once template_echo($item, $admin_tpl_dir, '', 1);
}
break;
}
开发者ID:saintho,项目名称:phpdisk,代码行数:31,代码来源:files.inc.php
示例14: att_not_used
/**
* 获取临时未处理文件列表
*
* @return Ambigous <boolean, mixed, string>
*/
private function att_not_used()
{
$this->att_db = Loader::model('attachment_model');
if ($att_json = cookie('att_json')) {
if ($att_json) {
$att_cookie_arr = explode('||', $att_json);
}
foreach ($att_cookie_arr as $_att_c) {
$att[] = json_decode($_att_c, true);
}
if (is_array($att) && !empty($att)) {
foreach ($att as $n => $v) {
$ext = File::get_suffix($v['src']);
if (in_array($ext, $this->imgext)) {
$att[$n]['fileimg'] = $v['src'];
$att[$n]['width'] = '80';
$att[$n]['filename'] = urldecode($v['filename']);
} else {
$att[$n]['fileimg'] = file_icon($v['src']);
$att[$n]['width'] = '64';
$att[$n]['filename'] = urldecode($v['filename']);
}
$this->cookie_att .= '|' . $v['src'];
}
}
}
return isset($att) ? $att : false;
}
开发者ID:hubs,项目名称:yuncms,代码行数:33,代码来源:AttachmentsController.php
示例15: getString
$f->set_field(array('name' => 'content', 'label' => getString('file'), 'type' => 'file', 'additional' => getString('upload_max') . file_get_max()));
$f->set_field(array('name' => 'categories', 'label' => getString('categories'), 'type' => 'checkboxes', 'options_table' => 'dl_categories', 'option_title' => 'title', 'linking_table' => 'dl_docs_to_categories', 'object_id' => 'doc_id', 'option_id' => 'category_id'));
echo $f->draw();
} else {
$result = db_table('SELECT
d.id,
d.title,
' . db_updated('d') . ',
d.extension,
c.title "group"
FROM dl_docs d
JOIN dl_docs_to_categories d2c ON d.id = d2c.doc_id
JOIN dl_categories c ON d2c.category_id = c.id
ORDER BY c.precedence, d.title;');
$links = $page['is_admin'] ? array(url_query_add(array('doc_id' => 'new'), false) => getString('add_new')) : false;
$t = new table('dl_docs', drawHeader($links));
$t->set_column('icon', 'd', ' ');
$t->set_column('title', 'l', getString('title'));
$t->set_column('updated', 'r', getString('updated'));
foreach ($result as &$r) {
$link = 'info.php?id=' . $r['id'];
$r['icon'] = file_icon($r['extension'], $link);
$r['title'] = draw_link($link, $r['title']);
if (getOption('languages')) {
$r['title'] .= ' (' . $r['language'] . ')';
}
$r['updated'] = format_date($r['updated']);
}
echo $t->draw($result, getString('documents_empty'));
}
echo drawBottom();
开发者ID:Rhenan,项目名称:intranet-1,代码行数:31,代码来源:index.php
示例16: file_icon
?>
" /></td>
<td width="5%" align="center"><?php
echo $info['aid'];
?>
</td>
<td width="8%" align="center"><?php
echo $modules[$info['module']]['name'];
?>
</td>
<td width="8%" align="center"><?php
echo $category[$info['catid']]['catname'];
?>
</td>
<td width="20%"><img src="<?php
echo file_icon($info['filename'], 'gif');
?>
" /> <?php
echo $info['filename'];
?>
<?php
echo $thumb ? '<img title="' . L('att_thumb_manage') . '" src="statics/images/admin_img/havthumb.png" onclick="showthumb(' . $info['aid'] . ', \'' . new_addslashes($info['filename']) . '\')"/>' : '';
?>
<?php
echo $info['status'] ? '<img src="statics/images/admin_img/link.png"' : '';
?>
</td>
<td width="10%" align="center"><?php
echo $this->attachment->size($info['filesize']);
?>
</td>
开发者ID:boylzj,项目名称:omguitar,代码行数:31,代码来源:attachment_list.tpl.php
示例17: getString
<td><h1><a href="download.php?id=<?php
echo $_GET['id'];
?>
"><?php
echo $d['title'];
?>
</h1></a></td>
</tr>
<tr>
<td class="left"><?php
echo getString('type');
?>
</td>
<td><table class='nospacing'><tr>
<td><?php
echo file_icon($d['extension']);
?>
</td>
<td><?php
echo $d['fileType'];
?>
(<?php
echo format_size(strlen($d['content']));
?>
)</td>
</tr></table>
</td>
</tr>
<tr>
<td class="left"><?php
echo getString('categories');
开发者ID:Rhenan,项目名称:intranet-1,代码行数:31,代码来源:info.php
注:本文中的file_icon函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论