Browse Source

dos2unix it all

srsly, why is this even necessary in this day and age
Arun Raghavan 8 years ago
parent
commit
73f17ee45d
2 changed files with 224 additions and 224 deletions
  1. 152
    152
      index.php
  2. 72
    72
      style.css

+ 152
- 152
index.php View File

@@ -1,152 +1,152 @@
1
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2
-        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
-<?php
4
-///////////////////////////////////////////
5
-// Originally written by kitallis.       //
6
-// Un-failed and featurized by nirbheek. //
7
-///////////////////////////////////////////
8
-$hacker_links = array(
9
-	"beachbrake" => "http://www.priyakuber.in/",
10
-	"devilsadvocate" => "http://blog.chintal.in/",
11
-	"Ford_Prefect" => "http://arunraghavan.net",
12
-	"GeneralMaximus" => "http://uncool.in",
13
-	"Gurpartap" => "http://gurpartap.com",
14
-	"ideamonk" => "http://ideamonk.in/",
15
-	"iwikiwi" => "http://blog.vdavuluri.info/",
16
-	"jai" => "http://www.retroficial.org/",
17
-	"kitallis" => "http://code.scrapcrap.org",
18
-	"kstar" => "http://kstars.wordpress.com/",
19
-	"lifeeth" => "http://lifeeth.in",
20
-	"lut4rp" => "http://pratul.in",
21
-	"nikkar" => "http://github.com/Gurpartap/nikkar/",
22
-	"nirbheek" => "http://bheekly.blogspot.com",
23
-	"sid0" => "http://monogatari.doukut.su",
24
-	"Stattrav" => "http://suryajith.in/",
25
-	"Sup3rkiddo" => "http://sudharsh.wordpress.com/",
26
-	"t3rmin4t0r" => "http://notmysock.org",
27
-	"YuviPanda" => "http://yuvi.in",
28
-	"shadeslayer" => "http://kshadeslayer.wordpress.com/",
29
-);
30
-
31
-$hacker_alts = array("Gurpartap" => "balle balle?",
32
-	"nirbheek" => "did your mom.",
33
-	"lut4rp" => "The Quintessential Nice Guy ®");
34
-
35
-$known_pic_types = array("gif", "jpg", "png", "svg");
36
-
37
-// We use a comma because that isn't allowed in OFTC nicks
38
-$default_avatar_dir = "default,";
39
-
40
-// no. of columns to divide the nicks into; must exist in CSS
41
-$num_cols = 3;
42
-
43
-$hacker_nicks = array_keys($hacker_links);
44
-shuffle($hacker_nicks);
45
-
46
-function get_default_avatar($nick) {
47
-	global $default_avatar_dir;
48
-	// Prevent infinite recursion
49
-	if ($nick != $default_avatar_dir)
50
-		get_avatar($default_avatar_dir);
51
-	return;
52
-}
53
-
54
-function get_avatar($nick) {
55
-	global $known_pic_types;
56
-	$dir = "avatars/";
57
-	$avatar_dir = $dir.$nick."/";
58
-
59
-	if (!is_dir($avatar_dir)) {
60
-		// lolwat no avatar dir, try default dir
61
-		get_default_avatar($nick);
62
-		return;
63
-	}
64
-
65
-	$avatars = scandir($avatar_dir);
66
-	shuffle($avatars);
67
-	// Avatars list contains '.' and '..'
68
-	if (count($avatars) === 2) {
69
-		// lolwat empty avatar dir, try default dir
70
-		get_default_avatar($nick);
71
-		return;
72
-	}
73
-
74
-	foreach ($avatars as $avatar) {
75
-		if (in_array(substr($avatar, -3), $known_pic_types)) { 
76
-			echo $avatar_dir.$avatar;
77
-			return;
78
-		}
79
-	}
80
-}
81
-
82
-function get_blurb($nick) {
83
-	$file_path = "blurbs/".$nick;
84
-	if (file_exists($file_path)) {
85
-	    $b = file($file_path);
86
-	    echo array_rand(array_flip($b), 1);
87
-	} else {
88
-	    echo "Description-less nub this person is.";
89
-	}
90
-}
91
-
92
-function get_nick_with_link($nick) {
93
-	global $hacker_links;
94
-	if (array_key_exists($nick, $hacker_links))
95
-		echo '<a href="'.$hacker_links[$nick].'">'.$nick.'</a>';
96
-}
97
-
98
-function get_nick_url($nick) {
99
-	global $hacker_links;
100
-	if (array_key_exists($nick, $hacker_links))
101
-		echo '<a href="'.$hacker_links[$nick].'">';
102
-}
103
-
104
-function get_title($nick) {
105
-	global $hacker_alts;
106
-	if (array_key_exists($nick, $hacker_alts))
107
-		echo $hacker_alts[$nick];
108
-}
109
-?>
110
-
111
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="cs" lang="cs"> 
112
- <head> 
113
-  <meta http-equiv="content-type" content="text/html; charset=utf-8"/> 
114
-  <link rel="stylesheet" href="style.css" type="text/css"/> 
115
-  <link href="favicon.ico" rel="icon" type="image/x-icon" />
116
-  <title>Hackers India • Indian F/OSS Hackers Collective</title> 
117
- </head> 
118
- <body> 
119
-	<div id="wrapper">
120
-		<div id="header">
121
-			<a href=""><img src="images/hi.png" title="#hackers-india"/></a>
122
-		</div>
123
-		<div id="content">
124
-			<?php for($n = 1; $n < $num_cols+1; $n++) { ?>
125
-			<div id="col<?php echo $n; ?>">
126
-				<?php
127
-				foreach($hacker_nicks as $i => $nick) {
128
-					if ((($i+1) % $num_cols) != ($n % $num_cols))
129
-						continue; // distribute nicks equally amongst the columns
130
-				?>
131
-				<h4><?php get_nick_with_link($nick); ?></h4>
132
-				<p>
133
-					<?php get_nick_url($nick); ?>
134
-					<img align="left" src="<?php get_avatar($nick); ?>" title="<?php get_title($nick) ?>"/>
135
-					</a><br/>
136
-					<?php get_blurb($nick); ?>
137
-				</p>
138
-				<!-- end of a hacker -->
139
-				<?php } ?>
140
-			</div>
141
-			<?php } ?>
142
-		</div>
143
-
144
-		<div id="footer">
145
-                        <h3><a href="http://ha.ckers.in/rules.html">The Constitution of hackers-india lies here.</a></h3><br/><br/>
146
-			<p>Warning: The climate of Hackers India may unknowingly vary from geek to sexist to silence to foo. Lifeforms unaccustomed to sudden change and unforseen levels of behaviour might be permanently affected.</p><br/>
147
-			<p>All rights reserved till the end of Time &mdash; #hackers-india @ irc.oftc.net</p><br/>
148
-			<p>Design by ideamonk, code by kitallis and nirbheek.</p>
149
-		</div>
150
-	</div>
151
- </body>
152
-</html>
1
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2
+        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
+<?php
4
+///////////////////////////////////////////
5
+// Originally written by kitallis.       //
6
+// Un-failed and featurized by nirbheek. //
7
+///////////////////////////////////////////
8
+$hacker_links = array(
9
+	"beachbrake" => "http://www.priyakuber.in/",
10
+	"devilsadvocate" => "http://blog.chintal.in/",
11
+	"Ford_Prefect" => "http://arunraghavan.net",
12
+	"GeneralMaximus" => "http://uncool.in",
13
+	"Gurpartap" => "http://gurpartap.com",
14
+	"ideamonk" => "http://ideamonk.in/",
15
+	"iwikiwi" => "http://blog.vdavuluri.info/",
16
+	"jai" => "http://www.retroficial.org/",
17
+	"kitallis" => "http://code.scrapcrap.org",
18
+	"kstar" => "http://kstars.wordpress.com/",
19
+	"lifeeth" => "http://lifeeth.in",
20
+	"lut4rp" => "http://pratul.in",
21
+	"nikkar" => "http://github.com/Gurpartap/nikkar/",
22
+	"nirbheek" => "http://bheekly.blogspot.com",
23
+	"sid0" => "http://monogatari.doukut.su",
24
+	"Stattrav" => "http://suryajith.in/",
25
+	"Sup3rkiddo" => "http://sudharsh.wordpress.com/",
26
+	"t3rmin4t0r" => "http://notmysock.org",
27
+	"YuviPanda" => "http://yuvi.in",
28
+	"shadeslayer" => "http://kshadeslayer.wordpress.com/",
29
+);
30
+
31
+$hacker_alts = array("Gurpartap" => "balle balle?",
32
+	"nirbheek" => "did your mom.",
33
+	"lut4rp" => "The Quintessential Nice Guy ®");
34
+
35
+$known_pic_types = array("gif", "jpg", "png", "svg");
36
+
37
+// We use a comma because that isn't allowed in OFTC nicks
38
+$default_avatar_dir = "default,";
39
+
40
+// no. of columns to divide the nicks into; must exist in CSS
41
+$num_cols = 3;
42
+
43
+$hacker_nicks = array_keys($hacker_links);
44
+shuffle($hacker_nicks);
45
+
46
+function get_default_avatar($nick) {
47
+	global $default_avatar_dir;
48
+	// Prevent infinite recursion
49
+	if ($nick != $default_avatar_dir)
50
+		get_avatar($default_avatar_dir);
51
+	return;
52
+}
53
+
54
+function get_avatar($nick) {
55
+	global $known_pic_types;
56
+	$dir = "avatars/";
57
+	$avatar_dir = $dir.$nick."/";
58
+
59
+	if (!is_dir($avatar_dir)) {
60
+		// lolwat no avatar dir, try default dir
61
+		get_default_avatar($nick);
62
+		return;
63
+	}
64
+
65
+	$avatars = scandir($avatar_dir);
66
+	shuffle($avatars);
67
+	// Avatars list contains '.' and '..'
68
+	if (count($avatars) === 2) {
69
+		// lolwat empty avatar dir, try default dir
70
+		get_default_avatar($nick);
71
+		return;
72
+	}
73
+
74
+	foreach ($avatars as $avatar) {
75
+		if (in_array(substr($avatar, -3), $known_pic_types)) { 
76
+			echo $avatar_dir.$avatar;
77
+			return;
78
+		}
79
+	}
80
+}
81
+
82
+function get_blurb($nick) {
83
+	$file_path = "blurbs/".$nick;
84
+	if (file_exists($file_path)) {
85
+	    $b = file($file_path);
86
+	    echo array_rand(array_flip($b), 1);
87
+	} else {
88
+	    echo "Description-less nub this person is.";
89
+	}
90
+}
91
+
92
+function get_nick_with_link($nick) {
93
+	global $hacker_links;
94
+	if (array_key_exists($nick, $hacker_links))
95
+		echo '<a href="'.$hacker_links[$nick].'">'.$nick.'</a>';
96
+}
97
+
98
+function get_nick_url($nick) {
99
+	global $hacker_links;
100
+	if (array_key_exists($nick, $hacker_links))
101
+		echo '<a href="'.$hacker_links[$nick].'">';
102
+}
103
+
104
+function get_title($nick) {
105
+	global $hacker_alts;
106
+	if (array_key_exists($nick, $hacker_alts))
107
+		echo $hacker_alts[$nick];
108
+}
109
+?>
110
+
111
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="cs" lang="cs"> 
112
+ <head> 
113
+  <meta http-equiv="content-type" content="text/html; charset=utf-8"/> 
114
+  <link rel="stylesheet" href="style.css" type="text/css"/> 
115
+  <link href="favicon.ico" rel="icon" type="image/x-icon" />
116
+  <title>Hackers India • Indian F/OSS Hackers Collective</title> 
117
+ </head> 
118
+ <body> 
119
+	<div id="wrapper">
120
+		<div id="header">
121
+			<a href=""><img src="images/hi.png" title="#hackers-india"/></a>
122
+		</div>
123
+		<div id="content">
124
+			<?php for($n = 1; $n < $num_cols+1; $n++) { ?>
125
+			<div id="col<?php echo $n; ?>">
126
+				<?php
127
+				foreach($hacker_nicks as $i => $nick) {
128
+					if ((($i+1) % $num_cols) != ($n % $num_cols))
129
+						continue; // distribute nicks equally amongst the columns
130
+				?>
131
+				<h4><?php get_nick_with_link($nick); ?></h4>
132
+				<p>
133
+					<?php get_nick_url($nick); ?>
134
+					<img align="left" src="<?php get_avatar($nick); ?>" title="<?php get_title($nick) ?>"/>
135
+					</a><br/>
136
+					<?php get_blurb($nick); ?>
137
+				</p>
138
+				<!-- end of a hacker -->
139
+				<?php } ?>
140
+			</div>
141
+			<?php } ?>
142
+		</div>
143
+
144
+		<div id="footer">
145
+                        <h3><a href="http://ha.ckers.in/rules.html">The Constitution of hackers-india lies here.</a></h3><br/><br/>
146
+			<p>Warning: The climate of Hackers India may unknowingly vary from geek to sexist to silence to foo. Lifeforms unaccustomed to sudden change and unforseen levels of behaviour might be permanently affected.</p><br/>
147
+			<p>All rights reserved till the end of Time &mdash; #hackers-india @ irc.oftc.net</p><br/>
148
+			<p>Design by ideamonk, code by kitallis and nirbheek.</p>
149
+		</div>
150
+	</div>
151
+ </body>
152
+</html>

+ 72
- 72
style.css View File

@@ -1,73 +1,73 @@
1
-@font-face { font-family: Fontin; src: url('fonts/Fontin_Sans_R_45b.otf'); }
2
-@font-face { font-family: Tallys; src: url('fonts/Tallys_15.otf'); }
3
-
4
-
5
-* { margin:0px; padding:0px; border:0px; color: #555555; text-decoration:none; }
6
-body{
7
-    background: #1c1817 url(images/bg4.jpg) repeat;
8
-}
9
-
10
-#wrapper {
11
-    width:900px;
12
-    margin:0px auto;
13
-}
14
-
15
-#header { 
16
-    text-align:center; 
17
-    padding-bottom:70px;
18
-    padding-top:10px;
19
-    background: url(images/things.png) bottom center no-repeat; 
20
-}
21
-
22
-#content { 
23
-    margin:0px auto; 
24
-    overflow:auto; 
25
-    margin-top:30px; 
26
-    padding-left:10px;
27
-}
28
-
29
-#col1, #col2 { border-right:1px dashed #aaa; }
30
-
31
-#col1, #col2, #col3 {
32
-    display:block;
33
-    float:left;
34
-    width:290px;
35
-    padding:0px;
36
-}
37
-
38
-#col2 { left:-300px; }
39
-#col3 { left:-600px; }
40
-
41
-#content div h4 { 
42
-    font-family: Gill Sans; 
43
-    margin-top:10px; 
44
-    font-size: 125%;
45
-    padding:0px 10px 0px 10px; 
46
-}
47
-
48
-#content div p { 
49
-    font-family: Verdana;
50
-    font-size: 66%; 
51
-    overflow:auto; 
52
-    padding-bottom:5px; 
53
-    margin:0px 10px 10px 10px; 
54
-    border-bottom:1px solid #ddd; 
55
-    display:block;
56
-}
57
-#content div p img { 
58
-    margin:10px; 
59
-    border:4px solid white; 
60
-    -webkit-box-shadow:0px 0px 8px #888888; 
61
-    -moz-box-shadow:0px 0px 8px #888888; 
62
-}
63
-
64
-#footer {
65
-    text-align: center;
66
-    color:#888;
67
-    bottom:0px;
68
-    margin-top: 5%;
69
-    margin-bottom: 3%;
70
-    font-family: monospace;
71
-    font-size: 100%; 
72
-
1
+@font-face { font-family: Fontin; src: url('fonts/Fontin_Sans_R_45b.otf'); }
2
+@font-face { font-family: Tallys; src: url('fonts/Tallys_15.otf'); }
3
+
4
+
5
+* { margin:0px; padding:0px; border:0px; color: #555555; text-decoration:none; }
6
+body{
7
+    background: #1c1817 url(images/bg4.jpg) repeat;
8
+}
9
+
10
+#wrapper {
11
+    width:900px;
12
+    margin:0px auto;
13
+}
14
+
15
+#header { 
16
+    text-align:center; 
17
+    padding-bottom:70px;
18
+    padding-top:10px;
19
+    background: url(images/things.png) bottom center no-repeat; 
20
+}
21
+
22
+#content { 
23
+    margin:0px auto; 
24
+    overflow:auto; 
25
+    margin-top:30px; 
26
+    padding-left:10px;
27
+}
28
+
29
+#col1, #col2 { border-right:1px dashed #aaa; }
30
+
31
+#col1, #col2, #col3 {
32
+    display:block;
33
+    float:left;
34
+    width:290px;
35
+    padding:0px;
36
+}
37
+
38
+#col2 { left:-300px; }
39
+#col3 { left:-600px; }
40
+
41
+#content div h4 { 
42
+    font-family: Gill Sans; 
43
+    margin-top:10px; 
44
+    font-size: 125%;
45
+    padding:0px 10px 0px 10px; 
46
+}
47
+
48
+#content div p { 
49
+    font-family: Verdana;
50
+    font-size: 66%; 
51
+    overflow:auto; 
52
+    padding-bottom:5px; 
53
+    margin:0px 10px 10px 10px; 
54
+    border-bottom:1px solid #ddd; 
55
+    display:block;
56
+}
57
+#content div p img { 
58
+    margin:10px; 
59
+    border:4px solid white; 
60
+    -webkit-box-shadow:0px 0px 8px #888888; 
61
+    -moz-box-shadow:0px 0px 8px #888888; 
62
+}
63
+
64
+#footer {
65
+    text-align: center;
66
+    color:#888;
67
+    bottom:0px;
68
+    margin-top: 5%;
69
+    margin-bottom: 3%;
70
+    font-family: monospace;
71
+    font-size: 100%; 
72
+
73 73
 }

Loading…
Cancel
Save