[ Index ]
 

Code source de vtiger CRM 5.0.2

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

title

Body

[fermer]

/themes/bluelagoon/ -> layout_utils.php (source)

   1  <?php
   2  /*********************************************************************************
   3   * The contents of this file are subject to the SugarCRM Public License Version 1.1.2
   4   * ("License"); You may not use this file except in compliance with the 
   5   * License. You may obtain a copy of the License at http://www.sugarcrm.com/SPL
   6   * Software distributed under the License is distributed on an  "AS IS"  basis,
   7   * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
   8   * the specific language governing rights and limitations under the License.
   9   * The Original Code is:  SugarCRM Open Source
  10   * The Initial Developer of the Original Code is SugarCRM, Inc.
  11   * Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.;
  12   * All Rights Reserved.
  13   * Contributor(s): ______________________________________.
  14   ********************************************************************************/
  15  /*********************************************************************************
  16   * $Header$
  17   * Description:  Contains a variety of utility functions used to display UI 
  18   * components such as form headers and footers.  Intended to be modified on a per 
  19   * theme basis.
  20   ********************************************************************************/
  21  
  22  require_once ('include/logging.php');
  23  global $app_strings;
  24  
  25  $log = LoggerManager::getLogger('layout_utils');    
  26  
  27  /**
  28   * Create HTML to display formatted form title of a form in the left pane
  29   * param $left_title - the string to display as the title in the header
  30   */
  31  function get_left_form_header ($left_title) 
  32  {
  33  global $image_path;
  34  
  35  $the_header = <<<EOQ
  36         <table width="100%" cellpadding="0" cellspacing="0" border="0"><tbody><tr>
  37             <td width="4" height="20"><img src="$image_path/head_start.gif"></td>    
  38          <td class="leftFormHeader" vAlign="middle" align="left" noWrap height="20">$left_title</td>
  39          <td width="4" height="20"><img src="$image_path/head_end.gif"></td>    
  40          </tr></tbody></table>
  41          <table width="100%" cellpadding="3" cellspacing="0" border="0" class="formOuterBorder"><tbody><tr><td align="left">
  42  EOQ;
  43  
  44  return $the_header;
  45  }
  46  
  47  /**
  48   * Create HTML to display formatted form footer of form in the left pane.
  49   */
  50  function get_left_form_footer() {
  51  return ("</td></tr></tbody></table>\n");
  52  }
  53  
  54  /**
  55   * Create HTML to display formatted form title.
  56   * param $form_title - the string to display as the title in the header
  57   * param $other_text - the string to next to the title.  Typically used for form buttons.
  58   * param $show_help - the boolean which determines if the print and help links are shown.
  59   */
  60  function get_form_header ($form_title, $other_text, $show_help) 
  61  {
  62  global $image_path;
  63  global $app_strings;
  64  
  65  $the_form = <<<EOQ
  66  <!--table width="100%" cellpadding="0" cellspacing="0" border="0" class="formHeaderULine"><tbody><tr>
  67        <td valign="bottom">
  68         <table width="100%" cellpadding="0" cellspacing="0" border="0"><tbody><tr>
  69          <td vAlign="middle" class="formHeader" align="left" noWrap height="15">$form_title&nbsp;</td>
  70          </tr></tbody></table></td-->
  71  EOQ;
  72  
  73  if ($other_text) {
  74      $the_form .= "<td width='20'><IMG height='1' src='include/images/blank.gif'></td>\n";
  75      $the_form .= "<td valign='bottom' class='formHeader' width='100%'>$other_text</td>\n";
  76  }
  77  else {
  78      $the_form .= "<td><IMG height='1' src='include/images/blank.gif'></td>\n";
  79  }
  80  
  81  if ($show_help==true) {
  82       $the_form .= "<td class='bodySmall' align='right'>[ <A href='phprint.php?jt=".session_id().$GLOBALS['request_string']."'>".$app_strings['LNK_PRINT']."</A> ]</td>\n";
  83       $the_form .= "<td class='bodySmall' align='right'>[ <A href='http://www.vtiger.com/products/crm/document.html' target='_blank'>".$app_strings['LNK_HELP']."</A> ]</td>\n";
  84  }
  85  
  86  $the_form .= <<<EOQ
  87        </tr>
  88  </tbody></table>
  89  EOQ;
  90  
  91  return $the_form;
  92  }
  93  
  94  /**
  95   * Create HTML to display formatted form footer
  96   */
  97  function get_form_footer() {
  98  
  99  }
 100  
 101  /**
 102   * Create HTML to display formatted module title.
 103   * param $module - the string to next to the title.  Typically used for form buttons.
 104   * param $module_title - the string to display as the module title
 105   * param $show_help - the boolean which determines if the print and help links are shown.
 106   */
 107  function get_module_title ($module, $module_title, $show_help) {
 108  global $image_path;
 109  global $app_strings;
 110  
 111  $the_title = "<table width='100%' cellpadding='0' cellspacing='0' border='0'><tbody><tr><td>\n";
 112  $the_title .= "<table cellpadding='0' cellspacing='0' border='0'><tbody><tr>\n";
 113  $the_title .= "<td vAlign='middle' align='center'>\n";
 114          
 115  if (is_file($image_path.$module.".gif")) {
 116      $the_title .= "<IMG src='".$image_path.$module.".gif' border='0'>\n";
 117  }
 118  
 119  $the_title .= "</td><td class='moduleTitle' vAlign='middle' align='left' noWrap width='100%'>&nbsp;";
 120  $the_title .= $module_title."</td></tr></tbody></table></td>\n";
 121  $the_title .= "<td width='100%'><IMG height='1' src='include/images/blank.gif'></td>";
 122  
 123  if ($show_help) {
 124  //    $the_title .= "<td class='bodySmall' nowrap align='right'> <A href='phprint.php?jt=".session_id().$GLOBALS['request_string']."'><img align=absmiddle hspace=3 border=0 src='".$image_path."print.gif'>".$app_strings['LNK_PRINT']."</A> &nbsp;</td>\n";
 125  //    $the_title .= "<td class='bodySmall' nowrap align='right'> <A href='http://www.vtiger.com/products/crm/document.html' target='_blank'><img align=absmiddle hspace=3 border=0 src='".$image_path."help_icon.gif'>".$app_strings['LNK_HELP']."</A></td>\n";
 126  }
 127  else {
 128      $the_title .= "<td class='bodySmall' align='right'>&nbsp;</td>\n";
 129      $the_title .= "<td class='bodySmall' align='right'>&nbsp;</td>\n";
 130  }
 131  
 132  $the_title .= "</tr><tr><td colspan='4' width='100%' class='hline'><IMG width='100%' height='1' src='".$image_path."blank.gif'></td>";
 133  $the_title .= "</tr></tbody></table>\n";
 134  
 135  return $the_title;
 136  
 137  }
 138  
 139  /**
 140   * Create a header for a popup.
 141   * param $theme - The name of the current theme
 142   */
 143  function insert_popup_header($theme)
 144  {
 145  global $app_strings, $default_charset;
 146  $charset = $default_charset;
 147  
 148  if(isset($app_strings['LBL_CHARSET']))
 149  {
 150      $charset = $app_strings['LBL_CHARSET'];
 151  }
 152  
 153  $out  = '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">';
 154  $out .=    '<HTML><HEAD>';
 155  $out .=    '<meta http-equiv="Content-Type" content="text/html; charset='.$charset.'">';
 156  $out .=    '<title>'.$app_strings['LBL_BROWSER_TITLE'].'</title>';
 157  $out .=    '<style type="text/css">@import url("themes/'.$theme.'/style.css"); </style>';
 158  $out .=    '</HEAD><BODY leftMargin="5" topMargin="5" MARGINHEIGHT="0" MARGINWIDTH="0">';
 159  
 160  echo $out;
 161  }
 162  
 163  /**
 164   * Create a footer for a popup.
 165   */
 166  function insert_popup_footer()
 167  {
 168  echo <<< EOQ
 169      </BODY>
 170      </HTML>
 171  EOQ;
 172  }
 173  
 174  ?>


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