[ Index ] |
|
Code source de vtiger CRM 5.0.2 |
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: /advent/projects/wesat/vtiger_crm/sugarcrm/modules/Dashboard/index.php,v 1.2 2004/10/06 09:02:05 jack Exp $ 17 * Description: Main file for the Home module. 18 * Portions created by SugarCRM are Copyright (C) SugarCRM, Inc. 19 * All Rights Reserved. 20 * Contributor(s): ______________________________________.. 21 ********************************************************************************/ 22 23 global $app_strings; 24 global $app_list_strings; 25 global $mod_strings; 26 27 global $currentModule; 28 global $theme; 29 $theme_path="themes/".$theme."/"; 30 $image_path=$theme_path."images/"; 31 require_once ($theme_path.'layout_utils.php'); 32 require_once ('include/logging.php'); 33 34 $graph_array = Array( 35 "DashboardHome" => $mod_strings['DashboardHome'], 36 "leadsource" => $mod_strings['leadsource'], 37 "leadstatus" => $mod_strings['leadstatus'], 38 "leadindustry" => $mod_strings['leadindustry'], 39 "salesbyleadsource" => $mod_strings['salesbyleadsource'], 40 "salesbyaccount" => $mod_strings['salesbyaccount'], 41 "salesbyuser" => $mod_strings['salesbyuser'], 42 "salesbyteam" => $mod_strings['salesbyteam'], 43 "accountindustry" => $mod_strings['accountindustry'], 44 "productcategory" => $mod_strings['productcategory'], 45 "productbyqtyinstock" => $mod_strings['productbyqtyinstock'], 46 "productbypo" => $mod_strings['productbypo'], 47 "productbyquotes" => $mod_strings['productbyquotes'], 48 "productbyinvoice" => $mod_strings['productbyinvoice'], 49 "sobyaccounts" => $mod_strings['sobyaccounts'], 50 "sobystatus" => $mod_strings['sobystatus'], 51 "pobystatus" => $mod_strings['pobystatus'], 52 "quotesbyaccounts" => $mod_strings['quotesbyaccounts'], 53 "quotesbystage" => $mod_strings['quotesbystage'], 54 "invoicebyacnts" => $mod_strings['invoicebyacnts'], 55 "invoicebystatus" => $mod_strings['invoicebystatus'], 56 "ticketsbystatus" => $mod_strings['ticketsbystatus'], 57 "ticketsbypriority" => $mod_strings['ticketsbypriority'], 58 "ticketsbycategory" => $mod_strings['ticketsbycategory'], 59 "ticketsbyuser" => $mod_strings['ticketsbyuser'], 60 "ticketsbyteam" => $mod_strings['ticketsbyteam'], 61 "ticketsbyproduct"=> $mod_strings['ticketsbyproduct'], 62 "contactbycampaign"=> $mod_strings['contactbycampaign'], 63 "ticketsbyaccount"=> $mod_strings['ticketsbyaccount'], 64 "ticketsbycontact"=> $mod_strings['ticketsbycontact'], 65 ); 66 67 $log = LoggerManager::getLogger('dashboard'); 68 if(isset($_REQUEST['type']) && $_REQUEST['type'] != '') 69 { 70 $dashboard_type = $_REQUEST['type']; 71 }else 72 { 73 $dashboard_type = 'DashboardHome'; 74 } 75 ?> 76 77 <TABLE border=0 cellspacing=0 cellpadding=0 width=100% class=small> 78 <tr><td style="height:2px"></td></tr> 79 <tr> 80 <td style="padding-left:10px;padding-right:30px" class="moduleName" width="20%" nowrap><?php echo $app_strings['Analytics'];?> > <a class="hdrLink" href="index.php?action=index&parenttab=Analytics&module=Dashboard"><?php echo $app_strings['Dashboard'] ?></a></td> 81 82 <td nowrap width="8%"> 83 <table border=0 cellspacing=0 cellpadding=0> 84 <tr> 85 <td class="sep1" style="width:1px;"></td> 86 <td class=small> 87 <table border=0 cellspacing=0 cellpadding=5> 88 <tr> 89 <td style="padding-right:0px;padding-left:10px;"><img src="<?php echo $image_path;?>btnL3Add-Faded.gif" border=0></td> 90 <td style="padding-right:10px"><img src="<?php echo $image_path;?>btnL3Search-Faded.gif" border=0></td> 91 </tr> 92 </table> 93 </td> 94 </tr> 95 </table> 96 </td> 97 <td width="20"> </td> 98 <td class="small" width="10%" align="left"> 99 <table border=0 cellspacing=0 cellpadding=5> 100 101 <tr> 102 <td style="padding-right:0px;padding-left:10px;"><a href="javascript:;" onClick='fnvshobj(this,"miniCal");getMiniCal("parenttab=My Home Page");'><img src="<?php echo $image_path;?>btnL3Calendar.gif" alt="<?php echo $app_strings['LBL_CALENDAR_ALT']; ?>" title="<?php echo $app_strings['LBL_CALENDAR_TITLE']; ?>" border=0></a></a></td> 103 <td style="padding-right:0px"><a href="javascript:;"><img src="<?php echo $image_path;?>btnL3Clock.gif" alt="<?php echo $app_strings['LBL_CLOCK_ALT']; ?>" title="<?php echo $app_strings['LBL_CLOCK_TITLE']; ?>" border=0 onClick="fnvshobj(this,'wclock');"></a></a></td> 104 <td style="padding-right:0px"><a href="#"><img src="<?php echo $image_path;?>btnL3Calc.gif" alt="<?php echo $app_strings['LBL_CALCULATOR_ALT']; ?>" title="<?php echo $app_strings['LBL_CALCULATOR_TITLE']; ?>" border=0 onClick="fnvshobj(this,'calculator_cont');fetch_calc();"></a></td> 105 <td style="padding-right:10px"><a href="javascript:;" onClick='return window.open("index.php?module=Contacts&action=vtchat","Chat","width=600,height=450,resizable=1,scrollbars=1");'><img src="<?php echo $image_path;?>tbarChat.gif" alt="<?php echo $app_strings['LBL_CHAT_ALT']; ?>" title="<?php echo $app_strings['LBL_CHAT_TITLE']; ?>" border=0></a> 106 </td> 107 </tr> 108 </table> 109 </td> 110 <td width="20"> </td> 111 <td class="small" align="left" width="5%"> 112 <table border=0 cellspacing=0 cellpadding=5> 113 <tr> 114 <td style="padding-right:0px;padding-left:10px;"><img src="<?php echo $image_path;?>tbarImport-Faded.gif" border="0"></td> 115 <td style="padding-right:10px"><img src="<?php echo $image_path;?>tbarExport-Faded.gif" border="0"></td> 116 </tr> 117 </table> 118 </td> 119 <td width="20"> </td> 120 <td class="small" align="left"> 121 <table border=0 cellspacing=0 cellpadding=5> 122 <tr> 123 <td style="padding-left:10px;"><a href="javascript:;" onmouseout="fninvsh('allMenu');" onClick="fnvshobj(this,'allMenu')"><img src="<?php echo $image_path;?>btnL3AllMenu.gif" alt="<?php echo $app_strings['LBL_ALL_MENU_ALT']; ?>" title="<?php echo $app_strings['LBL_ALL_MENU_TITLE']; ?>" border="0"></a></td> 124 </tr> 125 </table> 126 </td> 127 </tr> 128 </table> 129 </td> 130 131 </tr> 132 <tr><td style="height:2px"></td></tr> 133 </TABLE> 134 <br> 135 136 <script language="JAVASCRIPT" type="text/javascript" src="include/js/smoothscroll.js"></script> 137 <a name="top"></a> 138 <table border=0 cellspacing=0 cellpadding=0 width=98% align=center> 139 <tr> 140 <td valign=top><img src="<?php echo $image_path;?>showPanelTopLeft.gif"></td> 141 142 <td class="showPanelBg" valign="top" width=100% style="padding:10px;"> 143 144 <table width="100%" border="0" cellpadding="0" cellspacing="0"> 145 <tr> 146 <td width="100%"> 147 <!-- DASHBOARD DEGINS HERE --> 148 <table width="100%" border="0" cellpadding="0" cellspacing="0" class="small"> 149 <tr> 150 <td class="dash_top" colspan="3"> 151 <!-- TOP SELECT OPTION --> 152 <table width="100%" cellpadding="0" cellspacing="0" border="0"> 153 <tr> 154 <td width="3%"> </td> 155 <td align="left"> 156 <table border="0" cellpadding="0" cellspacing="5" class="dashSelectBg"> 157 <tr> 158 <td> 159 <select name="dashordlists" id="dashboard_combo" onChange="loadDashBoard(this);"> 160 <?php 161 foreach($graph_array as $key=>$value) 162 { 163 if($dashboard_type == $key) 164 { 165 $dash_board_title = $value; 166 ?><option selected value="<?php echo $key;?>"><?php echo $value;?></option><?php 167 }else 168 { 169 ?><option value="<?php echo $key;?>"><?php echo $value;?></option> 170 <?php } 171 } ?> 172 </select> 173 </td> 174 </tr> 175 </table> 176 177 </td> 178 <td align="right" class="dashHeading"><?php echo $mod_strings['LBL_DASHBOARD'] ?></td> 179 <td width="3%"> </td> 180 181 </tr> 182 </table> 183 <!-- END OF TOP SELECTION --> 184 </td> 185 </tr> 186 <tr> 187 <td class="dash_border" width="1%"><img src="<?php echo $image_path;?>dash_screw.gif" border="0" align="absmiddle"></td> 188 <td class="hdrNameBg small" style="height: 12px;" width="98%"> </td> 189 <td class="dash_border" width="1%"><img src="<?php echo $image_path;?>dash_screw.gif" border="0" align="absmiddle"></td> 190 191 </tr> 192 <tr> 193 <td class="dash_border"> </td> 194 <td class="dash_white genHeaderBig dash_bdr_btm"> 195 <table width="100%" border="0" cellpadding="0" cellspacing="0"> 196 <tr> 197 <td width="90%" nowrap> 198 <?php echo $app_strings['Dashboard']; ?> > <?php echo $app_strings['Home'];?> > <span id="dashTitle_div"><?php echo $dash_board_title; ?></span> 199 </td> 200 <td align="right" width="10%"><img alt="<?php echo $mod_strings['NORMALVIEW'];?>" title="<?php echo $mod_strings['NORMALVIEW'];?>" style="cursor:pointer;" onClick="changeView('NORMAL');" src="<?php echo $image_path;?>dboardNormalView.gif" align="absmiddle" border="0"> | <img alt="<?php echo $mod_strings['GRIDVIEW'];?>" title="<?php echo $mod_strings['GRIDVIEW'];?>" style="cursor:pointer;" onClick="changeView('MATRIX');" src="<?php echo $image_path;?>dboardMatrixView.gif" align="absmiddle" border="0"></td> 201 </tr> 202 </table> 203 </td> 204 <td class="dash_border"> </td> 205 </tr> 206 207 <tr> 208 <td class="dash_border"> </td> 209 <td class="dash_white" style="height:500px;"><div id="dashChart"> 210 <!-- NAVIGATION TABLE --> 211 <table width="100%" border="0" cellpadding="0" cellspacing="0"> 212 <tr> 213 214 <td width="45%" align="right"> 215 </td> 216 </tr> 217 218 </table> 219 <!-- END OF NAVIGATION --> 220 <!-- CHART ONE TABLE --> 221 <table width="100%" border="0" cellpadding="0" cellspacing="0"> 222 <tr> 223 <td height="300"> 224 225 <?php 226 if(!isset($_REQUEST['type'])) 227 { 228 if(isset($_REQUEST['display_view']) && $_REQUEST['display_view'] == 'MATRIX') 229 { 230 require_once ('modules/Dashboard/DashboardHome_matrix.php'); 231 }else 232 { 233 require_once ('modules/Dashboard/DashboardHome.php'); 234 } 235 }else 236 { 237 require_once ('modules/Dashboard/display_charts.php'); 238 } 239 ?> 240 </td> 241 </tr> 242 </table> 243 <!-- End of CHART 1 --> 244 245 </div></td> 246 <td class="dash_border"> </td> 247 </tr> 248 249 <tr> 250 <td class="dash_border" width="1%"><img src="<?php echo $image_path;?>dash_screw.gif" border="0" align="absmiddle"></td> 251 <td class="dash_white" width="98%"> </td> 252 <td class="dash_border" width="1%"><img src="<?php echo $image_path;?>dash_screw.gif" border="0" align="absmiddle"></td> 253 </tr> 254 <tr> 255 <td colspan="3" class="dash_bottom"> 256 <!-- BOTTOM NAVICATION --> 257 <table width="100%" cellpadding="0" cellspacing="0" border="0"> 258 259 <tr> 260 <td width="3%"> </td> 261 <td align="left"> <table border="0" cellpadding="0" cellspacing="5" class="dashSelectBg"> 262 <tr> 263 <td><select name="dashordlists" id="dashboard_combo1" onChange="loadDashBoard(this);"> 264 <?php 265 foreach($graph_array as $key=>$value) 266 { 267 if($dashboard_type == $key) 268 { 269 $dash_board_title = $value; 270 ?> 271 <option selected value="<?php echo $key;?>"><?php echo $value;?></option> 272 <?php 273 }else 274 { 275 ?> 276 <option value="<?php echo $key;?>"><?php echo $value;?></option> 277 <?php } 278 } ?> 279 </select> 280 </td> 281 </tr> 282 </table></td> 283 <td align="right"> </td> 284 <td width="3%"> </td> 285 </tr> 286 </table> 287 <!-- END OF BOTTOM NAVIGATION --> 288 </td> 289 </tr> 290 <tr> 291 292 <td colspan="3"> 293 <table width="100%" border="0" cellpadding="0" cellspacing="0"> 294 <tr> 295 <td width="112"><img src="<?php echo $image_path;?>dash_btm_left.jpg" border="0" align="absmiddle"></td> 296 <td width="100%" class="dash_btm"> </td> 297 <td width="129"><img src="<?php echo $image_path;?>dash_btm_right.jpg" border="0" align="absmiddle"></td> 298 </tr> 299 </table> 300 </td> 301 302 </tr> 303 </table> 304 <!-- END --> 305 </td> 306 </tr> 307 </table> 308 </td> 309 <td valign=top><img src="<?php echo $image_path;?>showPanelTopRight.gif"></td> 310 </tr> 311 </table> 312 313 </body> 314 </html> 315 316 317 <script language="javascript" type="text/javascript" src="include/scriptaculous/prototype.js"></script> 318 <script language="javascript" type="text/javascript" src="include/scriptaculous/scriptaculous.js"></script> 319 <script> 320 function loadDashBoard(oSelect) 321 { 322 Effect.Fade("dashChart"); 323 var oCombo = $('dashboard_combo'); 324 var oCombo1 = $('dashboard_combo1'); 325 oCombo.selectedIndex = oSelect.selectedIndex; 326 oCombo1.selectedIndex = oSelect.selectedIndex; 327 var type = oSelect.options[oSelect.selectedIndex].value; 328 if(type != 'DashboardHome') 329 url = 'module=Dashboard&action=DashboardAjax&display_view='+gdash_display_type+'&file=display_charts&type='+type; 330 else 331 url = 'module=Dashboard&action=DashboardAjax&file=DashboardHome&display_view='+gdash_display_type; 332 new Ajax.Request( 333 'index.php', 334 {queue: {position: 'end', scope: 'command'}, 335 method: 'post', 336 postBody: url, 337 onComplete: function(response) 338 { 339 $("dashChart").innerHTML=response.responseText; 340 Effect.Appear("dashChart"); 341 var dashst = document.getElementById('dash_script'); 342 eval(dashst.innerHTML); 343 $("dashTitle_div").innerHTML = oCombo.options[oCombo.selectedIndex].text; 344 } 345 } 346 ); 347 } 348 349 function changeView(displaytype) 350 { 351 gdash_displaytype = displaytype; 352 var oCombo = $('dashboard_combo'); 353 var type = oCombo.options[oCombo.selectedIndex].value; 354 if(type == 'DashboardHome') 355 { 356 if(displaytype == 'MATRIX') 357 url = 'index.php?module=Dashboard&action=index&display_view=MATRIX'; 358 else 359 url = 'index.php?module=Dashboard&action=index&display_view=NORMAL'; 360 } 361 else 362 { 363 if(displaytype == 'MATRIX') 364 url = 'index.php?module=Dashboard&action=index&display_view=MATRIX&type='+type; 365 else 366 url = 'index.php?module=Dashboard&action=index&display_view=NORMAL&type='+type; 367 } 368 window.document.location.href = url; 369 370 } 371 </script>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Sun Feb 25 10:22:19 2007 | par Balluche grâce à PHPXref 0.7 |