Location: PHPKode > projects > Phpgw Time Tracking Add On App > timetrack/viewcustomer.php
<?php
  /**************************************************************************\
  * phpgwtimetrack - phpGroupWare addon application                          *
  * http://phpgwtimetrack.sourceforge.net                                    *
  * Written by Robert Schader <hide@address.com>                         *
  * --------------------------------------------                             *
  *  This program is free software; you can redistribute it and/or modify it *
  *  under the terms of the GNU General Public License as published by the   *
  *  Free Software Foundation; either version 2 of the License, or (at your  *
  *  option) any later version.                                              *
  \**************************************************************************/

  /* $Id: viewcustomer.php,v 1.4 2001/01/08 21:31:40 rschader Exp $ */

  $phpgw_info["flags"]["enable_nextmatchs_class"] = "True";
  $phpgw_info["flags"]["currentapp"] = "timetrack";

  include("../header.inc.php");
  if (! $cid)
     Header("Location: " . $phpgw->link("customers.php"));

  $phpgw->db->query("select * from customers where company_id='$cid'");
  $phpgw->db->next_record();
  $company_id = $phpgw->db->f("company_id");
  $company_name = $phpgw->db->f("company_name");
  $website = $phpgw->db->f("website");
  $ftpsite = $phpgw->db->f("ftpsite");
  $industry_type = $phpgw->db->f("industry_type");
  $status = $phpgw->db->f("status");
  $software = $phpgw->db->f("software");
  $lastjobnum = $phpgw->db->f("lastjobnum");
  $lastjobfinished = $phpgw->db->f("lastjobfinished");
  $busrelationship = $phpgw->db->f("busrelationship");
  $notes = $phpgw->db->f("notes");
  $active = $phpgw->db->f("active");
  //$ = $phpgw->db->f("");
  if ($website == "") $website = "&nbsp;";
  if ($ftpsite == "") $ftpsite = "&nbsp;";
  if ($industry_type == "") $industry_type = "&nbsp;";
  if ($status == "") $status = "&nbsp;";
  if ($software == "") $software = "&nbsp;";
  if ($lastjobnum == "") $lastjobnum = "&nbsp;";
  if ($lastjobfinished == "") $lastjobfinished = "&nbsp;";
  if ($busrelationship == "") $busrelationship = "&nbsp;";
  if ($notes == "") $notes = "&nbsp;";
  //if ($ == "") $ = "&nbsp;";

  ?>
   <center>
   <p><table border=0 width=50%>

    <tr bgcolor="<?php echo $phpgw_info["theme"]["th_bg"]; ?>">
     <th colspan="2"align="center"><?php echo $company_name; ?></th>
    </tr>

    <tr bgcolor="<?php echo $phpgw_info["theme"]["row_off"]; ?>">
     <td width="40%"><?php echo lang("Web Site"); ?></td>
     <td width="60%"><?php echo '<a href="http://' . $website . '" TARGET="Remote Site">' . $website 
		. '</a>'; ?></td>
    </tr>

    <tr bgcolor="<?php echo $phpgw_info["theme"]["row_on"]; ?>">
     <td width="40%"><?php echo lang("FTP Site"); ?></td>
     <td width="60%"><?php echo '<a href="ftp://' . $ftpsite . '" TARGET="Remote Site">' . $ftpsite 
		. '</a>'; ?></td>
    </tr>

    <tr bgcolor="<?php echo $phpgw_info["theme"]["row_off"]; ?>">
     <td width="40%"><?php echo lang("Industry Type"); ?></td>
     <td width="60%"><?php echo $industry_type; ?></td>
    </tr>

    <tr bgcolor="<?php echo $phpgw_info["theme"]["row_on"]; ?>">
     <td width="40%"><?php echo lang("Status"); ?></td>
     <td width="60%"><?php echo $status; ?></td>
    </tr>

    <tr bgcolor="<?php echo $phpgw_info["theme"]["row_off"]; ?>">
     <td width="40%"><?php echo lang("Software"); ?></td>
     <td width="60%"><?php echo $software; ?></td>
    </tr>

    <tr bgcolor="<?php echo $phpgw_info["theme"]["row_on"]; ?>">
     <td width="40%"><?php echo lang("Last Job"); ?></td>
     <td width="60%"><?php echo $lastjobnum; ?></td>
    </tr>

    <tr bgcolor="<?php echo $phpgw_info["theme"]["row_off"]; ?>">
     <td width="40%"><?php echo lang("Date Finished"); ?></td>
     <td width="60%"><?php echo $lastjobfinished; ?></td>
    </tr>

    <tr bgcolor="<?php echo $phpgw_info["theme"]["row_on"]; ?>">
     <td width="40%"><?php echo lang("Relationship"); ?></td>
     <td width="60%"><?php echo $busrelationship; ?></td>
    </tr>

    <tr bgcolor="<?php echo $phpgw_info["theme"]["row_off"]; ?>">
     <td width="40%"><?php echo lang("Active Jobs"); ?></td>
     <td width="60%"><?php echo $active; ?></td>
    </tr>

    <tr bgcolor="<?php echo $phpgw_info["theme"]["row_on"]; ?>">
     <td width="40%"><?php echo lang("Notes"); ?></td>
     <td width="60%"><?php echo $notes; ?></td>
    </tr>

    <tr bgcolor="<?php echo $phpgw_info["theme"]["th_bg"]; ?>">
     <td colspan="2">&nbsp;</td>
    </tr>

    </table>
   </center>

<?php
  $phpgw->common->phpgw_footer();

Return current item: Phpgw Time Tracking Add On App