|
Posted by Novice Computer User on 12/07/05 16:55
Hi. Can somebody PLEASE help. I have spent hours on this.. but I am a
total novice and can't seem to figure it out. Here is a .php script.
Right now, the
minimum amount of time (i.e. duration) allowed is 1 month. However, I
want to be able to reduce the minimum amount of time to 1 day (i.e.
24 hours) -- basically a 24 hour trial period.
Can somebody PLEASE PLEASE tell me what I need to change in this file
to do this? Here is a copy - thanks enormously in advance:
<html>
<head>
<title>Admin Panel</title>
<script language=JavaScript
src="../templates/javascript.js"
type="text/javascript"></script>
<link href="../templates/styles.css" rel="stylesheet"
type="text/css">
<style>
body {background-color:white;
font-family:verdana; font-size:11}
td {font-family:verdana; font-size:11}
input, select, textarea {border-width:1;
border-color:black;font-family:verdana; font-size:11}
.sub {background-color:#336699;
font-family:verdana; color:white;
font-size:11; font-weight:bold; border-width:1; border-color:black}
.TableHead {background-color:#336699;
font-family:verdana;
color:white; font-size:11; font-weight:bold;}
.RedLink {font-family:verdana; color:red;
font-size:11;
font-weight:bold; text-decoration:none}
a.RedLink:hover {text-decoration:underline}
a.GreenLink {font-family:verdana; color:green;
font-size:11;
font-weight:bold; text-decoration:none}
a.GreenLink:hover {text-decoration:underline}
a.BlackLink {font-family:verdana; color:black;
font-size:11;
font-weight:bold; text-decoration:none}
a.BlackLink:hover {text-decoration:underline}
a.BlueLink {font-family:verdana; color:blue;
font-size:11;
font-weight:bold; text-decoration:none}
a.BlueLink:hover {text-decoration:underline}
</style>
<script>
function CheckProfile() {
if(document.RegForm.p1.value=="")
{
window.alert('Enter your password,
please!');
document.RegForm.p1.focus();
return false;
}
if(document.RegForm.p2.value=="")
{
window.alert('Confirm your password,
please!');
document.RegForm.p2.focus();
return false;
}
if(document.RegForm.p1.value != "" &&
document.RegForm.p2.value !=
"" && document.RegForm.p1.value != document.RegForm.p2.value)
{
window.alert('Enter and confirm your
password again!');
document.RegForm.p1.value="";
document.RegForm.p2.value="";
document.RegForm.p1.focus();
return false;
}
if(document.RegForm.FirstName.value=="")
{
window.alert('Enter your First Name,
please!');
document.RegForm.FirstName.focus();
return false;
}
if(document.RegForm.LastName.value=="")
{
window.alert('Enter your Last Name,
please!');
document.RegForm.LastName.focus();
return false;
}
if(document.RegForm.address.value=="")
{
alert('Enter your address, please!');
document.RegForm.address.focus();
return false;
}
if(document.RegForm.city.value=="")
{
alert('Enter your city, please!');
document.RegForm.city.focus();
return false;
}
if(document.RegForm.state.value=="")
{
alert('Enter your state, please!');
document.RegForm.state.focus();
return false;
}
if(document.RegForm.country.value=="")
{
alert('Select your country, please!');
document.RegForm.country.focus();
return false;
}
if(document.RegForm.phone.value=="")
{
window.alert('Enter your Phone,
please!');
document.RegForm.phone.focus();
return false;
}
if(/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(document.RegForm.email.value))
{
return true;
}
alert("Invalid E-mail Address! Please
re-enter.");
document.RegForm.email.focus();
return false;
}
</script>
</head>
<body>
<script>
function CheckNewPrice() {
if(document.f1.PackageName.value=="")
{
window.alert('Enter the new package name,
please!');
document.f1.PackageName.focus();
return false;
}
if(document.f1.NewPrice.value=="")
{
window.alert('Enter the new price value,
please!');
document.f1.NewPrice.focus();
return false;
}
if(document.f1.nDuration.value=="")
{
window.alert('Select a duration period,
please!');
document.f1.nDuration.focus();
return false;
}
if(document.f1.pLevel.value=="")
{
window.alert('Select a priority level,
please!');
document.f1.pLevel.focus();
return false;
}
}
function CheckDelete() {
if(confirm('Are you sure you want to delete this
price?'))
{
return true;
}
else
{
return false;
}
}
</script>
<form method=post name=f1 onsubmit="return CheckNewPrice()">
<table align=center>
<tr>
<td colspan=2 align=center class=TableHead>Enter a new
price</td>
</tr>
<tr>
<td>Package name:</td>
<td><input type=text name=PackageName maxlength=50></td>
</tr>
<tr>
<td>Price:</td>
<td><input type=text name=NewPrice size=6 maxlength=6></td>
</tr>
<tr>
<td>Duration:</td>
<td>
<select name=nDuration>
<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>
<option value="8">8</option>
<option value="9">9</option>
<option value="10">10</option>
<option value="11">11</option>
<option value="12">12</option>
</select> months
</td>
</tr>
<tr>
<td>Priority Level:</td>
<td>
<select name="pLevel">
<option value=""></option>
<option value="1">1 - Standart</option>
<option value="2">2 - Bronze</option>
<option value="3">3 - Platinium</option>
<option value="4">4 - Gold</option>
<option value="5">5 - Premium</option>
</select>
</td>
</tr>
<tr>
<td> </td>
<td><input type=submit name=s1 value=Save class=sub></td>
</tr>
</table>
</form>
<table align=center width=650 cellspacing=0 bordercolor=black
frame=below>
<tr>
<td class=TableHead width=200>Package Name</td>
<td class=TableHead>Priority Level</td>
<td class=TableHead align=center>Duration</td>
<td class=TableHead align=right>Price</td>
<td class=TableHead align=center>Action</td>
<tr>
<td>0</td>
<td>Premium</td>
<td align=center>1 month</td>
<td align=right>$ 0.00</td>
<td align=center><a class=GreenLink
href="PriceEdit.php?PriceID=4">edit</a> | <a class=RedLink
href="PriceDelete.php?PriceID=4" onclick="return
CheckDelete();">delete</a></td>
</tr>
<tr>
<td>Shake Up</td>
<td>Gold</td>
<td align=center>2 months</td>
<td align=right>$ 34.95</td>
<td align=center><a class=GreenLink
href="PriceEdit.php?PriceID=6">edit</a> | <a class=RedLink
href="PriceDelete.php?PriceID=6" onclick="return
CheckDelete();">delete</a></td>
</tr>
<tr>
<td>Grow Up</td>
<td>Platinium</td>
<td align=center>1 month</td>
<td align=right>$ 25.00</td>
<td align=center><a class=GreenLink
href="PriceEdit.php?PriceID=5">edit</a> | <a class=RedLink
href="PriceDelete.php?PriceID=5" onclick="return
CheckDelete();">delete</a></td>
</tr>
</table>
<br><br>
PS: Here are the locations of the 2 .php files that I think you may
need to look at:
http://findthatlawyer.com/siteadmin/PriceEdit.php
http://findthatlawyer.com/siteadmin/SettingsPrices.php
If you could solve this for me, I'd VERY much appreciate it. Thanks in
advance for your time.
Navigation:
[Reply to this message]
|