Skip to content

Commit

Permalink
Tela de compra
Browse files Browse the repository at this point in the history
  • Loading branch information
kaway404 committed Dec 4, 2017
1 parent 9ff12bd commit ab6a832
Show file tree
Hide file tree
Showing 12 changed files with 1,893 additions and 37 deletions.
20 changes: 13 additions & 7 deletions addsb.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,19 @@
mysql_query('SET character_set_connection=utf8');
mysql_query('SET character_set_client=utf8');
mysql_query('SET character_set_results=utf8');
$insert = mysql_query("insert into netflix_videos (idserie,ep,video) values ('{$tipob}','{$epb}','{$mp4b}')");
mysql_close($conexao);
if($insert) {
print "Episodio adicionado com sucesso";
echo '<script>location.href="admin.php?action=filme";</script>';
}else {
print "Ocorreu um erro!";

$form2['idserie'] = $tipob;
$form2['ep'] = $epb;
$form2['video'] = $mp4b;
$form2['views'] = '0';
$form2['nome'] = '';
$form2['desct'] = '';
if( DBCreate( 'videos', $form2 ) ){
print "Adicionado com sucesso";
echo '<script>location.href="admin.php?action=filme";</script>';
}
else{
print "Ocorreu um erro!";
}
}
}
Expand Down
2 changes: 2 additions & 0 deletions admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,8 @@
height: 100%;
background: #141414;
right: 0;
overflow-y: auto;
overflow-x: hidden;
}

.baka{
Expand Down
4 changes: 2 additions & 2 deletions dashboard.php
Original file line number Diff line number Diff line change
Expand Up @@ -847,13 +847,13 @@ function(data){
}
</style>

<div class="error-msg">
<div class="error-msg" style="z-index: 10000;">

<div class="center-error">
<h1 class="error-h1">Parece que seu mês grátis acabou.</h1>
<p>Para efetuar efetuar pagamento, clique no botão abaixo!</p>

<button class="pagar">Efetuar pagamento</button>
<a href="pagar.php?id=<?php echo $user['idcry']; ?>"><button class="pagar">Efetuar pagamento</button></a>
</div>
</div>

Expand Down
36 changes: 36 additions & 0 deletions database.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
-- phpMyAdmin SQL Dump
-- version 3.2.4
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Feb 21, 2011 at 04:39 PM
-- Server version: 5.1.41
-- PHP Version: 5.3.1

SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";

/*!40101 SET NAMES utf8 */;

--
-- Database: `test_paypal`
--

-- --------------------------------------------------------

--
-- Table structure for table `payments`
--

CREATE TABLE IF NOT EXISTS `payments` (
`id` int(6) NOT NULL AUTO_INCREMENT,
`txnid` varchar(20) NOT NULL,
`payment_amount` decimal(7,2) NOT NULL,
`payment_status` varchar(25) NOT NULL,
`itemid` varchar(25) NOT NULL,
`createdtime` datetime NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

--
-- Dumping data for table `payments`
--
48 changes: 48 additions & 0 deletions functions.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
<?php
// functions.php
function check_txnid($tnxid){
global $link;
return true;
$valid_txnid = true;
//get result set
$sql = mysql_query("SELECT * FROM `netflix_payments` WHERE txnid = '$tnxid'", $link);
if ($row = mysql_fetch_array($sql)) {
$valid_txnid = false;
}
return $valid_txnid;
}

function check_price($price, $id){
$valid_price = false;

$sql = mysql_query("SELECT amount FROM `products` WHERE id = '$id'");
if (mysql_num_rows($sql) != 0) {
while ($row = mysql_fetch_array($sql)) {
$num = (float)$row['amount'];
if($num == $price){
$valid_price = true;
}
}
}
return $valid_price;
return true;
}

function updatePayments($data){
global $link;

if (is_array($data)) {
$sql = mysql_query("INSERT INTO `payments` (txnid, payment_amount, payment_status, itemid, createdtime) VALUES (
'".$data['txn_id']."' ,
'".$data['payment_amount']."' ,
'".$data['payment_status']."' ,
'".$data['item_number']."' ,
'".date("Y-m-d H:i:s")."'
)", $link);
$form2['expirado'] = date('Y-m-d H:i:s', strtotime('+43800 min'));
if( DBUpdate( 'user', $form2 ) ){
echo 'sucesso ao adicionar premium';
}
return mysql_insert_id($link);
}
}
23 changes: 13 additions & 10 deletions index.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
if(empty($_COOKIE['iduser']) and (empty($_COOKIE['inisession']))){?>
<head>
<title>
Wooby Brasil
Wooby Animes
</title>
<meta charset="UTF-8">
<link rel="shortcut icon" href="/static/ico/default.ico"/>
Expand All @@ -28,7 +28,7 @@
left: 0;
top: 0;
position: absolute;
z-index: 1000;
z-index: 5000;
}

.header-al-home-a .logo{
Expand All @@ -50,9 +50,9 @@
-ms-transform: translate(0,-50%);
-o-transform: translate(0,-50%);
transform: translate(0,-50%);
background-image: url(/static/back.jpg);
width: 100%;
height: 85vw;
top: 15vw;
background-size: cover;
}

Expand All @@ -64,6 +64,8 @@
background-image: linear-gradient(to right,rgba(0,0,0,.8) 20%,rgba(0,0,0,0) 85%);
width: 80%;
height: 100%;
position: absolute;
z-index: 1000;
}

.login-b{
Expand All @@ -87,7 +89,7 @@
.apresentation{
position: absolute;
color: #fff;
bottom: 10vw;
bottom: 15vw;
width: 50vw;
height: 20vw;
left: 2vw;
Expand Down Expand Up @@ -137,13 +139,13 @@
</a>
</div>

<div class="body-oa-tod">
<div class="eo">
</div>
<div class="eo"></div>
<video src="http://woobyanimes.com/static/loop.mp4" class="body-oa-tod" autoplay muted loop>
</video>

<div class="apresentation">
<h1>Sua próxima história, agora.</h1>
<p>ASSISTA ONDE QUISER. CANCELE QUANDO QUISER.<p>
<div class="apresentation" style="z-index: 10000;">
<h1>Seu próximo anime, agora.</h1>
<p>VEJA SEUS ANIMES FAVORITOS, QUANDO QUISER!<p>
<a href="/account/1">
<button class="btn-free">ASSISTA UM MÊS GRÁTIS</button>
</a>
Expand All @@ -161,6 +163,7 @@
top: -43vw;
border-bottom: 0.1vw solid #4c4545;
padding-top: 0vw;
z-index: 1000000;
}


Expand Down
Loading

0 comments on commit ab6a832

Please sign in to comment.