diff options
| author | Patrick Seeger <pseeger@ccwn.org> | 2012-04-13 23:11:05 +0200 |
|---|---|---|
| committer | Patrick Seeger <pseeger@ccwn.org> | 2012-04-13 23:11:05 +0200 |
| commit | 341cc4dd9c53ffbfb863e026dd58549c1082c7a7 (patch) | |
| tree | 1bbbed20313bafb9b063b6b4d894fe580d8b000f /framework/gii/views/common/code.php | |
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 |
