2 /************************************************************************
3 * Mailer v0.2.1-FINAL Start: 08/03/2004 *
4 * =================== Last change: 11/19/2005 *
6 * -------------------------------------------------------------------- *
7 * File : task_functions.php *
8 * -------------------------------------------------------------------- *
9 * Short description : Special task functions *
10 * -------------------------------------------------------------------- *
11 * Kurzbeschreibung : Spezielle task-Funktionen *
12 * -------------------------------------------------------------------- *
15 * $Tag:: 0.2.1-FINAL $ *
17 * -------------------------------------------------------------------- *
18 * Copyright (c) 2003 - 2009 by Roland Haeder *
19 * Copyright (c) 2009 - 2012 by Mailer Developer Team *
20 * For more information visit: http://mxchange.org *
22 * This program is free software; you can redistribute it and/or modify *
23 * it under the terms of the GNU General Public License as published by *
24 * the Free Software Foundation; either version 2 of the License, or *
25 * (at your option) any later version. *
27 * This program is distributed in the hope that it will be useful, *
28 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
29 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
30 * GNU General Public License for more details. *
32 * You should have received a copy of the GNU General Public License *
33 * along with this program; if not, write to the Free Software *
34 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, *
36 ************************************************************************/
38 // Some security stuff...
39 if (!defined('__SECURITY')) {
44 // The advanced overview shows detailed informations to your exchange script:
45 // - Unconfirmed / locked accounts
46 // - Mails waiting to be approved
51 // @TODO Move all extension-dependent queries into filters
52 function outputAdvancedOverview (&$result_main) {
53 // Init variables/arrays
60 // Chheck for new extensions and updates
61 $jobsDone = outputStandardOverview($result_main);
70 'confirmed_members','unconfirmed_members','locked_members','random_refid','testers',
72 'update_tasks','new_tasks','closed_tasks','your_tasks','deleted_tasks','solved_tasks',
74 'pending_mails','canceled_mails','send_emails',
78 'purged_mails','purged_bonus_mails'
81 $content[$entry] = '0';
84 // Extension updates found
85 $value = countSumTotalData(getCurrentAdminId(), 'task_system', 'id', 'assigned_admin', TRUE, " AND `status`='NEW' AND `task_type`='EXTENSION_UPDATE'");
88 $content['update_tasks'] = '<a href="{%url=modules.php?module=admin&what=list_task&type=updates%}">' . $value . '</a>';
92 // First check for all account status seperately
95 $value = getTotalConfirmedUser();
97 $content['confirmed_members'] = '<a href="{%url=modules.php?module=admin&what=list_user&status=confirmed%}">' . $value . '</a>';
100 // Unconfirmed accounts
101 $value = getTotalUnconfirmedUser();
103 $content['unconfirmed_members'] = '<a href="{%url=modules.php?module=admin&what=list_user&status=unconfirmed%}">' . $value . '</a>';
107 $value = getTotalLockedUser();
109 $content['locked_members'] = '<a href="{%url=modules.php?module=admin&what=list_user&status=locked%}">' . $value . '</a>';
112 if (isExtensionInstalledAndNewer('user', '0.3.4')) {
114 $value = getTotalRandomRefidUser();
116 $content['random_refid'] = '<a href="{%url=modules.php?module=admin&what=list_user&do=random_refid%}">' . $value . '</a>';
119 if (isExtensionInstalledAndNewer('user', '0.5.0')) {
120 // And tester accounts
121 $value = getTotalTesterUsers();
123 $content['testers'] = '<a href="{%url=modules.php?module=admin&what=list_user&do=testers%}">' . $value . '</a>';
131 $value = countSumTotalData(0, 'task_system', 'id', 'assigned_admin', TRUE, " AND `status` != 'DELETED'");
134 $content['new_tasks'] = '<a href="{%url=modules.php?module=admin&what=list_task&type=unassigned%}">' . $value . '</a>';
140 $value = countSumTotalData('CLOSED', 'task_system', 'id', 'status', TRUE);
143 $content['closed_tasks'] = '<a href="{%url=modules.php?module=admin&what=list_task&type=closed%}">' . $value . '</a>';
149 $value = countSumTotalData('DELETED', 'task_system', 'id', 'status', TRUE);
152 $content['deleted_tasks'] = '<a href="{%url=modules.php?module=admin&what=list_task&type=deleted%}">' . $value . '</a>';
158 $value = countSumTotalData('SOLVED', 'task_system', 'id', 'status', TRUE, sprintf(" AND `assigned_admin`=%s", getCurrentAdminId()));
161 $content['solved_tasks'] = '<a href="{%url=modules.php?module=admin&what=list_task&type=solved%}">' . $value . '</a>';
167 $value = countSumTotalData(getCurrentAdminId(), 'task_system', 'id', 'assigned_admin', TRUE, " AND `status`='NEW' AND task_type != 'EXTENSION_UPDATE'");
170 $content['your_tasks'] = '<a href="{%url=modules.php?module=admin&what=list_task%}">' . $value . '</a>';
174 // Mails waiting to be approved
176 $value = countSumTotalData('ADMIN', 'pool', 'id', 'data_type', TRUE);
179 $content['pending_mails'] = '<a href="{%url=modules.php?module=admin&what=unlock_emails%}">' . $value . '</a>';
183 // Unfinished mail orders
185 $value = countSumTotalData('TEMP', 'pool', 'id', 'data_type', TRUE);
188 $content['canceled_mails'] = '<a href="{%url=modules.php?module=admin&what=email_details%}">' . $value . '</a>';
194 $value = countSumTotalData('SEND', 'pool', 'id', 'data_type', TRUE);
197 $content['send_emails'] = '<a href="{%url=modules.php?module=admin&what=email_archiv%}">' . $value . '</a>';
203 if (isExtensionActive('autopurge')) {
204 // Get auto-purged mails
205 $value = countSumTotalData('DELETED', 'pool', 'id', 'data_type', TRUE);
208 $content['purged_mails'] = '<a href="{%url=modules.php?module=admin&what=email_details%}">' . $value . '</a>';
212 // Autopurged bonus mails
214 if (isExtensionInstalledAndNewer('bonus', '0.1.8')) {
215 // Get auto-purged bonus mails
216 $value = countSumTotalData('DELETED', 'bonus', 'id', 'data_type', TRUE);
219 $content['purged_bonus_mails'] = '<a href="{%url=modules.php?module=admin&what=email_details%}">' . $value . '</a>';
221 } elseif (isExtensionActive('bonus')) {
222 $content['purged_bonus_mails'] = '{%message,ADMIN_EXTENSION_BONUS_OUTDATED=0.1.8%}';
224 $content['purged_bonus_mails'] = '<span class="bad">{--ADMIN_EXTENSION_BONUS_404--}</span>';
227 $content['purged_bonus_mails'] = '<span class="bad">{--ADMIN_EXTENSION_AUTOPURGE_404--}</span>';
228 $content['purged_mails'] = '<span class="bad">{--ADMIN_EXTENSION_AUTOPURGE_404--}</span>';
234 if (isExtensionInstalledAndNewer('bonus', '0.1.8')) {
235 // Get sent bonus mails (but not notifications)
236 $value = countSumTotalData('SEND', 'bonus', 'id', 'data_type', TRUE, " AND `is_notify`='N'");
239 $content['send_bonus_mails'] = '<a href="{%url=modules.php?module=admin&what=email_details%}">' . $value . '</a>';
241 } elseif (isExtensionActive('bonus')) {
242 $content['send_bonus_mails'] = '{%message,ADMIN_EXTENSION_BONUS_OUTDATED=0.1.8%}';
244 $content['send_bonus_mails'] = '{--ADMIN_EXTENSION_BONUS_404--}';
247 // Both extensions must be there
248 if ((isExtensionActive('autopurge')) && (isExtensionActive('user'))) {
249 // Start finding them...
250 $userExclusionSql = ' ';
252 // Exclude test accounts
253 $userExclusionSql = runFilterChain('user_exclusion_sql', ' ');
255 // Check for more extensions
256 // @TODO These can be rewritten to filter
257 if (isValidUserId(getDefRefid())) $userExclusionSql .= ' AND d.`userid` != {?def_refid?}';
258 if (isExtensionActive('beg')) $userExclusionSql .= ' AND d.`userid` != {?beg_userid?}';
259 if (isExtensionActive('bonus')) $userExclusionSql .= ' AND d.`userid` != {?bonus_userid?}';
260 if (isExtensionActive('doubler')) $userExclusionSql .= ' AND d.`userid` != {?doubler_userid?}';
261 if (isExtensionInstalledAndNewer('holiday', '0.1.3')) {
262 // Recent ext-holiday found
263 $userExclusionSql .= " AND d.`holiday_active`='N'";
266 // Check for all accounts
272 `{?_MYSQL_PREFIX?}_user_data` AS `d`
274 d.`status`='CONFIRMED' AND
275 (UNIX_TIMESTAMP() - d.`joined`) >= {?ap_inactive_since?} AND
276 (UNIX_TIMESTAMP() - d.`last_online`) >= {?ap_inactive_since?} AND
277 (UNIX_TIMESTAMP() - d.`ap_notified`) >= {?ap_inactive_since?}
278 " . $userExclusionSql . "
281 $WHATs[] = 'list_autopurge';
282 $DESCRs[] = '{--ADMIN_TASK_INACTIVE_AUTOPURGE--}';
283 $TITLEs[] = '{--ADMIN_TASK_INACTIVE_AUTOPURGE_TITLE--}';
286 if ((isExtensionInstalledAndNewer('sql_patches', '0.3.4')) && (isExtensionActive('user'))) {
287 // Check for accounts without referral
288 addSql('SELECT `userid` FROM `{?_MYSQL_PREFIX?}_user_data` WHERE `refid`=0 OR `refid` IS NULL ' . runFilterChain('user_exclusion_sql', ' ') . ' ORDER BY `userid` ASC');
289 $DESCRs[] = '{--ADMIN_TASK_LIST_ACCOUNT_NO_REFERRAL--}';
290 $TITLEs[] = '{--ADMIN_TASK_LIST_ACCOUNT_NO_REFERRAL_TITLE--}';
291 $WHATs[] = 'list_user&do=norefs';
294 if (isExtensionActive('payout')) {
295 // List new payout requests
296 addSql("SELECT `userid` FROM `{?_MYSQL_PREFIX?}_user_payouts` WHERE `status`='NEW' ORDER BY `userid` ASC");
297 $WHATs[] = 'list_payouts';
298 $DESCRs[] = '{--ADMIN_TASK_LIST_PAYOUTS_WAITING--}';
299 $TITLEs[] = '{--ADMIN_TASK_LIST_PAYOUTS_WAITING_TITLE--}';
300 addSql('SELECT `userid` FROM `{?_MYSQL_PREFIX?}_user_payouts` ORDER BY `userid` ASC');
301 $WHATs[] = 'list_payouts';
302 $DESCRs[] = '{--ADMIN_TASK_LIST_PAYOUTS_ALL--}';
303 $TITLEs[] = '{--ADMIN_TASK_LIST_PAYOUTS_ALL_TITLE--}';
306 if (isExtensionActive('wernis')) {
307 // List new wernis requests
308 addSql('SELECT `userid` FROM `{?_MYSQL_PREFIX?}_user_wernis` ORDER BY `userid` ASC');
309 $WHATs[] = 'list_wernis';
310 $DESCRs[] = '{--ADMIN_TASK_LIST_WERNIS_ALL--}';
311 $TITLEs[] = '{--ADMIN_TASK_LIST_WERNIS_ALL_TITLE--}';
314 if (isExtensionActive('holiday')) {
315 // List holiday requests
316 addSql('SELECT `userid` FROM `{?_MYSQL_PREFIX?}_user_holidays` ORDER BY `userid` ASC');
317 $WHATs[] = 'list_holiday';
318 $DESCRs[] = '{--ADMIN_TASK_LIST_HOLIDAYS--}';
319 $TITLEs[] = '{--ADMIN_TASK_LIST_HOLIDAYS_TITLE--}';
322 if (isExtensionInstalledAndNewer('bonus', '0.8.7')) {
323 // List all notifications
324 addSql("SELECT `id` FROM `{?_MYSQL_PREFIX?}_bonus` WHERE `is_notify`='Y' ORDER BY `timestamp` DESC");
325 $WHATs[] = 'list_notifications';
326 $DESCRs[] = '{--ADMIN_TASK_LIST_NOTIFICATIONS--}';
327 $TITLEs[] = '{--ADMIN_TASK_LIST_NOTIFICATIONS_TITLE--}';
330 // Both extensions must be there
331 if ((isExtensionInstalledAndNewer('bonus', '0.2.3')) && (isExtensionActive('user'))) {
333 $add = runFilterChain('add_bonus_points_user_columns', '');
335 // Active rallye, so add more point columns, if not empty
338 $pointsColumns = '(0' . $add . ')';
344 // Autopurge installed?
345 if ((isExtensionActive('autopurge')) && (isAutopurgeInactiveEnabled()) && (getApInactiveSince() > 0)) {
346 // Use last online timestamp to keep inactive members away from here
347 $lastOnline = ' AND (UNIX_TIMESTAMP() - `last_online`) < {?ap_inactive_since?}';
351 " . $pointsColumns . " AS `points`
353 `{?_MYSQL_PREFIX?}_user_data`
355 `status`='CONFIRMED' AND
356 " . $pointsColumns . " > 0
361 $WHATs[] = 'list_bonus';
362 $DESCRs[] = '{--ADMIN_TASK_LIST_BONUS--}';
363 $TITLEs[] = '{--ADMIN_TASK_LIST_BONUS_TITLE--}';
366 // Again both extensions must be there
367 if ((isExtensionInstalledAndNewer('beg', '0.1.2')) && (isExtensionActive('user'))) {
368 // ----- Begging rallye -----
373 // Autopurge installed?
374 if ((isExtensionActive('autopurge')) && (isAutopurgeInactiveEnabled()) && (getApInactiveSince() > 0)) {
375 // Use last online timestamp to keep inactive members away from here
376 $lastOnline = ' AND (UNIX_TIMESTAMP() - `last_online`) < {?ap_inactive_since?}';
382 `{?_MYSQL_PREFIX?}_user_data`
384 `status`='CONFIRMED' AND
390 $WHATs[] = 'list_beg';
391 $DESCRs[] = '{--ADMIN_TASK_LIST_BEG--}';
392 $TITLEs[] = '{--ADMIN_TASK_LIST_BEG_TITLE--}';
395 if (isExtensionActive('doubler')) {
396 // List waiting payouts
397 addSql("SELECT `id` FROM `{?_MYSQL_PREFIX?}_doubler` WHERE `completed`='N' ORDER BY `id` ASC");
398 $WHATs[] = 'list_doubler&do=waiting&select=all';
399 $DESCRs[] = '{--ADMIN_TASK_LIST_DOUBLER_WAITING--}';
400 $TITLEs[] = '{--ADMIN_TASK_LIST_DOUBLER_WAITING_TITLE--}';
401 addSql('SELECT `id` FROM `{?_MYSQL_PREFIX?}_doubler` ORDER BY `id` ASC');
402 $WHATs[] = 'list_doubler';
403 $DESCRs[] = '{--ADMIN_TASK_LIST_DOUBLER_ALL--}';
404 $TITLEs[] = '{--ADMIN_TASK_LIST_DOUBLER_ALL_TITLE--}';
408 // All referral banner
410 addSql('SELECT `id` FROM `{?_MYSQL_PREFIX?}_refbanner` ORDER BY `id` ASC');
411 $WHATs[] = 'refbanner';
412 $DESCRs[] = '{--ADMIN_TASK_LIST_REFBANNER_ALL--}';
413 $TITLEs[] = '{--ADMIN_TASK_LIST_REFBANNER_ALL_TITLE--}';
416 // All activated referral banner
418 addSql("SELECT `id` FROM `{?_MYSQL_PREFIX?}_refbanner` WHERE `visible`='Y' ORDER BY `id` ASC");
419 $WHATs[] = 'refbanner';
420 $DESCRs[] = '{--ADMIN_TASK_LIST_REFBANNER_ACTIVE--}';
421 $TITLEs[] = '{--ADMIN_TASK_LIST_REFBANNER_ACTIVE_TITLE--}';
426 addSql('SELECT `id` FROM `{?_MYSQL_PREFIX?}_extensions` ORDER BY `id` ASC');
427 $WHATs[] = 'extensions';
428 $DESCRs[] = '{--ADMIN_TASK_LIST_EXTENSIONS_ALL--}';
429 $TITLEs[] = '{--ADMIN_TASK_LIST_EXTENSIONS_ALL_TITLE--}';
432 // All activated extensions
434 addSql("SELECT `id` FROM `{?_MYSQL_PREFIX?}_extensions` WHERE `ext_active`='Y' ORDER BY `id` ASC");
435 $WHATs[] = 'extensions&active=Y';
436 $DESCRs[] = '{--ADMIN_TASK_LIST_EXTENSIONS_ACTIVE--}';
437 $TITLEs[] = '{--ADMIN_TASK_LIST_EXTENSIONS_ACTIVE_TITLE--}';
439 if (isExtensionActive('sponsor')) {
441 addSql('SELECT `id` FROM `{?_MYSQL_PREFIX?}_sponsor_data` ORDER BY `id` ASC');
442 $WHATs[] = 'list_sponsor';
443 $DESCRs[] = '{--ADMIN_TASK_LIST_SPONSOR--}';
444 $TITLEs[] = '{--ADMIN_TASK_LIST_SPONSOR_TITLE--}';
446 // List confirmed sponsor accounts
447 addSql("SELECT `id` FROM `{?_MYSQL_PREFIX?}_sponsor_data` WHERE `status`='CONFIRMED' ORDER BY `id` ASC");
448 $WHATs[] = 'list_sponsor';
449 $DESCRs[] = '{--ADMIN_TASK_LIST_SPONSOR_CONFIRMED--}';
450 $TITLEs[] = '{--ADMIN_TASK_LIST_SPONSOR_CONFIRMED_TITLE--}';
452 // List unconfirmed sponsor accounts
453 addSql("SELECT `id` FROM `{?_MYSQL_PREFIX?}_sponsor_data` WHERE `status`='UNCONFIRMED' ORDER BY `id` ASC");
454 $WHATs[] = 'list_sponsor';
455 $DESCRs[] = '{--ADMIN_TASK_LIST_SPONSOR_UNCONFIRMED--}';
456 $TITLEs[] = '{--ADMIN_TASK_LIST_SPONSOR_UNCONFIRMED_TITLE--}';
458 // List locked sponsor accounts
459 addSql("SELECT `id` FROM `{?_MYSQL_PREFIX?}_sponsor_data` WHERE `status`='LOCKED' ORDER BY `id` ASC");
460 $WHATs[] = 'list_sponsor';
461 $DESCRs[] = '{--ADMIN_TASK_LIST_SPONSOR_LOCKED--}';
462 $TITLEs[] = '{--ADMIN_TASK_LIST_SPONSOR_LOCKED_TITLE--}';
464 // List waiting sponsor accounts to be approved
465 addSql("SELECT `id` FROM `{?_MYSQL_PREFIX?}_sponsor_data` WHERE `status`='PENDING' ORDER BY `id` ASC");
466 $WHATs[] = 'unlock_sponsor';
467 $DESCRs[] = '{--ADMIN_TASK_LIST_SPONSOR_PENDING--}';
468 $TITLEs[] = '{--ADMIN_TASK_LIST_SPONSOR_PENDING_TITLE--}';
471 addSql("SELECT `id` FROM `{?_MYSQL_PREFIX?}_sponsor_orders` WHERE `pay_status`='PENDING' ORDER BY `id` ASC");
472 $WHATs[] = 'list_sponsor_pays';
473 $DESCRs[] = '{--ADMIN_TASK_LIST_SPONSOR_ORDERS--}';
474 $TITLEs[] = '{--ADMIN_TASK_LIST_SPONSOR_ORDERS_TITLE--}';
477 if (isExtensionActive('country')) {
478 // List country codes
479 addSql('SELECT `id` FROM `{?_MYSQL_PREFIX?}_countries` ORDER BY `id` ASC');
480 $WHATs[] = 'list_country';
481 $DESCRs[] = '{--ADMIN_TASK_LIST_COUNTRY--}';
482 $TITLEs[] = '{--ADMIN_TASK_LIST_COUNTRY_TITLE--}';
485 if (isExtensionActive('theme')) {
487 addSql('SELECT `id` FROM `{?_MYSQL_PREFIX?}_themes` ORDER BY `id` ASC');
488 $WHATs[] = 'theme_edit';
489 $DESCRs[] = '{--ADMIN_TASK_LIST_THEME_ALL--}';
490 $TITLEs[] = '{--ADMIN_TASK_LIST_THEME_ALL_TITLE--}';
492 // List active themes
493 addSql("SELECT `id` FROM `{?_MYSQL_PREFIX?}_themes` WHERE `theme_active`='Y' ORDER BY `id` ASC");
494 $WHATs[] = 'theme_edit';
495 $DESCRs[] = '{--ADMIN_TASK_LIST_THEME_ACTIVE--}';
496 $TITLEs[] = '{--ADMIN_TASK_LIST_THEME_ACTIVE_TITLE--}';
499 if (isExtensionActive('admins')) {
500 // List all administrator logins
501 addSql('SELECT `id` FROM `{?_MYSQL_PREFIX?}_admins` ORDER BY `id` ASC');
502 $WHATs[] = 'admins_edit';
503 $DESCRs[] = '{--ADMIN_TASK_LIST_ADMINS_ALL--}';
504 $TITLEs[] = '{--ADMIN_TASK_LIST_ADMINS_ALL_TITLE--}';
507 if (isExtensionActive('surfbar')) {
508 // List all URLs in surfbar
509 addSql('SELECT `url_id` FROM `{?_MYSQL_PREFIX?}_surfbar_urls` ORDER BY `url_id` ASC');
510 $WHATs[] = 'list_surfbar_urls';
511 $DESCRs[] = '{--ADMIN_TASK_LIST_SURFBAR_URLS_ALL--}';
512 $TITLEs[] = '{--ADMIN_TASK_LIST_SURFBAR_URLS_ALL_TITLE--}';
514 // List all pending URLs in surfbar
515 addSql("SELECT `url_id` FROM `{?_MYSQL_PREFIX?}_surfbar_urls` WHERE `url_status`='PENDING' ORDER BY `url_id` ASC");
516 $WHATs[] = 'unlock_surfbar_urls';
517 $DESCRs[] = '{--ADMIN_TASK_LIST_SURFBAR_URLS_PENDING--}';
518 $TITLEs[] = '{--ADMIN_TASK_LIST_SURFBAR_URLS_PENDING_TITLE--}';
521 if (isExtensionInstalledAndNewer('sql_patches', '0.9.2')) {
522 // Check for accounts without referral
523 addSql('SELECT `server_name_id` FROM `{?_MYSQL_PREFIX?}_server_name_log`');
524 $DESCRs[] = '{--ADMIN_TASK_LIST_SERVER_NAME_LOG--}';
525 $TITLEs[] = '{--ADMIN_TASK_LIST_SERVER_NAME_LOG_TITLE--}';
526 $WHATs[] = 'list_server_name';
529 // Generate extra overview rows
530 $EXTRAS .= createExtraTaskRows($WHATs, $DESCRs, $TITLEs);
532 // If empty just keep a forced-space left for CSS issues
533 if (empty($EXTRAS)) {
537 // Add compiled string to constant for final template
538 $content['extra_table'] = $EXTRAS;
540 // Simply load the template... :-)
541 loadTemplate('admin_overview_task', FALSE, $content);
545 function createExtraTaskRows ($WHATs, $DESCRs, $TITLEs) {
549 // Sadly this cannot be rewritten to a filter... :(
550 foreach (getSqls() as $sqls) {
552 foreach ($sqls as $key => $sql) {
553 // Run SQL command, get line numbers and free memory
554 $result = SQL_QUERY($sql, __FUNCTION__, __LINE__);
556 // Prepare array for output
558 'row_descr' => $DESCRs[$key],
562 // Rewrite CSS class if not last entry is reached
563 if ($key < (count($sqls) - 1)) {
564 $content['bottom'] = 'bottom';
567 if ((!SQL_HASZERONUMS($result)) && (!empty($WHATs[$key]))) {
568 if (empty($TITLEs[$key])) {
569 $TITLEs[$key] = '{--ADMIN_TASK_UNKNOWN_LIST_TITLE--}';
571 $content['row_link'] = '<a href="{%url=modules.php?module=admin&what=' . $WHATs[$key] . '%}" title="' . $TITLEs[$key] . '">' . SQL_NUMROWS($result) . '</a>';
573 $content['row_link'] = '0';
577 SQL_FREERESULT($result);
579 // And insert the final string into extras template
580 $OUT .= loadTemplate('admin_overview_task_rows', TRUE, $content);
584 // Return output in the template
585 return loadTemplate('admin_overview_task_extras', TRUE, $OUT);