Merge branch '11.0' of github.com:Dolibarr/dolibarr into 11.0
This commit is contained in:
commit
0943b13ecc
@ -243,18 +243,16 @@ if (empty($reshook))
|
|||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
||||||
|
|
||||||
$birthdate = '';
|
$birthdate = '';
|
||||||
if (isset($_POST["birthday"]) && $_POST["birthday"]
|
if (GETPOST("birthday", 'int') && GETPOST("birthmonth", 'int') && GETPOST("birthyear", 'int'))
|
||||||
&& isset($_POST["birthmonth"]) && $_POST["birthmonth"]
|
|
||||||
&& isset($_POST["birthyear"]) && $_POST["birthyear"])
|
|
||||||
{
|
{
|
||||||
$birthdate = dol_mktime(12, 0, 0, $_POST["birthmonth"], $_POST["birthday"], $_POST["birthyear"]);
|
$birthdate = dol_mktime(12, 0, 0, GETPOST("birthmonth", 'int'), GETPOST("birthday", 'int'), GETPOST("birthyear", 'int'));
|
||||||
}
|
}
|
||||||
$lastname = $_POST["lastname"];
|
$lastname = GETPOST("lastname", 'alphanohtml');
|
||||||
$firstname = $_POST["firstname"];
|
$firstname = GETPOST("firstname", 'alphanohtml');
|
||||||
$gender = $_POST["gender"];
|
$gender = GETPOST("gender", 'alphanohtml');
|
||||||
$societe = $_POST["societe"];
|
$societe = GETPOST("societe", 'alphanohtml');
|
||||||
$morphy = $_POST["morphy"];
|
$morphy = GETPOST("morphy", 'alphanohtml');
|
||||||
$login = $_POST["login"];
|
$login = GETPOST("login", 'alphanohtml');
|
||||||
if ($morphy != 'mor' && empty($lastname)) {
|
if ($morphy != 'mor' && empty($lastname)) {
|
||||||
$error++;
|
$error++;
|
||||||
$langs->load("errors");
|
$langs->load("errors");
|
||||||
@ -284,19 +282,19 @@ if (empty($reshook))
|
|||||||
$object->oldcopy = clone $object;
|
$object->oldcopy = clone $object;
|
||||||
|
|
||||||
// Change values
|
// Change values
|
||||||
$object->civility_id = trim(GETPOST("civility_id", 'alpha'));
|
$object->civility_id = trim(GETPOST("civility_id", 'alphanohtml'));
|
||||||
$object->firstname = trim(GETPOST("firstname", 'alpha'));
|
$object->firstname = trim(GETPOST("firstname", 'alphanohtml'));
|
||||||
$object->lastname = trim(GETPOST("lastname", 'alpha'));
|
$object->lastname = trim(GETPOST("lastname", 'alphanohtml'));
|
||||||
$object->gender = trim(GETPOST("gender", 'alpha'));
|
$object->gender = trim(GETPOST("gender", 'alphanohtml'));
|
||||||
$object->login = trim(GETPOST("login", 'alpha'));
|
$object->login = trim(GETPOST("login", 'alpha'));
|
||||||
$object->pass = trim(GETPOST("pass", 'alpha'));
|
$object->pass = trim(GETPOST("pass", 'alpha'));
|
||||||
|
|
||||||
$object->societe = trim(GETPOST("societe", 'alpha')); // deprecated
|
$object->societe = trim(GETPOST("societe", 'alphanohtml')); // deprecated
|
||||||
$object->company = trim(GETPOST("societe", 'alpha'));
|
$object->company = trim(GETPOST("societe", 'alphanohtml'));
|
||||||
|
|
||||||
$object->address = trim(GETPOST("address", 'alpha'));
|
$object->address = trim(GETPOST("address", 'alphanohtml'));
|
||||||
$object->zip = trim(GETPOST("zipcode", 'alpha'));
|
$object->zip = trim(GETPOST("zipcode", 'alphanohtml'));
|
||||||
$object->town = trim(GETPOST("town", 'alpha'));
|
$object->town = trim(GETPOST("town", 'alphanohtml'));
|
||||||
$object->state_id = GETPOST("state_id", 'int');
|
$object->state_id = GETPOST("state_id", 'int');
|
||||||
$object->country_id = GETPOST("country_id", 'int');
|
$object->country_id = GETPOST("country_id", 'int');
|
||||||
|
|
||||||
@ -442,14 +440,14 @@ if (empty($reshook))
|
|||||||
}
|
}
|
||||||
|
|
||||||
$typeid = GETPOST("typeid", 'int');
|
$typeid = GETPOST("typeid", 'int');
|
||||||
$civility_id = GETPOST("civility_id", 'alpha');
|
$civility_id = GETPOST("civility_id", 'alphanohtml');
|
||||||
$lastname = GETPOST("lastname", 'alpha');
|
$lastname = GETPOST("lastname", 'alphanohtml');
|
||||||
$firstname = GETPOST("firstname", 'alpha');
|
$firstname = GETPOST("firstname", 'alphanohtml');
|
||||||
$gender = GETPOST("gender", 'alpha');
|
$gender = GETPOST("gender", 'alphanohtml');
|
||||||
$societe = GETPOST("societe", 'alpha');
|
$societe = GETPOST("societe", 'alphanohtml');
|
||||||
$address = GETPOST("address", 'alpha');
|
$address = GETPOST("address", 'alphanohtml');
|
||||||
$zip = GETPOST("zipcode", 'alpha');
|
$zip = GETPOST("zipcode", 'alphanohtml');
|
||||||
$town = GETPOST("town", 'alpha');
|
$town = GETPOST("town", 'alphanohtml');
|
||||||
$state_id = GETPOST("state_id", 'int');
|
$state_id = GETPOST("state_id", 'int');
|
||||||
$country_id = GETPOST("country_id", 'int');
|
$country_id = GETPOST("country_id", 'int');
|
||||||
|
|
||||||
@ -465,9 +463,8 @@ if (empty($reshook))
|
|||||||
$pass = GETPOST("password", 'alpha');
|
$pass = GETPOST("password", 'alpha');
|
||||||
$photo = GETPOST("photo", 'alpha');
|
$photo = GETPOST("photo", 'alpha');
|
||||||
//$comment=GETPOST("comment",'none');
|
//$comment=GETPOST("comment",'none');
|
||||||
$morphy = GETPOST("morphy", 'alpha');
|
$morphy = GETPOST("morphy", 'alphanohtml');
|
||||||
$subscription = GETPOST("subscription", 'alpha');
|
$public = GETPOST("public", 'alphanohtml');
|
||||||
$public = GETPOST("public", 'alpha');
|
|
||||||
|
|
||||||
$userid = GETPOST("userid", 'int');
|
$userid = GETPOST("userid", 'int');
|
||||||
$socid = GETPOST("socid", 'int');
|
$socid = GETPOST("socid", 'int');
|
||||||
@ -976,7 +973,7 @@ else
|
|||||||
print "</td>\n";
|
print "</td>\n";
|
||||||
|
|
||||||
// Company
|
// Company
|
||||||
print '<tr><td id="tdcompany">'.$langs->trans("Company").'</td><td><input type="text" name="societe" class="minwidth300" maxlength="128" value="'.(GETPOST('societe', 'alpha') ?GETPOST('societe', 'alpha') : $object->company).'"></td></tr>';
|
print '<tr><td id="tdcompany">'.$langs->trans("Company").'</td><td><input type="text" name="societe" class="minwidth300" maxlength="128" value="'.(GETPOSTISSET('societe') ? GETPOST('societe', 'alphanohtml') : $object->company).'"></td></tr>';
|
||||||
|
|
||||||
// Civility
|
// Civility
|
||||||
print '<tr><td>'.$langs->trans("UserTitle").'</td><td>';
|
print '<tr><td>'.$langs->trans("UserTitle").'</td><td>';
|
||||||
@ -984,39 +981,39 @@ else
|
|||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
// Lastname
|
// Lastname
|
||||||
print '<tr><td id="tdlastname">'.$langs->trans("Lastname").'</td><td><input type="text" name="lastname" class="minwidth300" maxlength="50" value="'.(GETPOST('lastname', 'alpha') ?GETPOST('lastname', 'alpha') : $object->lastname).'"></td>';
|
print '<tr><td id="tdlastname">'.$langs->trans("Lastname").'</td><td><input type="text" name="lastname" class="minwidth300" maxlength="50" value="'.(GETPOSTISSET('lastname') ? GETPOST('lastname', 'alphanohtml') : $object->lastname).'"></td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
// Firstname
|
// Firstname
|
||||||
print '<tr><td id="tdfirstname">'.$langs->trans("Firstname").'</td><td><input type="text" name="firstname" class="minwidth300" maxlength="50" value="'.(GETPOST('firstname', 'alpha') ?GETPOST('firstname', 'alpha') : $object->firstname).'"></td>';
|
print '<tr><td id="tdfirstname">'.$langs->trans("Firstname").'</td><td><input type="text" name="firstname" class="minwidth300" maxlength="50" value="'.(GETPOSTISSET('firstname') ? GETPOST('firstname', 'alphanohtml') : $object->firstname).'"></td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
// Gender
|
// Gender
|
||||||
print '<tr><td>'.$langs->trans("Gender").'</td>';
|
print '<tr><td>'.$langs->trans("Gender").'</td>';
|
||||||
print '<td>';
|
print '<td>';
|
||||||
$arraygender = array('man'=>$langs->trans("Genderman"), 'woman'=>$langs->trans("Genderwoman"));
|
$arraygender = array('man'=>$langs->trans("Genderman"), 'woman'=>$langs->trans("Genderwoman"));
|
||||||
print $form->selectarray('gender', $arraygender, GETPOST('gender'), 1);
|
print $form->selectarray('gender', $arraygender, GETPOST('gender', 'alphanohtml'), 1);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// EMail
|
// EMail
|
||||||
print '<tr><td>'.img_picto('', 'object_email').' '.($conf->global->ADHERENT_MAIL_REQUIRED ? '<span class="fieldrequired">' : '').$langs->trans("EMail").($conf->global->ADHERENT_MAIL_REQUIRED ? '</span>' : '').'</td><td><input type="text" name="member_email" class="minwidth300" maxlength="255" value="'.(GETPOST('member_email', 'alpha') ?GETPOST('member_email', 'alpha') : $object->email).'"></td></tr>';
|
print '<tr><td>'.img_picto('', 'object_email').' '.($conf->global->ADHERENT_MAIL_REQUIRED ? '<span class="fieldrequired">' : '').$langs->trans("EMail").($conf->global->ADHERENT_MAIL_REQUIRED ? '</span>' : '').'</td><td><input type="text" name="member_email" class="minwidth300" maxlength="255" value="'.(GETPOSTISSET('member_email') ? GETPOST('member_email', 'alpha') : $object->email).'"></td></tr>';
|
||||||
|
|
||||||
// Address
|
// Address
|
||||||
print '<tr><td class="tdtop">'.$langs->trans("Address").'</td><td>';
|
print '<tr><td class="tdtop">'.$langs->trans("Address").'</td><td>';
|
||||||
print '<textarea name="address" wrap="soft" class="quatrevingtpercent" rows="2">'.(GETPOST('address', 'alphanohtml') ?GETPOST('address', 'alphanohtml') : $object->address).'</textarea>';
|
print '<textarea name="address" wrap="soft" class="quatrevingtpercent" rows="2">'.(GETPOSTISSET('address') ?GETPOST('address', 'alphanohtml') : $object->address).'</textarea>';
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Zip / Town
|
// Zip / Town
|
||||||
print '<tr><td>'.$langs->trans("Zip").' / '.$langs->trans("Town").'</td><td>';
|
print '<tr><td>'.$langs->trans("Zip").' / '.$langs->trans("Town").'</td><td>';
|
||||||
print $formcompany->select_ziptown((GETPOST('zipcode', 'alphanohtml') ?GETPOST('zipcode', 'alphanohtml') : $object->zip), 'zipcode', array('town', 'selectcountry_id', 'state_id'), 6);
|
print $formcompany->select_ziptown((GETPOSTISSET('zipcode') ? GETPOST('zipcode', 'alphanohtml') : $object->zip), 'zipcode', array('town', 'selectcountry_id', 'state_id'), 6);
|
||||||
print ' ';
|
print ' ';
|
||||||
print $formcompany->select_ziptown((GETPOST('town', 'alphanohtml') ?GETPOST('town', 'alphanohtml') : $object->town), 'town', array('zipcode', 'selectcountry_id', 'state_id'));
|
print $formcompany->select_ziptown((GETPOSTISSET('town') ? GETPOST('town', 'alphanohtml') : $object->town), 'town', array('zipcode', 'selectcountry_id', 'state_id'));
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Country
|
// Country
|
||||||
$object->country_id = $object->country_id ? $object->country_id : $mysoc->country_id;
|
$object->country_id = $object->country_id ? $object->country_id : $mysoc->country_id;
|
||||||
print '<tr><td width="25%">'.$langs->trans('Country').'</td><td>';
|
print '<tr><td width="25%">'.$langs->trans('Country').'</td><td>';
|
||||||
print $form->select_country(GETPOST('country_id', 'alpha') ?GETPOST('country_id', 'alpha') : $object->country_id, 'country_id');
|
print $form->select_country(GETPOSTISSET('country_id') ? GETPOST('country_id', 'alpha') : $object->country_id, 'country_id');
|
||||||
if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1);
|
if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
@ -1026,7 +1023,7 @@ else
|
|||||||
print '<tr><td>'.$langs->trans('State').'</td><td>';
|
print '<tr><td>'.$langs->trans('State').'</td><td>';
|
||||||
if ($object->country_id)
|
if ($object->country_id)
|
||||||
{
|
{
|
||||||
print $formcompany->select_state(GETPOST('state_id', 'int') ?GETPOST('state_id', 'int') : $object->state_id, $object->country_code);
|
print $formcompany->select_state(GETPOSTISSET('state_id') ? GETPOST('state_id', 'int') : $object->state_id, $object->country_code);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -1036,18 +1033,18 @@ else
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Pro phone
|
// Pro phone
|
||||||
print '<tr><td>'.img_picto('', 'object_phoning').' '.$langs->trans("PhonePro").'</td><td><input type="text" name="phone" size="20" value="'.(GETPOST('phone', 'alpha') ?GETPOST('phone', 'alpha') : $object->phone).'"></td></tr>';
|
print '<tr><td>'.img_picto('', 'object_phoning').' '.$langs->trans("PhonePro").'</td><td><input type="text" name="phone" size="20" value="'.(GETPOSTISSET('phone') ? GETPOST('phone', 'alpha') : $object->phone).'"></td></tr>';
|
||||||
|
|
||||||
// Personal phone
|
// Personal phone
|
||||||
print '<tr><td>'.img_picto('', 'object_phoning').' '.$langs->trans("PhonePerso").'</td><td><input type="text" name="phone_perso" size="20" value="'.(GETPOST('phone_perso', 'alpha') ?GETPOST('phone_perso', 'alpha') : $object->phone_perso).'"></td></tr>';
|
print '<tr><td>'.img_picto('', 'object_phoning').' '.$langs->trans("PhonePerso").'</td><td><input type="text" name="phone_perso" size="20" value="'.(GETPOSTISSET('phone_perso') ? GETPOST('phone_perso', 'alpha') : $object->phone_perso).'"></td></tr>';
|
||||||
|
|
||||||
// Mobile phone
|
// Mobile phone
|
||||||
print '<tr><td>'.img_picto('', 'object_phoning_mobile').' '.$langs->trans("PhoneMobile").'</td><td><input type="text" name="phone_mobile" size="20" value="'.(GETPOST('phone_mobile', 'alpha') ?GETPOST('phone_mobile', 'alpha') : $object->phone_mobile).'"></td></tr>';
|
print '<tr><td>'.img_picto('', 'object_phoning_mobile').' '.$langs->trans("PhoneMobile").'</td><td><input type="text" name="phone_mobile" size="20" value="'.(GETPOSTISSET('phone_mobile') ? GETPOST('phone_mobile', 'alpha') : $object->phone_mobile).'"></td></tr>';
|
||||||
|
|
||||||
if (!empty($conf->socialnetworks->enabled)) {
|
if (!empty($conf->socialnetworks->enabled)) {
|
||||||
foreach ($socialnetworks as $key => $value) {
|
foreach ($socialnetworks as $key => $value) {
|
||||||
if (!$value['active']) break;
|
if (!$value['active']) break;
|
||||||
print '<tr><td>'.$langs->trans($value['label']).'</td><td><input type="text" name="member_'.$key.'" size="40" value="'.(GETPOST('member_'.$key, 'alpha') ?GETPOST('member_'.$key, 'alpha') : $object->socialnetworks[$key]).'"></td></tr>';
|
print '<tr><td>'.$langs->trans($value['label']).'</td><td><input type="text" name="member_'.$key.'" size="40" value="'.(GETPOSTISSET('member_'.$key) ? GETPOST('member_'.$key, 'alpha') : $object->socialnetworks[$key]).'"></td></tr>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1213,27 +1210,27 @@ else
|
|||||||
print "</td></tr>";
|
print "</td></tr>";
|
||||||
|
|
||||||
// Company
|
// Company
|
||||||
print '<tr><td id="tdcompany">'.$langs->trans("Company").'</td><td><input type="text" name="societe" class="minwidth300" maxlength="128" value="'.(isset($_POST["societe"]) ?GETPOST("societe", '', 2) : $object->company).'"></td></tr>';
|
print '<tr><td id="tdcompany">'.$langs->trans("Company").'</td><td><input type="text" name="societe" class="minwidth300" maxlength="128" value="'.(GETPOSTISSET("societe") ? GETPOST("societe", 'alphanohtml', 2) : $object->company).'"></td></tr>';
|
||||||
|
|
||||||
// Civility
|
// Civility
|
||||||
print '<tr><td>'.$langs->trans("UserTitle").'</td><td>';
|
print '<tr><td>'.$langs->trans("UserTitle").'</td><td>';
|
||||||
print $formcompany->select_civility(isset($_POST["civility_id"]) ? $_POST["civility_id"] : $object->civility_id)."\n";
|
print $formcompany->select_civility(GETPOSTISSET("civility_id") ? GETPOST("civility_id", 'alpha') : $object->civility_id)."\n";
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
// Lastname
|
// Lastname
|
||||||
print '<tr><td id="tdlastname">'.$langs->trans("Lastname").'</td><td><input type="text" name="lastname" class="minwidth300" maxlength="50" value="'.(isset($_POST["lastname"]) ?GETPOST("lastname", '', 2) : $object->lastname).'"></td>';
|
print '<tr><td id="tdlastname">'.$langs->trans("Lastname").'</td><td><input type="text" name="lastname" class="minwidth300" maxlength="50" value="'.(GETPOSTISSET("lastname") ? GETPOST("lastname", 'alphanohtml', 2) : $object->lastname).'"></td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
// Firstname
|
// Firstname
|
||||||
print '<tr><td id="tdfirstname">'.$langs->trans("Firstname").'</td><td><input type="text" name="firstname" class="minwidth300" maxlength="50" value="'.(isset($_POST["firstname"]) ?GETPOST("firstname", '', 3) : $object->firstname).'"></td>';
|
print '<tr><td id="tdfirstname">'.$langs->trans("Firstname").'</td><td><input type="text" name="firstname" class="minwidth300" maxlength="50" value="'.(GETPOSTISSET("firstname") ? GETPOST("firstname", 'alphanohtml', 3) : $object->firstname).'"></td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
// Gender
|
// Gender
|
||||||
print '<tr><td>'.$langs->trans("Gender").'</td>';
|
print '<tr><td>'.$langs->trans("Gender").'</td>';
|
||||||
print '<td>';
|
print '<td>';
|
||||||
$arraygender = array('man'=>$langs->trans("Genderman"), 'woman'=>$langs->trans("Genderwoman"));
|
$arraygender = array('man'=>$langs->trans("Genderman"), 'woman'=>$langs->trans("Genderwoman"));
|
||||||
print $form->selectarray('gender', $arraygender, GETPOST('gender') ?GETPOST('gender') : $object->gender, 1);
|
print $form->selectarray('gender', $arraygender, GETPOSTISSET('gender') ? GETPOST('gender', 'alphanohtml') : $object->gender, 1);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Photo
|
// Photo
|
||||||
@ -1256,14 +1253,14 @@ else
|
|||||||
|
|
||||||
// Address
|
// Address
|
||||||
print '<tr><td>'.$langs->trans("Address").'</td><td>';
|
print '<tr><td>'.$langs->trans("Address").'</td><td>';
|
||||||
print '<textarea name="address" wrap="soft" class="quatrevingtpercent" rows="'.ROWS_2.'">'.(isset($_POST["address"]) ?GETPOST("address", '', 2) : $object->address).'</textarea>';
|
print '<textarea name="address" wrap="soft" class="quatrevingtpercent" rows="'.ROWS_2.'">'.(GETPOSTISSET("address") ? GETPOST("address", 'alphanohtml', 2) : $object->address).'</textarea>';
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Zip / Town
|
// Zip / Town
|
||||||
print '<tr><td>'.$langs->trans("Zip").' / '.$langs->trans("Town").'</td><td>';
|
print '<tr><td>'.$langs->trans("Zip").' / '.$langs->trans("Town").'</td><td>';
|
||||||
print $formcompany->select_ziptown((isset($_POST["zipcode"]) ?GETPOST("zipcode", '', 2) : $object->zip), 'zipcode', array('town', 'selectcountry_id', 'state_id'), 6);
|
print $formcompany->select_ziptown((GETPOSTISSET("zipcode") ? GETPOST("zipcode", 'alphanohtml', 2) : $object->zip), 'zipcode', array('town', 'selectcountry_id', 'state_id'), 6);
|
||||||
print ' ';
|
print ' ';
|
||||||
print $formcompany->select_ziptown((isset($_POST["town"]) ?GETPOST("town", '', 2) : $object->town), 'town', array('zipcode', 'selectcountry_id', 'state_id'));
|
print $formcompany->select_ziptown((GETPOSTISSET("town") ? GETPOST("town", 'alphanohtml', 2) : $object->town), 'town', array('zipcode', 'selectcountry_id', 'state_id'));
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Country
|
// Country
|
||||||
@ -1282,18 +1279,18 @@ else
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Pro phone
|
// Pro phone
|
||||||
print '<tr><td>'.img_picto('', 'object_phoning').' '.$langs->trans("PhonePro").'</td><td><input type="text" name="phone" size="20" value="'.(isset($_POST["phone"]) ?GETPOST("phone") : $object->phone).'"></td></tr>';
|
print '<tr><td>'.img_picto('', 'object_phoning').' '.$langs->trans("PhonePro").'</td><td><input type="text" name="phone" size="20" value="'.(GETPOSTISSET("phone") ? GETPOST("phone") : $object->phone).'"></td></tr>';
|
||||||
|
|
||||||
// Personal phone
|
// Personal phone
|
||||||
print '<tr><td>'.img_picto('', 'object_phoning').' '.$langs->trans("PhonePerso").'</td><td><input type="text" name="phone_perso" size="20" value="'.(isset($_POST["phone_perso"]) ?GETPOST("phone_perso") : $object->phone_perso).'"></td></tr>';
|
print '<tr><td>'.img_picto('', 'object_phoning').' '.$langs->trans("PhonePerso").'</td><td><input type="text" name="phone_perso" size="20" value="'.(GETPOSTISSET("phone_perso") ? GETPOST("phone_perso") : $object->phone_perso).'"></td></tr>';
|
||||||
|
|
||||||
// Mobile phone
|
// Mobile phone
|
||||||
print '<tr><td>'.img_picto('', 'object_phoning_mobile').' '.$langs->trans("PhoneMobile").'</td><td><input type="text" name="phone_mobile" size="20" value="'.(isset($_POST["phone_mobile"]) ?GETPOST("phone_mobile") : $object->phone_mobile).'"></td></tr>';
|
print '<tr><td>'.img_picto('', 'object_phoning_mobile').' '.$langs->trans("PhoneMobile").'</td><td><input type="text" name="phone_mobile" size="20" value="'.(GETPOSTISSET("phone_mobile") ? GETPOST("phone_mobile") : $object->phone_mobile).'"></td></tr>';
|
||||||
|
|
||||||
if (!empty($conf->socialnetworks->enabled)) {
|
if (!empty($conf->socialnetworks->enabled)) {
|
||||||
foreach ($socialnetworks as $key => $value) {
|
foreach ($socialnetworks as $key => $value) {
|
||||||
if (!$value['active']) break;
|
if (!$value['active']) break;
|
||||||
print '<tr><td>'.$langs->trans($value['label']).'</td><td><input type="text" name="'.$key.'" class="minwidth100" value="'.(isset($_POST[$key]) ?GETPOST($key) : $object->socialnetworks[$key]).'"></td></tr>';
|
print '<tr><td>'.$langs->trans($value['label']).'</td><td><input type="text" name="'.$key.'" class="minwidth100" value="'.(GETPOSTISSET($key) ? GETPOST($key, 'alphanohtml') : $object->socialnetworks[$key]).'"></td></tr>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1304,7 +1301,7 @@ else
|
|||||||
|
|
||||||
// Public profil
|
// Public profil
|
||||||
print "<tr><td>".$langs->trans("Public")."</td><td>\n";
|
print "<tr><td>".$langs->trans("Public")."</td><td>\n";
|
||||||
print $form->selectyesno("public", (isset($_POST["public"]) ?GETPOST("public", '', 2) : $object->public), 1);
|
print $form->selectyesno("public", (GETPOSTISSET("public") ? GETPOST("public", 'alphanohtml', 2) : $object->public), 1);
|
||||||
print "</td></tr>\n";
|
print "</td></tr>\n";
|
||||||
|
|
||||||
// Categories
|
// Categories
|
||||||
|
|||||||
@ -519,3 +519,7 @@ UPDATE llx_facturedet SET situation_percent = 100 WHERE situation_percent IS NUL
|
|||||||
-- update llx_societe set code_compta_fournisseur = concat('401', substr(code_fournisseur, 3, 2),substr(code_fournisseur, 8, 5)) where fournisseur in (1,2,3) and code_fournisseur is not null;
|
-- update llx_societe set code_compta_fournisseur = concat('401', substr(code_fournisseur, 3, 2),substr(code_fournisseur, 8, 5)) where fournisseur in (1,2,3) and code_fournisseur is not null;
|
||||||
|
|
||||||
|
|
||||||
|
-- To fix a table with error 'ERROR 1118 (42000): Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs'
|
||||||
|
--ALTER TABLE llx_tablename ROW_FORMAT=DYNAMIC;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -193,7 +193,7 @@ if (empty($reshook))
|
|||||||
{
|
{
|
||||||
$error = 0;
|
$error = 0;
|
||||||
|
|
||||||
if (!GETPOST('label'))
|
if (!GETPOST('label', 'alphanohtml'))
|
||||||
{
|
{
|
||||||
setEventMessages($langs->trans('ErrorFieldRequired', $langs->transnoentities('Label')), null, 'errors');
|
setEventMessages($langs->trans('ErrorFieldRequired', $langs->transnoentities('Label')), null, 'errors');
|
||||||
$action = "create";
|
$action = "create";
|
||||||
@ -217,8 +217,8 @@ if (empty($reshook))
|
|||||||
$units = GETPOST('units', 'int');
|
$units = GETPOST('units', 'int');
|
||||||
|
|
||||||
$object->ref = $ref;
|
$object->ref = $ref;
|
||||||
$object->label = GETPOST('label');
|
$object->label = GETPOST('label', 'alphanohtml');
|
||||||
$object->price_base_type = GETPOST('price_base_type');
|
$object->price_base_type = GETPOST('price_base_type', 'aZ09');
|
||||||
|
|
||||||
if ($object->price_base_type == 'TTC')
|
if ($object->price_base_type == 'TTC')
|
||||||
$object->price_ttc = GETPOST('price');
|
$object->price_ttc = GETPOST('price');
|
||||||
@ -293,7 +293,7 @@ if (empty($reshook))
|
|||||||
$object->url = GETPOST('url');
|
$object->url = GETPOST('url');
|
||||||
$object->note_private = dol_htmlcleanlastbr(GETPOST('note_private', 'none'));
|
$object->note_private = dol_htmlcleanlastbr(GETPOST('note_private', 'none'));
|
||||||
$object->note = $object->note_private; // deprecated
|
$object->note = $object->note_private; // deprecated
|
||||||
$object->customcode = GETPOST('customcode', 'alpha');
|
$object->customcode = GETPOST('customcode', 'alphanohtml');
|
||||||
$object->country_id = GETPOST('country_id', 'int');
|
$object->country_id = GETPOST('country_id', 'int');
|
||||||
$object->duration_value = $duration_value;
|
$object->duration_value = $duration_value;
|
||||||
$object->duration_unit = $duration_unit;
|
$object->duration_unit = $duration_unit;
|
||||||
@ -394,7 +394,7 @@ if (empty($reshook))
|
|||||||
$object->oldcopy = clone $object;
|
$object->oldcopy = clone $object;
|
||||||
|
|
||||||
$object->ref = $ref;
|
$object->ref = $ref;
|
||||||
$object->label = GETPOST('label');
|
$object->label = GETPOST('label', 'alphanohtml');
|
||||||
$object->description = dol_htmlcleanlastbr(GETPOST('desc', 'none'));
|
$object->description = dol_htmlcleanlastbr(GETPOST('desc', 'none'));
|
||||||
$object->url = GETPOST('url');
|
$object->url = GETPOST('url');
|
||||||
if (!empty($conf->global->MAIN_DISABLE_NOTES_TAB))
|
if (!empty($conf->global->MAIN_DISABLE_NOTES_TAB))
|
||||||
@ -975,7 +975,7 @@ else
|
|||||||
print '<tr>';
|
print '<tr>';
|
||||||
$tmpcode = '';
|
$tmpcode = '';
|
||||||
if (!empty($modCodeProduct->code_auto)) $tmpcode = $modCodeProduct->getNextValue($object, $type);
|
if (!empty($modCodeProduct->code_auto)) $tmpcode = $modCodeProduct->getNextValue($object, $type);
|
||||||
print '<td class="titlefieldcreate fieldrequired">'.$langs->trans("Ref").'</td><td colspan="3"><input id="ref" name="ref" class="maxwidth200" maxlength="128" value="'.dol_escape_htmltag(GETPOST('ref') ?GETPOST('ref') : $tmpcode).'">';
|
print '<td class="titlefieldcreate fieldrequired">'.$langs->trans("Ref").'</td><td colspan="3"><input id="ref" name="ref" class="maxwidth200" maxlength="128" value="'.dol_escape_htmltag(GETPOSTISSET('ref') ? GETPOST('ref', 'alphanohtml') : $tmpcode).'">';
|
||||||
if ($refalreadyexists)
|
if ($refalreadyexists)
|
||||||
{
|
{
|
||||||
print $langs->trans("RefAlreadyExists");
|
print $langs->trans("RefAlreadyExists");
|
||||||
@ -983,7 +983,7 @@ else
|
|||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Label
|
// Label
|
||||||
print '<tr><td class="fieldrequired">'.$langs->trans("Label").'</td><td colspan="3"><input name="label" class="minwidth300 maxwidth400onsmartphone" maxlength="255" value="'.dol_escape_htmltag(GETPOST('label')).'"></td></tr>';
|
print '<tr><td class="fieldrequired">'.$langs->trans("Label").'</td><td colspan="3"><input name="label" class="minwidth300 maxwidth400onsmartphone" maxlength="255" value="'.dol_escape_htmltag(GETPOST('label', 'alphanohtml')).'"></td></tr>';
|
||||||
|
|
||||||
// On sell
|
// On sell
|
||||||
print '<tr><td class="fieldrequired">'.$langs->trans("Status").' ('.$langs->trans("Sell").')</td><td colspan="3">';
|
print '<tr><td class="fieldrequired">'.$langs->trans("Status").' ('.$langs->trans("Sell").')</td><td colspan="3">';
|
||||||
|
|||||||
@ -390,23 +390,23 @@ if (empty($reshook))
|
|||||||
|
|
||||||
if (GETPOST("private", 'int') == 1) // Ask to create a contact
|
if (GETPOST("private", 'int') == 1) // Ask to create a contact
|
||||||
{
|
{
|
||||||
$object->particulier = GETPOST("private");
|
$object->particulier = GETPOST("private", 'int');
|
||||||
|
|
||||||
$object->name = dolGetFirstLastname(GETPOST('firstname', 'alpha'), GETPOST('name', 'alpha'));
|
$object->name = dolGetFirstLastname(GETPOST('firstname', 'alphanohtml'), GETPOST('name', 'alphanohtml'));
|
||||||
$object->civility_id = GETPOST('civility_id'); // Note: civility id is a code, not an int
|
$object->civility_id = GETPOST('civility_id', 'alphanohtml'); // Note: civility id is a code, not an int
|
||||||
// Add non official properties
|
// Add non official properties
|
||||||
$object->name_bis = GETPOST('name', 'alpha');
|
$object->name_bis = GETPOST('name', 'alphanohtml');
|
||||||
$object->firstname = GETPOST('firstname', 'alpha');
|
$object->firstname = GETPOST('firstname', 'alphanohtml');
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$object->name = GETPOST('name', 'alpha');
|
$object->name = GETPOST('name', 'alphanohtml');
|
||||||
}
|
}
|
||||||
$object->entity = (GETPOSTISSET('entity') ? GETPOST('entity', 'int') : $conf->entity);
|
$object->entity = (GETPOSTISSET('entity') ? GETPOST('entity', 'int') : $conf->entity);
|
||||||
$object->name_alias = GETPOST('name_alias');
|
$object->name_alias = GETPOST('name_alias', 'alphanohtml');
|
||||||
$object->address = GETPOST('address');
|
$object->address = GETPOST('address', 'alphanohtml');
|
||||||
$object->zip = GETPOST('zipcode', 'alpha');
|
$object->zip = GETPOST('zipcode', 'alphanohtml');
|
||||||
$object->town = GETPOST('town', 'alpha');
|
$object->town = GETPOST('town', 'alphanohtml');
|
||||||
$object->country_id = GETPOST('country_id', 'int');
|
$object->country_id = GETPOST('country_id', 'int');
|
||||||
$object->state_id = GETPOST('state_id', 'int');
|
$object->state_id = GETPOST('state_id', 'int');
|
||||||
//$object->skype = GETPOST('skype', 'alpha');
|
//$object->skype = GETPOST('skype', 'alpha');
|
||||||
@ -425,19 +425,19 @@ if (empty($reshook))
|
|||||||
$object->fax = GETPOST('fax', 'alpha');
|
$object->fax = GETPOST('fax', 'alpha');
|
||||||
$object->email = trim(GETPOST('email', 'custom', 0, FILTER_SANITIZE_EMAIL));
|
$object->email = trim(GETPOST('email', 'custom', 0, FILTER_SANITIZE_EMAIL));
|
||||||
$object->url = trim(GETPOST('url', 'custom', 0, FILTER_SANITIZE_URL));
|
$object->url = trim(GETPOST('url', 'custom', 0, FILTER_SANITIZE_URL));
|
||||||
$object->idprof1 = trim(GETPOST('idprof1', 'alpha'));
|
$object->idprof1 = trim(GETPOST('idprof1', 'alphanohtml'));
|
||||||
$object->idprof2 = trim(GETPOST('idprof2', 'alpha'));
|
$object->idprof2 = trim(GETPOST('idprof2', 'alphanohtml'));
|
||||||
$object->idprof3 = trim(GETPOST('idprof3', 'alpha'));
|
$object->idprof3 = trim(GETPOST('idprof3', 'alphanohtml'));
|
||||||
$object->idprof4 = trim(GETPOST('idprof4', 'alpha'));
|
$object->idprof4 = trim(GETPOST('idprof4', 'alphanohtml'));
|
||||||
$object->idprof5 = trim(GETPOST('idprof5', 'alpha'));
|
$object->idprof5 = trim(GETPOST('idprof5', 'alphanohtml'));
|
||||||
$object->idprof6 = trim(GETPOST('idprof6', 'alpha'));
|
$object->idprof6 = trim(GETPOST('idprof6', 'alphanohtml'));
|
||||||
$object->prefix_comm = GETPOST('prefix_comm', 'alpha');
|
$object->prefix_comm = GETPOST('prefix_comm', 'alphanohtml');
|
||||||
$object->code_client = GETPOSTISSET('customer_code') ?GETPOST('customer_code', 'alpha') : GETPOST('code_client', 'alpha');
|
$object->code_client = GETPOSTISSET('customer_code') ?GETPOST('customer_code', 'alpha') : GETPOST('code_client', 'alpha');
|
||||||
$object->code_fournisseur = GETPOSTISSET('supplier_code') ?GETPOST('supplier_code', 'alpha') : GETPOST('code_fournisseur', 'alpha');
|
$object->code_fournisseur = GETPOSTISSET('supplier_code') ?GETPOST('supplier_code', 'alpha') : GETPOST('code_fournisseur', 'alpha');
|
||||||
$object->capital = GETPOST('capital', 'alpha');
|
$object->capital = GETPOST('capital', 'alphanohtml');
|
||||||
$object->barcode = GETPOST('barcode', 'alpha');
|
$object->barcode = GETPOST('barcode', 'alphanohtml');
|
||||||
|
|
||||||
$object->tva_intra = GETPOST('tva_intra', 'alpha');
|
$object->tva_intra = GETPOST('tva_intra', 'alphanohtml');
|
||||||
$object->tva_assuj = GETPOST('assujtva_value', 'alpha');
|
$object->tva_assuj = GETPOST('assujtva_value', 'alpha');
|
||||||
$object->status = GETPOST('status', 'alpha');
|
$object->status = GETPOST('status', 'alpha');
|
||||||
|
|
||||||
@ -964,16 +964,16 @@ else
|
|||||||
if (GETPOST("type") == 'p') { $object->client = 2; }
|
if (GETPOST("type") == 'p') { $object->client = 2; }
|
||||||
if (!empty($conf->fournisseur->enabled) && (GETPOST("type") == 'f' || (GETPOST("type") == '' && !empty($conf->global->THIRDPARTY_SUPPLIER_BY_DEFAULT)))) { $object->fournisseur = 1; }
|
if (!empty($conf->fournisseur->enabled) && (GETPOST("type") == 'f' || (GETPOST("type") == '' && !empty($conf->global->THIRDPARTY_SUPPLIER_BY_DEFAULT)))) { $object->fournisseur = 1; }
|
||||||
|
|
||||||
$object->name = GETPOST('name', 'alpha');
|
$object->name = GETPOST('name', 'alphanohtml');
|
||||||
$object->name_alias = GETPOST('name_alias', 'alpha');
|
$object->name_alias = GETPOST('name_alias', 'alphanohtml');
|
||||||
$object->firstname = GETPOST('firstname', 'alpha');
|
$object->firstname = GETPOST('firstname', 'alphanohtml');
|
||||||
$object->particulier = $private;
|
$object->particulier = $private;
|
||||||
$object->prefix_comm = GETPOST('prefix_comm', 'alpha');
|
$object->prefix_comm = GETPOST('prefix_comm', 'alphanohtml');
|
||||||
$object->client = GETPOST('client', 'int') ?GETPOST('client', 'int') : $object->client;
|
$object->client = GETPOST('client', 'int') ?GETPOST('client', 'int') : $object->client;
|
||||||
|
|
||||||
if (empty($duplicate_code_error)) {
|
if (empty($duplicate_code_error)) {
|
||||||
$object->code_client = GETPOST('customer_code', 'alpha');
|
$object->code_client = GETPOST('customer_code', 'alpha');
|
||||||
$object->fournisseur = GETPOST('fournisseur') ?GETPOST('fournisseur') : $object->fournisseur;
|
$object->fournisseur = GETPOST('fournisseur') ? GETPOST('fournisseur', 'int') : $object->fournisseur;
|
||||||
$object->code_fournisseur = GETPOST('supplier_code', 'alpha');
|
$object->code_fournisseur = GETPOST('supplier_code', 'alpha');
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@ -981,9 +981,9 @@ else
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
$object->address = GETPOST('address', 'alpha');
|
$object->address = GETPOST('address', 'alphanohtml');
|
||||||
$object->zip = GETPOST('zipcode', 'alpha');
|
$object->zip = GETPOST('zipcode', 'alphanohtml');
|
||||||
$object->town = GETPOST('town', 'alpha');
|
$object->town = GETPOST('town', 'alphanohtml');
|
||||||
$object->state_id = GETPOST('state_id', 'int');
|
$object->state_id = GETPOST('state_id', 'int');
|
||||||
//$object->skype = GETPOST('skype', 'alpha');
|
//$object->skype = GETPOST('skype', 'alpha');
|
||||||
//$object->twitter = GETPOST('twitter', 'alpha');
|
//$object->twitter = GETPOST('twitter', 'alpha');
|
||||||
@ -1001,14 +1001,14 @@ else
|
|||||||
$object->fax = GETPOST('fax', 'alpha');
|
$object->fax = GETPOST('fax', 'alpha');
|
||||||
$object->email = GETPOST('email', 'custom', 0, FILTER_SANITIZE_EMAIL);
|
$object->email = GETPOST('email', 'custom', 0, FILTER_SANITIZE_EMAIL);
|
||||||
$object->url = GETPOST('url', 'custom', 0, FILTER_SANITIZE_URL);
|
$object->url = GETPOST('url', 'custom', 0, FILTER_SANITIZE_URL);
|
||||||
$object->capital = GETPOST('capital', 'alpha');
|
$object->capital = GETPOST('capital', 'alphanohtml');
|
||||||
$object->barcode = GETPOST('barcode', 'alpha');
|
$object->barcode = GETPOST('barcode', 'alphanohtml');
|
||||||
$object->idprof1 = GETPOST('idprof1', 'alpha');
|
$object->idprof1 = GETPOST('idprof1', 'alphanohtml');
|
||||||
$object->idprof2 = GETPOST('idprof2', 'alpha');
|
$object->idprof2 = GETPOST('idprof2', 'alphanohtml');
|
||||||
$object->idprof3 = GETPOST('idprof3', 'alpha');
|
$object->idprof3 = GETPOST('idprof3', 'alphanohtml');
|
||||||
$object->idprof4 = GETPOST('idprof4', 'alpha');
|
$object->idprof4 = GETPOST('idprof4', 'alphanohtml');
|
||||||
$object->idprof5 = GETPOST('idprof5', 'alpha');
|
$object->idprof5 = GETPOST('idprof5', 'alphanohtml');
|
||||||
$object->idprof6 = GETPOST('idprof6', 'alpha');
|
$object->idprof6 = GETPOST('idprof6', 'alphanohtml');
|
||||||
$object->typent_id = GETPOST('typent_id', 'int');
|
$object->typent_id = GETPOST('typent_id', 'int');
|
||||||
$object->effectif_id = GETPOST('effectif_id', 'int');
|
$object->effectif_id = GETPOST('effectif_id', 'int');
|
||||||
$object->civility_id = GETPOST('civility_id', 'alpha');
|
$object->civility_id = GETPOST('civility_id', 'alpha');
|
||||||
@ -1023,7 +1023,7 @@ else
|
|||||||
$object->localtax1_value = GETPOST('lt1', 'int');
|
$object->localtax1_value = GETPOST('lt1', 'int');
|
||||||
$object->localtax2_value = GETPOST('lt2', 'int');
|
$object->localtax2_value = GETPOST('lt2', 'int');
|
||||||
|
|
||||||
$object->tva_intra = GETPOST('tva_intra', 'alpha');
|
$object->tva_intra = GETPOST('tva_intra', 'alphanohtml');
|
||||||
|
|
||||||
$object->commercial_id = GETPOST('commercial_id', 'int');
|
$object->commercial_id = GETPOST('commercial_id', 'int');
|
||||||
$object->default_lang = GETPOST('default_lang');
|
$object->default_lang = GETPOST('default_lang');
|
||||||
@ -1651,15 +1651,15 @@ else
|
|||||||
if (GETPOSTISSET('name'))
|
if (GETPOSTISSET('name'))
|
||||||
{
|
{
|
||||||
// We overwrite with values if posted
|
// We overwrite with values if posted
|
||||||
$object->name = GETPOST('name', 'alpha');
|
$object->name = GETPOST('name', 'alphanohtml');
|
||||||
$object->prefix_comm = GETPOST('prefix_comm', 'alpha');
|
$object->prefix_comm = GETPOST('prefix_comm', 'alphanohtml');
|
||||||
$object->client = GETPOST('client', 'int');
|
$object->client = GETPOST('client', 'int');
|
||||||
$object->code_client = GETPOST('customer_code', 'alpha');
|
$object->code_client = GETPOST('customer_code', 'alpha');
|
||||||
$object->fournisseur = GETPOST('fournisseur', 'int');
|
$object->fournisseur = GETPOST('fournisseur', 'int');
|
||||||
$object->code_fournisseur = GETPOST('supplier_code', 'alpha');
|
$object->code_fournisseur = GETPOST('supplier_code', 'alpha');
|
||||||
$object->address = GETPOST('address', 'alpha');
|
$object->address = GETPOST('address', 'alphanohtml');
|
||||||
$object->zip = GETPOST('zipcode', 'alpha');
|
$object->zip = GETPOST('zipcode', 'alphanohtml');
|
||||||
$object->town = GETPOST('town', 'alpha');
|
$object->town = GETPOST('town', 'alphanohtml');
|
||||||
$object->country_id = GETPOST('country_id') ?GETPOST('country_id', 'int') : $mysoc->country_id;
|
$object->country_id = GETPOST('country_id') ?GETPOST('country_id', 'int') : $mysoc->country_id;
|
||||||
$object->state_id = GETPOST('state_id', 'int');
|
$object->state_id = GETPOST('state_id', 'int');
|
||||||
//$object->skype = GETPOST('skype', 'alpha');
|
//$object->skype = GETPOST('skype', 'alpha');
|
||||||
@ -1678,21 +1678,21 @@ else
|
|||||||
$object->fax = GETPOST('fax', 'alpha');
|
$object->fax = GETPOST('fax', 'alpha');
|
||||||
$object->email = GETPOST('email', 'custom', 0, FILTER_SANITIZE_EMAIL);
|
$object->email = GETPOST('email', 'custom', 0, FILTER_SANITIZE_EMAIL);
|
||||||
$object->url = GETPOST('url', 'custom', 0, FILTER_SANITIZE_URL);
|
$object->url = GETPOST('url', 'custom', 0, FILTER_SANITIZE_URL);
|
||||||
$object->capital = GETPOST('capital', 'alpha');
|
$object->capital = GETPOST('capital', 'alphanohtml');
|
||||||
$object->idprof1 = GETPOST('idprof1', 'alpha');
|
$object->idprof1 = GETPOST('idprof1', 'alphanohtml');
|
||||||
$object->idprof2 = GETPOST('idprof2', 'alpha');
|
$object->idprof2 = GETPOST('idprof2', 'alphanohtml');
|
||||||
$object->idprof3 = GETPOST('idprof3', 'alpha');
|
$object->idprof3 = GETPOST('idprof3', 'alphanohtml');
|
||||||
$object->idprof4 = GETPOST('idprof4', 'alpha');
|
$object->idprof4 = GETPOST('idprof4', 'alphanohtml');
|
||||||
$object->idprof5 = GETPOST('idprof5', 'alpha');
|
$object->idprof5 = GETPOST('idprof5', 'alphanohtml');
|
||||||
$object->idprof6 = GETPOST('idprof6', 'alpha');
|
$object->idprof6 = GETPOST('idprof6', 'alphanohtml');
|
||||||
$object->typent_id = GETPOST('typent_id', 'int');
|
$object->typent_id = GETPOST('typent_id', 'int');
|
||||||
$object->effectif_id = GETPOST('effectif_id', 'int');
|
$object->effectif_id = GETPOST('effectif_id', 'int');
|
||||||
$object->barcode = GETPOST('barcode', 'alpha');
|
$object->barcode = GETPOST('barcode', 'alphanohtml');
|
||||||
$object->forme_juridique_code = GETPOST('forme_juridique_code', 'int');
|
$object->forme_juridique_code = GETPOST('forme_juridique_code', 'int');
|
||||||
$object->default_lang = GETPOST('default_lang', 'alpha');
|
$object->default_lang = GETPOST('default_lang', 'alpha');
|
||||||
|
|
||||||
$object->tva_assuj = GETPOST('assujtva_value', 'int');
|
$object->tva_assuj = GETPOST('assujtva_value', 'int');
|
||||||
$object->tva_intra = GETPOST('tva_intra', 'alpha');
|
$object->tva_intra = GETPOST('tva_intra', 'alphanohtml');
|
||||||
$object->status = GETPOST('status', 'int');
|
$object->status = GETPOST('status', 'int');
|
||||||
|
|
||||||
// Webservices url/key
|
// Webservices url/key
|
||||||
|
|||||||
@ -129,11 +129,11 @@ if ($cancel)
|
|||||||
if (GETPOST('add', 'alpha') && $user->rights->ticket->write) {
|
if (GETPOST('add', 'alpha') && $user->rights->ticket->write) {
|
||||||
$error = 0;
|
$error = 0;
|
||||||
|
|
||||||
if (!GETPOST("subject", 'alpha')) {
|
if (!GETPOST("subject", 'alphanohtml')) {
|
||||||
$error++;
|
$error++;
|
||||||
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("Subject")), null, 'errors');
|
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("Subject")), null, 'errors');
|
||||||
$action = 'create';
|
$action = 'create';
|
||||||
} elseif (!GETPOST("message", 'alpha')) {
|
} elseif (!GETPOST("message", 'restricthtml')) {
|
||||||
$error++;
|
$error++;
|
||||||
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("Message")), null, 'errors');
|
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("Message")), null, 'errors');
|
||||||
$action = 'create';
|
$action = 'create';
|
||||||
@ -142,10 +142,10 @@ if (GETPOST('add', 'alpha') && $user->rights->ticket->write) {
|
|||||||
if (!$error) {
|
if (!$error) {
|
||||||
$db->begin();
|
$db->begin();
|
||||||
|
|
||||||
$object->ref = GETPOST("ref", 'alpha');
|
$object->ref = GETPOST("ref", 'alphanohtml');
|
||||||
$object->fk_soc = GETPOST("socid", 'int') > 0 ? GETPOST("socid", 'int') : 0;
|
$object->fk_soc = GETPOST("socid", 'int') > 0 ? GETPOST("socid", 'int') : 0;
|
||||||
$object->subject = GETPOST("subject", 'alpha');
|
$object->subject = GETPOST("subject", 'alphanohtml');
|
||||||
$object->message = GETPOST("message", 'none');
|
$object->message = GETPOST("message", 'restricthtml');
|
||||||
|
|
||||||
$object->type_code = GETPOST("type_code", 'alpha');
|
$object->type_code = GETPOST("type_code", 'alpha');
|
||||||
$object->category_code = GETPOST("category_code", 'alpha');
|
$object->category_code = GETPOST("category_code", 'alpha');
|
||||||
@ -274,7 +274,7 @@ if (GETPOST('update', 'alpha') && GETPOST('id', 'int') && $user->rights->ticket-
|
|||||||
$error++;
|
$error++;
|
||||||
array_push($object->errors, $langs->trans("ErrorFieldRequired", $langs->transnoentities("Label")));
|
array_push($object->errors, $langs->trans("ErrorFieldRequired", $langs->transnoentities("Label")));
|
||||||
$action = 'edit';
|
$action = 'edit';
|
||||||
} elseif (!GETPOST("subject")) {
|
} elseif (!GETPOST("subject", 'alphanohtml')) {
|
||||||
$error++;
|
$error++;
|
||||||
array_push($object->errors, $langs->trans("ErrorFieldRequired", $langs->transnoentities("Subject")));
|
array_push($object->errors, $langs->trans("ErrorFieldRequired", $langs->transnoentities("Subject")));
|
||||||
$action = 'edit';
|
$action = 'edit';
|
||||||
@ -284,7 +284,7 @@ if (GETPOST('update', 'alpha') && GETPOST('id', 'int') && $user->rights->ticket-
|
|||||||
$db->begin();
|
$db->begin();
|
||||||
|
|
||||||
$object->label = GETPOST("label", 'alphanohtml');
|
$object->label = GETPOST("label", 'alphanohtml');
|
||||||
$object->description = GETPOST("description", 'none');
|
$object->description = GETPOST("description", 'restricthtml');
|
||||||
|
|
||||||
//...
|
//...
|
||||||
$ret = $object->update($user);
|
$ret = $object->update($user);
|
||||||
@ -459,7 +459,7 @@ if ($action == 'set_progression' && $user->rights->ticket->write) {
|
|||||||
if ($action == 'setsubject') {
|
if ($action == 'setsubject') {
|
||||||
if ($object->fetch(GETPOST('id', 'int'))) {
|
if ($object->fetch(GETPOST('id', 'int'))) {
|
||||||
if ($action == 'setsubject') {
|
if ($action == 'setsubject') {
|
||||||
$object->subject = trim(GETPOST('subject', 'alpha'));
|
$object->subject = trim(GETPOST('subject', 'alphanohtml'));
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($action == 'setsubject' && empty($object->subject)) {
|
if ($action == 'setsubject' && empty($object->subject)) {
|
||||||
@ -512,7 +512,7 @@ elseif ($action == 'setcontract' && $user->rights->ticket->write) {
|
|||||||
if (!GETPOST('cancel')) {
|
if (!GETPOST('cancel')) {
|
||||||
$object->fetch('', '', GETPOST('track_id', 'alpha'));
|
$object->fetch('', '', GETPOST('track_id', 'alpha'));
|
||||||
$oldvalue_message = $object->message;
|
$oldvalue_message = $object->message;
|
||||||
$fieldtomodify = GETPOST('message_initial');
|
$fieldtomodify = GETPOST('message_initial', 'restricthtml');
|
||||||
|
|
||||||
$object->message = $fieldtomodify;
|
$object->message = $fieldtomodify;
|
||||||
$ret = $object->update($user);
|
$ret = $object->update($user);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user