bernd commited on 2010-09-06 04:31:40
              Zeige 2 geänderte Dateien mit 5 Einfügungen und 8 Löschungen.
            
git-svn-id: https://svn.schokokeks.org/repos/tools/webinterface/trunk@1803 87cf0b9e-d624-0410-a070-f6ee81989793
| ... | ... | 
                      @@ -28,7 +28,6 @@ if ($_GET['type'] == 'autodns')  | 
                  
| 28 | 28 | 
                        elseif ($sure === true)  | 
                    
| 29 | 29 | 
                             {
                       | 
                    
| 30 | 30 | 
                        enable_autorecords($dom->id);  | 
                    
| 31 | 
                        - sync_autorecords();  | 
                    |
| 32 | 31 | 
                        if (! $debugmode)  | 
                    
| 33 | 32 | 
                                 header("Location: dns_domain?dom={$dom->id}");
                       | 
                    
| 34 | 33 | 
                        }  | 
                    
| ... | ... | 
                      @@ -51,7 +50,6 @@ if ($_GET['type'] == 'autodns')  | 
                  
| 51 | 50 | 
                        elseif ($sure === true)  | 
                    
| 52 | 51 | 
                             {
                       | 
                    
| 53 | 52 | 
                        convert_from_autorecords($dom->id);  | 
                    
| 54 | 
                        - sync_autorecords();  | 
                    |
| 55 | 53 | 
                        if (! $debugmode)  | 
                    
| 56 | 54 | 
                                 header("Location: dns_domain?dom={$dom->id}");
                       | 
                    
| 57 | 55 | 
                        }  | 
                    
| ... | ... | 
                      @@ -4,6 +4,7 @@ require_once('inc/debug.php');
                     | 
                  
| 4 | 4 | 
                         require_once('inc/db_connect.php');
                       | 
                    
| 5 | 5 | 
                         require_once('inc/base.php');
                       | 
                    
| 6 | 6 | 
                         require_once('inc/security.php');
                       | 
                    
| 7 | 
                        +require_once('inc/error.php');
                       | 
                    |
| 7 | 8 | 
                         | 
                    
| 8 | 9 | 
                         require_once('class/domain.php');
                       | 
                    
| 9 | 10 | 
                         | 
                    
| ... | ... | 
                      @@ -159,7 +160,7 @@ function get_domain_records($dom)  | 
                  
| 159 | 160 | 
                        function get_domain_auto_records($domainname)  | 
                    
| 160 | 161 | 
                         {
                       | 
                    
| 161 | 162 | 
                        $domainname = mysql_real_escape_string($domainname);  | 
                    
| 162 | 
                        -  #$result = db_query("SELECT hostname, domain, CONCAT_WS('.', hostname, domain) AS fqdn, type, ip, spec, data, TRIM(ttl) FROM dns.v_autogenerated_records WHERE domain='{$domainname}'");
                       | 
                    |
| 163 | 
                        +  //$result = db_query("SELECT hostname, domain, CONCAT_WS('.', hostname, domain) AS fqdn, type, ip, spec, data, TRIM(ttl) FROM dns.v_autogenerated_records WHERE domain='{$domainname}'");
                       | 
                    |
| 163 | 164 | 
                           $result = db_query("SELECT hostname, domain, CONCAT_WS('.', hostname, domain) AS fqdn, type, ip, spec, data, ttl FROM dns.tmp_autorecords WHERE domain='{$domainname}'");
                       | 
                    
| 164 | 165 | 
                        $data = array();  | 
                    
| 165 | 166 | 
                           while ($entry = mysql_fetch_assoc($result)) {
                       | 
                    
| ... | ... | 
                      @@ -276,6 +277,8 @@ function convert_from_autorecords($domainid)  | 
                  
| 276 | 277 | 
                         | 
                    
| 277 | 278 | 
                           db_query("INSERT IGNORE INTO dns.custom_records SELECT r.id, r.lastchange, type, d.id, hostname, ip, NULL AS dyndns, data, spec, ttl FROM dns.v_tmptable_allrecords AS r INNER JOIN dns.v_domains AS d ON (d.name=r.domain) WHERE d.id={$dom}");
                       | 
                    
| 278 | 279 | 
                        disable_autorecords($dom);  | 
                    
| 280 | 
                        +  db_query("UPDATE dns.dnsstatus SET status='outdated'");
                       | 
                    |
| 281 | 
                        +  warning("Die automatischen Einträge werden in Kürze abgeschaltet, bitte haben Sie einen Moment Geduld.");
                       | 
                    |
| 279 | 282 | 
                        }  | 
                    
| 280 | 283 | 
                         | 
                    
| 281 | 284 | 
                         | 
                    
| ... | ... | 
                      @@ -286,6 +289,7 @@ function enable_autorecords($domainid)  | 
                  
| 286 | 289 | 
                        $dom = $dom->id;  | 
                    
| 287 | 290 | 
                         | 
                    
| 288 | 291 | 
                           db_query("UPDATE kundendaten.domains SET autodns=1 WHERE id={$dom} LIMIT 1");
                       | 
                    
| 292 | 
                        +  warning("Die automatischen Einträge werden in Kürze aktiviert, bitte haben Sie einen Moment Geduld.");
                       | 
                    |
| 289 | 293 | 
                        }  | 
                    
| 290 | 294 | 
                         | 
                    
| 291 | 295 | 
                        function disable_autorecords($domainid)  | 
                    
| ... | ... | 
                      @@ -298,10 +302,5 @@ function disable_autorecords($domainid)  | 
                  
| 298 | 302 | 
                        }  | 
                    
| 299 | 303 | 
                         | 
                    
| 300 | 304 | 
                         | 
                    
| 301 | 
                        -function sync_autorecords()  | 
                    |
| 302 | 
                        -{
                       | 
                    |
| 303 | 
                        -  db_query("CALL dns.sync_autorecords()");
                       | 
                    |
| 304 | 
                        -}  | 
                    |
| 305 | 
                        -  | 
                    |
| 306 | 305 | 
                         | 
                    
| 307 | 306 | 
                        ?>  | 
                    
| 308 | 307 |