function printPages($startdate, $enddate)
{
    global $dayinseconds;
    //start monday before start date
    $currentdate = $startdate - (date('N', $startdate) - 1) * $dayinseconds;
    global $eventFeed, $service, $holidayFeed;
    date_default_timezone_set('America/New_York');
    $current_month = date('m', $currentdate);
    $feeds = getFeeds($currentdate, $enddate);
    $data_xml = "<PlannerData>";
    //week loop:
    while (!($currentdate > $enddate)) {
        $data_xml .= "<Month>";
        $data_xml .= "<PreviousMonth>" . getMonthXml(strtotime(date('c', $currentdate) . ' - 1 month')) . "</PreviousMonth>";
        $data_xml .= "<NextMonth>" . getMonthXml(strtotime(date('c', $currentdate) . ' + 1 month')) . "</NextMonth>";
        $data_xml .= getMonthXml($currentdate);
        while (date('m', $currentdate) == $current_month) {
            $data_xml .= "<Week>";
            $ongoing_events = '';
            for ($i = 0; $i < 7; $i++) {
                $data_xml .= "<Day id=\"" . date('N', $currentdate) . "\">";
                $data_xml .= "<ShortName>" . date('D', $currentdate) . "</ShortName>";
                $data_xml .= "<Month>" . date('F', $currentdate) . "</Month>";
                $data_xml .= "<Date>" . date('j', $currentdate) . "</Date>";
                //get event list
                $event_list = '';
                foreach ($feeds as $feed) {
                    $lists = getEventList($currentdate, $feed);
                    $ongoing_events .= $lists['ongoing_events'];
                    $event_list .= $lists['event_list'];
                }
                $data_xml .= $event_list ? '<EventList>' . $event_list . '</EventList>' : '';
                $data_xml .= "</Day>";
                $currentdate = strtotime(date('Y-m-d', $currentdate) . ' + 1 day');
            }
            $data_xml .= $ongoing_events ? '<OngoingEvents>' . $ongoing_events . '</OngoingEvents>' : '';
            $data_xml .= "</Week>";
        }
        $data_xml .= '</Month>';
        $current_month = date('m', $currentdate);
    }
    $data_xml .= '</PlannerData>';
    echo $data_xml;
}
Exemple #2
0
function printFeeds($blogid, $group = 0, $starredOnly = false, $searchKeyword = null)
{
    ?>
    <div id="feedAdder">
        <div class="title"><span><?php 
    echo _t('피드 등록하기');
    ?>
</span></div>
        <div class="button-box">
            <input type="text" id="newFeedURL" class="input-text" name="newFeedURL"
                   value="<?php 
    echo _t('피드 주소를 입력하세요.');
    ?>
"
                   onfocus="if(this.value == '<?php 
    echo _t('피드 주소를 입력하세요.');
    ?>
') this.value = ''"
                   onblur="if(this.value == '') this.value = '<?php 
    echo _t('피드 주소를 입력하세요.');
    ?>
'"
                   onkeydown="if(event.keyCode==13) Reader.addFeed(this.value)"/>
            <a class="add-button button" href="#void"
               onclick="Reader.addFeed(document.getElementById('newFeedURL').value)"><span
                    class="text"><?php 
    echo _t('추가');
    ?>
</span></a>
            <?php 
    echo fireEvent('AddFeedURLToolbox', '');
    ?>
        </div>
    </div>

    <ul id="feedList">
        <?php 
    $count = 0;
    foreach (getFeeds($blogid, $group, $starredOnly, $searchKeyword) as $feed) {
        if ($feed['modified'] > time() - 86400) {
            $status = 'Update';
        } else {
            if ($feed['modified'] == 0) {
                $status = 'Failure';
            } else {
                $status = 'UpdateNo';
            }
        }
        $className = $count % 2 == 1 ? 'even-line' : 'odd-line';
        ?>
            <li class="<?php 
        echo $className;
        ?>
 inactive-class" onmouseover="rolloverClass(this, 'over')"
                onmouseout="rolloverClass(this, 'out')" onclick="Reader.selectFeed(this, <?php 
        echo $feed['id'];
        ?>
)">
                <div
                    class="title"><?php 
        echo $feed['blogURL'] ? '<a href="' . htmlspecialchars($feed['blogURL']) . '" onclick="window.open(this.href); event.cancelBubble=true; return false;" title="' . _t('이 피드의 원본 사이트를 새 창으로 엽니다.') . '">' : '';
        echo htmlspecialchars($feed['title']);
        echo $feed['blogURL'] ? "</a>\n" : '';
        ?>
</div>
                <div
                    class="description"><?php 
        echo $feed['description'] ? '<span class="divider"> | </span>' : '&nbsp;';
        echo htmlspecialchars($feed['description']);
        ?>
</div>
                <div class="button-box">
                    <a id="iconFeedStatus<?php 
        echo $feed['id'];
        ?>
" class="update-button button"
                       onclick="Reader.updateFeed(<?php 
        echo $feed['id'];
        ?>
, '<?php 
        echo _t('피드를 갱신 했습니다.');
        ?>
'); event.cancelBubble=true; return false;"
                       title="<?php 
        echo _t('이 피드를 갱신 합니다.');
        ?>
"><span
                            class="text"><?php 
        echo _t('피드 갱신');
        ?>
</span></a>
                    <span class="divider">|</span>
                    <a class="edit-button button" href="#void"
                       onclick="Reader.editFeed(<?php 
        echo $feed['id'];
        ?>
, '<?php 
        echo escapeJSInAttribute($feed['xmlurl']);
        ?>
')"
                       title="<?php 
        echo _t('이 피드 정보를 수정합니다.');
        ?>
"><span
                            class="text"><?php 
        echo _t('수정');
        ?>
</span></a>
                </div>
            </li>
            <?php 
        $count++;
    }
    ?>
    </ul>

    <div id="feedEditor" style="display: none;">
        <div class="title"><span class="text"><?php 
    echo _t('피드 수정하기');
    ?>
</span></div>
        <div class="input-box">
            <div class="input-field">
                <select id="changeFeedGroup">
                    <?php 
    foreach (getFeedGroups($blogid) as $group) {
        if ($group['id'] == 0) {
            $group['title'] = _t('그룹 없음');
        }
        ?>
                        <option
                            value="<?php 
        echo $group['id'];
        ?>
"><?php 
        echo htmlspecialchars($group['title']);
        ?>
</option>
                    <?php 
    }
    ?>
                </select>
                <input type="text" id="changeFeedURL" class="text-readonly-input" readonly="readonly"/>
            </div>
            <div class="button-box">
                <input type="button" class="delete-button input-button" value="<?php 
    echo _t('삭제');
    ?>
"
                       onclick="Reader.deleteFeed(); return false;"/>
                <span class="divider">|</span>
                <input type="submit" class="edit-button input-button" value="<?php 
    echo _t('저장');
    ?>
"
                       onclick="Reader.editFeedExecute(); return false;"/>
                <span class="divider">|</span>
                <input type="button" class="cancel-button input-button" value="<?php 
    echo _t('취소');
    ?>
"
                       onclick="Reader.cancelEditFeed(); return false;"/>
            </div>
        </div>
    </div>
<?php 
}
Exemple #3
0
<title>Textcube <?php 
echo TEXTCUBE_VERSION;
?>
 Reader Feeds</title>
<ownerName><?php 
echo htmlspecialchars($writer);
?>
</ownerName>
<ownerEmail><?php 
echo User::getEmail();
?>
</ownerEmail>
</head>
<body>
<?php 
foreach (getFeeds($blogid) as $feed) {
    $feed['title'] = str_replace('\\\'', '\'', escapeJSInAttribute($feed['title']));
    $feed['description'] = str_replace('\\\'', '\'', escapeJSInAttribute($feed['description']));
    ?>
<outline text="<?php 
    echo $feed['title'];
    ?>
" description="<?php 
    echo $feed['description'];
    ?>
" htmlUrl="<?php 
    echo escapeJSInAttribute($feed['blogURL']);
    ?>
" title="<?php 
    echo $feed['title'];
    ?>
Exemple #4
0
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>eRONA: Meine Feeds</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="css.css" rel="stylesheet" type="text/css" />
<?php 
readfile(".metas");
?>
</head>
<body>
<table>
<?php 
getFeeds("meine");
$feeds = getSimilar($_GET['s']);
$feeds_gefunden = FALSE;
echo "<h3><i>" . urldecode($_GET['t']) . "</i> ähnliche Feeds</h3>\n";
echo '<span class="liste">';
echo '<table>';
for ($i = 0; $i < count($feeds) - 1; $i++) {
    $abo = 1;
    $sql = "SELECT " . $feeds[$i]['id'] . " IN (" . $_SESSION['feed_liste'] . ")";
    $res = mysql_query($sql);
    if (!($row = @mysql_fetch_row($res))) {
        $abo = 1;
    } else {
        $abo = $row[0];
    }
    if ($abo == 0) {
<?php

#apd_set_pprof_trace('./temp/apd/');
include "connect.php";
include "session.php";
if (!@isset($_SESSION['user_id'])) {
    header("Location: http://" . ERONA_URL . "index.php");
}
$row = getFeeds("meine");
echo "<?xml version=\"1.0\" encoding=\"utf-8\"?" . ">";
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>eRONA: Meine Feeds</title>
<?php 
readfile(".metas");
?>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="css.css" rel="stylesheet" type="text/css" />

<script type="text/javascript">
<!--
var NextUpdate = <?php 
echo filemtime('./temp/startlastupdate') + UPDATE_CYCLE - time();
?>
;
var UpdateRunning = <?php 
echo file_exists('./temp/updaterunning') ? 1 : 0;
?>
;
Exemple #6
0
<div id="RssDiv">
<div class="Title" style="cursor:pointer" onclick="this.nextElementSibling.style.display=(this.nextElementSibling.style.display=='none'?'table':'none')"><?php 
print get_text('ScheduleFeed', 'Boinx');
?>
</div>
<table class="Tabella">
<?php 
// Extra
echo getExtra($_SESSION['TourId']);
echo '<tr><td colspan="4">&nbsp;</td></tr>';
// Rss
echo getRss($_SESSION['TourId']);
echo '<tr><td colspan="4">&nbsp;</td></tr>';
// Feed
echo getFeeds($_SESSION['TourId']);
?>
</table>
</div>

<div id="GrdDiv">
<div class="Title" style="cursor:pointer" onclick="this.nextElementSibling.style.display=(this.nextElementSibling.style.display=='none'?'table':'none')"><?php 
print get_text('ScheduleGrids', 'Boinx');
?>
</div>
<table class="Tabella">
<?php 
// Grids
echo getGrids($_SESSION['TourId']);
?>
</table>
Exemple #7
0
<?php

$feeds = getFeeds();
$feed_wire = "";
foreach ($feeds as $feed) {
    $parse_date = explode(" ", $feed['post_date']);
    $parse_date = explode("-", $parse_date[0]);
    $day = $parse_date[2];
    $month = $parse_date[1];
    $year = $parse_date[0];
    $post_date = $day . '/' . $month . '/' . $year;
    $feed_wire .= '<li><a href="' . root() . '/index.php?a=' . $feed['short_access'] . '" target="_self">' . $post_date . ' : ' . $feed['caption'] . '</a></li>';
}
$template = '
	<div id="footer_xpander">
		<a id="xpander_btn" class="up" href="#" onclick="xpandFooter(150)"></a>
	</div>
	<div id="footer_content">
		<div id="minimized">
			<div class="ticker4 modern-ticker mt-round">
			   <div class="mt-body">
				  <div class="mt-label">Informations</div>
				  <div class="mt-news">
					 <ul>
						' . $feed_wire . '
					 </ul>
				  </div>
			   </div>
			</div>
		</div>
		<div id="maximized">
<?php

#apd_set_pprof_trace('./temp/apd');
include "connect.php";
include "session.php";
if (!@isset($_SESSION['user_id'])) {
    header("Location: http://" . ERONA_URL . "index.php");
}
$s = is_numeric($_GET['s']) ? $_GET['s'] : 'meine';
getFeeds($s);
switch ($_POST['timespan']) {
    case 'week':
        $timespan = TIMESPAN_WEEK;
        break;
    case 'month':
        $timespan = TIMESPAN_MONTH;
        break;
    case 'quartal':
        $timespan = TIMESPAN_QUARTAL;
        break;
    default:
        $timespan = TIMESPAN_DEFAULT;
        break;
}
switch ($s) {
    case "all":
        $feeds = "allen Feeds ";
        break;
    case "meine":
        $feeds = "meinen Feeds ";
        $feed['title'] = "Inbox";
Exemple #9
0
function makeRSS($p, $user)
{
    getFeeds("meine");
    $items = getItems(TIMESPAN_QUARTAL, TRUE, TRUE, 15);
    $rss = new RSSWriter("http://" . ERONA_URL . "myfeeds.php?p={$p}", $user['title'], $user['descr']);
    $rss->useModule("dc", "http://purl.org/dc/elements/1.1/");
    for ($i = 0; $i < count($items) - 1; $i++) {
        #echo $i;
        $rss->addItem($items[$i]['iurl'], $items[$i]['ititle'], array("description" => $items[$i]['idescr'], "dc:date" => iso8601_date($items[$i]['idate'])));
    }
    $rss->serialize();
}
    }
    return $result;
}
/**
 * Print report
 *
 * @param array $stats Array with data
 */
function printReport($stats)
{
    if (!empty($stats)) {
        print "Downloads report\n";
        print "================\n";
        foreach ($stats as $url => $files) {
            print $url . "\n";
            sort($files);
            foreach ($files as $file) {
                print "\t{$file}\n";
            }
            print "\n";
        }
    }
}
// If no config specified, use the default one
$config = empty($argv[1]) ? getConfig(DEFAULT_CONFIG) : getConfig($argv[1]);
if (empty($config)) {
    die("Empty config. Nothing to do. Work on your " . DEFAULT_CONFIG);
}
$feeds = getFeeds($config);
$stats = processFeeds($feeds, $config);
printReport($stats);
Exemple #11
0
<?php

include "connect.php";
include "session.php";
if (!isset($_SESSION['user_id'])) {
    header("Location: http://" . ERONA_URL . "login.php");
    #print_r($_SESSION);
    #die ("user_public");
}
echo "<?xml version=\"1.0\" encoding=\"utf-8\"?" . ">";
if (!isset($_GET['mode'])) {
    $feeds = getFeeds('all');
    $titel = "Alle Feeds";
} else {
    $feeds = getFeeds('top25');
    $titel = "Top 25 Feeds";
}
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>eRONA: Meine Feeds</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link href="css.css" rel="stylesheet" type="text/css" />
<?php 
readfile(".metas");
?>
</head>
<body>
<?php 
Exemple #12
0
<body>
	<div id="fb-root"></div>
<script>(function(d, s, id) {
  var js, fjs = d.getElementsByTagName(s)[0];
  if (d.getElementById(id)) return;
  js = d.createElement(s); js.id = id;
  js.src = "//connect.facebook.net/en_US/sdk.js#xfbml=1&version=v2.3&appId=236564453025131";
  fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
<?php 
function getFeeds($url)
{
    $x = simplexml_load_file($url);
    //$x = new DOMDocument();
    //$x->load($url);
    echo "<ul>";
    foreach ($x->channel->item as $entry) {
        echo "<li><a href='{$entry->link}' title='{$entry->title}'>" . $entry->title . "</a></li>";
    }
    echo "</ul>";
}
echo getFeeds("http://rss.cnn.com/rss/cnn_tech.rss");
echo "<hr/>";
echo getFeeds("http://rss.cnn.com/rss/cnn_freevideo.rss");
?>
<hr/>
<div class="fb-like" data-href="http://cs.rahnama.af" data-width="400" data-layout="standard" data-action="like" data-show-faces="true" data-share="true"></div>

<a class="twitter-timeline" href="https://twitter.com/bbaheer" data-widget-id="587131869021503489">Tweets by @bbaheer</a> <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+"://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
</body>
</html>
Exemple #13
0
<?php

require_once "models/config.php";
//Prevent the user visiting the logged in page if he is not logged in
if (!isUserLoggedIn()) {
    header("Location: /nurrap/admin/login.php");
    die;
}
if (!securePage($_SERVER['PHP_SELF'])) {
    die;
}
require_once "functions/general.php";
global $mysqli;
require_once 'autoloader.php';
$sources = getActiveSources();
$feeds_old = getFeeds();
foreach ($feeds_old as $feed) {
    $feeds_link[] = $feed['feeds_link'];
}
$artists = getArtists();
$truncate = "TRUNCATE feeds";
//mysqli_query($mysqli, $truncate);
foreach ($sources as $source) {
    $feed = new SimplePie();
    $feed->set_feed_url($source['sources_url']);
    $feed->init();
    $feed->enable_cache(false);
    $feed->handle_content_type();
    $template = '<b><a href="%s" title="%s">%s</a></b><br />%s<hr />';
    // Iteriere ueber alle Eintraege
    foreach ($feed->get_items() as $item) {