Compare commits

...

32 Commits
0.2 ... 0.3

Author SHA1 Message Date
85ebc80c7e Merge branch 'dev' 2013-07-31 17:19:50 +02:00
6588517b2d typo in readme 2013-07-31 11:51:24 +02:00
6d37de5f82 typo in readme 2013-07-31 11:50:38 +02:00
9c902708da google groups link 2013-07-31 11:49:25 +02:00
66ce09ba03 google groups link 2013-07-31 11:45:10 +02:00
6499b26ae8 demo mode (you can't update password in demo mode 2013-06-01 08:29:37 +02:00
da368cc84f update password in config screen 2013-06-01 08:23:37 +02:00
aa8c9f2a32 Installation mode 2013-05-31 22:55:52 +02:00
baa8617364 update JSLikeHTMLElement 2013-04-24 08:27:55 +02:00
494e21b4da add tidy call to clean html output 2013-04-23 16:03:52 +02:00
0ace6cab0b Fix #47 - update Readability class (thx to http://code.fivefilters.org/php-readability/) 2013-04-23 15:57:23 +02:00
c1c9f252f7 display flash message in article view 2013-04-23 15:37:03 +02:00
2987031bc3 Fixed #73 - Can't Poch url with special caracter 2013-04-23 15:25:12 +02:00
3e7188185d Merge branch 'memiks-gestion_erreur_readability' into dev 2013-04-23 15:19:33 +02:00
8d5aab49c1 lien corrigé dans le README 2013-04-23 15:18:22 +02:00
cdcc8d2533 Remove debug on Readability output 2013-04-23 08:09:54 -05:00
ae9571694f Correction erreur sur le Self 2013-04-23 07:29:16 -05:00
4ddbd26787 Ajout du global msg et gestion du retour dans Readability 2013-04-23 07:22:19 -05:00
8444bb0600 Merge branch 'master' of github.com:inthepoche/poche 2013-04-23 09:40:35 +02:00
29c6fd4607 messages d'erreur si pas possible d'ajouter ou de supprimer un lien 2013-04-23 09:38:57 +02:00
37f2773aa5 Merge pull request #74 from inthepoche/dev
v0.2.1
2013-04-22 23:34:55 -07:00
e682978e5b Revert "Update style.css"
This reverts commit 176d733a44.
2013-04-23 08:30:48 +02:00
69ca1455d1 v0.2.1 2013-04-23 08:08:42 +02:00
88958248fa message de bienvenue 2013-04-23 08:07:47 +02:00
2761de0184 Merge pull request #72 from Silvus/dev
Style de l'écran de connexion
2013-04-22 23:04:18 -07:00
d2beefd27c Petit correctif des couleurs de la classe "bouton" au hover 2013-04-22 23:10:35 +02:00
8af1077265 Le logo poche renvoie vers l'accueil 2013-04-22 23:02:04 +02:00
9acfade829 Reprise du style de l'écran de connexion 2013-04-22 22:58:07 +02:00
d3607de929 Update style.css
coquille pour l'affichage des liens sur la page view
2013-04-22 20:27:23 +03:00
176d733a44 Update style.css
coquille pour l'affichage des liens sur la page view
2013-04-22 19:57:40 +03:00
e858ac2776 login & password dans le readme 2013-04-22 08:32:30 +02:00
37c6ed4e7a Merge pull request #67 from inthepoche/dev
tag 0.2
2013-04-21 10:53:22 -07:00
21 changed files with 1376 additions and 1133 deletions

View File

@ -5,7 +5,9 @@ Abandon Pocket, Instapaper and other Readability service : adopt poche. It is th
The website of poche is [inthepoche.com](http://inthepoche.com).
To get news from poche, [follow us on twitter](http://twitter.com/getpoche) or [read the poche blog](http://inthepoche.com/blog).
To test poche, a demo website is online : [demo.inthepoche.com](http://demo.inthepoche.com) (login poche, password poche).
To get news from poche, [follow us on twitter](http://twitter.com/getpoche) or [read the poche blog](http://inthepoche.com/blog). A Google Group is also available : [poche-users](https://groups.google.com/forum/#!forum/poche-users).
[![flattr](http://api.flattr.com/button/flattr-badge-large.png)](http://flattr.com/thing/1265480/poche-a-read-it-later-open-source-system)
@ -23,7 +25,7 @@ You can :
## Requirements & installation
You have to install [sqlite for php](http://www.php.net/manual/en/book.sqlite.php) on your server.
Get the [latest version](https://github.com/nicosomb/poche) of poche on github. Unzip it and upload it on your server. poche must have write access on assets, cache and db directories.
Get the [latest version](https://github.com/inthepoche/poche) of poche on github. Unzip it and upload it on your server. poche must have write access on assets, cache and db directories.
That's all, **poche works** !

View File

@ -8,6 +8,16 @@ a, a:hover, a:visited {
color: #000;
}
.bouton {
background-color: #000;
color: #fff;
border: none;
}
.bouton:hover {
background-color: #222222;
color: #F1F1F1;
}
#main ul#links li a.current {
background-color: #000;
color: #fff;

View File

@ -4,11 +4,14 @@ body {
margin: 10px;
}
header {
text-align: center;
}
.bouton {
border-radius: 2px;
}
#main ul#links {
padding: 0;
list-style-type: none;
@ -56,11 +59,6 @@ footer {
text-align: right;
}
/*** ***/
/*** LOGIN FORM ***/
ul#login li {
list-style-type: none;
}
/*** ***/
/*** LINKS DISPLAY ***/
@ -117,7 +115,7 @@ input[type=submit].delete {
text-align: left;
}
#article.tools ul li{
#article .tools ul li{
display: inline;
}
@ -208,10 +206,10 @@ body.article {
.messages p { margin: 3px 0 3px 10px !important; padding: 0 10px 0 23px !important; font-size: 14px; line-height: 16px; }
.messages.error { border: 1px solid #C42608; color: #c00 !important; background: #FFF0EF; }
.messages.error p { background: url(../img/messages/cross.png ) no-repeat 0px 50%; color:#c00 !important; }
.messages.success {background: #E0FBCC; border: 1px solid #6DC70C; }
.messages.success {background: #E0FBCC; border: 1px solid #6DC70C; }
.messages.success p { background: url(../img/messages/tick.png) no-repeat 0px 50%; color: #2B6301 !important; }
.messages.warning { background: #FFFCD3; border: 1px solid #EBCD41; color: #000; }
.messages.warning p { background: url(../img/messages/warning.png ) no-repeat 0px 50%; color: #5F4E01; }
.messages.information, .messages.info { background: #DFEBFB; border: 1px solid #82AEE7; }
.messages.information p, .messages.info p { background: url(../img/messages/help.png ) no-repeat 0px 50%; color: #064393; }
.messages.information a { text-decoration: underline; }
.messages.information a { text-decoration: underline; }

0
img/messages/close.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 662 B

After

Width:  |  Height:  |  Size: 662 B

0
img/messages/cross.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 655 B

After

Width:  |  Height:  |  Size: 655 B

0
img/messages/help.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 786 B

After

Width:  |  Height:  |  Size: 786 B

0
img/messages/tick.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 537 B

After

Width:  |  Height:  |  Size: 537 B

0
img/messages/warning.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 666 B

After

Width:  |  Height:  |  Size: 666 B

View File

@ -4,7 +4,7 @@
*
* This class extends PHP's DOMElement to allow
* users to get and set the innerHTML property of
* HTML elements in the same way it's done in
* HTML elements in the same way it's done in
* JavaScript.
*
* Example usage:
@ -15,16 +15,16 @@
* $doc->registerNodeClass('DOMElement', 'JSLikeHTMLElement');
* $doc->loadHTML('<div><p>Para 1</p><p>Para 2</p></div>');
* $elem = $doc->getElementsByTagName('div')->item(0);
*
*
* // print innerHTML
* echo $elem->innerHTML; // prints '<p>Para 1</p><p>Para 2</p>'
* echo "\n\n";
*
*
* // set innerHTML
* $elem->innerHTML = '<a href="http://fivefilters.org">FiveFilters.org</a>';
* echo $elem->innerHTML; // prints '<a href="http://fivefilters.org">FiveFilters.org</a>'
* echo "\n\n";
*
*
* // print document (with our changes)
* echo $doc->saveXML();
* @endcode
@ -59,7 +59,7 @@ class JSLikeHTMLElement extends DOMElement
$value = mb_convert_encoding($value, 'HTML-ENTITIES', 'UTF-8');
// Using <htmlfragment> will generate a warning, but so will bad HTML
// (and by this point, bad HTML is what we've got).
// We use it (and suppress the warning) because an HTML fragment will
// We use it (and suppress the warning) because an HTML fragment will
// be wrapped around <html><body> tags which we don't really want to keep.
// Note: despite the warning, if loadHTML succeeds it will return true.
$result = @$f->loadHTML('<htmlfragment>'.$value.'</htmlfragment>');
@ -86,7 +86,7 @@ class JSLikeHTMLElement extends DOMElement
* @code
* $string = $div->innerHTML;
* @endcode
*/
*/
public function __get($name)
{
if ($name == 'innerHTML') {
@ -106,5 +106,4 @@ class JSLikeHTMLElement extends DOMElement
{
return '['.$this->tagName.']';
}
}
?>
}

File diff suppressed because it is too large Load Diff

View File

@ -93,7 +93,7 @@ class Session
// Force logout
public static function logout()
{
unset($_SESSION['uid'],$_SESSION['info'],$_SESSION['expires_on'],$_SESSION['tokens']);
unset($_SESSION['uid'],$_SESSION['info'],$_SESSION['expires_on'],$_SESSION['tokens'], $_SESSION['login'], $_SESSION['pass']);
}
// Make sure user is logged in.

View File

@ -8,15 +8,18 @@
* @license http://www.wtfpl.net/ see COPYING file
*/
define ('POCHE_VERSION', '0.2');
define ('POCHE_VERSION', '0.2.1');
if (!is_dir('db/')) {
@mkdir('db/',0705);
}
define ('MODE_DEMO', FALSE);
define ('ABS_PATH', 'assets/');
define ('CONVERT_LINKS_FOOTNOTES', TRUE);
define ('REVERT_FORCED_PARAGRAPH_ELEMENTS',FALSE);
define ('DOWNLOAD_PICTURES', TRUE);
define ('SALT', '464v54gLLw928uz4zUBqkRJeiPY68zCX');
$storage_type = 'sqlite'; # sqlite or file
include 'functions.php';
@ -32,9 +35,7 @@ require_once 'class.messages.php';
Session::init();
$store = new $storage_type();
$msg = new Messages();
$store = new $storage_type();
# initialisation de RainTPL
raintpl::$tpl_dir = './tpl/';
raintpl::$cache_dir = './cache/';
@ -42,4 +43,24 @@ raintpl::$base_url = get_poche_url();
raintpl::configure('path_replace', false);
raintpl::configure('debug', false);
$tpl = new raintpl();
if(!$store->isInstalled())
{
logm('poche still not installed');
$tpl->draw('install');
if (isset($_GET['install'])) {
if (($_POST['password'] == $_POST['password_repeat'])
&& $_POST['password'] != "" && $_POST['login'] != "") {
$store->install($_POST['login'], encode_string($_POST['password'] . $_POST['login']));
Session::logout();
MyTool::redirect();
}
}
exit();
}
$_SESSION['login'] = (isset ($_SESSION['login'])) ? $_SESSION['login'] : $store->getLogin();
$_SESSION['pass'] = (isset ($_SESSION['pass'])) ? $_SESSION['pass'] : $store->getPassword();
$msg = new Messages();
$tpl->assign('msg', $msg);

View File

@ -23,6 +23,11 @@ function get_poche_url()
return $protocol . "://" . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
}
function encode_string($string)
{
return sha1($string . SALT);
}
// function define to retrieve url content
function get_external_file($url)
{
@ -39,6 +44,10 @@ function get_external_file($url)
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_HEADER, false);
// FOR SSL do not verified certificate
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($curl, CURLOPT_AUTOREFERER, TRUE );
// FeedBurner requires a proper USER-AGENT...
curl_setopt($curl, CURL_HTTP_VERSION_1_1, true);
curl_setopt($curl, CURLOPT_ENCODING, "gzip, deflate");
@ -54,7 +63,15 @@ function get_external_file($url)
} else {
// create http context and add timeout and user-agent
$context = stream_context_create(array('http'=>array('timeout' => $timeout,'header'=> "User-Agent: ".$useragent,/*spoot Mozilla Firefox*/'follow_location' => true)));
$context = stream_context_create(array(
'http'=>array('timeout' => $timeout,
'header'=> "User-Agent: ".$useragent, /*spoot Mozilla Firefox*/
'follow_location' => true),
// FOR SSL do not verified certificate
'ssl' => array('verify_peer' => false,
'allow_self_signed' => true)
)
);
// only download page lesser than 4MB
$data = @file_get_contents($url, false, $context, -1, 4000000); // We download at most 4 MB from source.
@ -108,14 +125,26 @@ function prepare_url($url)
$i=strpos($url,'#xtor=RSS-'); if ($i!==false) $url=substr($url,0,$i);
$title = $url;
if (!preg_match('!^https?://!i', $url))
$url = 'http://' . $url;
$html = Encoding::toUTF8(get_external_file($url,15));
// If get_external_file if not able to retrieve HTTPS content try the same URL with HTTP protocol
if (!preg_match('!^https?://!i', $url) && (!isset($html) || strlen($html) <= 0)) {
$url = 'http://' . $url;
$html = Encoding::toUTF8(get_external_file($url,15));
}
if (function_exists('tidy_parse_string')) {
$tidy = tidy_parse_string($html, array(), 'UTF8');
$tidy->cleanRepair();
$html = $tidy->value;
}
if (isset($html) and strlen($html) > 0)
{
$r = new Readability($html, $url);
$r->convertLinksToFootnotes = CONVERT_LINKS_FOOTNOTES;
$r->revertForcedParagraphElements = REVERT_FORCED_PARAGRAPH_ELEMENTS;
if($r->init())
{
$content = $r->articleContent->innerHTML;
@ -125,8 +154,6 @@ function prepare_url($url)
}
}
$msg->add('e', 'error during url preparation');
logm('error during url preparation');
return FALSE;
}
@ -263,7 +290,13 @@ function display_view($view, $id = 0, $full_head = 'yes')
$tpl->assign('id', $entry['id']);
$tpl->assign('url', $entry['url']);
$tpl->assign('title', $entry['title']);
$tpl->assign('content', $entry['content']);
$content = $entry['content'];
if (function_exists('tidy_parse_string')) {
$tidy = tidy_parse_string($content, array('indent'=>true, 'show-body-only' => true), 'UTF8');
$tidy->cleanRepair();
$content = $tidy->value;
}
$tpl->assign('content', $content);
$tpl->assign('is_fav', $entry['is_fav']);
$tpl->assign('is_read', $entry['is_read']);
$tpl->assign('load_all_js', 0);
@ -311,35 +344,46 @@ function action_to_do($action, $url, $id = 0)
if (MyTool::isUrl($url)) {
if($parametres_url = prepare_url($url)) {
$store->add($url, $parametres_url['title'], $parametres_url['content']);
$last_id = $store->getLastId();
if (DOWNLOAD_PICTURES) {
$content = filtre_picture($parametres_url['content'], $url, $last_id);
if ($store->add($url, $parametres_url['title'], $parametres_url['content'])) {
$last_id = $store->getLastId();
if (DOWNLOAD_PICTURES) {
$content = filtre_picture($parametres_url['content'], $url, $last_id);
}
$msg->add('s', 'the link has been added successfully');
}
$msg->add('s', 'the link has been added successfully');
else {
$msg->add('e', 'error during insertion : the link wasn\'t added');
}
}
else {
$msg->add('e', 'error during url preparation : the link wasn\'t added');
logm('error during url preparation');
}
}
else {
$msg->add('e', 'the link has been added successfully');
$msg->add('e', 'error during url preparation : the link is not valid');
logm($url . ' is not a valid url');
}
logm('add link ' . $url);
break;
case 'delete':
remove_directory(ABS_PATH . $id);
$store->deleteById($id);
$msg->add('s', 'the link has been deleted successfully');
logm('delete link #' . $id);
if ($store->deleteById($id)) {
remove_directory(ABS_PATH . $id);
$msg->add('s', 'the link has been deleted successfully');
logm('delete link #' . $id);
}
else {
$msg->add('e', 'the link wasn\'t deleted');
logm('error : can\'t delete link #' . $id);
}
break;
case 'toggle_fav' :
$store->favoriteById($id);
$msg->add('s', 'the favorite toggle has been done successfully');
logm('mark as favorite link #' . $id);
break;
case 'toggle_archive' :
$store->archiveById($id);
$msg->add('s', 'the archive toggle has been done successfully');
logm('archive link #' . $id);
break;
default:
@ -351,4 +395,4 @@ function logm($message)
{
$t = strval(date('Y/m/d_H:i:s')).' - '.$_SERVER["REMOTE_ADDR"].' - '.strval($message)."\n";
file_put_contents('./log.txt',$t,FILE_APPEND);
}
}

View File

@ -17,7 +17,6 @@ class Sqlite extends Store {
parent::__construct();
$this->handle = new PDO(self::$db_path);
$this->handle->exec('CREATE TABLE IF NOT EXISTS "entries" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL UNIQUE , "title" VARCHAR, "url" VARCHAR UNIQUE , "is_read" INTEGER DEFAULT 0, "is_fav" INTEGER DEFAULT 0, "content" BLOB)');
$this->handle->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
}
@ -25,6 +24,63 @@ class Sqlite extends Store {
return $this->handle;
}
public function isInstalled() {
$sql = "SELECT name FROM sqlite_sequence WHERE name=?";
$query = $this->executeQuery($sql, array('config'));
$hasConfig = $query->fetchAll();
if (count($hasConfig) == 0)
return FALSE;
if (!$this->getLogin() || !$this->getPassword())
return FALSE;
return TRUE;
}
public function install($login, $password) {
$this->getHandle()->exec('CREATE TABLE IF NOT EXISTS "config" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL UNIQUE , "name" VARCHAR UNIQUE, "value" BLOB)');
$this->handle->exec('CREATE TABLE IF NOT EXISTS "entries" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL UNIQUE , "title" VARCHAR, "url" VARCHAR UNIQUE , "is_read" INTEGER DEFAULT 0, "is_fav" INTEGER DEFAULT 0, "content" BLOB)');
if (!$this->getLogin()) {
$sql_login = 'INSERT INTO config ( name, value ) VALUES (?, ?)';
$params_login = array('login', $login);
$query = $this->executeQuery($sql_login, $params_login);
}
if (!$this->getPassword()) {
$sql_pass = 'INSERT INTO config ( name, value ) VALUES (?, ?)';
$params_pass = array('password', $password);
$query = $this->executeQuery($sql_pass, $params_pass);
}
return TRUE;
}
public function getLogin() {
$sql = "SELECT value FROM config WHERE name=?";
$query = $this->executeQuery($sql, array('login'));
$login = $query->fetchAll();
return isset($login[0]['value']) ? $login[0]['value'] : FALSE;
}
public function getPassword() {
$sql = "SELECT value FROM config WHERE name=?";
$query = $this->executeQuery($sql, array('password'));
$pass = $query->fetchAll();
return isset($pass[0]['value']) ? $pass[0]['value'] : FALSE;
}
public function updatePassword($password)
{
$sql_update = "UPDATE config SET value=? WHERE name='password'";
$params_update = array($password);
$query = $this->executeQuery($sql_update, $params_update);
}
private function executeQuery($sql, $params) {
try
{
@ -107,6 +163,7 @@ class Sqlite extends Store {
$sql_action = 'INSERT INTO entries ( url, title, content ) VALUES (?, ?, ?)';
$params_action = array($url, $title, $content);
$query = $this->executeQuery($sql_action, $params_action);
return $query;
}
public function deleteById($id) {
@ -114,6 +171,7 @@ class Sqlite extends Store {
$sql_action = "DELETE FROM entries WHERE id=?";
$params_action = array($id);
$query = $this->executeQuery($sql_action, $params_action);
return $query;
}
public function favoriteById($id) {

View File

@ -13,6 +13,14 @@ class Store {
}
public function getLogin() {
}
public function getPassword() {
}
public function add() {
}

View File

@ -25,8 +25,9 @@ $ref = empty($_SERVER['HTTP_REFERER']) ? '' : $_SERVER['HTTP_REFERER'];
if (isset($_GET['login'])) {
// Login
if (!empty($_POST['login']) && !empty($_POST['password'])) {
if (Session::login('poche', 'poche', $_POST['login'], $_POST['password'])) {
if (Session::login($_SESSION['login'], $_SESSION['pass'], $_POST['login'], encode_string($_POST['password'] . $_POST['login']))) {
logm('login successful');
$msg->add('s', 'welcome in your poche!');
if (!empty($_POST['longlastingsession'])) {
$_SESSION['longlastingsession'] = 31536000;
$_SESSION['expires_on'] = time() + $_SESSION['longlastingsession'];
@ -49,6 +50,22 @@ elseif (isset($_GET['logout'])) {
Session::logout();
MyTool::redirect();
}
elseif (isset($_GET['config'])) {
if (isset($_POST['password']) && isset($_POST['password_repeat'])) {
if ($_POST['password'] == $_POST['password_repeat'] && $_POST['password'] != "") {
logm('password updated');
if (!DEMO) {
$store->updatePassword(encode_string($_POST['password'] . $_SESSION['login']));
$msg->add('s', 'your password has been updated');
}
else {
$msg->add('i', 'in demo mode, you can\'t update password');
}
}
else
$msg->add('e', 'your password can\'t be empty and you have to repeat it in the second field');
}
}
# Traitement des paramètres et déclenchement des actions
$view = (isset ($_REQUEST['view'])) ? htmlentities($_REQUEST['view']) : 'index';

View File

@ -3,6 +3,25 @@
<p>Thanks to the bookmarklet, you will be able to easily add a link to your poche. If you don't know how use a bookmarklet, <a href="http://support.mozilla.org/en-US/kb/bookmarklets-perform-common-web-page-tasks">have a look here</a>.</p>
<p>Drag & drop this link to your bookmarks bar and have fun with poche.</p>
<p><a style="cursor: move; border: 1px dashed grey; background: white;" title="i am a bookmarklet, use me !" href="javascript:(function(){var%20url%20=%20location.href%20||%20url;window.open('{$poche_url}?action=add&url='%20+%20encodeURIComponent(url),'_self');})();">poche it !</a></p>
<h2>Password</h2>
<form method="post" action="?config" name="loginform">
<fieldset class="w500p">
<div class="row">
<label class="col w150p" for="password">New password</label>
<input class="col" type="password" id="password" name="password" placeholder="Password" tabindex="2">
</div>
<div class="row">
<label class="col w150p" for="password_repeat">Repeat your new password</label>
<input class="col" type="password" id="password_repeat" name="password_repeat" placeholder="Password" tabindex="3">
</div>
<div class="row mts txtcenter">
<button class="bouton" type="submit" tabindex="4">Update</button>
</div>
</fieldset>
<input type="hidden" name="returnurl" value="<?php echo htmlspecialchars($referer);?>">
<input type="hidden" name="token" value="<?php echo Session::getToken(); ?>">
</form>
<h2>Export</h2>
<p><a href="?view=export" target="_blank">Click here</a> to export your poche datas.</p>
</div>

View File

@ -1,6 +1,6 @@
<body class="light-style">
<header>
<h1><img src="./img/logo.png" alt="logo poche" />poche</h1>
<h1><a href="index.php"><img src="./img/logo.png" alt="logo poche" /></a>poche</h1>
</header>
<div id="main">
<ul id="links">
@ -10,7 +10,7 @@
<li><a href="?view=config" {if="$view == 'config'"}class="current"{/if}>config</a></li>
<li><a href="?logout" title="Logout">logout</a></li>
</ul>
{if condition="isset($entries)"}
{if condition="isset($entries)"}
<ul id="sort">
<li><img src="img/up.png" onclick="sort_links('{$view}', 'ia');" title="by date asc" /> by date <img src="img/down.png" onclick="sort_links('{$view}', 'id');" title="by date desc" /></li>
<li><img src="img/up.png" onclick="sort_links('{$view}', 'ta');" title="by title asc" /> by title <img src="img/down.png" onclick="sort_links('{$view}', 'td');" title="by title desc" /></li>

30
tpl/install.html Normal file
View File

@ -0,0 +1,30 @@
{include="head"}
<body class="light-style">
<header>
<h1><a href="index.php"><img src="./img/logo.png" alt="logo poche" /></a>poche</h1>
</header>
<div id="main">
<form method="post" action="?install" name="loginform">
<fieldset class="w500p center">
<h2 class="mbs txtcenter">install your poche</h2>
<div class="row">
<label class="col w150p" for="login">Login</label>
<input class="col" type="text" id="login" name="login" placeholder="Login" tabindex="1" autofocus />
</div>
<div class="row">
<label class="col w150p" for="password">Password</label>
<input class="col" type="password" id="password" name="password" placeholder="Password" tabindex="2">
</div>
<div class="row">
<label class="col w150p" for="password_repeat">Repeat your password</label>
<input class="col" type="password" id="password_repeat" name="password_repeat" placeholder="Password" tabindex="3">
</div>
<div class="row mts txtcenter">
<button class="bouton" type="submit" tabindex="4">Install</button>
</div>
</fieldset>
<input type="hidden" name="returnurl" value="<?php echo htmlspecialchars($referer);?>">
<input type="hidden" name="token" value="<?php echo Session::getToken(); ?>">
</form>
{include="footer"}

View File

@ -1,31 +1,33 @@
{include="head"}
<body class="light-style">
<header>
<h1><img src="./img/logo.png" alt="logo poche" />poche</h1>
<h1><a href="index.php"><img src="./img/logo.png" alt="logo poche" /></a>poche</h1>
</header>
<div id="main">
<form method="post" action="?login" name="loginform">
<fieldset>
<h2>login to your poche</h2>
<ul id="login">
<li>
<label for="login">Login</label> <input type="text" id="login" name="login" placeholder="Login" tabindex="1">
</li>
<li>
<label for="password">Password</label> <input type="password" id="password" name="password" placeholder="Password" tabindex="2">
</li>
<li>
<label><input type="checkbox" name="longlastingsession" tabindex="3">&nbsp;Stay signed in (Do not check on public computers)</label>
</li>
<li>
<button type="submit" tabindex="4">Sign in</button>
</li>
</ul>
<fieldset class="w500p center">
<h2 class="mbs txtcenter">login to your poche</h2>
<div class="row">
<label class="col w150p" for="login">Login</label>
<input class="col" type="text" id="login" name="login" placeholder="Login" tabindex="1" autofocus />
</div>
<div class="row">
<label class="col w150p" for="password">Password</label>
<input class="col" type="password" id="password" name="password" placeholder="Password" tabindex="2">
</div>
<div class="row">
<label class="col w150p">Stay signed in</label>
<div class="col">
<input type="checkbox" name="longlastingsession" tabindex="3">
<small class="inbl">(Do not check on public computers)</small>
</div>
</div>
<div class="row mts txtcenter">
<button class="bouton" type="submit" tabindex="4">Sign in</button>
</div>
</fieldset>
<input type="hidden" name="returnurl" value="<?php echo htmlspecialchars($referer);?>">
<input type="hidden" name="token" value="<?php echo Session::getToken(); ?>">
</form>
<script type="text/javascript">
window.onload = document.loginform.login.focus();
</script>
{include="footer"}

View File

@ -38,6 +38,7 @@
<h1><a href="{$url}">{$title}</a></h1>
<div class="vieworiginal txtright small"><a href="{$url}" target="_blank" title="original : {$title}">view original</a></div>
</header>
{include="messages"}
<article>
<div id="readityourselfcontent">
{$content}