コード例 #1
0
ファイル: pProfileAjax.php プロジェクト: Neldris/Amisti
include "../aClass/profileSettings.php";
include "../aClass/pProfile.php";
date_default_timezone_set('UTC');
$pProfile = new pProfile();
$UID = $_SESSION['userID'];
//AGE CANCEL
if ($_GET['ageCancel'] == true) {
    echo $pProfile->getSaveAge();
}
//AGE SAVE
if ($_GET['ageSave'] == true) {
    $ageSaveID = $_GET['ageSaveID'];
    $aDD = cleanInput(trim($_GET['aDD']));
    $aAM = monthToNumber(trim($_GET['aAM']));
    $aAY = cleanInput(trim($_GET['aAY']));
    $pProfile->setRquery("SELECT pDOBD,pDOBM,pDOBY  FROM amistiPersonal WHERE userID=?", array($UID));
    $res = $pProfile->getRquery();
    if (count($res) > 0) {
        if ($pProfile->setRquery("UPDATE amistiPersonal SET pDOBD=?, pDOBM=?, pDOBY=? WHERE userID=?", array($aDD, $aAM, $aAY, $UID))) {
        }
    } else {
        $id = autoID();
        $pProfile->setRquery("INSERT INTO amistiPersonal VALUES(?,?,?,?,?,?,?,?,?,?,?)", array($id, $UID, $aDD, $aAM, $aAY, '', '', '', NULL, '', ''));
    }
    echo $pProfile->getSaveAge();
}
//EDIT AGE
if ($_GET['ageEdit'] == true) {
    echo $pProfile->editAge();
}
//AGE DELETE