SHOW:
|
|
- or go back to the newest paste.
| 1 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> | |
| 2 | <html xmlns:fb="http://ogp.me/ns/fb#"> | |
| 3 | <head> | |
| 4 | ||
| 5 | <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />
| |
| 6 | <title><?php bloginfo('name'); ?><?php wp_title('-'); ?></title>
| |
| 7 | ||
| 8 | <link rel="stylesheet" type="text/css" href="<?php bloginfo('template_directory'); ?>/style.css" />
| |
| 9 | <link href='http://fonts.googleapis.com/css?family=PT+Sans' rel='stylesheet' type='text/css'> | |
| 10 | <script type="text/javascript" src="js/jquery.color.min.js"></script> | |
| 11 | <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script> | |
| 12 | ||
| 13 | <!--[if gte IE 9]> | |
| 14 | <style type="text/css"> | |
| 15 | .gradient {
| |
| 16 | filter: none; | |
| 17 | } | |
| 18 | </style> | |
| 19 | <![endif]--> | |
| 20 | </head> | |
| 21 | ||
| 22 | ||
| 23 | <body> | |
| 24 | ||
| 25 | <div id="fb-root"></div> | |
| 26 | <script>(function(d, s, id) {
| |
| 27 | var js, fjs = d.getElementsByTagName(s)[0]; | |
| 28 | if (d.getElementById(id)) return; | |
| 29 | js = d.createElement(s); js.id = id; | |
| 30 | js.src = "//connect.facebook.net/pt_BR/all.js#xfbml=1"; | |
| 31 | fjs.parentNode.insertBefore(js, fjs); | |
| 32 | }(document, 'script', 'facebook-jssdk'));</script> | |
| 33 | ||
| 34 | ||
| 35 | <div class="wraper"> | |
| 36 | ||
| 37 | <div class="barrab gradient"> | |
| 38 | <div class="barra"> | |
| 39 | ||
| 40 | <div class="menu"> | |
| 41 | <ul> | |
| 42 | <li class="home"><a href="<?php bloginfo('home'); ?>">Início</a></li>
| |
| 43 | <li class="login"><a href="#">Login</a></li> | |
| 44 | <li class="carrinho"> <div id="topnav" class="topnav">Carrinho de Compras: <a href="login" class="signin"><span> | |
| 45 | <?php | |
| 46 | if($_SESSION['pssimpleCart']) {
| |
| 47 | ||
| 48 | ||
| 49 | if ($_POST['delcart']) | |
| 50 | {
| |
| 51 | $products = $_SESSION['pssimpleCart']; | |
| 52 | foreach ($products as $key => $item) | |
| 53 | {
| |
| 54 | if ($item['name'] == $_POST['product']) | |
| 55 | unset($products[$key]); | |
| 56 | } | |
| 57 | } | |
| 58 | ||
| 59 | foreach ($_SESSION['pssimpleCart'] as $item) | |
| 60 | {
| |
| 61 | ||
| 62 | $total_items += $item['quantity']; | |
| 63 | } | |
| 64 | if($total_items > 0) {
| |
| 65 | echo $total_items; | |
| 66 | } else {
| |
| 67 | echo 0; | |
| 68 | } | |
| 69 | } else {
| |
| 70 | echo 0; | |
| 71 | } | |
| 72 | ?></span></a> </div> | |
| 73 | ||
| 74 | <fieldset id="signin_menu"> | |
| 75 | <?php | |
| 76 | $email = "[email protected]"; | |
| 77 | $count = 1; | |
| 78 | if($_SESSION['pssimpleCart']) {
| |
| 79 | $products = $_SESSION['pssimpleCart']; | |
| 80 | ||
| 81 | ||
| 82 | if (is_array($products)) | |
| 83 | {
| |
| 84 | foreach ($products as $key => $item) | |
| 85 | {
| |
| 86 | echo ' <div class="itemdrop"> | |
| 87 | <div class="titledrop">'.$item[quantity].' '.$item[name].'</div> | |
| 88 | <div class="excldrop"><form method="post" action=""> | |
| 89 | <input type="hidden" name="product" value="'.$item[name].'" /> | |
| 90 | <input type="hidden" name="delcart" value="1" /> | |
| 91 | <input type="submit" value="Deletar" title="Deletar"></form></div> | |
| 92 | ||
| 93 | </div>'; | |
| 94 | ||
| 95 | $total2 = $item['price'] * $item['quantity']; | |
| 96 | $total = $total2 + $total; | |
| 97 | $form .= " <input type=\"hidden\" name=\"item_descr_$count\" value=\"".$item['name']."\" /> | |
| 98 | ||
| 99 | <input type=\"hidden\" name=\"item_valor_$count\" value='".str_replace('.','',$item['price'])."' />
| |
| 100 | ||
| 101 | <input type=\"hidden\" name=\"item_quant_$count\" value=\"".$item['quantity']."\" /> | |
| 102 | ||
| 103 | <input type='hidden' name='item_id_$count' value='".$count."' />"; | |
| 104 | $form .= "<input type=\"hidden\" name=\"item_frete_$count\" value=\"0\" />"; | |
| 105 | ||
| 106 | $count++; | |
| 107 | } | |
| 108 | } | |
| 109 | - | } ?> |
| 109 | + | } else { ?>
|
| 110 | ||
| 111 | <div class="totaldrop"><b>Total:</b> R$ <?php echo $total; ?> (frete incluso)</div> | |
| 112 | ||
| 113 | ||
| 114 | <?php | |
| 115 | $output .= "<form action=\"https://pagseguro.uol.com.br/security/webpagamentos/webpagto.aspx\" method=\"post\">$form"; | |
| 116 | ||
| 117 | $output .= '<div class="finalizardrop"><input type="submit" name="submit" value="Realizar pagamento"></div>'; | |
| 118 | ||
| 119 | ||
| 120 | ||
| 121 | $output .= $urls.' | |
| 122 | ||
| 123 | <input type="hidden" name="email_cobranca" value="'.$email.'" /> | |
| 124 | ||
| 125 | <input type="hidden" name="tipo" value="CP"> | |
| 126 | ||
| 127 | <input type="hidden" name="moeda" value="BRL"> | |
| 128 | ||
| 129 | </form>'; | |
| 130 | echo $output; | |
| 131 | } | |
| 132 | ?> | |
| 133 | ||
| 134 | ||
| 135 | ||
| 136 | ||
| 137 | ||
| 138 | </fieldset></li> | |
| 139 | </ul> | |
| 140 | </div> | |
| 141 | ||
| 142 | </div> | |
| 143 | </div> | |
| 144 | ||
| 145 | ||
| 146 | <div class="container"> | |
| 147 | ||
| 148 | <div class="header"> | |
| 149 | ||
| 150 | <div class="logo"><a href="<?php bloginfo('home'); ?>"><img src="<?php bloginfo('template_directory'); ?>/css/imagens/logo.png"></a></div>
| |
| 151 | ||
| 152 | <div class="categorias"> | |
| 153 | <ul> | |
| 154 | <li><b>Categorias:</b> </li> | |
| 155 | <li><a href="#">Música</a></li> | |
| 156 | <li><a href="#">Filmes</a></li> | |
| 157 | <li><a href="#">Quadrinhos</a></li> | |
| 158 | <li><a href="#">Memes</a></li> | |
| 159 | <li><a href="#">Outras</a></li> | |
| 160 | </ul> | |
| 161 | </div> |