Jak na to?
![Idea :idea:](./images/smilies/PDT_thk.gif)
Děkuji předem za odpověď.
Martin Baroch
Kód: Vybrat vše
<?php
/**
* Front to the WordPress application. This file doesn't do anything, but loads
* wp-blog-header.php which does and tells WordPress to load the theme.
*
* @package WordPress
*/
/**
* Tells WordPress to load the WordPress theme and output it.
*
* @var bool
*/
define('WP_USE_THEMES', true);
/** Loads the WordPress Environment and Template
*/
require( dirname( __FILE__ ) . '/wp-blog-header.php' );
session_start();
$current_user = wp_get_current_user();
if($_SESSION["navstevaVRelaci"] != "ano" and $_SERVER["REMOTE_ADDR"] != "" )
{
if(current_user->display_name != "")
{
$hl = "From: PRIVÁTNÍ WEBOVÉ STRÁNKY ČIMELICE wordpress@cimelice1963.czweb.org";
$hl .= "\nMIME-Version: 1.0\n";
$hl .= "Content-Type: text/html;charset=\"UTF-8\"\n";
mail("barveramartin@gmail.com", "Návštěvník", "Tvůj web právě navštívíl uživatel: ".current_user->display_name."!!", $hl);
//syntaxe funkce mail(): mail(komu,předmět,zpráva,hlavička);
$_SESSION["navstevaVRelaci"] = "ano"; }}
?>
Zpět na “Programování a tvorba webu”
Uživatelé prohlížející si toto fórum: Facebook [Bot] a 9 hostů