[ Index ]
 

Code source de vtiger CRM 5.0.2

Accédez au Source d'autres logiciels libresSoutenez Angelica Josefina !

title

Body

[fermer]

/modules/CustomView/ -> SaveAction.php (source)

   1  <?php
   2  /*********************************************************************************
   3  ** The contents of this file are subject to the vtiger CRM Public License Version 1.0
   4   * ("License"); You may not use this file except in compliance with the License
   5   * The Original Code is:  vtiger CRM Open Source
   6   * The Initial Developer of the Original Code is vtiger.
   7   * Portions created by vtiger are Copyright (C) vtiger.
   8   * All Rights Reserved.
   9  *
  10   ********************************************************************************/
  11  require_once ('include/logging.php');
  12  require_once ('include/database/PearDatabase.php');
  13  global $adb;
  14  
  15  $cvid = $_REQUEST["cvid"];
  16  $cvmodule = $_REQUEST["cvmodule"];
  17  $mode = $_REQUEST["mode"];
  18  $subject = addslashes($_REQUEST["subject"]);
  19  $body = addslashes($_REQUEST["body"]);
  20  
  21  if($cvid != "")
  22  {
  23      if($mode == "new")
  24      {
  25          $customactionsql = "insert into vtiger_customaction(cvid,subject,module,content)";
  26          $customactionsql .= " values(".$cvid.",'".$subject."','".$cvmodule."','".$body."')";
  27          $customactionresult = $adb->query($customactionsql);
  28          if($customactionresult == false)
  29          {
  30              include('themes/'.$theme.'/header.php');
  31              $errormessage = "<font color='red'><B>Error Message<ul>
  32                  <li><font color='red'>Error while inserting the record</font>
  33                  </ul></B></font> <br>" ;
  34              echo $errormessage;
  35  
  36          }
  37  
  38      }elseif($mode == "edit")
  39      {
  40          $updatecasql = "update vtiger_customaction set subject='".$subject."',content='".$body."' where cvid=".$cvid;
  41          $updatecaresult = $adb->query($updatecasql);
  42          if($updatecaresult == false)
  43          {
  44              include('themes/'.$theme.'/header.php');
  45              $errormessage = "<font color='red'><B>Error Message<ul>
  46                  <li><font color='red'>Error while inserting the record</font>
  47                  </ul></B></font> <br>" ;
  48              echo $errormessage;
  49          }
  50      }
  51  }
  52  header("Location: index.php?action=index&module=$cvmodule&viewname=$cvid");
  53  ?>


Généré le : Sun Feb 25 10:22:19 2007 par Balluche grâce à PHPXref 0.7