Jump to content

[SOLVED] can't locate problem..


ag3nt42

Recommended Posts

Notice: A session had already been started - ignoring session_start() in admin.php on line 2

 

my code:

<?php
session_start();
require('../config.php');

////////////////////////////////
//* OPEN DATABASE CONNECTION *//
////////////////////////////////
$con = mssql_connect($dblocation,$dbusername,$dbpassword);

if (!$con)
{
die('Could not connect: ' . mssql_error());
}

mssql_select_db($dbname, $con);

////////////////////////////
//* SETUP SOME VARIABLES *//
////////////////////////////
$dbP_notice = "*Note* - Changing the password here does not change your databases password.".PHP_EOL."Use this to update your database password in Lotus only.";
$AP_notice = "*Note* - This will only update the Master Admins Password".PHP_EOL."If you have setup other users with Admin Permissions they will have to update their passwords via User Control Panel";
$MA_notice = "*Note* - The Master Admin is the only user with an Email address. Changing the Master Admin does NOT change the Admin Email.".PHP_EOL."This is the first user created when installing.";

////////////////////////////
//* CHECK FOR DAY CLOSES *//
////////////////////////////
if(!(isset($CloseSun))){$CloseSun ='no';}else{$CloseSun=$CloseSun;}
if(!(isset($CloseMon))){$CloseMon ='no';}else{$CloseMon=$CloseMon;}
if(!(isset($CloseTues))){$CloseTues ='no';}else{$CloseTues=$CloseTues;}
if(!(isset($CloseWens))){$CloseWens ='no';}else{$CloseWens=$CloseWens;}
if(!(isset($CloseThur))){$CloseThur ='no';}else{$CloseThur=$CloseThur;}
if(!(isset($CloseFri))){$CloseFri ='no';}else{$CloseFri=$CloseFri;}
if(!(isset($CloseSat))){$CloseSat ='no';}else{$CloseSat=$CloseSat;}

//////////////////////////
//* IF CLOSED MARK DAY *//
//////////////////////////
if($CloseSun=='yes'){$CheckSun=' checked';}else{$CheckSun="";}
if($CloseMon=='yes'){$CheckMon=' checked';}else{$CheckMon="";}
if($CloseTues=='yes'){$CheckTues=' checked';}else{$CheckTues="";}
if($CloseWens=='yes'){$CheckWens=' checked';}else{$CheckWens="";}
if($CloseThur=='yes'){$CheckThur=' checked';}else{$CheckThur="";}
if($CloseFri=='yes'){$CheckFri=' checked';}else{$CheckFri="";}
if($CloseSat=='yes'){$CheckSat=' checked';}else{$CheckSat="";}

////////////////////
//* SNATCH ROOMZ *//
////////////////////
$ZRoom= array(' ',' ',' ',' ',' ',' ',' ',' ',' ',' ');
$ZRQty= array('0','0','0','0','0','0','0','0','0','0');
$ZCapa= array('0','0','0','0','0','0','0','0','0','0');

//# RQTYZ
$RQtySQL = "SELECT [Qty] FROM [".$tblpre."Rooms]";
$RQtyresult = mssql_query($RQtySQL) or die(mssql_error());
$RQtycount=mssql_num_rows(mssql_query($RQtySQL));
$y=0;
while($RQtyrow=mssql_fetch_row($RQtyresult))
{
$ZRQty[$y]=$RQtyrow[0];
$y++;
}

//# CAPACITYZ
$CapaSQL = "SELECT [Capacity] FROM [".$tblpre."Rooms]";
$Caparesult = mssql_query($CapaSQL) or die(mssql_error());
$Capacount=mssql_num_rows(mssql_query($CapaSQL));
$x=0;
while($Caparow=mssql_fetch_row($Caparesult))
{
$ZCapa[$x]=$Caparow[0];
$x++;
}

//ROOMZ
$RoomSQL = "SELECT [Room] FROM [".$tblpre."Rooms]";
$Roomresult = mssql_query($RoomSQL)or die(mssql_error());
$Roomcount=mssql_num_rows(mssql_query($RoomSQL));
$x=0;
while($Roomrow = mssql_fetch_row($Roomresult))
{
$ZRoom[$x]=$Roomrow[0];
$x++;
}

////////////////////////
//* SNATCH EQUIPMENT *//
////////////////////////
//# ITEMZ
$ItemSQL = "SELECT [itemName] FROM [".$tblpre."Equipment]";
$Itemresult = mssql_query($ItemSQL)or die(mssql_error());
$Itemcount=mssql_num_rows(mssql_query($ItemSQL));
$x=0;
while($Itemrow = mssql_fetch_row($Itemresult))
{
$ZItem[$x]=$Itemrow[0];
$x++;
}
//#QTYZ
//# QTYZ
$QtySQL = "SELECT [Qty] FROM [".$tblpre."Equipment]";
$Qtyresult = mssql_query($QtySQL) or die(mssql_error());
$Qtycount=mssql_num_rows(mssql_query($QtySQL));
$y=0;
while($Qtyrow=mssql_fetch_row($Qtyresult))
{
$ZQty[$y]=$Qtyrow[0];
$y++;
}

////////////////////
//* SNATCH ADMIN *//
////////////////////
$AdminSql="SELECT [username] FROM [".$tblpre."users]  WHERE Ident='1'";
$Aresult=mssql_query($AdminSql)or die(mssql_error());
while($Arow=mssql_fetch_row($Aresult))
{
$Zadmin=$Arow[0];
}

//////////////////////////
//* Snatch Admin Email *//
//////////////////////////
$SnatchAE = "SELECT [Email] FROM [".$tblpre."users] WHERE Ident='1'";
$result = mssql_query($SnatchAE)or die(mssql_error());
while($row = mssql_fetch_row($result))
{
$Zemail=$row[0];
}

/////////////////////////
//* CHECK PERMISSIONS *//
/////////////////////////
if(!(isset($_SESSION['permish'])))
{
echo('<span style=\'color:red;\'>PERMISSION DENIED:</span> You do not have access to this page.');
}
else
{
if($_SESSION['permish']=='2')
{
echo("

<html>
<head><title>Lotus v.1 - Admin Interface</title>
<link rel='stylesheet' type='text/css' href='admin.css' />
<script type='text/css' src='admin.js'></script>
</head>
<body>
<div id='main'>
<table width='100%'>
<tr>
	<td colspan='3' width='100%'><center><h2>L.O.T.U.S. v1 - Admin Page</h2></center></td>
</tr>
<tr>
	<td>
		<table>
			<tr>
				<td><span class='bigtext'>SETUP ROOMS</span></td>
			</tr>
			<tr>
				<td>
					<fieldset><legend>Setup Rooms</legend>
						<form action='Ca_info/Crs_info.php' method='post'>
							<table>
								<tr>
									<td> </td>
									<td>Room Name</td>
									<td>Capacity</td>
									<td>Qty</td>
								</tr>
								<tr>
									<td><label>Room #1: </label></td>
									<td><input type='text' title='Enter Room Name Here' value='".$ZRoom[0]."' name='Room1' /></td>
									<td><input type='text' title='Enter Max Room Capacity ex. 50".PHP_EOL."(Measurment 1 Person = 1 Unit)' maxlength='3' size='3' value='".$ZCapa[0]."' name='Capa1' /></td>
									<td><input type='text' title='# Of Rooms' maxlength='3' size='3' value='".$ZRQty[0]."' name='RQty1' /></td>
								</tr>
								<tr>
									<td><label>Room #2: </label></td>
									<td><input type='text' title='Enter Room Name Here' value='".$ZRoom[1]."' name='Room2' /></td>
									<td><input type='text' title='Enter Max Room Capacity ex. 50".PHP_EOL."(Measurment 1 Person = 1 Unit)' maxlength='3' size='3' value='".$ZCapa[1]."' name='Capa2' /></td>
									<td><input type='text' title='# Of Rooms' maxlength='3' size='3' value='".$ZRQty[1]."' name='RQty2' /></td>
								</tr>
								<tr>
									<td><label>Room #3: </label></td>
									<td><input type='text' title='Enter Room Name Here' value='".$ZRoom[2]."' name='Room3' /></td>
									<td><input type='text' title='Enter Max Room Capacity ex. 50".PHP_EOL."(Measurment 1 Person = 1 Unit)' maxlength='3' size='3' value='".$ZCapa[2]."' name='Capa3' /></td>
									<td><input type='text' title='# Of Rooms' maxlength='3' size='3' value='".$ZRQty[2]."' name='RQty3' /></td>
								</tr>
								<tr>
									<td><label>Room #4: </label></td>
									<td><input type='text' title='Enter Room Name Here' value='".$ZRoom[3]."' name='Room4' /></td>
									<td><input type='text' title='Enter Max Room Capacity ex. 50".PHP_EOL."(Measurment 1 Person = 1 Unit)' maxlength='3' size='3' value='".$ZCapa[3]."' name='Capa4' /></td>
									<td><input type='text' title='# Of Rooms' maxlength='3' size='3' value='".$ZRQty[3]."' name='RQty4' /></td>
								</tr>
								<tr>
									<td><label>Room #5: </label></td>
									<td><input type='text' title='Enter Room Name Here' value='".$ZRoom[4]."' name='Room5' /></td>
									<td><input type='text' title='Enter Max Room Capacity ex. 50".PHP_EOL."(Measurment 1 Person = 1 Unit)' maxlength='3' size='3' value='".$ZCapa[4]."' name='Capa5' /></td>
									<td><input type='text' title='# Of Rooms' maxlength='3' size='3' value='".$ZRQty[4]."' name='RQty5' /></td>
								</tr>
								<tr>
									<td><label>Room #6: </label></td>
									<td><input type='text' title='Enter Room Name Here' value='".$ZRoom[5]."' name='Room6' /></td>
									<td><input type='text' title='Enter Max Room Capacity ex. 50".PHP_EOL."(Measurment 1 Person = 1 Unit)' maxlength='3' size='3' value='".$ZCapa[5]."' name='Capa6' /></td>
									<td><input type='text' title='# Of Rooms' maxlength='3' size='3' value='".$ZRQty[5]."' name='RQty6' /></td>
								</tr>
								<tr>
									<td><label>Room #7: </label></td>
									<td><input type='text' title='Enter Room Name Here' value='".$ZRoom[6]."' name='Room7' /></td>
									<td><input type='text' title='Enter Max Room Capacity ex. 50".PHP_EOL."(Measurment 1 Person = 1 Unit)' maxlength='3' size='3' value='".$ZCapa[6]."' name='Capa7' /></td>
									<td><input type='text' title='# Of Rooms' maxlength='3' size='3' value='".$ZRQty[6]."' name='RQty7' /></td>
								</tr>
								<tr>
									<td><label>Room #8: </label></td>
									<td><input type='text' title='Enter Room Name Here' value='".$ZRoom[7]."' name='Room8' /></td>
									<td><input type='text' title='Enter Max Room Capacity ex. 50".PHP_EOL."(Measurment 1 Person = 1 Unit)' maxlength='3' size='3' value='".$ZCapa[7]."' name='Capa8' /></td>
									<td><input type='text' title='# Of Rooms' maxlength='3' size='3' value='".$ZRQty[7]."' name='RQty8' /></td>
								</tr>
								<tr>
									<td><label>Room #9: </label></td>
									<td><input type='text' title='Enter Room Name Here' value='".$ZRoom[8]."' name='Room9' /></td>
									<td><input type='text' title='Enter Max Room Capacity ex. 50".PHP_EOL."(Measurment 1 Person = 1 Unit)' maxlength='3' size='3' value='".$ZCapa[8]."' name='Capa9' /></td>
									<td><input type='text' title='# Of Rooms' maxlength='3' size='3' value='".$ZRQty[8]."' name='RQty9' /></td>
								</tr>
								<tr>
									<td><label>Room #10: </label></td>
									<td><input type='text' title='Enter Room Name Here' value='".$ZRoom[9]."' name='Room10' /></td>
									<td><input type='text' title='Enter Max Room Capacity ex. 50".PHP_EOL."(Measurment 1 Person = 1 Unit)' maxlength='3' size='3' value='".$ZCapa[9]."' name='Capa10' /></td>
									<td><input type='text' title='# Of Rooms' maxlength='3' size='3' value='".$ZRQty[9]."' name='RQty10' /></td>
								</tr>
								<tr>
									<td> </td>
									<td> </td>
									<td> </td>
									<td> </td>
								</tr>
								<tr>
									<td colspan='2'><input type='reset' value='Reset' /></td>
									<td colspan='2'><input type='submit' value='Submit' /></td>
								</tr>
							</table>
						</form>
					</fieldset>
				</td>
			</tr>
		</table>
	</td>
	<td> </td>
	<td>
		<table>
			<tr>
				<td><span class='bigtext'>SETUP USERS</span></td>
			</tr>
			<tr>
				<td>
					<fieldset><legend>New User</legend>
						<form action='Ca_info/Cus_info.php' method='post'>
							<table>
								<tr>
									<td><label>Username: </label></td>
									<td><input type='text' title='Enter New Username Here' name='NewUser' /></td>
								</tr>
								<tr>
									<td><label>Password: </label></td>
									<td><input type='text' title='Enter Password Here' name='NewUpass' /></td>
								</tr>
								<tr>
									<td><label>Permission: </label></td>
									<td>
										<select title='Set Permission' name='NewPermish'>
											<option value='42'>Administrator</option>
											<option value='1'>Normal User</option>
										</select>
									</td>
								</tr>
								<tr>
									<td> </td>
									<td> </td>
								</tr>
								<tr>
									<td style='text-align:right;'><input type='reset' value='reset' /></td>
									<td><input type='submit' value='Submit' /></td>
								</tr>
							</table>
						</form>
					</fieldset>
				</td>
			</tr>
			<tr>
				<td>
					<fieldset><legend>Update User Info</legend>
						<form action='Ca_info/Cus_info.php' method='post'>
							<table>
								<tr>
									<td><label>Username: </label></td>
									<td><input type='text' title='Enter Username Here' name='UpUser' /></td>
								</tr>
								<tr>
									<td><label>Password: </label></td>
									<td><input type='password' title='Enter Password Here' name='UpPass' /></td>
								</tr>
								<tr>
									<td><label>Permission: </label></td>
									<td>
										<select title='Set Permission' name='UpPermish'>
											<option value='42'>Administrator</option>
											<option value='1'>Normal User</option>
										</select>
									</td>
								</tr>
								<tr>
									<td> </td>
									<td> </td>
								</tr>
								<tr>
									<td style='text-align:right;'><input type='reset' value='reset' /></td>
									<td><input type='submit' value='Submit' /></td>
								</tr>
							</table>
						</form>
					</fieldset>
				</td>
			</tr>
			<tr>
				<td>
					<fieldset><legend>Delete User</legend>
						<form action='Ca_info/Cus_info.php' method='post'>
							<table>
								<tr>
									<td><label>Delete Username: </label></td>
									<td><input type='text' title='Enter Username to DELETE' name='destroyuser' /></td>
								</tr>
								<tr>
									<td> </td>
									<td> </td>
								</tr>
								<tr>
									<td style='text-align:right;'><input type='reset' value='Reset' /></td>
									<td><input type='submit' value='Delete' /></td>
								</tr>
							</table>
						</form>
					</fieldset>
				</td>
			</tr>
		</table>
	</td>
</tr>
<tr>
	<td>
		<table>
			<tr>
				<td><span class='bigtext'>SETUP EQUIPMENT</span></td>
			</tr>
			<tr>
				<td>
					<fieldset><legend>Equipment Setup</legend>
						<form action='Ca_info/Ces_info.php' method='post'>
							<table>
								<tr>
									<td> </td>
									<td>Item Name</td>
									<td>Qty</td>
								</tr>
								<tr>
									<td><label>Item #1: </label></td>
									<td><input title='Enter Item Name Here' type='text' value='".$ZItem[0]."' name='Item1' /></td>
									<td><input title='# of Items' type='text' size='3' maxlength='3' value='".$ZQty[0]."' name='Qty1' /></td>
								</tr>
								<tr>
									<td><label>Item #2: </label></td>
									<td><input title='Enter Item Name Here' type='text' value='".$ZItem[1]."' name='Item2' /></td>
									<td><input title='# of Items' type='text' size='3' maxlength='3' value='".$ZQty[1]."' name='Qty2' /></td>
								</tr>
								<tr>
									<td><label>Item #3: </label></td>
									<td><input title='Enter Item Name Here' type='text' value='".$ZItem[2]."' name='Item3' /></td>
									<td><input title='# of Items' type='text' size='3' maxlength='3' value='".$ZQty[2]."' name='Qty3' /></td>
								</tr>
								<tr>
									<td><label>Item #4: </label></td>
									<td><input title='Enter Item Name Here' type='text' value='".$ZItem[3]."' name='Item4' /></td>
									<td><input title='# of Items' type='text' size='3' maxlength='3' value='".$ZQty[3]."' name='Qty4' /></td>
								</tr>
								<tr>
									<td><label>Item #5: </label></td>
									<td><input title='Enter Item Name Here' type='text' value='".$ZItem[4]."' name='Item5' /></td>
									<td><input title='# of Items' type='text' size='3' maxlength='3' value='".$ZQty[4]."' name='Qty5' /></td>
								</tr>
								<tr>
									<td><label>Item #6: </label></td>
									<td><input title='Enter Item Name Here' type='text' value='".$ZItem[5]."' name='Item6' /></td>
									<td><input title='# of Items' type='text' size='3' maxlength='3' value='".$ZQty[5]."' name='Qty6' /></td>
								</tr>
								<tr>
									<td><label>Item #7: </label></td>
									<td><input title='Enter Item Name Here' type='text' value='".$ZItem[6]."' name='Item7' /></td>
									<td><input title='# of Items' type='text' size='3' maxlength='3' value='".$ZQty[6]."' name='Qty7' /></td>
								</tr>
								<tr>
									<td><label>Item #8: </label></td>
									<td><input title='Enter Item Name Here' type='text' value='".$ZItem[7]."' name='Item8' /></td>
									<td><input title='# of Items' type='text' size='3' maxlength='3' value='".$ZQty[7]."' name='Qty8' /></td>
								</tr>
								<tr>
									<td><label>Item #9: </label></td>
									<td><input title='Enter Item Name Here' type='text' value='".$ZItem[8]."' name='Item9' /></td>
									<td><input title='# of Items' type='text' size='3' maxlength='3' value='".$ZQty[8]."' name='Qty9' /></td>
								</tr>
								<tr>
									<td><label>Item #10: </label></td>
									<td><input title='Enter Item Name Here' type='text' value='".$ZItem[9]."' name='Item10' /></td>
									<td><input title='# of Items' type='text' size='3' maxlength='3' value='".$ZQty[9]."' name='Qty10' /></td>
								</tr>
								<tr>
									<td> </td><td> </td><td> </td>
								</tr>
								<tr>
									<td colspan='2'><input type='reset' value='Reset' /></td>
									<td colspan='2'><input type='submit' value='Submit' /></td>
								</tr>
							</table>
						</form>
					</fieldset>
				</td>
			</tr>
		</table>
	</td>
	<td> </td>
	<td>
		<table>
			<tr>
				<td><br /><span class='bigtext'>SETUP SERVICES/OPERATING HOURS</span></td>
			</tr>
			<tr>
				<td>
					<fieldset><legend>Services</legend>
						<form action='Ca_info/Cserv_info.php' method='post'>
							<table>
								<tr>
									<td><label>Service #1: </label></td>
									<td><input type='text' title='Enter Service Name Here' name='Serv1' /></td>
									<td>
										<select name='ServAvail1' title='Is service Available?'>
											<option value='Yes'>Yes</option>
											<option value='No'>No</option>
										</select>
									</td>
								</tr>
								<tr>
									<td><label>Service #2: </label></td>
									<td><input type='text' title='Enter Service Name Here' name='Serv2' /></td>
									<td>
										<select name='ServAvail2' title='Is service Available?'>
											<option value='Yes'>Yes</option>
											<option value='No'>No</option>
										</select>
									</td>
								</tr>
								<tr>
									<td><label>Service #3: </label></td>
									<td><input type='text' title='Enter Service Name Here' name='Serv3' /></td>
									<td>
										<select name='ServAvail3' title='Is service Available?'>
											<option value='Yes'>Yes</option>
											<option value='No'>No</option>
										</select>
									</td>
								</tr>
								<tr>
									<td><label>Service #4: </label></td>
									<td><input type='text' title='Enter Service Name Here' name='Serv4' /></td>
									<td>
										<select name='ServAvail4' title='Is service Available?'>
											<option value='Yes'>Yes</option>
											<option value='No'>No</option>
										</select>
									</td>
								</tr>
								<tr>
									<td><label>Service #5: </label></td>
									<td><input type='text' title='Enter Service Name Here' name='Serv5' /></td>
									<td></td>
								</tr>
								<tr>
									<td> </td>
									<td> </td>
									<td> </td>
								</tr>
								<tr>
									<td> </td>
									<td><input type='reset' value='Reset' /></td>
									<td><input type='submit' value='Submit' /></td>
								</tr>
							</table>
						</form>
					</fieldset>
					<br />
				</td>
			</tr>
			<tr>
				<td><span class='bigtext'>BUSINESS HOURS</span></td>
			</tr>
			<tr>
				<td>
					<fieldset><legend>Business Hours</legend>
						<form action='Ca_info/Coh_info.php' method='post'>
							<table>
								<tr>
									<td colspan='2'><label>Begin: </label></td>
									<td colspan='4'><input title='Beginning Hour".PHP_EOL."Ex. 8:00' name='BHour' /></td>
									<td colspan='1'>
										<select title='AM OR PM?' name='AoP1'>
											<option value='am'>AM</option>
											<option value='pm'>PM</option>
										</select>
									</td>
								</tr>
								<tr>
									<td colspan='2'><label>End: </label></td>
									<td colspan='4'><input title='Ending Hour".PHP_EOL."Ex. 8:00' name='EHour' /></td>
									<td colspan='1'>
										<select title='AM OR PM?' name='AoP2'>
											<option value='pm'>PM</option>
											<option value='am'>AM</option>
										</select>
									</td>
								</tr>
								<tr>
									<td> </td>
								</tr>
								<tr>
									<td><label>Sun</label></td>
									<td><label>Mon</label></td>
									<td><label>Tues</label></td>
									<td><label>Wen</label></td>
									<td><label>Thurs</label></td>
									<td><label>Fri</label></td>
									<td><label>Sat</label></td>
								</tr>
								<tr>
									<td><input name='CSun' type='checkbox'".$CheckSun." title='Check to be closed this day.' value='SunClosed' /></td>
									<td><input name='CMon' type='checkbox'".$CheckMon." title='Check to be closed this day.' value='MonClosed' /></td>
									<td><input name='CTue' type='checkbox'".$CheckTues." title='Check to be closed this day.' value='TueClosed' /></td>
									<td><input name='CWen' type='checkbox'".$CheckWens." title='Check to be closed this day.' value='WenClosed' /></td>
									<td><input name='CThur' type='checkbox'".$CheckThur." title='Check to be closed this day.' value='ThuClosed' /></td>
									<td><input name='CFri' type='checkbox'".$CheckFri." title='Check to be closed this day.' value='FriClosed' /></td>
									<td><input name='CSat' type='checkbox'".$CheckSat." title='Check to be closed this day.' value='SatClosed' /></td>
								</tr>
								<tr>
									<td> </td>
									<td> </td>
									<td> </td>
								</tr>
								<tr>
									<td style='text-align:right;' colspan='3'><input type='reset' value='Reset' /></td>
									<td colspan='4'><input type='submit' value='Submit' /></td>
								</tr>
							</table>
						</form>
					</fieldset>
				</td>
			</tr>
		</table>
	</td>
</tr>
<tr>
	<td>
		<table>
			<tr>
				<td><span class='bigtext'>SERVER INFO</span>_C</td>
			</tr>
			<tr>
				<td>
					<fieldset><legend>Server Info</legend>
						<form action='Ca_info/Cws_info.php' method='post'>
							<table>
								<tr>
									<td class='WSform'><label>Domain Name: </label></td>
									<td class='WSform'><input title='Your domain name or IP".PHP_EOL."Ex. www.computrain-lap.com or 216.117.89.22' type='text' value='".$domain."' name='domain' /></td>
								</tr>
								<tr>
									<td class='WSform'><label>Script Path: </label></td>
									<td class='WSform'><input title='This is the root folder path to lotus. Ex. /lotus/' type='text' value='".$sPath."' name='Spath' /></td>
								</tr>
								<tr>
									<td class='WSform'><label>Master Admin User: </label></td>
									<td class='WSform'><input title='".$MA_notice."' type='text' value='".$Zadmin."' name='AMuser' /></td>
								</tr>
								<tr>
									<td class='WSform'><label>Update Admin Password: </label></td>
									<td class='WSform'><input title='".$AP_notice."' type='password' name='Apassword' /></td>
								</tr>
								<tr>
									<td class='WSform'><label>Update Admin Email: </label></td>
									<td class='WSform'><input title='Update E-mail for Master Admin' type='text' value='".$Zemail."' name='Aemail' /></td>
								</tr>
								<tr>
									<td> </td>
									<td> </td>
								</tr>
								<tr>
									<td><input type='reset' value='Reset' /></td>
									<td><input type='submit' value='Submit' /></td>
								</tr>
							</table>
						</form>
					</fieldset>
				</td>
			</tr>
		</table>
	</td>
	<td> </td>
	<td>
		<table>
			<tr>
				<td><br /><span class='bigtext'>DATABASE INFO</span>_C<br />Keep in mind that you must change this information in lotus first.<br />Then Immediately Change in your database server.</td>
			</tr>
			<tr>
				<td>
					<fieldset><legend>Database Info</legend>
						<form action='Ca_info/Cdb_info.php' method='post'>
							<table>
								<tr>
									<td class='DBform'><label>Server Name: </label></td>
									<td class='DBform'><input title='Usually localhost or ex. www.computrain-lap.com' type='text' value='". $dblocation ."' name='dblocation' /></td>
								</tr>
								<tr>
									<td class='DBform'><label>Server Port: </label></td>
									<td class='DBform'><input title='Leave blank unless using non-standard port' type='text' value='". $dbport ."' name='dbport' /></td>
								</tr>
								<tr>
									<td class='DBform'><label>Database Name: </label></td>
									<td class='DBform'><input title='Name of your database ex. Mydatabase' type='text' value='". $dbname ."' name='Udbname' /></td>
								</tr>
								<tr>
									<td class='DBform'><label>Database Username: </label></td>
									<td class='DBform'><input title='Username for your database' type='text' value='". $dbusername ."' name='dbusername' /></td>
								</tr>
								<tr>
									<td class='DBform'><label>Update Database Password: </label></td>
									<td class='DBform'><input title='". $dbP_notice ."' type='password' name='UdbP'  /></td>
								</tr>
								<tr>
									<td class='DBform'><label>Database Table Pre-fix: </label></td>
									<td class='DBform'><input title='Pre-fix used when populating Database with Tables.".PHP_EOL."(Read Only)' value='". $tblpre ."' name='prefix' READONLY/></td>
								</tr>
								<tr>
									<td> </td>
									<td> </td>
								</tr>
								<tr>
									<td><input type='reset' value='Reset' /></td>
									<td><input type='submit' value='Submit' /></td>
								</tr>
							</table>
						</form>
					</fieldset>
				</td>
			</tr>
		</table>
	</td>
</tr>
</table>
</div><!-- MAIN DIV //-->
</body>
</html>

");
}
else
{
	echo('<span style=\'color:red;\'>PERMISSION DENIED:</span> You do not have access to this page.');
}
}
?>

 

Fixed the variables but why does it keep saying session already started when it was only started on a previous page.. php manual says in order to keep the session going you need to have session_start() atop all your pages.

Link to comment
Share on other sites

no there is an install page prior to this page..where the session is intially started and permissions are set to admin.. so the intallee can get to the admin interface. The config.php file thats being included here.. only contains database connection information.

Link to comment
Share on other sites

as soon as i removed the line.. and refreshed the page I got a denied access message. so the session was no longer active

 

it only seems to be doing it right after installation.

 

why would it tho if they are two seperate pages?

 

here is the code for the install page.

 

/////////////////////////
//* Fails vs Successz *//
/////////////////////////
	echo("<font color='red'># of Failed Queries: " . $CFai . "</font><br /><br />");
	echo("<font color='green'># of Successful Queries: " . $CSuc . "</font><br /><br />");
	if($CFai<=0)
	{
		echo("<h1>Installation Status: <font color='green'>Successful!</font></h1>");
		echo("Congrats!, You have successfully installed Lotus beta v1.0<br />Please delete your 'Install' folder, and continue on to the Admin Interface for setup.<br /><br />");
		echo("Follow the link below to the Admin Interface.<br />If your Install folder has not been deleted you will not have access to the schedule system. Only the Admin Interface.<br /><br />");
		echo("<a href='http://".$domain.$sPath."admin/index.php'>Click here to Finish Install and Setup your Schedule system.</a>");
		session_start();
		$_SESSION['permish']='2';
	}
	else
	{
		echo("<h1>Installation Status: <font color='red'>FAILED!</font></h1>");
	}
}
else
{
echo("Installation Status: FAILED!");
}
?>

Link to comment
Share on other sites

nvrm lol i'm such a dummy.. I've been working on these pages for so long I forgot I routed you through to the admin page with an Index.php page.. which u can guess.. has a session_start in it and includes in the admin page...

 

lol completely forgot it was included.

 

sry

 

thanx for helping me tho I really appreciate it. :)

Link to comment
Share on other sites

If that is the whole error message (and I am guessing that it is not, based on the post you just made) and you are browsing directly to admin.php and you are not doing anything with includes or iframes, then it is likely that session.auto_start is turned on somewhere (you would be getting this error message for any file that contains a session_start() statement.)

Link to comment
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.