Доработать функционал
Здравствуйте! Есть страница просмотра сайтов. При просмотре сайта, пользователю добавляется +1 просмотр, за который его сайт также просмотрят. При первом просмотре появляется страница с капчей, далее рандомно. Можно сделать так, чтобы при разгадывании капчи пользователю прибавлялось скажем +2 просмотра. файлы PHP скину.
|
Sonya,
скидывай |
Есть файл main.php
<input type="hidden" id="hidstartpag" name="hidstartpag" value="<?php echo isset($hidstartpag) ? $hidstartpag : ''; ?>" /> <input type="hidden" id="hidsort" value="<?php echo isset($sort) ? $sort : ''; ?>" /> <table style="margin-top: 15px" border="0" width="100%"> <tr> <td align="left" style="padding-top: 4px"><div id="linkslot_137944"><script src="https://linkslot.ru/bancode.php?id=137944" async></script></div></td> <td align="center" style="padding-top: 0px"><h1 class="text-center">Личный кабинет<br /><small>Просмотр сайтов</small></h1></td> <td align="right" style="padding-top: 4px"><div id="linkslot_137945"><script src="https://linkslot.ru/bancode.php?id=137945" async></script></div></td> </tr> </table> <hr style="margin-top: 5px" size="1"> <ul class="nav nav-tabs"> <li class="active"><a href="#">Просмотр сайтов</a></li> <li><a href="/мои-сайты">Мои сайты</a></li> <li><a href="/мои-рефералы">Мои рефералы</a></li> <li><a href="/биржа-просмотров">Биржа просмотров</a></li> <li><a href="/передача-просмотров">Передать просмотры</a></li> <li><a href="/служба-поддержки">Служба поддержки</a></li> <?php //<li><a href="/vip"><strong style="color: red;letter-spacing: 2px;"><i class="fa fa-line-chart"></i>VIP</strong></a></li> ?> </ul> <div class="text-warning" style="text-align: center;font-weight: bold; font-size: 16px; padding: 25px;">Ваш баланс: <span data-balans=""><?php echo $GLOBALS['user_login']->data['Many']; ?></span></div> <div style="text-align: center; font-weight: bold;"> Просматривайте другие сайты. За каждый сайт +1 к вашему балансу.<br /> Просмотры можно потратить на странице <a href="/мои-сайты">"Мои сайты"</a><br /> <span class="text-danger">Просматривайте сайт не менее <?php echo $GLOBALS['setting']->url->time; ?> секунд!</span> </div> <div align="center"> <table border="0" width="100%"> <tr> <td><div id="linkslot_137782"><script src="https://linkslot.ru/bancode.php?id=137782" async></script></div></td> <td align="center" valign="top"> <div class="pcolredhid alert alert-danger" style="text-align: center; margin-bottom: 5px;display: none;"><strong>Просмотр НЕ засчитан!</strong><br /> Просматривайте сайт не менее <?php echo $GLOBALS['setting']->url->time; ?> секунд!</div> <?php if(!empty($_SESSION['p']['Url'])) { ?> <div class="link" id="addsite"> <a class="active" onclick="return go(this);" target="_blank" href="/просмотр">Просмотр сайта №1</a> </div> <?php } else echo '<p class="alert alert-danger" style="text-align:center;"><strong>Сайты для просмотра закончились, зайдите позже.</strong></p>' ?> <input type="hidden" id="hid_ca" value="<?php echo $GLOBALS['user_login']->data['Captcha']; ?>" /> <!--includeFuter--> <script type="text/javascript"> var a = 0; var timerId; var coun = 2; var sec = 0; function go(e) { $('.pcolredhid').hide(); $ca = parseInt($('#hid_ca').val()); if($ca == 5){ document.location.href = "/просмотр?cpt=1"; return false; } var $e = $(e); if(!$e.hasClass('active')) return false; document.title="Загрузка..."; sec = <?php echo $GLOBALS['setting']->url->time; ?>; timerId = setTimeout( function tick() { document.title = sec + " сек..."; if(!sec){ clearTimeout(timerId); document.title="Загрузка..."; $.getJSON('aj/prosmotr',function(d){ var t = parseInt(d.res); if(t === 1){ document.title = "Просмотр засчитан!"; $e.removeClass('active'); $e.wrap('<del></del>'); $('#addsite').append('<a rel="noreferrer" onclick="return go(this);" class="active" target="_blank" href="/просмотр">Просмотр сайта №'+coun+'</a>'); if($('#addsite del').length > 10) $("#addsite del").remove(); coun++; $('[data-balans]').html(parseInt($('[data-balans]').html())+1); $('#hid_ca').val(d.ca); } else if(t === 2){ document.title = "Просмотр засчитан!"; $('[data-balans]').html(parseInt($('[data-balans]').html())+1); $('#addsite').html('<p class="alert alert-danger" style="text-align:center;"><strong>Сайты для просмотра закончились, зайдите позже.</strong></p>'); } else document.title = "Просмотр не засчитан!"; }); } else{ sec--; timerId = setTimeout(tick, 800); } }, 900 ); return true; } $(document).ready(function () { $(window).focus(function() { if(timerId){ if(sec) {$('.pcolredhid').show();} clearTimeout(timerId); document.title = "<?php echo $GLOBALS['setting']->main->organization; ?>"; } }) }); </script> <!--/includeFuter--> </td> <td align="right"><div id="linkslot_137783"><script src="https://linkslot.ru/bancode.php?id=137783" async></script></td> </tr> </table></div> Есть файл captcha.php <!DOCTYPE html> <html> <head> <title>Код безопасности</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <script src='https://www.google.com/recaptcha/api.js'></script> <style type="text/css"> .btn-danger { color: #fff; background-color: #d9534f; border-color: #d43f3a; } .btn {display: inline-block;margin-bottom: 0;font-weight: normal; text-align: center;vertical-align: middle;-ms-touch-action: manipulation;touch-action: manipulation;cursor: pointer; background-image: none; border: 1px solid transparent;white-space: nowrap; padding: 6px 12px;font-size: 14px;line-height: 1.42857143;border-radius: 4px; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none;user-select: none;} </style> <style> button { border: 0 none; cursor: pointer; outline: none; padding: 0; } </style> </head> <body> <form method="post" style="text-align: center;"> <div align="center"> <table border="0" width="100%" height="100%"> <tr> <td align="center" height="240"> <div style="display: inline-block;"> <h2><font face="Arial" color="#000080">Код безопасности</font></h2> <div class="g-recaptcha" data-sitekey="<?php echo $GLOBALS['setting']->captcha->publickey; ?>"></div> <div style="padding: 15px;"> <input type="submit" value="Продолжить" class="btn-danger btn" name="captcha" /> </div> </div> </td> </tr> <tr> <td align="center" valign="middle"> <table border="0" width="100%"> <tr> <td align="center" valign="bottom"> <img border="0" src="http://freetraf.pw/assets/images/men.jpg" width="208" height="342"></td> <td align="center" width="730"> <table border="0" width="728"> <tr> <td align="center" width="728" height="90"> <button type="submit" onclick="window.open('http://livesurf.ru/promo/239857')" name="captcha"> <img border="0" src="https://livesurf.ru/faners/720-90-1.jpg" width="728" height="90"></button> </td> </tr> <tr> <td align="center" width="728" height="90"> <button type="submit" onclick="window.open('https://kaleostra.com/reg60776')" name="captcha"> <img border="0" src='https://kaleostra.com/images/promo/728x90.gif'></button> </td> </tr> <tr> <td align="center" width="728" height="90"> <div id="linkslot_130264"><script src="https://linkslot.ru/bancode.php?id=130264" async></script></div> </td> </tr> <tr> <td align="center" width="728" height="90"> <div id="linkslot_130265"><script src="https://linkslot.ru/bancode.php?id=130265" async></script></div></td> </tr> </table> </td> <td align="center" valign="bottom"> <img border="0" src="http://freetraf.pw/assets/images/b-women.jpg" width="208" height="342"></td> </tr> </table> </td> </tr> </table> </div> </form> </body> </html> |
При просмотре сайта, пользователю добавляется +1 просмотр, за который его сайт также просмотрят. При первом просмотре появляется страница с капчей, далее рандомно. Можно сделать так, чтобы при разгадывании капчи пользователю прибавлялось скажем +2 просмотра.
|
Контакты в подписе, пишите.
|
Часовой пояс GMT +3, время: 18:02. |