예제 #1
0
<?include('header.php');?>
<h1>The System is adding your nation to the list.</h1>
<br />

<?
include('connect.php');

if(!isset($_POST['Name']) || !isset($_POST['Status'])) {
echo('Required data has not been entered.');
include('footer.php');
die();
}

//email admin
function_email("New Nation",$_POST,0,0);

//convert non latin characters
$_POST['Name'] = function_nonlatinconv('orig','html',$_POST['Name']);
$_POST['Full_name'] = function_nonlatinconv('orig','html',$_POST['Full_name']);

include('admin/actions/function.addnation.php');

function_action_addnation($_POST,$db_pre);
echo('<meta http-equiv="refresh" content="2;url=index.php">');

echo('<br />'.function_lang('ADDFORM_ADDED',$conf_lang,$db_pref));

include('footer.php');
?>
예제 #2
0
mysql_query('INSERT INTO '.$db_pre.'culture (NatID,Date_uploaded,Comment,File_name,File_type,File_size)
VALUES (\''.$folder_num.'\',\''.mktime().'\',\''.$_POST['comments'].'\',\''.$_FILES['file']['name'].'\',
\''.$_FILES['file']['type'].'\',\''.$_FILES['file']['size'].'\')');

$natculture_items = mysql_num_rows(mysql_query('SELECT * FROM '.$db_pre.'culture WHERE NatID = \''.$folder_num.'\''));
mysql_query('UPDATE '.$db_pre.'data SET Culture_items = \''.$natculture_items.'\' WHERE NatID = \''.$folder_num.'\'');

function_email("Culture Uploaded",$_FILES,$nation_name['Name'],$folder_num);
function_rssadd("NewCulture",$db_pref,$_POST['NatID'],'http://mnforumlist.com/nation.php?ID='.$_POST['NatID'].'#Culture',' It is a '.$_FILES['file']['size'].'byte file called '.$_FILES['file']['name'].' the description is: "'.$_POST['comments'].'.');

//END YES PART
} else {

//START NO PART
echo(function_lang('UPLOAD_UNSAFE',$conf_lang,$db_pref,array($future_file_name)));

$nation_name = mysql_fetch_array(mysql_query('SELECT Name FROM '.$db_pre.'data WHERE NatID = \''.$folder_num.'\''));

function_email("Culture Upload Failed",$_FILES,$nation_name['Name'],$folder_num);
//END NO PART

}
echo('<br /><br />'.function_lang('UPLOAD_GOBACK',$conf_lang,$db_pref,array($_SERVER['HTTP_REFERER'])));


echo('</div>');


include('footer.php');
?>
예제 #3
0
  require_once('recaptchalib.php');
  $privatekey = "6Ldj_7sSAAAAAKiK3_8R6qxpdFjT-An0Hjbw2mt1";
  $resp = recaptcha_check_answer ($privatekey,
                                $_SERVER["REMOTE_ADDR"],
                                $_POST["recaptcha_challenge_field"],
                                $_POST["recaptcha_response_field"]);

  if (!$resp->is_valid) {
    // What happens when the CAPTCHA was entered incorrectly
    echo ("The reCAPTCHA wasn't entered correctly. Go back and try it again." .
         "(reCAPTCHA said: " . $resp->error . ")");
include('footer.php');
die();
  } else {
    // Your code here to handle a successful verification
mysql_query('INSERT INTO `'.$db_pref.'modifications` (`NatID`,`Type`,`Timestamp`,`Name`,`IP`,`Suggestion`)
VALUES (\''.$NatID.'\',\''.$Type.'\',\''.$Timestamp.'\',\''.$Name.'\',\''.$IP.'\',\''.$Desc.'\')');

$raw_name = mysql_query('SELECT `Name` FROM `'.$db_pref.'data` WHERE `NatID` = \''.$NatID.'\'');
$dat_name = mysql_fetch_array($raw_name);

function_email("Modification requested",$dat_name['Name'],$Type,$Desc);

echo(function_lang('REQUESTMOD_REQUESTED',$conf_lang,$db_pref,array($NatID)));


  }

include('footer.php');
?>