Example #1
0
function redeemReferralPrize($referralPrizeId, $firstName, $lastName, $address, $city, $state, $zip, $email)
{
    $sql = "update referral_winners set status=1, first_name='{$firstName}', last_name='{$lastName}', address='{$address}', city='{$city}', state='{$state}', email_address='{$email}' where id={$referralPrizeId}";
    executeUpdate($sql);
}
Example #2
0
                if (isset($_GET['betweenDates']) && $_GET['type'] == 'all') {
                    //	$value1 = getClothPlotters($_GET['clothId'], $_GET['startDate'], $_GET['endDate']);
                    //	$value2 = getClothOrders($_GET['startDate'], $_GET['endDate'], $_GET['clothId']);
                    $value = getClothAllPlottersAndOrders($_GET['clothId'], $_GET['startDate'], $_GET['endDate']);
                } else {
                    if (isset($_GET['clothRolls'])) {
                        $value = getClothRolls($_GET['clothId'], $_GET['onlyAvailables']);
                    } else {
                        if (isset($_GET['upToDate'])) {
                            $value = getClothsUpToDate($_GET['groupId'], $_GET['date'], $_GET['includeStock0'], true);
                        } else {
                            if (isset($_GET['getPrices'])) {
                                $value = getClothsPrices($_GET['groupId']);
                            } else {
                                if (isset($_GET['executeQuery'])) {
                                    $value = executeQuery($_GET['query']);
                                } else {
                                    if (isset($_GET['executeUpdate'])) {
                                        $value = executeUpdate($_GET['query']);
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
//return JSON array
exit(json_encode($value));
Example #3
0
function sess_reset()
{
    global $chave_cookie_sessao, $SES_VAR, $conn;
    unset($_COOKIE[$chave_cookie_sessao]);
    setcookie($chave_cookie_sessao, NULL, -1);
    //echo $SES_VAR['id_sessao'];
    if (isset($SES_VAR['id_sessao'])) {
        //desativa a sessão no banco de dados
        $dados = array();
        $dados['estado'] = 9;
        $condicao = array();
        $condicao['id_sessao'] = $SES_VAR['id_sessao'];
        executeUpdate($conn, "sessao", $dados, $condicao);
        //echo "resetou";
    }
}