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


PHP Propal::delete_contact方法代码示例

本文整理汇总了PHP中Propal::delete_contact方法的典型用法代码示例。如果您正苦于以下问题:PHP Propal::delete_contact方法的具体用法?PHP Propal::delete_contact怎么用?PHP Propal::delete_contact使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Propal的用法示例。


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

示例1: Header

            $mesg = '<div class="error">' . $langs->trans("ErrorThisContactIsAlreadyDefinedAsThisType") . '</div>';
        } else {
            $mesg = '<div class="error">' . $object->error . '</div>';
        }
    }
} else {
    if ($action == 'swapstatut' && $user->rights->propale->creer) {
        if ($object->fetch($id) > 0) {
            $result = $object->swapContactStatus(GETPOST('ligne'));
        } else {
            dol_print_error($db);
        }
    } else {
        if ($action == 'deletecontact' && $user->rights->propale->creer) {
            $object->fetch($id);
            $result = $object->delete_contact($lineid);
            if ($result >= 0) {
                Header("Location: " . $_SERVER['PHP_SELF'] . "?id=" . $object->id);
                exit;
            } else {
                dol_print_error($db);
            }
        } else {
            if ($action == 'setaddress' && $user->rights->propale->creer) {
                $object->fetch($id);
                $result = $object->setDeliveryAddress($_POST['fk_address']);
                if ($result < 0) {
                    dol_print_error($db, $object->error);
                }
            }
        }
开发者ID:nrjacker4,项目名称:crm-php,代码行数:31,代码来源:contact.php

示例2: Header

        Header("Location: " . $_SERVER['PHP_SELF'] . "?id=" . $object->id);
        exit;
    } else {
        if ($objectsrc->error == 'DB_ERROR_RECORD_ALREADY_EXISTS') {
            $langs->load("errors");
            $mesg = '<div class="error">' . $langs->trans("ErrorThisContactIsAlreadyDefinedAsThisType") . '</div>';
        } else {
            $mesg = '<div class="error">' . $objectsrc->error . '</div>';
        }
    }
} else {
    if ($action == 'swapstatut' && $user->rights->expedition->creer) {
        $result = $objectsrc->swapContactStatus(GETPOST('ligne'));
    } else {
        if ($action == 'deleteline' && $user->rights->expedition->creer) {
            $result = $objectsrc->delete_contact($_GET["lineid"]);
            if ($result >= 0) {
                Header("Location: " . $_SERVER['PHP_SELF'] . "?id=" . $object->id);
                exit;
            } else {
                dol_print_error($db);
            }
        } else {
            if ($action == 'setaddress' && $user->rights->expedition->creer) {
                $object->fetch($id);
                $result = $object->setDeliveryAddress($_POST['fk_address']);
                if ($result < 0) {
                    dol_print_error($db, $object->error);
                }
            }
        }
开发者ID:nrjacker4,项目名称:crm-php,代码行数:31,代码来源:contact.php

示例3: header

        header("Location: " . $_SERVER['PHP_SELF'] . "?id=" . $object->id);
        exit;
    } else {
        if ($objectsrc->error == 'DB_ERROR_RECORD_ALREADY_EXISTS') {
            $langs->load("errors");
            $mesg = '<div class="error">' . $langs->trans("ErrorThisContactIsAlreadyDefinedAsThisType") . '</div>';
        } else {
            $mesg = '<div class="error">' . $objectsrc->error . '</div>';
        }
    }
} else {
    if ($action == 'swapstatut' && $user->rights->expedition->creer) {
        $result = $objectsrc->swapContactStatus(GETPOST('ligne'));
    } else {
        if ($action == 'deletecontact' && $user->rights->expedition->creer) {
            $result = $objectsrc->delete_contact(GETPOST("lineid"));
            if ($result >= 0) {
                header("Location: " . $_SERVER['PHP_SELF'] . "?id=" . $object->id);
                exit;
            } else {
                dol_print_error($db);
            }
        } else {
            if ($action == 'setaddress' && $user->rights->expedition->creer) {
                $object->fetch($id);
                $result = $object->setDeliveryAddress($_POST['fk_address']);
                if ($result < 0) {
                    dol_print_error($db, $object->error);
                }
            }
        }
开发者ID:LionSystemsSolutions,项目名称:El-Canelo-ERP,代码行数:31,代码来源:contact.php

示例4: Propal

		{
			dol_print_error($db, "result=$result");
			$db->rollback();
		}
	} else
	{
		dol_print_error($db);
	}
}

// Efface un contact
if ($action == 'deleteline' && $user->rights->propale->creer)
{
	$propal = new Propal($db);
	$propal->fetch($id);
	$result = $propal->delete_contact($lineid);

	if ($result >= 0)
	{
		Header("Location: contact.php?id=".$propal->id);
		exit;
	}
	else {
		dol_print_error($db);
	}
}


/*
 * View
 */
开发者ID:remyyounes,项目名称:dolibarr,代码行数:31,代码来源:contact.php


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