Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- session_start();
- // display_errors = On;
- // error_reporting(E_ALL);
- // ini_set('display_errors',1);
- // ini_set("log_errors", 1);
- // ini_set('error_log', dirname(__FILE__) .'\ERROR_LOG.PHP');
- //include 'THIS-IS-A-TEST-TO-SEE-IF-THE-_____ERROR_LOG_____.PHP IS WORKING';
- if ( ! isset($_SESSION['usertype']) =='Admin')
- {
- echo "You are not authorized to use this website. Try to obtain the necessary rights to use it!";
- exit;
- }
- //session_start();
- if ( $_SESSION['usertype'] == 'Admin')
- //if(true)
- //the following variables hold the firstname and lastname of the logged in user. This can be used to append with the notes the user adds
- {
- $user = $_SESSION['firstname']." ".$_SESSION['lastname'];
- require 'connect_sql.php';
- $recent_ID_query = mysql_query("SELECT MAX(ID) FROM c1_report");
- $recent_ID = mysql_result($recent_ID_query,0);
- if($recent_ID == '')
- $recent_ID ='1';
- else
- $recent_ID = $recent_ID + 1;
- ?>
- <!DOCTYPE HTML>
- <html>
- <head>
- <html lang="en">
- <meta charset="utf-8">
- <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" />
- <link rel="stylesheet" href="css/ui-lightness/jquery-ui-1.8.22.custom.css">
- <link rel ="stylesheet" type ="text/css" href ="css/style.css">
- <div class="Add New User">
- <!-- title -->
- <title> Report </title>
- <link rel="shortcut icon" type="image/x-icon" href="images/base.gif" />
- <script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>
- <script type="text/javascript" src = "//ajax.googleapis.com/ajax/libs/jqueryui/1.8.24/jquery-ui.min.js"></script>
- <style>
- body { font-size: 62.5%; }
- label, input { display:block; }
- input.text { margin-bottom:12px; width:95%; padding: .4em; }
- fieldset { padding:0; border:0; margin-top:25px; }
- h1 { font-size: 1.2em; margin: .6em 0; }
- .ui-dialog .ui-state-error { padding: .3em; }
- .validateTips { border: 1px solid transparent; padding: 0.3em; }
- </style>
- <script>
- $(function() {
- var canBeAdded = false;
- $("#email").change(function() {
- var tips = $( ".validateTips" );
- var email = $("#email").val();
- email = email.toLowerCase();
- function check_valid_company()
- {
- var email = $("#email").val();
- email = email.toLowerCase();
- if(email.indexOf("@gmail.com") != -1 || email.indexOf("@yahoo.com") != -1 )
- return true;
- else
- return false;
- }
- function updateTips( t ) {
- tips
- .text( t )
- .addClass( "ui-state-highlight" );
- setTimeout(function() {
- tips.removeClass( "ui-state-highlight", 1500 );
- }, 500 );
- }
- if(email.length >= 3)
- {
- $.ajax({
- type: "POST",
- url: "email_check_indb.php",
- data: "email="+ email,
- success: function(msg){
- $("#create-user").ajaxComplete(function(event, request, settings){
- if(msg == 'OK')
- {
- if(!check_valid_company())
- {
- $("#email").addClass( "ui-state-error" );
- updateTips( "Not a valid email type to be added to the system for this company." );
- }
- else{
- $("#email").removeClass( "ui-state-error" );
- updateTips("Email can be added to the system");
- canBeAdded = true;
- }
- }
- else
- {
- updateTips("Email already in database");
- canBeAdded = false;
- $("#email").addClass( "ui-state-error" );
- }});}});}
- else
- {
- $("#email").removeClass( "ui-state-error" );
- canBeAdded = false;
- }});
- $("#dialog:ui-dialog").ready(function() {
- $("#estimated_start_on").datepicker();
- });
- $("#dialog:ui-dialog").ready(function() {
- $("#actual_start_on").datepicker();
- });
- $("#dialog:ui-dialog").ready(function() {
- $("#estimated_researchready_for_service").datepicker();
- });
- $("#dialog:ui-dialog").ready(function() {
- $("#actual_researchready_for_service").datepicker();
- });
- $( "#dialog:ui-dialog" ).dialog( "destroy" );
- var firstname = $('#firstname'),
- lastname = $('#lastname'),
- email = $('#email'),
- internalnotes = $( "#internalnotes" ),
- statusnotes = $("#statusnotes"),
- estimatedresearchhours = $( "#estimatedresearchhours" ),
- title = $("#title"),
- description = $("#description"),
- actualresearchhours = $("#actualresearchhours"),
- estimateddevhours = $("#estimateddevhours"),
- actualdevhours = $("#actualdevhours"),
- estimatedqahours = $("#estimatedqahours"),
- actualqahours = $("#actualqahours"),
- estimated_start_on = $("#estimated_start_on"),
- actual_start_on = $("#actual_start_on"),
- estimated_researchready_for_service = $("#estimated_researchready_for_service"),
- actual_researchready_for_service = $("#actual_researchready_for_service"),
- environment = $('#environment'),
- businessowner = $('#businessowner'),
- internalproductowner = $('#internalproductowner'),
- billable = $('#billable'),
- status = $('#status'),
- priority = $('#priority'),
- ranking = $('#ranking'),
- team = $('#team'),
- statusnotes = $('#statusnotes'),
- internalnotes = $('#internalnotes'),
- allFields = $( [] ).add(firstname).add(lastname).add(email).add( internalnotes ).add(statusnotes).add( estimatedresearchhours ).add(title).add(description).add(actualresearchhours ).add(estimateddevhours).add(actualdevhours).add(estimatedqahours).add(actualqahours).add(estimated_start_on).add(actual_start_on).add(estimated_researchready_for_service).add(actual_researchready_for_service).add(environment).add(businessowner).add(internalproductowner).add(billable).add(status).add(priority).add(ranking).add(team).add(statusnotes).add(internalnotes),
- tips = $( ".validateTips" );
- function updateTips( t ) {
- tips
- .text( t )
- .addClass( "ui-state-highlight" );
- setTimeout(function() {
- tips.removeClass( "ui-state-highlight", 1500 );
- }, 500 );
- }
- function timedRefresh(timeoutPeriod) {
- setTimeout("location.reload(true);",timeoutPeriod);
- }
- function check_valid_company(o)
- {
- var email = o.val();
- email = email.toLowerCase();
- if(email.indexOf("@gmail.com") != -1 || email.indexOf("@yahoo.com") != -1)
- {
- return true;
- }
- else
- {
- o.addClass( "ui-state-error" );
- updateTips( "Not a valid email type to be added to the system for this company." );
- return false;
- }
- }
- function check_logintype(){
- var login_type = $('input:radio[name=Login_Type]:checked').val();
- if(login_type == null || login_type ==""){
- updateTips("Login Type should be selected");
- return false;
- }
- else{
- return true;
- }
- }
- function checkLength( o, n, min, max ) {
- if ( o.val().length > max || o.val().length < min ) {
- o.addClass( "ui-state-error" );
- updateTips( "Length of " + n + " must be between " +
- min + " and " + max + "." );
- return false;
- } else {
- return true;
- }
- }
- function checkEmpty(o){
- if(o.length>0)
- return true;
- else
- return false;
- }
- function checkRegexp( o, regexp, n ) {
- if ( !( regexp.test( o.val() ) ) ) {
- o.addClass( "ui-state-error" );
- updateTips( n );
- return false;
- } else {
- return true;
- }
- }
- function Random() {
- return Math.floor(Math.random() * 1000);
- }
- function checkUser(o){
- if(canBeAdded == true)
- return true;
- else{
- updateTips("Email already exists in the database");
- o.addClass( "ui-state-error" );
- return false;
- }
- }
- $( "#addnewitem-form" ).dialog({
- autoOpen: false,
- closeOnEscape : true,
- height: 500,
- show : 'fade',
- width: 360,
- modal: false,
- resizable : false,
- buttons: {
- "Submit": function() {
- var bValid = true;
- var ID_check = $("#ID").val();
- var title = $("#title").val();
- var description = $("#description").val();
- var environment = $("#environment").val();
- var businessowner = $("#businessowner").val();
- var internalproductowner = $("#internalproductowner").val();
- var billable = $("#billable").val();
- var status = $("#status").val();
- var estimatedresearchhours = $("#estimatedresearchhours").val();
- var actualresearchhours = $("#actualresearchhours").val();
- var estimateddevhours = $("#estimateddevhours").val();
- var actualdevhours = $("#actualdevhours").val();
- var estimatedqahours = $("#estimatedqahours").val();
- var actualqahours = $("#actualqahours").val();
- var priority = $("#priority").val();
- var ranking = $("#ranking").val();
- var estimated_start_on = $("#estimated_start_on").val();
- var actual_start_on = $("#actual_start_on").val();
- var estimated_researchready_for_service = $("#estimated_researchready_for_service").val();
- var actual_researchready_for_service = $("#actual_researchready_for_service").val();
- var team = $("#team").val();
- var statusnotes = $("#statusnotes").val();
- var internalnotes = $("#internalnotes").val();
- var isEdit = $("#isEdit").val();
- var username = $("#username").val();
- var varData = 'ID=' + ID_check + '&title=' + title+'&description=' + description + '&environment=' + environment + '&businessowner=' + businessowner + '&internalproductowner=' + internalproductowner + '&billable=' + billable + '&status=' + status + '&estimatedresearchhours=' + estimatedresearchhours + '&actualresearchhours=' + actualresearchhours + '&estimateddevhours=' + estimateddevhours + '&actualdevhours=' + actualdevhours + '&actualqahours=' + actualqahours +'&estimatedqahours=' + estimatedqahours+ '&priority=' + priority + '&ranking=' + ranking + '&estimated_start_on=' + estimated_start_on + '&actual_start_on=' + actual_start_on + '&estimated_researchready_for_service=' + estimated_researchready_for_service +'&actual_researchready_for_service=' + actual_researchready_for_service + '&team=' + team + '&statusnotes=' + statusnotes +'&internalnotes=' + internalnotes + '&username='+username;
- if(bValid && (isEdit == "N") )
- {
- $.ajax({
- type: "POST",
- url:'add_new_item_cnt_todb.php',
- data: varData,
- success: function() {
- alert("Item with ID "+ ID_check + " will be added shortly.");
- }
- });
- timedRefresh(3000);
- $( this ).dialog( "close" );
- }
- else if(bValid && ( isEdit === "Y" )){
- varData = varData + '&username=' + $("#username").val();
- $.ajax({
- type: "POST",
- url:'admin_edit_to_cntdb.php',
- data: varData,
- success: function() {
- }
- });
- timedRefresh(3000);
- $( this ).dialog( "close" );
- }
- },
- Cancel: function() {
- $( this ).dialog( "close" );
- }
- },
- close: function() {
- }
- });
- $( "#dialog-form" ).dialog({
- autoOpen: false,
- closeOnEscape : true,
- height: 400,
- show : 'fade',
- width: 350,
- modal: true,
- resizable : false,
- buttons: {
- "Create an account": function() {
- var bValid = true;
- allFields.removeClass( "ui-state-error" );
- bValid = bValid && checkLength( firstname, "First Name", 3, 16 );
- bValid = bValid && checkLength( lastname, "Last Name", 3, 16 );
- bValid = bValid && checkLength( email, "email", 6, 80 );
- bValid = bValid && check_logintype();
- bValid = bValid && checkRegexp(email, /^([\w-\.]+@([\w-]+\.)+[\w-]{2,4})?$/, "eg. abc@def.com" );
- bValid = bValid && check_valid_company(email);
- bValid = bValid && checkUser(email);
- var fname = $( "#firstname" ).val();
- var lname = $("#lastname").val();
- var mail = $( "#email" ).val();
- var logintype = $('input:radio[name=Login_Type]:checked').val();
- var varData = 'firstname=' + fname + '&lastname=' + lname + '&email=' + mail + '&logintype=' + logintype;
- if(bValid)
- {
- $.ajax({
- type: "POST",
- url:'sendActivation.php',
- data: varData,
- success: function(msg) {
- if(msg == 'OK')
- {
- alert('Email sent to ' + fname + '. Please advice ' + fname + ' to check spam/junk folder for activation link.');
- }
- else if(msg == 'Mail not sent'){
- alert('Mail server is down. ' + fname + ' was not added to the system. Please try adding later.');
- }
- else{
- alert ("User already exists in the system, can't be added again.");
- }
- }
- });
- canBeAdded = false;
- $( this ).dialog( "close" );
- }
- },
- Cancel: function() {
- allFields.val( "" ).removeClass( "ui-state-error" );
- updateTips("All form fields are required");
- $( this ).dialog( "close" );
- }
- },
- close: function() {
- updateTips("All form fields are required");
- allFields.val( "" ).removeClass( "ui-state-error" );
- }
- });
- $( "#create-user" )
- .button()
- .click(function() {
- $( "#dialog-form" ).dialog( "open" );
- });
- $( "#add-new-item" )
- .button()
- .click(function() {
- $( "#dialog:ui-dialog" ).dialog( "destroy" );
- $( "#addnewitem-form" ).dialog( "open" );
- $("#addnewitem-form").dialog('option', 'title', 'Add New Item');
- $("#addnewitem-form").get($("#isEdit").val("N"));
- $( "#addnewitem-form" ).dialog( "open" );
- $("#addnewitem-form").get($("#title").val(""));
- $("#addnewitem-form").get($("#description").val(""));
- $("#addnewitem-form").get($("#environment").val(""));
- $("#addnewitem-form").get($("#businessowner").val(""));
- $("#addnewitem-form").get($("#internalproductowner").val(""));
- $("#addnewitem-form").get($("#billable").val(""));
- $("#addnewitem-form").get($("#status").val(""));
- $("#addnewitem-form").get($("#estimatedresearchhours").val(""));
- $("#addnewitem-form").get($("#actualresearchhours").val(""));
- $("#addnewitem-form").get($("#estimateddevhours").val(""));
- $("#addnewitem-form").get($("#actualdevhours").val(""));
- $("#addnewitem-form").get($("#estimatedqahours").val(""));
- $("#addnewitem-form").get($("#actualqahours").val(""));
- $("#addnewitem-form").get($("#priority").val(""));
- $("#addnewitem-form").get($("#ranking").val(""));
- $("#addnewitem-form").get($("#estimated_start_on").val(""));
- $("#addnewitem-form").get($("#actual_start_on").val(""));
- $("#addnewitem-form").get($("#estimated_researchready_for_service").val(""));
- $("#addnewitem-form").get($("#actual_researchready_for_service").val(""));
- $("#addnewitem-form").get($("#team").val(""));
- });
- $(".edit").button().click(function(){
- $( "#dialog:ui-dialog" ).dialog( "destroy" );
- var id = this.id;
- var n = id.split("+");
- $( "#addnewitem-form" ).dialog( "open" );
- $("#addnewitem-form").dialog('option', 'title', 'Edit Item');
- $("#addnewitem-form").get($("#ID").val(n[0]));
- $("#addnewitem-form").get($("#title").val(n[1]));
- $("#addnewitem-form").get($("#description").val(n[2]));
- $("#addnewitem-form").get($("#environment").val(n[3]));
- $("#addnewitem-form").get($("#businessowner").val(n[4]));
- $("#addnewitem-form").get($("#internalproductowner").val(n[5]));
- $("#addnewitem-form").get($("#billable").val(n[6]));
- $("#addnewitem-form").get($("#status").val(n[7]));
- $("#addnewitem-form").get($("#estimatedresearchhours").val(n[11]));
- $("#addnewitem-form").get($("#actualresearchhours").val(n[12]));
- $("#addnewitem-form").get($("#estimateddevhours").val(n[13]));
- $("#addnewitem-form").get($("#actualdevhours").val(n[14]));
- $("#addnewitem-form").get($("#estimatedqahours").val(n[15]));
- $("#addnewitem-form").get($("#actualqahours").val(n[16]));
- $("#addnewitem-form").get($("#priority").val(n[8]));
- $("#addnewitem-form").get($("#ranking").val(n[9]));
- $("#addnewitem-form").get($("#estimated_start_on").val(n[17]));
- $("#addnewitem-form").get($("#actual_start_on").val(n[18]));
- $("#addnewitem-form").get($("#estimated_researchready_for_service").val(n[19]));
- $("#addnewitem-form").get($("#actual_researchready_for_service").val(n[20]));
- $("#addnewitem-form").get($("#team").val(n[10]));
- $("#addnewitem-form").get($("#isEdit").val("Y"));
- $("#addnewitem-form").get($("#username").val(n[21]));
- });
- });
- function scroll_header()
- {
- var scrOfY = 0;
- if(typeof(window.pageYOffset) == 'number')
- {
- //Netscape compliant
- scrOfY = window.pageYOffset;
- }
- else if(document.body && document.body.scrollTop)
- {
- //DOM compliant
- scrOfY = document.body.scrollTop;
- }
- else if(document.documentElement && document.documentElement.scrollTop)
- {
- //IE6 standards compliant mode
- scrOfY = document.documentElement.scrollTop;
- }
- document.getElementById('header').style.top=scrOfY;
- }
- </script>
- </head>
- <body onscroll="scroll_header();">
- <!-- title -->
- <title> Report view </title>
- <link rel="shortcut icon" type="image/x-icon" href="images/base.gif" />
- <link href="style_admin.css" rel="stylesheet" type="text/css">
- <div id="container">
- <div id="header">
- <img src="images/main_logo.png" border="0" style="position: relative;left:450px;top:10px" height="80%" />
- <br /> <br />
- <a href="index.html" style="position: relative;left:1333px;top:-110px">Logout</a>
- <a href="admin_select.php" style="position: relative;left:1276px;top:-75px">View a different client report</a>
- <a href="phpexcel/Tests/down_admin_cnt.php" style="position: relative;left:1048px;top:-40px">Download as Excel</a>
- </div>
- <div class="Add New User">
- <div id="dialog-form" title="Add New User">
- <p class="validateTips"><big>All form fields are required</big></p>
- <form>
- <fieldset>
- <label for="first_name"><b><big>First Name</big></b></label>
- <input type="text" name="firstname" id = "firstname" class="text ui-widget-content ui-corner-all" />
- <label for="last_name"><b><big>Last Name</big></b></label>
- <input type="text" name="lastname" id = "lastname" class="text ui-widget-content ui-corner-all" />
- <label for="email"><b><big>Email</big></b></label>
- <input type="text" name="email" id="email" class="text ui-widget-content ui-corner-all" />
- <label for="logintype"><b><big>Login Type</big></b></label><br/>
- <input type="radio" class = "radio" name="Login_Type" value="Business Owner" id = "Login_Type" />Business Owner
- <input type="radio" class = "radio" name="Login_Type" value="Business User" id = "Login_Type" />Business User<br />
- </fieldset>
- </form>
- </div>
- <div style="position: relative;">
- <button id="create-user" style="left:122px;top:-105px" >Add New User</button>
- </div>
- <div class="demo-description">
- </div>
- <div class="Add New Item">
- <div id="addnewitem-form" title="Add New Item">
- <form>
- <fieldset>
- <label for="ID"><b><big>ID </big></b></label>
- <input type="text" name="ID" value = "<?php echo $recent_ID;?>" id = "ID" disabled="disabled" class="text ui-widget-content ui-corner-all" /><br />
- <label for="Title"><b><big>Title</big></b></label>
- <input type = "text" name="title" id = "title" value = "" class="text ui-widget-content ui-corner-all" >
- <br>
- <label for="Description"><b><big>Description</big></b></label>
- <input type = "text" name="description" id = "description" value = "" class="text ui-widget-content ui-corner-all" >
- <br>
- <label for="environment"><b><big>Environment</big></b></label>
- <select id = "environment" class="text ui-widget-content ui-corner-all">
- <option value=""></option>
- <option value="Windows">Windows</option>
- <option value="Win 2008">Win 2008</option>
- <option value="Win 7">Win 7</option>
- <option value="Win Vista">Win Vista</option>
- <option value ="Linux">Linux</option>
- <option value = "Win 7/Linux">Win 7/Linux</option>
- <option value = "All">All</option>
- </select><br><br>
- <label for="businessowner"><b><big>Business Owner</big></b></label>
- <select id = "businessowner" class="text ui-widget-content ui-corner-all">
- <option value=""></option>
- <option value = "Jose Arteaga">Jose Arteaga</option>
- <option value = "Gus Barazza">Gus Barazza</option>
- </select><br><br>
- <label for="internalproductowner"><b><big>Internal Product Owner</big></b></label>
- <select id = "internalproductowner" class="text ui-widget-content ui-corner-all">
- <option value = ""></option>
- <option value = "D">D</option>
- <option value = "A>A</option>
- <option value = "Du">Du</option>
- <option value = "V">V</option>
- <option value = "K">K</option>
- </select><br><br>
- <label for="billable"><b><big>Billable</big></b></label>
- <select id = "billable" class="text ui-widget-content ui-corner-all">
- <option value=""></option>
- <option value = "Yes">Yes</option>
- <option value = "No">No</option>
- <option value = "TBD">TBD</option>
- </select><br><br>
- <label for="status"><b><big>Status</big></b></label>
- <select id = "status" class="text ui-widget-content ui-corner-all">
- <option value=""></option>
- <option value = "Implementing">Implementing</option>
- <option value = "Pending">Pending</option>
- <option value = "Testing">Testing</option>
- <option value = "Design Review">Design Review</option>
- <option value = "Blocked">Blocked</option>
- <option value = "Completed">Completed</option>
- <option value = "Investigating">Investigating</option>
- <option value = "New">New</option>
- <option value = "Postponed">Postponed</option>
- <option value = "closed">closed</option>
- </select><br><br>
- <label for="estimatedresearchhours"><b><big>Estimated Research Hours</big></b></label>
- <input type = "text" name = "estimatedhours" id = "estimatedresearchhours" class="text ui-widget-content ui-corner-all"><br>
- <label for="actualresearchhours"><b><big>Actual Research Hours</big></b></label>
- <input type = "text" name ="actualhours" id = "actualresearchhours" class="text ui-widget-content ui-corner-all"><br>
- <label for="estimateddevhours"><b><big>Estimated Dev Hours</big></b></label>
- <input type = "text" name = "estimateddevhours" id = "estimateddevhours" class="text ui-widget-content ui-corner-all"><br>
- <label for="actualdevhours"><b><big>Actual Dev Hours</big></b></label>
- <input type = "text" name = "actualdevhours" id = "actualdevhours" class="text ui-widget-content ui-corner-all"><br>
- <label for="estimataedqahours"><b><big>Estimated QA Hours</big></b></label>
- <input type = "text" name = "estimatedqahours" id = "estimatedqahours" class="text ui-widget-content ui-corner-all"><br>
- <label for="actualqahours"><b><big>Actual QA Hours</big></b></label>
- <input type = "text" name = "actualqahours" id = "actualqahours" class="text ui-widget-content ui-corner-all"><br>
- <label for="last_name"><b><big>Priority</big></b></label>
- <select id = "priority" class="text ui-widget-content ui-corner-all">
- <option value=""></option>
- <option value = "1-Urgent">1-Urgent</option>
- <option value = "2-High">2-High</option>
- <option value = "3-Medium">3-Medium</option>
- <option value = "4-Low">4-Low</option>
- </select><br><br>
- <label for="ranking"><b><big>Ranking</big></b></label>
- <select id = "ranking" class="text ui-widget-content ui-corner-all">
- <option value=""></option>
- <option value = "1">1</option>
- <option value = "2">2</option>
- <option value = "3">3</option>
- <option value = "4">4</option>
- <option value = "5">5</option>
- <option value = "6">6</option>
- <option value = "7">7</option>
- </select><br><br>
- <label for="estimated_start_on"><b><big>Estimated Start On</big></b></label>
- <input id="estimated_start_on" class="text ui-widget-content ui-corner-all" />
- <label for="actual_start_on"><b><big>Actual Start On</big></b></label>
- <input id="actual_start_on" class="text ui-widget-content ui-corner-all" />
- <label for="estimated_researchready_for_service"><b><big>Estimated Ready for Service</big></b></label>
- <input id="estimated_researchready_for_service" class="text ui-widget-content ui-corner-all" />
- <label for="actual_researchready_for_service"><b><big>Actual Ready for Service</big></b></label>
- <input id="actual_researchready_for_service" class="text ui-widget-content ui-corner-all" />
- <input type="hidden" name="isEdit" value="isEdit" id = "isEdit" />
- <input type ="hidden" name = "username" value = "<?php echo $user;?>" id = "username" />
- <label for="statusnotes"><b><big>Status Notes:</big></b></label>
- <textarea rows="4" cols="50" id = "statusnotes" class="text ui-widget-content ui-corner-all"></textarea><br><br>
- <label for="internalnotes"><b><big>Internal Notes:</big></b></label>
- <textarea rows="4" cols="50" id = "internalnotes" class="text ui-widget-content ui-corner-all"></textarea><br><br>
- <label for="team"><b><big>Team</big></b></label>
- <select id = "team" class="text ui-widget-content ui-corner-all">
- <option value=""></option>
- <option value = "D">D</option>
- <option value = "G">G</option>
- <option value = "I">I</option>
- <option value = "A">A</option>
- <option value = "Not Specified">Not Specified</option>
- </select><br><br>
- </fieldset>
- </form>
- </div>
- <div style="position: relative;">
- <button id="add-new-item" style="left:122px;top:-90px" >Add New Item</button>
- </div>
- <script src="sorttable.js" type="text/javascript"></script>
- <style type="text/css">
- </style>
- <table id="table" class = "sortable" >
- <thead>
- <th class="sorttable_nosort" >History</th>
- <th>ID</th>
- <th>Title</th>
- <th>Description</th>
- <th>Environment</th>
- <th>Business Owner</th>
- <th>Internal Product Owner</th>
- <th>Billable</th>
- <th>Status</th>
- <th>Priority</th>
- <th>Ranking</th>
- <th>Team</th>
- <th>Estimated Research Hours</th>
- <th>Actual Resarch Hours</th>
- <th>Estimated Dev Hours</th>
- <th>Actual Dev Hours</th>
- <th>Estimated QA Hours</th>
- <th>Actual QA Hours</th>
- <th>Estimated Start On</th>
- <th>Actual Start On</th>
- <th>Estimated Ready For Service</th>
- <th>Actual Ready For Service</th>
- <th class="sorttable_nosort" >Internal Notes</th>
- <th class="sorttable_nosort" >Status Notes</th>
- <th class="sorttable_nosort" >Comments From BO</th>
- <th class="sorttable_nosort" >Edit</th>
- <th class="sorttable_nosort" >Attachments</th>
- </thead>
- <tr>
- <td></td>
- <td></td>
- <td></td>
- <td></td>
- <td>
- <script language="JavaScript" type="text/JavaScript">
- function formSubmit()
- {
- document.getElementById("report_filter").submit();
- }
- </script>
- <form method="post" id="report_filter" action="" >
- <select name="try" onchange="formSubmit();">
- <option value="all"> All </option>
- <option value="Windows"> Windows </option>
- <option value="Win 2008"> Win 2008 </option>
- <option value="Win 7"> Win 7 </option>
- <option value="Win Vista"> Win Vista </option>
- <option value ="Linux"> Linux </option>
- <option value = "Win 7/Linux"> Win 7/Linux </option>
- </select>
- </form>
- </td>
- </tr>
- <?php
- if(!(isset($_POST["try"])))
- echo "none";
- else
- echo "ok ".$_POST["try"];
- require 'index-001.php';
- _show_setup();
- die;
- $host="***";
- $username="^^";
- $password="%%";
- $database="##";
- $connection=mysql_connect(##,##,###);
- mysql_connect($host,$username,$password);
- @mysql_select_db($database) or die( "Unable to select database");
- //error_reporting(E_ALL);
- //ini_set('display_errors', TRUE);
- //ini_set('display_startup_errors', TRUE);
- $first=$_SESSION['firstname'];
- $last=$_SESSION['lastname'];
- $query="SELECT * FROM c1_report";
- $result=mysql_query($query);
- $query1="SELECT * FROM c1_notes";
- $result1=mysql_query($query1);
- $num=mysql_numrows($result);
- $num1=mysql_numrows($result1);
- echo "<font size = '5'; face = 'calibri'; color='black'; > <center> <i> <a style='position:relative;left:338px;top:-8px'>Welcome ".$user."! </a> </i> </center> </font>";
- echo "</br> ";
- //mysql_close();
- $i=0;
- while ($i < $num){
- $j=0;
- $f[$i][$j]=mysql_result($result,$i,"ID");
- $j++;
- $f[$i][$j]=mysql_result($result,$i,"title");
- $j++;
- $f[$i][$j]=mysql_result($result,$i,"description");
- $j++;
- $f[$i][$j]=mysql_result($result,$i,"environment");
- $j++;
- $f[$i][$j]=mysql_result($result,$i,"bo");
- $j++;
- $f[$i][$j]=mysql_result($result,$i,"intprodowner");
- $j++;
- $f[$i][$j]=mysql_result($result,$i,"billable");
- $j++;
- $f[$i][$j]=mysql_result($result,$i,"status");
- $j++;
- $f[$i][$j]=mysql_result($result,$i,"priority");
- $j++;
- $f[$i][$j]=mysql_result($result,$i,"ranking");
- $j++;
- $f[$i][$j]=mysql_result($result,$i,"team");
- $j++;
- $f[$i][$j]=mysql_result($result,$i,"estresearchhours");
- $j++;
- $f[$i][$j]=mysql_result($result,$i,"actualresearchhours");
- $j++;
- $f[$i][$j]=mysql_result($result,$i,"estdevhours");
- $j++;
- $f[$i][$j]=mysql_result($result,$i,"actualdevhours");
- $j++;
- $f[$i][$j]=mysql_result($result,$i,"estqahours");
- $j++;
- $f[$i][$j]=mysql_result($result,$i,"actualqahours");
- $j++;
- $f[$i][$j]=mysql_result($result,$i,"eststarton");
- $j++;
- $f[$i][$j]=mysql_result($result,$i,"actualstarton");
- $j++;
- $f[$i][$j]=mysql_result($result,$i,"estreadyforservice");
- $j++;
- $f[$i][$j]=mysql_result($result,$i,"actualreadyforservice");
- $j++;
- $f[$i][$j]=mysql_result($result1,$i,"internalnotes");
- $j++;
- $f[$i][$j]=mysql_result($result1,$i,"statusnotes");
- $j++;
- $f[$i][$j]=mysql_result($result1,$i,"bocomments");
- $i++;
- }
- ?>
- <?php
- $i=0;
- while ($i < $num) {
- ?>
- <tr>
- <form method=post action='' name=f1>
- <td>
- <a href="javascript:void(0);" NAME="History" title="History"
- onClick=window.open("getHistory_cnt.php?id=<?php echo $f[$i][0]; ?>","Ratting","width=650,height=300,left=150,top=200,toolbar=1,status=1,scrollbars=1");>History</a>
- </td>
- </form>
- <td><?php echo htmlentities($f[$i][0]); ?></td>
- <td><?php echo htmlentities($f[$i][1]); ?></td>
- <td><?php echo htmlentities($f[$i][2]); ?></td>
- <td><?php echo htmlentities($f[$i][3]); ?></td>
- <td><?php echo htmlentities($f[$i][4]); ?></td>
- <td><?php echo htmlentities($f[$i][5]); ?></td>
- <td><?php echo htmlentities($f[$i][6]); ?></td>
- <td><?php echo htmlentities($f[$i][7]); ?></td>
- <td><?php echo htmlentities($f[$i][8]); ?></td>
- <td><?php echo htmlentities($f[$i][9]); ?></td>
- <td><?php echo htmlentities($f[$i][10]); ?></td>
- <td><?php echo htmlentities($f[$i][11]); ?></td>
- <td><?php echo htmlentities($f[$i][12]); ?></td>
- <td><?php echo htmlentities($f[$i][13]); ?></td>
- <td><?php echo htmlentities($f[$i][14]); ?></td>
- <td><?php echo htmlentities($f[$i][15]); ?></td>
- <td><?php echo htmlentities($f[$i][16]); ?></td>
- <td><?php echo htmlentities($f[$i][17]); ?></td>
- <td><?php echo htmlentities($f[$i][18]); ?></td>
- <td><?php echo htmlentities($f[$i][19]); ?></td>
- <td><?php echo htmlentities($f[$i][20]); ?></td>
- <td>
- <a href="javascript:void(0);" NAME="Internal Notes Window" title="Internal Notes"
- onClick=window.open("internal_notes_cnt.php?id=<?php echo $f[$i][0]; ?>","Ratting","width=550,height=300,left=150,top=200,toolbar=1,status=1,scrollbars=1");>View</a>
- </td>
- <td>
- <a href="javascript:void(0);" NAME="Status Notes Window" title="Status Notes"
- onClick=window.open("status_notes_cnt.php?id=<?php echo $f[$i][0]; ?>","Ratting","width=550,height=300,left=150,top=200,toolbar=1,status=1,scrollbars=1");>View</a>
- </td>
- <td>
- <a href="javascript:void(0);" NAME="BO Comments Window" title="BO Comments"
- onClick=window.open("bocomments_cnt.php?id=<?php echo $f[$i][0]; ?>","Ratting","width=550,height=300,left=150,top=200,toolbar=1,status=1,scrollbars=1");>View</a>
- </td>
- <td>
- <button class="edit" name="edit" value="edit" style="font-size:12px" id = "<?php echo htmlentities($f[$i][0])."+".htmlentities($f[$i][1])."+".htmlentities($f[$i][2])."+".htmlentities($f[$i][3])."+".htmlentities($f[$i][4])."+".htmlentities($f[$i][5])."+".htmlentities($f[$i][6])."+".htmlentities($f[$i][7])."+".htmlentities($f[$i][8])."+".htmlentities($f[$i][9])."+".htmlentities($f[$i][10])."+".htmlentities($f[$i][11])."+".htmlentities($f[$i][12])."+".htmlentities($f[$i][13])."+".htmlentities($f[$i][14])."+".htmlentities($f[$i][15])."+".htmlentities($f[$i][16])."+".htmlentities($f[$i][17])."+".htmlentities($f[$i][18])."+".htmlentities($f[$i][19])."+".htmlentities($f[$i][20])."+".$user;?>">Edit</button>
- </td>
- <td>
- <form method ="post">
- <input type=button value="Upload" onClick="window.open('uploads_cnt/upload_file_form_cnt_mult.php?id=<?php echo $f[$i][0]; ?>&first=<?php echo $first; ?>&last=<?php echo $last; ?>','Ratting','width=450,height=300,left=150,top=200,toolbar=1,status=1,')" style="width: 74px"/>
- </form>
- <?php
- //$query3="select * from hdq_report where ID='".$f[$i][0]."' and uploadname IS NULL";
- //$result3=mysql_query($query3);
- //echo mysql_num_rows($result3);
- //if(mysql_num_rows($result3)!=0)
- $dd="uploads_cnt/dir_cnt_".$f[$i][0];
- if(!is_dir($dd))
- {
- ?>
- <b>No Attachments</b></td>
- <?php
- }
- else
- {
- ?>
- <form method ="post">
- <input type=button value="Download" onClick="window.open('uploads_cnt/download_upl_name.php?id=<?php echo $f[$i][0]; ?>','Ratting','width=1000,height=500,left=150,top=200,toolbar=1,status=1,scrollbars=1')" />
- </form>
- </td>
- <?php
- }
- ?>
- </tr>
- <?php
- $i++;
- }
- ?>
- </table>
- </div>
- </div>
- </body>
- </html>
- <?php
- }
- else
- echo "You are not authorized to use this website. Try to obtain the necessary rights to use it!";
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement