-
Notifications
You must be signed in to change notification settings - Fork 0
/
newEmptyPHP.php
55 lines (55 loc) · 3.24 KB
/
newEmptyPHP.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
<div class="update-activity">
<table border="0" width="100%">
<tr class="first">
<th>Time Slot</th>
<th>Activity</th>
<th>Edit</th>
</tr>
<div class="message"></div>
<?php foreach ($slot_ids as $slot_id): /* Loop till end of availabe slots */ ?>
<tr>
<td><?php echo $slots[$slot_id]; ?></td>
<td>
<?php echo $_user->getTruncateString($slot_id, $selected_date) . '...'; ?>
</td>
<td>
<a title="enter/edit activity" href="javascript:displayTab(<?php echo $slot_id ?>)"><img class="edit-image" src="<?php echo $_core->getSkinUrl('images/plus.png')?>" /></a>
</td>
</tr>
<?php if($selected_date==$today_date):?>
<tr id="tabs-content-<?php echo $slot_id ?>" class="tab-field">
<td colspan="3">
<form action="" method="post" onsubmit="return activityEntry(<?php echo $slot_id ?>);">
<div>
<label id="label-<?php echo $slot_id ?>" for="activity-type-<?php echo $slot_id ?>" class="activity-type">Select Activity Type :</label>
<select id="activity-type-<?php echo $slot_id ?>">
<option id="0">Select type</option>
<?php
$i=0;
$selected_activity_id=$_user->getActivityTypeId($slot_id, $selected_date);
while ($i < $activity_counter):
?>
<option id="<?php echo $activity_type_id[$i]; ?>" <?php if($activity_type_id[$i]==$selected_activity_id):?>selected="selected"<?php endif;?>)><?php echo $activity_types[$activity_type_id[$i]]; ?></option>
<?php $i++; endwhile;?>
</select>
<p><label>Add Activity :</label></p>
<textarea class="editor" id="activity-<?php echo $slot_id ?>" cols="50" rows="15"><?php echo $_user->getActivity($slot_id, $selected_date); ?></textarea>
</div>
<input type="submit" class="submit" value="submit" />
<a class="cancel-editor button" onclick="hideTab(<?php echo $slot_id ?>)"><span><img src="<?php echo $_core->getSkinUrl('images/cancel.png')?>" />cancel</span></a>
</form>
</td>
</tr>
<?php else:?>
<tr id="tabs-content-<?php echo $slot_id ?>" class="tab-field disabled">
<td colspan="3">
<h5 class="activity-head">Activity :</h5>
<p class="activity-desc"><?php echo $_user->getActivity($slot_id, $selected_date); ?></p>
<a class="cancel-editor button" onclick="hideTab(<?php echo $slot_id ?>)"><span><img src="<?php echo $_core->getSkinUrl('images/minus.png')?>" />hide</span></a>
</td>
</tr>
<?php endif;?>
<?php endforeach; ?>
</table>
<div class="home-timeline"></div>
</div>