Example #1
0
 /**
  * @method DELETE
  * @param int $id
  */
 function deletePicture($id)
 {
     $user_id = Authentication::getSignedUserID();
     if ($user_id !== -1) {
         $picture = DBAL::getInstance()->getPictureById($id);
         // Delete all images accociated with this picture, thumbs and such.
         unlink($picture['phy_path']);
         unlink($picture['path_small']);
         unlink($picture['path_medium']);
         unlink($picture['path_large']);
         DBAL::getInstance()->deletePicture($id, $user_id);
     }
 }
Example #2
0
	<script type="text/javascript" src="js/build.js"></script>
	<?php 
#echo file_get_contents("development/scripts.html");
?>
    
  </head>
  <body>
    <div id="wrapper" class="container">
        <header id="header" class="span12">
            <div id="nav" class="navbar">
                <div class="navbar-inner">
                    <div class="container">
						<a href="#" class="brand">Photo Travel</a>
						<ul class="nav">
							<?php 
if (Authentication::getSignedUserID() !== -1) {
    ?>
								<li>
									<a href="#management">Management</a>
								</li>
								<li class="divider-vertical"></li>
								<li>
									<a href="login.php?action=logout">Log out</a>
								</li>
							<?php 
} else {
    ?>
								<li>
									<a href="login.php">Login</a>
								</li>
							<?php