Beispiel #1
0
 public function getProfilePicture($id)
 {
     $sql = "SELECT profileId FROM `zp_user` WHERE id = :id LIMIT 1";
     $stmn = $this->db->{'database'}->prepare($sql);
     $stmn->bindValue(':id', $id, PDO::PARAM_INT);
     $stmn->execute();
     $value = $stmn->fetch();
     $stmn->closeCursor();
     $files = new files();
     $file = $files->getFile($value['profileId']);
     $return = '/includes/modules/general/templates/img/default-user.png';
     if ($file && file_exists($_SERVER['DOCUMENT_ROOT'] . '/userdata/user/' . $file['encName'] . '.' . $file['extension'])) {
         $return = '/userdata/user/' . $file['encName'] . '.' . $file['extension'];
     }
     return $return;
 }
" name="comment" class="button" />
		</div>
		
	</div>
	
	<?php 
    if ($comments->getReplies($row['id'])) {
        ?>
		<?php 
        foreach ($comments->getReplies($row['id']) as $comment) {
            ?>
			
			<div style="display:block; padding:10px; margin-left: 20px; border-bottom:1px solid #d9d9d9; background:#eee;">
			 	<?php 
            $files = new files();
            $file = $files->getFile($comment['profileId']);
            $img = '/includes/modules/general/templates/img/default-user.png';
            if ($file && file_exists($_SERVER['DOCUMENT_ROOT'] . '/userdata/user/' . $file['encName'] . '.' . $file['extension'])) {
                $img = '/userdata/user/' . $file['encName'] . '.' . $file['extension'];
            }
            ?>
	
				
				<img src="<?php 
            echo $img;
            ?>
" style="float:left; width:75px; margin-right:10px; padding:2px; border:1px solid #ddd;"/>
				<strong><?php 
            echo $comment['firstname'];
            ?>
 <?php 
Beispiel #3
0
	<?php 
    $tabs = $row['level'] * 20;
    ?>
	
	<span style="display:block; padding-left:10px; margin-left:<?php 
    echo $tabs;
    ?>
px; <?php 
    if ($tabs > 1) {
        echo 'background:#e1e1e1;';
    }
    ?>
 border-bottom:1px solid #fff;">
	 	<?php 
    $files = new files();
    $file = $files->getFile($value['profileId']);
    $img = '/includes/modules/general/templates/img/default-user.png';
    if ($file && file_exists($_SERVER['DOCUMENT_ROOT'] . '/userdata/user/' . $file['encName'] . '.' . $file['extension'])) {
        $img = '/userdata/user/' . $file['encName'] . '.' . $file['extension'];
    }
    ?>
	
		<br />
		<img src="<?php 
    echo $img;
    ?>
" style="float:left; width:100px; margin-right:10px;"/>
		<br /><p><?php 
    echo nl2br($row['text']);
    ?>
</p><br />