Пример #1
0
 function detail($id)
 {
     $this->data['title'] = $this->title . ' - Detail';
     permissionUser();
     $this->data['id'] = $id;
     $this->data['is_deleted'] = getValue('is_deleted', 'purchase_order', array('id' => 'where/' . $id));
     $this->data['catatan'] = getValue('catatan', 'purchase_order', array('id' => 'where/' . $id));
     $this->data[$this->file_name] = $this->main->get_detail($id);
     $this->data[$this->file_name . '_list'] = $this->main->get_list_detail($id);
     $no_pr = getValue('no', 'purchase_order', array('id' => 'where/' . $id));
     $this->data['user_app_lv1'] = getValue('created_by', 'purchase_request', array('id' => 'where/' . $no_pr));
     $this->data['user_app_lv2'] = getValue('user_id', 'approver', array('level' => 'where/1'));
     $this->data['user_app_lv3'] = getValue('user_id', 'approver', array('level' => 'where/2'));
     $this->data['user_app_lv4'] = getValue('user_id', 'approver', array('level' => 'where/3'));
     $this->data['jabatan_lv1'] = getUserGroup($this->data['user_app_lv1']);
     $this->data['jabatan_lv2'] = getValue('jabatan', 'approver', array('level' => 'where/1'));
     $this->data['jabatan_lv3'] = getValue('jabatan', 'approver', array('level' => 'where/2'));
     $this->data['jabatan_lv4'] = getValue('jabatan', 'approver', array('level' => 'where/3'));
     $this->_render_page($this->module . '/' . $this->file_name . '/detail', $this->data);
 }
Пример #2
0
    <td align="right" width="100" bgcolor="#999999" height="20"><font color="#FFFFFF">允许发帖用户组:<br>
      <input type="button" value="全    选" name="B5" class="inputbox" onClick="checkselect('allowpost[]');" />
      <input type="button" value="全 不 选" name="B5" class="inputbox" onClick="uncheckselect('allowpost[]');" />
    </font></td>
    <td bgcolor="#FFFFFF"><select name="allowpost[]" size="8" multiple id="allowpost[]" style="width:300px;"><?php 
echo getUserGroup($MyDatabase, $forum['allowpost']);
?>
</select>	</td>
  </tr> 
  <tr>
    <td align="right" width="100" bgcolor="#999999" height="20"><font color="#FFFFFF">允许回复用户组:<br>
      <input type="button" value="全    选" name="B6" class="inputbox" onClick="checkselect('allowreply[]');" />
      <input type="button" value="全 不 选" name="B6" class="inputbox" onClick="uncheckselect('allowreply[]');" />
    </font></td>
    <td bgcolor="#FFFFFF"><select name="allowreply[]" size="8" multiple id="allowreply[]" style="width:300px;"><?php 
echo getUserGroup($MyDatabase, $forum['allowreply']);
?>
</select>	</td>
  </tr>    
  <tr>
    <td bgcolor="#999999"></td>
    <td bgcolor="#FFFFFF">
      <input type="hidden" name="fid"	value="<?php 
echo $fid;
?>
" />
      <input type="hidden" name="mode"	value="<?php 
echo $mode;
?>
" />
      <input type="hidden" name="title"	value="<?php 
Пример #3
0
)"><?php 
            echo $myRecord[Username];
            ?>
</a> 
						</td>
						<td><?php 
            echo $myRecord[FirstName];
            ?>
 </td>
						<td><?php 
            echo $myRecord[LastName];
            ?>
 </td>
						<td>
							<?php 
            getUserGroup($myRecord[Username], true);
            //From generalFunctions.php //TODO IMPROVE QUARY
            ?>
							</td>
						<td><?php 
            getPermissionID($myRecord[Username], false, true);
            ?>
</td>
						<td><?php 
            echo $myRecord[DayOfBirth] . "/" . $myRecord[MonthOfBirth] . "/" . $myRecord[YearOfBirth];
            ?>
 </td>
						<td><?php 
            echo $myRecord[City];
            ?>
 </td>
 public function index()
 {
     $uid = (int) $_GET['id'];
     if (empty($uid)) {
         if (empty($this->userId)) {
             $this->redirect('', '', 'index');
         } else {
             $uid = $this->userId;
             $Profile = $this->userInfo;
         }
     } else {
         if ($uid == $this->userId) {
             $uid = $this->userId;
             $Profile = $this->userInfo;
         } else {
             $dao = D('User');
             $Profile = $dao->find($uid);
             if (empty($Profile)) {
                 $this->redirect('', '', 'home');
             }
             if (empty($this->userId)) {
                 $this->redirect('', '', 'people', '', array('name' => str_replace(' ', '-', $Profile['name']), 'id' => $uid));
             }
         }
     }
     $this->assign('profile', $Profile);
     /*
      * get current user's friends
      */
     $currentUserFriend = getFriend($uid);
     foreach ($currentUserFriend as &$key) {
         $key = array('uid' => current(array_diff($key, array($uid))));
     }
     /*
      * get friend relation
      */
     $userRelation = $this->getFriendRelation($uid);
     $this->assign('userRelation', $userRelation);
     /*
      * redirect for stranger
      */
     if ($userRelation == 'stranger') {
         $this->redirect('', '', 's', '', array('id' => $uid));
     }
     /*
      * get friend subheader
      */
     $friendCount = count($currentUserFriend);
     if (!$currentUserFriend) {
         $friendSubheader = L('_friend_subheader3');
     } else {
         if ($friendCount > 1) {
             $friendSubheader = '<a href="' . url('', '', 'friends', '', array('id' => $uid)) . '">' . sprintf(L('_friend_subheader1'), $friendCount) . '</a>';
         } else {
             $friendSubheader = '<a href="' . url('', '', 'friends', '', array('id' => $uid)) . '">' . sprintf(L('_friend_subheader2'), $friendCount) . '</a>';
         }
     }
     $this->assign('friendCount', $friendCount);
     $this->assign('friendSubheader', $friendSubheader);
     /*
      * get user info
      */
     shuffle($currentUserFriend);
     $j = 0;
     for ($i = 0; $i < $friendCount; $i++) {
         $friend_uid = $currentUserFriend[$i]['uid'];
         $currentUserFriendShuffle[$i]['uid'] = $friend_uid;
         $currentUserFriendShuffle[$i]['userInfo'] = getUserBasicInfo($friend_uid);
         $currentUserFriendShuffle[$i]['key'] = $j;
         $currentUserFriendShuffle[$i]['id'] = $i + 1;
         if ($j == 2) {
             $j = 0;
         } else {
             $j++;
         }
         if ($i == 5) {
             break;
         }
     }
     $this->assign('currentUserFriend', $currentUserFriendShuffle);
     /*
      * get user group
      */
     $userGroupAll = getUserGroup($uid);
     $userGroup = array();
     if (empty($userGroupAll)) {
         $userGroup = $userGroupAll;
     } else {
         if ($this->userId == $uid) {
             $userGroup = $userGroupAll;
             foreach ($userGroup as &$key) {
                 $map['id'] = $key['gid'];
                 $info = D('Group')->find($map);
                 $key += array('info' => $info);
             }
         } else {
             $j = 0;
             for ($i = 0; $i < count($userGroupAll); $i++) {
                 $map['id'] = $userGroupAll[$i]['gid'];
                 $info = D('Group')->find($map);
                 if ($info['privacy'] != 'SECRET') {
                     $userGroup[$j] = $userGroupAll[$i] + array('info' => $info);
                     $j++;
                 }
             }
         }
     }
     $this->assign('userGroup', $userGroup);
     /*
      * get user wall
      */
     $listRows = 5;
     $WallCls = new WallAction();
     $Wall = $WallCls->getWall($uid, 'u', $listRows, 1);
     $wallSubheader = $WallCls->getWallHeader($Wall['count'], $listRows, $uid, 'u');
     $this->assign('wall', $Wall);
     $this->assign('wallSubheader', $wallSubheader);
     $this->display();
 }
Пример #5
0
    <tr>
      <td align="right" width="100" bgcolor="#999999" height="20"><font color="#FFFFFF">用 户 名:</font></td>
      <td bgcolor="#FFFFFF">&nbsp;<?php 
echo $user['username'];
?>
</td>
    </tr>
    <tr>
      <td align="right" width="100" bgcolor="#999999" height="20"><font color="#FFFFFF">密  码:</font></td>
      <td bgcolor="#FFFFFF"><input name="password" type="text" class="InputBox" id="password" size="80" style="width:300"  onMouseOver="select();" >
      <input type="button" value="生成新密码" name="B2" class="inputbox" accesskey="Y" onClick="createPassword('password',10);" /></td>
    </tr>
    <tr>
      <td align="right" width="100" bgcolor="#999999" height="20"><font color="#FFFFFF">用户权限:</font></td>
      <td bgcolor="#FFFFFF"><select name="groupid" id="groupid"><?php 
echo getUserGroup($MyDatabase, $user['groupid']);
?>
</select>
      </td>
    </tr>
    <tr>
      <td align="right" width="100" bgcolor="#999999" height="20"><font color="#FFFFFF">邮  箱:</font></td>
      <td bgcolor="#FFFFFF"><input name="email" type="text" class="InputBox" id="email" style="width:300px;"  onMouseOver="select();" value="<?php 
echo $user['email'];
?>
" size="80" ></td>
    </tr>
    <tr>
      <td align="right" width="100" bgcolor="#999999" height="20"><font color="#FFFFFF">威  望:</font></td>
      <td bgcolor="#FFFFFF"><input name="rvrc" type="text" class="InputBox" id="rvrc" style="width:300px;"  onMouseOver="select();" value="<?php 
echo $user['rvrc'];
Пример #6
0
function getTotalMinutesUsed()
{
    load::smodel("incoming_calls");
    load::smodel("outgoing_calls");
    $incoming_calls = new incoming_calls();
    $outgoing_calls = new outgoing_calls();
    $user_incoming = $incoming_calls->getByUsers(getUserGroup(session::get("id")));
    $user_outgoing = $outgoing_calls->getByUsers(getUserGroup(session::get("id")));
    $billedFor = 0;
    foreach ($user_incoming as $call) {
        $billedFor += $call["billed_length"];
    }
    foreach ($user_outgoing as $call) {
        $billedFor += $call["billed_duration"];
    }
    return $billedFor;
}
Пример #7
0
list($roomID, $roomOwnerID) = chatRoomID($_REQUEST['roomID'], $roomPass);
list($roomBg, $roomDesc) = chatRoomDesc($roomID);
/*
* get user details
*
*/
$guestUser = '******';
if ($_POST['isGuest']) {
    updateGuestAvatar($_REQUEST['genderID']);
}
list($id, $avatar, $loginError, $blockedList, $guestUser) = getUser($prevRoom, $roomID);
/*
* assign user group
*
*/
getUserGroup($_SESSION['userGroup']);
/*
* final check for user login error
*
*/
if ($loginError) {
    include "templates/" . $CONFIG['template'] . "/login.php";
    die;
}
/*
* assign room owner
*
*/
$roomOwner = '0';
if ($id == $roomOwnerID) {
    $roomOwner = '1';
Пример #8
0
    function getUserInfoHTML($edit = 0, $notAllowdToEdit = 0)
    {
        if ($edit) {
            $LineStart = "<input type=\"text\" name=\"";
            $LineMiddle = "\" value=\"";
            $LineEnd = "\"";
        } else {
            $LineStart = "";
            $LineMiddle = "";
            $LineEnd = "";
        }
        if (isset($_POST[add_user])) {
            $addUser = true;
            ?>
		<input type="hidden" name="addUser" value="addUser">
		<?php 
        }
        ?>
	 	
	 	<input type="hidden" name="newUserApproval" value="<?php 
        echo $this->uname;
        ?>
">
	 	<input type="hidden" name="getUserInfo" value="<?php 
        echo $this->uname;
        ?>
">
	 	<input type="hidden" name="uname" value="<?php 
        echo $this->uname;
        ?>
">  
	 	<!-- 
	 	
	 	-->
	 	<table>
	 		<tr>
	 			<td>שם פרטי	</td>
	 			<td><?php 
        //echo $this->firstName
        ?>
	 				<?php 
        echo $LineStart;
        if ($edit) {
            echo "firstName";
        }
        echo $LineMiddle . $this->firstName . $LineEnd;
        ?>
	 			</td>
	 		</tr>
	 		<tr>
	 			<td>שם משפחה</td>
	 			<td>
	 				<?php 
        echo $LineStart;
        if ($edit) {
            echo "lastName";
        }
        echo $LineMiddle . $this->lastName . $LineEnd;
        ?>
	 			</td>
	 		</tr>
	 		<tr>
	 			<td>שם משתמש</td>
	 			<td>
	 				<?php 
        //echo $this->uname;
        ?>
	 				<?php 
        echo $LineStart;
        if ($addUser) {
            echo "uname";
        }
        echo $LineMiddle . $this->uname . $LineEnd;
        ?>
	 			</td>
	 		</tr>
	 		<tr>
	 			<td>תעודת זהות</td>
	 			<td>
	 			<?php 
        echo $LineStart;
        if ($edit) {
            echo "id";
        }
        echo $LineMiddle . $this->id . $LineEnd;
        ?>
	 			</td>
	 		</tr>
	 		<tr>
	 			<td>בית ספר</td>
	 			<td>
	 			<?php 
        //From generalFunctions.php
        if ($edit && $edit != -1) {
            ?>
 
		 					<select name="memberOfGroup" >
									<?php 
            getGroupsList($this->memberOfGroup);
            ?>
 
							</select>
	 					<?php 
        } else {
            getUserGroup($this->uname, true);
            //Echo to screen
        }
        ?>
	 			
	 			</td>
	 		</tr>
	 		<tr>
	 			<td>טלפון</td>
	 			<td>
	 			<?php 
        echo $LineStart;
        if ($edit) {
            echo "phone";
        }
        echo $LineMiddle . $this->phone . $LineEnd;
        ?>
	 			</td>
	 		</tr>
	 		<tr>
	 			<td>טלפון נייד</td>
	 			<td>
	 			<?php 
        echo $LineStart;
        if ($edit) {
            echo "cellPhone";
        }
        echo $LineMiddle . $this->cellPhone . $LineEnd;
        ?>
	 			</td>
	 		</tr>
	 		<tr>
	 			<td>דוא"ל</td>
	 			<td>
	 				<?php 
        echo $LineStart;
        if ($edit) {
            echo "email";
        }
        echo $LineMiddle . $this->email . $LineEnd;
        ?>
	 			</td>
	 		</tr>
	 		<tr>
	 			<td> תאריך לידה</td>
	 			<td>
	 				<?php 
        //echo $LineStart;
        if ($edit) {
            ?>
 
		 								<select name="year_of_birth" >
										<?php 
            getYear($this->BirthYear);
            ?>
										</select>
		
		    
										<select name="month_of_birth" >
										<?php 
            getMonth($this->birthMonth);
            ?>
										</select>
		
		    
										<select name="day_of_birth" >
										<?php 
            getDay($this->birthDay);
            ?>
										</select> <?php 
        } else {
            if (strcmp($this->BirthYear, "") != 0 && $this->BirthYear != 0) {
                echo $LineMiddle . $this->birthDay . "/" . $this->birthMonth . "/" . $this->BirthYear . $LineEnd;
            }
        }
        ?>
</td>
	 		</tr>
	 		<tr>
	 			<td>ישוב</td>
	 			<td>
		 			<?php 
        echo $LineStart;
        if ($edit) {
            echo "city";
        }
        echo $LineMiddle . $this->city . $LineEnd;
        ?>
	 			</td>
	 		</tr>
	 		<tr>
	 			<td>רחוב</td>
	 			<td>
	 				<?php 
        echo $LineStart;
        if ($edit) {
            echo "street";
        }
        echo $LineMiddle . $this->Street . $LineEnd;
        ?>
	 			</td>
	 		</tr>
	 		<tr>
	 			<td>מס' בית</td>
	 			<td>
	 				<?php 
        echo $LineStart;
        if ($edit) {
            echo "houseNumber";
        }
        echo $LineMiddle . $this->houseNumber . $LineEnd;
        ?>
	 			</td>
	 		</tr>
	 		<tr>
	 			<td>שם האב</td>
	 			<td>
	 				<?php 
        echo $LineStart;
        if ($edit) {
            echo "fatherName";
        }
        echo $LineMiddle . $this->fatherName . $LineEnd;
        ?>
	 			</td>
	 		</tr>
	 		<tr>
	 			<td>מספר טלפון של האב</td>
	 			<td>
	 				<?php 
        echo $LineStart;
        if ($edit) {
            echo "fatherPhoneNumber";
        }
        echo $LineMiddle . $this->fatherPhoneNo . $LineEnd;
        ?>
	 			</td>
	 		</tr>
	 		<tr>
	 			<td>שם האם</td>
	 			<td>
	 				<?php 
        echo $LineStart;
        if ($edit) {
            echo "motherName";
        }
        echo $LineMiddle . $this->motherName . $LineEnd;
        ?>
	 			</td>
	 		</tr>
	 		<tr>
	 			<td>מספר טלפון של האם</td>
	 			<td>
	 				<?php 
        echo $LineStart;
        if ($edit) {
            echo "motherPhoneNumber";
        }
        echo $LineMiddle . $this->motherPhoneNo . $LineEnd;
        ?>
	 			</td>
	 		</tr>
	 		<tr>
	 			<td>הרשאות</td>
	 			
	 			<td>
	 				<?php 
        //From generalFunctions.php
        if ($edit == 1) {
            ?>
 
		 					<select name="permissionGroup" >
									<?php 
            getPermissionList($this->permission[PID]);
            ?>
							</select>
	 					<?php 
        } else {
            if (isset($this->permission[PGroupName])) {
                echo $this->permission[PGroupName];
            } else {
                echo "חניך";
            }
        }
        ?>
	 				<input type="hidden" name="approved" value="<?php 
        echo $this->approved();
        ?>
">
	 				</td>
	 		</tr> 			
	 		<?php 
        //			$this->birthDay="";
        //			$this->birthMonth="";
        //
        //			$this->city="";
        //			$this->Street="";
        //			$this->houseNumber="";
        //
        //			$this->memberOfGroup="";
        //			$this->permissionGroup="";
        //
        //			$this->approvedUser="";
        ?>
 
	 	</table>
	 	<table>
	 		<tr>
	 			<?php 
        if ($edit) {
            ?>
	 					<td>
	 						<input type="submit" name="userUpdateSave" value="שמור שינויים">
	 					</td>
	 					<td>
	 						<input type="submit" name="userUpdeateCancel" value="בטל שינויים">
	 					</td>
	 					<td>
	 						<input type="submit" name="resetPassword" value="איפוס סיסמא" title="איפוס הסיסמא ל1234">
	 					</td>
	 				<?php 
        } else {
            if (!$notAllowdToEdit) {
                ?>
<td><input type="submit" name="editUserData" value="ערוך"></td>
	 					<?php 
            }
        }
        ?>
	 		</tr>
	 	</table>
	 	<?php 
    }
Пример #9
0
    $sql = "INSERT INTO EventTable(Username,Eday,Emonth,Eyear,Ehour,eventDis, eventActionsbefore ,eventActionsduring ,eventActionsdAfter ,summary ,prevent ,react ,comments) values('" . $loggedUser->getUname() . "'," . 12 . "," . 1 . "," . 2 . ",'" . $_post[Ehour] . "','" . $_post[eventDis] . "','" . $_POST[eventActionsbefore] . "','" . $_post[eventActionsduring] . "','" . $_post[eventActionsdAfter] . "','" . $_post[summary] . "','" . $_POST[prevent] . "','" . $_post[react] . "','" . $_post[comments] . "')";
    printSqlQuary($sql);
    $result = executeQuary($sql);
    if (mysql_affected_rows() == 0) {
        echo "Error in Insert SQL Query: " . $sql;
    }
}
?>
	
	<h1>דו"ח אירוע חריג משמעת ובטיחות </h1><br>
		<h2>שם המדריך:    <?php 
echo $loggedUser->getUname();
?>
<br> 
			שם בית הספר:  <?php 
getUserGroup($loggedUser->getUname(), true);
?>
<br>
		</h2>	
			     	<?php 
//  excute quary to get the list of all users which belong to this group
//d.socilGoal,d.professionalGaol,d.seaCenterId,d.activityNumber,d.outGuide,d.volGuide,d.profGuide1,d.profGuide2,d.timeofActicity,d.typesofseatols,d.activity
$EventSql = "SELECT e.Eday,e.Emonth,e.Eyear,e.Ehour,e.eventDis, e.eventActionsbefore ,e.eventActionsduring ,e.eventActionsdAfter ,e.summary ,e.prevent ,e.react ,e.comments FROM EventTable e where e.username='******'";
$Eventresult = executeQuary($EventSql);
$myRecord = mysql_fetch_array($Eventresult);
?>
			שעת המקרה: <br>
				<input type="text" name="Ehour" value ="<?php 
echo $myRecord[Ehour];
?>
" > <br>
Пример #10
0
						<?php 
}
?>
					</tbody>
				</table>
			</div>
			</div>
		</div>
		<!-- <hr/>
		<div class="row form-row">
			<div class="col-md-8 col-md-offset-2">
				<div class="col-md-4 text-center">
					<h5 class="margin-bottom-30">Dibuat Oleh,</h5><br/><br/>
					<h5 class="margin-top-30"><?php 
echo getFullName($det->created_by);
?>
</h5>
					<h5><?php 
echo dateIndo($det->created_on);
?>
</h5>
					<h5>(<?php 
echo getUserGroup($det->created_by);
?>
)</h5>
				</div>
			</div>
		</div> -->
	</form>
</div>
<!-- end: INVOICE -->
Пример #11
0
    getTruckByID($truckID, $mysqli);
}
if ($functionname == 'delTruck') {
    $truckID = $_POST["truckID"];
    delTruck($truckID, $mysqli);
}
/*User Group*/
if ($functionname == 'setUserGroup') {
    $userGroupID = $_POST["userGroupID"];
    $userGroupName = $_POST["userGroupName"];
    $userGroupDescription = $_POST["userGroupDescription"];
    $userGroupCode = $_POST["userGroupCode"];
    setUserGroup($userGroupID, $userGroupName, $userGroupDescription, $userGroupCode, $mysqli);
}
if ($functionname == 'getUserGroup') {
    getUserGroup($mysqli);
}
if ($functionname == 'getUserGroupByID') {
    $userGroupID = $_POST["userGroupID"];
    getUserGroupByID($userGroupID, $mysqli);
}
if ($functionname == 'delUserGroup') {
    $userGroupID = $_POST["userGroupID"];
    delUserGroup($userGroupID, $mysqli);
}
/*Menu*/
if ($functionname == 'setMenu') {
    $menuID = $_POST["menuID"];
    $menuName = $_POST["menuName"];
    $menuDescription = $_POST["menuDescription"];
    $menuCode = $_POST["menuCode"];
Пример #12
0
    ?>
:<?php 
}
?>
</td>
		<td align="right" colspan="2"><?php 
if ($o->metode_pembayaran_id == 2) {
    echo number_format($o->dibayar, 2);
}
?>
</td>
	</tr>

	<tr>
		<td align="center">(<?php 
echo getUserGroup($o->created_by);
?>
)</td>
		<td align="center"><!--(<?php 
echo getFullName($o->created_by);
?>
)--></td>
		<td align="center"><!--(Sign & Return by Fax)--></td>
		<td colspan="3"><?php 
if ($o->metode_pembayaran_id == 2) {
    ?>
Saldo<?php 
}
?>
</td>
		<td align="right"><?php 
Пример #13
0
			getHospitalLegaleseTimestamps("1");

		case '1.9.5':
			reportPerson($personXML, $eventShortname, $xmlFormat, $user, $pass);
			createPersonUuid($user, $pass);
			createPersonUuidBatch($number, $user, $pass);
			createNoteUuid($user, $pass);
			createNoteUuidBatch($number, $user, $pass);
			search("test", "t");
			searchWithAuth("test", "t", $user, $pass);
			getSessionTimeout();
			registerUser("testCaseUser", "*****@*****.**", "testPassword99", "testCaseGiven", "testCaseFamily");
			changeUserPassword($user, $pass, $pass);
			forgotUsername($email);
			checkUserAuth($user, $pass);
			getUserStatus($user);
			getUserGroup($user);
			getEventList();
			getEventListUser($user, $pass);
			getGroupList();
			getHospitalList();
			getHospitalData("1");
			getHospitalPolicy("1");
	}
	echo "</table><b>Note: deprecated functions are not listed/tested.</b></body>";
}




Пример #14
0
function drawEditDay($date, $loggedUsername, $loggedUserfirstname, $loggedUsergroup, $edit = 1)
{
    $ins = explode(",", $date);
    ?>
	
		<h1>דו"ח פעילות יומית </h1>
		<h2>שם המדריך:    <?php 
    echo $loggedUserfirstname;
    ?>
<br> 
			שם בית הספר:  <?php 
    getUserGroup($loggedUsername, true);
    ?>
<br>
			תאריך:  <?php 
    echo $ins[0] . "/" . $ins[1] . "/" . $ins[2];
    ?>
 <br>
			הכנה לקראת הפעילות
			</h2>
		
		<input type="hidden" name="saveDate" value="<?php 
    echo $date;
    ?>
">
	     	<?php 
    //  excute quary to get the list of all users which belong to this group
    //d.socilGoal,d.professionalGaol,d.seaCenterId,d.activityNumber,d.outGuide,d.volGuide,d.profGuide1,d.profGuide2,d.timeofActicity,d.typesofseatols,d.activity
    $daySql = "SELECT d.socilGoal,d.professionalGaol,d.seaCenterId,d.activityNumber, d.nextImprove ,d.outGuide,d.volGuide,d.profGuide1,d.profGuide2,d.timeofActicity,d.typesofseatols,d.activity, d.extend,d.goal,d.goal2,d.more ,d.chelenge ,d.extendevent,d.next,d.problems, d.problems2,d.kind FROM dailyreport d where d.username='******' and d.day='" . $ins[0] . "' and d.month='" . $ins[1] . "' and d.year='" . $ins[2] . "'";
    $Dayresult = executeQuary($daySql);
    $myRecord = mysql_fetch_array($Dayresult);
    ?>
			<table CLASS="CALENDAR" BORDER="1">
		 <tr >
		 	
		 	<td>שם המרכז הימי המפעיל<br>
		 	<?php 
    if ($edit == 1) {
        ?>
		 		<select name="seacenter">
		 		<?php 
        getSeaCenter($myRecord[seaCenterId]);
        ?>
		 		</select>
		 	<?php 
    } else {
        echo $myRecord[seaCenterId];
    }
    ?>
	

		 	</td>
		 	<td> מספר פעילות <br>
		 	<?php 
    if ($edit == 1) {
        ?>
		 		<input type="text" name="activitynumber" value="<?php 
        echo $myRecord[activityNumber];
        ?>
">
		 	<?php 
    } else {
        echo $myRecord[activityNumber];
    }
    ?>
 
		 	</td>
		</tr>
		<tr>
			<td> סוג הפעילות</td>
			<td>
			<?php 
    if ($edit == 1) {
        ?>
			<input type="text" name="kind" value="<?php 
        echo $myRecord[kind];
        ?>
">
			<?php 
    } else {
        echo $myRecord[kind];
    }
    ?>
			</td>
		</tr>
		
		<tr>
			<td> מדריך מקצועי זר</td>
			<td>
			<?php 
    if ($edit == 1) {
        ?>
			<input type="text" name="outGuide" value="<?php 
        echo $myRecord[outGuide];
        ?>
">
			<?php 
    } else {
        echo $myRecord[outGuide];
    }
    ?>
			</td>
		</tr>
		<tr>
			<td> מדריך מתנדב</td>
			<td>
			<?php 
    if ($edit == 1) {
        ?>
			<input type="text" name="volGuide" value="<?php 
        echo $myRecord[volGuide];
        ?>
">
			<?php 
    } else {
        echo $myRecord[volGuide];
    }
    ?>
			</td>
		</tr>
		<tr>
			<td> מדריך מקצועי זיו נעורים</td>
			<td>
				<?php 
    if ($edit == 1) {
        ?>
				<select name="zivProfguides1" >
					<?php 
        getAllGuidsName($myRecord[profGuide1]);
        ?>
				</select>
				<?php 
    } else {
        echo $myRecord[profGuide1];
    }
    ?>
			</td>
		</tr>
		<tr>
			<td>  מדריך מקצועי זיו נעורים</td>
			<td>
			<?php 
    if ($edit == 1) {
        ?>
			<select name="zivProfguides2" >
					<?php 
        getAllGuidsName($myRecord[profGuide2]);
        ?>
			</select>
			<?php 
    } else {
        echo $myRecord[profGuide2];
    }
    ?>
			</td>
		</tr>
		<tr>
			<td>  אורך הפעילות</td>
			<td>
			<?php 
    if ($edit == 1) {
        ?>
			<select name="timeofActicity">
			<?php 
        if ($myRecord[timeofActicity] == "רגילה") {
            ?>
			
			<option selected="yes">רגילה </option>
			<option> כפולה</option>
			<?php 
        } else {
            ?>
				<option>רגילה </option>
				<option selected="yes"> כפולה</option>
			<?php 
        }
        ?>
			</select>
			<?php 
    } else {
        echo $myRecord[timeofActicity];
    }
    ?>
			</td>
		</tr>
		
		<tr>
			<td> מטרת הפעילות : חברתית  </td>
			<td>
			<?php 
    if ($edit == 1) {
        ?>
			<center>
			<textarea  name="socialGoal" rows="10" cols="50"><?php 
        echo $myRecord[socilGoal];
        ?>
</textarea>
			</center>
			<?php 
    } else {
        echo $myRecord[socilGoal];
    }
    ?>
			</td>
		</tr>
		<tr>
		
		<td>	 מטרת הפעילות : מקצועית</td>
		<td>
			<?php 
    if ($edit == 1) {
        ?>
			<center>
			<textarea  name="profGoal" rows="10" cols="50"><?php 
        echo $myRecord[professionalGaol];
        ?>
</textarea>
			</center>		
			<?php 
    } else {
        echo $myRecord[professionalGaol];
    }
    ?>
	
		</td>
		</tr>
		<tr>
			<td>
				סוג, מספר הכלים ועזרים נוספים
			</td>
			<td>
				<?php 
    if ($edit == 1) {
        ?>
				<input type="text" name="typesofseatols" value="<?php 
        echo $myRecord[typesofseatols];
        ?>
">
				<?php 
    } else {
        echo $myRecord[typesofseatols];
    }
    ?>
	
			</td>
		</tr>
		<tr>
			<td>
				תכנון מהלך הפעילות
			</td>
			<td>
			<?php 
    if ($edit == 1) {
        ?>
			<center>
				<textarea  name="activity" cols="50" rows="10"><?php 
        echo $myRecord[activity];
        ?>
</textarea>
				</center>
			<?php 
    } else {
        echo $myRecord[activity];
    }
    ?>
	
			</td>
		</tr>
		<tr>
			<td>
				תיאור הפעילות בהרחבה, משלב המפגש בביה"ס עד לאחר הפיזור
			</td>
			<td>
			<?php 
    if ($edit == 1) {
        ?>
			<center>
				<textarea  name="extend" cols="50" rows="10"><?php 
        echo $myRecord[extend];
        ?>
</textarea>
				</center>
			<?php 
    } else {
        echo $myRecord[extend];
    }
    ?>
	
			</td>
		</tr>
		<tr>
			<td>
				ערך השגת המטרה המקצועית
			</td>
			<td>
			<?php 
    if ($edit == 1) {
        ?>
			<center>
				<textarea  name="goal" cols="50" rows="10"><?php 
        echo $myRecord[goal];
        ?>
</textarea>
				</center>
			<?php 
    } else {
        echo $myRecord[goal];
    }
    ?>
	
			</td>
		</tr>
			<tr>
			<td>
				ערך השגת המטרה החברתית
			</td>
			<td>
			<?php 
    if ($edit == 1) {
        ?>
			<center>
				<textarea  name="goal2" cols="50" rows="10"><?php 
        echo $myRecord[goal2];
        ?>
</textarea>
				</center>
			<?php 
    } else {
        echo $myRecord[goal2];
    }
    ?>
	
			</td>
		</tr>
		
			<tr>
			<td>
				הצלחות נוספות
			</td>
			<td>
			<?php 
    if ($edit == 1) {
        ?>
			<center>
				<textarea  name="more" cols="50" rows="10"><?php 
        echo $myRecord[more];
        ?>
</textarea>
				</center>
			<?php 
    } else {
        echo $myRecord[more];
    }
    ?>
	
			</td>
		</tr>
		<tr>
			<td>
				אתגרים – קשיים ודילמות
			</td>
			<td>
			<?php 
    if ($edit == 1) {
        ?>
			<center>
				<textarea  name="chelenge" cols="50" rows="10"><?php 
        echo $myRecord[chelenge];
        ?>
</textarea>
				</center>
			<?php 
    } else {
        echo $myRecord[chelenge];
    }
    ?>
	
			</td>
		</tr>
		<tr>
			<td>
				אירועים מיוחדים
			</td>
			<td>
			<?php 
    if ($edit == 1) {
        ?>
			<center>
				<textarea  name="extendevent" cols="50" rows="10"><?php 
        echo $myRecord[extendevent];
        ?>
</textarea>
				</center>
			<?php 
    } else {
        echo $myRecord[extendevent];
    }
    ?>
	
			</td>
		</tr>
		<tr>
			<td>
				מטרות, יעדים ונקודות לשיפור לפעילות הבאה
			</td>
			<td>
			<?php 
    if ($edit == 1) {
        ?>
			<center>
				<textarea  name="nextImprove" cols="50" rows="10"><?php 
        echo $myRecord[nextImprove];
        ?>
</textarea>
				</center>
			<?php 
    } else {
        echo $myRecord[nextImprove];
    }
    ?>
	
			</td>
		</tr>
		<tr>
			<td>
				בעיות בתשתית הימית הקשורות במפעיל איחור, חוסר בציוד, ציוד לא תקין, תיאום וכו
			</td>
			<td>
			<?php 
    if ($edit == 1) {
        ?>
			<center>
				<textarea  name="problems" cols="50" rows="10"><?php 
        echo $myRecord[problems];
        ?>
</textarea>
				</center>
			<?php 
    } else {
        echo $myRecord[problems];
    }
    ?>
	
			</td>
		</tr>
			<tr>
			<td>
				בעיות בהדרכה המקצועית נא לציין את שמות המדריך/ים
			</td>
			<td>
			<?php 
    if ($edit == 1) {
        ?>
			<center>
				<textarea  name="problems2" cols="50" rows="10"><?php 
        echo $myRecord[problems2];
        ?>
</textarea>
				</center>
			</td>
			<?php 
    } else {
        echo $myRecord[problems2];
    }
    ?>
	
		</tr>
		</table>

		<?php 
    if ($edit == 1) {
        ?>
		 <table CLASS="LIST_BUTTONS">		
			 <tr>
			 	<td>
			 	<td>   <input type = "submit" name="daliyreportSaveChange" value="   עדכן   " title="לחץ כאן כדי לשמור את דוח היומי">  </td>
			 
				 </tr>
		</table>
		<?php 
    } else {
        ?>
			 <input type = "submit" name="retorntoMonthReport" value="חזרה לדוח חודשי" >	 
		<?php 
    }
    $EventSql = "SELECT e.Eday,e.Emonth,e.Eyear,e.Ehour,e.Emin,e.eventDis, e.eventActionsbefore ,e.eventActionsduring ,e.eventActionsdAfter ,e.summary ,e.prevent ,e.react ,e.comments FROM eventtable e where e.username='******'and e.Eday=" . $ins[0] . " and e.Emonth=" . $ins[1] . " and e.Eyear=" . $ins[2];
    $Eventresult = executeQuary($EventSql);
    if (mysql_affected_rows() < 1 && $edit != 1) {
        return;
    }
    ?>

		
<div  id="addNewFileLayerTitle" onmousemove="javascript:LayerOnMouseOver(addNewFileLayerTitle)" onclick="javascript:showMenu(addNewFileLayer)">
			<img src="img/exclamationMark.JPG">   דו"ח אירוע חריג לפעילות זו
		
		</div>
<DIV id="addNewFileLayer">		
			<input type="hidden" name="saveDate2" value="<?php 
    echo $date;
    ?>
">
		
		<h1>דו"ח אירוע חריג משמעת ובטיחות </h1><br>
		<?php 
    //	     	$EventSql="SELECT e.Eday,e.Emonth,e.Eyear,e.Ehour,e.Emin,e.eventDis, e.eventActionsbefore ,e.eventActionsduring ,e.eventActionsdAfter ,e.summary ,e.prevent ,e.react ,e.comments FROM eventtable e where e.username='******'and e.Eday=".$ins[0]." and e.Emonth=".$ins[1]." and e.Eyear=".$ins[2];
    //
    //			$Eventresult=executeQuary($EventSql);
    $myRecord = mysql_fetch_array($Eventresult);
    ?>
			שעת המקרה: <br>
			<?php 
    if ($edit == 1) {
        ?>
			<select name="Emin" >
			<option value="<?php 
        echo $myRecord[Emin];
        ?>
"> 00</option>
			<option > 05 </option><option > 10 </option><option > 15 </option><option > 20 </option><option > 25 </option>
			<option > 30 </option><option > 35 </option><option > 40 </option><option > 45 </option><option > 50 </option>
			<option > 55 </option>
			</select>
			<?php 
    } else {
        echo $myRecord[Emin];
    }
    ?>
			:
			<?php 
    if ($edit == 1) {
        ?>
			<select name="Ehour" >
			<option value="<?php 
        echo $myRecord[Ehour];
        ?>
">00 </option>
			<option > 01 </option><option > 02 </option><option > 03 </option><option > 04 </option><option > 05 </option>
			<option > 06 </option><option > 07 </option><option > 08 </option><option > 09 </option><option > 10 </option>
			<option > 11 </option><option > 12 </option><option > 13 </option><option > 14 </option><option > 15 </option>
			<option > 16 </option><option > 17 </option><option > 18 </option><option > 19 </option><option > 20 </option>
			<option > 21 </option><option > 22 </option><option > 23 </option><option > 24 </option>
			</select>
			<?php 
    } else {
        echo $myRecord[Ehour];
    }
    ?>
			<br>
			<br>
		<table CLASS="CALENDAR" BORDER="1">
		 <tr >
		 	
		 	<td>תיאור האירוע <br>
		 	</td>
		 	<td>
		 		<?php 
    if ($edit == 1) {
        ?>
		 		<center> 
		 		<textarea name="eventDis"  rows="10" cols="50"><?php 
        echo $myRecord[eventDis];
        ?>
</textarea>
				</center> 
				<?php 
    } else {
        echo $myRecord[eventDis];
    }
    ?>
		 	</td>
		</tr>
		<tr >

		 	<td>כיצד פעלתי או הגבתי למניעה לפני האירוע  <br></td>
		 	<td> 
		 	<?php 
    if ($edit == 1) {
        ?>
		 	<center>
		 	 <textarea name="eventActionsbefore"   rows="10" cols="50"><?php 
        echo $myRecord[eventActionsbefore];
        ?>
</textarea>
		 	
		 	</center>
		 	<?php 
    } else {
        echo $myRecord[eventActionsbefore];
    }
    ?>
		 	 </td>
		</tr>
		<tr >
		 	<td>כיצד פעלתי או הגבתי במהלך האירוע    <br></td>
		 	<td>
		 	<?php 
    if ($edit == 1) {
        ?>
			<center>
		 	<textarea name="eventActionsduring" rows="10" cols="50" ><?php 
        echo $myRecord[eventActionsduring];
        ?>
</textarea>
		 	</center>
		 	<?php 
    } else {
        echo $myRecord[eventActionsduring];
    }
    ?>
		 	</td>
		 	
		</tr>
		<tr >
		 	<td>כיצד פעלתי או הגבתי לאחר האירוע    <br></td>
		 	<td>
		 	<?php 
    if ($edit == 1) {
        ?>
		 	<center> 
		 	<textarea name="eventActionsdAfter" rows="10" cols="50" ><?php 
        echo $myRecord[eventActionsdAfter];
        ?>
</textarea>
		 	</center>
		 	<?php 
    } else {
        echo $myRecord[eventActionsdAfter];
    }
    ?>
		 	</td>
		</tr>
		<tr >
		 	<td>סיכום המצב בעת מילוי הדו"ח   <br></td>
		 	<td>
		 	<?php 
    if ($edit == 1) {
        ?>
		 	<center>  
		 	<textarea name="summary"  rows="10" cols="50"><?php 
        echo $myRecord[summary];
        ?>
</textarea>
		 	</center> 
		 	<?php 
    } else {
        echo $myRecord[summary];
    }
    ?>
		 	</td>
		 	
		</tr>		
		</table>
		<br><br>
		מסקנות לעתיד <br><br>
		<table CLASS="CALENDAR" BORDER="1">
		 <tr >		 	
		 	<td>מניעה: מה אפשר לעשות לפני הפעילות <br>
		 	</td>
		 	<td> 
		 	<?php 
    if ($edit == 1) {
        ?>
		 	<center>
		 	<textarea name="prevent"  rows="10" cols="50"><?php 
        echo $myRecord[prevent];
        ?>
</textarea>
		 	</center>
		 	<?php 
    } else {
        echo $myRecord[prevent];
    }
    ?>
		 	</td>
		</tr>
		 <tr >		 	
		 	<td>תגובה: כיצד להגיב אחרת אם צריך <br>
		 	</td>
		 	<td> 
		 	<?php 
    if ($edit == 1) {
        ?>
		 	<center>
		 	<textarea name="react" rows="10" cols="50"><?php 
        echo $myRecord[react];
        ?>
</textarea>
		 	</center>
		 	<?php 
    } else {
        echo $myRecord[react];
    }
    ?>
		 	</td>
		</tr>
		 <tr >		 	
		 	<td>הערות נוספות  <br>
		 	</td>
		 	<td> 
		 	<?php 
    if ($edit == 1) {
        ?>
		 	<center>
		 	<textarea name="comments"  rows="10" cols="50"><?php 
        echo $myRecord[comments];
        ?>
</textarea>
		 	</center>
		 	<?php 
    } else {
        echo $myRecord[comments];
    }
    ?>
		 	</td>
		</tr>
</table>		
<?php 
    if ($edit == 1) {
        ?>
	 <input type = "submit" name="event" value="   שליחת אירוע חריג   " title="לחץ לשמירת אירוע חריג  ">
	 <?php 
    }
    ?>
	 
</DIV>
	<?php 
}