Exemplo n.º 1
0
        }
    }
}
/*
 * View
 */
$form = new Form($db);
$formcompany = new FormCompany($db);
$contactstatic = new Contact($db);
$userstatic = new User($db);
llxHeader();
// Mode vue et edition
if ($id > 0 || !empty($ref)) {
    $soc = new Societe($db);
    $soc->fetch($object->socid);
    $head = fichinter_prepare_head($object);
    dol_fiche_head($head, 'contact', $langs->trans("InterventionCard"), 0, 'intervention');
    /*
     *   Fiche intervention synthese pour rappel
     */
    print '<table class="border" width="100%">';
    $linkback = '<a href="' . DOL_URL_ROOT . '/fichinter/list.php' . (!empty($socid) ? '?socid=' . $socid : '') . '">' . $langs->trans("BackToList") . '</a>';
    // Ref
    print '<tr><td width="25%">' . $langs->trans("Ref") . '</td><td colspan="3">';
    print $form->showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref');
    print "</td></tr>";
    // Customer
    if (is_null($object->client)) {
        $object->fetch_thirdparty();
    }
    print "<tr><td>" . $langs->trans("Company") . "</td>";
Exemplo n.º 2
0
            // Do not use urldecode here ($_GET and $_REQUEST are already decoded by PHP).
            dol_delete_file($file, 0, 0, 0, $object);
            $_SESSION['dol_message'] = '<div class="ok">' . $langs->trans("FileWasRemoved", GETPOST('urlfile')) . '</div>';
            Header('Location: ' . $_SERVER["PHP_SELF"] . '?id=' . $id);
            exit;
        }
    }
}
/*
 * View
 */
$form = new Form($db);
llxHeader("", "", $langs->trans("InterventionCard"));
if ($object->id) {
    $object->fetch_thirdparty();
    $head = fichinter_prepare_head($object, $user);
    dol_fiche_head($head, 'documents', $langs->trans("InterventionCard"), 0, 'intervention');
    // Construit liste des fichiers
    $filearray = dol_dir_list($upload_dir, "files", 0, '', '\\.meta$', $sortfield, strtolower($sortorder) == 'desc' ? SORT_DESC : SORT_ASC, 1);
    $totalsize = 0;
    foreach ($filearray as $key => $file) {
        $totalsize += $file['size'];
    }
    print '<table class="border" width="100%">';
    // Ref
    print '<tr><td width="30%">' . $langs->trans("Ref") . '</td><td>';
    print $form->showrefnav($object, 'ref', '', 1, 'ref', 'ref');
    print '</td></tr>';
    // Societe
    print "<tr><td>" . $langs->trans("Company") . "</td><td>" . $object->client->getNomUrl(1) . "</td></tr>";
    print '<tr><td>' . $langs->trans("NbOfAttachedFiles") . '</td><td colspan="3">' . count($filearray) . '</td></tr>';
Exemplo n.º 3
0
/* Mode vue et edition                                                         */
/*                                                                             */
/* *************************************************************************** */
if (isset($mesg)) print $mesg;

$id = $_GET["id"];
if ($id > 0)
{
	$fichinter = New Fichinter($db);
	if ($fichinter->fetch($_GET['id']) > 0)
	{
		$soc = new Societe($db, $fichinter->socid);
		$soc->fetch($fichinter->socid);


		$head = fichinter_prepare_head($fichinter);
		dol_fiche_head($head, 'contact', $langs->trans("InterventionCard"), 0, 'intervention');


		/*
		*   Fiche intervention synthese pour rappel
		*/
		print '<table class="border" width="100%">';

		// Ref
		print '<tr><td width="25%">'.$langs->trans("Ref").'</td><td colspan="3">';
		print $fichinter->ref;
		print "</td></tr>";

		// Customer
		if ( is_null($fichinter->client) )
function _header($id, $object_type)
{
    global $db, $langs;
    $langs->load('interventions');
    $langs->load('contracts');
    if ($object_type == 'contrat') {
        $object = new Contrat($db);
        $object->fetch($id);
        dol_include_once('/core/lib/contract.lib.php');
        $head = contract_prepare_head($object);
        dol_fiche_head($head, 'dispatchAsset', $langs->trans("Contract"), 0, 'contract');
    } else {
        if ($object_type == 'intervention') {
            $object = new Fichinter($db);
            $object->fetch($id);
            dol_include_once('/core/lib/fichinter.lib.php');
            $head = fichinter_prepare_head($object);
            dol_fiche_head($head, 'dispatchAsset', $langs->trans("InterventionCard"), 0, 'intervention');
        } else {
            if ($object_type == 'ticketsup') {
                dol_include_once('/ticketsup/class/ticketsup.class.php');
                dol_include_once('/ticketsup/lib/ticketsup.lib.php');
                $object = new Ticketsup($db);
                $object->fetch($id);
                $head = ticketsup_prepare_head($object);
                dol_fiche_head($head, 'dispatchAsset', $langs->trans("Ticket"), 0, 'ticketsup@ticketsup');
            }
        }
    }
    return $object;
}