Example #1
0
<?php

if (isset($_GET['formID'])) {
    include 'connection_pure.php';
    include 'function.php';
    require 'tcpdf/tcpdf.php';
    include 'config/enc.php';
    $formID = $_GET['formID'];
    $formID = q3_decrypt($formID);
    $query = "SELECT adrDataIDAI, adrFormID, Adrno, Madracno, CCIN, Source, State, Inst, report_type, IFNULL(age, '') AS age, age_unit, \n\tage_group, wt, sex, ethnic, race, onset_date, date_end_reaction, onset_time, onset_time_unit, extent, notes, \n\tatccode, outcome, reaction_subsided, reaction_reappeared, reaction_treatment, date_of_death, death_code, \n\treaction_relation, lab_data, history, historyStDate, historyEndDate, historyCont, `status`, reporter_name, \n\treporter_dept, DATE_FORMAT(report_date, '%d/%m/%Y') AS report_date, reporter_faxno, reporter_comment, reporter_org, reporter_telno, reporter_email, \n\treporter_address, reporter_state, madrac_action, total_drugs, dechall, rechall, causality1, causality2, \n\tpred_code, add_info, rep_who, adr_type, icdcode, adr_desc, initial, madrac, web_hosp, desig, partbody, \n\tliterature_ref, study_name, lastMenDate, gesPer, gesPerUnit, weight, height, seriousness, seriousnessCrit, \n\trt1stTime, rt1stTimeUnit, rtLastTime, rtLastTimeUnit, causeOfDeath, autopsyYesNo, autopsyText, report_comment, \n\tADR_ORIGIN, ADR_CURRENTSTAT, senderIden, DATE_FORMAT(dateRcv, '%d/%m/%Y') AS dateRcv, Adrdatacol, study_type, conserf_OtrSE, reportInit, caseType, \n\tpregnancyStat, allergyStat, allergyText, MedDraTerm, ptDOB, rptVerName, rptrVerDesig, chInitial, chAge, chAgeUnit, \n\tchAgeGrp, chSex, primRptrQuali, primRptrName, primRptrDesig, primRptrState, primRptrOrg, primRptrDept, \n\tprimRptrAddrs, initRptNum\n\tFROM adrdata where adrFormID = '{$formID}'";
    $res = mysqli_query($con, $query) or die(mysqli_error($con));
    if ($res) {
        if (mysqli_num_rows($res) > 0) {
            $resRow = mysqli_fetch_array($res);
            $senderIden = $resRow['senderIden'];
            $Madracno = $resRow['Madracno'];
            $refNo = $resRow['notes'];
            $dateRptRcv = $resRow['dateRcv'];
            $reportInit = $resRow['reportInit'];
            $initRptNum = $resRow['initRptNum'];
            $caseType = $resRow['caseType'];
            $chInitial = $resRow['chInitial'];
            $chAge = $resRow['chAge'];
            $chAgeUnit = $resRow['chAgeUnit'];
            $chAgeGrp = $resRow['chAgeGrp'];
            $chSex = $resRow['chSex'];
            $ptInitial = $resRow['initial'];
            $ptDOB = dateChecker($resRow['ptDOB']);
            $ptAge = $resRow['age'];
            $ptageUnit = getAgeUnitByValue($con, $resRow['age_unit']);
            $ptAgeGrp = $resRow['age_group'];
Example #2
0
<?php

include 'config/enc.php';
?>
<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>DEC</title>
</head>
<body>

	<form method="POST">
		<input type="text" name="enc" >
		<br/>
		<input type="submit" name="submit">
	</form>
	
</body>
</html>

<?php 
if (isset($_POST['submit'])) {
    $enc = $_POST['enc'];
    $dec = q3_decrypt($enc);
    echo "<br/><br/><b> {$dec} </b>";
}