-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsidebar.php
163 lines (139 loc) · 4.81 KB
/
sidebar.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
<?php
?>
<div id="sidebar">
<?
// Projects list idea
global $wpdb;
// Functions
$prioridades = get_option('bach_priorities');
$priorities = get_cat_id($prioridades);
$proyectos = get_option('bach_projects');
$projects = get_cat_id($proyectos);
$usuarios = get_option('bach_users');
$users = get_cat_id($usuarios);
$abierto = get_option('bach_open');
$open = get_cat_id($abierto);
$padre = $wpdb->get_var("SELECT parent from $wpdb->term_taxonomy WHERE term_id = '$open'");
$cerrado = get_option('bach_closed');
$closed = get_cat_id($cerrado);
$esperas = get_option('bach_wait');
$espera = get_cat_id($esperas);
global $blog_id;
// Prioridad
echo '<div style="padding-bottom:10px;padding-top:10px;font-weight:bold;font-size:2em;"><strong>Priority</strong></div>';
$categories = $wpdb->get_col("SELECT term_id FROM $wpdb->term_taxonomy WHERE parent = $priorities ORDER BY term_id DESC");
foreach ($categories as $cat) {
$estatus = status($cat);
$berre = '<br />';
echo $estatus;
echo $berre;
$isparent = $wpdb->get_col("SELECT term_id FROM $wpdb->term_taxonomy WHERE parent = '$cat'");
echo '<div style="padding-left:10px;">';
foreach ($isparent as $parent) {
echo '<div style="padding-left:15px;background:url(i/flechita.png) no-repeat;">';
$estatus = status($parent);
$berre = '<br />';
echo $estatus;
echo $berre;
echo '</div>';
$categories = $wpdb->get_col("SELECT term_id FROM $wpdb->term_taxonomy WHERE parent = '$parent'");
echo '<div style="padding-left:20px;">';
foreach ($categories as $cat) {
echo '<div style="padding-left:15px;background:url(i/flechita.png) no-repeat;">';
$estatus = status($cat);
$berre = '<br />';
echo $estatus;
echo $berre;
echo '</div>';
}
echo '</div>';
}
echo '</div>';
}
// Estado
echo '<div style="padding-bottom:10px;padding-top:10px;font-weight:bold;font-size:2em;"><strong>Status</strong></div>';
$categories = $wpdb->get_col("SELECT term_id FROM $wpdb->term_taxonomy WHERE parent = $padre");
foreach ($categories as $cat) {
$estatus = status($cat);
$berre = '<br />';
echo $estatus;
echo $berre;
}
// Usuarios
echo '<div style="padding-bottom:10px;padding-top:10px;font-weight:bold;font-size:2em;"><strong>Users</strong></div>';
$categories = $wpdb->get_col("SELECT term_id FROM $wpdb->term_taxonomy WHERE parent = $users");
foreach ($categories as $cat) {
$estatus = status($cat);
$berre = '<br />';
echo $estatus;
echo $berre;
$isparent = $wpdb->get_col("SELECT term_id FROM $wpdb->term_taxonomy WHERE parent = '$cat'");
echo '<div style="padding-left:10px;">';
foreach ($isparent as $parent) {
echo '<div style="padding-left:15px;background:url(i/flechita.png) no-repeat;">';
$estatus = status($parent);
$berre = '<br />';
echo $estatus;
echo $berre;
echo '</div>';
$categories = $wpdb->get_col("SELECT term_id FROM $wpdb->term_taxonomy WHERE parent = '$parent'");
echo '<div style="padding-left:20px;">';
foreach ($categories as $cat) {
echo '<div style="padding-left:15px;background:url(i/flechita.png) no-repeat;">';
$estatus = status($cat);
$berre = '<br />';
echo $estatus;
echo $berre;
echo '</div>';
}
echo '</div>';
}
echo '</div>';
}
// Projects
echo '<div style="padding-bottom:10px;padding-top:10px;font-weight:bold;font-size:2em;"><strong>Projects</strong></div>';
$categories = $wpdb->get_col("SELECT term_id FROM $wpdb->term_taxonomy WHERE parent = $projects");
foreach ($categories as $cat) {
$estatus = status($cat);
$berre = '<br />';
echo $estatus;
echo $berre;
$isparent = $wpdb->get_col("SELECT term_id FROM $wpdb->term_taxonomy WHERE parent = '$cat'");
echo '<div style="padding-left:10px;">';
foreach ($isparent as $parent) {
echo '<div style="padding-left:15px;background:url(i/flechita.png) no-repeat;">';
$estatus = status($parent);
$berre = '<br />';
echo $estatus;
echo $berre;
echo '</div>';
$categories = $wpdb->get_col("SELECT term_id FROM $wpdb->term_taxonomy WHERE parent = '$parent'");
echo '<div style="padding-left:20px;">';
foreach ($categories as $cat) {
echo '<div style="padding-left:15px;background:url(i/flechita.png) no-repeat;">';
$estatus = status($cat);
$berre = '<br />';
echo $estatus;
echo $berre;
echo '</div>';
}
echo '</div>';
}
echo '</div>';
}
?>
<br /><br />
<ul>
<?php
if( !function_exists('dynamic_sidebar') || !dynamic_sidebar() ) {
$before = "<li><h2>Recent projects</h2>\n";
$after = "</li>\n";
$num_to_show = 35;
echo prologue_recent_projects( $num_to_show, $before, $after );
} // if dynamic_sidebar
?>
<li class="credits">
<p><a href="http://mecus.es/">Bach Ticket Manager</a><br /> <a href="http://mecus.es/">Mecus</a></p>
</li>
</ul>
</div> <!-- // sidebar -->