-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added generic view template for print_as_table()
- Loading branch information
Martin Rusev
committed
Jan 8, 2010
1 parent
74a9058
commit 7ae600c
Showing
2 changed files
with
51 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
Changelog | ||
Last updated 08.01.2010 | ||
|
||
#Version 0.3 | ||
- Added query_time() function | ||
- Added print_as_table() function | ||
- Added inline configuration settings |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
<style> | ||
.crystal_table | ||
{ | ||
width:100%; | ||
border:1px solid #eee; | ||
border-collapse:collapse; | ||
} | ||
.crystal_table td | ||
{ | ||
padding:4px; | ||
border:1px solid #eee; | ||
} | ||
.crystal_table thead td | ||
{ | ||
background:#eee; | ||
font-weight:bold; | ||
text-align:center; | ||
} | ||
</style> | ||
<?php if(isset($table_fields)): ?> | ||
<table class="crystal_table"> | ||
<thead> | ||
<?php foreach($table_fields as $key => $field): ?> | ||
<td> | ||
<?php echo $field; ?> | ||
</td> | ||
<?php endforeach; ?> | ||
</thead> | ||
<?php foreach($result as $k => $v): ?> | ||
<tr> | ||
<?php foreach($v as $item): ?> | ||
<td> | ||
<?php echo $item; ?> | ||
</td> | ||
<?php endforeach; ?> | ||
</tr> | ||
<?php endforeach; ?> | ||
</table> | ||
<?php else: ?> | ||
<p> | ||
The specified table is empty | ||
</p> | ||
|
||
<?php endif; ?> |