[ Index ]
 

Code source de vtiger CRM 5.0.2

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

title

Body

[fermer]

/modules/Accounts/ -> Tickerdetail.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 ("modules/Accounts/Accounts.php");
  12  require_once ("getCompanyProfile.php");
  13  $variable = $_REQUEST['tickersymbol'];
  14  $url = "http://moneycentral.msn.com/investor/research/profile.asp?Symbol=".trim($variable);
  15  $data = getComdata($url,trim($variable));
  16  if(is_array($data))
  17  {
  18      $summary = array_shift($data);
  19          list($comp, $address, $phone, $fax, $site, $industry, $emp,$desc1,$desc2) = explode(":", $summary);
  20          $address = str_replace("Company Report","",$address);
  21          $address = str_replace("Phone","",$address);
  22          $phone = str_replace("Fax","",$phone);
  23          $fax = str_replace("http","",$fax);
  24          $site = str_replace("Industry","",$site);
  25          $site = str_replace("//","",$site);
  26          $industry = str_replace("Employees","",$industry);
  27          $emp = str_replace("Exchange","",$emp);
  28          $first_array =array_slice($data,0, 8);
  29          $second_array = array_slice($data,8);
  30      $output='';
  31       $output .= '<table border="0" cellpadding="0" cellspacing="0" width="80%" align=center>
  32                       <tr><td class="detailedViewHeader" style="cursor:pointer;" onclick=\'just();\'><b>Company Report</b></td></tr>
  33                       <tr><td>
  34                          <div id="company">
  35                  <div id="innerLayer">
  36                               <input type="hidden" name="address" value="'.trim($address).'">
  37                               <input type="hidden" name="Phone" value="'.trim($phone).'">
  38                               <input type="hidden" name="Fax" value="'.trim($fax).'">
  39                               <input type="hidden" name="site" value="'.trim($site).'">
  40                               <input type="hidden" name="emp" value="'.trim($emp).'">
  41                               <table class="small" border="0" cellpadding="0" cellspacing="0" width="60%" align="center">
  42              <tr>
  43                   <td colspan="2" class="detailedViewHeader"><b>'.$comp.'</b></td>
  44              </tr>';
  45          $output .='<tr><td><table><tr><td><table width="185">';
  46          foreach($first_array as $arr => $val)
  47          {
  48                  $output .= '<tr>';
  49                  for($j=0;$j<count($val);$j+=2)
  50                  {
  51                          $output .= '<td class="dvtCellLabel" align="right" width="20%">'.$val[$j].'</td>
  52                                      <td width="30%" align="left" class="dvtCellInfo">'.$val[$j+1].'</td>';
  53                  }
  54                  $output .= '</tr>';
  55          }
  56          $output .='</table></td>';
  57          $output .='<td><table width="185">';
  58          array_shift($second_array[0]);
  59          array_shift($second_array[0]);
  60          foreach($second_array as $arr => $val)
  61          {
  62                  $output .= '<tr>';
  63              for($j=0;$j<count($val);$j+=2)
  64              {
  65                      $output .= '<td lass="dvtCellLabel" align="right" width="20%">'.$val[$j].'</td>
  66                                  <td width="30%" align="left" class="dvtCellInfo">'.$val[$j+1].'</td>';
  67              }
  68              $output .= '</tr>';
  69          }
  70          $output .='</table></td><td align=left><a href="http://finance.yahoo.com/q/bc?s='.trim($variable).'&amp;t=1d" target="_blank"><img src="http://ichart.finance.yahoo.com/t?s='.trim($variable).'" width="192" height="96" alt="[Chart]" border="0"></a></td></tr></table></td></tr>';
  71          $output .= '<tr style="height: 25px;">
  72                               <td colspan="2" style="border-top:1px solid #eaeaea;">&nbsp;</td>
  73                                      </tr></table>';
  74          $output .= '<table class="small" border="0" cellpadding="0" cellspacing="0" width="60%" align="center" id="conf">
  75                    <tr>
  76              <td colspan="2" class="detailedViewHeader"><b>BUSINESS SUMMARY</b></td>
  77                 </tr>         
  78               <td width="30%" align="left" class="dvtCellInfo"><textarea id="summary" cols=80 rows=5 readonly>'.$desc1.' '.$desc2.'</textarea></td>
  79              </tr>
  80              <tr>
  81               <td colspan="2" style="padding: 5px;border-top:1px solid #eaeaea;">
  82                  <div align="center">
  83                       <input title="Save [Alt+S]" accesskey="S" class="small"  name="button" value="Yes" style="width: 70px;" type="button" onclick=\'fnDown("conf");\' />
  84                   <input title="Cancel [Alt+X]" accesskey="X" class="small" name="button" value="No" style="width: 70px;" type="button" onclick=\'just();\'/>
  85                  </div>
  86               </td> 
  87              </tr>
  88            </table>
  89                  </div></div>
  90          </td></tr></table>';
  91  echo $output;
  92  }
  93  else
  94  {
  95          $output = '';
  96          $output .= "<div style='display:block'>";
  97          $output .= "<b><font color='red'>".$data."</font>";
  98          $output .= "</div>";
  99          echo $output;
 100  }
 101  ?>


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