diff options
Diffstat (limited to 'framework/gii/views/common/code.php')
| -rw-r--r-- | framework/gii/views/common/code.php | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/framework/gii/views/common/code.php b/framework/gii/views/common/code.php new file mode 100644 index 0000000..9d996c9 --- /dev/null +++ b/framework/gii/views/common/code.php @@ -0,0 +1,16 @@ +<?php +if($file->type==='php') +{ + echo '<div class="content">'; + highlight_string($file->content); + echo '</div>'; +} +else if(in_array($file->type,array('txt','js','css'))) +{ + echo '<div class="content">'; + echo nl2br($file->content); + echo '</div>'; +} +else + echo '<div class="error">Preview is not available for this file type.</div>'; +?>
\ No newline at end of file |
