Dolibarize new module
This commit is contained in:
parent
a331fdd0b8
commit
8217587b5e
@ -1,7 +1,6 @@
|
||||
<?php
|
||||
/*
|
||||
* Copyright (C) - 2013-2016 Jean-François FERRY <hello@librethic.io>
|
||||
* 2016 Christophe Battarel <christophe@altairis.fr>
|
||||
/* Copyright (C) - 2013-2016 Jean-François FERRY <hello@librethic.io>
|
||||
* Copyright (C) 2016 Christophe Battarel <christophe@altairis.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
|
||||
@ -23,15 +22,7 @@
|
||||
* @package ticketsup
|
||||
*/
|
||||
|
||||
// Change this following line to use the correct relative path (../, ../../, etc)
|
||||
$res = 0;
|
||||
if (file_exists("../main.inc.php")) {
|
||||
$res = include "../main.inc.php"; // From htdocs directory
|
||||
} elseif (!$res && file_exists("../../main.inc.php")) {
|
||||
$res = include "../../main.inc.php"; // From "custom" directory
|
||||
} else {
|
||||
die("Include of main fails");
|
||||
}
|
||||
require '../main.inc.php';
|
||||
|
||||
require_once 'class/actions_ticketsup.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/class/html.formticketsup.class.php';
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/* Copyright (C) - 2013-2015 Jean-François FERRY <hello@librethic.io>
|
||||
* 2016 Christophe Battarel <christophe@altairis.fr>
|
||||
/* Copyright (C) 2013-2015 Jean-François FERRY <hello@librethic.io>
|
||||
* Copyright (C) 2016 Christophe Battarel <christophe@altairis.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
|
||||
@ -24,7 +24,6 @@
|
||||
*/
|
||||
|
||||
require_once "ticketsup.class.php";
|
||||
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/lib/files.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/class/extrafields.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/contrat/class/contrat.class.php';
|
||||
|
||||
@ -1,7 +1,6 @@
|
||||
<?php
|
||||
/*
|
||||
* Copyright (C) - 2013-2018 Jean-François Ferry <hello@librethic.io>
|
||||
* 2016 Christophe Battarel <christophe@altairis.fr>
|
||||
/* Copyright (C) 2013-2018 Jean-François Ferry <hello@librethic.io>
|
||||
* Copyright (C) 2016 Christophe Battarel <christophe@altairis.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
|
||||
@ -29,6 +28,7 @@ require_once DOL_DOCUMENT_ROOT . '/fichinter/class/fichinter.class.php';
|
||||
//require_once(DOL_DOCUMENT_ROOT."/societe/class/societe.class.php");
|
||||
//require_once(DOL_DOCUMENT_ROOT."/product/class/product.class.php");
|
||||
|
||||
|
||||
/**
|
||||
* Put here description of your class
|
||||
*/
|
||||
|
||||
@ -1,6 +1,5 @@
|
||||
<?php
|
||||
/*
|
||||
* Copyright (C) - 2013-2016 Jean-François FERRY <hello@librethic.io>
|
||||
/* Copyright (C) - 2013-2016 Jean-François FERRY <hello@librethic.io>
|
||||
*
|
||||
* 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
|
||||
@ -27,8 +26,9 @@ require_once DOL_DOCUMENT_ROOT . "/core/class/commonobject.class.php";
|
||||
//require_once(DOL_DOCUMENT_ROOT."/societe/class/societe.class.php");
|
||||
//require_once(DOL_DOCUMENT_ROOT."/product/class/product.class.php");
|
||||
|
||||
|
||||
/**
|
||||
* Put here description of your class
|
||||
* Class of log for ticketsup
|
||||
*/
|
||||
class Ticketsuplogs// extends CommonObject
|
||||
{
|
||||
|
||||
@ -23,9 +23,9 @@
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/class/stats.class.php';
|
||||
require_once 'ticketsup.class.php';
|
||||
|
||||
|
||||
/**
|
||||
* \class DeplacementStats
|
||||
* \brief Classe permettant la gestion des stats des deplacements et notes de frais
|
||||
* Classe permettant la gestion des stats des deplacements et notes de frais
|
||||
*/
|
||||
class TicketsupStats extends Stats
|
||||
{
|
||||
|
||||
@ -1,22 +1,20 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
|
||||
class.Diff.php
|
||||
|
||||
A class containing a diff implementation
|
||||
|
||||
Created by Stephen Morley - http://stephenmorley.org/ - and released under the
|
||||
terms of the CC0 1.0 Universal legal code:
|
||||
|
||||
http://creativecommons.org/publicdomain/zero/1.0/legalcode
|
||||
|
||||
/* Copyright (C) 2016 Jean-François Ferry <hello@librethic.io>
|
||||
*
|
||||
* A class containing a diff implementation
|
||||
*
|
||||
* Created by Stephen Morley - http://stephenmorley.org/ - and released under the
|
||||
* terms of the CC0 1.0 Universal legal code:
|
||||
*
|
||||
* http://creativecommons.org/publicdomain/zero/1.0/legalcode
|
||||
*/
|
||||
|
||||
// A class containing functions for computing diffs and formatting the output.
|
||||
|
||||
/**
|
||||
* A class containing functions for computing diffs and formatting the output.
|
||||
*/
|
||||
class Diff
|
||||
{
|
||||
|
||||
// define the constants
|
||||
const UNMODIFIED = 0;
|
||||
const DELETED = 1;
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/* Copyright (C) 2011-2016 Jean-François Ferry <hello@librethic.io>
|
||||
* Copyright (C) 2011 Regis Houssin <regis@dolibarr.fr>
|
||||
* 2016 Christophe Battarel <christophe@altairis.fr>
|
||||
/* Copyright (C) 2011-2016 Jean-François Ferry <hello@librethic.io>
|
||||
* Copyright (C) 2011 Regis Houssin <regis@dolibarr.fr>
|
||||
* Copyright (C) 2016 Christophe Battarel <christophe@altairis.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
|
||||
@ -23,16 +23,10 @@
|
||||
* \ingroup ticketsup
|
||||
* \brief Contacts des tickets
|
||||
*/
|
||||
$res = 0;
|
||||
if (file_exists("../main.inc.php")) {
|
||||
$res = include "../main.inc.php"; // From htdocs directory
|
||||
} elseif (!$res && file_exists("../../main.inc.php")) {
|
||||
$res = include "../../main.inc.php"; // From "custom" directory
|
||||
} else {
|
||||
die("Include of main fails");
|
||||
}
|
||||
|
||||
require_once 'class/ticketsup.class.php';
|
||||
require '../main.inc.php';
|
||||
|
||||
require_once DOL_DOCUMENT_ROOT . '/ticketsup/class/ticketsup.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/lib/ticketsup.lib.php';
|
||||
|
||||
require_once DOL_DOCUMENT_ROOT . '/societe/class/societe.class.php';
|
||||
|
||||
@ -1,6 +1,5 @@
|
||||
<?php
|
||||
/*
|
||||
* Copyright (C) 2002-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
/* Copyright (C) 2002-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2010 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2010 Juanjo Menent <jmenent@2byte.es>
|
||||
@ -26,17 +25,9 @@
|
||||
* \brief files linked to a ticket
|
||||
*/
|
||||
|
||||
$res = 0;
|
||||
if (file_exists("../main.inc.php")) {
|
||||
$res = include "../main.inc.php"; // From htdocs directory
|
||||
} elseif (!$res && file_exists("../../main.inc.php")) {
|
||||
$res = include "../../main.inc.php"; // From "custom" directory
|
||||
} else {
|
||||
die("Include of main fails");
|
||||
}
|
||||
|
||||
require '../main.inc.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/lib/ticketsup.lib.php';
|
||||
require_once 'class/ticketsup.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/ticketsup/class/ticketsup.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/lib/files.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/lib/images.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT . "/core/lib/company.lib.php";
|
||||
|
||||
@ -1,6 +1,5 @@
|
||||
<?php
|
||||
/*
|
||||
* Copyright (C) - 2013-2016 Jean-François FERRY <hello@librethic.io>
|
||||
/* Copyright (C) - 2013-2016 Jean-François FERRY <hello@librethic.io>
|
||||
*
|
||||
* 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
|
||||
@ -17,20 +16,13 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* History of ticket
|
||||
* History of ticket
|
||||
*
|
||||
* @package ticketsup
|
||||
*/
|
||||
|
||||
$res = 0;
|
||||
if (file_exists("../main.inc.php")) {
|
||||
$res = include "../main.inc.php"; // From htdocs directory
|
||||
} elseif (!$res && file_exists("../../main.inc.php")) {
|
||||
$res = include "../../main.inc.php"; // From "custom" directory
|
||||
} else {
|
||||
die("Include of main fails");
|
||||
}
|
||||
require_once 'class/actions_ticketsup.class.php';
|
||||
require '../main.inc.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/ticketsup/class/actions_ticketsup.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/class/html.formticketsup.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/lib/ticketsup.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT . "/core/lib/company.lib.php";
|
||||
|
||||
@ -1,6 +1,5 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright (C) - 2013-2016 Jean-François FERRY <hello@librethic.io>
|
||||
/* Copyright (C) - 2013-2016 Jean-François FERRY <hello@librethic.io>
|
||||
*
|
||||
* 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
|
||||
@ -22,17 +21,9 @@
|
||||
* @package ticketsup
|
||||
*/
|
||||
|
||||
$res = 0;
|
||||
if (file_exists("../main.inc.php")) {
|
||||
$res = include "../main.inc.php"; // From htdocs directory
|
||||
} elseif (!$res && file_exists("../../main.inc.php")) {
|
||||
$res = include "../../main.inc.php"; // From "custom" directory
|
||||
} else {
|
||||
die("Include of main fails");
|
||||
}
|
||||
|
||||
require_once 'class/actions_ticketsup.class.php';
|
||||
require_once 'class/ticketsupstats.class.php';
|
||||
require '../main.inc.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/ticketsup/class/actions_ticketsup.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/ticketsup/class/ticketsupstats.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/class/dolgraph.class.php';
|
||||
|
||||
// Load traductions files requiredby by page
|
||||
|
||||
@ -1,6 +1,5 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright (C) - 2013-2018 Jean-François FERRY <hello@librethic.io>
|
||||
/* Copyright (C) - 2013-2018 Jean-François FERRY <hello@librethic.io>
|
||||
* 2016 Christophe Battarel <christophe@altairis.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@ -23,30 +22,14 @@
|
||||
* @package ticketsup
|
||||
*/
|
||||
|
||||
|
||||
// Load Dolibarr environment
|
||||
$res=0;
|
||||
// Try main.inc.php into web root known defined into CONTEXT_DOCUMENT_ROOT (not always defined)
|
||||
if (! $res && ! empty($_SERVER["CONTEXT_DOCUMENT_ROOT"])) $res=@include($_SERVER["CONTEXT_DOCUMENT_ROOT"]."/main.inc.php");
|
||||
// Try main.inc.php into web root detected using web root caluclated from SCRIPT_FILENAME
|
||||
$tmp=empty($_SERVER['SCRIPT_FILENAME'])?'':$_SERVER['SCRIPT_FILENAME'];$tmp2=realpath(__FILE__); $i=strlen($tmp)-1; $j=strlen($tmp2)-1;
|
||||
while($i > 0 && $j > 0 && isset($tmp[$i]) && isset($tmp2[$j]) && $tmp[$i]==$tmp2[$j]) { $i--; $j--; }
|
||||
if (! $res && $i > 0 && file_exists(substr($tmp, 0, ($i+1))."/main.inc.php")) $res=include(substr($tmp, 0, ($i+1))."/main.inc.php");
|
||||
if (! $res && $i > 0 && file_exists(dirname(substr($tmp, 0, ($i+1)))."/main.inc.php")) $res=include(dirname(substr($tmp, 0, ($i+1)))."/main.inc.php");
|
||||
// Try main.inc.php using relative path
|
||||
if (! $res && file_exists("../main.inc.php")) $res=include("../main.inc.php");
|
||||
if (! $res && file_exists("../../main.inc.php")) $res=include("../../main.inc.php");
|
||||
if (! $res && file_exists("../../../main.inc.php")) $res=include("../../../main.inc.php");
|
||||
if (! $res) die("Include of main fails");
|
||||
|
||||
|
||||
require_once 'class/actions_ticketsup.class.php';
|
||||
require '../main.inc.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/ticketsup/class/actions_ticketsup.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/class/html.formticketsup.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/lib/functions2.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/lib/company.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/user/class/user.class.php';
|
||||
if (!empty($conf->projet->enabled)) {
|
||||
include DOL_DOCUMENT_ROOT . '/projet/class/project.class.php';
|
||||
include_once DOL_DOCUMENT_ROOT . '/projet/class/project.class.php';
|
||||
include_once DOL_DOCUMENT_ROOT . '/core/class/html.formprojet.class.php';
|
||||
include_once DOL_DOCUMENT_ROOT . '/core/lib/project.lib.php';
|
||||
}
|
||||
|
||||
@ -1,6 +1,5 @@
|
||||
<?php
|
||||
/*
|
||||
* Copyright (C) - 2013-2016 Jean-François FERRY <hello@librethic.io>
|
||||
/* Copyright (C) - 2013-2016 Jean-François FERRY <hello@librethic.io>
|
||||
* 2016 Christophe Battarel <christophe@altairis.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@ -18,21 +17,13 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* Display form to add new ticket
|
||||
* Display form to add new ticket
|
||||
*
|
||||
* @package ticketsup
|
||||
* @package ticketsup
|
||||
*/
|
||||
|
||||
$res = 0;
|
||||
if (file_exists("../main.inc.php")) {
|
||||
$res = include "../main.inc.php"; // From htdocs directory
|
||||
} elseif (!$res && file_exists("../../main.inc.php")) {
|
||||
$res = include "../../main.inc.php"; // From "custom" directory
|
||||
} else {
|
||||
die("Include of main fails");
|
||||
}
|
||||
|
||||
require_once 'class/actions_ticketsup.class.php';
|
||||
require '../main.inc.php';
|
||||
require_once DOL_DOCUMENT_ROOT . 'class/actions_ticketsup.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/class/html.formticketsup.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/lib/ticketsup.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/class/extrafields.class.php';
|
||||
|
||||
@ -37,11 +37,9 @@ print_titre($langs->trans('RelatedTickets'));
|
||||
<td align="center"><?php echo $langs->trans("Status"); ?></td>
|
||||
</tr>
|
||||
<?php
|
||||
$var=true;
|
||||
foreach ($linkedObjectBlock as $object) {
|
||||
$var=!$var;
|
||||
?>
|
||||
<tr <?php echo $bc[$var]; ?>>
|
||||
<tr class="oddeven">
|
||||
<td>
|
||||
<a href="<?php echo dol_buildpath("/ticketsup/card.php", 1).'?track_id='.$object->track_id; ?>">
|
||||
<?php echo img_object($langs->trans("ShowTicket"), "ticketsup@ticketsup") . ' ' . (! empty($object->subject) ? ' '.$object->subject : ''); ?>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user