Rev 4 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
2 | daniel-mar | 1 | <?php |
2 | |||
3 | daniel-mar | 3 | if (!defined('IBLEGAL')) die('Kann nicht ohne Personal WebBase ausgeführt werden.'); |
2 | daniel-mar | 4 | |
5 | if (inetconn_ok()) |
||
6 | { |
||
7 | $res3 = db_query("SELECT `id`, `url`, `name`, `update_text_begin`, `update_text_end`, `update_lastchecked`, `update_lastcontent`, `update_checkurl`, `neu_flag`, `kaputt_flag`, `user` FROM `".$mysql_zugangsdaten['praefix']."links` WHERE (`update_enabled` = '1') AND (((`update_lastchecked` <= DATE_SUB(NOW(), INTERVAL ".$konfiguration[$m2]['update_checkinterval_min']." MINUTE)) AND (`kaputt_flag` = '0')) OR ((`update_lastchecked` <= DATE_SUB(NOW(), INTERVAL ".$konfiguration[$m2]['kaputt_checkinterval_min']." MINUTE)) AND (`kaputt_flag` = '1'))) ORDER BY `id`"); |
||
8 | while ($row3 = db_fetch($res3)) |
||
9 | { |
||
10 | // Ist unsere Bedingung immer noch aktuell? Da sich die Cron-Scripts aufgrund Überlastung |
||
11 | // überschneiden können, könnte ohne diese Prüfung ein Link 10 Mal pro Sitzung geprüft werden |
||
12 | $res_check = db_query("SELECT `id` FROM `".$mysql_zugangsdaten['praefix']."links` WHERE (`update_enabled` = '1') AND (((`update_lastchecked` <= DATE_SUB(NOW(), INTERVAL ".$konfiguration[$m2]['update_checkinterval_min']." MINUTE)) AND (`kaputt_flag` = '0')) OR ((`update_lastchecked` <= DATE_SUB(NOW(), INTERVAL ".$konfiguration[$m2]['kaputt_checkinterval_min']." MINUTE)) AND (`kaputt_flag` = '1'))) AND (`id` = '".db_escape($row3['id'])."')"); |
||
13 | if (db_num($res_check) > 0) |
||
14 | { |
||
15 | db_query("UPDATE `".$mysql_zugangsdaten['praefix']."links` SET `update_lastchecked` = NOW() WHERE `id` = '".db_escape($row3['id'])."'"); |
||
16 | |||
17 | $update_checkurl = $row3['update_checkurl']; |
||
18 | |||
19 | if (strpos($update_checkurl, '://') === false) |
||
20 | $update_checkurl = 'http://'.$update_checkurl; |
||
21 | |||
22 | $update_checkurl = entferne_anker($update_checkurl); |
||
23 | |||
24 | $a = zwischen_url($update_checkurl, str_replace('&', '&', $row3['update_text_begin']), str_replace('&', '&', $row3['update_text_end'])); |
||
25 | $fehler = $a === false; |
||
26 | |||
27 | $a = md5($a); |
||
28 | $b = $row3['update_lastcontent']; |
||
29 | |||
30 | if ($fehler) |
||
31 | { |
||
32 | $kaputt = '1'; |
||
33 | $new = $row3['neu_flag']; |
||
34 | } |
||
35 | else |
||
36 | { |
||
37 | $kaputt = '0'; |
||
38 | $new = ($a == $b) ? '0' : '1'; |
||
39 | } |
||
40 | |||
41 | if ($row3['kaputt_flag'] != $kaputt) |
||
42 | { |
||
43 | db_query("UPDATE `".$mysql_zugangsdaten['praefix']."links` SET `kaputt_flag` = '".db_escape($kaputt)."' WHERE `id` = '".db_escape($row3['id'])."'"); |
||
44 | } |
||
45 | |||
46 | if (($row3['neu_flag'] == '0') && ($new == '1')) |
||
47 | { |
||
48 | if ($new == '1') $zus = ", update_lastcontent = '".db_escape($a)."'"; else $zus = ''; |
||
49 | db_query("UPDATE `".$mysql_zugangsdaten['praefix']."links` SET `neu_flag` = '".db_escape($new)."'$zus WHERE `id` = '".db_escape($row3['id'])."'"); |
||
50 | |||
51 | // Dual-Crossover (statisch) |
||
52 | $x2 = 'core_links_notifier'; |
||
53 | $inp_user = $row3['user']; |
||
54 | |||
55 | $modulueberschrift = ''; |
||
56 | $modulsekpos = ''; |
||
57 | $modulpos = ''; |
||
58 | $modulrechte = ''; |
||
59 | $autor = ''; |
||
60 | $version = ''; |
||
61 | $menuevisible = ''; |
||
62 | $license = ''; |
||
63 | $deaktiviere_zugangspruefung = 0; |
||
64 | |||
8 | daniel-mar | 65 | if (file_exists('modules/'.wb_dir_escape($x2).'/var.inc.php')) |
66 | include 'modules/'.wb_dir_escape($x2).'/var.inc.php'; |
||
2 | daniel-mar | 67 | |
8 | daniel-mar | 68 | if (file_exists('modules/'.wb_dir_escape($x2).'/crossover/'.wb_dir_escape($m2).'/notify.inc.php')) |
69 | include 'modules/'.wb_dir_escape($x2).'/crossover/'.wb_dir_escape($m2).'/notify.inc.php'; |
||
2 | daniel-mar | 70 | } |
71 | } |
||
72 | } |
||
73 | } |
||
74 | |||
3 | daniel-mar | 75 | ?> |