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


PHP Entrepot::update方法代码示例

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


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

示例1: Entrepot

        $action = '';
    }
}
// Modification entrepot
if ($action == 'update' && $_POST["cancel"] != $langs->trans("Cancel")) {
    $object = new Entrepot($db);
    if ($object->fetch($id)) {
        $object->libelle = $_POST["libelle"];
        $object->description = $_POST["desc"];
        $object->statut = $_POST["statut"];
        $object->lieu = $_POST["lieu"];
        $object->address = $_POST["address"];
        $object->zip = $_POST["zipcode"];
        $object->town = $_POST["town"];
        $object->country_id = $_POST["country_id"];
        if ($object->update($id, $user) > 0) {
            $action = '';
            //$mesg = '<div class="ok">Fiche mise a jour</div>';
        } else {
            $action = 'edit';
            $mesg = '<div class="error">' . $object->error . '</div>';
        }
    } else {
        $action = 'edit';
        $mesg = '<div class="error">' . $object->error . '</div>';
    }
}
if ($_POST["cancel"] == $langs->trans("Cancel")) {
    $action = '';
}
/*
开发者ID:LionSystemsSolutions,项目名称:El-Canelo-ERP,代码行数:31,代码来源:fiche.php

示例2: testEntrepotUpdate

 /**
  * testEntrepotUpdate
  *
  * @param	Entrepot	$localobject	Entrepot
  * @return	void
  *
  * @depends	testEntrepotFetch
  * The depends says test is run only if previous is ok
  */
 public function testEntrepotUpdate($localobject)
 {
     global $conf, $user, $langs, $db;
     $conf = $this->savconf;
     $user = $this->savuser;
     $langs = $this->savlangs;
     $db = $this->savdb;
     $localobject->note = 'New note after update';
     $result = $localobject->update($localobject->id, $user);
     print __METHOD__ . " id=" . $localobject->id . " result=" . $result . "\n";
     $this->assertLessThan($result, 0);
     return $localobject;
 }
开发者ID:Samara94,项目名称:dolibarr,代码行数:22,代码来源:EntrepotTest.php

示例3: Entrepot

	$object = new Entrepot($db);
	if ($object->fetch($_POST["id"]))
	{
		$object->libelle     = $_POST["libelle"];
		$object->description = $_POST["desc"];
		$object->statut      = $_POST["statut"];
		$object->lieu        = $_POST["lieu"];
		$object->address     = $_POST["address"];
		$object->cp          = $_POST["zipcode"];
		$object->ville       = $_POST["town"];
		$object->pays_id     = $_POST["country_id"];
		$object->zip         = $_POST["zipcode"];
		$object->town        = $_POST["town"];
		$object->country_id  = $_POST["country_id"];

		if ( $object->update($_POST["id"], $user) > 0)
		{
			$action = '';
			$_GET["id"] = $_POST["id"];
			//$mesg = '<div class="ok">Fiche mise a jour</div>';
		}
		else
		{
			$action = 'edit';
			$_GET["id"] = $_POST["id"];
			$mesg = '<div class="error">'.$object->error.'</div>';
		}
	}
	else
	{
		$action = 'edit';
开发者ID:nrjacker4,项目名称:crm-php,代码行数:31,代码来源:fiche.php

示例4: Entrepot

// Modification entrepot
if ($_POST["action"] == 'update' && $_POST["cancel"] <> $langs->trans("Cancel"))
{
	$entrepot = new Entrepot($db);
	if ($entrepot->fetch($_POST["id"]))
	{
		$entrepot->libelle     = $_POST["libelle"];
		$entrepot->description = $_POST["desc"];
		$entrepot->statut      = $_POST["statut"];
		$entrepot->lieu        = $_POST["lieu"];
		$entrepot->address     = $_POST["address"];
		$entrepot->cp          = $_POST["cp"];
		$entrepot->ville       = $_POST["ville"];
		$entrepot->pays_id     = $_POST["pays_id"];

		if ( $entrepot->update($_POST["id"], $user) > 0)
		{
			$_GET["action"] = '';
			$_GET["id"] = $_POST["id"];
			//$mesg = '<div class="ok">Fiche mise � jour</div>';
		}
		else
		{
			$_GET["action"] = 'edit';
			$_GET["id"] = $_POST["id"];
			$mesg = '<div class="error">'.$entrepot->error.'</div>';
		}
	}
	else
	{
		$_GET["action"] = 'edit';
开发者ID:remyyounes,项目名称:dolibarr,代码行数:31,代码来源:fiche.php


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