forked from Wavyzz/dolibarr
clean and update code
This commit is contained in:
@@ -25,12 +25,8 @@
|
||||
require '../main.inc.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
|
||||
|
||||
$langs->load("companies");
|
||||
$langs->load("products");
|
||||
$langs->load("admin");
|
||||
$langs->load("sms");
|
||||
$langs->load("other");
|
||||
$langs->load("errors");
|
||||
// Load traductions files requiredby by page
|
||||
$langs->loadLangs(array("companies","admin","products","sms","other","errors"));
|
||||
|
||||
if (!$user->admin)
|
||||
accessforbidden();
|
||||
@@ -169,30 +165,25 @@ if ($action == 'edit')
|
||||
print '<input type="hidden" name="action" value="update">';
|
||||
|
||||
clearstatcache();
|
||||
$var=true;
|
||||
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre"><td>'.$langs->trans("Parameter").'</td><td>'.$langs->trans("Value").'</td></tr>';
|
||||
|
||||
// Disable
|
||||
|
||||
// Disable
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("MAIN_DISABLE_ALL_SMS").'</td><td>';
|
||||
print $form->selectyesno('MAIN_DISABLE_ALL_SMS',$conf->global->MAIN_DISABLE_ALL_SMS,1);
|
||||
print '</td></tr>';
|
||||
|
||||
// Separator
|
||||
|
||||
// Separator
|
||||
print '<tr class="oddeven"><td colspan="2"> </td></tr>';
|
||||
|
||||
// Method
|
||||
|
||||
// Method
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("MAIN_SMS_SENDMODE").'</td><td>';
|
||||
if (count($listofmethods)) print $form->selectarray('MAIN_SMS_SENDMODE',$listofmethods,$conf->global->MAIN_SMS_SENDMODE,1);
|
||||
else print '<font class="error">'.$langs->trans("None").'</font>';
|
||||
print '</td></tr>';
|
||||
|
||||
// From
|
||||
|
||||
// From
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("MAIN_MAIL_SMS_FROM",$langs->transnoentities("Undefined")).'</td>';
|
||||
print '<td><input class="flat" name="MAIN_MAIL_SMS_FROM" size="32" value="' . $conf->global->MAIN_MAIL_SMS_FROM;
|
||||
print '"></td></tr>';
|
||||
@@ -216,31 +207,26 @@ if ($action == 'edit')
|
||||
}
|
||||
else
|
||||
{
|
||||
$var=true;
|
||||
|
||||
if (! count($listofmethods)) print '<div class="warning">'.$langs->trans("NoSmsEngine",'<a target="_blank" href="http://www.dolistore.com/search.php?orderby=position&orderway=desc&search_query=smsmanager">DoliStore</a>').'</div>';
|
||||
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre"><td>'.$langs->trans("Parameter").'</td><td>'.$langs->trans("Value").'</td></tr>';
|
||||
|
||||
// Disable
|
||||
|
||||
// Disable
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("MAIN_DISABLE_ALL_SMS").'</td><td>'.yn($conf->global->MAIN_DISABLE_ALL_SMS).'</td></tr>';
|
||||
|
||||
// Separator
|
||||
|
||||
// Separator
|
||||
print '<tr class="oddeven"><td colspan="2"> </td></tr>';
|
||||
|
||||
// Method
|
||||
|
||||
// Method
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("MAIN_SMS_SENDMODE").'</td><td>';
|
||||
$text=$listofmethods[$conf->global->MAIN_SMS_SENDMODE];
|
||||
if (empty($text)) $text=$langs->trans("Undefined").' '.img_warning();
|
||||
print $text;
|
||||
print '</td></tr>';
|
||||
|
||||
// From
|
||||
|
||||
// From
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("MAIN_MAIL_SMS_FROM",$langs->transnoentities("Undefined")).'</td>';
|
||||
print '<td>'.$conf->global->MAIN_MAIL_SMS_FROM;
|
||||
if (!empty($conf->global->MAIN_MAIL_SMS_FROM) && ! isValidPhone($conf->global->MAIN_MAIL_SMS_FROM)) print ' '.img_warning($langs->trans("ErrorBadPhone"));
|
||||
|
||||
Reference in New Issue
Block a user