| Server IP : 208.122.213.31 / Your IP : 216.73.216.45 Web Server : Apache System : Linux msd6191.mjhst.com 4.18.0-553.137.1.el8_10.x86_64 #1 SMP Wed Jun 24 11:40:24 UTC 2026 x86_64 User : WHMCS_MIA_382 ( 1001) PHP Version : 7.4.33 Disable Function : NONE MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /home/httpd/html/store.tiacyrusxxx.com/public_html/dev/ |
Upload File : |
<?php
include('config.php');
dbConn();
if (isset($_POST['type'])) {
if (isset($member_id) && $member_id > 0) {
$today = date('Y-m-d');
if ($_POST['type'] == 'toggleFollow' && isset($_POST['model_ID']) && is_numeric($_POST['model_ID'])) {
$follow_status_sql = mysql_query("SELECT * FROM `cms_members_follow` WHERE `member_id` = '" . $member_id . "' AND `model_id` = '" . $_POST['model_ID'] . "'") or die(mysql_error());
if (mysql_num_rows($follow_status_sql) > 0) {
mysql_query("DELETE FROM `cms_members_follow` WHERE `member_id` = '" . $member_id . "' AND `model_id` = '" . $_POST['model_ID'] . "'") or die(mysql_error());
echo "unfollow";
} else {
mysql_query("INSERT INTO `cms_members_follow` (`member_id`, `model_id`) VALUES ('" . $member_id . "', '" . $_POST['model_ID'] . "')") or die(mysql_error());
echo "followed";
}
} elseif ($_POST['type'] == 'favorite' && isset($_POST['favoriteInfo']) && $_POST['favoriteInfo'] != "") {
$favoriteInfo = explode("-", $_POST['favoriteInfo']);
$favoriteType = $favoriteInfo[0];
$favoriteID = $favoriteInfo[1];
if (isset($favoriteInfo[2]) && is_numeric($favoriteInfo[2])) {
$favoriteImageID = " AND `img_num` = '" . $favoriteInfo[2] . "'";
$imageIDkey = ", `img_num`";
$imageIDvalue = ", '" . $favoriteInfo[2] . "'";
} else {
$favoriteImageID = "";
$imageIDkey = "";
$imageIDvalue = "";
}
if (is_numeric($favoriteType) && is_numeric($favoriteID)) {
$favorite_status_sql = mysql_query("SELECT * FROM `cms_members_fav` WHERE `member_id` = '" . $member_id . "' AND `content_type` = '" . $favoriteType . "' AND `content_id` = '" . $favoriteID . "'" . $favoriteImageID . " LIMIT 1") or die(mysql_error());
if (mysql_num_rows($favorite_status_sql) > 0) {
mysql_query("DELETE FROM `cms_members_fav` WHERE `member_id` = '" . $member_id . "' AND `content_type` = '" . $favoriteType . "' AND `content_id` = '" . $favoriteID . "'" . $favoriteImageID . "") or die(mysql_error());
echo "unfavorite";
} else {
mysql_query("INSERT INTO `cms_members_fav` (`member_id`, `content_type`, `content_id`, `dateadded`" . $imageIDkey . ") VALUES ('" . $member_id . "', '" . $favoriteType . "', '" . $favoriteID . "', '" . $today . "'" . $imageIDvalue . ")") or die(mysql_error());
echo "favorite";
}
}
} elseif ($_POST['type'] == 'wishlist' && isset($_POST['wishlistInfo']) && $_POST['wishlistInfo'] != "") {
$wishlistInfo = explode("-", $_POST['wishlistInfo']);
$wishlistType = $wishlistInfo[0];
$wishlistID = $wishlistInfo[1];
if (is_numeric($wishlistType) && is_numeric($wishlistID)) {
$wishlist_status_sql = mysql_query("SELECT * FROM `cms_members_wishlist` WHERE `member_id` = '" . $member_id . "' AND `content_type` = '" . $wishlistType . "' AND `content_id` = '" . $wishlistID . "' LIMIT 1") or die(mysql_error());
if (mysql_num_rows($wishlist_status_sql) > 0) {
mysql_query("DELETE FROM `cms_members_wishlist` WHERE `member_id` = '" . $member_id . "' AND `content_type` = '" . $wishlistType . "' AND `content_id` = '" . $wishlistID . "'") or die(mysql_error());
echo "wishlistRemove";
} else {
mysql_query("INSERT INTO `cms_members_wishlist` (`member_id`, `content_type`, `content_id`, `dateadded`) VALUES ('" . $member_id . "', '" . $wishlistType . "', '" . $wishlistID . "', '" . $today . "')") or die(mysql_error());
echo "wishlistAdd";
}
}
} elseif ($_POST['type'] == 'rate' && isset($_POST['ratingInfo']) && $_POST['ratingInfo'] != "") {
$ratingInfo = explode("-", $_POST['ratingInfo']);
$ratingType = $ratingInfo[0];
$ratingID = $ratingInfo[1];
$ratingRate = $ratingInfo[2];
if (is_numeric($ratingType) && is_numeric($ratingID) && is_numeric($ratingRate)) {
$rating_status_sql = mysql_query("SELECT * FROM `cms_members_rate` WHERE `member_id` = '" . $member_id . "' AND `content_type` = '" . $ratingType . "' AND `content_id` = '" . $ratingID . "'") or die(mysql_error());
if (mysql_num_rows($rating_status_sql) > 0) {
mysql_query("UPDATE `cms_members_rate` SET `rate` = '" . $ratingRate . "' WHERE `member_id` = '" . $member_id . "' AND `content_type` = '" . $ratingType . "' AND `content_id` = '" . $ratingID . "'") or die(mysql_error());
echo "update";
} else {
mysql_query("INSERT INTO `cms_members_rate` (`member_id`, `content_type`, `content_id`, `rate`) VALUES ('" . $member_id . "', '" . $ratingType . "', '" . $ratingID . "', '" . $ratingRate . "')") or die(mysql_error());
echo "insert";
}
}
}
}
if ($_POST['type'] == 'removeItem' && isset($_POST['itemID']) && $_POST['itemID'] != "") {
include_once('functions_cart.php');
if (isset($_SESSION['member_id']) && is_numeric($_SESSION['member_id'])) {
$cartID = $_SESSION['member_id'];
$cartType = 1;
} elseif (isset($_SESSION['cartID']) && $_SESSION['cartID'] != "") {
$cartID = $_SESSION['cartID'];
$cartType = 2;
}
if (isset($cartID) && isset($cartType)) {
echo removecartItem($cartID, $cartType, $_POST['itemID']);
} else {
echo 'Your Cart could not be found.';
}
}
}
exit;