Пример #1
0
function selarea($actual)
{
    global $locale, $locales, $user_id;
    /*if(strlen($actual) > 14)
    		$actual = substr($actual, 0, 11)."…";*/
    echo '<a href="logout.php?mobile=true" id="logout"><img src="images/door_out.png" alt="' . _('Ausloggen') . '" /></a>';
    /*echo '<div class="select"><strong><img src="i18n/flags/'.$locale.'.gif" alt="'.$locale.'" /></strong><ul>';
    	foreach ($locales as $loc) {
    		$_GET['locale'] = $loc;
    		
    		echo '<li><a href="?'.http_build_query($_GET).'"><img src="i18n/flags/'.$loc.'.gif" alt="'.$loc.'" /></a></li>';
    	}
    	echo '</ul></div>';*/
    echo "<div class=\"select feedselect\"><strong>{$actual}</strong><ul>";
    $all_qry = mysql_query("SELECT\n\t\t\tCOUNT(`feed_id`) as c,\n\t\t\t`feed_id`\n\t\tFROM\n\t\t\t`feeds_entries`\n\t\tINNER JOIN\n\t\t\t`feeds`\n\t\t\t\tON `feeds`.`id` = `feeds_entries`.`feed_id`\n\t\tWHERE\n\t\t\t0 = (SELECT\n\t\t\t\t\tCOUNT(`article_id`)\n\t\t\t\tFROM\n\t\t\t\t\t`feeds_read`\n\t\t\t\tWHERE\n\t\t\t\t\t`user_id` = " . $user_id . "\n\t\t\t\t\tAND\n\t\t\t\t\t`feeds_read`.`article_id` = `feeds_entries`.`article_id`\n\t\t\t)\n\t\t\tAND\n\t\t\t1 = (SELECT\n\t\t\t\t\tCOUNT(`feedid`)\n\t\t\t\tFROM\n\t\t\t\t\t`feeds_subscription`\n\t\t\t\tWHERE\n\t\t\t\t\t`userid` =" . $user_id . "\n\t\t\t\t\tAND\n\t\t\t\t\t`feeds_subscription`.`feedid` = `feeds_entries`.`feed_id`\n\t\t\t\t)\n\t\tGROUP by \n\t\t\t`feed_id`\n\t\tORDER by \n\t\t\t`timestamp` desc");
    $unread = array();
    while ($row = mysql_fetch_assoc($all_qry)) {
        $unread[$row['feed_id']] = intval($row['c']);
    }
    $unread["all"] = array_sum($unread);
    $sticky_qry = mysql_query("SELECT\n\t\t\t\tCOUNT(`feed_id`) as c\n\t\t\tFROM\n\t\t\t\t`feeds_entries`\n\t\t\tWHERE\n\t\t\t\t1 = (SELECT\n\t\t\t\t\t\tCOUNT(`article_id`)\n\t\t\t\t\tFROM\n\t\t\t\t\t\t`sticky`\n\t\t\t\t\tWHERE\n\t\t\t\t\t\t`user_id` = " . $user_id . "\n\t\t\t\t\t\tAND\n\t\t\t\t\t\t`sticky`.`article_id` = `feeds_entries`.`article_id`\n\t\t\t\t)\n\t\t\t\tAND\n\t\t\t\t1 = (SELECT\n\t\t\t\t\t\tCOUNT(`feedid`)\n\t\t\t\t\tFROM\n\t\t\t\t\t\t`feeds_subscription`\n\t\t\t\t\tWHERE\n\t\t\t\t\t\t`userid` =" . $user_id . "\n\t\t\t\t\t\tAND\n\t\t\t\t\t\t`feeds_subscription`.`feedid` = `feeds_entries`.`feed_id`\n\t\t\t\t\t)");
    $sticky = mysql_fetch_object($sticky_qry);
    $sticky = $sticky->c;
    echo "<li><a href=\"m_all.php\">" . _("Alle Feeds") . " <span id='unreadcount_all'>" . ($unread["all"] > 0 ? '(' . $unread["all"] . ')' : '') . "</span></a></li>";
    echo "<li><a href=\"m_sticky.php\">" . _("Merkliste") . " <span id='unreadcount_sticky'>" . ($sticky > 0 ? '(' . $sticky . ')' : '') . "</span></a></li>";
    $feeds_qry = mysql_query("SELECT `feedid`, `feedname` FROM `view_feed_subscriptions` WHERE `userid` =" . $user_id . " AND feedid > 0 ORDER by `feedname` asc");
    if (mysql_num_rows($feeds_qry) == 0) {
        echo "<p>Keine Feeds gefunden.</p>";
    } else {
        while ($row = mysql_fetch_assoc($feeds_qry)) {
            echo '<li id="feednavi_' . $row["feedid"] . '"><a href="m_feeds.php?feedid=' . $row["feedid"] . '">' . utf_correct($row["feedname"]);
            echo ' <span id="unreadcount_' . $row["feedid"] . '">' . ($unread[$row["feedid"]] > 0 ? '(' . $unread[$row["feedid"]] . ')' : '') . '</span></a></li>';
        }
    }
    echo '</ul></div>';
}
Пример #2
0
		<a href="m_all.php"><img src="images/gfr.gif" alt="geek's factory reader" /></a> <?php 
    selarea(_("Gemerkte Artikel"));
    ?>
	</div>
	<p id="subnav">
		<a href="sticky_ajax.php?unsticky=all&mobile=true"><?php 
    echo _("Alle entfernen");
    ?>
</a>
	</p>
	<?php 
    $all_qry = mysql_query("SELECT\n\t\t\t\t`feed_id`,\n\t\t\t\tIF(\n\t\t\t\t\t((SELECT alias FROM feeds_subscription WHERE `userid` = " . $user_id . " AND `feeds_subscription`.`feedid` = `feeds_entries`.`feed_id`) != ''),\n\t\t\t\t\t(SELECT alias FROM feeds_subscription WHERE `userid` = " . $user_id . " AND `feeds_subscription`.`feedid` = `feeds_entries`.`feed_id`),\n\t\t\t\t\t`name`\n\t\t\t\t) as `feedtitle`,\n\t\t\t\t`feeds`.`url` as `feedurl`,\n\t\t\t\t`article_id`,\n\t\t\t\t`title`,\n\t\t\t\t`guid`,\n\t\t\t\t`timestamp`,\n\t\t\t\t`article_id`,\n\t\t\t\t`summary`,\n\t\t\t\t`feeds_entries`.`url` as `articleurl`,\n\t\t\t\t(\n\t\t\t\t\tSELECT\n\t\t\t\t\t\tCOUNT(`article_id`)\n\t\t\t\t\tFROM\n\t\t\t\t\t\t`feeds_read`\n\t\t\t\t\tWHERE\n\t\t\t\t\t\t`user_id` = " . $user_id . "\n\t\t\t\t\tAND\n\t\t\t\t\t\t`feeds_read`.`article_id` = `feeds_entries`.`article_id`\n\t\t\t\t) as `read_status`\n\t\t\t\tFROM\n\t\t\t\t\t`feeds_entries`\n\t\t\t\tINNER JOIN\n\t\t\t\t\t`feeds`\n\t\t\t\t\tON\n\t\t\t\t\t\t`feeds`.`id` = `feeds_entries`.`feed_id`\n\t\t\t\tWHERE\n\t\t\t\t\t1 = (SELECT\n\t\t\t\t\t\t\tCOUNT(`article_id`)\n\t\t\t\t\t\tFROM\n\t\t\t\t\t\t\t`sticky`\n\t\t\t\t\t\tWHERE\n\t\t\t\t\t\t\t`user_id` = " . $user_id . "\n\t\t\t\t\t\tAND\n\t\t\t\t\t\t\t`sticky`.`article_id` = `feeds_entries`.`article_id`\n\t\t\t\t\t)\n\t\t\t\t\tAND\n\t\t\t\t\t1 = (SELECT\n\t\t\t\t\t\t\tCOUNT(`feedid`)\n\t\t\t\t\t\tFROM\n\t\t\t\t\t\t\t`feeds_subscription`\n\t\t\t\t\t\tWHERE\n\t\t\t\t\t\t\t`userid` =" . $user_id . "\n\t\t\t\t\t\tAND\n\t\t\t\t\t\t\t`feeds_subscription`.`feedid` = `feeds_entries`.`feed_id`\n\t\t\t\t\t)\n\t\t\t\tORDER by \n\t\t\t\t\t`timestamp` desc");
    if (mysql_num_rows($all_qry) == 0) {
        echo '<p class="info">
				' . _('Du hast dir keine Einträge gemerkt!') . '
			</p>';
    }
    while ($row = mysql_fetch_assoc($all_qry)) {
        echo '<div id="article_' . $row["article_id"] . '" class="sticky">';
        echo '<a href="javascript:void(0);" class="titlelink" onclick="togglearticle(' . $row["article_id"] . ')">' . utf_correct($row["title"]) . '</a>';
        echo '<em>' . date(_("d.m.Y - H:i"), $row["timestamp"]) . ': ' . utf_correct($row["feedtitle"]) . '</em>';
        echo ' &middot; <a href="javascript:unstickyremove(' . $row["article_id"] . ');" class="stickylink">' . _('aus Merkliste entfernen') . '</a>';
        echo '<br />';
        echo '<div class="sum"><a href="' . $row["articleurl"] . '" target="_blank">' . _('zum Originalbeitrag') . '</a><br />' . utf_correct(gzuncompress($row["summary"])) . '</div></div>';
    }
    echo '</div>';
    require 'includes/mobile_footer.php';
} else {
    header('Location: index.php');
    exit;
}
Пример #3
0
					}, 120000);
			</script>';
    }
    while ($row = mysql_fetch_assoc($all_qry)) {
        echo '<div id="article_' . $row["article_id"] . '"' . ($row["read_status"] == 0 ? ' class="unreadarticle"' : ' class="readarticle' . ($row["sticky"] == 1 ? ' sticky' : '') . '"') . '>';
        echo '<a href="' . $row["articleurl"] . '" class="titlelink" target="_blank">' . utf_correct($row["title"]) . '</a>';
        if ($row["updated"] > 0) {
            echo '<span class="updated" title="' . sprintf(_("Dieser Artikel hat sich %d mal geändert"), $row["updated"]) . '">' . $row["updated"] . '</span>';
        }
        echo '<br />';
        echo '<em>' . date(_("d.m.Y - H:i"), $row["timestamp"]) . ': ' . $row["feedtitle"] . '</em>';
        if ($row["sticky"] == 1) {
            echo ' &middot; <a href="javascript:unsticky(' . $row["article_id"] . ');" class="stickylink">' . _('nicht merken') . '</a>';
        } else {
            echo ' &middot; <a href="javascript:sticky(' . $row["article_id"] . ');" class="stickylink">' . _('merken') . '</a>';
        }
        echo '<br /><div class="sum">' . utf_correct(gzuncompress($row["summary"])) . '</div><div class="clear"></div></div>';
    }
    echo '</div></div>
		<div id="right-gap"></div>
		<div class="clear"></div>
		<script type="text/javascript">
			register_scroll_hotkeys();
			register_focus_handler();
			register_scroll_readhandler();
		</script>';
    require 'includes/application_footer.php';
} else {
    header('Location: index.php');
    exit;
}
Пример #4
0
    if (mysql_num_rows($feeds_qry) == 0) {
        echo "<p>" . _("Keine Feeds gefunden.") . "</p>";
    } else {
        echo '<table class="abos">
				<tr>
				  <th>' . _('Name') . '</th>
				  <th>' . _('Alias') . '</th>
				  <th class="update_column">' . _('Bei Update eines Artikels wieder als ungelesen anzeigen') . '</th>
				  <th></th>
				</tr>';
        while ($row = mysql_fetch_assoc($feeds_qry)) {
            echo '<tr><td id="title_' . $row["feedid"] . '">';
            if (time() - $row["lastupdate"] > 1000) {
                echo '<img src="images/error.png" class="erroricon" alt="' . _('Fehler') . '" title="' . _('Dieser Feed konnte kürzlich nicht erfolgreich abgerufen werden.') . '" /> ';
            }
            echo '<a href="' . $row['feedurl'] . '" class="feedlink" target="_blank">' . utf_correct($row["origname"]) . '</a></td><td id="alias_' . $row["feedid"] . '">' . utf_correct($row["alias"]) . '</td>';
            echo '<td class="update_column"><input type="checkbox" class="updates_box"' . ($row['updates'] ? ' checked="checked"' : '') . ' value="' . $row["feedid"] . '" /></td>';
            echo '<td><a href="settings.php?del=' . $row["feedid"] . '&hash=' . $s . '">' . _('Löschen') . '</a> | <a href="javascript:editalias(' . $row["feedid"] . ')" id="editaliaslink_' . $row["feedid"] . '">' . _('Alias setzen') . '</a></td></tr>';
        }
        echo '</table>';
    }
    ?>
		  
	<div id="desknot" style="display:none;">
		<h3><?php 
    echo _('Desktop Notifications');
    ?>
</h3>
		<p class="info">
			<?php 
    echo _('Nicht wundern: Einstellung wird nur für diesen Computer gespeichert (als Cookie).');
Пример #5
0
    /* End: New? */
    echo '<div id="left-col">
		  <a href="index.php"><img src="images/logo.png" id="logo" /></a>
		  <div id="navi">
		  <ul>
		  <li id="feednavi_all" class="donthide"><a href="all.php"><img src="images/newspaper.png" class="favicon" alt="" /> <span class="text">' . _('Alle Feeds') . ' <span class="unread unreadcount_all" id="unreadcount_all">' . ($unread["all"] > 0 ? '(' . $unread["all"] . ')' : '') . '</span></span></a></li>
		  <li class="donthide"><a href="sticky.php"><img src="images/star.png" class="favicon" alt="" /> <span class="text">' . _('Merkliste') . ' <span class="unread unreadcount_sticky" id="unreadcount_sticky">' . ($sticky > 0 ? '(' . $sticky . ')' : '') . '</span></span></a></li>
		  <li class="donthide"><a href="settings.php"><img src="images/wrench.png" class="favicon" alt="" /> <span class="text">' . _('Einstellungen') . '</span></a></li>
		  <li class="donthide"><a href="logout.php"><img src="images/door_out.png" class="favicon" alt="" /> <span class="text">' . _('Ausloggen') . '</span></a></li>
		  <li class="feednavi_hr donthide"></li>
		  ';
    $feeds_qry = mysql_query("SELECT `feedid`, `feedname`, `lastupdate` FROM `view_feed_subscriptions` WHERE `userid` =" . $user_id . " AND feedid > 0 ORDER by `feedname` asc");
    if (mysql_num_rows($feeds_qry) == 0) {
        echo "<p>Keine Feeds gefunden.</p>";
    } else {
        while ($row = mysql_fetch_assoc($feeds_qry)) {
            echo '<li id="feednavi_' . $row["feedid"] . '"><a href="feeds.php?feedid=' . $row["feedid"] . '">';
            echo '<img class="favicon" src="favicons/' . $row["feedid"] . '.png" alt="" /> <span class="text">' . utf_correct($row["feedname"]) . ' <span id="unreadcount_' . $row["feedid"] . '" class="unread unreadcount_' . $row["feedid"] . '">' . ($unread[$row["feedid"]] > 0 ? '(' . $unread[$row["feedid"]] . ')' : '') . '</span>';
            if (time() - $row["lastupdate"] > 1000) {
                echo ' <img src="images/error.png" class="erroricon" alt="' . _('Fehler') . '" title="' . _('Dieser Feed konnte kürzlich nicht erfolgreich abgerufen werden.') . '" />';
            }
            echo '</span></a></li>';
        }
    }
    echo '<li class="collapse"><a href="#">' . _('Zeige nur Ungelesenes') . '</a></li>';
    echo '<li class="uncollapse"><a href="#">' . _('Zeige alle Feeds') . '</a></li>';
    echo '<li class="feednavi_hr donthide"></li>
		  <li id="infoline" class="donthide">' . _('Entwickler und Betreiber:') . ' <a href="http://geeksfactory.de" target="_blank">geek\'s factory</a><br /><a href="http://git.geeksfactory.de/reader.git" target="_blank">get the source!</a><br />' . _('Icons von') . ' <a href="http://famfamfam.com" target="_blank">famfamfam.com</a></li></ul>
		  </div>
		  </div>';
}
Пример #6
0
            if (mysql_num_rows($entries_qry) == 0) {
                echo '<p class="info">
						' . sprintf(_('Dieser Feed besitzt keine%s Einträge. Wenn du ihn gerade erst aboniert hast, kann es bis zu fünf Minuten dauern, bis hier Einträge erscheinen. Außerdem werden keine Einträge angezeigt, die älter als 30 Tage sind.'), !isset($_GET['show']) || $_GET['show'] == 'unread' ? _(' ungelesenen') : '') . '
						</p>';
            }
            while ($row = mysql_fetch_assoc($entries_qry)) {
                echo '<div id="article_' . $row["article_id"] . '"' . ($row["read_status"] == 0 ? ' class="unreadarticle"' : ' class="readarticle' . ($row["sticky"] == 1 ? ' sticky' : '') . '"') . '>';
                echo '<a href="javascript:void(0);" class="titlelink" onclick="togglearticle(' . $row["article_id"] . ')">' . utf_correct($row["title"]) . '</a>';
                echo '<em>' . date(_("d.m.Y - H:i"), $row["timestamp"]) . '</em>';
                if ($row["sticky"] == 1) {
                    echo ' &middot; <a href="javascript:unsticky(' . $row["article_id"] . ');" class="stickylink">' . _('nicht merken') . '</a>';
                } else {
                    echo ' &middot; <a href="javascript:sticky(' . $row["article_id"] . ');" class="stickylink">' . _('merken') . '</a>';
                }
                echo '<br /><div class="sum"><a href="' . $row["articleurl"] . '" target="_blank">' . _('zum Originalbeitrag') . '</a>';
                echo '<br />' . utf_correct(gzuncompress($row["summary"])) . '</div></div>';
            }
        } else {
            echo '<p class="error">' . _('Du abonnierst diesen Feed nicht.') . '</p>';
        }
    }
    echo "<a href='javascript:loadmore();' class='loadmore'>" . _('Mehr laden') . "</a>";
    echo '</div>';
    require 'includes/application_footer.php';
} else {
    header('Location: index.php');
    exit;
}
?>

Пример #7
0
    while ($r = mysql_fetch_object($lasttimestamp)) {
        $last = $r;
    }
    $lasttimestamp = $last->timestamp;
    $all_qry = mysql_query("SELECT\n\t\t\t\t`feed_id`,\n\t\t\t\tIF(\n\t\t\t\t\t((SELECT alias FROM feeds_subscription WHERE `userid` = " . $user_id . " AND `feeds_subscription`.`feedid` = `feeds_entries`.`feed_id`) != ''),\n\t\t\t\t\t(SELECT alias FROM feeds_subscription WHERE `userid` = " . $user_id . " AND `feeds_subscription`.`feedid` = `feeds_entries`.`feed_id`),\n\t\t\t\t\t`name`\n\t\t\t\t) as `feedtitle`,\n\t\t\t\t`feeds`.`url` as `feedurl`,\n\t\t\t\t`article_id`,\n\t\t\t\t`title`,\n\t\t\t\t`guid`,\n\t\t\t\t`timestamp`,\n\t\t\t\t(SELECT COUNT(*) FROM sticky s WHERE user_id = " . $user_id . " AND s.article_id = `feeds_entries`.article_id) as `sticky`,\n\t\t\t\t`summary`,\n\t\t\t\t`article_id`,\n\t\t\t\t`feeds_entries`.`url` as `articleurl`,\n\t\t\t\t(\n\t\t\t\t\tSELECT\n\t\t\t\t\t\tCOUNT(`article_id`)\n\t\t\t\t\tFROM\n\t\t\t\t\t\t`feeds_read`\n\t\t\t\t\tWHERE\n\t\t\t\t\t\t`user_id` = " . $user_id . "\n\t\t\t\t\tAND\n\t\t\t\t\t\t`feeds_read`.`article_id` = `feeds_entries`.`article_id`\n\t\t\t\t) as `read_status`\n\t\t\tFROM\n\t\t\t\t`feeds_entries`\n\t\t\tINNER JOIN\n\t\t\t\t`feeds`\n\t\t\t\t\tON `feeds`.`id` = `feeds_entries`.`feed_id`\n\t\t\tWHERE\n\t\t\t\t" . (!isset($_GET['show']) || $_GET['show'] == 'unread' ? "0 = (SELECT\n\t\t\t\t\t\tCOUNT(`article_id`)\n\t\t\t\t\tFROM\n\t\t\t\t\t\t`feeds_read`\n\t\t\t\t\tWHERE\n\t\t\t\t\t\t`user_id` = " . $user_id . "\n\t\t\t\t\t\tAND\n\t\t\t\t\t\t`feeds_read`.`article_id` = `feeds_entries`.`article_id`\n\t\t\t\t\t)\n\t\t\t\t\tAND" : '') . "\n\t\t\t\t1 = (SELECT\n\t\t\t\t\t\tCOUNT(`feedid`)\n\t\t\t\t\tFROM\n\t\t\t\t\t\t`feeds_subscription`\n\t\t\t\t\tWHERE\n\t\t\t\t\t\t`userid` =" . $user_id . "\n\t\t\t\t\t\tAND\n\t\t\t\t\t\t`feeds_subscription`.`feedid` = `feeds_entries`.`feed_id`\n\t\t\t\t\t)\n\t\t\t\tAND timestamp < " . intval($_GET['lasttimestamp']) . "\n\t\t\t\tAND timestamp >= " . intval($lasttimestamp) . "\n\t\t\tORDER by \n\t\t\t\t`timestamp` desc");
    if ($lasttimestamp < 1) {
        $lasttimestamp = 0;
    }
    echo '<script type="text/javascript">
			lasttimestamp = ' . $lasttimestamp . ';
		</script>';
    if (mysql_num_rows($all_qry) == 0) {
        die('<!-- NOTHING MORE -->');
    }
    while ($row = mysql_fetch_assoc($all_qry)) {
        echo '<div id="article_' . $row["article_id"] . '"' . ($row["read_status"] == 0 ? ' class="unreadarticle"' : ' class="readarticle' . ($row["sticky"] == 1 ? ' sticky' : '') . '"') . '>';
        echo '<a ' . (isset($_GET['mobile']) ? 'onclick="togglearticle(' . $row["article_id"] . ')" href="javascript:void(0);' : 'target="_blank" href="' . $row["articleurl"]) . '" class="titlelink">';
        echo utf_correct($row["title"]) . '</a>';
        echo (isset($_GET['mobile']) ? '' : '<br />') . '<em>' . date(_("d.m.Y - H:i"), $row["timestamp"]) . ': ' . utf_correct($row["feedtitle"]) . '</em>';
        if ($row["sticky"] == 1) {
            echo ' &middot; <a href="javascript:unsticky(' . $row["article_id"] . ');" class="stickylink">' . _('nicht merken') . '</a>';
        } else {
            echo ' &middot; <a href="javascript:sticky(' . $row["article_id"] . ');" class="stickylink">' . _('merken') . '</a>';
        }
        echo '<br />';
        echo '<div class="sum"' . (isset($_GET['mobile']) ? ' style="display:none"><a href="' . $row["articleurl"] . '" target="_blank">' . _('zum Originalbeitrag') . '</a><br />' : '>') . utf_correct(gzuncompress($row["summary"])) . '</div><div class="clear"></div></div>';
    }
} else {
    echo json_encode(array('error' => _('not logged in')));
    exit;
}