Created
September 18, 2013 01:06
-
-
Save byronwade/6603091 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$con=mysqli_connect("#############","blogthorbis","###########","blogthorbis"); | |
// Check connection | |
if (mysqli_connect_errno()) | |
{ | |
echo "Failed to connect to MySQL: " . mysqli_connect_error(); | |
} | |
date_default_timezone_set('America/New_York'); | |
?> | |
<!DOCTYPE html> | |
<html> | |
<head> | |
<title id="top">Thorbis Inc. | Websites</title> | |
<meta content="text/html; charset=utf-8" http-equiv="content-type"> | |
<meta content="We Create Everything From Websites To Logo Design." name="description"> | |
<meta property="og:title" content="Thorbis Inc. | Website" /> | |
<meta property="og:description" content="We Create Everything From Websites To Logo Design." /> | |
<meta property="og:type" content="Website" /> | |
<meta property="og:url" content="http://www.thorbis.com" /> | |
<meta property="og:image" content="http://www.thorbis.com/favicon.ico" /> | |
<link href="http://www.thorbis.com/favicon.ico" rel="icon" type="image/x-icon"> | |
<meta content="Thorbis Inc. | Rejoice" name="keywords"> | |
<link href="css/thorbis_fonts.css" rel="stylesheet" type="text/css"> | |
<script src="js/jquery.js"></script> | |
<script src="js/jquery-scroll.js"></script> | |
<script type="text/javascript" src="js/parsley.js"></script> | |
<script src="js/skel.min.js"> | |
{ | |
prefix: 'css/thorbis', | |
preloadStyleSheets: true, | |
resetCSS: true, | |
boxModel: 'border', | |
grid: { gutters: 30 }, | |
breakpoints: { | |
wide: { range: '1200-', containers: 1140, grid: { gutters: 50 } }, | |
narrow: { range: '451-1199', containers: 960 }, | |
narrower: { range: '451-960', containers: 'fluid' }, | |
mobile: { range: '-450', containers: 'fluid', lockViewport: true, grid: { collapse: true } } | |
} | |
} | |
</script> | |
</head> | |
<body> | |
<!-- Header Begins--> | |
<div id="header-area"> | |
<div class="container"> | |
<ul class="12u menu"> | |
<li class="logo">Thorbis Inc.</li> | |
<li class="submenu" id="home">HOME</li> | |
<li class="submenu">BUSINESS</li> | |
<li class="submenu dropable">TECH <span class="caret"></span> | |
<div class="12u dropmenu"> | |
<div class="12u container"> | |
<div class="12u feature"> | |
<ul class="12u"> | |
<?php | |
if ($Res = mysqli_query($con,'SELECT * FROM `Blog` WHERE filetype IS NOT NULL ORDER BY `Date` DESC LIMIT 0,3')) { | |
while($Row = $Res->fetch_object()) { | |
$BlogURL = $Row->BlogURL; | |
$p = $Row->BlogP; | |
$ext = $Row->filetype; | |
$title = $p; | |
if (strlen($title)>200){ | |
$rtitle = substr($title,0,200)."..."; | |
}else { | |
$rtitle = $title; | |
} | |
echo ' | |
<li><a href="'.$BlogURL.'">'; | |
if($ext == 'image/jpeg' || $ext == 'image/jpg' || $ext == 'image/png' || $ext == 'image/gif'){echo '<img src="'.$Row->upload_location.'"></img>';} | |
elseif($ext == 'audio/mp3' || $ext == 'audio/ogg'){echo '<audio controls class="floatright blogmusic" src="'.$Row->upload_location.'"></audio>';} | |
elseif($ext == 'video/mp4' || $ext == 'audio/ogg'){echo '<video controls class="floatright blogvideo" src="'.$Row->upload_location.'"></video>';} | |
echo' | |
<p>'.$Row->BlogTopic.'</p> | |
</a></li> | |
'; | |
} | |
} | |
?> | |
</ul> | |
</div> | |
</div> | |
</div> | |
</li> | |
<li class="submenu dropable">ENTERTAINMENT <span class="caret"></span> | |
<div class="dropmenu"> | |
<div class="12u container"> | |
<div class="12u feature"> | |
<ul class="12u"> | |
<?php | |
if ($Res = mysqli_query($con,"SELECT * FROM `PublicBlog` WHERE filetype > '' ORDER BY `Date` DESC LIMIT 4")) { | |
while($Row = $Res->fetch_object()) { | |
$BlogURL = $Row->BlogURL; | |
$p = $Row->BlogP; | |
$ext = $Row->filetype; | |
$title = $p; | |
if (strlen($title)>200){ | |
$rtitle = substr($title,0,200)."..."; | |
}else { | |
$rtitle = $title; | |
} | |
echo ' | |
<li><a href="'.$BlogURL.'">'; | |
if($ext == 'image/jpeg' || $ext == 'image/jpg' || $ext == 'image/png' || $ext == 'image/gif'){echo '<img src="'.$Row->upload_location.'"></img>';} | |
elseif($ext == 'audio/mp3' || $ext == 'audio/ogg'){echo '<audio controls class="floatright blogmusic" src="'.$Row->upload_location.'"></audio>';} | |
elseif($ext == 'video/mp4' || $ext == 'audio/ogg'){echo '<video controls class="floatright blogvideo" src="'.$Row->upload_location.'"></video>';} | |
echo' | |
<p>'.$Row->BlogTopic.'</p> | |
</a></li> | |
'; | |
} | |
} | |
mysqli_close($con); | |
?> | |
</ul> | |
</div> | |
</div> | |
</div> | |
</li> | |
</ul> | |
</div> | |
</div> | |
<!--Header Ends--> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/2.0.0/jquery.min.js"></script> | |
<script type="text/javascript"> | |
$(document).ready(function(){ | |
$('.dropable').hover(function(e){ | |
e.preventDefault(); | |
var drop = $(this).find('.dropmenu'); | |
/*var c = $(this).css('backgroundColor'); | |
drop.css('backgroundColor', c);*/ | |
drop.stop().slideDown('fast'); | |
}, function(e){ | |
e.preventDefault(); | |
$(this).find('.dropmenu').stop().slideUp('fast'); | |
}); | |
}); | |
</script> | |
</body> | |
<div style="margin-top:110%; background-color:grey;"></div> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment