<?php 
# ************** LICENCE ****************
/*
	Copyright (c) PORTANEO.
*/
# ***************************************
# change status
#
# !! 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.'/enterprise.php');

$status = $_POST['mystatus'];
$from = $_POST['from'];

$DB->execute($scrnetworkupdatemyprofile_update,$DB->quote($status),$DB->escape($_SESSION['user_id']));
$DB->execute($xmlnetworknews_insertNews,	$DB->escape($_SESSION['user_id']),
                                            "'6'",
                                            $DB->noHTML($status),
                                            "''",
                                            "'3'");
                                            
if (isset($_POST['from'])) {
	$completeRedirect = $_POST['from'];
    if (substr($_POST['from'], -1) == '?') {
        $completeRedirect = $_POST['from'].'message=statusupdated';
    }
    elseif (substr($_POST['from'], -3) == 'php') {
        $completeRedirect = $_POST['from'].'?message=statusupdated';
    }
    else {
        $completeRedirect = $_POST['from'].'&message=statusupdated';
    }
	header('location:'.$completeRedirect);
}
?>  