| <?php |
| /******************************************************************************* |
| * Copyright (c) 2013 Eclipse Foundation and others. |
| * All rights reserved. This program and the accompanying materials |
| * are made available under the terms of the Eclipse Public License v1.0 |
| * which accompanies this distribution, and is available at |
| * http://www.eclipse.org/legal/epl-v10.html |
| * |
| * Contributors: |
| * Christopher Guindon (Eclipse Foundation)- initial API and implementation |
| *******************************************************************************/ |
| |
| //if name of the file requested is the same as the current file, the script will exit directly. |
| if(basename(__FILE__) == basename($_SERVER['PHP_SELF'])){exit();} |
| |
| if (isset($_GET['debug'])) { |
| print_r($Friend->getFriendID() . "<br />"); |
| print_r($Friend->getBugzillaID() . "<br />"); |
| print_r($Friend->getFirstName() . "<br />"); |
| print_r($Friend->getLastName() . "<br />"); |
| print_r($Friend->getDateJoined() . "<br />"); |
| print_r($Friend->getIsAnonymous() . "<br />"); |
| print_r($Friend->getIsBenefit() . "<br />"); |
| print_r($Friend->getEmail() . "<br />"); |
| print_r($Friend->getBenefitExpires() . "<br />"); |
| } |
| |
| if($Friend->getIsBenefit()) { |
| $fs = substr($Friend->getDateJoined(),0,10); |
| $exp = substr($Friend->getBenefitExpires(),0,10); |
| |
| $showFriendsView = "none"; |
| $showFriendsToggle = "View Friends of Eclipse status."; |
| $hideFriendsToggle = "Hide Friends status."; |
| $friendsDetails = $showFriendsToggle; |
| if(!preg_match("/.*myaccount.php/", $_SERVER['PHP_SELF']) && !$Friend->getIsCommitter()) { |
| $showFriendsView = "inline"; |
| $friendsDetails = $hideFriendsToggle; |
| } |
| ?> |
| <br /> |
| <div class="section"> |
| <p><a href="#" onclick="fnToggleFriends();"><img class="section_icon" src="images/stars.png" width="40" alt="Icon_Friends" /><label id="friendslabel" class='visibility_toggle'><?= $friendsDetails ?></label></a></p> |
| <div id="friends" style="display:<?= $showFriendsView ?>;"> |
| <p>As a Friend of Eclipse, you can use the Friends mirror to get fast downloads from the eclipse.org servers. *<br /><br /> |
| <b>Friend Since</b>: <?= $fs ?><br /> |
| <b>Benefits Expire</b>: <?= $exp ?></p> |
| <div style="clear:both"> |
| <p class="footNote">* Eclipse Foundation Inc. cannot guarantee that the Friends mirror will be faster than its other mirrors, however it will give users of this mirror priority.</p> |
| </div> |
| <p><h2>Logo</h2>If you wish to link to the Friends of Eclipse Logo on your website or blog please use of the codes below:</p> |
| <table width="100%"> |
| <tr> |
| <td><img src="images/friendslogo.png"/></td> |
| <td align="right"><textarea style="width: 400px; height: 70px;"><img src="http://eclipse.org/donate/images/friendslogo.png"/></textarea></td> |
| </tr> |
| <tr> |
| <td><img src="images/friendslogo200.png"></td> |
| <td align="right"><textarea style="width: 400px; height: 70px;"><img src="http://eclipse.org/donate/images/friendslogo200.png"></textarea></td> |
| </tr> |
| <tr> |
| <td><img src="images/friendslogo160.png"></td> |
| <td align="right"><textarea style="width: 400px; height: 70px;"><img src="http://eclipse.org/donate/images/friendslogo160.png"></textarea></td> |
| </tr> |
| </table> |
| </div> |
| </div> |
| |
| <script language="javascript"> |
| function fnToggleFriends() { |
| if(document.getElementById('friends').style.display == "none") { |
| document.getElementById('friends').style.display = "inline"; |
| document.getElementById('friendslabel').innerHTML = "<?= $hideFriendsToggle ?>"; |
| } |
| else { |
| document.getElementById('friends').style.display = "none"; |
| document.getElementById('friendslabel').innerHTML = "<?= $showFriendsToggle ?>"; |
| } |
| } |
| </script> |
| <?php |
| } |
| ?> |