function changePassword($loggedUser) { if (isset($_POST[oldPassWOrd])) { echo "<hr>"; print_r($_POST); print_r($loggedUser); echo "<hr>"; echo $loggedUser->getUname(); echo "<hr>"; if ($loggedUser->getPasswd() == md5($_POST[oldPassWOrd])) { if ($_POST["passwd"] == $_POST["passwdConf"]) { if (validate_pass1($_POST["passwd"])) { $hash_passwd = md5($_POST["passwd"]); } else { return FALSE; } } $sql = "UPDATE users SET Password='******' Where Username='******'"; printSqlQuary($sql); executeQuary($sql); } } }
<select name="GID"> <?php getGroupsList(); ?> </select> <?php } ?> </DIV> <br> <input type="submit" value=" הצג "> </form> <!-- DISPLAY THE USER LISTS --> <?php if (!isset($displayUserInfo)) { $result = executeQuary($sql); if (mysql_num_rows($result) == 0) { ?> <div class="QUARY_RESULT_ERROR"> אין משתמשים </div> <?php } else { ?> <FORM method="POST" action="manageUsers.php" name="USERS_LIST_FORM" onsubmit="return confirmDelete()"> <input type="hidden" name="newUserApproval" value="true"> <input type="hidden" name="getUserInfo" value=""> <table class=list border=1> <tr class="TABLE_HEADER"> <td>בחירה</td> <td>שם משתמש</td>
function drawTodoListForm() { $sql = "SELECT * FROM todolist order by done"; $result = executeQuary($sql); ?> <table> <tr> <td> מה לעשות? </td> </tr> <?php while ($myRecord = mysql_fetch_array($result)) { if ($myRecord[done]) { $style = "style=\" text-decoration: line-through; color:red\""; } else { $style = ""; } ?> <tr> <td <?php echo $style; ?> > <?php echo $myRecord[comment]; ?> </td> <td> <FORM action="todo.php" method="POST"> <input type="hidden" name="id" value="<?php echo $myRecord[id]; ?> "> <input type="hidden" name="done" value="<?php echo $myRecord[done]; ?> "> <input type="submit" name="commit" value="<?php if ($myRecord[done]) { echo "לא בוצע"; } else { echo "בוצע"; } ?> "> </FORM> </td> </tr> <?php } ?> </table> <FORM action="todo.php" method="POST"> <table> <tr> <td> <input type="text" name="newComment" width="50%"> </td> <td> <input type="submit" name="newValue" value="הוספת חדש"> </td> </tr> </table> </FORM> <?php ?> <?php }
function new_draw_persmissions_page() { ?> <table CLASS="list" BORDER="1"> <tr CLASS="PERMISSIONS_TABLE_HEADER"> <td> <?php $permissionsArray["בחירה"]; ?> בחירה </td> <td > <?php $permissionsArray["שם הרשאה"]; ?> שם הרשאה </td> <td > <?php $permissionsArray["צפייה במשתמשים"]; ?> צפייה במשתמשים </td> <td > <?php $permissionsArray["עריכת במשתמשים"]; ?> עריכת במשתמשים </td> <td > <?php $permissionsArray["צפייה בקבוצות"]; ?> צפייה בקבוצות </td> <td > <?php $permissionsArray["עריכת קבוצות"]; ?> עריכת קבוצות </td> <td > <?php $permissionsArray["צפייה בהרשאות"]; ?> צפייה בהרשאות </td> <td > <?php $permissionsArray["עריכת בהרשאות"]; ?> עריכת בהרשאות </td> <td > <?php $permissionsArray["צפייה בכל המשתמשים"]; ?> צפייה בכל המשתמשים </td> <td > <?php $permissionsArray["שלח הודעות לקבוצה"]; ?> שלח הודעות לקבוצה </td> <td > <?php $permissionsArray["שלח הודעות לכולם"]; ?> שלח הודעות לכולם </td> <td > <?php $permissionsArray["צפייה בנוכחות"]; ?> צפייה בנוכחות </td> <td > <?php $permissionsArray["עריכת נוכחות"]; ?> עריכת נוכחות </td> <td > <?php $permissionsArray["צפייה בתיק מדריך"]; ?> צפייה בתיק מדריך </td> <td > <?php $permissionsArray["עריכת תיק מדריך"]; ?> עריכת תיק מדריך </td> <td > <?php $permissionsArray["צפייה במרכזים ימיים"]; ?> צפייה במרכזים ימיים </td> <td > <?php $permissionsArray["עריכת מרכזים ימיים"]; ?> עריכת מרכזים ימיים </td> <td > <?php $permissionsArray["עריכת משחקים"]; ?> עריכת משחקים </td> <td > <?php $permissionsArray["צפייה בפורום"]; ?> צפייה בפורום </td> <td > <?php $permissionsArray["עריכת פורום"]; ?> עריכת פורום </td> </tr> <?php // excute quary to get the list of all permission groups $sql = "SELECT * FROM `permissionsgroups` ORDER BY Pgroupname"; //הפעלת שאילתא לקבלת כל קבוצות ההרשאה $result = executeQuary($sql); //execute get all permissions groups $imgsrcX = "<img src=\"img/x.jpg\">"; $imgsrcV = "<img src=\"img/v.jpg\">"; while ($myRecord = mysql_fetch_array($result)) { ?> <tr> <td> <input type = "radio" name=selectedPermission value="<?php print_r($myRecord[PID]); ?> "<?php if (isset($_POST['rd']) & $_POST['rd'] == $myRecord[Pgroupname]) { echo "checked=\"checked\""; } ?> > </td> <td > <?php echo $myRecord[PGroupName]; ?> <?php $permissionsArray[$myRecord[PGroupName]] = $myRecord[PGroupName]; ?> </td> <td > <?php if ($myRecord[viewUsers]) { echo $res = $imgsrcV; } else { echo $res = $imgsrcX; } $permissionsArray[$myRecord[PGroupName]][$myRecord[viewUsers]] = $res; ?> </td> <td > <?php if ($myRecord[editUsers]) { echo $res = $imgsrcV; } else { echo $res = $imgsrcX; } $permissionsArray[$myRecord[PGroupName]][$myRecord[editUsers]] = $res; ?> </td> <td > <?php if ($myRecord[viewGroups]) { echo $res = $imgsrcV; } else { echo $res = $imgsrcX; } $permissionsArray[$myRecord[PGroupName]][$myRecord[viewGroups]] = $res; ?> </td> <td > <?php if ($myRecord[editGroups]) { echo $res = $imgsrcV; } else { echo $res = $imgsrcX; } $permissionsArray[$myRecord[PGroupName]][$myRecord[editGroups]] = $res; ?> </td> <td > <?php if ($myRecord[viewPermissions]) { echo $res = $imgsrcV; } else { echo $res = $imgsrcX; } $permissionsArray[$myRecord[PGroupName]][$myRecord[viewPermissions]] = $res; ?> </td> <td > <?php if ($myRecord[editPermissions]) { echo $res = $imgsrcV; } else { echo $res = $imgsrcX; } $permissionsArray[$myRecord[PGroupName]][$myRecord[editPermissions]] = $res; ?> </td> <td > <?php if ($myRecord[viewAllUsers]) { echo $res = $imgsrcV; } else { echo $res = $imgsrcX; } $permissionsArray[$myRecord[PGroupName]][$myRecord[viewAllUsers]] = $res; ?> </td> <td > <?php if ($myRecord[sendMessageToGroup]) { echo $res = $imgsrcV; } else { echo $res = $imgsrcX; } $permissionsArray[$myRecord[PGroupName]][$myRecord[sendMessageToGroup]] = $res; ?> </td> <td > <?php if ($myRecord[sendMessageToAll]) { echo $res = $imgsrcV; } else { echo $res = $imgsrcX; } $permissionsArray[$myRecord[PGroupName]][$myRecord[sendMessageToAll]] = $res; ?> </td> <td > <?php if ($myRecord[viewAttendecy]) { echo $res = $imgsrcV; } else { echo $res = $imgsrcX; } $permissionsArray[$myRecord[PGroupName]][$myRecord[viewAttendecy]] = $res; ?> </td> <td > <?php if ($myRecord[editAttendecy]) { echo $res = $imgsrcV; } else { echo $res = $imgsrcX; } $permissionsArray[$myRecord[PGroupName]][$myRecord[editAttendecy]] = $res; ?> </td> <td > <?php if ($myRecord[viewInstructorsFolder]) { echo $res = $imgsrcV; } else { echo $res = $imgsrcX; } $permissionsArray[$myRecord[PGroupName]][$myRecord[viewInstructorsFolder]] = $res; ?> </td> <td > <?php if ($myRecord[editInstructorsFolder]) { echo $res = $imgsrcV; } else { echo $res = $imgsrcX; } $permissionsArray[$myRecord[PGroupName]][$myRecord[editInstructorsFolder]] = $res; ?> </td> <td > <?php if ($myRecord[viewNavalCenters]) { echo $res = $imgsrcV; } else { echo $res = $imgsrcX; } $permissionsArray[$myRecord[PGroupName]][$myRecord[viewNavalCenters]] = $res; ?> </td> <td > <?php if ($myRecord[editNavalCenters]) { echo $res = $imgsrcV; } else { echo $res = $imgsrcX; } $permissionsArray[$myRecord[PGroupName]][$myRecord[editNavalCenters]] = $res; ?> </td> <td > <?php if ($myRecord[editGames]) { echo $res = $imgsrcV; } else { echo $res = $imgsrcX; } $permissionsArray[$myRecord[PGroupName]][$myRecord[editGames]] = $res; ?> </td> <td > <?php if ($myRecord[viewForum]) { echo $res = $imgsrcV; } else { echo $res = $imgsrcX; } $permissionsArray[$myRecord[PGroupName]][$myRecord[editGames]] = $res; ?> </td> <td > <?php if ($myRecord[editForum]) { echo $res = $imgsrcV; } else { echo $res = $imgsrcX; } $permissionsArray[$myRecord[PGroupName]][$myRecord[editGames]] = $res; ?> </td> </tr> <?php } ?> <!-- ADD A NEW PERMISSION GROUP --> <tr CLASS="ADD_NEW_PERMISSIONS"> <td colspan="18">הוספת קבוצה חדשה</td> </tr> <tr> <td colspan="2"> <input type = "text" name="PGroupName" width="100%"> </td> <td > <input type = "checkbox" name="viewUsers" value="viewUsers"> </td> <td > <input type = "checkbox" name="editUsers" value="editUsers"> </td> <td > <input type = "checkbox" name="viewGroups" value="viewGroups"> </td> <td > <input type = "checkbox" name="editGroups" value="editGroups"> </td> <td > <input type = "checkbox" name="viewPermissions" value="viewPermissions"> </td> <td > <input type = "checkbox" name="editPermissions" value="editPermissions"> </td> <td > <input type = "checkbox" name="viewAllUsers" value="viewAllUsers"> </td> <td > <input type = "checkbox" name="sendMessageToGroup" value="sendMessageToGroup"> </td> <td > <input type = "checkbox" name="sendMessageToAll" value="sendMessageToAll"> </td> <td > <input type = "checkbox" name="viewAttendecy" value="viewAttendecy"> </td> <td > <input type = "checkbox" name="editAttendecy" value="editAttendecy"> </td> <td > <input type = "checkbox" name="viewInstructorsFolder" value="viewInstructorsFolder"> </td> <td > <input type = "checkbox" name="editInstructorsFolder" value="editInstructorsFolder"> </td> <td > <input type = "checkbox" name="viewNavalCenters" value="viewNavalCenters"> </td> <td > <input type = "checkbox" name="editNavalCenters" value="editNavalCenters"> </td> <td > <input type = "checkbox" name="editGames" value="editGames"> </td> <td > <input type = "checkbox" name="viewForum" value="viewForum"> </td> <td > <input type = "checkbox" name="editForum" value="editForum"> </td> </tr> <!-- Add a new permision group to database --> </table> <table CLASS="LIST_BUTTONS"> <tr> <td> <input type = "submit" name="addPermission" value=" הוסף "> </td> <td> <input type = "submit" name="deletePermission" value=" מחק "> </td> </tr> </table> <?php }
function update($loggedUser) { if (isset($_POST[messeges_area]) && !$_POST[listSubmit]) { /******צריך להוסיף בדיקות על הקלט!****/ switch ($_POST[source]) { case "groupMessage": if (isset($_POST[groupID])) { $updateGroupId = $_POST[groupID]; } else { $updateGroupId = $loggedUser->getmemberOfGroup(); } break; case "mngMsgs": $updateGroupId = 1; break; case "notKids": $updateGroupId = 2; break; case "newsUpdate": $updateGroupId = 3; break; } //$sql ="INSERT INTO guideFolderFiles(filename,link,type,date) values('".$_POST[dispalyName]."','".$destinationDir.$UserFileName ."','".$_POST[type] ."','".$dateString ."')"; //$sql = "UPDATE messeges SET Message='".$_POST[messeges_area]."\n <small><i>".date("j/n/y G:i")."</i></small>' WHERE GID='".$updateGroupId."'"; $sql = "UPDATE messeges SET Message='<div class=MARQ_DATE><small><b>" . date("j/n/y G:i") . ":</b></small> " . $_POST[messeges_area] . "</div>' WHERE GID='" . $updateGroupId . "'"; executeQuary($sql); if (mysql_affected_rows() == 0) { $sql = "INSERT INTO messeges(GID,Message) values('" . $updateGroupId . "','<div class=MARQ_DATE><small><b>" . date("j/n/y G:i") . ":</b></small> " . $_POST[messeges_area] . "</div>')"; //$sql ="INSERT INTO messeges(GID,Message) values('".$updateGroupId."','".$_POST[messeges_area]."\n <small><i>".date("j/n/y G:i")."</i></small>')"; executeQuary($sql); } } }
function deleteForumItems() { if (!isset($_POST[deleteItem])) { return; } if ($_POST[deleteItemCommenting] == 0) { $deleteAllComments = " OR commenting={$_POST['deleteItem']}"; } $sql = "DELETE FROM forum WHERE PID='{$_POST['deleteItem']}'{$deleteAllComments}"; executeQuary($sql); }
function getMesseges($gid, $withLineBreaks = true, $withHtmlTags = true) { $sql = "select * from messeges WHERE GID='" . $gid . "'"; $result = executeQuary($sql); if (mysql_num_rows($result) == 0) { echo "אין הודעות"; } while ($myRecord = mysql_fetch_array($result)) { if ($myRecord[Message] == "") { echo "אין הודעות"; } $newstr = $myRecord[Message]; if (!$withHtmlTags) { $newstr = strip_tags($newstr); $newstr = substr($newstr, strrpos($newstr, ':') + 1); } if ($withLineBreaks) { // Order of replacement $str = $myRecord[Message]; $order = array("\r\n", "\n", "\r"); $replace = '<br/>'; // Processes \r\n's first so they aren't converted twice. $newstr = str_replace($order, $replace, $str); } echo $newstr; } }
function drawGamesTable($allowEditing = false) { ?> <input type = "hidden" name="displayGameId" value="0"> <table class="games" align="center" > <?php $sql = "SELECT * FROM games g"; $result = executeQuary($sql); $i = 0; while ($myRecord1 = mysql_fetch_array($result)) { $myRecord2 = mysql_fetch_array($result); ?> <tr> <td class="gamesTd" background="img/1.jpg"><b><h3><?php echo $myRecord1[gamename]; ?> </h3></b><br><?php echo $myRecord1[gameDescription]; ?> </td> <th class="gamesTd" background="img/1.jpg"><?php if ($allowEditing) { ?> <input type = "checkbox" name="<?php echo $myRecord1[gameId] . "_game"; ?> " title="סמן אם ברצונך למחוק משחק זה" value="<?php echo $myRecord1[gameId]; ?> "><?php } ?> <a href="javascript:displayGame('<?php echo $myRecord1[gameId]; ?> ')"><img width="135" height="135" border="0" src="<?php echo $myRecord1[imglink]; ?> " alt="<?php echo $myRecord1[gamename]; ?> "></a></th> <?php if ($myRecord2) { ?> <td class="gamesTd" background="img/1.jpg"><b><h3><?php echo $myRecord2[gamename]; ?> </h3></b><br><?php echo $myRecord2[gameDescription]; ?> </td> <th class="gamesTd" background="img/1.jpg"><?php if ($allowEditing) { ?> <input type = "checkbox" name="<?php echo $myRecord2[gameId] . "_game"; ?> " title="סמן אם ברצונך למחוק משחק זה" value="<?php echo $myRecord2[gameId]; ?> "><?php } ?> <a href="javascript:displayGame('<?php echo $myRecord2[gameId]; ?> ')"><img width="135" height="135" border="0" src="<?php echo $myRecord2[imglink]; ?> " alt="<?php echo $myRecord2[gamename]; ?> "></a></th> <?php } ?> </tr> <?php } if ($allowEditing) { ?> </table> <br> <br> <table align="center"> <tr class="TABLE_HEADER"> <td colspan="3">הוספת משחק חדש</td> </tr> <tr> <td>שם המשחק:</td> <td colspan="2"><INPUT NAME="gameName" type="text" ></td> </tr> <tr> <td>תיאור:</td> <td colspan="2"><INPUT NAME="gameDesc" type="text" ></td><td></td> </tr> <tr> <td>קוד :</td> <td colspan="2"><INPUT NAME="gameCode" type="text" ></td> </tr> <tr> <td>לינק לתמונה:</td> <td colspan="2"><INPUT NAME="gamePic" type="text" ></td> </tr> <tr> <td><INPUT TYPE="submit" name="add_game" value=" הוסף משחק " title="לחץ כאן על מנת להוסיף את המשחק"></td> <td><INPUT TYPE="reset" name="clear_games" value=" נקה טופס " title="לחץ כאן כדי לנקות את השדות"></td> <td><INPUT TYPE="submit" name="help" value=" עזרה " title="לחץ כאן כדי לפנות לדף הדרכת הוספת משחק"></td> </tr> <tr> <td colspan="3" align="right"><INPUT TYPE="submit" name="delete_games" value=" מחק משחק " title="מחק את כל המשחקים המסומנים !" onclick="return confirmDelete()"></td> </tr> </table> <?php } }
function getSeaCenterAndTool($selectedValue = 0, $seaCenter) { $sql = "SELECT * FROM seacenterandtools s where s.SeaCenter='" . $seaCenter . "';"; $GroupListresult = executeQuary($sql); ?> <?php while ($myRecord = mysql_fetch_array($GroupListresult)) { if ($selectedValue == $myRecord[0]) { // compare group number $selectedString = "selected=\"yes\""; } else { $selectedString = ""; } ?> <option value="<?php echo $myRecord[0]; ?> " <?php echo $selectedString; ?> ><?php echo $myRecord[Tool]; ?> </option> <?php } }
function updatePictures() { if (isset($_POST['DeleteButton']) && $_POST['DeleteButton'] && isset($_POST[deletePictures])) { $_POST['DeleteButton'] = 0; unset($_POST['DeleteButton']); $sql = "DELETE FROM pictures WHERE PID=" . $_POST['MainPicID']; $result = executeQuary($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> <br> <br> <table CLASS="CALENDAR" BORDER="1"> <tr > <td>תיאור האירוע <br> </td> <td> <input type="text" name="eventDis" value="<?php
function updateUserData($details) { //$sql = "DELETE FROM users WHERE UserName='******'"; //remove current user from System //$result = executeQuary($sql); //$sqlUpdateQuary = "UPDATE users SET Approved='1' WHERE ".$sqlString; /*ReInsert the user to the system*/ $sql = "UPDATE users Set "; //$sql = $sql."UserName='******'"; $sql = $sql . "FirstName='" . $details["firstName"] . "',"; $sql = $sql . "LastName='" . $details["lastName"] . "',"; $sql = $sql . "ID='" . $details["id"] . "',"; $sql = $sql . "City='" . $details["city"] . "',"; $sql = $sql . "Street='" . $details["street"] . "',"; $sql = $sql . "HouseNumber='" . $details["houseNumber"] . "',"; $sql = $sql . "CellPhone='" . $details["cellPhone"] . "',"; $sql = $sql . "Phone='" . $details["phone"] . "',"; $sql = $sql . "Email='" . $details["email"] . "',"; $sql = $sql . "FatherName='" . $details["fatherName"] . "',"; $sql = $sql . "MotherName='" . $details["motherName"] . "',"; $sql = $sql . "FatherPhone='" . $details["fatherPhoneNumber"] . "',"; $sql = $sql . "MotherPhone='" . $details["motherPhoneNumber"] . "',"; $sql = $sql . "YearOfBirth='" . $details["year_of_birth"] . "',"; $sql = $sql . "MonthOfBirth='" . $details["month_of_birth"] . "',"; $sql = $sql . "DayOfBirth='" . $details["day_of_birth"] . "'"; $sql = $sql . " WHERE UserName='******'"; $result = executeQuary($sql); /*Update Group*/ if ($details["memberOfGroup"] > 0) { //TODO //////////////////////////////////////// // echo "<div dir=ltr>"; // echo "<HR>IN GROUP<HR><center>"; // print_r($_POST); // echo "<HR><HR></center>"; // echo "</div>"; $sql = "UPDATE users_activitygroups Set SID='" . $details["memberOfGroup"] . "' WHERE username='******'"; $result = executeQuary($sql); if (mysql_affected_rows() == 0) { $sql = "INSERT INTO users_activitygroups(UserName,SID) values('" . $details["uname"] . "','" . $details["memberOfGroup"] . "')"; $result = executeQuary($sql); } } else { $sql = "DELETE FROM users_activitygroups WHERE username='******'"; $result = executeQuary($sql); } /*Update Permission*/ if ($details["permissionGroup"]) { $sql = "UPDATE usesrpermissionsgroups Set PID='" . $details["permissionGroup"] . "' WHERE username='******'"; $result = executeQuary($sql); if (mysql_affected_rows() == 0) { $sql = "INSERT INTO usesrpermissionsgroups(UserName,PID) values('" . $details["uname"] . "','" . $details["permissionGroup"] . "')"; $result = executeQuary($sql); } } else { $sql = "DELETE FROM usesrpermissionsgroups WHERE username='******'"; $result = executeQuary($sql); } }
function drawGroupsForm($allowEditing = false) { $sql = "SELECT * FROM activityGroups"; $result = executeQuary($sql); if (mysql_num_rows($result) == 0) { ?> <div class="QUARY_RESULT_ERROR"> אין קבוצות </div> <?php } else { ?> <?php if ($allowEditing) { ?> <FORM method="POST" name="GROUP_LIST_FORM" action="manageGroups.php" onsubmit="return confirmDelete()"> <?php } ?> <input type="hidden" name="editGroup" value="true"> <input type="hidden" name="manageGroupsForm" value="true"> <table class=list border=1> <tr class="TABLE_HEADER"> <?php if ($allowEditing) { ?> <td>בחירה</td> <?php } ?> <td>שם קבוצה</td> <td>עיר</td> <td>רחוב</td> <td>מדריך</td> </tr> <?php while ($myRecord = mysql_fetch_array($result)) { if ($myRecord[0] < 4) { continue; } //skip groups instructors and administrators ?> <tr> <?php if ($allowEditing) { ?> <td><INPUT NAME="<?php echo $myRecord[0]; ?> " TYPE="checkbox" value="<?php echo $myRecord[0]; ?> "> </td> <?php } ?> <td><a href="javascript:GroupEditSubmit(<?php echo $myRecord[0]; ?> )"><?php echo $myRecord[aGroupName]; ?> </a><?php php; ?> </td> <td><?php echo $myRecord[City]; ?> </td> <td><?php echo $myRecord[Address]; ?> </td> <td><?php echo getGroupGuide($myRecord[0]); ?> </td> </tr> <?php } ?> </table> <?php if ($allowEditing) { ?> <table class="LIST_BUTTONS"> <tr> <td><INPUT TYPE="submit" name="delete_groups" value=" מחק קבוצות נבחרות "></td> <td><INPUT TYPE="reset" value=" נקה "></td> </tr> </table> <?php } ?> <?php if ($allowEditing) { ?> </FORM> <!-- Add a new group --> <form action="manageGroups.php" method="post"> <table> <tr class="TABLE_HEADER"> <td colspan="2">הוספת קבוצה חדשה</td> </tr> <tr> <td>שם הקבוצה:</td> <td><INPUT NAME="groupName" type="text" ></td> </tr> <tr> <td>עיר הקבוצה:</td> <td><INPUT NAME="groupCity" type="text" ></td><td></td> </tr> <tr> <td>כתובת :</td> <td><INPUT NAME="groupAddress" type="text" ></td> </tr> <tr> <td><INPUT TYPE="submit" name="add_group" value=" הוסף קבוצה "></td> <td><center><INPUT TYPE="reset" name="add_group" value=" נקה טופס"></center></td> </tr> </table> </form> <?php } } }
function drawManegerMonthlyReport() { ?> <input type="hidden" name="userNameManag" value="0"> <h1>הצג דו"ח חודשי מנהל עבור מדריך:</h1> <?php $sql = "SELECT u.UserName,s.FirstName ,s.LastName ,a.aGroupName FROM usesrpermissionsgroups u ,users s , users_activitygroups g ,activitygroups a where u.PID=2 and u.UserName=s.UserName and u.UserName=g.UserName and g.sid=a.sid;"; $GroupListresult = executeQuary($sql); while ($myRecord = mysql_fetch_array($GroupListresult)) { ?> <a href="javascript:DateEditMonthlyManegerSubmit('<?php echo $myRecord[UserName]; ?> ')" title="לחץ לדוח עבור מדריך זה "><?php echo $myRecord[FirstName] . " " . $myRecord[LastName] . "-" . $myRecord[aGroupName]; ?> </a> <br> <?php } ?> <?php }
function getBirthdays() { global $loggedUser; global $numberOfRecentPictures; if (!$loggedUser->getMemberOfGroup()) { return "אין קבוצה !"; } //if no group don't display any birthdays $sql = "SELECT u.FirstName,u.LastName,u.MonthOfBirth, u.DayOfBirth FROM users u ,users_activitygroups g WHERE g.sid='" . $loggedUser->getMemberOfGroup() . "' and u.Username= g.username and u.approved='1' and u.MonthOfBirth='" . date('n') . "' order by u.DayOfBirth"; $result = executeQuary($sql); if (mysql_affected_rows() == 0) { echo "אין ימי הולדת !"; return; } while ($myRecord = mysql_fetch_array($result)) { $ballons = ""; if ($myRecord['DayOfBirth'] == date('j')) { $ballons = "<img src= \"img/ballons.JPG\">"; } echo $myRecord['DayOfBirth'] . "/" . $myRecord['MonthOfBirth'] . " " . $myRecord['FirstName'] . " " . $myRecord['LastName'] . " " . $ballons . "<br><br>"; } }