<?php
//include "../../authheader.php";
if($block != true)
{
?>
<?php
$gname = $_POST['groupname'];
$isgrp = $_POST['ingrp'];
include 'header.txt';
//$link = mysql_connect($hostn, $usern,$passn);
if (!$link) {
die('Could not connect: ' . mysql_error());
}
mysql_select_db($dbname,$link);
?>
<html>
<head>
<!-- Welcome to the scripts database of HIOX INDIA -->
<!-- This tool is developed and a copyright -->
<!-- product of HIOX INDIA. -->
<!-- For more information visit http://www.hscripts.com -->
<style>
.cent{ TEXT-DECORATION: none; font-family: san-serif; font-weight: 600; color: #ffffff; font-size: 17px; height: 22px;}
.cent:hover{TEXT-DECORATION: none; color: #000000;}
</style>
</head>
</td></tr>
<tr height=90% width=100% bgcolor="#0f7f0f">
<td width=100%>
<div style="height: 100%;">
<table width=100% height=100% align=center border=0>
<tr height=100%>
<?php
if($gname != "" && $gname != null)
{
$insert = true;
$qer = "insert into groupname values ('".$gname."')";
//echo($qer);
$result = mysql_query($qer,$link);
if(!$result)
{
$insert= fale;
$error = mysql_error();
}
}
?>
<td width=60% style="border: 2px #47a985 solid;" bgcolor="#efffef">
<table align=center width=80% style="color: #888888; font-weight: bold; padding-left: 10%;">
<?php
if($gname != "" && $gname != null && $insert == true)
{
echo "<tr><td valign=top> </td><td><div style=\"color: #459294; font-weight: bold; border: 2px green solid;\">
Group Name is added in to database. </div><br><br><br></td></tr>";
}
else if($isgrp == "ingrp")
{
echo "<tr><td valign=top> </td><td style=\"color: red; font-weight: bold;\">
Problem while adding group name. Error: $error </td></tr>";
}
$qer = "select * from groupname";
//echo($qer);
$result = mysql_query($qer,$link);
echo "<tr><td valign=top>Existing Groups</td><td><select>";
while ($line = mysql_fetch_array($result, MYSQL_ASSOC))
{
foreach ($line as $col_value)
{
if($col_value != "")
echo "<option>$col_value</option>";
}
}
echo "</select></td></tr>";
?>
<form name=addg method=post action="addGroup.php">
<tr><td valign=top> </td><td>
<br><br>
Add New Group</td></tr>
<tr><td valign=top>GroupName</td>
<td><input name=ingrp type=hidden value=ingrp><input name=groupname type=text style="background-color: #90adff;
color: #554455; font-weight: bold;"></td></tr>
<tr><td valign=top> </td><td><input type=submit value=" Add "
style="background-color: #245489; color: #adada3; width: 65px; border: #451023 px outset;"></td></tr>
</form>
</table>
</td>
<?php
//Second row second column
include "links.txt";
?>
</tr>
</table>
</div>
</td></tr></table>
</body>
</html>
<?php
}
?>