Server : nginx/1.22.1 System : Linux iZwz9daxib3w3i063fw434Z 3.10.0-1127.19.1.el7.x86_64 #1 SMP Tue Aug 25 17:23:54 UTC 2020 x86_64 User : www ( 1000) PHP Version : 5.6.40 Disable Function : passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv Directory : /www/wwwroot/www.jkmold.com/phpcms/modules/attachment/templates/ |
<?php defined('IN_ADMIN') or exit('No permission resources.'); include $this->admin_tpl('header','admin'); ?> <script language="JavaScript" src="<?php echo JS_PATH?>jquery.imgpreview.js"></script> <script type="text/javascript"> $(document).ready(function(){ var obj=$("#imgPreview a[rel]"); if(obj.length>0) { $('#imgPreview a[rel]').imgPreview({ srcAttr: 'rel', imgCSS: { width: 200 } }); } }); </script> <div class="bk15"></div> <div class="pad-lr-10"> <table width="100%" cellspacing="0" class="search-form"> <tbody> <tr> <td><div class="explain-col"> <a href="?m=attachment&c=manage"><?php echo L('database_schema')?></a> </div> </td> </tr> </tbody> </table> <div class="table-list"> <table width="100%" cellspacing="0" id="imgPreview"> <tr> <td align="left"><?php echo L("local_dir")?>:<?php echo $local?></td><td></td> </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 { window.top.art.dialog({title:'<?php echo L('preview')?>',fixed:true, content:'<a href="'+filepath+'" target="_blank"/><img src="<?php echo IMG_PATH?>admin_img/down.gif"><?php echo L('click_open')?></a>'}); } } function att_delete(obj,filename,localdir){ window.top.art.dialog({content:'<?php echo L('del_confirm')?>', fixed:true, style:'confirm', id:'att_delete'}, function(){ $.get('?m=attachment&c=manage&a=pulic_dirmode_del&filename='+filename+'&dir='+localdir+'&pc_hash='+pc_hash,function(data){ if(data) $(obj).parent().parent().fadeOut("slow"); }) }, function(){}); }; function IsImg(url){ var sTemp; var b=false; var opt="jpg|gif|png|bmp|jpeg"; var s=opt.toUpperCase().split("|"); for (var i=0;i<s.length ;i++ ){ sTemp=url.substr(url.length-s[i].length-1); sTemp=sTemp.toUpperCase(); s[i]="."+s[i]; if (s[i]==sTemp){ b=true; break; } } return b; } </script> </html>