Exemplo n.º 1
0
<?php

/**
* ownCloud - bookmarks plugin
*
* @author Arthur Schiwon
* @copyright 2011 Arthur Schiwon blizzz@arthur-schiwon.de
* 
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
* License as published by the Free Software Foundation; either 
* version 3 of the License, or any later version.
* 
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
* GNU AFFERO GENERAL PUBLIC LICENSE for more details.
*  
* You should have received a copy of the GNU Lesser General Public 
* License along with this library.  If not, see <http://www.gnu.org/licenses/>.
* 
*/
// Check if we are a user
OCP\User::checkLoggedIn();
OCP\App::checkAppEnabled('bookmarks');
require_once 'bookmarksHelper.php';
addBookmark($_POST['url'], '', 'Read-Later');
include 'templates/addBm.php';
Exemplo n.º 2
0
// TRAITEMENT DU FORMULAIRE POSTE
// on enregistre le lien
if ($_POST["submit"] == "Ajouter") {
    // si les champs sont incomplets
    $tit = $_POST["titre"];
    $ur = $_POST["url"];
    if (!$tit || !$ur) {
        $mess = getError(13);
    } else {
        // si les champs ne sont pas vides on ajoute
        if ($_POST['rubInput'] != "") {
            $rubName = $_POST['rubInput'];
        } else {
            $rubId = $_POST['rubSel'];
        }
        addBookmark(0, $tit, $ur, $rubId, $rubName);
    }
}
// on enregistre le lien modifiŽ
if ($_POST["submit"] == "Modifier") {
    // si les champs sont incomplets
    $tit = $_POST["titre"];
    $ur = $_POST["url"];
    $idu = $_POST["idurl"];
    if (!$tit || !$ur) {
        $mess = getError(13);
    } else {
        // si les champs ne sont pas vides on update
        updateBookmark($idu, $tit, $ur);
    }
}
Exemplo n.º 3
0
<?php

require_once "../include/config.php";
require_once $basedir . "/include/functions.php";
$private_key = $config['private_key'];
$hash = isset($_POST['hash']) ? $_POST['hash'] : 0;
$public_key = isset($_POST['public']) ? $_POST['public'] : 0;
$time = isset($_POST['t']) ? $_POST['t'] : 0;
$myhash = md5($public_key . $private_key . $time);
if ($hash != $myhash) {
    echo json_encode(array('error' => '1', 'status' => $lang[215]));
    exit;
}
$g_id = isset($_POST['gid']) ? $_POST['gid'] : 0;
$u_id = isset($_POST['uid']) ? $_POST['uid'] : 0;
$bool = addBookmark($g_id, $u_id);
if ($bool) {
    echo json_encode(array('error' => '0', 'status' => $bool));
    exit;
}
Exemplo n.º 4
0
<?php

/**
* ownCloud - bookmarks plugin
*
* @author Arthur Schiwon
* @copyright 2011 Arthur Schiwon blizzz@arthur-schiwon.de
* 
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
* License as published by the Free Software Foundation; either 
* version 3 of the License, or any later version.
* 
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
* GNU AFFERO GENERAL PUBLIC LICENSE for more details.
*  
* You should have received a copy of the GNU Lesser General Public 
* License along with this library.  If not, see <http://www.gnu.org/licenses/>.
* 
*/
//no apps or filesystem
$RUNTIME_NOSETUPFS = true;
// Check if we are a user
OCP\JSON::checkLoggedIn();
OCP\JSON::callCheck();
OCP\JSON::checkAppEnabled('bookmarks');
require_once OC_App::getAppPath('bookmarks') . '/bookmarksHelper.php';
$id = addBookmark($_POST['url'], $_POST['title'], $_POST['tags']);
OCP\JSON::success(array('data' => $id));
Exemplo n.º 5
0
    You should have received a copy of the GNU General Public License
    along with Cybermin; if not, write to the Free Software
    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA

 2006 Namont Nicolas
2012 Florence DAUVERGNE, changement de la feuille de style !
  include/user_url.php V0.1
*/
// Fichier de gestion des url / favoris d'un utilisateur
if ($_POST["submit"] != "") {
    $titre = $_POST["titre"];
    $url = $_POST["url"];
    if (!$titre || !$url) {
        echo getError(13);
    } else {
        addBookmark($_SESSION["iduser"], $titre, $url, $_POST['rubSel']);
    }
}
if ($_GET["act"] == "del") {
    delBookmark($_SESSION["iduser"], AddSlashes($_GET["idurl"]));
}
?>

  <div class="row"><!-- left column --><div class="col-md-6">
  
 <div class="box box-info"> <div class="box-header"><h3 class="box-title">Aide</h3></div>
		 <div class="box-body">
<p>Cette page est &agrave; votre disposition pour y stocker vos favoris personnels</p>
</div></div>

<form method="post" action="index.php?m=5">