Example #1
0
File: my.php Project: vcgato29/poff
/**
 * simple portscanner
 *
 * @return string
 */
function action_portscan()
{
    $ret = '<h2>Portscanner</h2>';
    if (!empty($_POST)) {
        $p = array_map('htmlspecialchars', $_REQUEST);
        if ($p['port'] > 1 && $p['port'] < 65600) {
            $fp = @fsockopen($p['ip'], $p['port'], $err, $err2, 30);
            if (is_resource($fp)) {
                fclose($fp);
                $ret .= '<b>Port is opened!</b>';
            } else {
                $ret .= '<b>Port closed or server down.</b>';
            }
        } else {
            $ret .= 'error: case out of control :P';
        }
    } else {
        $p = array();
        $p['ip'] = strlen($_SERVER['HTTP_VIA']) ? 'not found your ip' : $_SERVER['REMOTE_ADDR'];
        $p['port'] = 80;
    }
    $ret .= '<form action="' . self . '" method="post">';
    $ret .= html_hidden(array('portscan' => 1));
    $ret .= '<input type="text" name="ip" value="' . $p['ip'] . '">
	<input type="text" name="port" value="' . $p['port'] . '">
	<input type="submit" name="submit" value="portscan">
	</form>';
    return $ret;
}
Example #2
0
<form role="form" 
	action="<?php 
echo $_SERVER['PHP_SELF'];
?>
?id=<?php 
echo $_GET['id'];
?>
&amp;go=y"
	enctype="multipart/form-data" method="post">
	

	<fieldset>

	
			<?php 
html_hidden('stfid', $_GET['id']);
$group['1'] = 'Full Athena Access';
$group['10'] = 'Staff Access';
html_radios('Access', 'seclev', $group);
?>

		

	</fieldset>
	<p>&nbsp;</p>
	<fieldset class="buttons">
		<?php 
html_button("Save changes");
?>
		or <a href="/staff/" class="cancel" title="Cancel">Cancel</a>
Example #3
0
/**
* INPUTS
* @deprecated Elimination imminent
*/
function hHidden($key, $value)
{
    return html_hidden($key, $value);
}
Example #4
0
<form action='/person/update' method='POST'>
<?php 
echo html_hidden('person[id]', $person['id']);
echo render_arr('person/personform', array('person' => $person));
echo html_button('editperson', 'Edit Person');
?>
<div><?php 
echo link_to('/person/show/' . $person['id'], 'Cancel');
?>
</div>
</form>