Advertisement
Guest User

Untitled

a guest
Oct 13th, 2015
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 7.06 KB | None | 0 0
  1. <?php
  2.  
  3.     include 'session.php';
  4.     //include 'config.php';
  5.     $servername = "mysql.2ap.pl";
  6.                         $username = "SopCastHD_baza1";
  7.                         $password = "lubiePlacki1-";
  8.                         $dbname = "SopCastHD_baza1";
  9.     $connmysqli = new mysqli($servername,  $username, $password, $dbname);
  10. $id = 77465;
  11. $code = "ZCU3";
  12. $type = "c1,sms";
  13. $del=1;  
  14. $check = $_POST['check'];
  15.  
  16.  
  17. if($check != NULL)
  18.   {
  19.  
  20.     $handle = fopen("http://dotpay.pl/check_code.php?&check=".$check."&id=".$id."&code=".$code."&type=".$type."&del=".$del, 'r');
  21.     $status = fgets($handle, 8);
  22.     $czas_zycia = fgets($handle, 24);
  23.     fclose($handle);
  24.  
  25.     if (isset($_SESSION['user'])!="") {
  26.    
  27.     } else {
  28.             header("Location: index.php?error=9");
  29.     }  
  30.  
  31.     if ($status == 0) {
  32.             header("Location: index.php?error=8");
  33.     }  
  34.     else
  35.     {
  36.         $sqldate = "SELECT * FROM accounts WHERE id = " . $_SESSION['user'];
  37.         $connmysqli->set_charset("utf8");
  38.         $resultdate = $connmysqli->query($sqldate);
  39. while($rowdate = $resultdate->fetch_assoc()) {
  40.  
  41.     $Today = date('Y-m-d');
  42.     $Today2 = date('Y-m-d');
  43.     $baza = date('Y-m-d', strtotime($rowdate["validity"]));
  44.     if ($baza < $Today) {
  45.         $date = $Today;
  46.         $date =  date('Y-m-d', strtotime($date . ' +3 day'));
  47.         header("Location: index.php?success=6");
  48.     } else {
  49.         $date = $baza;
  50.         $date =  date('Y-m-d', strtotime($date . ' +3 day'));
  51.         header("Location: index.php?success=6");
  52.     }
  53. }
  54.                         $servernamesms = "mysql.2ap.pl";
  55.                         $usernamesms = "SopCastHD_baza1";
  56.                         $passwordsms = "lubiePlacki1-";
  57.                         $dbnamesms = "SopCastHD_baza1";
  58.                         $connsms = $connmysqli;
  59.                         $sqlsms = "UPDATE accounts SET validity='" . $date . "'  WHERE id = " . $_SESSION['user'];
  60.                         $resultsms = $connsms->query($sqlsms);
  61.     }
  62. }
  63.  
  64. ?>
  65. <!DOCTYPE html>
  66. <html>
  67.     <head>
  68.         <title>SopCastHD - Transmisje meczów w HD</title>
  69.         <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  70.         <link rel="stylesheet" type="text/css" href="style.css">
  71.         <link rel="stylesheet" type="text/css" href="animate.css">
  72.         <link rel="Shortcut icon" href="images/icon.ico" />
  73.         <link href='http://fonts.googleapis.com/css?family=Open+Sans:600' rel='stylesheet' type='text/css'>
  74.         <link href='http://fonts.googleapis.com/css?family=PT+Sans:700' rel='stylesheet' type='text/css'>
  75.         <link href='http://fonts.googleapis.com/css?family=Roboto' rel='stylesheet' type='text/css'>
  76.         <link href='http://fonts.googleapis.com/css?family=Roboto+Condensed' rel='stylesheet' type='text/css'>
  77.         <script src="http://code.jquery.com/jquery-latest.min.js"
  78.         type="text/javascript"></script>
  79.         <script src="http://jquery-ui.googlecode.com/svn/tags/latest/ui/jquery.effects.core.js"></script>
  80.         <script src="http://jquery-ui.googlecode.com/svn/tags/latest/ui/jquery.effects.slide.js"></script>
  81.         <script src="/assets/js/libs/jquery.js"></script>
  82. <script type="text/javascript">
  83. $(document).ready(function() {
  84. var monthNames = [ "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December" ];
  85. var dayNames= ["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]
  86.  
  87. var newDate = new Date();
  88. newDate.setDate(newDate.getDate());  
  89. $('#Date').html(dayNames[newDate.getDay()] + " " + newDate.getDate() + ' ' + monthNames[newDate.getMonth()] + ' ' + newDate.getFullYear());
  90.  
  91. setInterval( function() {
  92.     var seconds = new Date().getSeconds();
  93.     $("#sec").html(( seconds < 10 ? "0" : "" ) + seconds);
  94.     },1000);
  95.    
  96. setInterval( function() {
  97.     var minutes = new Date().getMinutes();
  98.     $("#min").html(( minutes < 10 ? "0" : "" ) + minutes);
  99.     },1000);
  100.    
  101. setInterval( function() {
  102.     var hours = new Date().getHours();
  103.     $("#hours").html(( hours < 10 ? "0" : "" ) + hours);
  104.     }, 1000);
  105.    
  106. });
  107. </script>
  108.         <script src="/assets/js/flipclock/flipclock.min.js"></script>
  109.         <script>
  110.             $(document).ready(function(){
  111.                 jQuery.fn.extend({
  112.                   slideRightShow: function() {
  113.                     return this.each(function() {
  114.                         $(this).show('slide', {direction: 'right'}, 500);
  115.                     });
  116.                   },
  117.                   slideLeftHide: function() {
  118.                     return this.each(function() {
  119.                       $(this).hide('slide', {direction: 'left'}, 500);
  120.                     });
  121.                   },
  122.                   slideRightHide: function() {
  123.                     return this.each(function() {
  124.                       $(this).hide('slide', {direction: 'right'}, 500);
  125.                     });
  126.                   },
  127.                   slideLeftShow: function() {
  128.                     return this.each(function() {
  129.                       $(this).show('slide', {direction: 'left'}, 500);
  130.                     });
  131.                   }
  132.                 });
  133.                 var showHide = "visible"
  134.                 var matches = "visible"
  135.                 var matches2 = "visible"
  136.                 $('#leftSideHide').on('click', function(e){
  137.                     if (showHide == "visible") {
  138.                         showHide = "hidden";
  139.                         $("#leftSide").toggle();
  140.                         $("#leftSideHide").toggleClass('leftSideShow')
  141.                         $("#hideText").toggleClass('showText')
  142.                         $(".arrow").removeClass( "normal" ).addClass( "flip-horizontal" );
  143.                         $("#rightSide").css( "width", "100%" );
  144.                         $("#rightSide").css( "margin-left", "0%" );
  145.                     }
  146.                     else if(showHide == "hidden") {
  147.                         showHide = "visible";
  148.                         $("#leftSide").toggle();
  149.                         $("#leftSideHide").toggleClass('leftSideShow')
  150.                         $("#hideText").toggleClass('showText')
  151.                         $(".arrow").removeClass( "flip-horizontal" ).addClass( "normal" );
  152.                         $("#rightSide").css( "width", "75%" );
  153.                         $("#rightSide").css( "margin-left", "25%" );
  154.                     }
  155.                 });
  156.                 $('#hideMatches').on('click', function(e){
  157.                     if (matches == "visible") {
  158.                         matches = "hidden";
  159.                         $("#matchesOnly").slideUp();
  160.                         $("#hideMatchesIMG").addClass( "normal" ).removeClass( "flip-vertical" );
  161.                     }
  162.                     else if(matches == "hidden") {
  163.                         matches = "visible";
  164.                         $("#matchesOnly").slideDown();
  165.                         $("#hideMatchesIMG").addClass( "flip-vertical" ).removeClass( "normal" );
  166.                     }
  167.                 });    
  168.                 $('#hideMatches2').on('click', function(e){
  169.                     if (matches2 == "visible") {
  170.                         matches2 = "hidden";
  171.                         $("#matchesOnly2").slideUp();
  172.                         $("#hideMatchesIMG2").addClass( "normal" ).removeClass( "flip-vertical" );
  173.                         $("#secondCategory").css( "border-bottom-left-radius", "5px");
  174.                         $("#secondCategory").css( "border-bottom-right-radius", "5px");
  175.                     }
  176.                     else if(matches2 == "hidden") {
  177.                         matches2 = "visible";
  178.                         $("#matchesOnly2").slideDown();
  179.                         $("#hideMatchesIMG2").addClass( "flip-vertical" ).removeClass( "normal" );
  180.                         $("#secondCategory").css( "border-bottom-left-radius", "0px");
  181.                         $("#secondCategory").css( "border-bottom-right-radius", "0px");
  182.                     }
  183.                 });    
  184.                 });
  185.         </script>
  186.     </head>
  187.     <body>
  188.         <div class="side" id="leftSide">
  189.             <?php
  190.                 include 'connection.php';
  191.                 $conn = $connmysqli;
  192.                 include 'left_menu.php';
  193.                 echo '</div><div class="side" id="rightSide">';
  194.                
  195.                 include 'header.php';
  196.                
  197.                 echo '<div class="mainContent">';
  198.                
  199.                 include 'main_menu.php';
  200.                
  201.                 echo '<div id="rightSideContent" class="clearfix">';
  202.  
  203.                 include 'error.php';
  204.                 include 'premium_offer.php';
  205.                 include 'right_menu.php';
  206.  
  207.                 echo '</div></div>';
  208.  
  209.                 echo '</div>';
  210.                 include 'footer.php';
  211.             ?>
  212.     </body>
  213. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement