[insert_php]
include_once($_SERVER[‘DOCUMENT_ROOT’].’/var.php’);
$bruger_side_id = 1;
header(‘Content-type: text/html; charset=utf-8’);
$database = mysqli_connect($lokal_host, $databasen, $passwordet, $databasen);
//mysql_select_db($databasen, $database);
mysqli_set_charset($database, ‘utf8’);
$result = mysqli_query($database, “SELECT * FROM nyeste_fil WHERE id = 1”);
while($data = mysqli_fetch_row($result))
{
$id = $data[0];
$filnavn = $data[2];
$dag = $data[3];
$maaned = $data[4];
$aar = $data[5];
$klokken = $data[6];
}
$bruger_dir = “vedtaegter”;
if (is_user_logged_in())
{

$current_user = wp_get_current_user();
if (user_can( $current_user, ‘administrator’ ))
// user is an admin
{
$directory = $_SERVER[‘DOCUMENT_ROOT’].”/uploads/”.$bruger_dir.’/’;
echo ‘

PDF filen må max fylde 5MB.
‘;
echo ‘Undgå venligst æ, ø, å og mellemrum i filnavnet.
‘;
$uploaddir = ‘https://www.if-aktivisterne.dk/upload.php’;
echo ‘

‘;
//– MAX_FILE_SIZE must precede the file input field –>
echo ‘‘;
echo ‘‘;
//echo ‘‘;
//– Name of input element determines name in $_FILES array –>
echo ‘‘;
echo ‘‘;
echo ‘

‘;

}
}
echo ‘


Vedtægter uploadet ‘.$dag.’/’.$maaned.’-‘.$aar.’ Kl. ‘.$klokken.’
Download vedtægter Tryk her.
‘.do_shortcode(‘ ‘);

[/insert_php]