website view lib/rand-sponsor.php @ rev 1002

ru: news/index.php translated
author Aleksej Bobylev <al.bobylev@gmail.com>
date Tue Mar 27 02:48:55 2012 +0300 (2012-03-27)
parents 304b3f1894f7
children 7f4e78f7e0cc
line source
1 <?php
2 //
3 // Display random sponsor. Only main sponsor are featured on main page.
4 //
6 $total = "3";
7 $folder = "/images/sponsor";
8 $random = mt_rand(1, $total);
10 switch($random) {
11 case 1:
12 $name = "Allied Data Sys";
13 $img = "ads.png";
14 $url = "http://www.ads-lu.com/";
15 break;
16 case 2:
17 $name = "DuckDuckGo";
18 $img = "ddg.png";
19 $url = "https://duckduckgo.com/";
20 break;
21 case 3:
22 $name = "Clarkson Open Source Institute";
23 $img = "cosi.png";
24 $url = "http://cosi.clarkson.edu/";
25 break;
26 }
28 echo "<a href='$url'><img src='$folder/$img' title='$name' alt='[ $name ]' /></a>";
30 ?>