Exemple #1
0
}
//------------------------------------------------------------------------------
// Vendors and Justification.
$_pinkie->v_Vendor = $_POST['vendor'];
$_pinkie->s_Justification = $_POST['justification'];
$_pinkie->s_JustificationText = $_POST['justificationText'];
$_pinkie->s_EquipmentLocation = $_POST['equipmentLocation'];
$_pinkie->s_UCRPropertyTag = $_POST['ucrPropertyNumber'];
$_pinkie->s_classInstructed = $_POST['classInstructed'];
$_pinkie->s_Quote = $_POST['quote'];
// Funds
$_fund = $_POST['fund'];
$_amt = $_POST['amount'];
// Add them to the pinkie.
foreach ($_fund as $key => $f) {
    $_pinkie->addExpense(floatval($_amt[$key]), $f);
}
//------------------------------------------------------------------------------
// Please note that if the number of files excedes the max supported by the file
// system it will fail to create a folder.
//------------------------------------------------------------------------------
// Attachments.
for ($i = 0; $i < count($_FILES['attachment']['name']); $i++) {
    //Get the temp file path
    $tmpFilePath = $_FILES['attachment']['tmp_name'][$i];
    //Make sure we have a filepath
    if ($tmpFilePath != "") {
        //Setup our new file path
        //-----------------------------
        $now = time();
        $num = date("w");