OSDN Git Service

rabr
[embrj/master.git] / status.php
1 <?php \r
2         if(!isset($_SESSION)){\r
3                 session_start();\r
4         }\r
5         include ('lib/twitese.php');\r
6         $title = "Tweet";\r
7 \r
8         if (!loginStatus()) header('location: login.php');\r
9 \r
10         $t = getTwitter();\r
11         if ( isset($_GET['id']) ) {\r
12                 $statusid = $_GET['id'];\r
13                 $status = $t->showStatus($statusid);\r
14                 if (!$status) {\r
15                         header('location: error.php');\r
16                 }\r
17                 $user = $status->user;\r
18                 $date = formatDate($status->created_at);\r
19                 $text = formatText($status->text);\r
20         } else {\r
21                 header('location: error.php');\r
22         }\r
23 \r
24 ?>\r
25 <?php ob_start(); ?>\r
26 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">\r
27 <html xmlns="http://www.w3.org/1999/xhtml">\r
28 <head>\r
29 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />\r
30 <meta name="keywords" content="twitter, rabr, dabr, twitese, disinfeqt" />\r
31 <meta name="description" content="Rabr is an advanced and revolutionary interface for dabr and Twitese" />\r
32 <link rel="shortcut icon" href="img/favicon.ico" />\r
33 <link type="text/css" id="css" href="css/main.css" rel="stylesheet" />\r
34 <title>Rabr / <?php echo $title ?></title>\r
35 <?php \r
36         $myCSS = getColor("myCSS","");\r
37         $old_css = "ul.sidebar-menu li.active a";\r
38         $new_css = "ul.sidebar-menu a.active";\r
39         $myCSS = str_replace($old_css,$new_css,$myCSS);\r
40         $fontsize = getColor("fontsize","13px");\r
41 ?>\r
42 <style type="text/css">\r
43 <?php echo $myCSS ?>\r
44 a:active, a:focus {outline:none}\r
45 body {font-size:<?php echo $fontsize ?> !important}\r
46 #header {\r
47 margin:1em auto;\r
48 text-align:right;\r
49 width:600px;\r
50 }\r
51 #content {\r
52 margin:1em auto;\r
53 width:600px;\r
54 }\r
55 .wrapper {\r
56 margin:1em auto;\r
57 position:relative;\r
58 width:600px;\r
59 }\r
60 #statuses{\r
61 background-color:#FFFFFF;\r
62 float:left;\r
63 padding:10px;\r
64 width:580px;\r
65 }\r
66 .timeline li:hover, .rank_list li:hover {\r
67 background-color:transparent !important;\r
68 }\r
69 .timeline, .ajax_timeline {\r
70 border-bottom:1px solid #FFF !important;\r
71 border-top:1px solid #FFF !important;\r
72 }\r
73 .timeline li, .ajax_timeline li {\r
74 border-bottom:1px solid #FFF !important;\r
75 border-top:1px solid #FFF !important;\r
76 }\r
77 .status_body {\r
78 display:block;\r
79 font-size:2em;\r
80 line-height:30px;\r
81 margin-left:58px;\r
82 overflow:hidden;\r
83 position:relative;\r
84 }\r
85 .timeline li {\r
86 cursor:default;\r
87 margin:0px;\r
88 overflow:hidden;\r
89 padding:10px;\r
90 position:relative;\r
91 }\r
92 .status_author, .rank_img {\r
93 left:10px;\r
94 position:absolute;\r
95 top:15px;\r
96 width:50px;\r
97 }\r
98 </style>\r
99 <script type="text/javascript" src="js/jquery.js"></script>\r
100 <script type="text/javascript" src="js/jquery.cookie.js"></script>\r
101 <script type="text/javascript" src="js/mediaPreview.js"></script>\r
102 <script type="text/javascript" src="js/public.js"></script>\r
103 </head>\r
104 \r
105 <body>\r
106         <div id="header">\r
107                 <div class="wrapper">\r
108                         <a href="index.php"><img id="logo" style="float:left" src="img/logo.png" /></a>\r
109                         <ul id="nav" class="round">\r
110                                 <li><a href="index.php">Home</a></li>\r
111                                 <li><a href="profile.php">Profile</a></li>\r
112                                 <li><a href="browse.php">Public</a></li>\r
113                                 <li><a href="setting.php">Settings</a></li>\r
114                                 <li><a href="logout.php">Logout</a></li>                        \r
115                         </ul>\r
116                 </div>\r
117         </div>\r
118         <div id="content">\r
119                 <div class="wrapper">\r
120                         <div class="content-bubble-arrow"></div>\r
121                         <table cellspacing="0" class="columns">\r
122                   <tbody>\r
123                         <tr>\r
124                           <td id="left" class="round">\r
125 <div id="statuses" class="round">\r
126                 <div class="clear"></div>\r
127                 <ol class="timeline">\r
128                                 <li>\r
129                                                 <span class="status_author">\r
130                                                                 <a href="user.php?id=<?php echo $user->screen_name ?>" target="_blank"><img src="<?php echo getAvatar($user->profile_image_url); ?>" /></a>\r
131                                                 </span>\r
132                                                 <span class="status_body">\r
133                                                         <span class="status_id"><?php echo $statusid ?></span>\r
134                                                         <span class="status_word"><a class="user_name" href="user.php?id=<?php echo $user->screen_name ?>"><?php echo $user->screen_name ?></a> <span class="tweet"><?php echo $text ?></span></span>\r
135                                                         <span class="status_info">\r
136                                                                                 <?php if ($status->in_reply_to_status_id) {?><span class="in_reply_to"> <a href="status.php?id=<?php echo $status->in_reply_to_status_id ?>">in reply to <?php echo $status->in_reply_to_screen_name?></a></span> <?php }?>\r
137                                                                                 <span class="source">from <?php echo $status->source ?></span>\r
138                                                                                 <span class="date"><a href="status.php?id=<?php echo $statusid ?>" target="_blank"><?php echo $date ?></a></span>\r
139                                                         </span>\r
140                                                 </span>\r
141                                 </li>\r
142                 </ol>\r
143 </div>\r
144                         </tr>\r
145                   </tbody>\r
146                 </table>\r
147                 <div class="clear"></div>\r
148                         <div id="footer" class="round">\r
149                         <ul>\r
150                         <li>&copy; 2010 disinfeqt</li>\r
151                         <li><a href="about.php" title="About Rabr">About</a></li>\r
152                         <li><a href="http://blog.zdxia.com/" title="zdx Purified" target="_blank">Blog</a></li>\r
153                         <li><a href="http://code.google.com/p/twitese/" target="_blank" title="Rabr is proundly powered by the Open Source project - Twitese">Twitese</a></li>\r
154                         <li><a href="http://code.google.com/p/rabr/" target="_blank">Open Source</a></li>\r
155                         </ul>\r
156                         </div>\r
157                 </div>\r
158         </div>\r
159 </body>\r
160         <script type="text/javascript">\r
161         var username = $(".user_name").html();\r
162         var tweet = $(".tweet").text();\r
163         if (tweet.length > 30) {\r
164                 tweet = tweet.substr(0,30) + " ...";\r
165         }\r
166         document.title =document.title.replace(/Tweet/, username + ": " + tweet);\r
167         </script>\r
168 </html>\r
169 <?php ob_end_flush(); ?>\r