Fix: uniformize code
This commit is contained in:
parent
504882fa8c
commit
a7deb7c23a
@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2005-2009 Regis Houssin <regis@dolibarr.fr>
|
* Copyright (C) 2005-2011 Regis Houssin <regis@dolibarr.fr>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -23,6 +23,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
require("../../main.inc.php");
|
require("../../main.inc.php");
|
||||||
|
require_once(DOL_DOCUMENT_ROOT."/lib/trip.lib.php");
|
||||||
require_once(DOL_DOCUMENT_ROOT."/compta/deplacement/class/deplacement.class.php");
|
require_once(DOL_DOCUMENT_ROOT."/compta/deplacement/class/deplacement.class.php");
|
||||||
require_once(DOL_DOCUMENT_ROOT."/core/class/html.formfile.class.php");
|
require_once(DOL_DOCUMENT_ROOT."/core/class/html.formfile.class.php");
|
||||||
if ($conf->projet->enabled)
|
if ($conf->projet->enabled)
|
||||||
@ -35,21 +36,23 @@ $langs->load("trips");
|
|||||||
|
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
$id=isset($_GET["id"])?$_GET["id"]:$_POST["id"];
|
$id = GETPOST('id');
|
||||||
if ($user->societe_id) $socid=$user->societe_id;
|
if ($user->societe_id) $socid=$user->societe_id;
|
||||||
$result = restrictedArea($user, 'deplacement', $id,'');
|
$result = restrictedArea($user, 'deplacement', $id,'');
|
||||||
|
|
||||||
|
$action = GETPOST('action');
|
||||||
|
$confirm = GETPOST('confirm');
|
||||||
|
|
||||||
$mesg = '';
|
$mesg = '';
|
||||||
|
|
||||||
|
$object = new Deplacement($db);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Actions
|
* Actions
|
||||||
*/
|
*/
|
||||||
if ($_POST["action"] == 'confirm_delete' && $_POST["confirm"] == "yes" && $user->rights->deplacement->supprimer)
|
if ($action == 'confirm_delete' && $confirm == "yes" && $user->rights->deplacement->supprimer)
|
||||||
{
|
{
|
||||||
$deplacement = new Deplacement($db);
|
$result=$object->delete($id);
|
||||||
$result=$deplacement->delete($_GET["id"]);
|
|
||||||
if ($result >= 0)
|
if ($result >= 0)
|
||||||
{
|
{
|
||||||
Header("Location: index.php");
|
Header("Location: index.php");
|
||||||
@ -57,11 +60,11 @@ if ($_POST["action"] == 'confirm_delete' && $_POST["confirm"] == "yes" && $user-
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$mesg=$deplacement->error;
|
$mesg=$object->error;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($_POST["action"] == 'add' && $user->rights->deplacement->creer)
|
if ($action == 'add' && $user->rights->deplacement->creer)
|
||||||
{
|
{
|
||||||
if (! $_POST["cancel"])
|
if (! $_POST["cancel"])
|
||||||
{
|
{
|
||||||
@ -72,26 +75,25 @@ if ($_POST["action"] == 'add' && $user->rights->deplacement->creer)
|
|||||||
$_POST["reday"],
|
$_POST["reday"],
|
||||||
$_POST["reyear"]);
|
$_POST["reyear"]);
|
||||||
|
|
||||||
$deplacement = new Deplacement($db);
|
$object->date = $dated;
|
||||||
$deplacement->date = $dated;
|
$object->km = $_POST["km"];
|
||||||
$deplacement->km = $_POST["km"];
|
$object->type = $_POST["type"];
|
||||||
$deplacement->type = $_POST["type"];
|
$object->socid = $_POST["socid"];
|
||||||
$deplacement->socid = $_POST["socid"];
|
$object->fk_user = $_POST["fk_user"];
|
||||||
$deplacement->fk_user = $_POST["fk_user"];
|
$object->note = $_POST["note"];
|
||||||
$deplacement->note = $_POST["note"];
|
$object->note_public = $_POST["note_public"];
|
||||||
$deplacement->note_public = $_POST["note_public"];
|
|
||||||
|
|
||||||
if (! $deplacement->date)
|
if (! $object->date)
|
||||||
{
|
{
|
||||||
$mesg=$langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("Date"));
|
$mesg=$langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("Date"));
|
||||||
$error++;
|
$error++;
|
||||||
}
|
}
|
||||||
if ($deplacement->type == '-1') // Otherwise it is TF_LUNCH,...
|
if ($object->type == '-1') // Otherwise it is TF_LUNCH,...
|
||||||
{
|
{
|
||||||
$mesg='<div class="error">'.$langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("Type")).'</div>';
|
$mesg='<div class="error">'.$langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("Type")).'</div>';
|
||||||
$error++;
|
$error++;
|
||||||
}
|
}
|
||||||
if (! ($deplacement->fk_user > 0))
|
if (! ($object->fk_user > 0))
|
||||||
{
|
{
|
||||||
$mesg='<div class="error">'.$langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("Person")).'</div>';
|
$mesg='<div class="error">'.$langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("Person")).'</div>';
|
||||||
$error++;
|
$error++;
|
||||||
@ -99,22 +101,22 @@ if ($_POST["action"] == 'add' && $user->rights->deplacement->creer)
|
|||||||
|
|
||||||
if (! $error)
|
if (! $error)
|
||||||
{
|
{
|
||||||
$id = $deplacement->create($user);
|
$id = $object->create($user);
|
||||||
|
|
||||||
if ($id > 0)
|
if ($id > 0)
|
||||||
{
|
{
|
||||||
Header("Location: fiche.php?id=".$id);
|
Header("Location: " . $_SERVER["PHP_SELF"] . "?id=".$id);
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$mesg=$deplacement->error;
|
$mesg=$object->error;
|
||||||
$_GET["action"]='create';
|
$action='create';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$_GET["action"]='create';
|
$action='create';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -124,45 +126,44 @@ if ($_POST["action"] == 'add' && $user->rights->deplacement->creer)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($_POST["action"] == 'update' && $user->rights->deplacement->creer)
|
if ($action == 'update' && $user->rights->deplacement->creer)
|
||||||
{
|
{
|
||||||
if (empty($_POST["cancel"]))
|
if (empty($_POST["cancel"]))
|
||||||
{
|
{
|
||||||
$deplacement = new Deplacement($db);
|
$result = $object->fetch($id);
|
||||||
$result = $deplacement->fetch($_POST["id"]);
|
|
||||||
|
|
||||||
$deplacement->date = dol_mktime(12, 0 , 0,
|
$object->date = dol_mktime(12, 0 , 0,
|
||||||
$_POST["remonth"],
|
$_POST["remonth"],
|
||||||
$_POST["reday"],
|
$_POST["reday"],
|
||||||
$_POST["reyear"]);
|
$_POST["reyear"]);
|
||||||
$deplacement->km = $_POST["km"];
|
$object->km = $_POST["km"];
|
||||||
$deplacement->type = $_POST["type"];
|
$object->type = $_POST["type"];
|
||||||
$deplacement->fk_user = $_POST["fk_user"];
|
$object->fk_user = $_POST["fk_user"];
|
||||||
$deplacement->socid = $_POST["socid"];
|
$object->socid = $_POST["socid"];
|
||||||
$result = $deplacement->update($user);
|
$result = $object->update($user);
|
||||||
|
|
||||||
if ($result > 0)
|
if ($result > 0)
|
||||||
{
|
{
|
||||||
Header("Location: fiche.php?id=".$_POST["id"]);
|
Header("Location: " . $_SERVER["PHP_SELF"] . "?id=" . $id);
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$mesg=$deplacement->error;
|
$mesg=$object->error;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Header("Location: ".$_SERVER["PHP_SELF"]."?id=".$_POST["id"]);
|
Header("Location: " . $_SERVER["PHP_SELF"] . "?id=" . $id);
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set into a project
|
// Set into a project
|
||||||
if ($_POST['action'] == 'classin')
|
if ($action == 'classin')
|
||||||
{
|
{
|
||||||
$trip = new Deplacement($db);
|
$trip = new Deplacement($db);
|
||||||
$trip->fetch($_GET['id']);
|
$trip->fetch($id);
|
||||||
$result=$trip->setProject($_POST['projectid']);
|
$result=$trip->setProject($_POST['projectid']);
|
||||||
if ($result < 0) dol_print_error($db,$trip->error);
|
if ($result < 0) dol_print_error($db,$trip->error);
|
||||||
}
|
}
|
||||||
@ -180,7 +181,7 @@ $html = new Form($db);
|
|||||||
/*
|
/*
|
||||||
* Action create
|
* Action create
|
||||||
*/
|
*/
|
||||||
if ($_GET["action"] == 'create')
|
if ($action == 'create')
|
||||||
{
|
{
|
||||||
print_fiche_titre($langs->trans("NewTrip"));
|
print_fiche_titre($langs->trans("NewTrip"));
|
||||||
|
|
||||||
@ -191,7 +192,7 @@ if ($_GET["action"] == 'create')
|
|||||||
$_POST["reday"],
|
$_POST["reday"],
|
||||||
$_POST["reyear"]);
|
$_POST["reyear"]);
|
||||||
|
|
||||||
print "<form name='add' action=\"fiche.php\" method=\"post\">\n";
|
print '<form name="add" action="' . $_SERVER["PHP_SELF"] . '" method="POST">' . "\n";
|
||||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||||
print '<input type="hidden" name="action" value="add">';
|
print '<input type="hidden" name="action" value="add">';
|
||||||
|
|
||||||
@ -257,40 +258,24 @@ else
|
|||||||
{
|
{
|
||||||
if ($id)
|
if ($id)
|
||||||
{
|
{
|
||||||
$deplacement = new Deplacement($db);
|
$result = $object->fetch($id);
|
||||||
$result = $deplacement->fetch($id);
|
|
||||||
if ($result > 0)
|
if ($result > 0)
|
||||||
{
|
{
|
||||||
if ($mesg) print $mesg."<br>";
|
dol_htmloutput_mesg($mesg);
|
||||||
|
|
||||||
$h=0;
|
$head = trip_prepare_head($object);
|
||||||
|
|
||||||
$head[$h][0] = DOL_URL_ROOT."/compta/deplacement/fiche.php?id=$deplacement->id";
|
|
||||||
$head[$h][1] = $langs->trans("Card");
|
|
||||||
$head[$h][2] = 'card';
|
|
||||||
$h++;
|
|
||||||
|
|
||||||
$head[$h][0] = DOL_URL_ROOT."/compta/deplacement/note.php?id=$deplacement->id";
|
|
||||||
$head[$h][1] = $langs->trans("Note");
|
|
||||||
$head[$h][2] = 'note';
|
|
||||||
$h++;
|
|
||||||
|
|
||||||
$head[$h][0] = DOL_URL_ROOT."/compta/deplacement/info.php?id=$deplacement->id";
|
|
||||||
$head[$h][1] = $langs->trans("Info");
|
|
||||||
$head[$h][2] = 'info';
|
|
||||||
$h++;
|
|
||||||
|
|
||||||
dol_fiche_head($head, 'card', $langs->trans("TripCard"), 0, 'trip');
|
dol_fiche_head($head, 'card', $langs->trans("TripCard"), 0, 'trip');
|
||||||
|
|
||||||
if ($_GET["action"] == 'edit')
|
if ($_GET["action"] == 'edit')
|
||||||
{
|
{
|
||||||
$soc = new Societe($db);
|
$soc = new Societe($db);
|
||||||
if ($deplacement->socid)
|
if ($object->socid)
|
||||||
{
|
{
|
||||||
$soc->fetch($deplacement->socid);
|
$soc->fetch($object->socid);
|
||||||
}
|
}
|
||||||
|
|
||||||
print "<form name='update' action=\"fiche.php\" method=\"post\">\n";
|
print '<form name="update" action="' . $_SERVER["PHP_SELF"] . '" method="POST">' . "\n";
|
||||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||||
print '<input type="hidden" name="action" value="update">';
|
print '<input type="hidden" name="action" value="update">';
|
||||||
print '<input type="hidden" name="id" value="'.$id.'">';
|
print '<input type="hidden" name="id" value="'.$id.'">';
|
||||||
@ -300,28 +285,28 @@ else
|
|||||||
// Ref
|
// Ref
|
||||||
print "<tr>";
|
print "<tr>";
|
||||||
print '<td width="20%">'.$langs->trans("Ref").'</td><td>';
|
print '<td width="20%">'.$langs->trans("Ref").'</td><td>';
|
||||||
print $deplacement->ref;
|
print $object->ref;
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Type
|
// Type
|
||||||
print "<tr>";
|
print "<tr>";
|
||||||
print '<td class="fieldrequired">'.$langs->trans("Type").'</td><td>';
|
print '<td class="fieldrequired">'.$langs->trans("Type").'</td><td>';
|
||||||
print $html->select_type_fees($_POST["type"]?$_POST["type"]:$deplacement->type,'type',0);
|
print $html->select_type_fees($_POST["type"]?$_POST["type"]:$object->type,'type',0);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Who
|
// Who
|
||||||
print "<tr>";
|
print "<tr>";
|
||||||
print '<td class="fieldrequired">'.$langs->trans("Person").'</td><td>';
|
print '<td class="fieldrequired">'.$langs->trans("Person").'</td><td>';
|
||||||
print $html->select_users($_POST["fk_user"]?$_POST["fk_user"]:$deplacement->fk_user,'fk_user',0);
|
print $html->select_users($_POST["fk_user"]?$_POST["fk_user"]:$object->fk_user,'fk_user',0);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Date
|
// Date
|
||||||
print '<tr><td class="fieldrequired">'.$langs->trans("Date").'</td><td>';
|
print '<tr><td class="fieldrequired">'.$langs->trans("Date").'</td><td>';
|
||||||
print $html->select_date($deplacement->date,'','','','','update');
|
print $html->select_date($object->date,'','','','','update');
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Km
|
// Km
|
||||||
print '<tr><td class="fieldrequired">'.$langs->trans("FeesKilometersOrAmout").'</td><td><input name="km" class="flat" size="10" value="'.$deplacement->km.'"></td></tr>';
|
print '<tr><td class="fieldrequired">'.$langs->trans("FeesKilometersOrAmout").'</td><td><input name="km" class="flat" size="10" value="'.$object->km.'"></td></tr>';
|
||||||
|
|
||||||
// Where
|
// Where
|
||||||
print "<tr>";
|
print "<tr>";
|
||||||
@ -344,40 +329,40 @@ else
|
|||||||
/*
|
/*
|
||||||
* Confirmation de la suppression du deplacement
|
* Confirmation de la suppression du deplacement
|
||||||
*/
|
*/
|
||||||
if ($_GET["action"] == 'delete')
|
if ($action == 'delete')
|
||||||
{
|
{
|
||||||
$ret=$html->form_confirm("fiche.php?id=".$id,$langs->trans("DeleteTrip"),$langs->trans("ConfirmDeleteTrip"),"confirm_delete");
|
$ret=$html->form_confirm("fiche.php?id=".$id,$langs->trans("DeleteTrip"),$langs->trans("ConfirmDeleteTrip"),"confirm_delete");
|
||||||
if ($ret == 'html') print '<br>';
|
if ($ret == 'html') print '<br>';
|
||||||
}
|
}
|
||||||
|
|
||||||
$soc = new Societe($db);
|
$soc = new Societe($db);
|
||||||
if ($deplacement->socid) $soc->fetch($deplacement->socid);
|
if ($object->socid) $soc->fetch($object->socid);
|
||||||
|
|
||||||
print '<table class="border" width="100%">';
|
print '<table class="border" width="100%">';
|
||||||
|
|
||||||
// Ref
|
// Ref
|
||||||
print "<tr>";
|
print "<tr>";
|
||||||
print '<td width="20%">'.$langs->trans("Ref").'</td><td>';
|
print '<td width="20%">'.$langs->trans("Ref").'</td><td>';
|
||||||
print $html->showrefnav($deplacement,'id','',1,'rowid','ref','');
|
print $html->showrefnav($object,'id','',1,'rowid','ref','');
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Type
|
// Type
|
||||||
print '<tr><td>'.$langs->trans("Type").'</td><td>'.$langs->trans($deplacement->type).'</td></tr>';
|
print '<tr><td>'.$langs->trans("Type").'</td><td>'.$langs->trans($object->type).'</td></tr>';
|
||||||
|
|
||||||
// Who
|
// Who
|
||||||
print '<tr><td>'.$langs->trans("Person").'</td><td>';
|
print '<tr><td>'.$langs->trans("Person").'</td><td>';
|
||||||
$userfee=new User($db);
|
$userfee=new User($db);
|
||||||
$userfee->fetch($deplacement->fk_user);
|
$userfee->fetch($object->fk_user);
|
||||||
print $userfee->getNomUrl(1);
|
print $userfee->getNomUrl(1);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Date
|
// Date
|
||||||
print '<tr><td>'.$langs->trans("Date").'</td><td>';
|
print '<tr><td>'.$langs->trans("Date").'</td><td>';
|
||||||
print dol_print_date($deplacement->date,'day');
|
print dol_print_date($object->date,'day');
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Km/Price
|
// Km/Price
|
||||||
print '<tr><td>'.$langs->trans("FeesKilometersOrAmout").'</td><td>'.$deplacement->km.'</td></tr>';
|
print '<tr><td>'.$langs->trans("FeesKilometersOrAmout").'</td><td>'.$object->km.'</td></tr>';
|
||||||
|
|
||||||
// Where
|
// Where
|
||||||
print '<tr><td>'.$langs->trans("CompanyVisited").'</td>';
|
print '<tr><td>'.$langs->trans("CompanyVisited").'</td>';
|
||||||
@ -397,7 +382,7 @@ else
|
|||||||
print '</td>';
|
print '</td>';
|
||||||
if ($_GET['action'] != 'classify')
|
if ($_GET['action'] != 'classify')
|
||||||
{
|
{
|
||||||
print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=classify&id='.$deplacement->id.'">';
|
print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=classify&id='.$object->id.'">';
|
||||||
print img_edit($langs->trans('SetProject'),1);
|
print img_edit($langs->trans('SetProject'),1);
|
||||||
print '</a></td>';
|
print '</a></td>';
|
||||||
}
|
}
|
||||||
@ -405,18 +390,18 @@ else
|
|||||||
print '</td><td colspan="3">';
|
print '</td><td colspan="3">';
|
||||||
if ($_GET['action'] == 'classify')
|
if ($_GET['action'] == 'classify')
|
||||||
{
|
{
|
||||||
$html->form_project($_SERVER['PHP_SELF'].'?id='.$deplacement->id, $deplacement->socid, $deplacement->fk_project,'projectid');
|
$html->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, $object->socid, $object->fk_project,'projectid');
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$html->form_project($_SERVER['PHP_SELF'].'?id='.$deplacement->id, $deplacement->socid, $deplacement->fk_project,'none');
|
$html->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, $object->socid, $object->fk_project,'none');
|
||||||
}
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Statut
|
// Statut
|
||||||
print '<tr><td>'.$langs->trans("Status").'</td><td>'.$deplacement->getLibStatut(4).'</td></tr>';
|
print '<tr><td>'.$langs->trans("Status").'</td><td>'.$object->getLibStatut(4).'</td></tr>';
|
||||||
|
|
||||||
print "</table>";
|
print "</table>";
|
||||||
|
|
||||||
@ -439,7 +424,7 @@ else
|
|||||||
|
|
||||||
print '<div class="tabsAction">';
|
print '<div class="tabsAction">';
|
||||||
|
|
||||||
if ($_GET["action"] != 'create' && $_GET["action"] != 'edit')
|
if ($action != 'create' && $action != 'edit')
|
||||||
{
|
{
|
||||||
if ($user->rights->deplacement->creer)
|
if ($user->rights->deplacement->creer)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1,8 +1,8 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2004 Eric Seigne <eric.seigne@ryxeo.com>
|
* Copyright (C) 2004 Eric Seigne <eric.seigne@ryxeo.com>
|
||||||
* Copyright (C) 2005-2009 Regis Houssin <regis@dolibarr.fr>
|
* Copyright (C) 2005-2011 Regis Houssin <regis@dolibarr.fr>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -32,7 +32,7 @@ $langs->load("users");
|
|||||||
$langs->load("trips");
|
$langs->load("trips");
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
$socid = $_GET["socid"]?$_GET["socid"]:'';
|
$socid = GETPOST('socid');
|
||||||
if ($user->societe_id) $socid=$user->societe_id;
|
if ($user->societe_id) $socid=$user->societe_id;
|
||||||
$result = restrictedArea($user, 'deplacement','','');
|
$result = restrictedArea($user, 'deplacement','','');
|
||||||
|
|
||||||
|
|||||||
@ -17,60 +17,45 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \file htdocs/compta/deplacement/info.php
|
* \file htdocs/compta/deplacement/info.php
|
||||||
* \ingroup facture
|
* \ingroup trip
|
||||||
* \brief Page to show a trip information
|
* \brief Page to show a trip information
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require("../../main.inc.php");
|
require("../../main.inc.php");
|
||||||
|
require_once(DOL_DOCUMENT_ROOT."/lib/trip.lib.php");
|
||||||
require_once(DOL_DOCUMENT_ROOT."/lib/functions2.lib.php");
|
require_once(DOL_DOCUMENT_ROOT."/lib/functions2.lib.php");
|
||||||
require_once(DOL_DOCUMENT_ROOT."/compta/deplacement/class/deplacement.class.php");
|
require_once(DOL_DOCUMENT_ROOT."/compta/deplacement/class/deplacement.class.php");
|
||||||
|
|
||||||
$langs->load("trips");
|
$langs->load("trips");
|
||||||
|
|
||||||
|
// Security check
|
||||||
|
$id = GETPOST('id');
|
||||||
|
if ($user->societe_id) $socid=$user->societe_id;
|
||||||
|
$result = restrictedArea($user, 'deplacement', $id, '');
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* View
|
* View
|
||||||
*/
|
*/
|
||||||
|
|
||||||
llxHeader();
|
llxHeader();
|
||||||
|
|
||||||
if ($id)
|
if ($id)
|
||||||
{
|
{
|
||||||
$deplacement = new Deplacement($db);
|
$object = new Deplacement($db);
|
||||||
$deplacement->fetch($_GET["id"], $user);
|
$object->fetch($id);
|
||||||
$deplacement->info($_GET["id"]);
|
$object->info($id);
|
||||||
if ($deplacement > 0)
|
|
||||||
{
|
|
||||||
if ($mesg) print $mesg."<br>";
|
|
||||||
|
|
||||||
$h=0;
|
|
||||||
|
|
||||||
$head[$h][0] = DOL_URL_ROOT.'/compta/deplacement/fiche.php?id='.$_GET["id"];
|
|
||||||
$head[$h][1] = $langs->trans("Card");
|
|
||||||
$head[$h][2] = 'card';
|
|
||||||
$h++;
|
|
||||||
|
|
||||||
$head[$h][0] = DOL_URL_ROOT.'/compta/deplacement/note.php?id='.$_GET["id"];
|
|
||||||
$head[$h][1] = $langs->trans("Note");
|
|
||||||
$head[$h][2] = 'note';
|
|
||||||
$h++;
|
|
||||||
|
|
||||||
$head[$h][0] = DOL_URL_ROOT.'/compta/deplacement/info.php?id='.$_GET["id"];
|
$head = trip_prepare_head($object);
|
||||||
$head[$h][1] = $langs->trans("Info");
|
|
||||||
$head[$h][2] = 'info';
|
|
||||||
$h++;
|
|
||||||
|
|
||||||
dol_fiche_head($head, 'info', $langs->trans("TripCard"), 0, 'trip');
|
dol_fiche_head($head, 'info', $langs->trans("TripCard"), 0, 'trip');
|
||||||
|
|
||||||
print '<table width="100%"><tr><td>';
|
print '<table width="100%"><tr><td>';
|
||||||
dol_print_object_info($deplacement);
|
dol_print_object_info($object);
|
||||||
print '</td></tr></table>';
|
print '</td></tr></table>';
|
||||||
|
|
||||||
print '</div>';
|
print '</div>';
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
dol_print_error($db);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@ -1,8 +1,8 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2004 Eric Seigne <eric.seigne@ryxeo.com>
|
* Copyright (C) 2004 Eric Seigne <eric.seigne@ryxeo.com>
|
||||||
* Copyright (C) 2005-2009 Regis Houssin <regis@dolibarr.fr>
|
* Copyright (C) 2005-2011 Regis Houssin <regis@dolibarr.fr>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -32,7 +32,7 @@ $langs->load("users");
|
|||||||
$langs->load("trips");
|
$langs->load("trips");
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
$socid = $_GET["socid"]?$_GET["socid"]:'';
|
$socid = GETPOST('socid');
|
||||||
if ($user->societe_id) $socid=$user->societe_id;
|
if ($user->societe_id) $socid=$user->societe_id;
|
||||||
$result = restrictedArea($user, 'deplacement','','');
|
$result = restrictedArea($user, 'deplacement','','');
|
||||||
|
|
||||||
|
|||||||
@ -23,42 +23,38 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
require("../../main.inc.php");
|
require("../../main.inc.php");
|
||||||
|
require_once(DOL_DOCUMENT_ROOT."/lib/trip.lib.php");
|
||||||
require_once(DOL_DOCUMENT_ROOT."/compta/deplacement/class/deplacement.class.php");
|
require_once(DOL_DOCUMENT_ROOT."/compta/deplacement/class/deplacement.class.php");
|
||||||
|
|
||||||
$socid=isset($_GET["socid"])?$_GET["socid"]:isset($_POST["socid"])?$_POST["socid"]:"";
|
|
||||||
|
|
||||||
if (!$user->rights->deplacement->lire)
|
|
||||||
accessforbidden();
|
|
||||||
|
|
||||||
$langs->load("companies");
|
$langs->load("companies");
|
||||||
$langs->load("bills");
|
|
||||||
$langs->load("trips");
|
$langs->load("trips");
|
||||||
|
|
||||||
// Securiy check
|
$id = GETPOST('id');
|
||||||
if ($user->societe_id > 0)
|
$ref = GETPOST('ref');
|
||||||
{
|
$action = GETPOST('action');
|
||||||
unset($_GET["action"]);
|
$confirm = GETPOST('confirm');
|
||||||
$socid = $user->societe_id;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
// Security check
|
||||||
|
if ($user->societe_id) $socid=$user->societe_id;
|
||||||
|
$result = restrictedArea($user, 'deplacement', $id, '');
|
||||||
|
|
||||||
$trip = new Deplacement($db);
|
$object = new Deplacement($db);
|
||||||
|
|
||||||
|
|
||||||
/******************************************************************************/
|
/******************************************************************************/
|
||||||
/* Actions */
|
/* Actions */
|
||||||
/******************************************************************************/
|
/******************************************************************************/
|
||||||
|
|
||||||
if ($_POST["action"] == 'update_public' && $user->rights->deplacement->creer)
|
if ($action == 'update_public' && $user->rights->deplacement->creer)
|
||||||
{
|
{
|
||||||
$db->begin();
|
$db->begin();
|
||||||
|
|
||||||
$trip->fetch($_GET["id"]);
|
$object->fetch($id);
|
||||||
|
|
||||||
$res=$trip->update_note_public($_POST["note_public"],$user);
|
$res=$object->update_note_public($_POST["note_public"]);
|
||||||
if ($res < 0)
|
if ($res < 0)
|
||||||
{
|
{
|
||||||
$mesg='<div class="error">'.$fac->error.'</div>';
|
$mesg='<div class="error">'.$object->error.'</div>';
|
||||||
$db->rollback();
|
$db->rollback();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -67,16 +63,16 @@ if ($_POST["action"] == 'update_public' && $user->rights->deplacement->creer)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($_POST["action"] == 'update' && $user->rights->deplacement->creer)
|
if ($action == 'update' && $user->rights->deplacement->creer)
|
||||||
{
|
{
|
||||||
$db->begin();
|
$db->begin();
|
||||||
|
|
||||||
$trip->fetch($_GET["id"]);
|
$object->fetch($id);
|
||||||
|
|
||||||
$res=$trip->update_note($_POST["note"],$user);
|
$res=$object->update_note($_POST["note"]);
|
||||||
if ($res < 0)
|
if ($res < 0)
|
||||||
{
|
{
|
||||||
$mesg='<div class="error">'.$fac->error.'</div>';
|
$mesg='<div class="error">'.$object->error.'</div>';
|
||||||
$db->rollback();
|
$db->rollback();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -95,53 +91,34 @@ llxHeader();
|
|||||||
|
|
||||||
$html = new Form($db);
|
$html = new Form($db);
|
||||||
|
|
||||||
$id = $_GET['id'];
|
|
||||||
$ref= $_GET['ref'];
|
|
||||||
if ($id > 0 || ! empty($ref))
|
if ($id > 0 || ! empty($ref))
|
||||||
{
|
{
|
||||||
$trip = new Deplacement($db);
|
$object->fetch($id, $ref);
|
||||||
$trip->fetch($id,$ref);
|
|
||||||
|
|
||||||
$soc = new Societe($db);
|
$soc = new Societe($db);
|
||||||
$soc->fetch($trip->socid);
|
$soc->fetch($object->socid);
|
||||||
|
|
||||||
$h=0;
|
$head = trip_prepare_head($object);
|
||||||
|
|
||||||
$head[$h][0] = DOL_URL_ROOT."/compta/deplacement/fiche.php?id=$trip->id";
|
|
||||||
$head[$h][1] = $langs->trans("Card");
|
|
||||||
$head[$h][2] = 'card';
|
|
||||||
$h++;
|
|
||||||
|
|
||||||
$head[$h][0] = DOL_URL_ROOT."/compta/deplacement/note.php?id=$trip->id";
|
|
||||||
$head[$h][1] = $langs->trans("Note");
|
|
||||||
$head[$h][2] = 'note';
|
|
||||||
$h++;
|
|
||||||
|
|
||||||
$head[$h][0] = DOL_URL_ROOT."/compta/deplacement/info.php?id=$deplacement->id";
|
|
||||||
$head[$h][1] = $langs->trans("Info");
|
|
||||||
$head[$h][2] = 'info';
|
|
||||||
$h++;
|
|
||||||
|
|
||||||
dol_fiche_head($head, 'note', $langs->trans("TripCard"), 0, 'trip');
|
dol_fiche_head($head, 'note', $langs->trans("TripCard"), 0, 'trip');
|
||||||
|
|
||||||
|
|
||||||
print '<table class="border" width="100%">';
|
print '<table class="border" width="100%">';
|
||||||
|
|
||||||
// Ref
|
// Ref
|
||||||
print '<tr><td width="20%">'.$langs->trans('Ref').'</td>';
|
print '<tr><td width="20%">'.$langs->trans('Ref').'</td>';
|
||||||
print '<td colspan="3">';
|
print '<td colspan="3">';
|
||||||
$morehtmlref='';
|
$morehtmlref='';
|
||||||
print $html->showrefnav($trip,'ref','',1,'ref','ref',$morehtmlref);
|
print $html->showrefnav($object,'ref','',1,'ref','ref',$morehtmlref);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Type
|
// Type
|
||||||
print '<tr><td>'.$langs->trans("Type").'</td><td>'.$langs->trans($trip->type).'</td></tr>';
|
print '<tr><td>'.$langs->trans("Type").'</td><td>'.$langs->trans($object->type).'</td></tr>';
|
||||||
|
|
||||||
// Who
|
// Who
|
||||||
print "<tr>";
|
print "<tr>";
|
||||||
print '<td>'.$langs->trans("Person").'</td><td>';
|
print '<td>'.$langs->trans("Person").'</td><td>';
|
||||||
$userfee=new User($db);
|
$userfee=new User($db);
|
||||||
$userfee->fetch($trip->fk_user);
|
$userfee->fetch($object->fk_user);
|
||||||
print $userfee->getNomUrl(1);
|
print $userfee->getNomUrl(1);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
@ -153,18 +130,18 @@ if ($id > 0 || ! empty($ref))
|
|||||||
// Note publique
|
// Note publique
|
||||||
print '<tr><td valign="top">'.$langs->trans("NotePublic").'</td>';
|
print '<tr><td valign="top">'.$langs->trans("NotePublic").'</td>';
|
||||||
print '<td valign="top" colspan="3">';
|
print '<td valign="top" colspan="3">';
|
||||||
if ($_GET["action"] == 'edit')
|
if ($action == 'edit')
|
||||||
{
|
{
|
||||||
print '<form method="post" action="note.php?id='.$trip->id.'">';
|
print '<form method="POST" action="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '">';
|
||||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||||
print '<input type="hidden" name="action" value="update_public">';
|
print '<input type="hidden" name="action" value="update_public">';
|
||||||
print '<textarea name="note_public" cols="80" rows="8">'.$trip->note_public."</textarea><br>";
|
print '<textarea name="note_public" cols="80" rows="8">'.$object->note_public."</textarea><br>";
|
||||||
print '<input type="submit" class="button" value="'.$langs->trans("Save").'">';
|
print '<input type="submit" class="button" value="'.$langs->trans("Save").'">';
|
||||||
print '</form>';
|
print '</form>';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print ($trip->note_public?nl2br($trip->note_public):" ");
|
print ($object->note_public?nl2br($object->note_public):" ");
|
||||||
}
|
}
|
||||||
print "</td></tr>";
|
print "</td></tr>";
|
||||||
|
|
||||||
@ -173,18 +150,18 @@ if ($id > 0 || ! empty($ref))
|
|||||||
{
|
{
|
||||||
print '<tr><td valign="top">'.$langs->trans("NotePrivate").'</td>';
|
print '<tr><td valign="top">'.$langs->trans("NotePrivate").'</td>';
|
||||||
print '<td valign="top" colspan="3">';
|
print '<td valign="top" colspan="3">';
|
||||||
if ($_GET["action"] == 'edit')
|
if ($action == 'edit')
|
||||||
{
|
{
|
||||||
print '<form method="post" action="note.php?id='.$trip->id.'">';
|
print '<form method="POST" action="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '">';
|
||||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||||
print '<input type="hidden" name="action" value="update">';
|
print '<input type="hidden" name="action" value="update">';
|
||||||
print '<textarea name="note" cols="80" rows="8">'.$trip->note."</textarea><br>";
|
print '<textarea name="note" cols="80" rows="8">'.$object->note."</textarea><br>";
|
||||||
print '<input type="submit" class="button" value="'.$langs->trans("Save").'">';
|
print '<input type="submit" class="button" value="'.$langs->trans("Save").'">';
|
||||||
print '</form>';
|
print '</form>';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print ($trip->note?nl2br($trip->note):" ");
|
print ($object->note?nl2br($object->note):" ");
|
||||||
}
|
}
|
||||||
print "</td></tr>";
|
print "</td></tr>";
|
||||||
}
|
}
|
||||||
@ -198,9 +175,9 @@ if ($id > 0 || ! empty($ref))
|
|||||||
print '</div>';
|
print '</div>';
|
||||||
print '<div class="tabsAction">';
|
print '<div class="tabsAction">';
|
||||||
|
|
||||||
if ($user->rights->deplacement->creer && $_GET["action"] <> 'edit')
|
if ($action <> 'edit' && $user->rights->deplacement->creer)
|
||||||
{
|
{
|
||||||
print "<a class=\"butAction\" href=\"note.php?id=$trip->id&action=edit\">".$langs->trans('Modify')."</a>";
|
print '<a class="butAction" href="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id .'&action=edit">' . $langs->trans('Modify') . '</a>';
|
||||||
}
|
}
|
||||||
|
|
||||||
print "</div>";
|
print "</div>";
|
||||||
|
|||||||
@ -67,3 +67,5 @@ ALTER TABLE llx_product_fournisseur_price DROP FOREIGN KEY fk_product_fournisseu
|
|||||||
|
|
||||||
DROP TABLE IF EXISTS llx_pos_tmp;
|
DROP TABLE IF EXISTS llx_pos_tmp;
|
||||||
|
|
||||||
|
ALTER TABLE llx_deplacement ADD COLUMN fk_user_modif integer AFTER fk_user_author;
|
||||||
|
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
-- ============================================================================
|
-- ============================================================================
|
||||||
-- Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
-- Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
-- Copyright (C) 2009 Regis Houssin <regis@dolibarr.fr>
|
-- Copyright (C) 2009-2011 Regis Houssin <regis@dolibarr.fr>
|
||||||
-- Copyright (C) 2010 Laurent Destailleur <eldy@users.sourceforge.net>
|
-- Copyright (C) 2010 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
--
|
--
|
||||||
-- This program is free software; you can redistribute it and/or modify
|
-- This program is free software; you can redistribute it and/or modify
|
||||||
-- it under the terms of the GNU General Public License as published by
|
-- it under the terms of the GNU General Public License as published by
|
||||||
@ -21,14 +21,14 @@
|
|||||||
create table llx_deplacement
|
create table llx_deplacement
|
||||||
(
|
(
|
||||||
rowid integer AUTO_INCREMENT PRIMARY KEY,
|
rowid integer AUTO_INCREMENT PRIMARY KEY,
|
||||||
ref varchar(30) DEFAULT NULL, -- Ref donation (TODO change to NOT NULL)
|
ref varchar(30) DEFAULT NULL, -- Ref donation (TODO change to NOT NULL)
|
||||||
entity integer DEFAULT 1 NOT NULL, -- multi company id
|
entity integer DEFAULT 1 NOT NULL, -- multi company id
|
||||||
datec datetime NOT NULL,
|
datec datetime NOT NULL,
|
||||||
tms timestamp,
|
tms timestamp,
|
||||||
dated datetime,
|
dated datetime,
|
||||||
fk_user integer NOT NULL,
|
fk_user integer NOT NULL,
|
||||||
fk_user_author integer,
|
fk_user_author integer,
|
||||||
fk_user_modif integer, -- utilisateur qui a modifie l'info
|
fk_user_modif integer, -- utilisateur qui a modifie l'info
|
||||||
type varchar(12) NOT NULL,
|
type varchar(12) NOT NULL,
|
||||||
fk_statut integer DEFAULT 1 NOT NULL,
|
fk_statut integer DEFAULT 1 NOT NULL,
|
||||||
km real,
|
km real,
|
||||||
|
|||||||
61
htdocs/lib/trip.lib.php
Normal file
61
htdocs/lib/trip.lib.php
Normal file
@ -0,0 +1,61 @@
|
|||||||
|
<?php
|
||||||
|
/* Copyright (C) 2011 Regis Houssin <regis@dolibarr.fr>
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program 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 General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
* or see http://www.gnu.org/
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \file htdocs/lib/trip.lib.php
|
||||||
|
* \brief Ensemble de fonctions de base pour les deplacements
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Enter description here...
|
||||||
|
*
|
||||||
|
* @param $object
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
|
function trip_prepare_head($object)
|
||||||
|
{
|
||||||
|
global $langs, $conf;
|
||||||
|
|
||||||
|
$h = 0;
|
||||||
|
$head = array();
|
||||||
|
|
||||||
|
$head[$h][0] = DOL_URL_ROOT . '/compta/deplacement/fiche.php?id=' . $object->id;
|
||||||
|
$head[$h][1] = $langs->trans("Card");
|
||||||
|
$head[$h][2] = 'card';
|
||||||
|
$h++;
|
||||||
|
|
||||||
|
$head[$h][0] = DOL_URL_ROOT . '/compta/deplacement/note.php?id=' . $object->id;
|
||||||
|
$head[$h][1] = $langs->trans("Note");
|
||||||
|
$head[$h][2] = 'note';
|
||||||
|
$h++;
|
||||||
|
|
||||||
|
// Show more tabs from modules
|
||||||
|
// Entries must be declared in modules descriptor with line
|
||||||
|
// $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab
|
||||||
|
// $this->tabs = array('entity:-tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to remove a tab
|
||||||
|
complete_head_from_modules($conf,$langs,$object,$head,$h,'trip');
|
||||||
|
|
||||||
|
$head[$h][0] = DOL_URL_ROOT . '/compta/deplacement/info.php?id=' . $object->id;
|
||||||
|
$head[$h][1] = $langs->trans("Info");
|
||||||
|
$head[$h][2] = 'info';
|
||||||
|
$h++;
|
||||||
|
|
||||||
|
return $head;
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
||||||
Loading…
Reference in New Issue
Block a user