Created
February 2, 2012 08:55
-
-
Save oquno/1722436 to your computer and use it in GitHub Desktop.
ワンクリック採用.php
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$recruited = false; | |
if ($_POST["saiyou"]) | |
{ | |
$host = gethostbyaddr(getenv("REMOTE_ADDR")); | |
$fp = fopen("/path/to/entries", "a"); | |
fwrite($fp, "\n".date("Y-m-d H:i:s")."\t".$host); | |
fclose($fp); | |
$recruited = true; | |
} | |
?> | |
<!DOCTYPE html> | |
<head> | |
<meta charset="UTF-8" /> | |
<title>ワンクリック採用</title> | |
<style> | |
#sbmt { font-size: x-large; } | |
</style> | |
</head> | |
<h1>ワンクリック採用</h1> | |
<?php if ($recruited):?> | |
<p>応募完了しました</p> | |
<?php else :?> | |
<p>採用する企業名はリモートホストから取得します</p> | |
<form name="frm" method="POST"> | |
<input type="hidden" name="saiyou" value="true" /> | |
<input type="submit" id="sbmt" onclick="disabled=true;document.frm.submit();" value="USERNAMEを採用します"/> | |
</form> | |
<?php endif ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment