[ Index ]
 

Code source de vtiger CRM 5.0.2

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

title

Body

[fermer]

/modules/PriceBooks/ -> EditView.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 ('Smarty_setup.php');
  12  require_once ('include/database/PearDatabase.php');
  13  require_once ('include/utils/utils.php');
  14  require_once ('modules/PriceBooks/PriceBooks.php');
  15  require_once ('include/FormValidationUtil.php');
  16  
  17  global $app_strings,$mod_strings,$theme,$currentModule;
  18  
  19  $focus = new PriceBooks();
  20  $smarty = new vtigerCRM_Smarty();
  21  
  22  if(isset($_REQUEST['record']) && $_REQUEST['record'] != '') 
  23  {
  24      $focus->id = $_REQUEST['record'];
  25      $focus->mode = 'edit';     
  26      $focus->retrieve_entity_info($_REQUEST['record'],"PriceBooks");
  27      $focus->name = $focus->column_fields['bookname'];
  28  }
  29  if(isset($_REQUEST['isDuplicate']) && $_REQUEST['isDuplicate'] == 'true') 
  30  {
  31      $focus->id = "";
  32          $focus->mode = '';     
  33  } 
  34  
  35  $theme_path="themes/".$theme."/";
  36  $image_path=$theme_path."images/";
  37  require_once ($theme_path.'layout_utils.php');
  38  
  39  $disp_view = getView($focus->mode);
  40  if($disp_view == 'edit_view')
  41      $smarty->assign("BLOCKS",getBlocks($currentModule,$disp_view,$mode,$focus->column_fields));
  42  else    
  43  {
  44      $bas_block = getBlocks($currentModule,$disp_view,$mode,$focus->column_fields,'BAS');
  45      $blocks['basicTab'] = $bas_block;
  46  
  47      $smarty->assign("BLOCKS",$blocks);
  48      $smarty->assign("BLOCKS_COUNT",count($blocks));
  49  }
  50  $smarty->assign("OP_MODE",$disp_view);
  51  
  52  $smarty->assign("MODULE",$currentModule);
  53  $smarty->assign("SINGLE_MOD",'PriceBook');
  54  
  55  $smarty->assign("MOD", $mod_strings);
  56  $smarty->assign("APP", $app_strings);
  57  if(isset($cust_fld))
  58  {
  59          $smarty->assign("CUSTOMFIELD", $cust_fld);
  60  }
  61  
  62  $smarty->assign("ID", $focus->id);
  63  if(isset($focus->name))
  64          $smarty->assign("NAME", $focus->name);
  65  
  66  $smarty->assign("CALENDAR_LANG", $app_strings['LBL_JSCALENDAR_LANG']);
  67  $smarty->assign("CALENDAR_DATEFORMAT", parse_calendardate($app_strings['NTC_DATE_FORMAT']));
  68  if($focus->mode == 'edit')
  69  {
  70      $smarty->assign("UPDATEINFO",updateInfo($focus->id));
  71          $smarty->assign("MODE", $focus->mode);
  72  }
  73  
  74  if(isset($_REQUEST['return_module'])) $smarty->assign("RETURN_MODULE", $_REQUEST['return_module']);
  75  if(isset($_REQUEST['return_action'])) $smarty->assign("RETURN_ACTION", $_REQUEST['return_action']);
  76  if(isset($_REQUEST['return_id'])) $smarty->assign("RETURN_ID", $_REQUEST['return_id']);
  77  $smarty->assign("THEME", $theme);
  78  $smarty->assign("IMAGE_PATH", $image_path);$smarty->assign("PRINT_URL", "phprint.php?jt=".session_id().$GLOBALS['request_string']);
  79  
  80  
  81  $tabid = getTabid("PriceBooks");
  82  $validationData = getDBValidationData($focus->tab_name,$tabid);
  83  $data = split_validationdataArray($validationData);
  84  $category = getParentTab();
  85  $smarty->assign("CATEGORY",$category);
  86  
  87  $smarty->assign("VALIDATION_DATA_FIELDNAME",$data['fieldname']);
  88  $smarty->assign("VALIDATION_DATA_FIELDDATATYPE",$data['datatype']);
  89  $smarty->assign("VALIDATION_DATA_FIELDLABEL",$data['fieldlabel']);
  90  
  91  $check_button = Button_Check($module);
  92  $smarty->assign("CHECK", $check_button);
  93  
  94  if($focus->mode == 'edit')
  95      $smarty->display('Inventory/InventoryEditView.tpl');
  96  else 
  97      $smarty->display('Inventory/InventoryCreateView.tpl');
  98  ?>


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