当前位置: 首页>>代码示例>>PHP>>正文


PHP dol_mktime函数代码示例

本文整理汇总了PHP中dol_mktime函数的典型用法代码示例。如果您正苦于以下问题:PHP dol_mktime函数的具体用法?PHP dol_mktime怎么用?PHP dol_mktime使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了dol_mktime函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: update

 static function update(&$PDOdb, $id_charge, $periode, $date_fin_rec, $nb_previsionnel, $montant)
 {
     global $db;
     if (!empty($date_fin_rec) && !preg_match('/([0-9]{2}[\\/-]?){2}([0-9]{4})/', $date_fin_rec)) {
         return false;
     }
     if ($nb_previsionnel < 0) {
         return false;
     }
     $recurrence = self::get_recurrence($PDOdb, $id_charge);
     $recurrence->fk_chargesociale = $id_charge;
     $recurrence->periode = $periode;
     $recurrence->nb_previsionnel = $nb_previsionnel;
     $recurrence->montant = $montant;
     if (!empty($date_fin_rec)) {
         $date = explode('/', $date_fin_rec);
         // $recurrence->date_fin je dirais que c'est déjà init
         $recurrence->date_fin = dol_mktime(0, 0, 0, $date[1], $date[0], $date[2]);
     } else {
         $recurrence->date_fin = null;
     }
     $recurrence->save($PDOdb);
     $message = 'Récurrence de la charge sociale ' . $id_charge . ' enregistrée. (' . TRecurrence::$TPeriodes[$periode] . ')';
     setEventMessage($message);
     $task = new TCronRecurrence($db);
     $task->run();
     return true;
 }
开发者ID:ATM-Consulting,项目名称:dolibarr_module_recurence,代码行数:28,代码来源:recurrence.class.php

示例2: _priceUpdateDolibarr

function _priceUpdateDolibarr(&$db, &$conf, &$langs)
{
    dol_include_once('/product/class/product.class.php');
    $error = 0;
    $fk_category = GETPOST('fk_category', 'int');
    $tms = dol_mktime(GETPOST('tmshour', 'int'), GETPOST('tmsmin', 'int'), 0, GETPOST('tmsmonth', 'int'), GETPOST('tmsday', 'int'), GETPOST('tmsyear', 'int'));
    $percentage = (double) GETPOST('percentage');
    if ($fk_category <= -1) {
        setEventMessages($langs->trans('ErrorFieldRequired', $langs->transnoentities('quickpriceupdate_category_required')), null, 'errors');
        $error++;
    }
    if ($tms == '') {
        setEventMessages($langs->trans('ErrorFieldRequired', $langs->transnoentities('quickpriceupdate_date_required')), null, 'errors');
        $error++;
    }
    if (!$error && $percentage != 0) {
        $tms = date('Y-m-d H:i:00', $tms);
        _priceUpdateDolibarrAction($db, $conf, $langs, $fk_category, $tms, $percentage);
    }
}
开发者ID:ATM-Consulting,项目名称:dolibarr_module_quickpriceupdate,代码行数:20,代码来源:quickpriceupdate.lib.php

示例3: getOptionalsFromPost

 /**
  * return array_options array for object by extrafields value (using for data send by forms)
  *
  * @param  array   $extralabels    $array of extrafields
  * @param  string  $keyprefix      Prefix string to add into name and id of field (can be used to avoid duplicate names)
  * @param  string  $keysuffix      Suffix string to add into name and id of field (can be used to avoid duplicate names)
  * @return int                     1 if array_options set / 0 if no value
  */
 function getOptionalsFromPost($extralabels, $keyprefix = '', $keysuffix = '')
 {
     global $_POST;
     $array_options = array();
     if (is_array($extralabels)) {
         // Get extra fields
         foreach ($extralabels as $key => $value) {
             $key_type = $this->attribute_type[$key];
             if (in_array($key_type, array('date', 'datetime'))) {
                 // Clean parameters
                 $value_key = dol_mktime($_POST[$keysuffix . "options_" . $key . $keyprefix . "hour"], $_POST[$keysuffix . "options_" . $key . $keyprefix . "min"], 0, $_POST[$keysuffix . "options_" . $key . $keyprefix . "month"], $_POST[$keysuffix . "options_" . $key . $keyprefix . "day"], $_POST[$keysuffix . "options_" . $key . $keyprefix . "year"]);
             } else {
                 if (in_array($key_type, array('checkbox'))) {
                     $value_arr = GETPOST($keysuffix . "options_" . $key . $keyprefix);
                     // Make sure we get an array even if there's only one checkbox
                     $value_arr = (array) $value_arr;
                     $value_key = implode(',', $value_arr);
                 } else {
                     if (in_array($key_type, array('price', 'double'))) {
                         $value_arr = GETPOST($keysuffix . "options_" . $key . $keyprefix);
                         $value_key = price2num($value_arr);
                     } else {
                         $value_key = GETPOST($keysuffix . "options_" . $key . $keyprefix);
                     }
                 }
             }
             $array_options[$keysuffix . "options_" . $key] = $value_key;
             // No keyprefix here. keyprefix is used only for read.
         }
         return $array_options;
     } else {
         return 0;
     }
 }
开发者ID:Samara94,项目名称:dolibarr,代码行数:42,代码来源:extrafields.class.php

示例4: dol_get_first_day_week

/**	Return first day of week for a date
 *
 *	@param		int		$day		Day
 * 	@param		int		$month		Month
 *  @param		int		$year		Year
 * 	@param		int		$gm			False = Return date to compare with server TZ, True to compare with GM date.
 *	@return		array				year,month, week,first_day,prev_year,prev_month,prev_day
 */
function dol_get_first_day_week($day, $month, $year, $gm = false)
{
    global $conf;
    $date = dol_mktime(0, 0, 0, $month, $day, $year, $gm);
    //Checking conf of start week
    $start_week = isset($conf->global->MAIN_START_WEEK) ? $conf->global->MAIN_START_WEEK : 1;
    $tmparray = dol_getdate($date, true);
    //Calculate days to count
    $days = $start_week - $tmparray['wday'];
    if ($days >= 1) {
        $days = 7 - $days;
    }
    $days = abs($days);
    $seconds = $days * 24 * 60 * 60;
    //Get first day of week
    $tmpday = date($tmparray[0]) - $seconds;
    $tmpday = date("d", $tmpday);
    //Check first day of week is form this month or not
    if ($tmpday > $day) {
        $prev_month = $month - 1;
        $prev_year = $year;
        if ($prev_month == 0) {
            $prev_month = 12;
            $prev_year = $year - 1;
        }
    } else {
        $prev_month = $month;
        $prev_year = $year;
    }
    //Get first day of next week
    $tmptime = dol_mktime(12, 0, 0, $month, $tmpday, $year, 1, 0);
    $tmptime -= 24 * 60 * 60 * 7;
    $tmparray = dol_getdate($tmptime, true);
    $prev_day = $tmparray['mday'];
    //Check first day of week is form this month or not
    if ($prev_day > $tmpday) {
        $prev_month = $month - 1;
        $prev_year = $year;
        if ($prev_month == 0) {
            $prev_month = 12;
            $prev_year = $year - 1;
        }
    }
    $week = date("W", dol_mktime(0, 0, 0, $month, $tmpday, $year, $gm));
    return array('year' => $year, 'month' => $month, 'week' => $week, 'first_day' => $tmpday, 'prev_year' => $prev_year, 'prev_month' => $prev_month, 'prev_day' => $prev_day);
}
开发者ID:nrjacker4,项目名称:crm-php,代码行数:54,代码来源:date.lib.php

示例5: createFromClone

 /**	Load an object from its id and create a new one in database
  *
  *	@param	int		$fromid     			Id of object to clone
  *  @param	int		$project_id				Id of project to attach clone task
  *  @param	int		$parent_task_id			Id of task to attach clone task
  *  @param	bool	$clone_change_dt		recalculate date of task regarding new project start date
  *	@param	bool	$clone_affectation		clone affectation of project
  *	@param	bool	$clone_time				clone time of project
  *	@param	bool	$clone_file				clone file of project
  *  @param	bool	$clone_note				clone note of project
  *	@param	bool	$clone_prog				clone progress of project
  * 	@return	int								New id of clone
  */
 function createFromClone($fromid, $project_id, $parent_task_id, $clone_change_dt = false, $clone_affectation = false, $clone_time = false, $clone_file = false, $clone_note = false, $clone_prog = false)
 {
     global $user, $langs, $conf;
     $error = 0;
     //Use 00:00 of today if time is use on task.
     $now = dol_mktime(0, 0, 0, dol_print_date(dol_now(), '%m'), dol_print_date(dol_now(), '%d'), dol_print_date(dol_now(), '%Y'));
     $datec = $now;
     $clone_task = new Task($this->db);
     $origin_task = new Task($this->db);
     $clone_task->context['createfromclone'] = 'createfromclone';
     $this->db->begin();
     // Load source object
     $clone_task->fetch($fromid);
     $origin_task->fetch($fromid);
     $defaultref = '';
     $obj = empty($conf->global->PROJECT_TASK_ADDON) ? 'mod_task_simple' : $conf->global->PROJECT_TASK_ADDON;
     if (!empty($conf->global->PROJECT_TASK_ADDON) && is_readable(DOL_DOCUMENT_ROOT . "/core/modules/project/task/" . $conf->global->PROJECT_TASK_ADDON . ".php")) {
         require_once DOL_DOCUMENT_ROOT . "/core/modules/project/task/" . $conf->global->PROJECT_TASK_ADDON . '.php';
         $modTask = new $obj();
         $defaultref = $modTask->getNextValue(0, $clone_task);
     }
     $ori_project_id = $clone_task->fk_project;
     $clone_task->id = 0;
     $clone_task->ref = $defaultref;
     $clone_task->fk_project = $project_id;
     $clone_task->fk_task_parent = $parent_task_id;
     $clone_task->date_c = $datec;
     $clone_task->planned_workload = $origin_task->planned_workload;
     $clone_task->rang = $origin_task->rang;
     //Manage Task Date
     if ($clone_change_dt) {
         $projectstatic = new Project($this->db);
         $projectstatic->fetch($ori_project_id);
         //Origin project strat date
         $orign_project_dt_start = $projectstatic->date_start;
         //Calcultate new task start date with difference between origin proj start date and origin task start date
         if (!empty($clone_task->date_start)) {
             $clone_task->date_start = $now + $clone_task->date_start - $orign_project_dt_start;
         }
         //Calcultate new task end date with difference between origin proj end date and origin task end date
         if (!empty($clone_task->date_end)) {
             $clone_task->date_end = $now + $clone_task->date_end - $orign_project_dt_start;
         }
     }
     if (!$clone_prog) {
         $clone_task->progress = 0;
     }
     // Create clone
     $result = $clone_task->create($user);
     // Other options
     if ($result < 0) {
         $this->error = $clone_task->error;
         $error++;
     }
     // End
     if (!$error) {
         $clone_task_id = $clone_task->id;
         $clone_task_ref = $clone_task->ref;
         //Note Update
         if (!$clone_note) {
             $clone_task->note_private = '';
             $clone_task->note_public = '';
         } else {
             $this->db->begin();
             $res = $clone_task->update_note(dol_html_entity_decode($clone_task->note_public, ENT_QUOTES), '_public');
             if ($res < 0) {
                 $this->error .= $clone_task->error;
                 $error++;
                 $this->db->rollback();
             } else {
                 $this->db->commit();
             }
             $this->db->begin();
             $res = $clone_task->update_note(dol_html_entity_decode($clone_task->note_private, ENT_QUOTES), '_private');
             if ($res < 0) {
                 $this->error .= $clone_task->error;
                 $error++;
                 $this->db->rollback();
             } else {
                 $this->db->commit();
             }
         }
         //Duplicate file
         if ($clone_file) {
             require_once DOL_DOCUMENT_ROOT . '/core/lib/files.lib.php';
             //retreive project origin ref to know folder to copy
             $projectstatic = new Project($this->db);
//.........这里部分代码省略.........
开发者ID:Samara94,项目名称:dolibarr,代码行数:101,代码来源:task.class.php

示例6: dol_escape_htmltag

 // Third party
 print '<td class="liste_titre">';
 print '<input type="text" class="flat" size="12" name="search_name" value="' . dol_escape_htmltag($search_name) . '">';
 print '</td>';
 print '<td class="liste_titre" align="center">';
 $arrayofoperators = array('<' => '<', '>' => '>');
 print $form->selectarray('filter_op1', $arrayofoperators, $filter_op1, 1);
 print ' ';
 $filter_date1 = dol_mktime(0, 0, 0, $op1month, $op1day, $op1year);
 print $form->select_date($filter_date1, 'op1', 0, 0, 1, '', 1, 0, 1);
 print '</td>';
 print '<td class="liste_titre" align="center">';
 $arrayofoperators = array('<' => '<', '>' => '>');
 print $form->selectarray('filter_op2', $arrayofoperators, $filter_op2, 1);
 print ' ';
 $filter_date2 = dol_mktime(0, 0, 0, $op2month, $op2day, $op2year);
 print $form->select_date($filter_date2, 'op2', 0, 0, 1, '', 1, 0, 1);
 print '</td>';
 print '<td align="right">';
 $arrayofstatus = array('0' => $langs->trans("ServiceStatusInitial"), '4' => $langs->trans("ServiceStatusRunning"), '4&filter=notexpired' => $langs->trans("ServiceStatusNotLate"), '4&filter=expired' => $langs->trans("ServiceStatusLate"), '5' => $langs->trans("ServiceStatusClosed"));
 print $form->selectarray('search_status', $arrayofstatus, strstr($search_status, ',') ? -1 : $search_status, 1);
 print '</td>';
 print '<td class="liste_titre" align="right"><input type="image" class="liste_titre" name="button_search" src="' . img_picto($langs->trans("Search"), 'search.png', '', '', 1) . '" value="' . dol_escape_htmltag($langs->trans("Search")) . '" title="' . dol_escape_htmltag($langs->trans("Search")) . '">';
 print '<input type="image" class="liste_titre" name="button_removefilter" src="' . img_picto($langs->trans("Search"), 'searchclear.png', '', '', 1) . '" value="' . dol_escape_htmltag($langs->trans("RemoveFilter")) . '" title="' . dol_escape_htmltag($langs->trans("RemoveFilter")) . '">';
 print "</td></tr>\n";
 $contractstatic = new Contrat($db);
 $productstatic = new Product($db);
 $var = True;
 while ($i < min($num, $limit)) {
     $obj = $db->fetch_object($resql);
     $var = !$var;
开发者ID:Samara94,项目名称:dolibarr,代码行数:31,代码来源:services.php

示例7: urlencode

     }
     print ' <a href="' . DOL_URL_ROOT . '/comm/remise.php?id=' . $soc->id . '&backtopage=' . urlencode($_SERVER["PHP_SELF"] . '?socid=' . $soc->id . '&action=' . $action . '&origin=' . GETPOST('origin') . '&originid=' . GETPOST('originid')) . '">(' . $langs->trans("EditRelativeDiscount") . ')</a>';
     print '. ';
     print '<br>';
     if ($absolute_discount) {
         print $langs->trans("CompanyHasAbsoluteDiscount", '<a href="' . DOL_URL_ROOT . '/comm/remx.php?id=' . $soc->id . '&backtopage=' . urlencode($_SERVER["PHP_SELF"] . '?socid=' . $soc->id . '&action=' . $action . '&origin=' . GETPOST('origin') . '&originid=' . GETPOST('originid')) . '">' . price($absolute_discount) . '</a>', $langs->trans("Currency" . $conf->currency));
     } else {
         print $langs->trans("CompanyHasNoAbsoluteDiscount");
     }
     print ' <a href="' . DOL_URL_ROOT . '/comm/remx.php?id=' . $soc->id . '&backtopage=' . urlencode($_SERVER["PHP_SELF"] . '?socid=' . $soc->id . '&action=' . $action . '&origin=' . GETPOST('origin') . '&originid=' . GETPOST('originid')) . '">(' . $langs->trans("EditGlobalDiscounts") . ')</a>';
     print '.';
     print '</td></tr>';
 }
 // Date invoice
 print '<tr><td class="fieldrequired">' . $langs->trans('Date') . '</td><td colspan="2">';
 $datefacture = dol_mktime(12, 0, 0, $_POST['remonth'], $_POST['reday'], $_POST['reyear']);
 print $form->select_date($datefacture ? $datefacture : $dateinvoice, '', '', '', '', "add", 1, 1, 1);
 print '</td></tr>';
 // Payment term
 print '<tr><td class="nowrap">' . $langs->trans('PaymentConditionsShort') . '</td><td colspan="2">';
 $form->select_conditions_paiements(isset($_POST['cond_reglement_id']) ? $_POST['cond_reglement_id'] : $cond_reglement_id, 'cond_reglement_id');
 print '</td></tr>';
 // Payment mode
 print '<tr><td>' . $langs->trans('PaymentMode') . '</td><td colspan="2">';
 $form->select_types_paiements(isset($_POST['mode_reglement_id']) ? $_POST['mode_reglement_id'] : $mode_reglement_id, 'mode_reglement_id', 'CRDT');
 print '</td></tr>';
 // Bank Account
 if (isset($_POST['fk_account'])) {
     $fk_account = $_POST['fk_account'];
 }
 print '<tr><td>' . $langs->trans('BankAccount') . '</td><td colspan="2">';
开发者ID:Samara94,项目名称:dolibarr,代码行数:31,代码来源:facture.php

示例8: GETPOST

     $errmsg .= $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv('Nature')) . "<br>\n";
 }
 if (empty($_POST["lastname"])) {
     $error += 1;
     $errmsg .= $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Lastname")) . "<br>\n";
 }
 if (empty($_POST["firstname"])) {
     $error += 1;
     $errmsg .= $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Firstname")) . "<br>\n";
 }
 if (GETPOST("email") && !isValidEmail(GETPOST("email"))) {
     $error += 1;
     $langs->load("errors");
     $errmsg .= $langs->trans("ErrorBadEMail", GETPOST("email")) . "<br>\n";
 }
 $birthday = dol_mktime($_POST["birthhour"], $_POST["birthmin"], $_POST["birthsec"], $_POST["birthmonth"], $_POST["birthday"], $_POST["birthyear"]);
 if ($_POST["birthmonth"] && empty($birthday)) {
     $error += 1;
     $langs->load("errors");
     $errmsg .= $langs->trans("ErrorBadDateFormat") . "<br>\n";
 }
 if (!empty($conf->global->MEMBER_NEWFORM_DOLIBARRTURNOVER)) {
     if (GETPOST("morphy") == 'mor' && GETPOST('budget') <= 0) {
         $error += 1;
         $errmsg .= $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("TurnoverOrBudget")) . "<br>\n";
     }
 }
 if (isset($public)) {
     $public = 1;
 } else {
     $public = 0;
开发者ID:LionSystemsSolutions,项目名称:El-Canelo-ERP,代码行数:31,代码来源:new.php

示例9: llxHeader

* PAGE
*
* Put here all code to build page
****************************************************/
$helpurl = 'EN:Module_DoliPos|FR:Module_DoliPos_FR|ES:M&oacute;dulo_DoliPos';
llxHeader('', '', $helpurl);
$html = new Form($db);
$year_current = strftime("%Y", dol_now());
$pastmonth = strftime("%m", dol_now()) - 1;
$pastmonthyear = $year_current;
if ($pastmonth == 0) {
    $pastmonth = 12;
    $pastmonthyear--;
}
$date_start = dol_mktime(0, 0, 0, GETPOST("date_startmonth"), GETPOST("date_startday"), GETPOST("date_startyear"));
$date_end = dol_mktime(23, 59, 59, GETPOST("date_endmonth"), GETPOST("date_endday"), GETPOST("date_endyear"));
if (empty($date_start) || empty($date_end)) {
    $date_start = dol_get_first_day($pastmonthyear, $pastmonth, false);
    $date_end = dol_get_last_day($pastmonthyear, $pastmonth, false);
}
$nom = $langs->trans("TicketSellsJournal");
//$nomlink=;
$builddate = time();
$description = $langs->trans("TicketDescSellsJournal");
$period = $html->select_date($date_start, 'date_start', 0, 0, 0, '', 1, 0, 1) . ' - ' . $html->select_date($date_end, 'date_end', 0, 0, 0, '', 1, 0, 1);
report_header($nom, $nomlink, $period, $periodlink, $description, $builddate, $exportlink);
$p = explode(":", $conf->global->MAIN_INFO_SOCIETE_PAYS);
$idpays = $p[0];
$sql = "SELECT f.rowid, f.ticketnumber, f.type, f.date_closed, fd.product_type, fd.total_ht, fd.total_tva, fd.tva_tx, fd.total_ttc,";
$sql .= " fd.total_localtax1, fd.total_localtax2, p.accountancy_code_sell, s.code_compta,";
$sql .= " s.rowid as socid, s.nom as name, s.code_compta, s.client,";
开发者ID:LionSystemsSolutions,项目名称:El-Canelo-ERP,代码行数:31,代码来源:sellsjournal.php

示例10: GETPOST

$langs->load("other");
$id = GETPOST('id', 'int');
$action = GETPOST('action', 'alpha');
// Security check
if ($user->societe_id) {
    $socid = $user->societe_id;
}
$result = restrictedArea($user, 'contact', $id, 'socpeople&societe');
$object = new Contact($db);
/*
 * Action
 */
if ($action == 'update' && !$_POST["cancel"] && $user->rights->societe->contact->creer) {
    $ret = $object->fetch($id);
    // Note: Correct date should be completed with location to have exact GM time of birth.
    $object->birthday = dol_mktime(0, 0, 0, $_POST["birthdaymonth"], $_POST["birthdayday"], $_POST["birthdayyear"]);
    $object->birthday_alert = $_POST["birthday_alert"];
    $result = $object->update_perso($id, $user);
    if ($result > 0) {
        $object->old_name = '';
        $object->old_firstname = '';
    } else {
        $error = $object->error;
    }
}
/*
 *	View
 */
$now = dol_now();
llxHeader('', $langs->trans("ContactsAddresses"), 'EN:Module_Third_Parties|FR:Module_Tiers|ES:M&oacute;dulo_Empresas');
$form = new Form($db);
开发者ID:nrjacker4,项目名称:crm-php,代码行数:31,代码来源:perso.php

示例11: GETPOST

        $sortfield = "u.lastname";
    }
}
$page = GETPOST("page", 'int');
if ($page == -1) {
    $page = 0;
}
$offset = $conf->liste_limit * $page;
$pageprev = $page - 1;
$pagenext = $page + 1;
$startdate = $enddate = '';
if (!empty($_POST['startdatemonth'])) {
    $startdate = dol_mktime(0, 0, 0, $_POST['startdatemonth'], $_POST['startdateday'], $_POST['startdateyear']);
}
if (!empty($_POST['enddatemonth'])) {
    $enddate = dol_mktime(23, 59, 59, $_POST['enddatemonth'], $_POST['enddateday'], $_POST['enddateyear']);
}
/*
 * View
 */
$userstatic = new User($db);
$companystatic = new Societe($db);
$invoicestatic = new Facture($db);
$form = new Form($db);
llxHeader('', $langs->trans("Margins") . ' - ' . $langs->trans("Agents"));
$text = $langs->trans("Margins");
print_fiche_titre($text);
// Show tabs
$head = marges_prepare_head($user);
$titre = $langs->trans("Margins");
$picto = 'margin';
开发者ID:LionSystemsSolutions,项目名称:El-Canelo-ERP,代码行数:31,代码来源:agentMargins.php

示例12: initAsSpecimen

 /**
  *  Initialise an instance with random values.
  *  Used to build previews or test instances.
  *	id must be 0 if object instance is a specimen.
  *
  *	@param	string		$option		''=Create a specimen invoice with lines, 'nolines'=No lines
  *  @return	void
  */
 function initAsSpecimen($option = '')
 {
     global $user, $langs, $conf;
     $now = dol_now();
     $arraynow = dol_getdate($now);
     $nownotime = dol_mktime(0, 0, 0, $arraynow['mon'], $arraynow['mday'], $arraynow['year']);
     // Initialize parameters
     $this->id = 0;
     $this->ref = 'SPECIMEN';
     $this->specimen = 1;
     $this->facid = 1;
     $this->datepaye = $nownotime;
 }
开发者ID:Samara94,项目名称:dolibarr,代码行数:21,代码来源:paiement.class.php

示例13: setEventMessage

     setEventMessage($langs->trans("ErrorFieldRequired", $langs->transnoentities("Label")), 'errors');
 }
 if (!$error) {
     $object->fetch($id, $ref);
     $tmparray = explode('_', $_POST['task_parent']);
     $task_parent = $tmparray[1];
     if (empty($task_parent)) {
         $task_parent = 0;
     }
     // If task_parent is ''
     $object->label = $_POST["label"];
     $object->description = $_POST['description'];
     $object->fk_task_parent = $task_parent;
     $object->planned_workload = $planned_workload;
     $object->date_start = dol_mktime($_POST['dateohour'], $_POST['dateomin'], 0, $_POST['dateomonth'], $_POST['dateoday'], $_POST['dateoyear'], 'user');
     $object->date_end = dol_mktime($_POST['dateehour'], $_POST['dateemin'], 0, $_POST['dateemonth'], $_POST['dateeday'], $_POST['dateeyear'], 'user');
     $object->progress = $_POST['progress'];
     // Fill array 'array_options' with data from add form
     $ret = $extrafields->setOptionalsFromPost($extralabels, $object);
     if ($ret < 0) {
         $error++;
     }
     if (!$error) {
         $result = $object->update($user);
         if ($result < 0) {
             setEventMessages($object->error, $object->errors, 'errors');
         }
     }
 } else {
     $action = 'edit';
 }
开发者ID:ADDAdev,项目名称:Dolibarr,代码行数:31,代码来源:task.php

示例14: GETPOST

if (!empty($conf->commande->enabled)) {
    $langs->load("orders");
}
if (!empty($conf->propal->enabled)) {
    $langs->load("propal");
}
if (!empty($conf->ficheinter->enabled)) {
    $langs->load("interventions");
}
$projectid = GETPOST('id', 'int');
$ref = GETPOST('ref', 'alpha');
$action = GETPOST('action', 'alpha');
$datesrfc = GETPOST('datesrfc');
$dateerfc = GETPOST('dateerfc');
$dates = dol_mktime(0, 0, 0, GETPOST('datesmonth'), GETPOST('datesday'), GETPOST('datesyear'));
$datee = dol_mktime(23, 59, 59, GETPOST('dateemonth'), GETPOST('dateeday'), GETPOST('dateeyear'));
if (empty($dates) && !empty($datesrfc)) {
    $dates = dol_stringtotime($datesrfc);
}
if (empty($datee) && !empty($dateerfc)) {
    $datee = dol_stringtotime($dateerfc);
}
if (!isset($_POST['datesrfc']) && !isset($_POST['datesday']) && !empty($conf->global->PROJECT_LINKED_ELEMENT_DEFAULT_FILTER_YEAR)) {
    $new = dol_now();
    $tmp = dol_getdate($new);
    //$datee=$now
    //$dates=dol_time_plus_duree($datee, -1, 'y');
    $dates = dol_get_first_day($tmp['year'], 1);
}
if ($projectid == '' && $ref == '') {
    dol_print_error('', 'Bad parameter');
开发者ID:ADDAdev,项目名称:Dolibarr,代码行数:31,代码来源:element.php

示例15: dol_print_date

 // Initialize technical object to manage hooks of expenses. Note that conf->hooks_modules contains array array
 $hookmanager->initHooks(array('externalbalance'));
 $reshook = $hookmanager->executeHooks('addStatisticLine', $parameters, $object, $action);
 // Note that $action and $object may have been modified by some hooks
 if (!is_array($coll_listbuy) && $coll_listbuy == -1) {
     $langs->load("errors");
     print '<tr><td colspan="5">' . $langs->trans("ErrorNoAccountancyModuleLoaded") . '</td></tr>';
     break;
 }
 if (!is_array($coll_listbuy) && $coll_listbuy == -2) {
     print '<tr><td colspan="5">' . $langs->trans("FeatureNotYetAvailable") . '</td></tr>';
     break;
 }
 $var = !$var;
 print "<tr " . $bc[$var] . ">";
 print '<td class="nowrap"><a href="quadri_detail.php?leftmenu=tax_vat&month=' . $m . '&year=' . $y . '">' . dol_print_date(dol_mktime(0, 0, 0, $m, 1, $y), "%b %Y") . '</a></td>';
 $x_coll = 0;
 foreach ($coll_listsell as $vatrate => $val) {
     $x_coll += $val['vat'];
 }
 $subtotalcoll = $subtotalcoll + $x_coll;
 print "<td class=\"nowrap\" align=\"right\">" . price($x_coll) . "</td>";
 $x_paye = 0;
 foreach ($coll_listbuy as $vatrate => $val) {
     $x_paye += $val['vat'];
 }
 $subtotalpaye = $subtotalpaye + $x_paye;
 print "<td class=\"nowrap\" align=\"right\">" . price($x_paye) . "</td>";
 $diff = $x_coll - $x_paye;
 $total = $total + $diff;
 $subtotal = $subtotal + $diff;
开发者ID:TAASA,项目名称:Dolibarr-ERP-3.8.1,代码行数:31,代码来源:index.php


注:本文中的dol_mktime函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。