Пример #1
0
function search($term)
{
    global $name, $path, $TweetsPulled, $TweetsAnalyzed, $tweets;
    $name = $term;
    $path = "Cache Files/cache" . $name . ".txt";
    $id = getID($name);
    $pic = getProfilePic($id, $name);
    $max_id = getNextID($path);
    //gets next tweet to cache, creates file if new cache to be made
    $tweets = getTweets($name, $id, $TweetsPulled, $max_id);
    if (!isset($tweets) || count($tweets) < 1) {
        echo "<script> alert('Bad Twitter Handle'); </script>";
        return;
    }
    $res = parseData($tweets, $TweetsAnalyzed);
}
Пример #2
0
							</form>';
            print '</div>';
        }
        /*END DELETE_BUTTON*/
        /*RECYCLE_BUTTON*/
        if ($post['user_id'] !== $sess['user_id']) {
            print '<div class="recycle">';
            print '<form method="POST">
							<input type="hidden" name="post_id" value="' . $post['post_id'] . '">
							<button type="submit" name="recycle"><img src="img/recycle.png"> Recycle</button>
						</form>';
            print '</div>';
        }
        /*END RECYCLE_BUTTON*/
        /*POST*/
        print '<div class="profile_img">' . getProfilePic($post['user_id'], '50px') . '</div>';
        print isOnline($post['active']);
        print '<h4>' . $post['f_name'] . ' ' . $post['l_name'] . ' </h4>';
        print '<h3>' . atLink($post['username']) . ': </h3>';
        print '<p class="post_post">' . atLink($post['post']) . '</p>';
        if ($post['post_pic']) {
            print '<img src="userIMG/' . $post['user_id'] . '/' . $post['post_pic'] . '" class="post_img">';
        }
        print '<div class="time_stamp"><p>' . printTime($post['time_stamp']) . '</p></div>';
        /*REPLY_FORM*/
        print '<div class="reply">
				<form method="POST" action="#' . $post['post_id'] . '">
				<input type="hidden" name="post_id" value="' . $post['post_id'] . '">
				<input type="text" name="comment" value="' . $post['username'] . '">
				<input type="submit" name="postComment" value="Reply" class="button">
				</form>
Пример #3
0
<head>
	<meta charset="UTF-8">
	<meta name="viewport" content="width=device-width" />
	<title>Litter</title>
	<link rel="icon" type="image/png" sizes="16x16" href="img/favicon-16x16.png">
	<link href="css/style.css" rel="stylesheet" type="text/css">
	<link href="css/mobile.css" rel="stylesheet" type="text/css">
</head>
<body>


<div id="header">
	<div id="get_user">
		<h2>
<?php 
print getProfilePic($sess['user_id'], 45);
print '<div id="user"><a href="profile.php?profile=' . $sess['username'] . '">' . $sess['username'] . '</a></div>';
?>
		</h2>
	</div>

	<div id="search_form">
		<form method="GET" action="profile.php">
			<input type="text" name="profile" placeholder="Find @">
		</form>
	</div>

	<div id="logout">
		<p><a href="logout.php">Log out</a></p>
	</div>
</div>
Пример #4
0
        print '</div>';
    }
    print '</div>';
    print '</div>';
}
print '<p id="followers">Followers: ' . count($followers) . '</p>';
print '<div class="followers">';
print '<div id="online_img">';
$following = getFollowers($get['user_id']);
if (count($following) == 0) {
    print "None, follow " . $get['username'] . "!";
} else {
    print '<div id="online_container">';
    foreach ($following as $following) {
        print '<div class="whos_online">';
        print '<a href="profile.php?profile=' . $following['username'] . '" title="' . $following['username'] . '">' . getProfilePic($following['user_id'], '50px') . '</a>';
        print '</div>';
    }
    print '</div>';
}
print '</div>';
print '</div>';
if ($sess['user_id'] == $get['user_id']) {
    print '<br><a href="profile.php?profile=at' . $sess['username'] . '">See where you have been mentioned</a><br>';
    print '<a href="edit.php">Edit your settings</a>';
}
print '</div>';
print '<div id="wrapper">';
if ($post == getAllPosts() || $post == getUserPosts($profile)) {
    require_once 'post.php';
} else {
Пример #5
0
<?php 
print '<div id="whos_online">';
$online = getAllUsers();
print "<h3>Who's here now:</h3>";
print '<div id="online_img">';
print '<div id="online_container">';
foreach ($online as $online) {
    if ($online['user_id'] !== $sess['user_id']) {
        if ($online['active'] == 1) {
            print '<div class="whos_online">';
            print '<a href="profile.php?profile=' . $online['username'] . '" title="' . $online['username'] . '">' . getProfilePic($online['user_id'], '50px') . '</a>';
            print '</div>';
        } else {
            print '<div class="whos_online">';
            print '<a href="profile.php?profile=' . $online['username'] . '" title="' . $online['username'] . '">' . getProfilePic($online['user_id'], '50px" class="grey') . '</a>';
            print '</div>';
        }
    }
}
print '</div>';
print '</div>';
print '</div>';
print '<div id="wrapper">';
if ($post == findHashtag($fulltag)) {
    require_once 'tagpost.php';
} else {
    require_once 'post.php';
}
print '</div>';
require_once 'footer.php';
Пример #6
0
			<input type="text" name="f_name" value="' . $sess['f_name'] . '">';
print '<h4>Last Name</h4>
			<input type="text" name="l_name" value="' . $sess['l_name'] . '">';
print '<h4>E-mail</h4>
			<input type="email" name="email" value="' . $sess['email'] . '">';
?>
				
				<div class="clearfix"></div>
				<button type="submit" name="changeInfo" class="button">Change!</button>
			</form>
	</div>

	<div id="changePic">

		<?php 
print getProfilePic($sess['user_id'], '150px');
?>

		<form method="POST" enctype="multipart/form-data">
			
			<div class="fileinputs">
			<input type="file" name="profile_pic" class="file">

	    	<div class="fakefile">
	        	<input type="button" value="Add a picture">
	    	</div>
			</div>

			<input type="submit" name="profile_pic" value="Change!" class="button">
		</form>
	</div>