Beispiel #1
0
 function speclogedin($type)
 {
     if (isset($_SESSION[$type]) && !empty($_SESSION[$type])) {
         return getuserfield('type', $type);
     } else {
         return null;
     }
 }
Beispiel #2
0
<?php

require 'core.inc.php';
require 'connect.inc.php';
require 'password.php';
require 'dice.php';
require 'grill.php';
$dice = new Dice();
$grill = new Grill();
echo '<br>';
if (loggedin()) {
    $firstname = getuserfield('firstname');
    $lastname = getuserfield('lastname');
    ?>

<link rel="stylesheet" type="text/css" href="css/pickomino_php.css">

<div style="text-align: center; margin: auto; padding: 10px;">
 Welcome <?php 
    echo $firstname . ' ' . $lastname;
    ?>
, <a href="logout.php">Log out</a>
</div>

<div>
 <div class = 'container inset'>
	<div class = 'worms inset'>
		<?php 
    $grill::displayGrillWorms();
    ?>
	</div>
Beispiel #3
0
    $firstname = getuserfield('firstname');
    $lastname = getuserfield('lastname');
    echo '<div id="loggedin">You\'re logged in.<br> ' . $firstname . ' ' . $lastname . '  <br><a href="logout.php">Log out</a><br><br><br><br></div>';
    ?>
 <a href="index.php">Homepage</a> <br><br><br> <?php 
    $query_posts = "SELECT * From posts WHERE post_id='" . $post_id . "'";
    $query_comments = "SELECT * From comments WHERE post_id='" . $post_id . "'";
    $query_post_run = mysql_query($query_posts);
    if (isset($_POST['postcomment']) && isset($_POST['postcomment'])) {
        $comment = $_POST['postcomment'];
        $user_id = getuserfield('id');
        $insert_comment = mysql_query("INSERT INTO comments VALUES('','.{$post_id}.','{$user_id}','" . mysql_real_escape_string($comment) . "',0)");
    }
    if ($query_comments_run = mysql_query($query_comments)) {
        $numb = mysql_num_rows($query_comments_run);
        $user_id = getuserfield('id');
        $post_user_id = mysql_result($query_post_run, 0, 'user_id');
        $post_user = mysql_query("SELECT username,id FROM users WHERE id='" . $post_user_id . "'");
        $post_username = mysql_result($post_user, 0, 'username');
        ?>
<div class="post"><?php 
        echo '<h2>' . mysql_result($query_post_run, 0, 'post') . '</h2>';
        echo "____by user <strong>@{$post_username}</strong>\n<br><br>";
        ?>
</div><br><?php 
        if ($numb > 0) {
            for ($i = $numb - 1; $i >= 0; $i--) {
                $query_comment_user = mysql_result($query_comments_run, $i, 'user_id');
                $q_comment_user = mysql_query("SELECT * FROM users WHERE id='" . $query_comment_user . "'");
                $comment_username = mysql_result($q_comment_user, 0, 'username');
                echo '<div class="comment"><h3><br>';
Beispiel #4
0
			</ul>

		</div>

		<div class="CL"></div>

	

			<div class="main_cnt">

			<div class="CTR" style="width: 988px" ><map name="Map" id="Map">

					&nbsp;
<?php 
if (loggedin()) {
    $name = getuserfield('username');
    echo '<span style = "font-size :12px">Hi ' . $name . '!</span> </br> <a href="logout.php"> Log out</a>';
}
?>
<area shape="rect" coords="504,78,637,110" href="#" /></map></div>

			<div class="clearfix ML15 MR15" style="border-bottom:5px solid #000">

				<div class="auto-style3" style="width: 448px; height: 389px">


					<div class="auto-style6" style="height: 347px">

						<div class='auto-style5'><strong>&nbsp;</strong></div>
		&nbsp;</p>
		
    
  </li>
  <li><a href="about-us.php">About Us</a></li>
   
  
  <li><a href="contact-us.php">Contact Us</a> </li>
  <div class="clear"></div>
</ul>
</div>
	
<br/><br/><br/><br/><br/>


<?php 
if (isset($_SESSION['userid'])) {
    $field_value = getuserfield('name');
    echo 'Welcome ' . $field_value;
}
?>






<div class="footer">
	     <div class="section group">
					<center>
						<h4 style="color:white;padding:20px;">COPYRIGHT &copy 2015 Web Technology Project</h4>
						<h4 style="color:white;padding:5px;">Delhi Technological University</h4>
						</center>
} else {
    if (!loggedin()) {
        echo 'YOU ARE NOT LOGGED IN , PLEASE GO AND LOGIN ';
        ?>
	
				<a href="index.php"> MAIN PAGE</a>;
			<?php 
    }
}
?>
	</div>
</div>
<div id="message_set">
<?php 
if (loggedin()) {
    $user_id = getuserfield('sr_no');
    if (isset($_POST['message'])) {
        $message = $_POST['message'];
        if (!empty($message)) {
            $query = "UPDATE `registration` SET `message` = '{$message}' WHERE `sr_no` = '{$user_id}'";
            if ($query_run = mysql_query($query)) {
                echo '<strong>' . 'You entered: ' . '</strong>' . '<br/>' . $message . '<br/><br/><hr/>' . 'MESSAGE SENT SUCESSFULLY TO DATABASE!, it will be set to the site once verified..';
            }
        } else {
            echo 'NOT SET';
        }
    }
}
?>
 	</div>
 <div id="user_input">
<?php

require 'core.inc.php';
require 'connect.inc.php';
if (loggedin()) {
    $firstname = getuserfield('firstname');
    $surname = getuserfield('sirname');
    $query = "SELECT `Friends` FROM `users`";
    if ($query_run = mysql_query($query)) {
        while ($query_row = mysql_fetch_assoc($query_run)) {
            $friends = $query_row['Friends'];
            ?>
		   <div id="friends">
			 <h2><?php 
            echo $friends;
            ?>
</h2>
		   </div>
		<?php 
            //echo $friends;
        }
    } else {
        echo 'query dosnt make sense';
    }
    ?>
   <html>
	<head>
	   <link rel="stylesheet" type="text/css" href="profile_style.css" />
	   <link rel="stylesheet" type="text/css" href="other.css"/>
	</head>
	<body>
<?php

require 'connect1.php';
require 'core.php';
if (loggedin()) {
    $name = getuserfield('name');
    echo "<div id='index'>\n\t\t\t<span id='logout'>{$name}</span><br><br>\n\t\t\t<div id='logout_button'>\n\t\t\t\t<a href='logout.php'>Logout</a>\n\t\t\t</div>\n\t\t</div><br><br>";
    include 'add_info.php';
    include 'view.php';
} else {
    include 'login.php';
}
?>
<head>
	<link type="text/css" rel="stylesheet" href="stylesheet.css">
</head
			<div class="offset-col1 col s2">
				
				<?php 
if (loggedin() || logged_fb()) {
    echo 'YOU ARE LOGGED IN. <a href="includes/logout.php">LOGOUT HERE!</a>';
    ?>
					</div>
					<br/>
					<span id="adjust_name"><!-- used to adjust the name as shown in website as hello arpit-->
						
							<div class="col s7 m4">
							<button class="cyan accent-4 waves-effect waves-light" onclick="Materialize.toast('WELCOME USER', 4000) ">
							<?php 
    echo 'WELCOME' . '<BR/>' . getuserfield('first_name');
    echo " ";
    echo getuserfield('last_name');
    ?>
							
							</div>
					</span>
					<?php 
}
//echo getfeild();
?>
			
		</div>
		<?php 
include 'includes/nav.php';
?>
		<div id="shift">
			<div class="row">
                Profile <br>
                </h2>
            <h3 style="color:white;">
            <?php 
echo getuserfield($field);
?>
&nbsp<?php 
echo getuserfield($sfield);
?>
 <br><br>
            Email ID&nbsp: <?php 
echo getuserfield($efield);
?>
 <br><br>
            Date Of Birth&nbsp: <?php 
echo getuserfield($dfield);
?>
 <br><br>
           <!-- Age:  <?php 
echo date_diff(date_create('<?php echo getuserfield($dfield) ?>'), date_create('today'))->y;
?>
 -->

            </h3>

        </div>
    </div>

    <div class="content">
        <h2 class="content-head is-center"></h2>