[ Index ]
 

Code source de vtiger CRM 5.0.2

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

title

Body

[fermer]

/modules/Users/ -> massChangeStatus.php (source)

   1  <?php
   2  
   3  
   4  
   5  /*********************************************************************************
   6  ** The contents of this file are subject to the vtiger CRM Public License Version 1.0
   7   * ("License"); You may not use this file except in compliance with the License
   8   * The Original Code is:  vtiger CRM Open Source
   9   * The Initial Developer of the Original Code is vtiger.
  10   * Portions created by vtiger are Copyright (C) vtiger.
  11   * All Rights Reserved.
  12  *
  13   ********************************************************************************/
  14  
  15  
  16  
  17  require_once ('include/ComboUtil.php');
  18  require_once ('modules/Leads/Leads.php');
  19  global $app_list_strings;
  20  global $app_strings;
  21  global $current_user;
  22  
  23  $focus = new Leads();
  24  $idlist = $_POST['idlist'];
  25  //echo $idlist;
  26  
  27  // Get _dom arrays from Database
  28  $comboFieldNames = Array('leadstatus'=>'lead_status_dom');
  29  $comboFieldArray = getComboArray($comboFieldNames);
  30  
  31  ?>
  32  <script language="javascript">
  33  function updateOwner()
  34  {
  35      var username=document.setLeadOwner.lead_owner.value;
  36      //alert(username);
  37      document.setLeadOwner.user_id.value=username
  38      document.setLeadOwner.action="index.php?module=Users&action=updateLeadDBStatus"
  39  }
  40  function updateStatus()
  41  {
  42      var leadstatusvalue=document.setLeadStatus.lead_status.value
  43      //alert(leadstatusvalue);
  44      document.setLeadStatus.leadval.value=leadstatusvalue;
  45      document.setLeadStatus.action="index.php?module=Users&action=updateLeadDBStatus"
  46  }
  47  function goBack()
  48  {
  49      document.setLeadStatus.action="index.php?module=Leads&action=index"
  50  }
  51  function goBack1()
  52  {
  53      document.setLeadOwner.action="index.php?module=Leads&action=index"
  54  }
  55  </script>
  56  <?php
  57  
  58  if(isset($_REQUEST['change_status']) && $_REQUEST['change_status']=='true')
  59  {
  60     ?>
  61  <form name="setLeadStatus" method="post">
  62    <?php
  63          echo get_module_title($mod_strings['LBL_MODULE_NAME'], "Leads : Change Status", true); 
  64      ?>
  65    <br>
  66    <table width="40%" border="0" cellspacing="0" cellpadding="0" class="formOuterBorder"> 
  67    <tr> 
  68      <td class="formSecHeader">Status Information</td>
  69    </tr>
  70    <tr> 
  71      <td> <table width="100%" border="0" cellspacing="1" cellpadding="2">
  72          <tr> 
  73            <td class="dataLabel">Select New Status:</td>
  74            <td><select name='lead_status'>
  75                <?php
  76              echo get_select_options_with_id($comboFieldArray['lead_status_dom'], $focus->lead_status);
  77          ?>
  78              </select></td>
  79          </tr>
  80        </table></td>
  81    </tr>
  82    </table>
  83    <br>
  84    <table width="40%" cellpadding="0" cellspacing="0" border="0">
  85      <tr> 
  86        <td> <div align="center"> 
  87            <input type="submit" name="submit" class="button" value="Update Status" onclick="return updateStatus()">
  88            <input type="submit" name="Cancel" class="button" value="Cancel" onclick="return goBack()">
  89          </div></td>
  90      </tr>
  91    </table>
  92    <input type="hidden" name="leadval">
  93    <input type="hidden" name="idlist" value="<?php echo $idlist ?>">
  94  </form>
  95  <?php
  96  }
  97  elseif(isset($_REQUEST['change_owner']) && $_REQUEST['change_owner']=='true')
  98  {
  99      $result=$adb->query("select * from vtiger_users");
 100      for($i=0;$i<$adb->num_rows($result);$i++)
 101      {
 102          $useridlist[$i]=$adb->query_result($result,$i,'id');
 103          $usernamelist[$useridlist[$i]]=$adb->query_result($result,$i,'user_name');
 104      }
 105  
 106  ?>
 107  <form name="setLeadOwner" method="post">
 108    <?php
 109          echo get_module_title($mod_strings['LBL_MODULE_NAME'], "Leads : Change Owner", true); 
 110      ?>
 111    <br>
 112    <table width="40%" border="0" cellspacing="0" cellpadding="0" class="formOuterBorder"> 
 113    <tr> 
 114      <td class="formSecHeader">Owner Information</td>
 115    </tr>
 116    <tr> 
 117      <td> <table width="100%" border="0" cellspacing="1" cellpadding="2">
 118          <tr> 
 119            <td class="dataLabel">Select New Owner:</td>
 120            <td><select name='lead_owner'>
 121                <?php
 122              echo get_select_options_with_id($usernamelist, $focus->lead_owner);
 123          ?>
 124              </select></td>
 125          </tr>
 126        </table></td>
 127    </tr>
 128    </table>
 129    <br>
 130    <table width="40%" cellpadding="0" cellspacing="0" border="0">
 131      <tr> 
 132        <td> <div align="center"> 
 133            <input type="submit" name="submit" class="button" value="Update Owner" onclick="return updateOwner()">
 134            <input type="submit" name="Cancel" class="button" value="cancel" onclick="return goBack1()">
 135          </div></td>
 136      </tr>
 137    </table>
 138    <input type="hidden" name="user_id">
 139    <input type="hidden" name="idlist" value="<?php echo $idlist ?>">
 140  </form>
 141  <?php
 142  }
 143  ?>
 144  <!-- header("Location: index.php?module=Leads&action=index");-->


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