Example #1
0
<?php

if ($studentID) {
    echo getCardInfo($studentID);
}
            		print_r($result);
            		echo '</pre>';*/
            if ($result['getcardinfoResult'] == 'true') {
                $returnVal = true;
                $fee = $result['fee'];
                $cardtype = $result['cardtype'];
                $cardtext = $result['cardtypetext'];
            } else {
                //
                // Only use the epayresponse and pbsresponse on errors!
                //
                $epayresponse = $result['epayresponse'];
            }
        }
    }
    return $returnVal;
}
$epayrespons = "";
$merchantnumber = $_REQUEST['merchantnumber'];
$cardno_prefix = $_REQUEST['cardno_prefix'];
$amount = $_REQUEST['amount'];
$currency = $_REQUEST['currency'];
$acquirer = $_REQUEST['acquirer'];
$fee = "";
$cardtype = "";
$cardtext = "";
if (getCardInfo($merchantnumber, $cardno_prefix, $amount, $currency, $acquirer)) {
    echo $fee . "," . $cardtype . "," . $cardtext;
} else {
    echo $epayresponse;
}
Example #3
0
 }
 if ($studentID) {
     // 						$stdIsReg = isStdRegis($studentID,$atdID);
     if (isStdRegis($studentID, $atdID)) {
         $late = $_SESSION['atdLate'];
         if (!isCheckedIn($studentID, $atdID)) {
             if (date('Y-m-d H:i:s', strtotime($startDateTime . ' +' . $late . ' minute 2 second')) > date('Y-m-d H:i:s', strtotime('Today ' . $time))) {
                 $status = 'ONTIME';
             } else {
                 $status = 'LATE';
             }
             $strSQL = "INSERT INTO `studentattendance` VALUES('{$atdID}','{$studentID}','{$subjectID}','{$registerID}','{$status}')";
             $objQuery = mysql_query($strSQL);
             if ($objQuery) {
                 $data['status'] = "SUCCESS";
                 $cardInfo = getCardInfo($studentID);
                 $data['data'][] = array("responseText" => "Added", "studentID" => $cardInfo);
                 $data['atdData'] = array("id" => $cardInfo['data'][0]['id'], "name" => $cardInfo['data'][0]['fname'] . "   " . $cardInfo['data'][0]['lname'], "status" => ucfirst(strtolower($status)));
             } else {
                 $data['status'] = "FAIL";
                 $data['data'][] = array("reason" => "SaveFail", "strSQL" => $strSQL);
             }
         } else {
             $data['status'] = "FAIL";
             $data['data'][] = array("reason" => "CheckedIn", "strSQL" => $strSQL);
         }
     } else {
         $data['status'] = "FAIL";
         $data['data'][] = array("reason" => "NotFoundReg", "strSQL" => $strSQL);
     }
 } else {
function getPageList($dom)
{
    foreach ($dom->find('a.nameLink') as $item) {
        getCardInfo('http://gatherer.wizards.com/Pages/Card/' . $item->href);
    }
}
Example #5
0
function compareCard($c1, $c2)
{
    $info1 = getCardInfo($c1);
    $info2 = getCardInfo($c2);
    if ($info1['type'] < $info2['type']) {
        return -1;
    } else {
        if ($info1['type'] > $info2['type']) {
            return 1;
        } else {
            if ($info1['max'] < $info2['max']) {
                return -1;
            } else {
                if ($info1['max'] > $info2['max']) {
                    return 1;
                } else {
                    return $info1['min'] > $info2['min'] ? 1 : -1;
                }
            }
        }
    }
}