Fix setup of direct print with google docs driver
This commit is contained in:
parent
43c60ec224
commit
69725fe62f
@ -47,7 +47,7 @@ $action = GETPOST('action', 'alpha');
|
|||||||
/*
|
/*
|
||||||
* Actions
|
* Actions
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if ($action == 'update')
|
if ($action == 'update')
|
||||||
{
|
{
|
||||||
$error = 0;
|
$error = 0;
|
||||||
@ -86,7 +86,7 @@ print '<input type="hidden" name="action" value="update">';
|
|||||||
|
|
||||||
$head = oauthadmin_prepare_head();
|
$head = oauthadmin_prepare_head();
|
||||||
|
|
||||||
dol_fiche_head($head, 'services', '', 0, 'technic');
|
dol_fiche_head($head, 'services', '', -1, 'technic');
|
||||||
|
|
||||||
|
|
||||||
print $langs->trans("ListOfSupportedOauthProviders").'<br><br>';
|
print $langs->trans("ListOfSupportedOauthProviders").'<br><br>';
|
||||||
@ -102,10 +102,10 @@ foreach ($list as $key)
|
|||||||
if (! $supported) continue; // show only supported
|
if (! $supported) continue; // show only supported
|
||||||
|
|
||||||
$i++;
|
$i++;
|
||||||
|
|
||||||
print '<tr class="liste_titre'.($i > 1 ?' liste_titre_add':'').'">';
|
print '<tr class="liste_titre'.($i > 1 ?' liste_titre_add':'').'">';
|
||||||
// Api Name
|
// Api Name
|
||||||
$label = $langs->trans($key[0]);
|
$label = $langs->trans($key[0]);
|
||||||
print '<td>'.$label.'</td>';
|
print '<td>'.$label.'</td>';
|
||||||
print '<td>';
|
print '<td>';
|
||||||
if (! empty($key[3])) print $langs->trans($key[3]);
|
if (! empty($key[3])) print $langs->trans($key[3]);
|
||||||
@ -127,7 +127,7 @@ foreach ($list as $key)
|
|||||||
print '<td>'.$langs->trans("FeatureNotYetSupported").'</td>';
|
print '<td>'.$langs->trans("FeatureNotYetSupported").'</td>';
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Api Id
|
// Api Id
|
||||||
print '<tr class="oddeven value">';
|
print '<tr class="oddeven value">';
|
||||||
print '<td><label for="'.$key[1].'">'.$langs->trans($key[1]).'</label></td>';
|
print '<td><label for="'.$key[1].'">'.$langs->trans($key[1]).'</label></td>';
|
||||||
|
|||||||
@ -118,7 +118,7 @@ print load_fiche_titre($langs->trans('ConfigOAuth'),$linkback,'title_setup');
|
|||||||
|
|
||||||
$head=oauthadmin_prepare_head($mode);
|
$head=oauthadmin_prepare_head($mode);
|
||||||
|
|
||||||
dol_fiche_head($head, 'tokengeneration', '', 0, 'technic');
|
dol_fiche_head($head, 'tokengeneration', '', -1, 'technic');
|
||||||
|
|
||||||
|
|
||||||
if ($mode == 'setup' && $user->admin)
|
if ($mode == 'setup' && $user->admin)
|
||||||
@ -131,8 +131,8 @@ if ($mode == 'setup' && $user->admin)
|
|||||||
$supported=0;
|
$supported=0;
|
||||||
if (in_array($key[0], array_keys($supportedoauth2array))) $supported=1;
|
if (in_array($key[0], array_keys($supportedoauth2array))) $supported=1;
|
||||||
if (! $supported) continue; // show only supported
|
if (! $supported) continue; // show only supported
|
||||||
|
|
||||||
|
|
||||||
$OAUTH_SERVICENAME='Unknown';
|
$OAUTH_SERVICENAME='Unknown';
|
||||||
if ($key[0] == 'OAUTH_GITHUB_NAME')
|
if ($key[0] == 'OAUTH_GITHUB_NAME')
|
||||||
{
|
{
|
||||||
@ -148,7 +148,7 @@ if ($mode == 'setup' && $user->admin)
|
|||||||
$urltodelete=$urlwithroot.'/core/modules/oauth/google_oauthcallback.php?action=delete&backtourl='.urlencode(DOL_URL_ROOT.'/admin/oauthlogintokens.php');
|
$urltodelete=$urlwithroot.'/core/modules/oauth/google_oauthcallback.php?action=delete&backtourl='.urlencode(DOL_URL_ROOT.'/admin/oauthlogintokens.php');
|
||||||
$urltocheckperms='https://security.google.com/settings/security/permissions';
|
$urltocheckperms='https://security.google.com/settings/security/permissions';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Show value of token
|
// Show value of token
|
||||||
$tokenobj=null;
|
$tokenobj=null;
|
||||||
// Token
|
// Token
|
||||||
@ -164,21 +164,21 @@ if ($mode == 'setup' && $user->admin)
|
|||||||
{
|
{
|
||||||
// Return an error if token not found
|
// Return an error if token not found
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set other properties
|
// Set other properties
|
||||||
$refreshtoken=false;
|
$refreshtoken=false;
|
||||||
$expiredat='';
|
$expiredat='';
|
||||||
|
|
||||||
$expire = false;
|
$expire = false;
|
||||||
// Is token expired or will token expire in the next 30 seconds
|
// Is token expired or will token expire in the next 30 seconds
|
||||||
if (is_object($tokenobj)) {
|
if (is_object($tokenobj)) {
|
||||||
$expire = ($tokenobj->getEndOfLife() !== $tokenobj::EOL_NEVER_EXPIRES && $tokenobj->getEndOfLife() !== $tokenobj::EOL_UNKNOWN && time() > ($tokenobj->getEndOfLife() - 30));
|
$expire = ($tokenobj->getEndOfLife() !== $tokenobj::EOL_NEVER_EXPIRES && $tokenobj->getEndOfLife() !== $tokenobj::EOL_UNKNOWN && time() > ($tokenobj->getEndOfLife() - 30));
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($key[1] != '' && $key[2] != '') {
|
if ($key[1] != '' && $key[2] != '') {
|
||||||
if (is_object($tokenobj)) {
|
if (is_object($tokenobj)) {
|
||||||
$refreshtoken = $tokenobj->getRefreshToken();
|
$refreshtoken = $tokenobj->getRefreshToken();
|
||||||
|
|
||||||
$endoflife = $tokenobj->getEndOfLife();
|
$endoflife = $tokenobj->getEndOfLife();
|
||||||
if ($endoflife == $tokenobj::EOL_NEVER_EXPIRES)
|
if ($endoflife == $tokenobj::EOL_NEVER_EXPIRES)
|
||||||
{
|
{
|
||||||
@ -196,21 +196,21 @@ if ($mode == 'setup' && $user->admin)
|
|||||||
}
|
}
|
||||||
|
|
||||||
$submit_enabled=0;
|
$submit_enabled=0;
|
||||||
|
|
||||||
print '<form method="post" action="'.$_SERVER["PHP_SELF"].'?mode=setup&driver='.$driver.'" autocomplete="off">';
|
print '<form method="post" action="'.$_SERVER["PHP_SELF"].'?mode=setup&driver='.$driver.'" autocomplete="off">';
|
||||||
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="setconst">';
|
print '<input type="hidden" name="action" value="setconst">';
|
||||||
|
|
||||||
|
|
||||||
print '<table class="noborder" width="100%">'."\n";
|
print '<table class="noborder" width="100%">'."\n";
|
||||||
|
|
||||||
$var=false;
|
$var=false;
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print '<th class="titlefieldcreate">'.$langs->trans($key[0]).'</th>';
|
print '<th class="titlefieldcreate">'.$langs->trans($key[0]).'</th>';
|
||||||
print '<th></th>';
|
print '<th></th>';
|
||||||
print '<th></th>';
|
print '<th></th>';
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
print '<tr class="oddeven">';
|
print '<tr class="oddeven">';
|
||||||
print '<td'.($key['required']?' class="required"':'').'>';
|
print '<td'.($key['required']?' class="required"':'').'>';
|
||||||
//var_dump($key);
|
//var_dump($key);
|
||||||
@ -221,7 +221,7 @@ if ($mode == 'setup' && $user->admin)
|
|||||||
print '<td>';
|
print '<td>';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '</tr>'."\n";
|
print '</tr>'."\n";
|
||||||
|
|
||||||
$var = ! $var;
|
$var = ! $var;
|
||||||
print '<tr class="oddeven">';
|
print '<tr class="oddeven">';
|
||||||
print '<td'.($key['required']?' class="required"':'').'>';
|
print '<td'.($key['required']?' class="required"':'').'>';
|
||||||
@ -248,7 +248,7 @@ if ($mode == 'setup' && $user->admin)
|
|||||||
}
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
$var = ! $var;
|
$var = ! $var;
|
||||||
print '<tr class="oddeven">';
|
print '<tr class="oddeven">';
|
||||||
print '<td'.($key['required']?' class="required"':'').'>';
|
print '<td'.($key['required']?' class="required"':'').'>';
|
||||||
@ -265,7 +265,7 @@ if ($mode == 'setup' && $user->admin)
|
|||||||
/*print '<br>Extra: <br><textarea class="quatrevingtpercent">';
|
/*print '<br>Extra: <br><textarea class="quatrevingtpercent">';
|
||||||
print ''.join(',',$tokenobj->getExtraParams());
|
print ''.join(',',$tokenobj->getExtraParams());
|
||||||
print '</textarea>';*/
|
print '</textarea>';*/
|
||||||
}
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '</tr>'."\n";
|
print '</tr>'."\n";
|
||||||
|
|
||||||
@ -281,7 +281,7 @@ if ($mode == 'setup' && $user->admin)
|
|||||||
print yn($refreshtoken);
|
print yn($refreshtoken);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
// Token expired
|
// Token expired
|
||||||
$var = ! $var;
|
$var = ! $var;
|
||||||
print '<tr class="oddeven">';
|
print '<tr class="oddeven">';
|
||||||
@ -292,7 +292,7 @@ if ($mode == 'setup' && $user->admin)
|
|||||||
print yn($expire);
|
print yn($expire);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
// Token expired at
|
// Token expired at
|
||||||
$var = ! $var;
|
$var = ! $var;
|
||||||
print '<tr class="oddeven">';
|
print '<tr class="oddeven">';
|
||||||
@ -302,9 +302,9 @@ if ($mode == 'setup' && $user->admin)
|
|||||||
print '<td colspan="2">';
|
print '<td colspan="2">';
|
||||||
print $expiredat;
|
print $expiredat;
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
|
||||||
if (! empty($driver))
|
if (! empty($driver))
|
||||||
@ -314,10 +314,10 @@ if ($mode == 'setup' && $user->admin)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
print '</form>';
|
print '</form>';
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($mode == 'test' && $user->admin)
|
if ($mode == 'test' && $user->admin)
|
||||||
@ -344,7 +344,7 @@ if ($mode == 'test' && $user->admin)
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -368,7 +368,7 @@ if ($mode == 'userconf' && $user->admin)
|
|||||||
$sql = 'SELECT p.rowid, p.printer_name, p.printer_location, p.printer_id, p.copy, p.module, p.driver, p.userid, u.login FROM '.MAIN_DB_PREFIX.'printing as p, '.MAIN_DB_PREFIX.'user as u WHERE p.userid=u.rowid';
|
$sql = 'SELECT p.rowid, p.printer_name, p.printer_location, p.printer_id, p.copy, p.module, p.driver, p.userid, u.login FROM '.MAIN_DB_PREFIX.'printing as p, '.MAIN_DB_PREFIX.'user as u WHERE p.userid=u.rowid';
|
||||||
$resql = $db->query($sql);
|
$resql = $db->query($sql);
|
||||||
while ($row=$db->fetch_array($resql)) {
|
while ($row=$db->fetch_array($resql)) {
|
||||||
|
|
||||||
print '<tr class="oddeven">';
|
print '<tr class="oddeven">';
|
||||||
print '<td>'.$row['login'].'</td>';
|
print '<td>'.$row['login'].'</td>';
|
||||||
print '<td>'.$row['module'].'</td>';
|
print '<td>'.$row['module'].'</td>';
|
||||||
|
|||||||
@ -28,7 +28,7 @@
|
|||||||
// Filename to print must be provided into 'file' parameter
|
// Filename to print must be provided into 'file' parameter
|
||||||
|
|
||||||
// Print file
|
// Print file
|
||||||
if ($action == 'print_file' and $user->rights->printing->read)
|
if ($action == 'print_file' and $user->rights->printing->read)
|
||||||
{
|
{
|
||||||
$langs->load("printing");
|
$langs->load("printing");
|
||||||
require_once DOL_DOCUMENT_ROOT . '/core/modules/printing/modules_printing.php';
|
require_once DOL_DOCUMENT_ROOT . '/core/modules/printing/modules_printing.php';
|
||||||
@ -44,10 +44,10 @@ if ($action == 'print_file' and $user->rights->printing->read)
|
|||||||
$printer = new $classname($db);
|
$printer = new $classname($db);
|
||||||
//print '<pre>'.print_r($printer, true).'</pre>';
|
//print '<pre>'.print_r($printer, true).'</pre>';
|
||||||
|
|
||||||
if (! empty($conf->global->{$printer->active}))
|
if (! empty($conf->global->{$printer->active}))
|
||||||
{
|
{
|
||||||
$printerfound++;
|
$printerfound++;
|
||||||
|
|
||||||
$subdir=(GETPOST('printer', 'alpha')=='expedition'?'sending':'');
|
$subdir=(GETPOST('printer', 'alpha')=='expedition'?'sending':'');
|
||||||
$module = GETPOST('printer', 'alpha');
|
$module = GETPOST('printer', 'alpha');
|
||||||
if ($module =='commande_fournisseur') {
|
if ($module =='commande_fournisseur') {
|
||||||
@ -60,7 +60,7 @@ if ($action == 'print_file' and $user->rights->printing->read)
|
|||||||
//print '<pre>'.print_r($printer->errors, true).'</pre>';
|
//print '<pre>'.print_r($printer->errors, true).'</pre>';
|
||||||
setEventMessages($printer->error, $printer->errors, 'errors');
|
setEventMessages($printer->error, $printer->errors, 'errors');
|
||||||
}
|
}
|
||||||
if ($ret==0)
|
if ($ret==0)
|
||||||
{
|
{
|
||||||
//print '<pre>'.print_r($printer->errors, true).'</pre>';
|
//print '<pre>'.print_r($printer->errors, true).'</pre>';
|
||||||
setEventMessages($printer->error, $printer->errors);
|
setEventMessages($printer->error, $printer->errors);
|
||||||
@ -74,7 +74,7 @@ if ($action == 'print_file' and $user->rights->printing->read)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ($printerfound==0) setEventMessages($langs->trans("NoActivePrintingModuleFound"), null, 'warnings');
|
if ($printerfound==0) setEventMessages($langs->trans("NoActivePrintingModuleFound", $langs->transnoentities("Module64000Name")), null, 'warnings');
|
||||||
} else {
|
} else {
|
||||||
setEventMessages($langs->trans("NoModuleFound"), null, 'warnings');
|
setEventMessages($langs->trans("NoModuleFound"), null, 'warnings');
|
||||||
}
|
}
|
||||||
|
|||||||
@ -9,7 +9,7 @@ PrintingDriverDesc=Configuration variables for printing driver.
|
|||||||
ListDrivers=List of drivers
|
ListDrivers=List of drivers
|
||||||
PrintTestDesc=List of Printers.
|
PrintTestDesc=List of Printers.
|
||||||
FileWasSentToPrinter=File %s was sent to printer
|
FileWasSentToPrinter=File %s was sent to printer
|
||||||
NoActivePrintingModuleFound=No active module to print document
|
NoActivePrintingModuleFound=No active driver to print document. Check setup of module %s.
|
||||||
PleaseSelectaDriverfromList=Please select a driver from list.
|
PleaseSelectaDriverfromList=Please select a driver from list.
|
||||||
PleaseConfigureDriverfromList=Please configure the selected driver from list.
|
PleaseConfigureDriverfromList=Please configure the selected driver from list.
|
||||||
SetupDriver=Driver setup
|
SetupDriver=Driver setup
|
||||||
|
|||||||
@ -9,7 +9,7 @@ PrintingDriverDesc=Paramètres de configuration pour le driver d'impression
|
|||||||
ListDrivers=Liste des drivers
|
ListDrivers=Liste des drivers
|
||||||
PrintTestDesc=Liste des imprimantes
|
PrintTestDesc=Liste des imprimantes
|
||||||
FileWasSentToPrinter=Le fichier %s a été envoyé à l'imprimante
|
FileWasSentToPrinter=Le fichier %s a été envoyé à l'imprimante
|
||||||
NoActivePrintingModuleFound=Pas de module actif pour imprimer le document
|
NoActivePrintingModuleFound=Pas de module actif pour imprimer le document. Vérifiez la configuration du module %s.
|
||||||
PleaseSelectaDriverfromList=Sélection un driver dans la liste
|
PleaseSelectaDriverfromList=Sélection un driver dans la liste
|
||||||
PleaseConfigureDriverfromList=Configurez le driver sélectionné depuis la liste
|
PleaseConfigureDriverfromList=Configurez le driver sélectionné depuis la liste
|
||||||
SetupDriver=Configuration du driver
|
SetupDriver=Configuration du driver
|
||||||
|
|||||||
@ -38,7 +38,7 @@ if (! $user->admin) accessforbidden();
|
|||||||
|
|
||||||
$action = GETPOST('action','alpha');
|
$action = GETPOST('action','alpha');
|
||||||
$mode = GETPOST('mode','alpha');
|
$mode = GETPOST('mode','alpha');
|
||||||
$value = GETPOST('value','alpha');
|
$value = GETPOST('value','alpha',0,null,null,1); // The value may be __google__docs so we force disable of replace
|
||||||
$varname = GETPOST('varname', 'alpha');
|
$varname = GETPOST('varname', 'alpha');
|
||||||
$driver = GETPOST('driver', 'alpha');
|
$driver = GETPOST('driver', 'alpha');
|
||||||
|
|
||||||
@ -123,7 +123,7 @@ if ($mode == 'setup' && $user->admin)
|
|||||||
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="setconst">';
|
print '<input type="hidden" name="action" value="setconst">';
|
||||||
|
|
||||||
dol_fiche_head($head, $mode, $langs->trans("ModuleSetup"), 0, 'technic');
|
dol_fiche_head($head, $mode, $langs->trans("ModuleSetup"), -1, 'technic');
|
||||||
|
|
||||||
print $langs->trans("PrintingDriverDesc".$driver)."<br><br>\n";
|
print $langs->trans("PrintingDriverDesc".$driver)."<br><br>\n";
|
||||||
|
|
||||||
@ -142,12 +142,12 @@ if ($mode == 'setup' && $user->admin)
|
|||||||
$classname = 'printing_'.$driver;
|
$classname = 'printing_'.$driver;
|
||||||
$langs->load($driver);
|
$langs->load($driver);
|
||||||
$printer = new $classname($db);
|
$printer = new $classname($db);
|
||||||
|
|
||||||
$i=0;
|
$i=0;
|
||||||
$submit_enabled=0;
|
$submit_enabled=0;
|
||||||
foreach ($printer->conf as $key)
|
foreach ($printer->conf as $key)
|
||||||
{
|
{
|
||||||
|
|
||||||
switch ($key['type']) {
|
switch ($key['type']) {
|
||||||
case "text":
|
case "text":
|
||||||
case "password":
|
case "password":
|
||||||
@ -191,7 +191,7 @@ if ($mode == 'setup' && $user->admin)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
$i++;
|
$i++;
|
||||||
|
|
||||||
if ($key['varname'] == 'PRINTGCP_TOKEN_ACCESS')
|
if ($key['varname'] == 'PRINTGCP_TOKEN_ACCESS')
|
||||||
{
|
{
|
||||||
// Token
|
// Token
|
||||||
@ -229,9 +229,9 @@ if ($mode == 'setup' && $user->admin)
|
|||||||
}
|
}
|
||||||
|
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
|
||||||
dol_fiche_end();
|
dol_fiche_end();
|
||||||
|
|
||||||
if (! empty($driver))
|
if (! empty($driver))
|
||||||
{
|
{
|
||||||
if ($submit_enabled) {
|
if ($submit_enabled) {
|
||||||
@ -243,7 +243,7 @@ if ($mode == 'setup' && $user->admin)
|
|||||||
}
|
}
|
||||||
if ($mode == 'config' && $user->admin)
|
if ($mode == 'config' && $user->admin)
|
||||||
{
|
{
|
||||||
dol_fiche_head($head, $mode, $langs->trans("ModuleSetup"), 0, 'technic');
|
dol_fiche_head($head, $mode, $langs->trans("ModuleSetup"), -1, 'technic');
|
||||||
|
|
||||||
print $langs->trans("PrintingDesc")."<br><br>\n";
|
print $langs->trans("PrintingDesc")."<br><br>\n";
|
||||||
|
|
||||||
@ -265,7 +265,7 @@ if ($mode == 'config' && $user->admin)
|
|||||||
$langs->load($driver);
|
$langs->load($driver);
|
||||||
$printer = new $classname($db);
|
$printer = new $classname($db);
|
||||||
//print '<pre>'.print_r($printer, true).'</pre>';
|
//print '<pre>'.print_r($printer, true).'</pre>';
|
||||||
|
|
||||||
print '<tr class="oddeven">';
|
print '<tr class="oddeven">';
|
||||||
print '<td>'.img_picto('', $printer->picto).' '.$langs->trans($printer->desc).'</td>';
|
print '<td>'.img_picto('', $printer->picto).' '.$langs->trans($printer->desc).'</td>';
|
||||||
print '<td class="center">';
|
print '<td class="center">';
|
||||||
@ -296,7 +296,7 @@ if ($mode == 'config' && $user->admin)
|
|||||||
|
|
||||||
if ($mode == 'test' && $user->admin)
|
if ($mode == 'test' && $user->admin)
|
||||||
{
|
{
|
||||||
dol_fiche_head($head, $mode, $langs->trans("ModuleSetup"), 0, 'technic');
|
dol_fiche_head($head, $mode, $langs->trans("ModuleSetup"), -1, 'technic');
|
||||||
|
|
||||||
print $langs->trans('PrintTestDesc'.$driver)."<br><br>\n";
|
print $langs->trans('PrintTestDesc'.$driver)."<br><br>\n";
|
||||||
|
|
||||||
@ -329,7 +329,7 @@ if ($mode == 'test' && $user->admin)
|
|||||||
|
|
||||||
if ($mode == 'userconf' && $user->admin)
|
if ($mode == 'userconf' && $user->admin)
|
||||||
{
|
{
|
||||||
dol_fiche_head($head, $mode, $langs->trans("ModuleSetup"), 0, 'technic');
|
dol_fiche_head($head, $mode, $langs->trans("ModuleSetup"), -1, 'technic');
|
||||||
|
|
||||||
print $langs->trans('PrintUserConfDesc'.$driver)."<br><br>\n";
|
print $langs->trans('PrintUserConfDesc'.$driver)."<br><br>\n";
|
||||||
|
|
||||||
@ -348,7 +348,7 @@ if ($mode == 'userconf' && $user->admin)
|
|||||||
$sql = 'SELECT p.rowid, p.printer_name, p.printer_location, p.printer_id, p.copy, p.module, p.driver, p.userid, u.login FROM '.MAIN_DB_PREFIX.'printing as p, '.MAIN_DB_PREFIX.'user as u WHERE p.userid=u.rowid';
|
$sql = 'SELECT p.rowid, p.printer_name, p.printer_location, p.printer_id, p.copy, p.module, p.driver, p.userid, u.login FROM '.MAIN_DB_PREFIX.'printing as p, '.MAIN_DB_PREFIX.'user as u WHERE p.userid=u.rowid';
|
||||||
$resql = $db->query($sql);
|
$resql = $db->query($sql);
|
||||||
while ($row=$db->fetch_array($resql)) {
|
while ($row=$db->fetch_array($resql)) {
|
||||||
|
|
||||||
print '<tr class="oddeven">';
|
print '<tr class="oddeven">';
|
||||||
print '<td>'.$row['login'].'</td>';
|
print '<td>'.$row['login'].'</td>';
|
||||||
print '<td>'.$row['module'].'</td>';
|
print '<td>'.$row['module'].'</td>';
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user