<?php 
# ************** LICENCE ****************
/*
	Copyright (c) PORTANEO.
*/
# ***************************************
# Add a RSS widget to the portal
#
# !! 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('../../../../db_layer/'.__DBTYPE.'/portal.php');

$widgetId = $_POST['widgets'];
$tabId = $_POST['tab'];
$selectedTab = $_POST['selectedtab'];

if ($tabId == NULL or $widgetId == NULL) {
	//header("location:../scripts/portal_addmodule.php?tab=".$selectedtab); 
	exit();
}

if ($widgetId == 85)    $id='linkid';
if ($widgetId == 112)   $id='calid';
if ($widgetId == 401)   $id='addid';
if ($widgetId == 295)   $id='taskid';
if ($widgetId == 84)    $id='noteid';

$DB->getResults($scraddmodule_getPosition, $DB->escape($_SESSION['user_id']));
$row = $DB->fetch(0);
$uniq = $row['uniq']+1;
$posy = $row['posy']+1; 
$DB->freeResults();

$sharedMD5 = md5(uniqid(rand(), true));
$name='ptitl='.$title.'&'.$id.'='.$uniq;

header("location:../scripts/portal_configuration.php");
?>