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 - 2016 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>';
91 // Do this only if ext-user is installed
92 if (isExtensionInstalled('user')) {
94 // First check for all account status seperately
97 $value = getTotalConfirmedUser();
99 $content['confirmed_members'] = '<a href="{%url=modules.php?module=admin&what=list_user&status=confirmed%}">' . $value . '</a>';
102 // Unconfirmed accounts
103 $value = getTotalUnconfirmedUser();
105 $content['unconfirmed_members'] = '<a href="{%url=modules.php?module=admin&what=list_user&status=unconfirmed%}">' . $value . '</a>';
109 $value = getTotalLockedUser();
111 $content['locked_members'] = '<a href="{%url=modules.php?module=admin&what=list_user&status=locked%}">' . $value . '</a>';
115 if (isExtensionInstalledAndNewer('user', '0.3.4')) {
117 $value = getTotalRandomRefidUser();
119 $content['random_refid'] = '<a href="{%url=modules.php?module=admin&what=list_user&do=random_refid%}">' . $value . '</a>';
122 if (isExtensionInstalledAndNewer('user', '0.5.0')) {
123 // And tester accounts
124 $value = getTotalTesterUsers();
126 $content['testers'] = '<a href="{%url=modules.php?module=admin&what=list_user&do=testers%}">' . $value . '</a>';
134 $value = countSumTotalData(NULL, 'task_system', 'id', 'assigned_admin', TRUE, " AND `status` != 'DELETED'");
137 $content['new_tasks'] = '<a href="{%url=modules.php?module=admin&what=list_task&type=unassigned%}">' . $value . '</a>';
143 $value = countSumTotalData('CLOSED', 'task_system', 'id', 'status', TRUE);
146 $content['closed_tasks'] = '<a href="{%url=modules.php?module=admin&what=list_task&type=closed%}">' . $value . '</a>';
152 $value = countSumTotalData('DELETED', 'task_system', 'id', 'status', TRUE);
155 $content['deleted_tasks'] = '<a href="{%url=modules.php?module=admin&what=list_task&type=deleted%}">' . $value . '</a>';
161 $value = countSumTotalData('SOLVED', 'task_system', 'id', 'status', TRUE, sprintf(" AND `assigned_admin`=%s", getCurrentAdminId()));
164 $content['solved_tasks'] = '<a href="{%url=modules.php?module=admin&what=list_task&type=solved%}">' . $value . '</a>';
170 $value = countSumTotalData(getCurrentAdminId(), 'task_system', 'id', 'assigned_admin', TRUE, " AND `status`='NEW' AND task_type != 'EXTENSION_UPDATE'");
173 $content['your_tasks'] = '<a href="{%url=modules.php?module=admin&what=list_task%}">' . $value . '</a>';
177 // Mails waiting to be approved
179 $value = countSumTotalData('ADMIN', 'pool', 'id', 'data_type', TRUE);
182 $content['pending_mails'] = '<a href="{%url=modules.php?module=admin&what=unlock_emails%}">' . $value . '</a>';
186 // Unfinished mail orders
188 $value = countSumTotalData('TEMP', 'pool', 'id', 'data_type', TRUE);
191 $content['canceled_mails'] = '<a href="{%url=modules.php?module=admin&what=email_details%}">' . $value . '</a>';
197 $value = countSumTotalData('SEND', 'pool', 'id', 'data_type', TRUE);
200 $content['send_emails'] = '<a href="{%url=modules.php?module=admin&what=email_archiv%}">' . $value . '</a>';
206 if (isExtensionActive('autopurge')) {
207 // Get auto-purged mails
208 $value = countSumTotalData('DELETED', 'pool', 'id', 'data_type', TRUE);
211 $content['purged_mails'] = '<a href="{%url=modules.php?module=admin&what=email_details%}">' . $value . '</a>';
215 // Autopurged bonus mails
217 if (isExtensionInstalledAndNewer('bonus', '0.1.8')) {
218 // Get auto-purged bonus mails
219 $value = countSumTotalData('DELETED', 'bonus', 'id', 'data_type', TRUE);
222 $content['purged_bonus_mails'] = '<a href="{%url=modules.php?module=admin&what=email_details%}">' . $value . '</a>';
224 } elseif (isExtensionActive('bonus')) {
225 $content['purged_bonus_mails'] = '{%message,ADMIN_EXTENSION_BONUS_OUTDATED=0.1.8%}';
227 $content['purged_bonus_mails'] = '<span class="bad">{--ADMIN_EXTENSION_BONUS_404--}</span>';
230 $content['purged_bonus_mails'] = '<span class="bad">{--ADMIN_EXTENSION_AUTOPURGE_404--}</span>';
231 $content['purged_mails'] = '<span class="bad">{--ADMIN_EXTENSION_AUTOPURGE_404--}</span>';
237 if (isExtensionInstalledAndNewer('bonus', '0.1.8')) {
238 // Get sent bonus mails (but not notifications)
239 $value = countSumTotalData('SEND', 'bonus', 'id', 'data_type', TRUE, " AND `is_notify`='N'");
242 $content['send_bonus_mails'] = '<a href="{%url=modules.php?module=admin&what=email_details%}">' . $value . '</a>';
244 } elseif (isExtensionActive('bonus')) {
245 $content['send_bonus_mails'] = '{%message,ADMIN_EXTENSION_BONUS_OUTDATED=0.1.8%}';
247 $content['send_bonus_mails'] = '{--ADMIN_EXTENSION_BONUS_404--}';
250 // Both extensions must be there
251 if ((isExtensionActive('autopurge')) && (isExtensionActive('user'))) {
252 // Start finding them...
253 $userExclusionSql = ' ';
254 $excludedUserids = runFilterChain('config_userid_exclusion_sql', array());
255 if (count($excludedUserids) > 0) {
257 $userExclusionSql .= ' AND `d`.`userid` NOT IN (' . implode(', ', $excludedUserids) . ')';
260 // Check for all accounts
266 `{?_MYSQL_PREFIX?}_user_data` AS `d`
268 `d`.`status`='CONFIRMED' AND
269 (UNIX_TIMESTAMP() - `d`.`joined`) >= {?ap_inactive_since?} AND
270 (UNIX_TIMESTAMP() - `d`.`last_online`) >= {?ap_inactive_since?} AND
271 (UNIX_TIMESTAMP() - `d`.`ap_notified`) >= {?ap_inactive_since?}
272 " . runFilterChain('user_exclusion_sql', ' ' . $userExclusionSql) . "
275 $WHATs[] = 'list_autopurge';
276 $DESCRs[] = '{--ADMIN_TASK_INACTIVE_AUTOPURGE--}';
277 $TITLEs[] = '{--ADMIN_TASK_INACTIVE_AUTOPURGE_TITLE--}';
280 if ((isExtensionInstalledAndNewer('sql_patches', '0.3.4')) && (isExtensionActive('user'))) {
281 // Check for accounts without referral
282 addSql('SELECT `userid` FROM `{?_MYSQL_PREFIX?}_user_data` WHERE `refid`=0 OR `refid` IS NULL ' . runFilterChain('user_exclusion_sql', ' ') . ' ORDER BY `userid` ASC');
283 $DESCRs[] = '{--ADMIN_TASK_LIST_ACCOUNT_NO_REFERRAL--}';
284 $TITLEs[] = '{--ADMIN_TASK_LIST_ACCOUNT_NO_REFERRAL_TITLE--}';
285 $WHATs[] = 'list_user&do=norefs';
288 if (isExtensionActive('payout')) {
289 // List new payout requests
290 addSql("SELECT `userid` FROM `{?_MYSQL_PREFIX?}_user_payouts` WHERE `status`='NEW' ORDER BY `userid` ASC");
291 $WHATs[] = 'list_payouts';
292 $DESCRs[] = '{--ADMIN_TASK_LIST_PAYOUTS_WAITING--}';
293 $TITLEs[] = '{--ADMIN_TASK_LIST_PAYOUTS_WAITING_TITLE--}';
294 addSql('SELECT `userid` FROM `{?_MYSQL_PREFIX?}_user_payouts` ORDER BY `userid` ASC');
295 $WHATs[] = 'list_payouts';
296 $DESCRs[] = '{--ADMIN_TASK_LIST_PAYOUTS_ALL--}';
297 $TITLEs[] = '{--ADMIN_TASK_LIST_PAYOUTS_ALL_TITLE--}';
300 if (isExtensionActive('wernis')) {
301 // List new wernis requests
302 addSql('SELECT `userid` FROM `{?_MYSQL_PREFIX?}_user_wernis` ORDER BY `userid` ASC');
303 $WHATs[] = 'list_wernis';
304 $DESCRs[] = '{--ADMIN_TASK_LIST_WERNIS_ALL--}';
305 $TITLEs[] = '{--ADMIN_TASK_LIST_WERNIS_ALL_TITLE--}';
308 if (isExtensionActive('holiday')) {
309 // List holiday requests
310 addSql('SELECT `userid` FROM `{?_MYSQL_PREFIX?}_user_holidays` ORDER BY `userid` ASC');
311 $WHATs[] = 'list_holiday';
312 $DESCRs[] = '{--ADMIN_TASK_LIST_HOLIDAYS--}';
313 $TITLEs[] = '{--ADMIN_TASK_LIST_HOLIDAYS_TITLE--}';
316 if (isExtensionInstalledAndNewer('bonus', '0.8.7')) {
317 // List all notifications
318 addSql("SELECT `id` FROM `{?_MYSQL_PREFIX?}_bonus` WHERE `is_notify`='Y' ORDER BY `timestamp` DESC");
319 $WHATs[] = 'list_notifications';
320 $DESCRs[] = '{--ADMIN_TASK_LIST_NOTIFICATIONS--}';
321 $TITLEs[] = '{--ADMIN_TASK_LIST_NOTIFICATIONS_TITLE--}';
324 // Both extensions must be there
325 if ((isExtensionInstalledAndNewer('bonus', '0.2.3')) && (isExtensionActive('user'))) {
327 $add = trim(runFilterChain('add_bonus_points_user_columns', ''));
329 // Active rallye, so add more point columns, if not empty
332 $pointsColumns = '(0' . $add . ')';
338 // Autopurge installed?
339 if ((isExtensionActive('autopurge')) && (isAutopurgeInactiveEnabled()) && (getApInactiveSince() > 0)) {
340 // Use last online timestamp to keep inactive members away from here
341 $lastOnline = ' AND (UNIX_TIMESTAMP() - `last_online`) < {?ap_inactive_since?}';
345 if (!empty($ointsColumns)) {
348 " . $pointsColumns . " AS `points`
350 `{?_MYSQL_PREFIX?}_user_data`
352 `status`='CONFIRMED' AND
353 " . $pointsColumns . " > 0
358 $WHATs[] = 'list_bonus';
359 $DESCRs[] = '{--ADMIN_TASK_LIST_BONUS--}';
360 $TITLEs[] = '{--ADMIN_TASK_LIST_BONUS_TITLE--}';
364 // Again both extensions must be there
365 if ((isExtensionInstalledAndNewer('beg', '0.1.2')) && (isExtensionActive('user'))) {
366 // ----- Begging rallye -----
371 // Autopurge installed?
372 if ((isExtensionActive('autopurge')) && (isAutopurgeInactiveEnabled()) && (getApInactiveSince() > 0)) {
373 // Use last online timestamp to keep inactive members away from here
374 $lastOnline = ' AND (UNIX_TIMESTAMP() - `last_online`) < {?ap_inactive_since?}';
380 `{?_MYSQL_PREFIX?}_user_data`
382 `status`='CONFIRMED' AND
388 $WHATs[] = 'list_beg';
389 $DESCRs[] = '{--ADMIN_TASK_LIST_BEG--}';
390 $TITLEs[] = '{--ADMIN_TASK_LIST_BEG_TITLE--}';
393 if (isExtensionActive('doubler')) {
394 // List waiting payouts
395 addSql("SELECT `id` FROM `{?_MYSQL_PREFIX?}_doubler` WHERE `completed`='N' ORDER BY `id` ASC");
396 $WHATs[] = 'list_doubler&do=waiting&select=all';
397 $DESCRs[] = '{--ADMIN_TASK_LIST_DOUBLER_WAITING--}';
398 $TITLEs[] = '{--ADMIN_TASK_LIST_DOUBLER_WAITING_TITLE--}';
399 addSql('SELECT `id` FROM `{?_MYSQL_PREFIX?}_doubler` ORDER BY `id` ASC');
400 $WHATs[] = 'list_doubler';
401 $DESCRs[] = '{--ADMIN_TASK_LIST_DOUBLER_ALL--}';
402 $TITLEs[] = '{--ADMIN_TASK_LIST_DOUBLER_ALL_TITLE--}';
406 // All referral banner
408 addSql('SELECT `id` FROM `{?_MYSQL_PREFIX?}_refbanner` ORDER BY `id` ASC');
409 $WHATs[] = 'refbanner';
410 $DESCRs[] = '{--ADMIN_TASK_LIST_REFBANNER_ALL--}';
411 $TITLEs[] = '{--ADMIN_TASK_LIST_REFBANNER_ALL_TITLE--}';
414 // All activated referral banner
416 addSql("SELECT `id` FROM `{?_MYSQL_PREFIX?}_refbanner` WHERE `visible`='Y' ORDER BY `id` ASC");
417 $WHATs[] = 'refbanner';
418 $DESCRs[] = '{--ADMIN_TASK_LIST_REFBANNER_ACTIVE--}';
419 $TITLEs[] = '{--ADMIN_TASK_LIST_REFBANNER_ACTIVE_TITLE--}';
424 addSql('SELECT `id` FROM `{?_MYSQL_PREFIX?}_extensions` ORDER BY `id` ASC');
425 $WHATs[] = 'extensions';
426 $DESCRs[] = '{--ADMIN_TASK_LIST_EXTENSIONS_ALL--}';
427 $TITLEs[] = '{--ADMIN_TASK_LIST_EXTENSIONS_ALL_TITLE--}';
430 // All activated extensions
432 addSql("SELECT `id` FROM `{?_MYSQL_PREFIX?}_extensions` WHERE `ext_active`='Y' ORDER BY `id` ASC");
433 $WHATs[] = 'extensions&active=Y';
434 $DESCRs[] = '{--ADMIN_TASK_LIST_EXTENSIONS_ACTIVE--}';
435 $TITLEs[] = '{--ADMIN_TASK_LIST_EXTENSIONS_ACTIVE_TITLE--}';
437 if (isExtensionActive('sponsor')) {
439 addSql('SELECT `id` FROM `{?_MYSQL_PREFIX?}_sponsor_data` ORDER BY `id` ASC');
440 $WHATs[] = 'list_sponsor';
441 $DESCRs[] = '{--ADMIN_TASK_LIST_SPONSOR--}';
442 $TITLEs[] = '{--ADMIN_TASK_LIST_SPONSOR_TITLE--}';
444 // List confirmed sponsor accounts
445 addSql("SELECT `id` FROM `{?_MYSQL_PREFIX?}_sponsor_data` WHERE `status`='CONFIRMED' ORDER BY `id` ASC");
446 $WHATs[] = 'list_sponsor';
447 $DESCRs[] = '{--ADMIN_TASK_LIST_SPONSOR_CONFIRMED--}';
448 $TITLEs[] = '{--ADMIN_TASK_LIST_SPONSOR_CONFIRMED_TITLE--}';
450 // List unconfirmed sponsor accounts
451 addSql("SELECT `id` FROM `{?_MYSQL_PREFIX?}_sponsor_data` WHERE `status`='UNCONFIRMED' ORDER BY `id` ASC");
452 $WHATs[] = 'list_sponsor';
453 $DESCRs[] = '{--ADMIN_TASK_LIST_SPONSOR_UNCONFIRMED--}';
454 $TITLEs[] = '{--ADMIN_TASK_LIST_SPONSOR_UNCONFIRMED_TITLE--}';
456 // List locked sponsor accounts
457 addSql("SELECT `id` FROM `{?_MYSQL_PREFIX?}_sponsor_data` WHERE `status`='LOCKED' ORDER BY `id` ASC");
458 $WHATs[] = 'list_sponsor';
459 $DESCRs[] = '{--ADMIN_TASK_LIST_SPONSOR_LOCKED--}';
460 $TITLEs[] = '{--ADMIN_TASK_LIST_SPONSOR_LOCKED_TITLE--}';
462 // List waiting sponsor accounts to be approved
463 addSql("SELECT `id` FROM `{?_MYSQL_PREFIX?}_sponsor_data` WHERE `status`='PENDING' ORDER BY `id` ASC");
464 $WHATs[] = 'unlock_sponsor';
465 $DESCRs[] = '{--ADMIN_TASK_LIST_SPONSOR_PENDING--}';
466 $TITLEs[] = '{--ADMIN_TASK_LIST_SPONSOR_PENDING_TITLE--}';
469 addSql("SELECT `id` FROM `{?_MYSQL_PREFIX?}_sponsor_orders` WHERE `pay_status`='PENDING' ORDER BY `id` ASC");
470 $WHATs[] = 'list_sponsor_pays';
471 $DESCRs[] = '{--ADMIN_TASK_LIST_SPONSOR_ORDERS--}';
472 $TITLEs[] = '{--ADMIN_TASK_LIST_SPONSOR_ORDERS_TITLE--}';
475 if (isExtensionActive('country')) {
476 // List country codes
477 addSql('SELECT `id` FROM `{?_MYSQL_PREFIX?}_countries` ORDER BY `id` ASC');
478 $WHATs[] = 'list_country';
479 $DESCRs[] = '{--ADMIN_TASK_LIST_COUNTRY--}';
480 $TITLEs[] = '{--ADMIN_TASK_LIST_COUNTRY_TITLE--}';
483 if (isExtensionActive('theme')) {
485 addSql('SELECT `id` FROM `{?_MYSQL_PREFIX?}_themes` ORDER BY `id` ASC');
486 $WHATs[] = 'theme_edit';
487 $DESCRs[] = '{--ADMIN_TASK_LIST_THEME_ALL--}';
488 $TITLEs[] = '{--ADMIN_TASK_LIST_THEME_ALL_TITLE--}';
490 // List active themes
491 addSql("SELECT `id` FROM `{?_MYSQL_PREFIX?}_themes` WHERE `theme_active`='Y' ORDER BY `id` ASC");
492 $WHATs[] = 'theme_edit';
493 $DESCRs[] = '{--ADMIN_TASK_LIST_THEME_ACTIVE--}';
494 $TITLEs[] = '{--ADMIN_TASK_LIST_THEME_ACTIVE_TITLE--}';
497 if (isExtensionActive('admins')) {
498 // List all administrator logins
499 addSql('SELECT `id` FROM `{?_MYSQL_PREFIX?}_admins` ORDER BY `id` ASC');
500 $WHATs[] = 'admins_edit';
501 $DESCRs[] = '{--ADMIN_TASK_LIST_ADMINS_ALL--}';
502 $TITLEs[] = '{--ADMIN_TASK_LIST_ADMINS_ALL_TITLE--}';
505 if (isExtensionActive('surfbar')) {
506 // List all URLs in surfbar
507 addSql('SELECT `url_id` FROM `{?_MYSQL_PREFIX?}_surfbar_urls` ORDER BY `url_id` ASC');
508 $WHATs[] = 'list_surfbar_urls';
509 $DESCRs[] = '{--ADMIN_TASK_LIST_SURFBAR_URLS_ALL--}';
510 $TITLEs[] = '{--ADMIN_TASK_LIST_SURFBAR_URLS_ALL_TITLE--}';
512 // List all pending URLs in surfbar
513 addSql("SELECT `url_id` FROM `{?_MYSQL_PREFIX?}_surfbar_urls` WHERE `url_status`='PENDING' ORDER BY `url_id` ASC");
514 $WHATs[] = 'unlock_surfbar_urls';
515 $DESCRs[] = '{--ADMIN_TASK_LIST_SURFBAR_URLS_PENDING--}';
516 $TITLEs[] = '{--ADMIN_TASK_LIST_SURFBAR_URLS_PENDING_TITLE--}';
519 if (isExtensionInstalled('server_name')) {
520 // Check for wrong "SERVER_NAME" entries
521 addSql('SELECT `server_name_id` FROM `{?_MYSQL_PREFIX?}_server_name_log`');
522 $DESCRs[] = '{--ADMIN_TASK_LIST_SERVER_NAME_LOG--}';
523 $TITLEs[] = '{--ADMIN_TASK_LIST_SERVER_NAME_LOG_TITLE--}';
524 $WHATs[] = 'list_server_name';
527 if (isExtensionInstalled('network')) {
528 // Check for HTTP logging entries
529 addSql('SELECT `network_header_id` FROM `{?_MYSQL_PREFIX?}_network_header_logging`');
530 $DESCRs[] = '{--ADMIN_TASK_LIST_NETWORK_HEADER_LOG--}';
531 $TITLEs[] = '{--ADMIN_TASK_LIST_NETWORK_HEADER_LOG_TITLE--}';
532 $WHATs[] = 'list_network_http_header';
534 // Check for API cache entries
535 addSql('SELECT `network_cache_id` FROM `{?_MYSQL_PREFIX?}_network_cache`');
536 $DESCRs[] = '{--ADMIN_TASK_LIST_NETWORK_API_CACHE--}';
537 $TITLEs[] = '{--ADMIN_TASK_LIST_NETWORK_API_CACHE_TITLE--}';
538 $WHATs[] = 'list_network_api';
541 // Generate extra overview rows
542 $EXTRAS .= createExtraTaskRows($WHATs, $DESCRs, $TITLEs);
544 // If empty just keep a forced-space left for CSS issues
545 if (empty($EXTRAS)) {
549 // Add compiled string to constant for final template
550 $content['extra_table'] = $EXTRAS;
552 // Simply load the template... :-)
553 loadTemplate('admin_overview_task', FALSE, $content);
557 function createExtraTaskRows ($WHATs, $DESCRs, $TITLEs) {
561 // Sadly this cannot be rewritten to a filter... :(
562 foreach (getSqls() as $sqls) {
564 foreach ($sqls as $key => $sql) {
565 // Run SQL command, get line numbers and free memory
566 $result = sqlQuery($sql, __FUNCTION__, __LINE__);
568 // Prepare array for output
570 'row_descr' => $DESCRs[$key],
574 // Rewrite CSS class if not last entry is reached
575 if ($key < (count($sqls) - 1)) {
576 $content['bottom'] = 'bottom';
579 if ((!ifSqlHasZeroNumRows($result)) && (!empty($WHATs[$key]))) {
580 if (empty($TITLEs[$key])) {
581 $TITLEs[$key] = '{--ADMIN_TASK_UNKNOWN_LIST_TITLE--}';
583 $content['row_link'] = '<a href="{%url=modules.php?module=admin&what=' . $WHATs[$key] . '%}" title="' . $TITLEs[$key] . '">' . sqlNumRows($result) . '</a>';
585 $content['row_link'] = '0';
589 sqlFreeResult($result);
591 // And insert the final string into extras template
592 $OUT .= loadTemplate('admin_overview_task_rows', TRUE, $content);
596 // Return output in the template
597 return loadTemplate('admin_overview_task_extras', TRUE, $OUT);