Jump to content

Recommended Posts

the question:

 

Distribution List

 

This module is to generate the courier order distribution list for every day.

 

Fields and Description

 

1. Distribution List Date

· Mandatory field

· Should not be blank

· Should be a valid Date (including leap year)

· DD-MM-YYYY format.

 

Button and Description

 

1. Submit

· All the validation mentioned above are to be done when this button is clicked

(client side validations)

· The values entered should be sent to the PHP

· The PHP in turn should perform the validation to check the mandatory fields

o Create a Stored procedure/function to generate to Distribution List that

accepts the date on which the distribution list is to be generated. The

stored procedure/function should fetch the orders from Sterling_order

table that are placed on or before the given date and that has been

accepted but not assigned to any employees. (EmployeeID will be null

in this case) For each order, the stored procedure/function should

identify the Delivery Boy who takes care of delivery in the region

where the courier has to be dispatched. The stored procedure/function should assign the Employee by updating the EmployeeID of the

corresponding courier order in the Sterling_order table.

i. -1, if no new order is available for assigning, on or before the

given date

ii. -2, in case of failure

iii. 0, in case of success

Note: Assumption is, for all the regions there is at least and at the most

one delivery boy.

o Retrieve the list of OrderID which are assigned to the given

employeeId but not close (i.e. courierStatus other than ‘R’, ‘D’)

· On Success as well on failure, display appropriate message.

 

2. Reset

· All the fields should be reset to the default, if any.

 

at the submit button,i don't understand...below the coding i wrote...got dizzy now.. 

 

 

the coding :

 

 

<html>

<head>

      <title>Distribution List</title>

      <link rel="stylesheet" type="text/css" href="xxx.css" />

</head>

<body>

 

<script type='text/javascript'>

 

function check(){

 

    var day = document.getElementById('day');

    var month = document.getElementById('month');

    var year = document.getElementById('year');

 

if(DAY(day, "Select Day...")){

  if(MONTH(month, "Select Month...")){

    if(YEAR(year, "Select Year...")){

return true;

    }

                  }

                }

                return false;

}

 

function DAY(elem, Msg){

if(elem.value == "DAY"){

alert(Msg);

elem.focus();

return false;

}else{

return true;

}

}

 

function MONTH(elem, Msg){

if(elem.value == "MONTH"){

alert(Msg);

elem.focus();

return false;

}else{

return true;

}

}

 

function YEAR(elem, Msg){

if(elem.value == "YEAR"){

alert(Msg);

elem.focus();

return false;

}else{

return true;

}

}

 

</script>

 

<center><h1>Distribution List Generation</h1>

<form name= "distribution_form" method= "post" action= "DistributionListGenerator.php" onsubmit='return check()'>

    Date Of Distribution : <select id="day">

                                <option> DAY </option>

                                <option> 1 </option>

                                <option> 2 </option>

                                <option> 3 </option>

                                <option> 4 </option>

                                <option> 5 </option>

                                <option> 6 </option>

                                <option> 7 </option>

                                <option> 8 </option>

                                <option> 9 </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>

                                <option> 25 </option>

                                <option> 26 </option>

                                <option> 27 </option>

                                <option> 28 </option>

                                <option> 29 </option>

                                <option> 30 </option>

                                <option> 31 </option></select>

 

                            <select id="month">

                                <option> MONTH </option>

                                <option> 1 </option>

                                <option> 2 </option>

                                <option> 3 </option>

                                <option> 4 </option>

                                <option> 5 </option>

                                <option> 6 </option>

                                <option> 7 </option>

                                <option> 8 </option>

                                <option> 9 </option>

                                <option> 10 </option>

                                <option> 11 </option>

                                <option> 12 </option></select>

                               

                                <select id="year">

                                <option> YEAR </option>

                                <option> 2010 </option>

                                <option> 2009 </option>

                                <option> 2008 </option>

                                <option> 2007 </option>

                                <option> 2006 </option>

                                <option> 2005 </option>

                                <option> 2004 </option>

                                <option> 2003 </option>

                                <option> 2002 </option>

                                <option> 2001 </option>

                                <option> 2000 </option>

                                <option> 1999 </option>

                                <option> 1998 </option>

                                <option> 1997 </option>

                                <option> 1996 </option>

                                <option> 1995 </option></select>

                               

    <br><br><input type= "submit" value= "Submit" name="sub">

    <input type= "reset" value= "Reset" name= "res">

</form></center>

 

</body>

</html>

 

Link to comment
https://forums.phpfreaks.com/topic/132424-urgent-help-me/
Share on other sites

I think mainly what Thorpe is getting at is you do not seem to even be trying.

 

Where is your PHP code? Where is the start of the stored procedure code you have attempted?

 

You only posted the simple HTML page, and anyone can easily create that in a matter of a minute. Try actually writing the code and when you get stuck you might get some help.

Link to comment
https://forums.phpfreaks.com/topic/132424-urgent-help-me/#findComment-688490
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.