コード例 #1
0
ファイル: dosignup.php プロジェクト: yangfanfei/arcemu
$privatekey = "Fill in private Recaptcha key here";
  
$resp = recaptcha_check_answer ($privatekey,
                    $_SERVER["REMOTE_ADDR"],
                    $_POST["recaptcha_challenge_field"],
                    $_POST["recaptcha_response_field"]);
                    
if( !$resp->is_valid ){
  header("Location:htm/err_captcha.html");
  exit;
}
*/
//////////////////////////////////////////////////////////////////////////////
include 'Config.inc.php';
include '../lib/MYSQLDatabase.inc.php';
$db = new MYSQLDatabase($dbusername, $dbpassword, $dbhost, $dbport, $dbname);
if ($db->Connect() == false) {
    $db->Close();
    header("Location:htm/cantconnect.html");
    exit;
}
$encrypted_password = sha1(strtoupper($username . ":" . $password));
$myquery = "INSERT INTO `accounts` (`login`,`password`,`encrypted_password`,`gm`,`flags`,`banned`,`email`) VALUES('{$username}','','{$encrypted_password}','3','24','0','{$email}')";
$myresult = $db->Query($myquery);
if ($myresult == true) {
    $db->Close();
    header("Location:htm/success.html");
    exit;
} else {
    $db->Close();
    header("Location:htm/failed.html");
コード例 #2
0
ファイル: invoice2.php プロジェクト: Ghaji/form_application
<?php

require_once "inc/initialize.php";
if (!$session->is_logged_in()) {
    redirect_to('index.php');
}
$user = new User();
$user->applicant_id = $session->applicant_id;
$form_id = $user->get_form_id();
$sql = "SELECT * FROM `adm_access_code` WHERE `jamb_rem_no`='" . $form_id . "' AND `reg_num`='" . $form_id . "'";
$payment_record = $user->find_by_sql($sql);
if (empty($payment_record)) {
    redirect_to('select_form.php');
}
$student_status = $user->get_student_status();
$database = new MYSQLDatabase();
$sqlprogrammedetails = "SELECT * FROM personal_details p, department d, faculty f WHERE p.applicant_id=" . $session->applicant_id . " AND p.programme_applied_id=d.department_id AND d.faculty_id=f.faculty_id";
$programmedetails = $database->fetch_array($database->query($sqlprogrammedetails));
$sessiondetails = $database->fetch_array($database->query("SELECT session FROM application_status WHERE id=1"));
$paymentdetails = $database->fetch_array($database->query("SELECT * FROM adm_access_code WHERE jamb_rem_no='" . $programmedetails['form_id'] . "'"));
$invoice = new Invoice();
$invoice->db_fields = array('applicant_id', 'date', 'amount');
$invoice->applicant_id = $session->applicant_id;
$invoice->date = date('Y-m-d H:i:s', time());
$invoice->amount = $paymentdetails['amount'];
$invoice->save();
$invoicedetails = $database->fetch_array($database->query("SELECT * FROM invoice WHERE applicant_id='" . $session->applicant_id . "'"));
//set it to writable location, a place for temp generated PNG files
// $PNG_TEMP_DIR = dirname(__FILE__).DIRECTORY_SEPARATOR.'temp'.DIRECTORY_SEPARATOR;
$PNG_TEMP_DIR = 'inc/qrcode/temp/';
//html PNG location prefix
コード例 #3
0
ファイル: __payment.php プロジェクト: Ghaji/form_application
require_once LIB_PATH . DS . 'css.php';
?>
</head>
<body>
<?php 
include_layout_template("header.php");
?>

<!-- beginnning of main content-->
<div class="container">
	<div class="row-fluid">
		<div class="span10 offset1" >
            <h4>MAKE PAYMENT</h4>
            <hr>
            <?php 
$database = new MYSQLDatabase();
$sql = "SELECT * FROM `personal_details` p JOIN `faculty` f JOIN `department` d JOIN `form_amount` fa WHERE p.applicant_id='" . $session->applicant_id . "' AND p.programme_applied_id=d.department_id AND f.faculty_id=d.faculty_id AND fa.student_status=p.student_status";
$result = $database->query($sql);
$result = $database->fetch_array($result);
$transaction_charge = $result["transaction_amount"];
$our_total = ($result["amount"] + $transaction_charge) * 100;
$payment_id = $result["pay_item_id"];
$naira = '&#8358;';
?>
            <table class="table table-hover table-bordered">
                <thead>
                    <tr>
                        <th>Name</th>
                        <th>Programme</th>
                        <th>Course</th>
                        <th>Programme Charge</th>
コード例 #4
0
ファイル: export.php プロジェクト: Ghaji/form_application
<?php

require_once "../inc/initialize.php";
if (isset($_POST['exportdatabutton'])) {
    $sql = customDecrypt($_POST['exportdata']);
    $database = new MYSQLDatabase();
    $result = $database->query($sql);
    function admission_status($status)
    {
        switch ($status) {
            case 1:
                return "Pending";
                break;
            case 2:
                return "InEligible";
                break;
            case 3:
                return "Eligible";
                break;
            case 4:
                return "Not Offered";
                break;
            case 5:
                return "Offered Admission";
                break;
            default:
                break;
        }
    }
    $filename = 'Exported data on ' . date('Y-m-d');
    $file_ending = "xls";
コード例 #5
0
<?php

require_once "../inc/initialize.php";
//checks if admin user is logged in
if (!$session->is_admin_logged_in()) {
    redirect_to('index.php');
}
if ($_SESSION["role"] != 1) {
    redirect_to('home.php');
}
$database = new MYSQLDatabase();
?>
<!DOCTYPE HTML>
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
		<title>University of Jos, Nigeria</title>
		<?php 
require_once LIB_PATH . DS . 'css.php';
?>
	</head>

	<body>

		<!-- beginnning of main content-->
		<!-- header -->
		<?php 
include_layout_template('admin_header.php');
?>
		<!-- //header -->
		<br>
コード例 #6
0
<?php

require_once "inc/initialize.php";
if (!isset($_POST['txnref'])) {
    redirect_to("index.php");
}
require_once "inc/ajiya/webservice.php";
$transctiondetails = checkTranxact(getStatus($_SESSION["transaction_id"]));
$applicant = User::find_by_id($session->applicant_id);
$database = new MYSQLDatabase();
$sqlprogrammedetails = "SELECT `faculty_name`,`department_name` FROM personal_details p, department d, faculty f WHERE p.applicant_id=" . $_SESSION["applicant_id"] . " AND p.programme_applied_id=d.department_id AND d.faculty_id=f.faculty_id";
$programmedetails = $database->fetch_array($database->query($sqlprogrammedetails));
$sessiondetails = $database->fetch_array($database->query("SELECT session FROM application_status WHERE id=1"));
?>
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>University of Jos, Nigeria</title>
<?php 
require_once LIB_PATH . DS . 'javascript.php';
require_once LIB_PATH . DS . 'css.php';
?>
<style type="text/css">
	@media print{
		.noprint{display:none}
		.imgg{
			margin-top:-400px; 
			opacity:0.1; 
			width:200px; 
			display:inline-block !important;
コード例 #7
0
<?php

require_once "../inc/initialize.php";
$message = $_POST['message'];
$messagetitle = $_POST['title'];
$database = new MYSQLDatabase();
$sendsql = "INSERT INTO applicant_notifications (sender_id, title, content, recipient_id, notification_date, notification_time, status) VALUES(" . $session->applicant_id . ", '" . $messagetitle . "', '" . $message . "', '1', '" . date('Y-m-d') . "', '" . date('H:i') . "', 1)";
$result = $database->query($sendsql);
if ($result) {
    echo '<h4 class="alert alert-success">Success</h4>';
    echo '<hr>';
    echo "Your complaint has been sent.";
    echo '<hr>';
} else {
    echo '<h4 class="alert alert-danger">Error</h4>';
    echo '<hr>';
    echo "Your complaint was not sent.";
    echo '<hr>';
}
コード例 #8
0
<?php

require_once '../../inc/initialize.php';
$programme = $_POST['programme'];
$amount = $_POST['amount'];
$pay_item_id = $_POST['pay_item_id'];
$description = $_POST['description'];
$amount_id = $_POST['amount_id'];
$database = new MYSQLDatabase();
$update_query = "UPDATE form_amount SET student_status='" . $programme . "', amount = " . $amount . ", pay_item_id=" . $pay_item_id . ", description='" . $description . "' WHERE amount_id=" . $amount_id . "";
$update = $database->query($update_query);
if ($update) {
    echo '<h4 class="alert alert-success">Success</h4>';
    echo '<hr>';
    echo "You have successfully updated the amount details";
    echo '<hr>';
} else {
    echo '<h4 class="alert alert-error">Error</h4>';
    echo '<hr>';
    echo "Your updates were not saved";
}
コード例 #9
0
      <div class="input-prepend">
      		<span class="add-on"><i class="icon-lock"></i></span>
            <input type="password" id="cepassword" name="cepassword" placeholder="Confirm Password" required />
    	</div>
    </div>
  </div>
  
  <div class="control-group">
    <label class="control-label" for="inputPassword">Role</label>
    <div class="controls">
      <div class="input-prepend">
      		<span class="add-on"><i class="icon-bookmark"></i></span>
            <select name="role" class="input-xlarge" id="role" required >
            	<option value="">--Select A Role--</option>
                <?php 
$database = new MYSQLDatabase();
$roles = $database->query("SELECT * FROM admin_roles");
//The key acts as values in the database
while ($row_roles = $database->fetch_array($roles)) {
    echo '<option value="' . $row_roles['admin_role_id'] . '">' . $row_roles['admin_role_name'] . '</option>';
}
?>
            </select>
    	</div>
    </div>
  </div>
  <?php 
$database = new MySQLDatabase();
$sql_faculty = "SELECT * FROM faculty ORDER BY faculty_name ASC";
$result_set = $database->query($sql_faculty);
?>