@@ 158-182 (lines=25) @@ | ||
155 | ||
156 | break; |
|
157 | ||
158 | case SUBSCRIPTION_TYPE_ALL_TEMPLATES: |
|
159 | ||
160 | $project = project_find($subscription['subscribe_param']); |
|
161 | ||
162 | if (!$project) |
|
163 | { |
|
164 | debug_write_log(DEBUG_WARNING, 'Project cannot be found.'); |
|
165 | header('HTTP/1.1 307 view.php?id=' . $id); |
|
166 | exit; |
|
167 | } |
|
168 | ||
169 | $xml .= '<control name="project" required="' . get_html_resource(RES_REQUIRED3_ID) . '">' |
|
170 | . '<label>' . get_html_resource(RES_PROJECT_ID) . '</label>' |
|
171 | . '<combobox>' |
|
172 | . '<listitem value="0">' . ustr2html($project['project_name']) . '</listitem>' |
|
173 | . '</combobox>' |
|
174 | . '</control>' |
|
175 | . '<control name="template" required="' . get_html_resource(RES_REQUIRED3_ID) . '">' |
|
176 | . '<label>' . get_html_resource(RES_TEMPLATE_ID) . '</label>' |
|
177 | . '<combobox>' |
|
178 | . '<listitem value="0">' . get_html_resource(RES_ALL_TEMPLATES_ID) . '</listitem>' |
|
179 | . '</combobox>' |
|
180 | . '</control>'; |
|
181 | ||
182 | break; |
|
183 | ||
184 | case SUBSCRIPTION_TYPE_ONE_TEMPLATE: |
|
185 | ||
@@ 184-208 (lines=25) @@ | ||
181 | ||
182 | break; |
|
183 | ||
184 | case SUBSCRIPTION_TYPE_ONE_TEMPLATE: |
|
185 | ||
186 | $template = template_find($subscription['subscribe_param']); |
|
187 | ||
188 | if (!$template) |
|
189 | { |
|
190 | debug_write_log(DEBUG_WARNING, 'Template cannot be found.'); |
|
191 | header('HTTP/1.1 307 view.php?id=' . $id); |
|
192 | exit; |
|
193 | } |
|
194 | ||
195 | $xml .= '<control name="project" required="' . get_html_resource(RES_REQUIRED3_ID) . '">' |
|
196 | . '<label>' . get_html_resource(RES_PROJECT_ID) . '</label>' |
|
197 | . '<combobox>' |
|
198 | . '<listitem value="0">' . ustr2html($template['project_name']) . '</listitem>' |
|
199 | . '</combobox>' |
|
200 | . '</control>' |
|
201 | . '<control name="template" required="' . get_html_resource(RES_REQUIRED3_ID) . '">' |
|
202 | . '<label>' . get_html_resource(RES_TEMPLATE_ID) . '</label>' |
|
203 | . '<combobox>' |
|
204 | . '<listitem value="0">' . ustr2html($template['template_name']) . '</listitem>' |
|
205 | . '</combobox>' |
|
206 | . '</control>'; |
|
207 | ||
208 | break; |
|
209 | ||
210 | default: |
|
211 |