BVB Source Codes

Mobile - shop. Tk all source code Show addlink.php Source code

Return Download Mobile - shop. Tk all source code: download addlink.php Source code - Download Mobile - shop. Tk all source code Source code - Type:.php
  1. <!--
  2. /*======================================================================*\
  3. || #################################################################### ||
  4. || # mobile-shop.tk                                                   # ||
  5. || # ---------------------------------------------------------------- # ||
  6. || # Copyright ?009-2010 Www.aspdb. Cn   -   All Rights Reserved.    # ||
  7. || # This file may not be redistributed in whole or significant part. # ||
  8. || # ----------------   THIS  IS NOT FREE SOFTWARE   ---------------- # ||
  9. || #          http://mobile-shop.tk |  http://bbs.urladmin.cn         # ||
  10. || #################################################################### ||
  11. \*======================================================================*/
  12.  -->
  13. <?php /* Big Fat Ringtone Shop created by Mobile Shop    http://www.mobile-shop.tk */ ?>
  14.  
  15. <?php
  16.  
  17. require_once("linksheader.txt");
  18.  
  19. if (empty($_REQUEST['name'])) {myerror("Please enter your name!");} else {$name=htmlspecialchars("$_REQUEST[name]");}
  20. if (empty($_REQUEST['email'])) {myerror("Please enter your email address!");} else {$email=htmlspecialchars("$_REQUEST[email]");}
  21. if (!preg_match("/([\w\-]+\@[\w\-]+\.[\w\-]+)/",$email)) {myerror("Please enter a valid email address!");}
  22. if (empty($_REQUEST['title'])) {myerror("Please enter the title (name) of your website!");} else {$title=htmlspecialchars("$_REQUEST[title]");}
  23.  
  24. if (empty($_REQUEST['url'])) {myerror("Please enter the url of your website!");} else {$url=rtrim(htmlspecialchars("$_REQUEST[url]"));}
  25. if (!(preg_match("/(http:\/\/+[\w\-]+\.[\w\-]+)/i",$url))) {myerror("The site URL is not valid!");}
  26. if (empty($_REQUEST['recurl']) || $_REQUEST['recurl']=="http://") {myerror("Please enter the url where a reciprocal link to our site is placed!");} else {$recurl=rtrim(htmlspecialchars("$_REQUEST[recurl]"));}
  27. if (!(preg_match("/(http:\/\/+[\w\-]+\.[\w\-]+)/i",$recurl))) {myerror("The reciprocal page URL is not valid!");}
  28.  
  29. preg_match("/^(http:\/\/)?([^\/]+)/i",$url, $matches);
  30. preg_match("/^(http:\/\/)?([^\/]+)/i",$recurl, $recmatches);
  31. if ($matches[2] != $recmatches[2]) {myerror("The reciprocal link must be placed under the same (sub)domain as your link is!");}
  32.  
  33. if (empty($_REQUEST['description'])) {myerror("Please enter description of your site!");} else {$description=htmlspecialchars("$_REQUEST[description]");}
  34. if(strlen($description)>200) {myerror("Description is too long! Description of your website is limited to 200 chars.");}
  35.  
  36. $site_url2 = preg_replace("/\//","\\\/",$settings['site_url']);
  37. $found=0;
  38. $remote = @fopen($recurl, "r") or myerror("Can't open remote URL!");
  39. while ($html = fread($remote,1024)) {
  40.         if (preg_match("/$site_url2/i",$html)) {$found=1; break;}
  41. }
  42.  
  43. if ($found != 1) {myerror("Our URL  <a href=\"$settings[site_url]\">$settings[site_url]</a> wasn't found on your reciprocal links page <a href=\"$recurl\">$recurl</a><br><br>
  44. Please make sure you place <a href=\"$settings[site_url]\">$settings[site_url]</a> on your page before adding your link!<br><br>We DID tell you this!");}
  45.  
  46. if($settings['system'] == 2) {$newline="\r\n";}
  47. elseif($settings['system'] == 3) {$newline="\r";}
  48. else {$newline="\n";}
  49.  
  50. $fp = fopen($settings['linkfile'],"rb") or die("Can't open the link file ($settings[linkfile]) for reading!");
  51. $content=@fread($fp,filesize($settings['linkfile']));
  52. fclose($fp);
  53. $content = trim(chop($content));
  54. $lines = explode($newline,$content);
  55. if (count($lines)>$settings['max_links']) {myerror("We are not accepting any more links at the moment. We apologize for the inconvenience!");}
  56.  
  57. $replacement = "$name$settings[delimiter]$email$settings[delimiter]$title$settings[delimiter]$url$settings[delimiter]$recurl$settings[delimiter]$description$newline";
  58.  
  59. if ($settings['add_to'] == 0) {
  60.     $fp = fopen($settings['linkfile'],"rb");
  61.         $links = @fread($fp,filesize($settings['linkfile']));
  62.         fclose($fp);
  63.  
  64.         $replacement .= $links;
  65.  
  66.     $fp = fopen($settings['linkfile'],"wb") or myerror("Couldn't open links file for writing! Please CHMOD linkinfo.txt to 666 (rw-rw-rw)!");
  67.         fputs($fp,$replacement);
  68.         fclose($fp);
  69.         }
  70. else {
  71.     $fp = fopen($settings['linkfile'],"ab") or myerror("Couldn't open links file for appending! Please CHMOD linkinfo.txt to 666 (rw-rw-rw)!");
  72.         fputs($fp,$replacement);
  73.         fclose($fp);
  74.     }
  75.  
  76. if($settings['notify'] == 1) {
  77. $message="Hello,
  78.  
  79. Someone just added a new link to your links page on $settings[site_url]
  80.  
  81. Link details:
  82.  
  83. Name: $name
  84. E-mail: $email
  85. URL: $url
  86. Reciprocal link: $recurl
  87. Title: $title
  88. Description:
  89. $description";
  90. $headers = "From: $name <$email>\n";
  91. $headers .= "Reply-To: $name <$email>\n\n";
  92. mail("$settings[admin_email]","New link submitted",$message,$headers);
  93. }
  94.  
  95. ?>
  96. <span style=font-size:12>
  97. <p align="center"><b>Your link has been added!</b></p>
  98. <p>&nbsp;</p>
  99. <p align="center"><a href="links.php">Click here to see your link</a><br>(try refreshing our links page if you don't see your link on it)</p>
  100. <p align="center"><a href="<?php echo("$settings[site_url]"); ?>">Back to the main page</a></p><p>&nbsp;</p><p>
  101. <?
  102. require_once("linksfooter.txt");
  103. exit();
  104. ?>
downloadaddlink.php Source code - Download Mobile - shop. Tk all source code Source code
Related Source Codes/Software:
ETsale simple product sales management system V3.0 formal version - ETsale3.0 is developed by PHP+MySQL+Smarty+jQuery ... 2016-09-21
Copy the site source code v2.01 - It is ok to cover the folder % S 2016-09-21
126oo CMS film station system - This procedure ASP + ACC/ASP + SQL, using new kern... 2016-09-21
Seven VIP jubilee dance CMS management system - The Admin \ Inc \ Mold_Inc Asp 2016-09-21
PHPCMS Trojan scanner v1.0 - Please put the package in the scan folder uploaded... 2016-09-22
Chongqing sea Sogou V1.2 Rank query tools - Welcome to chongqing sea Sogou Rank query tool, th... 2016-09-22
Chongqing sea V1.2 phone number belongs to query tools - Welcome to use cell phone number belongs to chongq... 2016-09-22
Chongqing area name and IP query tools baidu version V1.3 - Welcome to chongqing area name and IP query tools ... 2016-09-22
Flash inverse literary fiction serial module v1.1 formal version - Please use, please install DEDECMS V5.5 to be GBK ... 2016-09-22
CRYENGINE - CRYENGINE is a powerful real-time game development... 2017-06-11
postal - 2017-06-11
reactide - Reactide is the first dedicated IDE for React web ... 2017-06-11
rkt - rkt is a pod-native container engine for Linux. It... 2017-06-11
uWebSockets - Tiny WebSockets https://for... 2017-06-11
realworld - TodoMVC for the RealWorld - Exemplary fullstack Me... 2017-06-11
goreplay - GoReplay is an open-source tool for capturing and ... 2017-06-10
pyenv - Simple Python version management 2017-06-10
redux-saga - An alternative side effect model for Redux apps ... 2017-06-10
angular-starter - 2017-06-10

 Back to top