Exemplo n.º 1
0
 // Schedule
 case 'schedule':
     $rid = intval($_GET['rid']);
     $matchId = intval($_GET['matchId']);
     $groupList = getGroupList($matchId);
     if (empty($groupList) || !intval($groupList)) {
         echo "找不到比赛ID或没有比赛队伍!";
         return;
     } else {
         if (count($groupList) % 2) {
             echo '<h2>' . '对阵图设置' . '</h2>';
             echo "现在的队伍数量是" . count($groupList) . ", 对战类型为 one Vs one, 因此无法生成对阵图, 请删除一个队伍后再试;";
             return;
         }
     }
     $scheduleList = getScheduleList(-1, $matchId, $rid);
     $tpl->SetVar('scheduleList', $scheduleList);
     $tpl->SetVar('rid', $rid);
     $tpl->SetVar('groups', $groupList);
     $tpl->SetVar('paging', count($groupList) / 20);
     $tpl->SetVar('matchId', $matchId);
     echo '<h2>' . '对阵图设置' . '</h2>';
     echo $tpl->GetTemplate('matchschedule.php');
     break;
 case 'addschedule':
     $ngid = intval($_REQUEST['ngid']);
     $sgid = intval($_REQUEST['sgid']);
     $round = trim($_REQUEST['round']);
     $begin = trim($_REQUEST['begin']);
     $end = trim($_REQUEST['end']);
     $result = trim($_REQUEST['result']);
Exemplo n.º 2
0
			<!--战绩提交-->
			<div class="tab_main font-size14">
				<?php 
if (!$require_login || !$accept) {
    echo '<div style="width:360px; height:200px; line-height:200px; font-family:\'微热雅黑\'; font-size:30px; text-align:center; margin:20px auto; border:8px solid #e8e8e8; color:#333; background: #FDFDFD;">权限错误或没有登陆</div>';
} else {
    ?>
					<div class="wraningText margin-t22">
						友情提醒:本平台会对数据进行审核一旦发现作假,将会适当对其进行相关处罚。
					</div>
					<div class="width-600 margin-t18"><?php 
    if (empty($users)) {
        echo "您还未参加此场比赛";
    } else {
        if (intval($users[0]->apply_group)) {
            $scheduleList = getScheduleList(-1, $matchid, -1, intval($users[0]->group_id));
            $groups = getGroupList($matchid, OBJECT_K);
            if (!empty($scheduleList)) {
                foreach ($scheduleList as $schedule) {
                    ?>
								<p><?php 
                    echo $groups[$schedule->sgid]->name . " Vs " . $groups[$schedule->ngid]->name;
                    ?>
</p>
								<p><?php 
                    echo $schedule->begin . " " . $schedule->end . " 论次:" . $schedule->round;
                    ?>
</p>
								<?php 
                    if (!empty($schedule->result) && strlen($schedule->result) > 0) {
                        $userRankApplys = getUserRankApplyList(-1, $current_user->ID, $matchid, $schedule->id);
Exemplo n.º 3
0
/**
 * 添加比赛对阵图
 */
function addSchedule($ngid, $sgid, $mid, $rid, $round = '', $begin = '', $end = '', $result = '')
{
    global $wpdb;
    if ($ngid > $sgid) {
        $temp = $ngid;
        $ngid = $sgid;
        $sgid = $temp;
    }
    $schedule_n = getScheduleList(-1, $mid, $rid, $ngid);
    $schedule_s = getScheduleList(-1, $mid, $rid, $sgid);
    if (empty($schedule_n) && empty($schedule_s)) {
        $result = $wpdb->insert('wp_likedome_match_schedule', array('ngid' => $ngid, 'sgid' => $sgid, 'mid' => $mid, 'rid' => $rid, 'round' => $round, 'begin' => $begin, 'end' => $end, 'result' => $result));
        return $result;
    } else {
        $result = updateSchedule($ngid, $sgid, $mid, $rid, $round, $begin, $end, $result);
        return $result;
        // 重复添加, 或Update;
    }
}
Exemplo n.º 4
0
    echo $user->uid;
    ?>
" />
	        	<input name="matchTypeId" type="hidden" value="<?php 
    echo $currentMatchTypeId;
    ?>
" />
		    	<input name="category" type="hidden" value="update" />
	        	<input type="submit" name="submit" id="submit" value="审核" />
        	</td>
			<td><?php 
    if ($user->submitId) {
        $userRankApplys = getUserRankApplyList($user->submitId);
        if (intval($userRankApplys)) {
            $groups = getGroupList($scheduleList[0]->mid, OBJECT_K);
            $scheduleList = getScheduleList($userRankApplys[0]->scheduleId);
            echo $groups[$scheduleList[0]->sgid]->name . " Vs " . $groups[$scheduleList[0]->ngid]->name . "  /  ";
            echo $scheduleList[0]->begin . " " . $scheduleList[0]->end . " 论次:" . $scheduleList[0]->round;
        }
    } else {
        echo "系统生成";
    }
    ?>
</td>
		</form>
		</tr>
		<?php 
}
?>
	</tbody>
</table>