Example #1
0
<?php 
foreach ($projects as $project) {
    echo '
	<section class="watchlist">
		<h3><a href="#">' . $project['name'] . '</a></h3>
		<nav><a href="#"><img src="' . $location['images'] . '/feed.png" alt="(RSS)" title="Subscribe to this feed" /></a></nav>
		<div class="fc"></div>
		';
    foreach ($project['logs'] as $log) {
        echo '
		<article>
			<div class="type">
				<img src="' . $location['images'] . '/act/' . getactimg($log['actiontype']) . '" alt="" />
			</div>
			<div class="user">
				' . getuinfo($log['userid'], false) . '
			</div>
			<div class="details" style="margin:2px 0px 0px 4px;">
				<span style="background:#' . getactcol($log['actiontype']) . '">' . getactlogdsc($log['actiontype']) . '</span>
				categorised under <a href="#">' . getcatnm($log['category']) . '</a>,
				called <a href="#">' . $log['name'] . '</a>
			</div>
			<div class="fc"></div>
		</article>';
    }
    echo '
	</section>';
}
if (count($projects) == 0) {
    echo '
	<section>
Example #2
0
                 $content .= ' <img src="images/admin.gif" alt="" title="管理员"/>';
             }
             if ($c_log) {
                 if ($r_dbu['id'] != $_SESSION[$config['u_hash']]) {
                     $content .= ' <a href="?m=message&amp;id=' . $r_dbu['id'] . '#send"><img src="images/o_7.gif" alt="" title="发消息"/></a>';
                 }
                 if ($pa == 9 && $r_dbu['power'] < 9) {
                     $content .= ' <a href="?m=user&amp;cid=' . $r_dbu['id'] . '&amp;p=' . ($r_dbu['power'] > 0 ? '1"><img src="images/o_1.gif" alt="" title="降为普通成员' : '0"><img src="images/o_0.gif" alt="" title="升为管理员') . '"/></a> <a href="?m=edituser&amp;id=' . $r_dbu['id'] . '"><img src="images/o_3.gif" alt="" title="修改个人资料"/></a>';
                 }
             }
         }
         if ($c_log && $pa == 9 && $r_dbu['power'] < 9) {
             $content .= ' &nbsp; &nbsp; <img src="images/o_2.gif" alt="" title="删除" name="del_img" data-id="' . $r_dbu['id'] . '" class="f_link"/>';
         }
         if ($c_log) {
             $cr = getuinfo($r_dbu);
             $content .= ($cr != '' ? '<br/>' : '') . $cr;
             if ($r_dbu['jaid'] > 0) {
                 if (!isset($jadb[$r_dbu['jaid']])) {
                     $jadb[$r_dbu['jaid']] = getainfo($r_dbu['jaid'], 'name');
                 }
                 $content .= '<br/>邀请人:<a href="?m=user&amp;id=' . $r_dbu['jaid'] . '">' . $jadb[$r_dbu['jaid']]['name'] . '</a>';
             }
         } else {
             $content .= '<br/>';
         }
     } else {
         $content .= '<br/>';
     }
     $content .= '<br/>最后访问:' . ($r_dbu['visitdate'] > 0 ? date('Y-n-j H:i', getftime($r_dbu['visitdate'])) : '从未') . ($r_dbu['visit'] > 0 ? '<br/>访问次数:' . $r_dbu['visit'] : '') . (isset($a_sync_i[$r_dbu['id']]) ? '<br/>' . join(' ', $a_sync_i[$r_dbu['id']]) : '') . '</li>';
 } while ($r_dbu = mysql_fetch_assoc($q_dbu));
Example #3
0
		
		<?php 
foreach ($comments as $comment) {
    ?>
		<article id="comment_<?php 
    echo $comment['id'];
    ?>
" class="comment<?php 
    echo $comment['type'] != '' ? ' moderation' : '';
    ?>
">
			<table>
				<tr>
					<td>
						<div class="user"><?php 
    echo getuinfo($comment['author'], false);
    ?>
</div>
						<div class="time">Posted on <?php 
    echo timehtml5($comment['when_posted'], true);
    ?>
</div>
						<div class="actions">
							<?php 
    if ($comment['type'] == '') {
        ?>
							<!--<img src="<?php 
        echo $location['images'];
        ?>
/btnmini/edit.png" alt="" />-->
							<img class="comment_quote" src="<?php 
Example #4
0
                $error = true;
                $errors[] = 'Your comment could not be inserted. There may be a server error.';
            }
            // and our work here is done!
            if ($error) {
                output_errors($errors);
            } else {
                header("Location: {$_SERVER['REQUEST_URI']}");
                exit;
            }
        }
        // add to views
        db_query("UPDATE issues SET num_views = num_views + 1 WHERE id = '{$id}'");
        // who is the issue assigned to?
        if ($issue['assign'] > 0) {
            $issue['assignedto'] = getuinfo($issue['assign']);
        } else {
            $issue['assignedto'] = 'nobody';
        }
        // Get assignable users (for now, just admins)
        $assignsarr = array(array(0, 'nobody'), array(0, '----------------------'));
        foreach ($users->from_admins() as $uid) {
            $assignsarr[] = array($uid, getunm($uid), $uid == $issue['assign'] ? true : false);
        }
        $issue['assigns'] = $assignsarr;
        // get the comments
        $result_comments = db_query_toarray("SELECT * FROM comments WHERE issue = {$id} ORDER BY when_posted ASC", "Retrieving comments for issue {$id} from database");
        // output the page
        $page->include_template('ticket', array('issue' => $issue, 'comments' => $result_comments));
    }
}