diff --git a/lib/functions.lib.php b/lib/functions.lib.php index 499908105efc7c097fa5f2da194cfca9ab5fa62a..db6d0b7f11fee3b6b1e9dc857ec72f9038beebdd 100644 --- a/lib/functions.lib.php +++ b/lib/functions.lib.php @@ -270,12 +270,6 @@ function sectodays($secs) { return 'noch ' . $days . ' Tage, ' . $hours . ' Std. und ' . $mins . ' Min.'; } -function imageToBase65 ( $file = NULL ) { - $type = explode(".",$file); - $content = file_get_contents ( $file ); - return 'data:image/'.$type[1].';base64,'.base64_encode( $content ); -} - function getURL($url,$post = 0){ $curl = curl_init(); curl_setopt($curl,CURLOPT_URL,$url); @@ -300,4 +294,18 @@ function CheckLogin(){ } } } + +function IMGtoBase64 ( $file = NULL, $ordner = NULL ) { + if($file != NULL){ + $type = explode(".",$file); + if($ordner == NULL){ + $content = file_get_contents ( $_SERVER['DOCUMENT_ROOT'].'/images/userava/'.$file ); + }else{ + $content = file_get_contents ( $_SERVER['DOCUMENT_ROOT'].'/images/'. $ordner .'/'.$file ); + } + return 'data:image/'.$type[1].';base64,'.base64_encode( $content ); + }else{ + return ''; + } +} ?> diff --git a/page/start_popup.php b/page/start_popup.php index 271dcfc6158abb1b407125307056f7920ac86613..683a05250fd0514ff0da4c76fc9ad7a0b70e2725 100644 --- a/page/start_popup.php +++ b/page/start_popup.php @@ -1,6 +1,9 @@ -<link rel="stylesheet" href="../css/bootstrap.min.css" type="text/css"> <?php session_start(); + +?> +<link rel="stylesheet" href="../css/bootstrap.min.css" type="text/css"> +<?php require_once('../lib/db_config.php'); require_once ('../lib/class/db.class.php'); require_once('../lib/functions.lib.php');