<?php 
# ************** LICENCE ****************
/*
	Copyright (c) PORTANEO.
*/
# ***************************************
# display html form to add article to notebook
#
# !! be careful, this file must be saved under uft8 format, and display an e accentuated here : é
# ***************************************
$not_access=1;
$granted="I";

require_once('includes_mobile.php');
require_once('../includes/template.inc.php');

$message = (isset($_GET['message']))        ?       $_GET['message']        :   '';

$DB->getResults($mobNotebookArticle_getUserInfo,$DB->escape($_SESSION['user_id']),$DB->escape($_SESSION['user_id']));
$row = $DB->fetch(0);
$pic_user = $row['picture'];
$firstname_user = $row['firstname'];
$name_user = $row['long_name'];
$stat_user = $row['stat'];
$isfriend = $row['friend_id'];
$DB->freeResults();

$options = defineHeader();
    
echo page_begining();

echo '<div id="header">';
    echo generate_header($options,$message);
echo '</div>';

echo '<div id="wrapper">';
echo '<div id="page">';
		
echo generate_statusform("notebook_addarticle.php");
        
echo '<div class="users" style="clear:both;">
        <div class="title">
            <img src="../../../'.displayPicture($row['picture']).'" class="avatar" width="50" height="50" style="float: left;margin-right: 5px;">
            <span>'.$name_user.' '.$firstname_user.'</span>
        </div>';
            if ($row['stat']!='') echo '<div class="subtitle">'.$row['stat'].'</div>';  
echo '	<div class="links">
            <a href="notebook_articles.php?id='.$_SESSION['user_id'].'">'.lg('contributions').' </a> |
            <a href="network_profil.php?id='.$_SESSION['user_id'].'&act=note" class="greylink">'.lg("personalNotes").'</a>
        </div>
      </div>';

echo '<form method="post" action="../scripts/scr_addnotebook2.php">
        <br /><span><b>'.lg("title").'</b></span><br />
        <input type="text" name="title" style="width: 90%"><br /><br />
        <span><b>'.lg("tags").' ('.lg("comaSeparated").')</b></span><br />
        <input type="text" name="tags" style="width: 90%"><br /><br />
        <select name="type">
            <option value="3">'.lg("pub_art").'</option>
            <option value="2">'.lg("only_network").'</option>
            <option value="1">'.lg("priv_article").'</option>
        </select><br /><br />
        <span><b>Description</b></span><br />
        <textarea name="'.lg("description").'" rows="10" style="width: 90%"></textarea><br /><br />
        <input type="hidden" name="user_id" value="'.$_SESSION['user_id'].'">
        <center><input type="submit" class="minibtn" value="'.lg("add").'"></center>
	  </form>';
  
echo '</div>';
echo '</div>';
  
echo generate_footer("notebook");
?>