Skip to content

Commit

Permalink
Indentation
Browse files Browse the repository at this point in the history
  • Loading branch information
ebertek committed Jun 11, 2016
1 parent d964ba0 commit 9ad865e
Show file tree
Hide file tree
Showing 7 changed files with 218 additions and 219 deletions.
62 changes: 31 additions & 31 deletions esikeaho.php
Original file line number Diff line number Diff line change
@@ -1,42 +1,42 @@
<?php
if (!isset($_GET["w"]) || empty($_GET["w"])) {
$w = "804365";
} else {
$w = $_GET["w"];
}
$feed = "http://weather.yahooapis.com/forecastrss?w=$w&u=c";
$x = simplexml_load_file($feed);
$ho = array(5,7,13,14,15,16,18,41,42,43,46);
$jeg = array(6,17,35);
$hob = in_array($x->channel->item->children('yweather', TRUE)->condition->attributes()->code,$ho);
$szoveg = $x->channel->item->children('yweather', TRUE)->condition->attributes()->text;
$link = $x->channel->item->link;
if (!isset($_GET["w"]) || empty($_GET["w"])) {
$w = "804365";
} else {
$w = $_GET["w"];
}
$feed = "http://weather.yahooapis.com/forecastrss?w=$w&u=c";
$x = simplexml_load_file($feed);
$ho = array(5,7,13,14,15,16,18,41,42,43,46);
$jeg = array(6,17,35);
$hob = in_array($x->channel->item->children('yweather', TRUE)->condition->attributes()->code,$ho);
$szoveg = $x->channel->item->children('yweather', TRUE)->condition->attributes()->text;
$link = $x->channel->item->link;
?>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">

<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta http-equiv="cache-control" content="no-cache" />
<meta name="Author" content="David Ebert" />
<meta name="Keywords" content="ebertek" />
<meta name="Description" content="Esik-e a hó?" />
<meta name="viewport" content="width=device-width" />
<meta name="robots" content="index, follow" />
<title>Esik-e a hó?</title>
<link rel="home" href="http://www.ebertek.com/">
<link rel="stylesheet" href="styles/esikeaho.css" type="text/css">
</head>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta http-equiv="cache-control" content="no-cache" />
<meta name="Author" content="David Ebert" />
<meta name="Keywords" content="ebertek" />
<meta name="Description" content="Esik-e a hó?" />
<meta name="viewport" content="width=device-width" />
<meta name="robots" content="index, follow" />
<title>Esik-e a hó?</title>
<link rel="home" href="http://www.ebertek.com/">
<link rel="stylesheet" href="styles/esikeaho.css" type="text/css">
</head>

<body>
<body>

<h1><?php echo($hob ? "IGEN" : "NEM");?></h1>
<p><a href="<?php echo($link);?>" title="Yahoo! Weather"><?php echo($szoveg);?></a></p>
<p><a href="?w=12595843">Pécs/Pogány</a>, <a href="?w=813653">Pécs/Szabolcs</a>, <a href="?w=804365">Budapest</a>, <a href="?w=805328">Debrecen</a>, <a href="?w=815498">Szeged</a>, <a href="?w=812036">Miskolc</a>, <a href="?w=807392">Győr</a></p>
<p><a href="http://ebertek.com/feed.php?w=<?php echo($_GET["w"]);?>" title="RSS">RSS</a></p>
<h1><?php echo($hob ? "IGEN" : "NEM");?></h1>
<p><a href="<?php echo($link);?>" title="Yahoo! Weather"><?php echo($szoveg);?></a></p>
<p><a href="?w=12595843">Pécs/Pogány</a>, <a href="?w=813653">Pécs/Szabolcs</a>, <a href="?w=804365">Budapest</a>, <a href="?w=805328">Debrecen</a>, <a href="?w=815498">Szeged</a>, <a href="?w=812036">Miskolc</a>, <a href="?w=807392">Győr</a></p>
<p><a href="http://ebertek.com/feed.php?w=<?php echo($_GET["w"]);?>" title="RSS">RSS</a></p>

</body>
</body>

</html>
</html>
64 changes: 32 additions & 32 deletions feed.php
Original file line number Diff line number Diff line change
@@ -1,39 +1,39 @@
<?php
header("Content-Type: application/rss+xml; charset=UTF-8");
header("Content-Type: application/rss+xml; charset=UTF-8");

if (!isset($_GET["w"]) || empty($_GET["w"])) {
$w = "804365";
} else {
$w = $_GET["w"];
}
$feed = "http://weather.yahooapis.com/forecastrss?w=$w&u=c";
$x = simplexml_load_file($feed);
$ho = array(5,7,13,14,15,16,18,41,42,43,46);
$jeg = array(6,17,35);
$hob = in_array($x->channel->item->children('yweather', TRUE)->condition->attributes()->code,$ho);
$valasz = $hob ? "IGEN" : "NEM";
$szoveg = $x->channel->item->children('yweather', TRUE)->condition->attributes()->text;
$link = $x->channel->item->link;
if (!isset($_GET["w"]) || empty($_GET["w"])) {
$w = "804365";
} else {
$w = $_GET["w"];
}
$feed = "http://weather.yahooapis.com/forecastrss?w=$w&u=c";
$x = simplexml_load_file($feed);
$ho = array(5,7,13,14,15,16,18,41,42,43,46);
$jeg = array(6,17,35);
$hob = in_array($x->channel->item->children('yweather', TRUE)->condition->attributes()->code,$ho);
$valasz = $hob ? "IGEN" : "NEM";
$szoveg = $x->channel->item->children('yweather', TRUE)->condition->attributes()->text;
$link = $x->channel->item->link;


$rssfeed = '<?xml version="1.0" encoding="UTF-8"?>';
$rssfeed .= '<rss version="2.0">';
$rssfeed .= '<channel>';
$rssfeed .= '<title>Esik-e a hó?</title>';
$rssfeed .= "<link>http://www.ebertek.com/esikeaho.php?w=$w</link>";
$rssfeed .= '<description>Esik-e a hó?</description>';
$rssfeed .= '<language>hu-hu</language>';
$rssfeed .= '<copyright>Copyright (C) 2012 ebertek.com</copyright>';
$rssfeed = '<?xml version="1.0" encoding="UTF-8"?>';
$rssfeed .= '<rss version="2.0">';
$rssfeed .= '<channel>';
$rssfeed .= '<title>Esik-e a hó?</title>';
$rssfeed .= "<link>http://www.ebertek.com/esikeaho.php?w=$w</link>";
$rssfeed .= '<description>Esik-e a hó?</description>';
$rssfeed .= '<language>hu-hu</language>';
$rssfeed .= '<copyright>Copyright (C) 2012 ebertek.com</copyright>';

$rssfeed .= '<item>';
$rssfeed .= '<title>' . $valasz . '</title>';
$rssfeed .= '<description>' . $szoveg . '</description>';
$rssfeed .= '<link>' . $link . '</link>';
$rssfeed .= '<pubDate>' . date("D, d M Y H:i:s O", time()) . '</pubDate>';
$rssfeed .= '</item>';
$rssfeed .= '<item>';
$rssfeed .= '<title>' . $valasz . '</title>';
$rssfeed .= '<description>' . $szoveg . '</description>';
$rssfeed .= '<link>' . $link . '</link>';
$rssfeed .= '<pubDate>' . date("D, d M Y H:i:s O", time()) . '</pubDate>';
$rssfeed .= '</item>';

$rssfeed .= '</channel>';
$rssfeed .= '</rss>';
$rssfeed .= '</channel>';
$rssfeed .= '</rss>';

echo $rssfeed;
?>
echo $rssfeed;
?>
151 changes: 75 additions & 76 deletions index.php
Original file line number Diff line number Diff line change
@@ -1,94 +1,93 @@
<?php
$useragent = $_SERVER['HTTP_USER_AGENT'];
$os = array("default", "Macintosh", "iPhone", "iPad", "iPod", "Android");
$chosen = 0;
$tombcount = count($os);
for ($i=0; $i<$tombcount; $i++) {
if (preg_match("/$os[$i]/", $useragent)) {
$chosen = $i;
break;
}
}
if (2 <= $chosen && $chosen <=4) {
$chosen=2;
}
/*
0: default;
1: Macintosh;
2: iOS: iPhone, iPad, iPod;
3: Android;
*/
$message = array("mailto", "imessage", "sms", "mailto");
$call = array("callto", "tel", "tel", "tel");
$fsq = array("https://foursquare.com/ebertek", "https://foursquare.com/ebertek", "foursquare://users/200263", "https://foursquare.com/ebertek");
$useragent = $_SERVER['HTTP_USER_AGENT'];
$os = array("default", "Macintosh", "iPhone", "iPad", "iPod", "Android");
$chosen = 0;
$tombcount = count($os);
for ($i=0; $i<$tombcount; $i++) {
if (preg_match("/$os[$i]/", $useragent)) {
$chosen = $i;
break;
}
}
if (2 <= $chosen && $chosen <=4) {
$chosen=2;
}
/*
0: default;
1: Macintosh;
2: iOS: iPhone, iPad, iPod;
3: Android;
*/
$message = array("mailto", "imessage", "sms", "mailto");
$call = array("callto", "tel", "tel", "tel");
$fsq = array("https://foursquare.com/ebertek", "https://foursquare.com/ebertek", "foursquare://users/200263", "https://foursquare.com/ebertek");
?>
<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US" lang="en-US">

<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta http-equiv="cache-control" content="no-cache" />
<meta name="Author" content="David Ebert" />
<meta name="Keywords" content="ebertek" />
<meta name="Description" content="David Ebert is a web2-addicted engineer bunchie with magical Apple devices." />
<meta name="viewport" content="width=device-width" />
<meta name="robots" content="index, follow" />
<title>ebertek.com</title>
<link rel="home" href="http://www.ebertek.com/">
<link rel="stylesheet" href="styles/index.css" type="text/css">
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta name="Author" content="David Ebert" />
<meta name="Keywords" content="ebertek" />
<meta name="Description" content="David Ebert is a web2-addicted engineer bunchie with magical Apple devices." />
<meta name="viewport" content="width=device-width" />
<meta name="robots" content="index, follow" />
<title>ebertek.com</title>
<link rel="home" href="http://www.ebertek.com/">
<link rel="stylesheet" href="styles/index.css" type="text/css">
</head>

<body>
<div id="wrapper">

<header>ebertek.com</header>
<header>ebertek.com</header>

<div id="main">
<h2>
contact
</h2>
<p>
<a href="twitter:@ebertek" title="Twitter">Twitter</a><br />
<a href="fb://profile/1151623436" title="Facebook">Facebook</a><br />
<a href="<?php echo $message[$chosen]; ?>:[email protected]" title="Message">[email protected]</a><br />
<a href="<?php echo $call[$chosen]; ?>:+36302750065" title="Cellphone">+36 (30) 275 0065</a><br />
</p>
<p>
<a href="https://www.linkedin.com/in/ebertdavid" title="LinkedIn">LinkedIn</a><br />
<a href="http://www.last.fm/user/ebertek" title="Last.fm">Last.fm</a><br />
<a href="https://trakt.tv/users/ebertek" title="trakt.tv">trakt.tv</a><br />
<a href="<?php echo $fsq[$chosen]; ?>" title="foursquare">foursquare</a><br />
<a href="https://www.flickr.com/photos/ebertek" title="flickr">flickr</a><br />
</p>
<p>
<?php if ($chosen==1 || $chosen==2) echo '<a href="facetime:[email protected]">FaceTime</a><br />'; ?>
<?php if ($chosen==2) echo '<a href="findmyfriends:[email protected]">Find My Friends</a><br />'; ?>
</p>
</div>
<div id="main">
<h2>
contact
</h2>
<p>
<a href="twitter:@ebertek" title="Twitter">Twitter</a><br />
<a href="fb://profile/1151623436" title="Facebook">Facebook</a><br />
<a href="<?php echo $message[$chosen]; ?>:[email protected]" title="Message">[email protected]</a><br />
<a href="<?php echo $call[$chosen]; ?>:+36302750065" title="Cellphone">+36 (30) 275 0065</a><br />
</p>
<p>
<a href="https://www.linkedin.com/in/ebertdavid" title="LinkedIn">LinkedIn</a><br />
<a href="http://www.last.fm/user/ebertek" title="Last.fm">Last.fm</a><br />
<a href="https://trakt.tv/users/ebertek" title="trakt.tv">trakt.tv</a><br />
<a href="<?php echo $fsq[$chosen]; ?>" title="foursquare">foursquare</a><br />
<a href="https://www.flickr.com/photos/ebertek" title="flickr">flickr</a><br />
</p>
<p>
<?php if ($chosen==1 || $chosen==2) echo '<a href="facetime:[email protected]">FaceTime</a><br />'; ?>
<?php if ($chosen==2) echo '<a href="findmyfriends:[email protected]">Find My Friends</a><br />'; ?>
</p>
</div>

<div id="main2">
<h2 contenteditable="true">
<div id="main2">
<h2 contenteditable="true">

</h2>
<p contenteditable="true">
<br />
<br />
<br />
<br />
</p>
<p contenteditable="true">
<br />
<br />
<br />
<br />
<br />
</p>
<p contenteditable="true">
<?php if ($chosen==1 || $chosen==2) echo '<br />'; ?>
<?php if ($chosen==2) echo '<br />'; ?>
</p>
</div>
</h2>
<p contenteditable="true">
<br />
<br />
<br />
<br />
</p>
<p contenteditable="true">
<br />
<br />
<br />
<br />
<br />
</p>
<p contenteditable="true">
<?php if ($chosen==1 || $chosen==2) echo '<br />'; ?>
<?php if ($chosen==2) echo '<br />'; ?>
</p>
</div>

</div>
</body>
Expand Down
24 changes: 12 additions & 12 deletions index2.html
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="hu-HU" lang="hu-HU">

<head>
<link rel="stylesheet" href="styles/index2.css">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>@ebertek</title>
<head>
<link rel="stylesheet" href="styles/index2.css">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>@ebertek</title>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
Expand All @@ -15,16 +15,16 @@
ga('send', 'pageview');

</script>
</head>
</head>

<body>
<body>

<div>
<p id="name">David Ebert</p>
<p><a href="https://twitter.com/ebertek" title="Twitter">Twitter</a> | <a href="https://www.facebook.com/david.ebert" title="Facebook">Facebook</a></p>
<p>&#9990; <a href="tel:+36302750065">+36 (30) 275 0065</a></p>
</div>
<div>
<p id="name">David Ebert</p>
<p><a href="https://twitter.com/ebertek" title="Twitter">Twitter</a> | <a href="https://www.facebook.com/david.ebert" title="Facebook">Facebook</a></p>
<p>&#9990; <a href="tel:+36302750065">+36 (30) 275 0065</a></p>
</div>

</body>
</body>

</html>
Loading

0 comments on commit 9ad865e

Please sign in to comment.