コード例 #1
0
ファイル: fiche.php プロジェクト: remyyounes/dolibarr
    $object = new Fichinter($db);
    if ($object->fetch($fichinterline->fk_fichinter) <= 0)
    {
        dol_print_error($db);
        exit;
    }
    $object->fetch_thirdparty();

    $desc=$_POST['np_desc'];
    $date_intervention = dol_mktime($_POST["dihour"], $_POST["dimin"], 0, $_POST["dimonth"], $_POST["diday"], $_POST["diyear"]);
    $duration = ConvertTime2Seconds($_POST['durationhour'],$_POST['durationmin']);

    $fichinterline->datei=$date_intervention;
    $fichinterline->desc=$desc;
    $fichinterline->duration=$duration;
    $result = $fichinterline->update();
    if ($result < 0)
    {
        dol_print_error($db);
        exit;
    }

    // Define output language
    $outputlangs = $langs;
    $newlang='';
    if ($conf->global->MAIN_MULTILANGS && empty($newlang) && ! empty($_REQUEST['lang_id'])) $newlang=$_REQUEST['lang_id'];
    if ($conf->global->MAIN_MULTILANGS && empty($newlang)) $newlang=$object->client->default_lang;
    if (! empty($newlang))
    {
        $outputlangs = new Translate("",$conf);
        $outputlangs->setDefaultLang($newlang);
コード例 #2
0
ファイル: card.php プロジェクト: NoisyBoy86/Dolibarr_test
     dol_print_error($db);
     exit;
 }
 $object->fetch_thirdparty();
 $desc = GETPOST('np_desc');
 $date_inter = dol_mktime(GETPOST('dihour', 'int'), GETPOST('dimin', 'int'), 0, GETPOST('dimonth', 'int'), GETPOST('diday', 'int'), GETPOST('diyear', 'int'));
 $duration = convertTime2Seconds(GETPOST('durationhour', 'int'), GETPOST('durationmin', 'int'));
 $objectline->datei = $date_inter;
 $objectline->desc = $desc;
 $objectline->duration = $duration;
 // Extrafields
 $extrafieldsline = new ExtraFields($db);
 $extralabelsline = $extrafieldsline->fetch_name_optionals_label($object->table_element_line);
 $array_options = $extrafieldsline->getOptionalsFromPost($extralabelsline);
 $objectline->array_options = $array_options;
 $result = $objectline->update($user);
 if ($result < 0) {
     dol_print_error($db);
     exit;
 }
 // Define output language
 $outputlangs = $langs;
 $newlang = '';
 if ($conf->global->MAIN_MULTILANGS && empty($newlang) && GETPOST('lang_id', 'alpha')) {
     $newlang = GETPOST('lang_id', 'alpha');
 }
 if ($conf->global->MAIN_MULTILANGS && empty($newlang)) {
     $newlang = $object->client->default_lang;
 }
 if (!empty($newlang)) {
     $outputlangs = new Translate("", $conf);
コード例 #3
0
ファイル: fiche.php プロジェクト: nrjacker4/crm-php
 if ($objectline->fetch(GETPOST('line_id', 'int')) <= 0) {
     dol_print_error($db);
     exit;
 }
 if ($object->fetch($objectline->fk_fichinter) <= 0) {
     dol_print_error($db);
     exit;
 }
 $object->fetch_thirdparty();
 $desc = GETPOST('np_desc', 'alpha');
 $date_inter = dol_mktime(GETPOST('dihour', 'int'), GETPOST('dimin', 'int'), 0, GETPOST('dimonth', 'int'), GETPOST('diday', 'int'), GETPOST('diyear', 'int'));
 $duration = convertTime2Seconds(GETPOST('durationhour', 'int'), GETPOST('durationmin', 'int'));
 $objectline->datei = $date_inter;
 $objectline->desc = $desc;
 $objectline->duration = $duration;
 $result = $objectline->update();
 if ($result < 0) {
     dol_print_error($db);
     exit;
 }
 // Define output language
 $outputlangs = $langs;
 $newlang = '';
 if ($conf->global->MAIN_MULTILANGS && empty($newlang) && GETPOST('lang_id', 'alpha')) {
     $newlang = GETPOST('lang_id', 'alpha');
 }
 if ($conf->global->MAIN_MULTILANGS && empty($newlang)) {
     $newlang = $object->client->default_lang;
 }
 if (!empty($newlang)) {
     $outputlangs = new Translate("", $conf);