Advertisement
Guest User

Untitled

a guest
Feb 19th, 2019
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 16.22 KB | None | 0 0
  1. <?php
  2.  
  3. error_reporting(E_ALL);
  4. ini_set('display_errors', '1');
  5.  
  6. require_once('config.php');
  7.  
  8. //$domain = $_SERVER['HTTP_HOST'];
  9. $domain = 'tidalwaves.co.uk';
  10. if (substr($domain, 0, 4) == "www.") {
  11.     $domainwithwww = $domain;
  12. } else {
  13.     $domainwithwww = "www." . $domain;
  14. }
  15. $showhyphenbit = true;
  16. if (strpos($domain, "-") !== false) {
  17.     $showhyphenbit = false;
  18. }
  19. $domainwithoutwww = str_replace("www.", "", $domainwithwww);
  20.  
  21. if ($domainwithoutwww == $hostsite) {
  22.     $homedomain = true;
  23.     $titletag = "Premium Domain Names for sale | " . $hostsite;
  24.     $descriptiontag = "Call us on " . $hostphone . " to ask about domain names we have for sale or email us at sales@" . $hostsite;
  25.  
  26.     if (!isset($_SERVER['HTTPS']) || empty($_SERVER['HTTPS']) || $_SERVER['HTTPS'] == 'off') {
  27.         $redirect = 'https://www.' . $hostsite;
  28.         header('Location: ' . $redirect);
  29.         exit();
  30.     }
  31. } else {
  32.     $homedomain = false;
  33.     $titletag = $domainwithoutwww . " is for sale!";
  34.     $descriptiontag = "Call us on " . $hostphone . " to enquire about " . $domainwithoutwww . " or email us at sales@" . $hostsite;
  35. }
  36.  
  37. $mysqli = new mysqli($dbHost, $dbuser, $dbpassword, $dbName);
  38.  
  39. if ($mysqli->connect_errno) {
  40.     echo "Failed to connect to MySQL: (" . $mysqli->connect_errno . ") " . $mysqli->connect_error;
  41.     error_log('Failed to connect to MySQL: ' . $mysqli->connect_errno . ' - ' . $mysqli->connect_error . "\n");
  42. }
  43. $result = $mysqli->query("SELECT * FROM domains where domain like '%".$domainwithoutwww."%' LIMIT 1");
  44. if ($result) {
  45.     $row = mysqli_fetch_assoc($result);
  46.     $domainid = $row['id'];
  47.     $domaingross = $row['gross'];
  48.     $domainnote = $row['note'];
  49. }
  50.  
  51.  
  52. ?>
  53. <!DOCTYPE html>
  54. <html>
  55.  
  56. <head>
  57.   <meta charset='utf-8'>
  58.   <meta name='viewport' content='width=device-width, initial-scale=1'>
  59.   <title><?= $titletag ?></title>
  60.   <meta name="description" content="<?= $descriptiontag ?>">
  61.   <link rel='stylesheet' href='assets/css/bulma.min.css'>
  62.   <link rel='stylesheet' href='assets/css/styles.css'>
  63.   <!--script defer src='https://use.fontawesome.com/releases/v5.1.0/js/all.js'></script-->
  64. </head>
  65.  
  66. <body>
  67.  
  68.   <div class="loader-wrapper">
  69.     <div id="loader-image"></div>
  70. </div>
  71.  
  72. <section class='hero is-medium is-black'>
  73.   <div class='hero-body'>
  74.     <div class='container has-text-centered'>
  75.       <h1 class='top-title is-size-1-desktop is-size-4-touch'><?= $domainwithwww ?></h1>
  76.     </div>
  77.   </div>
  78. </section>
  79.  
  80. <?php if (!$homedomain) {
  81.     ?>
  82.     <div class="section">
  83.       <div class="container">
  84.         <div class="content">
  85.           <h3>Great News!</h3>
  86.           <p><?= $domain ?> is available to buy for &pound;<?= $domaingross ?></p>
  87.           <p>Secure this domain name now and get the perfect domain name for your business.</p>
  88.           <?php
  89.           if (strlen($domainnote) > 5) {
  90.               echo $domainnote;
  91.           } ?>
  92.           <p>It also stops anyone else from getting or using the name, even if you aren't ready to use it right now!</p>
  93.         </div>
  94.       </div>
  95.     </div>
  96.  
  97.     <section class='hero is-light'>
  98.       <div class='hero-body'>
  99.         <div class='container has-text-centered'>
  100.           <div class="content">
  101.             <h2 class="has-text-weight-bold">Reserve www.<?= $domainwithoutwww ?> now!</h2>
  102.             <a href="#faqs">Frequently asked questions</a>
  103.             &nbsp;|&nbsp;
  104.             <a href="https://www.<?= $hostsite ?>" target="_blank" title="more domains for sale">See more domains for sale</a>
  105.           </div>
  106.         </div>
  107.       </div>
  108.     </section>
  109.  
  110.     <div class="section">
  111.       <div class="container">
  112.         <div class="content">
  113.           <p>From this page, you will be able to make a &pound;25.00 payment - which will reserve the domain name for a period of 14 days.</p>
  114.           <p>Once we have received your deposit, we will withdraw the domain name from sale - and we will then send you an invoice for the balance of &pound;<?= $domaingross - 25  ?>.</p>
  115.           <p>Providing the balance is received within 14 days of the invoice date, then the domain name will be transferred to you through our domain registrar Dynadot.
  116.           To pay a &pound;25 non-refundable deposit to reserve <?= $domainwithoutwww ?>, please click the green button below.</p>
  117.         </div>
  118.       </div>
  119.     </div>
  120.  
  121.  
  122.     <section class='hero is-light'>
  123.       <div class='hero-body'>
  124.         <div class='container has-text-centered'>
  125.           <form action="https://www.paypal.com/cgi-bin/webscr" method="post">
  126.               <input type="hidden" name="business" value="<?= $paypalaccount ?>">
  127.               <input type="hidden" name="cmd" value="_xclick">
  128.               <input type="hidden" name="item_name" value="Non-refundable deposit to reserve <?= $domainwithoutwww ?> for 14 days - total payable <?= $domaingross ?>">
  129.               <input type="hidden" name="amount" value="25.00">
  130.               <input type="hidden" name="currency_code" value="GBP">
  131.               <button type="submit" class="button is-large is-success">Reserve this domain now!</button>
  132.           </form>
  133.         </div>
  134.       </div>
  135.     </section>
  136.  
  137.     <section class='hero'>
  138.       <div class='hero-body'>
  139.         <div class='container'>
  140.           <div class="content">
  141.             <p>Payments processed on our behalf by PayPal. Please be aware that there is a theoretical risk that two people can pay to reserve the same domain name at more or less the same time. In the very unlikely event that this happens, the domain name will be offered to the person that completes their payment earliest. Any other deposits for the same domain name will be refunded in full.</p>
  142.           </div>
  143.         </div>
  144.       </div>
  145.     </section>
  146.  
  147.     <section class='hero'>
  148.       <div class='hero-body'>
  149.         <div class='container'>
  150.           <div class="content has-text-centered">
  151.             <p><a target="_blank" class="button is-info is-large" href="https://www.<?= $hostsite ?>">See more domains for sale</a></p>
  152.           </div>
  153.         </div>
  154.       </div>
  155.     </section>
  156.  
  157.     <section class='hero'>
  158.       <div class='hero-body'>
  159.         <div class='container'>
  160.           <div class="content has-text-centered">
  161.             <h4>80% of UK internet users click on UK websites in search engine results!</h4>
  162.             <h4>UK People trust UK websites more!</h4>
  163.             <?php if ($showhyphenbit) { ?>
  164.             <h4>People generally don't like hyphens in website/email addresses!</h4>
  165.             <?php } ?>
  166.           </div>
  167.         </div>
  168.       </div>
  169.     </section>
  170.  
  171. <?php } else { ?>
  172.  
  173.   <div class="section">
  174.     <div class="container">
  175.       <div class="content">
  176.         <h2>Domain Names For Sale</h2>
  177.  
  178.           <div class="columns is-mutiline">
  179.  
  180.         <?php
  181.         $result = $mysqli->query("SELECT * FROM domains ORDER BY domain");
  182.         if ($result->num_rows > 0) {
  183.             while ($row = $result->fetch_assoc()) {
  184.         ?>
  185.               <div class="column is-4">
  186.                 <div class="contact-icon">
  187.                   <a href="http://www.<?= $row['domain'] ?>" target="_blank"><?= $row['domain'] ?></a>
  188.                 </div>
  189.               </div>
  190.  
  191.         <?php
  192.                 }
  193.             }
  194.         }
  195.         ?>
  196.  
  197.         </div>
  198.       </div>
  199.     </div>
  200.   </div>
  201.  
  202.   <div class="section">
  203.     <div class="container">
  204.       <div class="columns">
  205.  
  206.         <div class="column is-4">
  207.           <div class="card">
  208.             <div class="card-content has-text-centered">
  209.               <p class="title">Call our sales team</p>
  210.               <p class="subtitle is-size-6">8am to 8pm, 7 days/week</p>
  211.             </div>
  212.             <footer class="card-footer">
  213.               <p class="card-footer-item">
  214.                 <span><?= $mobilephone ?></span>
  215.               </p>
  216.             </footer>
  217.           </div>
  218.         </div>
  219.  
  220.         <div class="column is-4">
  221.           <div class="card">
  222.             <div class="card-content has-text-centered">
  223.               <p class="title">Leave us a message</p>
  224.               <p class="subtitle is-size-6">24 hours, 365 days/year</p>
  225.             </div>
  226.             <footer class="card-footer">
  227.               <p class="card-footer-item">
  228.                 <span><?= $hostphone ?></span>
  229.               </p>
  230.             </footer>
  231.           </div>
  232.         </div>
  233.  
  234.         <div class="column is-4">
  235.           <div class="card">
  236.             <div class="card-content has-text-centered">
  237.               <p class="title">Contact us by email</p>
  238.               <p class="subtitle is-size-6">We aim to reply within 1 business day</p>
  239.             </div>
  240.             <footer class="card-footer">
  241.               <p class="card-footer-item">
  242.                 <span>
  243.                   <a href="mailto:sales@<?= $hostsite ?>?subject=enquiry&nbsp;about&nbsp;<?= $domainwithoutwww ?>&nbsp;domain">sales@<?= $hostsite ?></a>
  244.                 </span>
  245.               </p>
  246.             </footer>
  247.           </div>
  248.         </div>
  249.  
  250.       </div>
  251.     </div>
  252.   </div>
  253.  
  254.  
  255.   <div id="faqs" class="section">
  256.     <div class="container">
  257.       <div class="content">
  258.         <h3>Frequently Asked Questions</h3>
  259.         <p><?= $domain ?> is available to buy for &pound;<?= $domaingross ?></p>
  260.         <p>Secure this domain name now and get the perfect domain name for your business.</p>
  261.         <?php
  262.         if (strlen($domainnote) > 5) {
  263.             echo $domainnote;
  264.         } ?>
  265.         <p>It also stops anyone else from getting or using the name, even if you aren't ready to use it right now!</p>
  266.       </div>
  267.     </div>
  268.   </div>
  269.  
  270.  
  271.  
  272. <!-- START HOME DOMAIN SHIT -->
  273. <?php
  274. if (!$homedomain) {
  275.     ?>
  276. <div class="full-width-section"><br><br><br>
  277. <h3 id="faqs">Frequently Asked Questions</h3>
  278. <div class="dt-sc-margin20"></div>
  279. <!-- **dt-sc-toggle-frame-set - Starts** -->
  280. <div class="dt-sc-toggle-frame-set">
  281.  
  282. <h5 class="dt-sc-toggle-accordion active" style="font-size:18px;"><a href="#">Is this an outright purchase of the domain name?</a></h5>
  283. <div class="dt-sc-toggle-content">
  284. <div class="block"><p style="font-size:16px;color: #000000">
  285. Yes, you are purchasing [from us] the right to use the <?= $domainwithoutwww ?> domain name, subject to the usual Nominet UK terms and conditions.<br><br>
  286. You will become responsible for the usual annual renewal fees, at the next renewal date.  The cost of these will be determined by your choice of registrar (eg Fasthosts, 123-Reg, GoDaddy etc).<br><br>
  287. We use Dynadot, who currently charge about &pound;6.50 per year - so their rate would apply if you keep the domain in an account with them.
  288. </p>
  289. </div>
  290. </div>
  291.  
  292.  
  293. <h5 class="dt-sc-toggle-accordion" style="font-size:18px;"><a href="#">How long does it take for me to get full control of the domain name?</a></h5>
  294. <div class="dt-sc-toggle-content">
  295. <div class="block"><p style="font-size:16px;color: #000000">
  296. The simplest and quickest way for us to transfer ownership to you, is for you to open an account with the same domain registrar that we use (<a href="https://www.dynadot.com/" target="_blank">Dynadot</a>).  Then,
  297. once we have received your payment we will 'push' the domain in to your account.  This only takes a few minutes.<br><br>
  298. If you prefer to transfer the domain name into your account with another registrar (eg Fasthosts, 123-Reg, GoDaddy etc) then this will require us to change the 'IPS Tag' for the domain.  There is no extra charge for us to do this, and we will explain what we need from you at the relevant time.  These kind of transfers usually complete within one day.
  299. </p>
  300. </div>
  301. </div>
  302.  
  303.  
  304. <h5 class="dt-sc-toggle-accordion " style="font-size:18px;"><a href="#">Will I have to pay you anything else after the purchase price?</a></h5>
  305. <div class="dt-sc-toggle-content">
  306. <div class="block"><p style="font-size:16px;color: #000000">
  307. No, providing the domain name is transferred either to your Dynadot account or another registrar of your choice (eg Fasthosts, 123-Reg, GoDaddy etc) then there will be nothing due to us after the initial sale.<br><br>
  308. In the unlikely event that you want us to maintain the domain name and/or hosting for you in the future, we will always provide you a quotation in advance for this.
  309. </p>
  310. </div>
  311. </div>
  312.  
  313. <h5 class="dt-sc-toggle-accordion " style="font-size:18px;"><a href="#">How much will it cost to renew the domain name at the next renewal?</a></h5>
  314. <div class="dt-sc-toggle-content">
  315. <div class="block"><p style="font-size:16px;color: #000000">
  316. This will depend upon your choice of domain registrar (eg Fasthosts, 123-Reg, GoDaddy etc).<br><br>
  317. Dynadot currently charge about &pound;6.50 per year, so their current fee will apply if you keep the domain in an account with them.  Otherwise if you have it transferred to another registrar, then their fees will apply at the relevant time.<br><br>
  318. Some registrars make you pay one year in advance at the time of transferring the domain to them.
  319. </p>
  320. </div>
  321. </div>
  322.  
  323. <h5 class="dt-sc-toggle-accordion " style="font-size:18px;"><a href="#">Do I have to start using the domain name straight away?</a></h5>
  324. <div class="dt-sc-toggle-content">
  325. <div class="block"><p style="font-size:16px;color: #000000">
  326. You can get the person that looks after your website to change it over to this domain name straight away if you want, but you don't have to.<br><br>
  327. If you prefer, we can forward all visitors to your current website, and all emails to your current email address - so you get the benefit of this premium domain name now, but without actually having to change anything!<br><br>
  328. </p>
  329. </div>
  330. </div>
  331.  
  332. <br><br><br><br><br><br><br><br>&nbsp;
  333. </div> <!-- **dt-sc-toggle-frame-set - Ends** -->
  334.  
  335. </div>
  336. <?php
  337. }
  338. ?>
  339. <!-- END HOME DOMAIN SHIT -->
  340.  
  341. <div class="dt-sc-hr-invisible-small"></div>
  342. <div class="full-width-section"><p style="text-align: center"><br><br><br><span style="font-size:14px;color: #000000"><br><br><?= $tradingname ?></span></p></div>
  343.                             </section>
  344.                         </div>
  345.                     </div>
  346.                 </div>
  347.             </div>
  348.         </div> <!-- **Main - Ends** -->
  349.  
  350.     </div><!-- **inner-wrapper - End** -->
  351. </div><!-- **Wrapper - End** -->
  352.  
  353.     <!-- **jQuery** -->
  354.     <script src="js/jquery-1.10.2.min.js" type="text/javascript"></script>
  355.     <script src="js/jquery-migrate.min.js"></script>
  356.  
  357.     <script src="js/preloader.js" type="text/javascript"></script>
  358.     <script src="js/pace.min.js" type="text/javascript"></script>
  359.  
  360.     <script src="js/jquery.tabs.min.js"></script>
  361.     <script src="js/jquery.tipTip.minified.js"></script>
  362.  
  363.     <script src="js/jquery-easing-1.3.js" type="text/javascript"></script>
  364.  
  365.     <script src="js/jquery.parallax-1.1.3.js" type="text/javascript"></script>
  366.  
  367.     <script src="js/jquery.carouFredSel-6.2.1-packed.js" type="text/javascript"></script>
  368.  
  369.     <script src="js/jquery.inview.js" type="text/javascript"></script>
  370.  
  371.     <script src="js/jquery.bxslider.min.js" type="text/javascript"></script>
  372.  
  373.     <script src="js/jquery.nav.js" type="text/javascript"></script>
  374.  
  375.     <script src="js/jquery.donutchart.js" type="text/javascript"></script>
  376.  
  377.     <script src="js/jquery.jcarousel.min.js" type="text/javascript"></script>
  378.  
  379.     <script src="js/jquery.isotope.min.js" type="text/javascript"></script>
  380.     <script src="js/jquery.prettyPhoto.js" type="text/javascript"></script>
  381.  
  382.     <script src="js/masonry.pkgd.min.js" type="text/javascript"></script>
  383.  
  384.     <script src="js/jquery.smartresize.js" type="text/javascript"></script>
  385.  
  386.     <script src="js/responsive-nav.js" type="text/javascript"></script>
  387.     <script src="js/jquery.meanmenu.min.js" type="text/javascript"></script>
  388.  
  389.     <!-- **Sticky Nav** -->
  390.     <script src="js/jquery.sticky.js" type="text/javascript"></script>
  391.  
  392.     <!-- **To Top** -->
  393.     <script src="js/jquery.ui.totop.min.js" type="text/javascript"></script>
  394.  
  395.     <script type="text/javascript" src="js/twitter/jquery.tweet.min.js"></script>
  396.  
  397.     <script src="js/jquery.viewport.js" type="text/javascript"></script>
  398.  
  399.     <script type="text/javascript" src="js/jquery.validate.min.js"></script>
  400.  
  401.     <script src="js/retina.js" type="text/javascript"></script>
  402.  
  403.     <script src="js/jquery.nicescroll.min.js" type="text/javascript"></script>
  404.  
  405.     <script src="js/custom.js" type="text/javascript"></script>
  406.  
  407. </body>
  408. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement