<?php echo " <BR><BR><center><i>Please Use your Employee Project login for entering daily journals </i> </center><BR>"; exit; include_once "include_db.php"; include_once "include_custom.php"; session_start(); $authorized = false; if (isset($_SERVER['PHP_AUTH_USER']) && isset($_SERVER['PHP_AUTH_PW'])) { $ue_uname = $_SERVER['PHP_AUTH_USER']; $ue_pwd = $_SERVER['PHP_AUTH_PW']; $result = executesql_returnStrictArray("select username from users where username='******' and user_pwd='{$ue_pwd}' and role='enterjournals' "); if (count($result)) { $authorized = true; $_SESSION['auth'] = true; $_SESSION['loggedinUser'] = $_SERVER['PHP_AUTH_USER']; } else { $_SESSION['auth'] = null; print 'Please restart your browser and visit this page again to login'; exit; } } else { if (!$authorized) { header('WWW-Authenticate: Basic Realm="Login please"'); header('HTTP/1.0 401 Unauthorized'); $_SESSION['auth'] = null; print 'Please restart your browser and visit this page again to login'; exit; } } ?>
public function get_usersActiveProjects($username) { if (strtolower($username) == 'sadmin') { $manageProjects = new manageProjects(); return $manageProjects->listOfAllProjects(); } $toreturnProjects = executesql_returnStrictArray(" select permissions.ProjectName from permissions, projects where permissions.username='******' and permissions.ProjectName=projects.ProjectName and projects.isActive='Y'"); $toreturnProjects[] = DEFAULTPERSONALPROJECT; return $toreturnProjects; }
public function get_ListOfFiles_Search($userId = 0, $OnDay, $room_id = 0, $uploadBy = '') { if (!$userId) { $userId = $_SESSION['empl_id']; } $MU = new ManageUsers(); $MU->userId = $userId; $start_time_fixed = $OnDay . ' 00:00:00'; $end_time_fixed = $OnDay . ' 23:59:59'; $start_time_GMT = $MU->convert_from_UsersTimeZone($start_time_fixed); $end_time_GMT = $MU->convert_from_UsersTimeZone($end_time_fixed); $chatRoom_Condition = $room_id ? " and tbl_ChatRooms.chatRoom='{$room_id}' " : " and tbl_ChatRooms.chatRoom IN (select rid from tbl_RoomPrivilages where uid='{$userId}') "; return executesql_returnStrictArray("select tbl_chatFiles.fileId from tbl_chatFiles, tbl_ChatRooms where tbl_ChatRooms.fileId = tbl_chatFiles.fileId and (tbl_ChatRooms.msgtime between '{$start_time_GMT}' and '{$end_time_GMT}') {$chatRoom_Condition} "); }
<?php include "../include_variables.php"; include "include_header.php"; include "../include_functions.php"; ?> <script> <?php $dbnames = executesql_returnStrictArray("select dbname from " . MASTERDB . ".subdomains ORDER BY pid"); echo "var dbnames = ['" . implode("','", $dbnames) . "'];"; ?> var localajaxinit = function(){ My_JsLibrary.selectMainTab('dbchanges.php'); }; var generatesql = function(){ var t = _$('sqlToRunOnEach').value; var finalsql = ""; for(var i=0; i < dbnames.length; i++ ){ finalsql += "\n use " + dbnames[i] + "; \n" ; finalsql += t; } _$('finalSQL').value = finalsql ; };
} if ($SELECTEDUSER == 'Every One') { $reportQuery = "select jid,task_day, task_mins, task_desc, task_user, FullName, projectName, Designation from VIEW_journals_human where task_day>='{$startDate}' and task_day <= '{$endDate}' order by task_user, jid DESC"; } else { $reportQuery = "select jid,task_day, task_mins, task_desc, task_user, FullName, projectName, Designation from VIEW_journals_human where task_user='******' and task_day>='{$startDate}' and task_day <= '{$endDate}' order by task_user, jid DESC"; } ?> <div style='clear:both;'></div> <table align=center cellpadding=0 cellspacing=0 border=0 style='font-size: 95%;' width='95%'> <tr> <td colspan=6> <FORM action='admin.php' method='POST'> <div style='margin:10px;'> View journal for <?php $listOfUsers = array_merge(array('Every One'), executesql_returnStrictArray("select username from users where role='enterjournals' ")); html_array2selectbox($listOfUsers, 'view_user'); ?> between <input type="text" size=12 id="startDate" name='startDate' class="date_input" value=""> and <input type="text" size=12 id="endDate" name='endDate' class="date_input" value=""> <INPUT TYPE='SUBMIT' value='Go'> </div> </FORM> </td> </tr> <tr> <td colspan=6> <div style='margin:10px; width: 100%; text-align:center; margin-left:auto; margin-right:auto;'> <B> Daily Journal for <?php echo $SELECTEDUSER;