Kód: Vybrať všetko
$text = '<script type="text/javascript">'."\n";
$text .= '<!--'."\n";
$text .= 'window.open("assets/images/pf" . $rok . ".png", "pfka", "width=676, height=517, centerscreen, dialog")'."\n";
$text .= '// -->'."\n";
$text .= '</script>'."\n";
if (!isset($_COOKIE['pf'.$rok]) && strtotime("now") <= strtotime("10 January ".$rok))
{
setcookie("pf".$rok,1,mktime(0,0,0,1,20,$rok));
return $text;
}
Volá se to takhle: [[PF?rok=2007]/b]
Demo: http://neverhood.etomite.sk