Skip to content

Commit

Permalink
various
Browse files Browse the repository at this point in the history
  • Loading branch information
Alessandro Catania committed Dec 21, 2017
1 parent a5b4b92 commit 1b4c92b
Show file tree
Hide file tree
Showing 5 changed files with 101 additions and 9 deletions.
1 change: 1 addition & 0 deletions new/assets/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
box-shadow: 0px 0px 50px 20px black;
}
body {
background-color: #131212;
background-image: url(../img/shutterstock_234780382_opt.jpg);
background-size: 100%;
background-repeat: no-repeat;
Expand Down
1 change: 1 addition & 0 deletions new/assets/css/style.less
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
box-shadow: 0px 0px 50px 20px black;
}
body{
background-color:#131212;
background-image:url(../img/shutterstock_234780382_opt.jpg);
background-size: 100%;
background-repeat: no-repeat;
Expand Down
9 changes: 0 additions & 9 deletions new/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,5 @@
die("Connection failed: " . $conn->connect_error);
}

$sql = "INSERT INTO slots (name, description, operator) VALUES ('Jsdfohn', 'Doe', '[email protected]')";

if ($mysqli->query($sql) === TRUE) {
echo "New record created successfully";
} else {
echo "Error: " . $sql . "<br>" . $mysqli->error;
}


$mysqli->close();
?>
24 changes: 24 additions & 0 deletions new/slots/manage.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?php include("../config.php") ?>

<?php
$sql = "INSERT INTO slots (name, description, operator) VALUES ('Jsdfohn', 'Doe', '[email protected]')";

if ($mysqli->query($sql) === TRUE) {
echo "New record created successfully";
} else {
echo "Error: " . $sql . "<br>" . $mysqli->error;
}


$mysqli->close();
?>
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Untitled Document</title>
</head>

<body>
</body>
</html>
75 changes: 75 additions & 0 deletions new/slots/netent/experience-our-games.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
<?php
$img = $_GET[ 'img' ];
$url = $_GET[ 'url' ];
$name = $_GET[ 'name' ];

if ( !empty( $name ) ) {

include( "../../config.php" ); //connect to db




/*$sql = "INSERT INTO slots (name, description, operator) VALUES ('Jsdfohn', 'Doe', '[email protected]')";
if ($mysqli->query($sql) === TRUE) {
echo "New record created successfully";
} else {
echo "Error: " . $sql . "<br>" . $mysqli->error;
}
*/
/*$sql = "SELECT * FROM slots WHERE `img` = `$img`";
if ( $mysqli->query( $sql )) {
echo "inserting<br>";
$sql = "INSERT INTO slots (img) VALUES ('$img')";
if ( $mysqli->query( $sql ) === TRUE ) {
echo "Record Updated successfully";
} else {
echo "Error: " . $sql . "<br>" . $mysqli->error;
}
} else {
echo "updating!<br>";
$sql = "UPDATE slots SET img = REPLACE(img, 'foo', 'bar') WHERE INSTR(img, 'foo') > 0";
if ( $mysqli->query( $sql ) === TRUE ) {
echo "Record Updated successfully";
} else {
echo "Error: " . $sql . "<br>" . $mysqli->error;
}
}*/

$result = $mysqli->query("SELECT id FROM slots WHERE img = '$img'");
if($result->num_rows == 0) {
// row not found, do stuff...
echo "inserting<br>";

//CREATE OPERATOR ARRAY AND CONVERT

//CREATING NEW ROW(slot)
$sql = "INSERT INTO slots (img,url,name) VALUES ('$img','$url','$name')";

if ( $mysqli->query( $sql ) === TRUE ) {
echo "Record Updated successfully";
} else {
echo "Error: " . $sql . "<br>" . $mysqli->error;
}
} else {
// do other stuff...
echo "date already taken";
/*echo "updating name!<br>";
if(!empty( $name )){
$sql = "UPDATE slots SET img='$name' WHERE img='$name'";
if ( $mysqli->query( $sql ) === TRUE ) {
echo "Record Updated successfully";
} else {
echo "Error: " . $sql . "<br>" . $mysqli->error;
}
}*/
}



$mysqli->close();
}

0 comments on commit 1b4c92b

Please sign in to comment.