예제 #1
0
 needed <span class="slash">/</span> <?php 
echo $numJoined;
?>
 joined</p>

<?php 
if (!empty($joined)) {
    echo '<div class="line"></div>';
    echo '<ul class="segmented-list users">';
}
// contributors
if ($joined != null) {
    foreach ($joined as $j) {
        echo '<li>';
        echo formatUserPicture($j->getCreatorID(), 'small');
        echo '<h6 class="primary">' . formatUserLink($j->getCreatorID(), $project->getID()) . '</h6>';
        $numUpdates = count($j->getUpdates());
        $latestUpdate = $j->getLatestUpdate();
        if (!empty($latestUpdate)) {
            echo '<p class="secondary contribution"><a href="' . Url::update($latestUpdate->getID()) . '">last contributed ' . formatTimeTag($latestUpdate->getDateCreated()) . '</a> <span class="slash">/</span> ' . $numUpdates . ' total</p>';
            //	echo '<h6 class="primary"><a href="'.Url::update($latestUpdate->getID()).'">'.$latestUpdate->getTitle().'</a></h6>';
            //	echo '<p class="secondary">posted '.formatTimeTag($latestUpdate->getDateCreated()).' by '.formatUserLink($latestUpdate->getCreatorID(), $latestUpdate->getProjectID()).'</p>';
        } else {
            echo '<p class="secondary">no contributions <span class="slash">/</span> joined ' . formatTimeTag($j->getDateCreated()) . '</p>';
        }
        echo '</li>';
    }
}
if (!empty($joined)) {
    echo '</ul>';
}
예제 #2
0
function formatEventDetails($event)
{
    $details = '';
    switch ($event->getEventTypeID()) {
        case 'edit_update_uploads':
        case 'edit_task_uploads':
            $addedIDs = explode(',', $event->getData2());
            $added = '';
            foreach ($addedIDs as $a) {
                if ($a == '') {
                    continue;
                }
                // skip blanks
                $upload = Upload::load($a);
                $added .= $upload->getOriginalName() . ' (' . formatFileSize($upload->getSize()) . ')<br /><br />';
            }
            if (!empty($added)) {
                $details .= '<ins>' . $added . '</ins>';
            }
            $deletedIDs = explode(',', $event->getData1());
            $deleted = '';
            foreach ($deletedIDs as $d) {
                if ($d == '') {
                    continue;
                }
                // skip blanks
                $upload = Upload::load($d);
                $deleted .= $upload->getOriginalName() . ' (' . formatFileSize($upload->getSize()) . ')<br /><br />';
            }
            if (!empty($deleted)) {
                $details .= '<del>' . $deleted . '</del>';
            }
            break;
        case 'edit_pitch':
        case 'edit_specs':
        case 'edit_rules':
        case 'edit_task_description':
        case 'edit_update_message':
            $from = $event->getData1();
            $to = $event->getData2();
            $from = str_replace('&#10;', '<br />', $from);
            $to = str_replace('&#10;', '<br />', $to);
            $diff = new FineDiff($from, $to);
            $htmlDiff = $diff->renderDiffToHTML();
            $htmlDiff = html_entity_decode($htmlDiff, ENT_QUOTES, 'UTF-8');
            $htmlDiff = html_entity_decode($htmlDiff, ENT_QUOTES, 'UTF-8');
            $details .= $htmlDiff;
            break;
        case 'edit_task_title':
        case 'edit_update_title':
            $from = $event->getData1();
            $to = $event->getData2();
            $diff = new FineDiff($from, $to);
            $htmlDiff = $diff->renderDiffToHTML();
            $htmlDiff = html_entity_decode($htmlDiff, ENT_QUOTES, 'UTF-8');
            $htmlDiff = html_entity_decode($htmlDiff, ENT_QUOTES, 'UTF-8');
            $details .= $htmlDiff;
            break;
        case 'edit_task_leader':
            $details .= 'Old Leader: <del>' . formatUserLink($event->getUser1ID(), $event->getProjectID()) . '</del><br /><br />';
            $details .= 'New Leader: <ins>' . formatUserLink($event->getUser2ID(), $event->getProjectID()) . '</ins>';
            break;
        case 'edit_task_num_needed':
            $old = $event->getData1() != null ? $event->getData1() : '&#8734;';
            $new = $event->getData2() != null ? $event->getData2() : '&#8734;';
            $details .= 'Old: <del>' . $old . '</del> people needed<br /><br />';
            $details .= 'New: <ins>' . $new . '</ins> people needed';
            break;
        case 'edit_task_deadline':
        case 'edit_project_deadline':
            $old = $event->getData1() != null ? formatTimeTag($event->getData1()) : '(none)';
            $new = $event->getData2() != null ? formatTimeTag($event->getData2()) : '(none)';
            $details .= 'Old Deadline: <del>' . $old . '</del><br /><br />';
            $details .= 'New Deadline: <ins>' . $new . '</ins>';
            break;
        case 'edit_project_status':
            $old = formatProjectStatus($event->getData1());
            $new = formatProjectStatus($event->getData2());
            $details .= 'Old Project Status: <del>' . $old . '</del><br /><br />';
            $details .= 'New Project Status: <ins>' . $new . '</ins>';
            break;
        case 'edit_accepted_status':
            $old = formatAcceptedStatus($event->getData1());
            $new = formatAcceptedStatus($event->getData2());
            $details .= 'Old Status: <del>' . $old . '</del><br /><br />';
            $details .= 'New Status: <ins>' . $new . '</ins>';
            break;
        case 'create_task_comment':
        case 'create_task_comment_reply':
        case 'create_update_comment':
        case 'create_update_comment_reply':
            $details .= formatComment($event->getData1());
            break;
        case 'create_discussion':
            $details .= '<strong>' . $event->getData1() . '</strong><br /><br />';
            $details .= formatDiscussionReply($event->getData2());
            break;
        case 'create_discussion_reply':
            $details .= formatDiscussionReply($event->getData1());
            break;
        case 'create_update':
            if ($event->getData1() != '') {
                $details .= '<strong>' . $event->getData1() . '</strong><br /><br />';
            }
            if ($event->getData2() != '') {
                $details .= formatUpdate($event->getData2());
            }
            break;
        case 'create_task':
            if ($event->getData1() != '') {
                $details .= '<strong>' . $event->getData1() . '</strong><br /><br />';
            }
            if ($event->getData2() != '') {
                $details .= formatTaskDescription($event->getData2());
            }
            break;
    }
    return $details;
}
예제 #3
0
        echo '<tr>';
        echo '<td class="subject ' . $read . '">';
        // show "Re:" if this is a reply to a previous message
        $subject = $m->getSubject();
        if ($m->getParentID() != $m->getID()) {
            $subject = 'Re: ' . $subject;
        }
        echo '<h6><a href="' . Url::message($m->getID()) . '">' . $subject . '</a></h6>';
        echo '<p>';
        $body = strip_tags(formatInboxMessage($m->getBody()));
        echo substr($body, 0, 35);
        if (strlen($body) > 35) {
            echo '&hellip;';
        }
        echo '</p>';
        echo '</td>';
        echo '<td class="sender">' . formatUserLink($m->getSenderID()) . '</td>';
        echo '<td class="sent">' . formatTimeTag($m->getDateSent()) . '</td>';
        echo '</tr>';
    }
    ?>

</table>

<?php 
}
?>

<?php 
$fork->endBlockSet();
$fork->render('site/partial/panel');
예제 #4
0
                $body .= "<blockquote>" . formatComment($message) . "</blockquote>";
                $email = array('to' => $leader->getEmail(), 'subject' => '[' . PIPELINE_NAME . '] New comment reply on a task you are leading in ' . $project->getTitle(), 'message' => $body);
                // send email
                Email::send($email);
            }
        }
        // to task crew
        $crew = Accepted::getByTaskID($taskID);
        if ($crew != null) {
            foreach ($crew as $c) {
                $user = User::load($c->getCreatorID());
                if ($user->getID() != Session::getUserID()) {
                    // don't email yourself
                    if ($user->getNotifyCommentTaskAccepted()) {
                        // compose email
                        $body = "<p>" . formatUserLink(Session::getUserID()) . ' replied to a comment on the task <a href="' . Url::task($taskID) . '">' . $task->getTitle() . '</a> in the project ' . formatProjectLink($project->getID()) . '. The reply was:</p>';
                        $body .= "<blockquote>" . formatComment($message) . "</blockquote>";
                        $email = array('to' => $user->getEmail(), 'subject' => '[' . PIPELINE_NAME . '] New comment reply on a task you joined in ' . $project->getTitle(), 'message' => $body);
                        // send email
                        Email::send($email);
                    }
                }
            }
        }
        // send us back
        Session::setMessage('You replied to a comment on this task.');
        $json = array('success' => '1');
        echo json_encode($json);
    }
} else {
    $json = array('error' => 'Invalid action.');
예제 #5
0
        $json = array('error' => 'Your reply cannot be empty.');
        exit(json_encode($json));
    } else {
        // post the comment
        $reply = new Comment(array('creator_id' => Session::getUserID(), 'project_id' => $project->getID(), 'update_id' => $updateID, 'parent_id' => $commentID, 'message' => $message));
        $reply->save();
        // log it
        $logEvent = new Event(array('event_type_id' => 'create_update_comment_reply', 'project_id' => $project->getID(), 'user_1_id' => Session::getUserID(), 'item_1_id' => $commentID, 'item_2_id' => $reply->getID(), 'item_3_id' => $updateID, 'data_1' => $message));
        $logEvent->save();
        // send email notification, if desired
        $creator = User::load($update->getCreatorID());
        if ($creator->getID() != Session::getUserID()) {
            // don't email yourself
            if ($creator->getNotifyCommentTaskUpdate()) {
                // compose email
                $msg = "<p>" . formatUserLink(Session::getUserID()) . ' replied to a comment on your task update <a href="' . Url::update($updateID) . '">' . $update->getTitle() . '</a> in the project ' . formatProjectLink($project->getID()) . '. The reply was:</p>';
                $msg .= "<blockquote>" . formatUpdate($message) . "</blockquote>";
                $email = array('to' => $creator->getEmail(), 'subject' => '[' . PIPELINE_NAME . '] New comment reply on your task update in ' . $project->getTitle(), 'message' => $msg);
                // send email
                Email::send($email);
            }
        }
        // send us back
        Session::setMessage('You replied to a comment on this update.');
        $json = array('success' => '1');
        echo json_encode($json);
    }
} else {
    $json = array('error' => 'Action not recognized.');
    exit(json_encode($json));
}
예제 #6
0
    ?>
 .createButton').click(function(){
		window.location = '<?php 
    echo Url::updateNew($task->getID());
    ?>
';
	});
<?php 
}
?>

</script>
<?php 
if (!empty($contribs)) {
    ?>

<table class="contribs">
	<tr>
		<th style="padding-left: 22px;">Contribution</th>
		<th>Member</th>
		<th>Status</th>
		<th>Date</th>
	</tr>
<?php 
    foreach ($contribs as $c) {
        echo '<tr>';
        // title
        echo '<td class="name">';
        echo '<h6><a href="' . Url::update($c->getID()) . '">' . $c->getTitle() . '</a></h6>';
        echo '</td>';
        // creator
예제 #7
0
</div>
</form>

</div><!-- .edit -->

<?php 
}
?>

<div class="view">

<?php 
echo formatUserPicture($user->getID());
?>
<h5 class="username"><?php 
echo formatUserLink($user->getID());
echo !empty($name) && $age >= 18 ? ' (' . $name . ')' : '';
?>
</h5>
<?php 
echo '<p><a href="mailto:' . $user->getEmail() . '">' . $user->getEmail() . '</a>';
//	echo $age.' years old';
if (!empty($sex) || !empty($loc)) {
    echo $slash;
}
if (!empty($sex)) {
    echo $sex;
}
if (!empty($sex) && !empty($loc)) {
    echo $slash;
}
예제 #8
0
?>
</a></p>
		</div>
	</div>
	
	<div class="clear">
		<label>Accepted By</label>
		<div class="task-info">
			<p><a class="picture small" href="<?php 
echo Url::user($task->getLeaderID());
?>
"><img src="<?php 
echo Url::userPictureSmall($task->getLeaderID());
?>
" /></a><?php 
echo formatUserLink($accepted->getCreatorID());
?>
</p>
		</div>
	</div>

	<div class="clear">
		<label>Status<span class="required">*</span></label>
		<div class="input">
			<select id="selStatus">
				<option value="<?php 
echo Accepted::STATUS_RELEASED;
?>
"><?php 
echo Accepted::getStatusName(Accepted::STATUS_RELEASED);
?>
예제 #9
0
</div><!-- end .edit -->

<?php 
}
?>

<div class="view">

<div class="person-box">
	<?php 
echo formatUserPicture($task->getLeaderID(), 'small');
?>
	<div class="text">
		<p class="caption">task leader</p>
		<p class="username"><?php 
echo formatUserLink($task->getLeaderID(), $project->getID());
?>
</p>
	</div>
</div>

<?php 
if ($task->getStatus() == Task::STATUS_OPEN) {
    $status = '<span class="status good">open</span>';
} else {
    $status = '<span class="status bad">closed</span>';
}
$closed = $task->getStatus() == Task::STATUS_CLOSED ? ' class="closed"' : '';
// CSS class for strikethrough
?>
예제 #10
0
if (empty($unrespondedInvites)) {
    echo '<li class="none">(none)</li>';
}
foreach ($invitations as $i) {
    // project title
    $project = Project::load($i->getProjectID());
    $projectTitle = $project->getTitle();
    if ($i->getResponse() != null) {
        echo '<li id="invitation-' . $i->getID() . '" class="responded hidden">';
    } else {
        echo '<li id="invitation-' . $i->getID() . '">';
    }
    if ($i->getTrusted()) {
        echo '<p class="project">' . formatUserLink($i->getInviterID(), $project->getID()) . ' invited you to join the project ' . formatProjectLink($i->getProjectID()) . ' as a <a href="' . Url::help() . '">trusted member</a>. (' . formatTimeTag($i->getDateCreated()) . ')</p>';
    } else {
        echo '<p class="project">' . formatUserLink($i->getInviterID(), $project->getID()) . ' invited you to join the project ' . formatProjectLink($i->getProjectID()) . '. (' . formatTimeTag($i->getDateCreated()) . ')</p>';
    }
    // show the invitation message, if it exists
    if ($i->getInvitationMessage() != null) {
        echo '<blockquote>' . formatInvitationMessage($i->getInvitationMessage()) . '</blockquote>';
    }
    // only show response buttons if user hasn't responded yet
    if ($i->getResponse() === null) {
        echo '<div class="buttons">';
        // don't allow accept invitation if already affiliated
        if (!$project->isAffiliated($i->getInviteeID())) {
            echo '<input class="accept" type="button" value="Accept" /> ';
        }
        echo '<input class="decline" type="button" value="Decline" /></div>';
    } else {
        //echo '<div class="line"></div>';
예제 #11
0
        if ($creator->getNotifyDiscussionStarted()) {
            // compose email
            $body = "<p>" . formatUserLink(Session::getUserID()) . ' replied to your discussion <a href="' . Url::discussion($discussionID) . '">' . $discussion->getTitle() . '</a> in the project ' . formatProjectLink($project->getID()) . '. The reply was:</p>';
            $body .= "<blockquote>" . formatDiscussionReply($message) . "</blockquote>";
            $email = array('to' => $creator->getEmail(), 'subject' => '[' . PIPELINE_NAME . '] New reply to your discussion in ' . $project->getTitle(), 'message' => $body);
            // send email
            Email::send($email);
        }
    }
    // others who replied to discussion
    $repliers = $discussion->getDistinctRepliers();
    foreach ($repliers as $r) {
        if ($r->getID() != Session::getUserID()) {
            // don't email yourself
            if ($r->getNotifyDiscussionReply()) {
                // compose email
                $body = "<p>" . formatUserLink(Session::getUserID()) . ' replied to the discussion <a href="' . Url::discussion($discussionID) . '">' . $discussion->getTitle() . '</a> in the project ' . formatProjectLink($project->getID()) . '. The reply was:</p>';
                $body .= "<blockquote>" . formatDiscussionReply($message) . "</blockquote>";
                $email = array('to' => $r->getEmail(), 'subject' => '[' . PIPELINE_NAME . '] New reply to a discussion in ' . $project->getTitle(), 'message' => $body);
                // send email
                Email::send($email);
            }
        }
    }
    $json = array('success' => '1');
    Session::setMessage("You replied to the discussion.");
    echo json_encode($json);
} else {
    $json = array('error' => 'Invalid action.');
    exit(json_encode($json));
}
예제 #12
0
<?php 
$SOUP->render('site/partial/massEmail', array());
?>

</td>

<td class="right">


<?php 
$data = array();
foreach ($projects as $p) {
    $data[] = array(formatProjectLink($p->getID()), formatUserLink($p->getCreatorID()), formatTimeTag($p->getDateCreated()), '<a href="' . Url::activity($p->getID()) . '">' . count(Event::getByProjectID($p->getID())) . '</a>');
}
$SOUP->render('site/partial/itemTable', array('title' => 'All Projects (' . count($projects) . ')', 'ths' => array('Title', 'Creator', 'Created', '#&nbsp;Events'), 'data' => $data));
?>

<?php 
$data = array();
foreach ($users as $u) {
    $data[] = array(formatUserLink($u->getID()), formatTimeTag($u->getDateCreated()), count(Event::getUserEvents($u->getID())));
}
$SOUP->render('site/partial/itemTable', array('title' => 'All Users (' . count($users) . ')', 'ths' => array('Username', 'Registered', '#&nbsp;Events'), 'data' => $data));
?>

</td>

<?php 
$fork->endBlockSet();
$fork->render('site/partial/admin');
예제 #13
0
         $user->setLocation($location);
     }
     if ($biography != '') {
         $user->setBiography($biography);
     }
     $user->save();
     // save the user
     $user->setLastLogin($user->getDateCreated());
     $user->save();
     // save last login as date created
     // log the event
     $logEvent = new Event(array('event_type_id' => 'create_user', 'user_1_id' => $user->getId()));
     $logEvent->save();
     // email confirmation
     $body = '<p>You have successfully registered for <a href="' . Url::base() . '">' . PIPELINE_NAME . '</a>.</p>';
     $body .= '<p>Your username is ' . formatUserLink($user->getID()) . '. Have fun!</p>';
     $newEmail = array('to' => $email, 'subject' => '[' . PIPELINE_NAME . '] Welcome to ' . PIPELINE_NAME . '!', 'message' => $body);
     Email::send($newEmail);
     // log us into the new account
     Session::signIn($user->getId());
     // link any email invites to this user
     Invitation::linkByEmail($email, $user->getID());
     // set confirm message and send us away
     Session::setMessage("Registration successful! Welcome aboard.");
     $json = array('success' => '1', 'successUrl' => Url::dashboard());
     echo json_encode($json);
     break;
 default:
     $json = array('error' => 'An error occurred. Please try again.');
     exit(json_encode($json));
     break;
예제 #14
0
        }
        echo formatUserPicture($m->getID(), 'small');
        echo '<h6 class="primary">' . formatUserLink($m->getID(), $project->getID()) . '</h6>';
        echo '<p class="secondary">member</p>';
    }
    echo '</li>';
}
// member invites
if ($hasInvitePermission && !empty($memberInvites)) {
    foreach ($memberInvites as $mi) {
        // don't list accepted invites
        if ($mi->getResponse() == Invitation::ACCEPTED) {
            continue;
        }
        $inviterLink = formatUserLink($mi->getInviterID(), $project->getID());
        $inviteeLink = $mi->getInviteeID() != null ? formatUserLink($mi->getInviteeID(), $project->getID()) : '<a href="mailto:' . $mi->getInviteeEmail() . '">' . $mi->getInviteeEmail() . '</a>';
        echo '<li class="invited">';
        // View Invitation button
        echo '<input id="invitation-' . $mi->getID() . '" type="button" class="viewInvite" value="View Invitation" />';
        // invite box
        echo '<div id="invite-box-' . $mi->getID() . '" class="invite-box hidden">';
        if ($mi->getTrusted()) {
            echo '<p>' . $inviterLink . ' invited ' . $inviteeLink . ' to join this project as a <a href="' . Url::help() . '">trusted member</a>. (' . formatTimeTag($mi->getDateCreated()) . ')</p>';
        } else {
            echo '<p>' . $inviterLink . ' invited ' . $inviteeLink . ' to join this project. (' . formatTimeTag($mi->getDateCreated()) . ')</p>';
        }
        if ($mi->getInvitationMessage() != null) {
            echo '<blockquote>' . formatInvitationMessage($mi->getInvitationMessage()) . '</blockquote>';
        }
        echo '<div class="line"></div>';
        if ($mi->getResponse() == Invitation::DECLINED) {
예제 #15
0
			<th>Last Reply</th>
			<th>Category</th>
		</tr>
<?php 
    foreach ($discussions as $d) {
        echo '<tr>';
        echo '<td class="title">';
        $cssLock = $d->getLocked() ? ' class="locked"' : '';
        echo '<h6' . $cssLock . '><a href="' . Url::discussion($d->getID()) . '">' . $d->getTitle() . '</a></h6>';
        echo '<p>by ' . formatUserLink($d->getCreatorID(), $d->getProjectID()) . '</p>';
        echo '</td>';
        $numReplies = count($d->getReplies());
        echo '<td class="replies">' . $numReplies . '</td>';
        $lastReply = $d->getLastReply();
        if (!empty($lastReply)) {
            $lrDate = formatTimeTag($lastReply->getDateCreated());
            $lrCreator = formatUserLink($lastReply->getCreatorID(), $lastReply->getProjectID());
            echo '<td class="last-reply">' . $lrDate . '<br />by ' . $lrCreator . '</td>';
        } else {
            echo '<td class="last-reply">--</td>';
        }
        $category = $d->getCategory() != null ? '<span>' . formatSectionLink($d->getCategory(), $d->getProjectID()) . '</span>' : '--';
        echo '<td class="category">' . $category . '</td>';
        echo '</tr>';
    }
    ?>
	</table>
<?php 
}
$fork->endBlockSet();
$fork->render('site/partial/panel');
예제 #16
0
<div id="flashviewer"></div>
<?php 
function getUploadCssClass($ext)
{
    $className = '';
    switch ($ext) {
        case 'jpg':
        case 'jpeg':
        case 'png':
        case 'gif':
            $className = 'image';
            break;
        case 'mp3':
            $className = 'audio';
            break;
        case 'fla':
        case 'swf':
        case 'flv':
            $className = 'flash';
            break;
        case 'mpeg':
        case 'mp4':
        case '3gp':
        case 'mpg':
        case 'mov':
        case 'avi':
            $className = 'video';
            break;
        case 'psd':
            $className = 'photoshop';
            break;
예제 #17
0
				'buttonID':'#btnReply'
			});
		});
	});
</script>

<ul class="segmented-list replies">
	<li><h5><?php 
echo $message->getSubject();
?>
</h5></li>
<?php 
foreach ($replies as $reply) {
    echo '<li>';
    echo formatUserPicture($reply->getSenderID(), 'small');
    echo '<p class="headline">' . formatUserLink($reply->getSenderID()) . ' <span class="slash">/</span> <span class="when">' . formatTimeTag($reply->getDateSent()) . '</span></p>';
    echo '<p class="message">' . formatInboxMessage($reply->getBody()) . '</p>';
    echo '</li>';
}
?>
	<li class="reply">
		<textarea id="txtReplyMessage"></textarea>	
		<div class="buttons">
			<input type="button" class="right" id="btnReply" value="Send Reply" />
			<p class="right"><a class="help-link" href="<?php 
echo Url::help();
?>
#help-html-allowed">Some HTML allowed</a></p>
		</div>
	</li>
</ul>
예제 #18
0
    foreach ($comments as $comment) {
        echo '<li id="comment-' . $comment->getID() . '">';
        echo formatUserPicture($comment->getCreatorID(), 'small');
        if ($hasPermission) {
            echo '<input class="replyButton" type="button" value="Reply" />';
        }
        echo '<p class="headline">' . formatUserLink($comment->getCreatorID(), $project->getID()) . ' <span class="slash">/</span> <span class="when">' . formatTimeTag($comment->getDateCreated()) . '</span></p>';
        echo '<p class="message">' . formatComment($comment->getMessage()) . '</p>';
        //echo '<p class="when">'.formatTimeTag($comment->getDateCreated()).'</p>';
        echo '</li>';
        $replies = $comment->getReplies();
        if ($replies != null) {
            foreach ($replies as $reply) {
                echo '<li class="comment-reply">';
                echo formatUserPicture($reply->getCreatorID(), 'small');
                echo '<p class="headline">' . formatUserLink($reply->getCreatorID(), $project->getID()) . ' <span class="slash">/</span> <span class="when">' . formatTimeTag($reply->getDateCreated()) . '</span></p>';
                echo '<p class="message">' . formatComment($reply->getMessage()) . '</p>';
                //echo '<p class="when">'.formatTimeTag($reply->getDateCreated()).'</p>';
                echo '</li>';
            }
        }
    }
} else {
    echo '<li>(none)</li>';
}
?>

<?php 
if ($hasPermission) {
    ?>
예제 #19
0
         $email = array('to' => $u->getEmail(), 'subject' => '[' . PIPELINE_NAME . '] Invitation to join the project ' . $project->getTitle(), 'message' => $body);
         // send email
         Email::send($email);
     }
 }
 foreach ($emails as $e) {
     // generate code
     //		$code = sha1(microtime(true).mt_rand(10000,90000));
     // send invitation
     $invite = new Invitation(array('inviter_id' => Session::getUserID(), 'invitee_email' => $e, 'project_id' => $project->getID(), 'trusted' => $trusted, 'invitation_message' => $message));
     $invite->save();
     // log event
     $logEvent = new Event(array('event_type_id' => 'invite_member_email', 'project_id' => $project->getID(), 'user_1_id' => Session::getUserID(), 'item_1_id' => $invite->getID(), 'data_1' => $e, 'data_2' => $message, 'data_3' => $trusted));
     $logEvent->save();
     // compose email
     $body = "<p>" . formatUserLink(Session::getUserID()) . ' invited you to join the project ' . formatProjectLink($project->getID()) . '.</p>';
     if (!empty($message)) {
         $body .= '<blockquote>' . formatInvitationMessage($message) . '</blockquote>';
     }
     if ($trusted) {
         $body .= '<p>If you accept this invitation, you will become a <a href="' . Url::help() . '">trusted member</a> of this project.</p>';
     }
     $body .= '<p>To respond to this invitation, <a href="' . Url::consent($e) . '">register</a> a free account on ' . PIPELINE_NAME . ' using this email address (' . $e . ').</p>';
     $email = array('to' => $e, 'subject' => '[' . PIPELINE_NAME . '] Invitation to join the project ' . $project->getTitle(), 'message' => $body);
     // send email
     Email::send($email);
 }
 // send us back
 $numInvitations = count($users) + count($emails);
 Session::setMessage(formatCount($numInvitations, 'invitation', 'invitations') . ' sent.');
 $json = array('success' => '1');
예제 #20
0
		'info': $('#frmEditItem').serialize(),
		'buttonID':'#btnEditUpdate'
	});
}
</script>
<div class="edit hidden">
<form id="frmEditItem">
<input type="hidden" name="action" value="edit-update" />
<div class="clear">
	<label for="txtTitle">Title<span class="required">*</span></label>
	<div class="input">
		<input type="text" id="txtTitle" name="txtTitle" maxlength="255" value="<?php 
    echo $update->getTitle();
    ?>
" />
		<p>Short title for the contribution</p>
	</div>
</div>
<div class="clear">
	<label for="txtMessage">Message<span class="required">*</span></label>
	<div class="input">
		<textarea id="txtMessage" name="txtMessage"><?php 
    echo $update->getMessage();
    ?>
</textarea>
		<p>Write your contribution here, <a class="help-link" href="<?php 
    echo Url::help();
    ?>
#help-html-allowed">some HTML allowed</a></p>
	</div>
</div>
예제 #21
0
</script>

<?php 
}
?>
	

<ul class="segmented-list users">

<?php 
if (empty($followers)) {
    echo '<li class="none">(none)</li>';
} else {
    foreach ($followers as $f) {
        echo '<li>';
        if ($hasPermission) {
            echo '<input id="ban-' . $f->getID() . '" type="button" class="ban" value="Ban" />';
        }
        echo formatUserPicture($f->getID(), 'small');
        echo '<h6 class="primary">' . formatUserLink($f->getID()) . '</h6>';
        echo '<p class="secondary">follower</p>';
        echo '</li>';
    }
}
?>

</ul>

<?php 
$fork->endBlockSet();
$fork->render('site/partial/panel');