예제 #1
1
파일: view.php 프로젝트: hyb148/huodongxing
echo '<p class="guest">' . $lecturer->name . ' ( ' . $lecturerOrg . ' )</p>';
?>
        </div>
    </div>
    <?php 
$time = date('Y-m-d', $share->start);
$time .= ' ' . NewBambooHelper::getWeekDay(date('w', $share->start));
$time .= ' ' . date('H:i', $share->start);
$oper = new MitUserModel($relation->operid);
$isApplied = $relation->status == ControllerBusiness::RELATION_APPLY_APPROVE;
$isInvited = $relation->status == ControllerBusiness::RELATION_INVITED;
$isExpired = TS > $share->end;
$isStarted = TS > $share->start;
$canApply = $share->apply;
$cond_survey = array('objtype' => ControllerBusiness::MODEL_TYPE_SHARE, 'objid' => $share->id, 'userid' => self::$loginUser->id);
$hasSurvey = DBObj::getBlank('SurveyModel')->searchExists($cond_survey);
$link = '/survey/default?objtype=' . ControllerBusiness::MODEL_TYPE_SHARE . '&objid=' . $share->id;
$action = '';
$meetingroom = strlen($share->meetingroom) > 0 ? htmlspecialchars($share->meetingroom) : '待定';
$avatar = '<img style="width:24px;border-radius:2px; margin:0 2px 0 0;" src="' . NewBambooHelper::getAvatarByLogin($lecturer->login) . '" />';
$profileUrl = NewBambooHelper::getProfileUrl($lecturer);
if ($isExpired) {
    if ($isApplied || $isInvited) {
        if ($hasSurvey) {
            $action = '<p>你参加过这次分享,谢谢你的反馈。</p>';
        } else {
            $action = '<p>你参加过这次分享,请<a href="' . $link . '">提供反馈意见</a>给我们。</p>';
        }
    } else {
        $action = '<p>这次技术分享已结束。</p>';
    }
예제 #2
0
파일: common.php 프로젝트: superman1982/ddd
function do_nodemgr_get_common_task($post)
{
    #print_r($post);
    $post_type = $post['type'];
    $post_opt = $post['opt'];
    $post_data = $post['data'];
    $sid = $post_data['sid'];
    $db = new DBObj();
    $db->conn(DBS_MAIN);
    $db->select_db(DB_DNSPRO);
    $sql = "select * from `task_list` where \n\t\t\t`type` = '{$post_type}' and \n\t\t\t`status` = 'init' and \n\t\t\t`id` in (SELECT taskid FROM `task_feedback` where \n\t\t\t\t`sid` = '{$sid}' and `status` = 'init'\n\t\t\t\tand `task_feedback`.`tried` <= `task_feedback`.`retry`)";
    $result = $db->query($sql);
    $tasks = array();
    while ($row = mysql_fetch_array($result)) {
        $task_id = $row['id'];
        $task_type = $row['type'];
        $task_opt = $row['opt'];
        $task_data = $row['data'];
        $tasks[$task_id] = array('type' => $task_type, 'opt' => $task_opt, 'data' => $task_data);
    }
    mysql_free_result($result);
    $ret = array('ret' => 0, 'error' => '', 'result' => $tasks);
    print_r(json_encode($ret));
}