OSDN Git Service

embrj
[embrj/master.git] / inc / header.php
1 <?php
2         ob_start();
3         if(!isset($_SESSION)){
4                 session_start();
5         }
6 ?>
7 <!DOCTYPE HTML>
8 <html>
9 <head>
10 <meta http-equiv="Content-Type" content="text/html" charset="utf-8" />
11 <meta name="keywords" content="embr, open source, php, twitter, oauth" />
12 <meta name="description" content="Vivid Interface for Twitter" />
13 <meta name="author" content="Contributors" />
14 <link rel="icon" href="img/favicon.ico" />
15 <link id="css" href="css/main.css" rel="stylesheet" />
16 <title>Embr / <?php echo $title ?></title>
17 <?php 
18         $myCSS = getDefCookie("myCSS");
19         $theme = getDefCookie("theme");
20         $old_css = "ul.sidebar-menu li.active a";
21         $new_css = "ul.sidebar-menu a.active";
22         $myCSS = str_replace($old_css,$new_css,$myCSS);
23         $fontsize = getDefCookie("fontsize","13px");
24         $Bgcolor = getDefCookie("Bgcolor");
25         $Bgimage = getAvatar(getDefCookie("Bgimage"));
26         $Bgrepeat = getDefCookie("Bgrepeat","no-repeat");
27         
28         if ($title != 'Error' ){
29                 setcookie('loginPage',$_SERVER['PHP_SELF'],$_SERVER['REQUEST_TIME']+3600*24);
30         }
31 ?>
32 <style type="text/css">
33 <?php echo $theme;echo $myCSS ?>
34 a:active,a:focus {outline:none}
35 body {font-size:<?php echo $fontsize ?> !important;<?php 
36         if ($Bgcolor != "") echo 'background-color:'.$Bgcolor.';';
37         if ($Bgimage != "") echo 'background-image: url("'.$Bgimage.'");';
38  ?>background-repeat:<?php echo $Bgrepeat ?>}
39 </style>
40 <script src="https://ajax.aspnetcdn.com/ajax/jquery/jquery-1.8.3.min.js"></script>
41 <script src="js/jquery.js"></script>
42 <script src="js/mediaPreview.js"></script>
43 <script src="js/public.js"></script>
44 </head>
45 <body>
46 <div id="shortcutTip" style="display:none"></div>
47         <header>
48                 <div class="wrapper">
49                 <div id="sentTip" style="display:none"></div>
50                         <a href="index.php"><img id="logo" style="float:left" width="155" height="49" src="img/logo.png" /></a>
51                         <nav class="round">
52                         <ul>
53                                 <?php $scheme=(!isset($_SERVER['HTTPS']) || $_SERVER['HTTPS'] != "on") ? 'http://' : 'https://';
54                                 $base_url=str_replace('http://',$scheme,BASE_URL);
55                                 ?> 
56                                 <li><a class="share" title="Drag me to share!" href="javascript:var%20d=document,w=window,f='<?php echo $base_url."/share.php" ?>',l=d.location,e=encodeURIComponent,p='?u='+e(l.href)+'&t='+e(d.title)+'&d='+e(w.getSelection?w.getSelection().toString():d.getSelection?d.getSelection():d.selection.createRange().text)+'&s=bm';a=function(){if(!w.open(f+p,'sharer','toolbar=0,status=0,resizable=0,width=600,height=300,left=175,top=150'))l.href=f+'.new'+p};if(/Firefox/.test(navigator.userAgent))setTimeout(a,0);else{a()}void(0);">Share</a></li>
57                                 <li><a href="index.php">Home</a></li>
58                                 <li><a href="profile.php">Profile</a></li>
59                                 <li><a href="setting.php">Settings</a></li>
60                                 <li><a href="logout.php">Logout</a></li>                        
61                         </ul>
62                         </nav>
63                 </div>
64         </header>
65         <div id="content">
66                 <div class="wrapper">
67                         <div class="content-bubble-arrow"></div>
68                                 <table cellspacing="0" class="columns">
69                                         <tbody>
70                                                 <tr>
71                                                         <td id="left" class="column round-left">