376d8314 by Kevin Burton

updating the colorbox, and also added MySQLTable class

1 parent 9ea0a7cb
...@@ -175,15 +175,16 @@ table.tabular-data tbody td {} ...@@ -175,15 +175,16 @@ table.tabular-data tbody td {}
175 margin: .5em 0em; 175 margin: .5em 0em;
176 } 176 }
177 177
178
178 /* 179 /*
179 ColorBox Core Style 180 ColorBox Core Style
180 The following rules are the styles that are consistant between themes. 181 The following rules are the styles that are consistant between themes.
181 Avoid changing this area to maintain compatability with future versions of ColorBox. 182 Avoid changing this area to maintain compatability with future versions of ColorBox.
182 */ 183 */
183 #colorbox, #cboxOverlay, #cboxWrapper{position:absolute; top:0; left:0; z-index:9998; overflow:hidden;} 184 #colorbox, #cboxOverlay, #cboxWrapper{position:absolute; top:0; left:0; z-index:9999; overflow:hidden;}
184 #cboxOverlay{position:fixed; width:100%; height:100%;} 185 #cboxOverlay{position:fixed; width:100%; height:100%;}
185 #cboxMiddleLeft, #cboxBottomLeft{clear:left;} 186 #cboxMiddleLeft, #cboxBottomLeft{clear:left;}
186 #cboxContent{position:relative; overflow:hidden;} 187 #cboxContent{position:relative; overflow:visible;}
187 #cboxLoadedContent{overflow:auto;} 188 #cboxLoadedContent{overflow:auto;}
188 #cboxLoadedContent iframe{display:block; width:100%; height:100%; border:0;} 189 #cboxLoadedContent iframe{display:block; width:100%; height:100%; border:0;}
189 #cboxTitle{margin:0;} 190 #cboxTitle{margin:0;}
...@@ -191,52 +192,34 @@ table.tabular-data tbody td {} ...@@ -191,52 +192,34 @@ table.tabular-data tbody td {}
191 #cboxPrevious, #cboxNext, #cboxClose, #cboxSlideshow{cursor:pointer;} 192 #cboxPrevious, #cboxNext, #cboxClose, #cboxSlideshow{cursor:pointer;}
192 193
193 /* 194 /*
194 Example user style 195 ColorBox example user style
195 The following rules are ordered and tabbed in a way that represents the 196 The following rules are ordered and tabbed in a way that represents the
196 order/nesting of the generated HTML, so that the structure easier to understand. 197 order/nesting of the generated HTML, so that the structure easier to understand.
197 */ 198 */
198 #cboxOverlay{ background: #3b0d32; } 199 #cboxOverlay{background:#3b0d32;}
199 #colorbox{}
200 #cboxTopLeft{width:21px; height:21px; background:url(../images/controls.png) no-repeat -100px 0;}
201 #cboxTopRight{width:21px; height:21px; background:url(../images/controls.png) no-repeat -129px 0;}
202 #cboxBottomLeft{width:21px; height:21px; background:url(../images/controls.png) no-repeat -100px -29px;}
203 #cboxBottomRight{width:21px; height:21px; background:url(../images/controls.png) no-repeat -129px -29px;}
204 #cboxMiddleLeft{width:21px; background:url(../images/controls.png) left top repeat-y;}
205 #cboxMiddleRight{width:21px; background:url(../images/controls.png) right top repeat-y;}
206 #cboxTopCenter{height:21px; background:url(../images/border.png) 0 0 repeat-x;}
207 #cboxBottomCenter{height:21px; background:url(../images/border.png) 0 -29px repeat-x;}
208 #cboxContent{background:#fff;}
209 #cboxLoadedContent{margin-bottom:28px;}
210 #cboxTitle{position:absolute; bottom:4px; left:0; text-align:center; width:100%; color:#949494;}
211 #cboxCurrent{position:absolute; bottom:4px; left:58px; color:#949494;}
212 #cboxSlideshow{position:absolute; bottom:4px; right:30px; color:#0092ef;}
213 #cboxPrevious{position:absolute; bottom:0; left:0px; background:url(../images/controls.png) no-repeat -75px 0px; width:25px; height:25px; text-indent:-9999px;}
214 #cboxPrevious.hover{background-position:-75px -25px;}
215 #cboxNext{position:absolute; bottom:0; left:27px; background:url(../images/controls.png) no-repeat -50px 0px; width:25px; height:25px; text-indent:-9999px;}
216 #cboxNext.hover{background-position:-50px -25px;}
217 #cboxLoadingOverlay{background:url(../images/loading_background.png) no-repeat center center;}
218 #cboxLoadingGraphic{background:url(../images/loading.gif) no-repeat center center;}
219 #cboxClose{position:absolute; bottom:0; right:0; background:url(../images/controls.png) no-repeat -25px 0px; width:25px; height:25px; text-indent:-9999px;}
220 #cboxClose.hover{background-position:-25px -25px;}
221 200
222 /* 201 #colorbox{}
223 The following fixes png-transparency for IE6. 202 #cboxContent{margin-top:32px;}
224 It is also necessary for png-transparency in IE7 & IE8 to avoid 'black halos' with the fade transition 203 #cboxLoadedContent{background:#fff; padding:1px;}
204 #cboxLoadingGraphic{background:url(../images/ajax-loader.gif) no-repeat center center;}
205 #cboxLoadingOverlay{background:#000;}
206 #cboxTitle{position:absolute; top:-22px; left:0; color:#000;}
207 #cboxCurrent{position:absolute; top:-22px; right:205px; text-indent:-9999px;}
208 #cboxSlideshow, #cboxPrevious, #cboxNext, #cboxClose{text-indent:-9999px; width:20px; height:20px; position:absolute; top:-20px; background:url(../images/controls.png) no-repeat 0 0;}
209 #cboxClose { display:none; }
210 #cboxPrevious{background-position:0px 0px; right:44px;}
211 #cboxPrevious.hover{background-position:0px -25px;}
212 #cboxNext{background-position:-25px 0px; right:22px;}
213 #cboxNext.hover{background-position:-25px -25px;}
214 #cboxClose{background-position:-50px 0px; right:0;}
215 #cboxClose.hover{background-position:-50px -25px;}
216 .cboxSlideshow_on #cboxPrevious, .cboxSlideshow_off #cboxPrevious{right:66px;}
217 .cboxSlideshow_on #cboxSlideshow{background-position:-75px -25px; right:44px;}
218 .cboxSlideshow_on #cboxSlideshow.hover{background-position:-100px -25px;}
219 .cboxSlideshow_off #cboxSlideshow{background-position:-100px 0px; right:44px;}
220 .cboxSlideshow_off #cboxSlideshow.hover{background-position:-75px -25px;}
225 221
226 Since this method does not support CSS background-positioning, it is incompatible with CSS sprites.
227 Colorbox preloads navigation hover classes to account for this.
228 222
229 !! Important Note: AlphaImageLoader src paths are relative to the HTML document,
230 while regular CSS background images are relative to the CSS document.
231 */
232 .cboxIE #cboxTopLeft{background:transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src=../images/internet_explorer/borderTopLeft.png, sizingMethod='scale');}
233 .cboxIE #cboxTopCenter{background:transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src=//images/internet_explorer/borderTopCenter.png, sizingMethod='scale');}
234 .cboxIE #cboxTopRight{background:transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src=../images/internet_explorer/borderTopRight.png, sizingMethod='scale');}
235 .cboxIE #cboxBottomLeft{background:transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src=../images/internet_explorer/borderBottomLeft.png, sizingMethod='scale');}
236 .cboxIE #cboxBottomCenter{background:transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src=../images/internet_explorer/borderBottomCenter.png, sizingMethod='scale');}
237 .cboxIE #cboxBottomRight{background:transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src=../images/internet_explorer/borderBottomRight.png, sizingMethod='scale');}
238 .cboxIE #cboxMiddleLeft{background:transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src=../images/internet_explorer/borderMiddleLeft.png, sizingMethod='scale');}
239 .cboxIE #cboxMiddleRight{background:transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src=../images/internet_explorer/borderMiddleRight.png, sizingMethod='scale');}
240 223
241 .update-placeholder { padding-left:5px; color:green; } 224 .update-placeholder { padding-left:5px; color:green; }
242 225
...@@ -474,3 +457,7 @@ input.dp-applied { ...@@ -474,3 +457,7 @@ input.dp-applied {
474 } 457 }
475 458
476 #sidebar_meta_box .inside { margin:0;} 459 #sidebar_meta_box .inside { margin:0;}
460
461 .TzAdminPagination { text-align:right; padding-right:20px; font-size: 11px; margin:5px 0;}
462 .TzAdminPagination span { margin-right:5px; }
463 .TzAdminPagination a { margin-right:5px; }
...\ No newline at end of file ...\ No newline at end of file
......

1.22 KB | W: | H:

570 Bytes | W: | H:

  • 2-up
  • Swipe
  • Onion skin
1 <?php
2 namespace Tz\WordPress\Tools\MySQLTable;
3
4 function array2table($arr,$width)
5 {
6 $count = count($arr);
7 if($count > 0){
8 reset($arr);
9 $num = count(current($arr));
10 echo "<table border=\"0\"cellpadding=\"5\" cellspacing=\"0\" width=\"$width\" class=\"cbv-report\">\n";
11 echo "<thead>\n";
12 echo "<tr>\n";
13 foreach(current($arr) as $key => $value){
14 echo "<th valign='bottom'>";
15 echo $key."&nbsp;";
16 echo "</th>\n";
17 }
18 echo "</tr>\n";
19 echo "</thead>\n";
20 echo "<tbody>\n";
21 while ($curr_row = current($arr)) {
22 echo "<tr>\n";
23 $col = 1;
24 while (false !== ($curr_field = current($curr_row))) {
25 echo "<td>";
26 echo $curr_field."&nbsp;";
27 echo "</td>\n";
28 next($curr_row);
29 $col++;
30 }
31 while($col <= $num){
32 echo "<td>&nbsp;</td>\n";
33 $col++;
34 }
35 echo "</tr>\n";
36 next($arr);
37 }
38 echo "</tbody>\n";
39 echo "</table>\n";
40 }
41 }
42
43 function CSVExport($arr) {
44 $out = "";
45 $count = count($arr);
46 if( $count > 0 ) {
47 reset($arr);
48 $num = count(current($arr));
49 $k = 0;
50 foreach(current($arr) as $key => $value){
51 if ($k > 0) {
52 $out .= ",";
53 }
54 $out .= '"'.str_replace( '"', '\"',$key).'"';
55 $k++;
56 }
57 $out .= "\n";
58 while ($curr_row = current($arr)) {
59 $col = 1;
60 while (false !== ($curr_field = current($curr_row))) {
61 if ($col > 1) {
62 $out .= ",";
63 }
64 $out .= '"'.str_replace( '"', '\"',$curr_field).'"';
65 next($curr_row);
66 $col++;
67 }
68 while($col <= $num) {
69 if ($col > 1) {
70 $out .= ",";
71 }
72 $out .= '""';
73 $col++;
74 }
75 $out .= "\n";
76 next($arr);
77 }
78 }
79 return $out;
80 }
81
82 ?>
...\ No newline at end of file ...\ No newline at end of file