Location: PHPKode > projects > phpServerAdmin > phpserveradmin/pptpd/templates/delete.php
<?php
	// No direct access
	if ( _PPTPD ) die("Cannot access this directly!");

	// If not logged in, go to index.
	if ( !isset( $_SESSION["console"]["loggedin"] ) ) {
		header( "Location: index.php" );
		exit;
	}

	// If not allowed to add tunnels, Go to index.
	
	$query = "SELECT ".TUNNEL_USERNAME.",".TUNNEL_PASSWORD.",".TUNNEL_VPNSERVER.",".TUNNEL_VPNIP.",".TUNNEL_COMM." FROM ".TUNNEL_TABLE." WHERE id='".$pptpd['GET']['id']."'";
	database_connect();
	$result = @mysql_query($query);
	if ( ! $result )
	{
		$error = "<tr><td colspan='5' class='errormsg' height='20'><strong>&nbsp;Database Error : ".mysql_error()."</STRONG></td></tr>";
	}
	else
	{
		$fetch_result = mysql_fetch_assoc($result);
		$clicktodelete = "<a href='index.php?mod=delete&action=confirm&id=".$pptpd['GET']['id']."'><img src='images/idelete.gif' border='0' align=center></a> Are You Sure?";
	}
?>
					<table>
						<tr>
							<td>&nbsp;</td>
						</tr>
					</table>
          <TABLE class=color-tabletrim cellSpacing=1 cellPadding=2 width="100%" border=0>
              <TR class=color-tableheader>
                <TD width="100%" background=images/dialogtop.gif colSpan=9 height=20><STRONG class=titlerev>&nbsp;DELETE TUNNEL "<?=$fetch_result[TUNNEL_USERNAME] ?>"</STRONG></TD>
              </TR>
	            <TABLE class=color-tabletrim cellSpacing=0 cellPadding=0 width="100%" border=0>
                <TR>
                  <TABLE class=color-tabletrim cellSpacing=1 cellPadding=2 width="100%" border=0>
                      <TR class=color-columnheaders>
                        <TH scope=col noWrap width=100 height=20><FONT class=datasheetField>&nbsp;Control</FONT></TH>
                        <TH scope=col noWrap width=130 height=20><FONT class=datasheetField>&nbsp;Tunnel Name</FONT></TH>
                        <TH scope=col noWrap width=130 height=20><FONT class=datasheetField>&nbsp;Password</FONT></TH>
                        <TH scope=col noWrap width=130 height=20><FONT class=datasheetField>&nbsp;VPN IP</FONT></TH>
                        <TH scope=col noWrap height=20><FONT class=datasheetField>&nbsp;Comments</FONT></TH>
                      </TR>
                      <TR bgColor=#bbbbbb>
                        <TD></TD>
                        <TD noWrap ></TD>
                        <TD width=100></TD>
                        <TD></TD>
                        <TD></TD>
                      </TR>
                      <TR class=c scope=row>
                        <TD noWrap height=20 width=90> <FONT class=datasheetField>&nbsp;<?php echo $clicktodelete ?></FONT></TD>
                        <TD noWrap height=20 bgcolor=><FONT class=datasheetField>&nbsp;<?php echo $fetch_result[TUNNEL_USERNAME]; ?></FONT></TD>
                        <TD noWrap height=20><FONT class=datasheetField>&nbsp;<?php echo $fetch_result[TUNNEL_PASSWORD]; ?></FONT></TD>
                        <TD noWrap height=20><FONT class=datasheetField>&nbsp;<?php echo $fetch_result[TUNNEL_VPNIP]; ?></FONT></TD>
                        <TD noWrap height=20><FONT class=datasheetField>&nbsp;<?php echo $fetch_result[TUNNEL_COMM]; ?></FONT></TD>
                      </TR>
											<?php echo $error; ?>
                  </table>
            </table>
        </table>
Return current item: phpServerAdmin