本文整理汇总了PHP中Contrat::active_line方法的典型用法代码示例。如果您正苦于以下问题:PHP Contrat::active_line方法的具体用法?PHP Contrat::active_line怎么用?PHP Contrat::active_line使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Contrat
的用法示例。
在下文中一共展示了Contrat::active_line方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: ExtraFields
// fetch optionals attributes lines and labels
$extrafieldsline = new ExtraFields($db);
$extralabelslines = $extrafieldsline->fetch_name_optionals_label($object->table_element_line);
$permissionnote = $user->rights->contrat->creer;
// Used by the include of actions_setnotes.inc.php
$permissiondellink = $user->rights->contrat->creer;
// Used by the include of actions_dellink.inc.php
/*
* Actions
*/
include DOL_DOCUMENT_ROOT . '/core/actions_setnotes.inc.php';
// Must be include, not includ_once
include DOL_DOCUMENT_ROOT . '/core/actions_dellink.inc.php';
// Must be include, not include_once
if ($action == 'confirm_active' && $confirm == 'yes' && $user->rights->contrat->activer) {
$result = $object->active_line($user, GETPOST('ligne'), GETPOST('date'), GETPOST('dateend'), GETPOST('comment'));
if ($result > 0) {
header("Location: " . $_SERVER['PHP_SELF'] . "?id=" . $object->id);
exit;
} else {
setEventMessage($object->error, 'errors');
}
} else {
if ($action == 'confirm_closeline' && $confirm == 'yes' && $user->rights->contrat->activer) {
if (!GETPOST('dateend')) {
$error++;
setEventMessage($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("DateEnd")), 'errors');
}
if (!$error) {
$result = $object->close_line($user, GETPOST('ligne'), GETPOST('dateend'), urldecode(GETPOST('comment')));
if ($result > 0) {
示例2: Contrat
if ($user->societe_id) $socid=$user->societe_id;
$result=restrictedArea($user,'contrat',$contratid,'contrat');
$usehm=$conf->global->MAIN_USE_HOURMIN_IN_DATE_RANGE;
$object = new Contrat($db);
/*
* Actions
*/
if ($action == 'confirm_active' && $_REQUEST["confirm"] == 'yes' && $user->rights->contrat->activer)
{
$object->fetch($_GET["id"]);
$result = $object->active_line($user, $_GET["ligne"], $_GET["date"], $_GET["dateend"], $_GET["comment"]);
if ($result > 0)
{
Header("Location: fiche.php?id=".$object->id);
exit;
}
else {
$mesg=$object->error;
}
}
if ($action == 'confirm_closeline' && $_REQUEST["confirm"] == 'yes' && $user->rights->contrat->activer)
{
$object->fetch($_GET["id"]);
$result = $object->close_line($user, $_GET["ligne"], $_GET["dateend"], urldecode($_GET["comment"]));