if(isset($_SESSION['userid']) && $_SESSION['userid']>0){
?>You are signed in
if($user->properties['initialposts'] > 0){
?>You haven't posted all of you initial tracks Post a new track
}else{
$startofday= mktime(0, 0, 0, date('n'), date('j'));
$endofday= mktime(24, 0, 0, date('n'), date('j'));
$postedToday=mysqli_query($dbh,"SELECT id FROM posts WHERE user='".$user->properties['id']."' AND live=1 AND postdate>'".$startofday."' AND postdate<'".$endofday."'");
if(mysqli_num_rows($postedToday)>0){
$nextpost=$endofday-time();
$hours = floor($nextpost / (60 * 60));
// extract minutes
$divisor_for_minutes = $nextpost % (60 * 60);
$minutes = floor($divisor_for_minutes / 60);
// extract the remaining seconds
//$divisor_for_seconds = $divisor_for_minutes % 60;
//$seconds = ceil($divisor_for_seconds);
?>You have hours and minutes until you can post a new track.
Create a new draft
}else{// if(mysqli_num_rows($postedToday)>0)
?>You haven't posted a track today Post a new track
}//else if(mysqli_num_rows($postedToday)>0)
}
}else{
?>
$altImage="";$altText="";
include("api/twitter/connect.php");
echo("
");
$altImage="facebook_login.png";$altText="Login with Facebook";
include("api/facebook/connect.php");
?>
Sign up
Hopefully you've checked out our terms and conditions but by signing up you agree to abide by these terms when using the site.
Sign in
} ?>