print '<tr ' . $bc[$var] . '><td class="fieldrequired">';
    print $langs->trans("PRINTIPP_PASSWORD") . '</td><td>';
    print '<input size="32" type="text" name="PRINTIPP_PASSWORD" value="' . $conf->global->PRINTIPP_PASSWORD . '">';
    print '</td></tr>';
    //$var=true;
    //print '<tr class="liste_titre">';
    //print '<td>'.$langs->trans("OtherParameter").'</td>';
    //print '<td>'.$langs->trans("Value").'</td>';
    //print "</tr>\n";
    print '<tr><td colspan="2" align="center"><br><input type="submit" class="button" value="' . $langs->trans("Modify") . '"></td></tr>';
    print '</table>';
    print '</form>';
}
if ($mode == 'test' && $user->admin) {
    print '<table class="nobordernopadding" width="100%">';
    $printer = new dolPrintIPP($db, $conf->global->PRINTIPP_HOST, $conf->global->PRINTIPP_PORT, $user->login, $conf->global->PRINTIPP_USER, $conf->global->PRINTIPP_PASSWORD);
    $var = true;
    print '<table width="100%" class="noborder">';
    print '<tr class="liste_titre">';
    print '<td>Uri</td>';
    print '<td>Name</td>';
    print '<td>State</td>';
    print '<td>State_reason</td>';
    print '<td>State_reason1</td>';
    print '<td>BW</td>';
    print '<td>Color</td>';
    //print '<td>Device</td>';
    print '<td>Media</td>';
    print '<td>Supported</td>';
    print "</tr>\n";
    $list = $printer->getlist_available_printers();
Ejemplo n.º 2
0
                $object->fetch_thirdparty();
                $langs->load("other");
                $upload_dir = $conf->facture->dir_output;
                $file = $upload_dir . '/' . GETPOST('file');
                $ret = dol_delete_file($file, 0, 0, 0, $object);
                if ($ret) {
                    setEventMessage($langs->trans("FileWasRemoved", GETPOST('urlfile')));
                } else {
                    setEventMessage($langs->trans("ErrorFailToDeleteFile", GETPOST('urlfile')), 'errors');
                }
                $action = '';
            }
        } else {
            if ($action == 'print_file' and $user->rights->printipp->read) {
                require_once DOL_DOCUMENT_ROOT . '/core/class/dolprintipp.class.php';
                $printer = new dolPrintIPP($db, $conf->global->PRINTIPP_HOST, $conf->global->PRINTIPP_PORT, $user->login, $conf->global->PRINTIPP_USER, $conf->global->PRINTIPP_PASSWORD);
                $printer->print_file(GETPOST('file', 'alpha'), GETPOST('printer', 'alpha'));
                setEventMessage($langs->trans("FileWasSentToPrinter", GETPOST('file')));
                $action = '';
            }
        }
    }
}
if (!empty($conf->global->MAIN_DISABLE_CONTACTS_TAB) && $user->rights->facture->creer) {
    if ($action == 'addcontact') {
        $result = $object->fetch($id);
        if ($result > 0 && $id > 0) {
            $contactid = GETPOST('userid') ? GETPOST('userid') : GETPOST('contactid');
            $result = $object->add_contact($contactid, $_POST["type"], $_POST["source"]);
        }
        if ($result >= 0) {
Ejemplo n.º 3
0
<?php

/*
 *
 * 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 3 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/>.
 */
/**
 *	\file       htdocs/printipp/index.php
 *	\ingroup    printipp
 *	\brief      Printipp
 */
require '../main.inc.php';
require_once DOL_DOCUMENT_ROOT . '/core/class/dolprintipp.class.php';
llxHeader("", $langs->trans("Printer"));
print_fiche_titre($langs->trans("Printer"));
$printer = new dolPrintIPP($db, $conf->global->PRINTIPP_HOST, $conf->global->PRINTIPP_PORT, $user->login, $conf->global->PRINTIPP_USER, $conf->global->PRINTIPP_PASSWORD);
$printer->list_jobs('commande');
llxFooter();
$db->close();