0byt3m1n1
Path:
/
data
/
17
/
1
/
18
/
11
/
1670011
/
user
/
1801231
/
htdocs
/
customtanningbed_dot_com
/
bed
/
Bed
/
[
Home
]
File: EmailRooms.php
<?php require_once('Connections/Bed.php'); ?> <?php if (!function_exists("GetSQLValueString")) { function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") { $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue; $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue); switch ($theType) { case "text": $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; break; case "long": case "int": $theValue = ($theValue != "") ? intval($theValue) : "NULL"; break; case "double": $theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL"; break; case "date": $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; break; case "defined": $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue; break; } return $theValue; } } $maxRows_Recordset1 = 10; $pageNum_Recordset1 = 0; if (isset($_GET['pageNum_Recordset1'])) { $pageNum_Recordset1 = filter_var(trim($_GET['pageNum_Recordset1']), FILTER_SANITIZE_STRING); } $startRow_Recordset1 = $pageNum_Recordset1 * $maxRows_Recordset1; mysql_select_db($database_Bed, $Bed); $query_Recordset1 = "SELECT * FROM Emailrooms"; echo $query_Recordset1; $query_limit_Recordset1 = sprintf("%s LIMIT %d, %d", $query_Recordset1, $startRow_Recordset1, $maxRows_Recordset1); $Recordset1 = mysql_query($query_limit_Recordset1, $Bed) or die(mysql_error()); $row_Recordset1 = mysql_fetch_assoc($Recordset1); $all_Recordset1 = mysql_query($query_Recordset1); $totalRows_Recordset1 = mysql_num_rows($all_Recordset1); $totalPages_Recordset1 = ceil($totalRows_Recordset1/$maxRows_Recordset1)-1; $NumberOfRows=mysql_num_rows( $all_Recordset1); echo $query_Recordset1." ".$all_Recordset1." ".$NumberOfRows; $NumberOfRows=$NumberOfRows+1; $insertSQL = "INSERT INTO `bed`.`Emailrooms` (`RoomId` ,`UserId` ,`RoomType` ,`Width` ,`Height` ,`MF`,`Items`,`pics`,`ItemsXs` ,`ItemsYs` ,`ItemsWidths` ,`ItemsHeights` ,`ItemsRotation` )VALUES ('". filter_var( trim($_REQUEST['RoomId']), FILTER_SANITIZE_STRING)."', '". filter_var( trim($_REQUEST['UserId']), FILTER_SANITIZE_STRING)."', '".$NumberOfRows."', '". filter_var( trim($_REQUEST['Width']), FILTER_SANITIZE_STRING)."', '". filter_var( trim($_REQUEST['Height']), FILTER_SANITIZE_STRING)."', '". filter_var( trim($_REQUEST['MF']), FILTER_SANITIZE_STRING)."', '". filter_var( trim($_REQUEST['Items']), FILTER_SANITIZE_STRING)."', '". filter_var( trim($_REQUEST['pics']), FILTER_SANITIZE_STRING)."', '". filter_var( trim($_REQUEST['ItemsXs']), FILTER_SANITIZE_STRING)."', '". filter_var( trim($_REQUEST['ItemsYs']), FILTER_SANITIZE_STRING)."', '". filter_var( trim($_REQUEST['ItemsWidths']), FILTER_SANITIZE_STRING)."', '". filter_var( trim($_REQUEST['ItemsHeights']), FILTER_SANITIZE_STRING)."', '". filter_var( trim($_REQUEST['ItemsRotation']), FILTER_SANITIZE_STRING)."')"; $Result1 = mysql_query($insertSQL, $Bed) or die(mysql_error()); echo "&Insert=".$Result1."&"; $sub= filter_var( trim($_REQUEST['Sub']), FILTER_SANITIZE_STRING)." Check this link http://www.tanningonline.com/Bed/show.php?RoomType=". $NumberOfRows ; mail( filter_var( trim($_REQUEST['Em']), FILTER_SANITIZE_STRING),"Check this Room",$sub); echo "&Em=1&"; ?>