Skip to content
Snippets Groups Projects
Commit 733d6aa8 authored by Christoph Zysik's avatar Christoph Zysik
Browse files

remove unnecessary db_connect calls / replaced by including lib/datenbank.inc.php

parent a4d58eaf
No related merge requests found
......@@ -7,8 +7,8 @@ if ($_GET['testen'] == 'true') {
if ($_GET['frame'] == 'true') {
echo 'Dies ist der Testframe';
} else {
@require_once ('../lib/functions.lib.php');
@db_connect();
require_once ( '../lib/datenbank.inc.php' );
require_once ( '../lib/functions.lib.php' );
if (!isset($_GET['art'])) $_GET['art'] = "";
if (!isset($forced['tan'])) $forced['tan'] = "";
if (!isset($forced['ziel'])) $forced['ziel'] = "";
......@@ -35,7 +35,6 @@ if ($_GET['testen'] == 'true') {
</frameset><noframes></noframes><noframes>Bei dir sind keine Frames aktiviert!</noframes>
</body>
</html>';
db_close();
}
} else {
echo 'Javascript Test! Bitte warte einen Moment!
......@@ -44,4 +43,4 @@ if ($_GET['testen'] == 'true') {
document.location = "frametest.php?url=' . $_GET['url'] . '&testen=true&tan=' . $_GET['tan'] . '";
//-->
</script>';
}
\ No newline at end of file
}
......@@ -4,7 +4,7 @@
require ( 'lib/datenbank.inc.php' );
require ( 'lib/functions.lib.php' );
db_connect();
if ($_GET['pw'] != $cron_pw) die('Zugriff verweigert!');
$cron = (int)$_GET['id'];
......@@ -34,4 +34,3 @@ if ( include ($result['datei']) ){
echo 'Cron gelaufen';
} else echo 'Cron nicht gelaufen';
db_close();
\ No newline at end of file
......@@ -2,7 +2,7 @@
require('../lib/datenbank.inc.php');
require('../lib/functions.lib.php');
db_connect();
if($_GET['cron_pw'] == $cron_pw){
set_time_limit(0);
......@@ -27,5 +27,4 @@ if($_GET['cron_pw'] == $cron_pw){
mysqli_close($sql_open);
die();
}
db_close();
?>
\ No newline at end of file
?>
......@@ -14,7 +14,6 @@ if (!ini_get('display_errors')) {
}
require ('lib/datenbank.inc.php');
db_connect();
require ('lib/functions.lib.php');
require ('lib/session.lib.php');
require ('lib/run.inc.php');
......@@ -202,6 +201,5 @@ $ts = strtotime($datetime);
</body>
</html>
<?php
db_close();
if ($gzip_rate > 0) ob_end_flush();
?>
<?php
require ( 'lib/datenbank.inc.php' );
require_once ('lib/functions.lib.php');
//Variablen vordefinieren
......@@ -10,9 +11,6 @@ if (!isset($_GET['auszahlen'])) $_GET['auszahlen'] = "false";
$_GET['uid'] = (int)$_GET['uid'];
$_GET['tan'] = addslashes ($_GET['tan']);
//DB Verbindung herstellen
db_connect();
$mail = mysqli_fetch_assoc(db_query("SELECT e.start,e.aufendhalt,e.status,e.uid,v.verdienst FROM ".$db_prefix."_paidmails_empfaenger e
LEFT JOIN ".$db_prefix."_paidmails_versendet v ON v.tan = e.tan
WHERE e.tan='".$_GET['tan']."' AND e.uid=".$_GET['uid']." AND e.gueltig > ".time()." LIMIT 1"));
......@@ -61,4 +59,3 @@ echo '
</table>
</body>
</html>';
db_close();
\ No newline at end of file
<?php
require ( 'lib/datenbank.inc.php' );
require_once ('lib/functions.lib.php');
db_connect();
$_GET['uid'] = (int)$_GET['uid'];
$_GET['tan'] = addslashes ($_GET['tan']);
......@@ -18,5 +18,3 @@ echo '
<frame name="werbung" src="'.$mail['ziel'].'" scrolling="auto" frameborder="0">
</frameset>
</html>';
db_close();
<?
<?php
require_once ( 'lib/datenbank.inc.php' );
@require_once ('lib/functions.lib.php');
@db_connect();
@require_once ('lib/session.lib.php');
if (!isset($_GET['art'])) $_GET['art'] = "";
if (!isset($text['tan'])) $text['tan'] = "";
......@@ -21,4 +21,3 @@ $text = mysqli_fetch_array(db_query("SELECT * FROM ".$db_prefix."_gebuchte_werbu
</frameset>
</body>
</html>
<?db_close();?>
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment