]> CyberLeo.Net >> Repos - Github/sugarcrm.git/blob - modules/Home/PopupSugar.php
Release 6.5.0
[Github/sugarcrm.git] / modules / Home / PopupSugar.php
1 <!--
2 /*********************************************************************************
3  * SugarCRM Community Edition is a customer relationship management program developed by
4  * SugarCRM, Inc. Copyright (C) 2004-2012 SugarCRM Inc.
5  * 
6  * This program is free software; you can redistribute it and/or modify it under
7  * the terms of the GNU Affero General Public License version 3 as published by the
8  * Free Software Foundation with the addition of the following permission added
9  * to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
10  * IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
11  * OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
12  * 
13  * This program is distributed in the hope that it will be useful, but WITHOUT
14  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
15  * FOR A PARTICULAR PURPOSE.  See the GNU Affero General Public License for more
16  * details.
17  * 
18  * You should have received a copy of the GNU Affero General Public License along with
19  * this program; if not, see http://www.gnu.org/licenses or write to the Free
20  * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
21  * 02110-1301 USA.
22  * 
23  * You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
24  * SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
25  * 
26  * The interactive user interfaces in modified source and object code versions
27  * of this program must display Appropriate Legal Notices, as required under
28  * Section 5 of the GNU Affero General Public License version 3.
29  * 
30  * In accordance with Section 7(b) of the GNU Affero General Public License version 3,
31  * these Appropriate Legal Notices must retain the display of the "Powered by
32  * SugarCRM" logo. If the display of the logo is not reasonably feasible for
33  * technical reasons, the Appropriate Legal Notices must display the words
34  * "Powered by SugarCRM".
35  ********************************************************************************/
36
37 /*********************************************************************************
38  * Header: /cvsroot/sugarcrm/sugarcrm/modules/Products/ListView.html,v 1.4 2004/07/02 07:02:27 sugarclint Exp {APP.LBL_LIST_CURRENCY_SYM}
39  ********************************************************************************/
40 -->
41
42 <body style="margin: 0px;">
43 <?php
44 if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
45 global $theme;
46
47 insert_popup_header($theme);
48
49 $sugarteam = array( 'Julian Ostrow', 'Lam Huynh', 'Majed Itani', 'Joey Parsons', 'Ajay Gupta', 'Jason Nassi', 'Andy Dreisch', 'Roger Smith', 'Liliya Bederov', 'Sadek Baroudi', 'Franklin Liu', 'Jennifer Yim', 'Sujata Pamidi', 'Eddy Ramirez', 'Jenny Gonsalves', 'Collin Lee', 'David Wheeler', 'John Mertic', 'Ran Zhou', 'Shine Ye','Emily Gan','Randy Lee','Eric Yang','Oliver Yang','Andreas Sandberg');
50 switch($_REQUEST['style']){
51         case 'rev':
52                         $sugarteam = array_map('strrev', $sugarteam);
53                         break;
54         case 'rand':
55                         shuffle($sugarteam);
56                         break;
57         case 'dec':
58                         $sugarteam = array_reverse($sugarteam);
59                         break;
60         case 'sort':
61                          sort($sugarteam);
62                          break;
63         case 'rsort':
64                          rsort($sugarteam);
65                          break;
66                          
67 }
68
69 $founders = array("<b>Founders:</b>", 'John Roberts', 'Clint Oram', 'Jacob Taylor');
70
71 $body =  implode('<br>', $founders) . "<br><br><b>Developers:</b><br>" . implode('<br>', $sugarteam);
72 ?>
73 <script>
74         var user_notices = new Array();
75         var delay = 25000
76         var index = 0;
77         var lastIndex = 0;
78         var scrollerHeight=200
79         var bodyHeight = ''
80         var scrollSpeed = 1;
81         var curTeam = 'all';
82         var scrolling = true;
83
84
85         
86
87
88         function stopNotice(){
89                         scrolling = false;
90         }
91         function startNotice(){
92                         scrolling = true;
93         }
94         function scrollNotice(){
95
96                 if(scrolling){
97                 
98                 var body = document.getElementById('NOTICEBODY')
99                 var daddy = document.getElementById('daddydiv')
100
101                 if(parseInt(body.style.top) > bodyHeight *-1 ){
102
103                         body.style.top = (parseInt(body.style.top) - scrollSpeed) + 'px';
104
105                 }else{
106                         
107                         body.style.top =scrollerHeight + "px"
108                 }
109                 }
110
111                 setTimeout("scrollNotice()", 50);
112
113         }
114         function nextNotice(){
115
116
117
118                 body = document.getElementById('NOTICEBODY');
119                 if(scrolling){
120                                 body.style.top = scrollerHeight/2 +'px'
121                                 bodyHeight= parseInt(body.offsetHeight);
122                 }
123                                 
124
125                 }
126         
127
128
129 </script>
130 <div style="width: 300px; height: 400px; text-align: center; border:0; padding: 5px;">
131 <div id='daddydiv' style="position:relative;width=100%;height:350px;overflow:hidden">
132 <div id='NOTICEBODY' style="position:absolute;left:0px;top:0px;width:100%;z-index: 1; text-align: left;">
133 <?php echo $body; ?>
134 </div>
135 </div>
136 <script>
137 if(window.addEventListener){
138         window.addEventListener("load", nextNotice, false);
139         window.addEventListener("load", scrollNotice, false);
140 }else{
141         window.attachEvent("onload", nextNotice);
142         window.attachEvent("onload", scrollNotice);
143 }
144 </script>
145
146