예제 #1
0
<?php

session_start();
if (!isset($_SESSION['login'])) {
    header('location: ../../accueil.php');
} else {
    if (isset($_FILES['picture'])) {
        $extension = strrchr($_FILES['picture']['name'], '.');
        include_once '../../class/Members.php';
        $member = new Members($_SESSION['login']);
        move_uploaded_file($_FILES['picture']['tmp_name'], "../picture/" . $member->get_id() . $extension);
        $member->set_member_picture($member->get_pseudo(), "./picture/" . $member->get_id() . $extension);
        header('location: ../settings.php?photochanged=1');
    } else {
        header('location: ../settings.php?nopicture=1');
    }
}
예제 #2
0
파일: page_profil.php 프로젝트: bsamel/bavn
		<div id="select_file">
			<p>Add a picture
			<input type="file" name="picture"/></p>
		</div>
		<?php 
echo '<input type="hidden" name="where" value="' . $page_name . '";/>';
?>
		<input type="submit" value="Post !"/>
	</form>
	<div>
		<div>
			<a href="#" id="notifications">
				<p>
				<img src="../pictures/notification.png"/>
				<?php 
$notification_factory = new NotificationFactory($user->get_id());
echo $notification_factory->size;
echo '</p>';
?>
			</a>
		</div>
		<div id="notification_menu">
			<?php 
$t_size = $notification_factory->size;
for ($i = 0; $i < $t_size; $i++) {
    $notification_factory->display($i);
}
?>
		</div>
	</div>
    </aside>
예제 #3
0
		<div id="select_file">
			<p>Add a picture
			<input type="file" name="picture"/></p>
		</div>
		<?php 
echo '<input type="hidden" name="where" value="' . $page_name . '";/>';
?>
		<input type="submit" value="Post !"/>
	</form>
	<!--notifications-->
    </aside>
    <section id="actu">
      <!-- Articles publiés sans les commentaires-->
            <?php 
include_once "./class/ArticleFactory.php";
$profile_articles = new ArticleFactory($member->get_id());
$t_size = $profile_articles->size;
for ($i = 0; $i < $t_size; $i++) {
    $profile_articles->display($i);
    $profile_articles->display_comment_form($i);
}
?>
    </section>
    <footer>
     <p>ok</p>
    </footer>
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
    <script src="./script/adapt_size.js"></script>
    <script src="./script/like.js"></script>
    <script src="./script/comment.js"></script>
  </body>