[ Index ]
 

Code source de vtiger CRM 5.0.2

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

title

Body

[fermer]

/modules/Campaigns/ -> DetailView.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  
  12  require_once ('include/database/PearDatabase.php');
  13  require_once ('Smarty_setup.php');
  14  require_once ('modules/Campaigns/Campaigns.php');
  15  require_once ('modules/CustomView/CustomView.php');
  16  require_once ('include/utils/utils.php');
  17  require_once ('user_privileges/default_module_view.php');
  18  
  19  $focus = new Campaigns();
  20  
  21  if(isset($_REQUEST['record']) && $_REQUEST['record']!= null ) 
  22  {
  23      $focus->retrieve_entity_info($_REQUEST['record'],"Campaigns");
  24      $focus->name=$focus->column_fields['campaignname'];
  25      $focus->id = $_REQUEST['record'];
  26  }
  27  
  28  if(isset($_REQUEST['isDuplicate']) && $_REQUEST['isDuplicate'] == 'true') 
  29  {
  30          $focus->id = "";
  31  }
  32  global $app_strings,$mod_strings,$theme,$currentModule,$default_module_view;
  33  
  34  $theme_path="themes/".$theme."/";
  35  $image_path=$theme_path."images/";
  36  require_once ($theme_path.'layout_utils.php');
  37  
  38  $smarty = new vtigerCRM_Smarty;
  39  $smarty->assign("MOD", $mod_strings);
  40  $smarty->assign("APP", $app_strings);
  41  
  42  if (isset($focus->name)) $smarty->assign("NAME", $focus->name);
  43  else $smarty->assign("NAME", "");
  44  $smarty->assign("BLOCKS", getBlocks($currentModule,"detail_view",'',$focus->column_fields));
  45  
  46  $smarty->assign("CUSTOMFIELD", $cust_fld);
  47  $smarty->assign("SINGLE_MOD",'Campaign');
  48  $category = getParentTab();
  49  $smarty->assign("CATEGORY",$category);
  50  
  51  if(isPermitted("Campaigns","EditView",$_REQUEST['record']) == 'yes')
  52      $smarty->assign("EDIT_DUPLICATE","permitted");
  53  
  54  if(isPermitted("Campaigns","Delete",$_REQUEST['record']) == 'yes')
  55      $smarty->assign("DELETE","permitted");
  56  
  57  $smarty->assign("IMAGE_PATH", $image_path);
  58  $smarty->assign("PRINT_URL", "phprint.php?jt=".session_id().$GLOBALS['request_string']);
  59  $smarty->assign("UPDATEINFO",updateInfo($focus->id));
  60  $smarty->assign("ID", $_REQUEST['record']);
  61  
  62  
  63  $tabid = getTabid("Campaigns");
  64  $validationData = getDBValidationData($focus->tab_name,$tabid);
  65  $data = split_validationdataArray($validationData);
  66  
  67  $smarty->assign("VALIDATION_DATA_FIELDNAME",$data['fieldname']);
  68  $smarty->assign("VALIDATION_DATA_FIELDDATATYPE",$data['datatype']);
  69  $smarty->assign("VALIDATION_DATA_FIELDLABEL",$data['fieldlabel']);
  70  
  71  $check_button = Button_Check($module);
  72  $smarty->assign("CHECK", $check_button);
  73  
  74  if($singlepane_view == 'true')
  75  {
  76      $related_array = getRelatedLists($currentModule,$focus);
  77      $smarty->assign("RELATEDLISTS", $related_array);
  78      $cvObj = new CustomView("Contacts");
  79      $cvcombo = $cvObj->getCustomViewCombo();
  80      $smarty->assign("CONTCVCOMBO","<select id='cont_cv_list' onchange='loadCvList(\"Contacts\",".$_REQUEST["record"].");'><option value='None'>-- ".$mod_strings['Select One']." --</option>".$cvcombo."</select>");
  81  
  82      $cvObj = new CustomView("Leads");
  83      $cvcombo = $cvObj->getCustomViewCombo();
  84      $smarty->assign("LEADCVCOMBO","<select id='lead_cv_list' onchange='loadCvList(\"Leads\",".$_REQUEST["record"].");'> <option value='None'>-- ".$mod_strings['Select One']." --</option>".$cvcombo."</select>");
  85  }
  86  
  87  $smarty->assign("SinglePane_View", $singlepane_view);
  88  
  89  $smarty->assign("MODULE",$currentModule);
  90  $smarty->assign("EDIT_PERMISSION",isPermitted($currentModule,'EditView',$_REQUEST[record]));
  91  $smarty->display("DetailView.tpl");
  92  
  93  $focus->id = $_REQUEST['record'];
  94  
  95  ?>


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