public function postHeaderEvent() { createConfirmDialog("confirmacceptdialog", "Confirm invoice ?", "confirmaccept"); createConfirmDialog("confirmundodialog", "Confirm undo ?", "confirmundo"); createConfirmDialog("confirmRemoveDialog", "Confirm removal ?", "confirmRemoval"); createDocumentLink(); }
public function postHeaderEvent() { createConfirmDialog("confirmapprovaldialog", "Confirm approval ?", "approve"); ?> <div id="reasondialog" class="modal"> <label>Reason</label> <textarea id="reason" name="reason" class="tinyMCE" style='width:770px; height: 300px'></textarea> </div> <div id="reasondivdialog" class="modal"> <h5>Reason</h5> <br> <div id="reasondiv" style='width:770px; height: 290px; border: 1px solid black'></div> </div> <?php }
"> <div id="documentDiv"> <label>TITLE</label> <input type="text" id="title" name="title" style="width:550px" /><br> <label>DOCUMENT</label> <input type="file" id="document" name="document" style="width:750px" /><br> <br> <input type="submit" style="margin-left:0px" class="dataButton" value="ADD DOCUMENT" id="btnHeanerNotes" /> <br> </div> </form> </div> <div id="documentcontainer"> <?php createConfirmDialog("confirmdialog", "Delete document ?", "deleteDocumentFromDialog"); if (isset($_GET['id'])) { } } else { ?> </div> <div id="documentDiv"> <label>SEARCH</label> <input type="text" id="title" name="title" style="width:450px; " /> <button id="search" name="search" onclick='search()' style='display:inline'>Search</button> </div> <?php } ?> <?php
<?php include "system-header.php"; require_once "confirmdialog.php"; createConfirmDialog("confirmapprovaldialog", "User approval ?", "approveUser"); createConfirmDialog("confirmrejectdialog", "User rejection ?", "rejectUser"); function accept() { $qry = "UPDATE {$_SESSION['DB_PREFIX']}members " . "SET accepted = 'Y' " . "WHERE member_id = " . $_POST['pk1']; $result = mysql_query($qry); if (!$result) { logError($qry . " = " . mysql_error()); } sendUserMessage($_POST['pk1'], "User Registration", "Welcome to Oracle logs.<br>Your user registration has been accepted."); } function reject() { $qry = "UPDATE {$_SESSION['DB_PREFIX']}members " . "SET accepted = 'X' " . "WHERE member_id = " . $_POST['pk1']; $result = mysql_query($qry); if (!$result) { logError($qry . " = " . mysql_error()); } sendUserMessage($_POST['pk1'], "User Registration", "Welcome to Oracle logs.<br>Unfortunately, your user registration has been rejected."); } ?> <script> var currentUser = null; function approveUser() { call("accept", { pk1: currentUser }); }
<?php require_once "system-embeddedheader.php"; require_once "confirmdialog.php"; createConfirmDialog("loginDialog", "Forgot password ?", "forgotPassword"); ?> <style> .content, .footer { display: none; } html { background-color: #f4f4f4; overflow: hidden; } .loginerror { position: absolute; margin-left: 200px; margin-top: -120px; color: red; z-index:9999922; font-style: italic; } </style> <!-- Start of content --> <?php if (!isAuthenticated()) { ?> <div> <?php if (isset($_SESSION['ERRMSG_ARR'])) { echo "<div class='loginerror'>\n";
public function view() { $this->filter(); require_once "system-header.php"; require_once "confirmdialog.php"; require_once "tinymce.php"; ?> <script src="js/i18n/grid.locale-en.js" type="text/javascript"></script> <script src="js/jquery.jqGrid.min.js" type="text/javascript"></script> <script src='js/jquery.ui.timepicker.js'></script> <script src="js/jquery.multiselect.filter.min.js" type="text/javascript"></script> <script src="js/jquery.multiselect.min.js" type="text/javascript"></script> <link rel="stylesheet" type="text/css" href="css/jquery.multiselect.css" /> <link rel="stylesheet" type="text/css" href="css/jquery.multiselect.filter.css" /> <?php if ($this->geolocation) { ?> <script type='text/javascript' src='jsc/jquery.autocomplete.js'></script> <script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script> <script src="https://maps.googleapis.com/maps/api/js?sensor=false&libraries=places" type="text/javascript"></script> <script src="http://www.google.com/uds/api?file=uds.js&v=1.0" type="text/javascript"><;/script> <script src="http://maps.google.com/maps/api/js?v=3.1&sensor=false®ion=PH"></script> <script type="text/javascript"> var directionsService = new google.maps.DirectionsService(); function getLatLng(name, address) { var geocoder = new google.maps.Geocoder(); geocoder.geocode( { 'address' : address }, function( results, status ) { if (status == google.maps.GeocoderStatus.OK ) { $("#" + name + "_lat").val(results[0].geometry.location.lat()); $("#" + name + "_lng").val(results[0].geometry.location.lng()); } else { // pwAlert( "Geocode was not successful for the following reason: " + status ); } } ); } $(document).ready(function() { var pacContainerInitialized = false; <?php foreach ($this->columns as $col) { if ($col['type'] == "GEOLOCATION") { ?> $('#<?php echo $col['name']; ?> ').keypress(function() { if (!pacContainerInitialized) { $('.pac-container').css('z-index', '9999'); pacContainerInitialized = true; } }); $("#<?php echo $col['name']; ?> ").change(function() { setTimeout( function() { getLatLng("<?php echo $col['name']; ?> ", $("#<?php echo $col['name']; ?> ").val()); }, 500 ); }); <?php } } ?> }); function initialize() { var options = { types: ['(cities)'], componentRestrictions: {country: ["uk"]} }; <?php foreach ($this->columns as $col) { if ($col['type'] == "GEOLOCATION") { ?> var input = document.getElementById('<?php echo $col['name']; ?> '); var autocomplete = new google.maps.places.Autocomplete(input, options); <?php } } ?> } /* function search() { setTimeout( function() { $('#jobform').submit(); }, 500 ); } */ google.maps.event.addDomListener(window, 'load', initialize); </script> <?php } ?> <link href="css/ui.jqgrid.css" rel="stylesheet" type="text/css" /> <?php createConfirmDialog("confirmdialog", "Remove item ?", "crudDelete"); /* Event post header. */ $this->crud_cache_function("postHeaderEvent", array("pageid" => $_SESSION['pageid'])); $this->crud_cache_function("createFilterScreen", array("pageid" => $_SESSION['pageid'])); $this->crud_cache_function("createEditScreen", array("pageid" => $_SESSION['pageid'])); $this->createView(); }
public function postHeaderEvent() { createConfirmDialog("confirmRemoveDialog", "Confirm removal ?", "confirmRemoval"); createDocumentLink(); }
<?php include "system-header.php"; require_once "confirmdialog.php"; require_once "tinymce.php"; createConfirmDialog("confirmdialog", "?", "confirmSchedule"); ?> <!-- Start of content --> <link rel="stylesheet" href="css/fullcalendar.css" type="text/css" media="all" /> <link rel="stylesheet" href="css/fullcalendar.print.css" type="text/css" media="all" /> <style> .fc-event:hover { color: black ! important; } .ui-dialog { margin-top: 10px; min-height: 50px; } <?php $sql = "SELECT A.member_id, A.fgcolour, A.bgcolour \n\t\t\tFROM {$_SESSION['DB_PREFIX']}members A \n\t\t\tORDER BY A.member_id "; $result = mysql_query($sql); if ($result) { /* Show children. */ while ($member = mysql_fetch_assoc($result)) { echo ".eventcat_" . $member['member_id'] . " .fc-event-inner {\n"; echo "background-color: " . $member['bgcolour'] . " ! important;\n"; echo "color: " . $member['fgcolour'] . " ! important;\n"; echo "}\n"; } } else { logError($sql . " - " . mysql_error());
function usertemplate($type) { require_once "system-header.php"; require_once "confirmdialog.php"; createConfirmDialog("confirmdialog", "Remove item ?", "deleteUser"); createConfirmDialog("resetdialog", "Reset password ?", "resetPassword"); $viewer = "profile.php?callee=" . base64_encode(basename($_SERVER['PHP_SELF'])); ?> <!-- Start of content --> <?php function deleteUser() { $id = $_POST['pk1']; $qry = "DELETE FROM {$_SESSION['DB_PREFIX']}members WHERE member_id = {$id}"; $result = mysql_query($qry); } function resetPassword() { $id = $_POST['pk1']; $pwd = md5($_POST['pk2']); $qry = "UPDATE {$_SESSION['DB_PREFIX']}members SET passwd = '{$pwd}' WHERE member_id = {$id}"; $result = mysql_query($qry); sendUserMessage($id, "Password reset", "<h1>You password has been reset to <i>" . $_POST['pk2'] . "</i>"); } ?> <table width="100%" class="grid list" id="userlist" maxrows=20 width=100% cellspacing=0 cellpadding=0> <thead> <tr> <td>First Name</td> <td>Last Name</td> <td>Login</td> <td>Team</td> <td>Email</td> <td>Phone</td> <td>Image</td> <td width='16px'></td> <td width='16px'></td> <td width='16px'></td> </tr> </thead> <?php $qry = ""; if ($type != "") { $roleid = $type; $qry = "SELECT DISTINCT A.*, C.name AS teamname " . "FROM {$_SESSION['DB_PREFIX']}members A " . "INNER JOIN {$_SESSION['DB_PREFIX']}userroles B " . "ON B.memberid = A.member_id " . "INNER JOIN {$_SESSION['DB_PREFIX']}team C " . "ON C.id = A.teamid " . "WHERE B.roleid = '{$roleid}' " . "ORDER by A.firstname, A.lastname"; } else { $qry = "SELECT * FROM {$_SESSION['DB_PREFIX']}members " . "ORDER by firstname, lastname"; } $result = mysql_query($qry); //Check whether the query was successful or not if ($result) { while ($member = mysql_fetch_assoc($result)) { echo "<tr>\n"; echo "<td>" . $member['firstname'] . "</td>\n"; echo "<td>" . $member['lastname'] . "</td>\n"; echo "<td>" . $member['login'] . "</td>\n"; echo "<td>" . $member['teamname'] . "</td>\n"; echo "<td>" . $member['email'] . "</td>\n"; echo "<td>" . $member['mobile'] . "</td>\n"; if ($member['imageid'] != null && $member['imageid'] != 0) { echo "<td title='Image'><img height=20 src='system-imageviewer.php?id=" . $member['imageid'] . "' /></td>\n"; } else { echo "<td> </td>\n"; } echo "<td width='16px' title='Edit'><img src='images/edit.png' onclick='window.location.href = \"{$viewer}&id=" . $member['member_id'] . "\";' /></td>\n"; if ($member['systemuser'] == "Y") { echo "<td> </td>\n"; } else { echo "<td width='16px' title='Delete'><img src='images/delete.png' onclick='removeUser(" . $member['member_id'] . ", \"" . $member['firstname'] . " " . $member['lastname'] . "\")' /></td>\n"; } echo "<td width='16px' title='Reset password'><img src='images/password.png' onclick='\$(\"#user\").val(\"" . $member['member_id'] . "\"); \$(\"#passwordDialog\").dialog(\"open\");' /></td>\n"; echo "</tr>\n"; } } else { logError($qry . " = " . mysql_error()); } ?> </table> <div id="passwordDialog" class="modal"> <label>New password</label> <input type="hidden" id="user" name="user" /> <input type="text" id="password" name="password" /> </div> <script> var currentUser = null; function deleteUser() { call("deleteUser", {pk1: currentUser }); } function resetPassword() { call("resetPassword", { pk1: $("#user").val(), pk2: $("#password").val() }); } function removeUser(userID, name) { currentUser = userID; $("#confirmdialog .confirmdialogbody").html("You are about to remove user <b><i>'" + name + "'</i></b>.<br>Are you sure ?"); $("#confirmdialog").dialog("open"); } $(document).ready(function() { $("#passwordDialog").dialog({ modal: true, autoOpen: false, title: "Reset password", buttons: { Ok: function() { $("#resetdialog .confirmdialogbody").html("You are about to reset the password for this user.<br>Are you sure ?"); $("#resetdialog").dialog("open"); }, Cancel: function() { $(this).dialog("close"); } } }); }); </script> <!-- End of content --> <?php require_once "system-footer.php"; }