コード例 #1
0
ファイル: pProfileAjax.php プロジェクト: Neldris/Amisti
if ($_GET['sexSave'] == true) {
    $sexData = cleanInput(trim($_GET['sexData']));
    $pProfile->setRquery("SELECT * FROM amistiPersonal WHERE userID=?", array($UID));
    $res = $pProfile->getRquery();
    if (count($res) > 0) {
        $pProfile->setRquery("UPDATE amistiPersonal SET pSexualOr=? WHERE userID=?", array($sexData, $UID));
        $pProfile->getSexOrient();
    } else {
        $id = autoID();
        $pProfile->setRquery("INSERT INTO amistiPersonal VALUES(?,?,?,?,?,?,?,?,?,?,?)", array($id, $UID, NULL, NULL, NULL, '', $sexData, '', NULL, '', ''));
        $pProfile->getSexOrient();
    }
}
//SEXUAL ORIENTATION EDIT
if ($_GET['sexEdit'] == true) {
    echo $pProfile->editSexOrient();
}
//SEXUAL ORIENTATION DELETE
if ($_GET['sexDelete'] == true) {
    if ($pProfile->setRquery("UPDATE amistiPersonal SET pSexualOr=? WHERE userID=?", array('', $UID))) {
        echo $pProfile->getSexOrient();
    }
}
//SEXAUL ORIENTATION ADD PROFILE
if ($_GET['sexOrAdd'] == true) {
    echo $pProfile->getSexOrient(true);
}
//================================ RELATIONSHIP ================================
$rArray = array("Single", "Married", "Divorced", "Complicated", "Open Relationship", "Partner");
//INPUT KEYUP
if ($_GET['rRelation'] == true) {