Location: PHPKode > scripts > Form Mail Lite > form/l.php
<?php
require("header.php");
?>
<?php
if($_POST["delete"]){
$sid=$_POST["sid"];
$Log=file("log/skin.cgi");
for($i=0;$i<sizeof($Log);$i++){
$line=explode(",",$Log[$i]);
if($line[0]==$sid){
array_splice($Log,$i,1);
} 
}
$fp=fopen("log/skin.cgi","w");
flock($fp, LOCK_EX);
foreach($Log as $line)fputs($fp,$line);	
fclose($fp);
}
?>
<table>
<?php
if($_GET["fid"]){
$Fid=$_GET["fid"];
$Log=file("log/skin.cgi");
for($i=0;$i<sizeof($Log);$i++){
$line=explode(",",$Log[$i]);
if($line[1]==$Fid){
$ID = $line[0];
$Item = $line[2];
$Type = $line[3];
$Cols = 20;
$Rows = 3;
$Options = $line[6];
$Default = $line[7];
$H = $line[8];
if($H==1){
$h="<font color='#ff4500'>*</font>";
}
else{
$h='';
}
if($Type==0){
        echo "<tr><td align='right'>$h E-mail</td><td> </td><td><input type='text' name='E-mail' size='$Cols' value='$Default'><form action='edit.php' method='POST'><input type='hidden' name='sid' value='$ID'><input type='submit' name='edit' value='Edit'></form><form action='' method='POST'><input type='hidden' name='sid' value='$ID'><input type='submit' name='delete' value='Del'></form></td></tr><br>";
}
elseif($Type==1){
        echo "<tr><td align='right'>$h$Item</td><td> </td><td><input type='text' name='$Item' size='$Cols' value='$Default'><form action='edit.php' method='POST'><input type='hidden' name='sid' value='$ID'><input type='submit' name='edit' value='Edit'></form><form action='' method='POST'><input type='hidden' name='sid' value='$ID'><input type='submit' name='delete' value='Del'></form></td></tr><br>";
}

elseif($Type==2){
        echo "<tr><td align='right'>$h$Item</td><td> </td><td><input type='password' name='$Item' size='$Cols' value='$Default'><form action='edit.php' method='POST'><input type='hidden' name='sid' value='$ID'><input type='submit' name='edit' value='Edit'></form><form action='l' method='POST'><input type='hidden' name='sid' value='$ID'><input type='submit' name='delete' value='Del'></form></td></tr><br>";
}
elseif($Type==3){
                        echo "<tr><td align='right'>$h$Item</td><td> </td><td>";
                        $values = explode(':',$Options);
                        for($s = 0; $s < count($values); $s++) {
                        echo "<input type='radio' name='$Item' value='$values'>$values[$s]<br>";
                        }
                        echo "<form action='edit.php' method='POST'><input type='hidden' name='sid' value='$ID'><input type='submit' name='edit' value='Edit'></form><form action='' method='POST'><input type='hidden' name='sid' value='$ID'><input type='submit' name='delete' value='Del'></form></td></tr><br>";
}
elseif($Type==4){
                        echo "<tr><td align='right'>$h$Item</td><td> </td><td>";
                        $values = explode(':',$Options);
                        for($s = 0; $s < count($values); $s++) {
                        echo "<input type='checkbox' name='$Item' value='$values[$s]'>$values[$s]<br>";
                        }
                        echo "<form action='edit.php' method='POST'><input type='hidden' name='sid' value='$ID'><input type='submit' name='edit' value='Edit'></form><form action='' method='POST'><input type='hidden' name='sid' value='$ID'><input type='submit' name='delete' value='Del'></form></td></tr><br>";
}

elseif($Type==5){
        
                        echo "<tr><td align='right'>$h$Item</td><td> </td><td><select name='$Item' size='$Rows'><option value=''></option>";
                        $values = explode(":",$Options);
                        for($s = 0; $s < count($values); $s++) {
                        echo "<option value='$values[$s]'>$values[$s]</option>";
                        }                     
                        echo "</select><form action='edit.php' method='POST'><input type='hidden' name='sid' value='$ID'><input type='submit' name='edit' value='Edit'></form><form action='' method='POST'><input type='hidden' name='sid' value='$ID'><input type='submit' name='delete' value='Del'></form></td></tr><br>";
}

elseif($Type==6){
        echo "<tr><td align='right'>$h$Item</td><td> </td><td><textarea name='$Item' cols='$Cols' rows='$Rows'>$Default</textarea><form action='edit.php' method='POST'><input type='hidden' name='sid' value='$ID'><input type='submit' name='edit' value='Edit'></form><form action='' method='POST'><input type='hidden' name='sid' value='$ID'><input type='submit' name='delete' value='Del'></form></td></tr><br>";
}

elseif($Type==7){
        echo "<tr><td align='right'></td><td> </td><td><input type='hidden' name='$Item' value='$Default'><form action='edit.php' method='POST'><input type='hidden' name='sid' value='$ID'><input type='submit' name='edit' value='Edit'></form><form action='' method='POST'><input type='hidden' name='sid' value='$ID'><input type='submit' name='delete' value='Del'></form></td></tr><br>";
}
?>
<?php
}
}
}
?>
</table>
<?php
require("footer.php");
?>
Return current item: Form Mail Lite