Text Form

Started on the old forum in May 2018 · view the original in the archive · old links redirect here

3 replies · 114 views · started 8 years ago · 1 min read

3 participants
omshankar Junior · 17 posts #1

I want to add text in Link Protector. I want to add "paste text form" in script link protector. I have created 2nd form with the name title2, submit2, information2 but how to add option for the text? In this script it has paste link option. It means If I paste link in the box it creates a protected url in which my pasted links stored. but I want to add 2nd option in which I can paste normal text. Here is the index.php in In which I have added menu main1, here I want to add text option.

Attachments: index.php
subzero Super moderator Fellow · 3,954 posts #2

Mysql if you added a other row of text you can copy the code from other one change it target your new row ..

 
 <form> First name: <input type="text" name="firstName" value="<?php echo $firstname; ?>" /><br /> Last name: <input type="text" name="lastName" value="<?php echo $lastname; ?>" /><br /> <input type="submit" value="Submit" /> </form>  
 First, connect to the database.    $link = mysql_connect('localhost', 'mysql_user', 'mysql_password'); if (!$link) {     die('Could not connect: ' . mysql_error()); } 

Then query the database with an SQL query. ​​​​​​​

 $result = mysql_query($query); ​​​​​​​

Then pull out the individual data items and echo them where you need.

  while ($row = mysql_fetch_assoc($result)) { echo $row['firstname']; echo $row['lastname']; echo $row['address']; echo $row['age'];    }  

Visit: Chat4u.mobi - The New Lay Of being a site of your dreams! Visit: WapMasterz Coming Back Soon!


SCRIPTS FOR SALE BY SUBZERO Chat4u Script : coding-talk.com/f28/chat4u-mobi-script-only-150-a-17677/ - > Best Script for your site no other can be hacked by sql or uploaders. FileShare Script : coding-talk.com/f28/file-wap-share-6596/ -> Uploader you will never regret buying yeah it mite be old now but it still seems to own others... _______…

omshankar Junior · 17 posts #3

There is no mysql in this script. It is link protector script. It has only index.php. It stores .dlp file after submitting a link. You may check It has two option one for link pasting and one for text pasting.

something else Fellow · 2,296 posts #4
<?php

include('header.php');
if ($_POST['submit'] != "") {
    $title      = $_POST['title'];
    $postedinfo = $_POST['information'];
    $textToggle =  isset($_POST['text']) ? 1 : 0;
    if($textToggle==0)
    {
        if (!strpos($postedinfo, "://"))
            $postedinfo = "http://" . $postedinfo;
    }
    $postedtitle = $_POST['title'];

    $postedtitle = str_replace("'", '', "$postedtitle");
    $postedtitle = str_replace("&", '', "$postedtitle");
    $postedtitle = str_replace("|", '%20', "$postedtitle");
    $postedtitle = stripslashes("$postedtitle");
    $radiotop20  = $_POST['R1'];
    $radiopass   = $_POST['R2'];
    $userip      = $_SERVER['REMOTE_ADDR'];
    $todaydate   = getdate();
    if ($postedinfo == "" or $postedtitle == "") {
        echo "<div class=\"error\"><img src=\"./img/error.png\">Please fill in all the fields below:</div>";
    } else {
        $fancyurl = rand(0, 999) . $title;
        $rand2    = ("$fancyurl");
        $filename = "./files/" . $rand2 . ".dlp";
        if (file_exists($filename)) {
            die("An unusual error occured. Please navigate BACK using your browser and re-submit your links again.");
        } else {
            $filelist   = fopen("./files/" . $rand2 . ".dlp", "w");
            $fileconfig = fopen("./config/" . $rand2 . ".dlp", "w");

            if ($radiopass == "V3") {
                $radiopass = "Yes";
            } else {
                $radiopass = "No";
            }
            $time = time();
            fwrite($filelist, $postedinfo . "\n");
            fwrite($fileconfig, $time . "|" . $radiopass . "|" . md5($_POST['pass']) . "|" . $userip . "|0" . "|" . $textToggle);
            $me = $shorturl;
            if ($me == true)
                $short = "";
            else
                $short = "index.php?ID=";

?>
<div class="success"><img src="./img/success.png">Your new URL is <a href="<?
            echo $scripturl . $short . $rand2;
?>"><?
            echo $scripturl . $short . $rand2;
?></a></div>
<?
        }
    }
}
if ($_GET['ID'] == "") {
    if (isset($_POST['submit'])) {
    } else {
?>

<!--<center><div class="notice"><img src="./img/note.png"><?php
        echo $sitetitle;
?> is a free service, that allows you to protect your link(s) and prevents any of your link(s) from being found/indexed from search engine spiders.</div></center>-->
<?php
    }
?>
<ul class="nav nav-tabs">
  <li class="col-xs-4 active"><a data-toggle="tab" href="#home" class="btn btn-info">Paste Link</a></li>
  <li class="col-xs-4"><a data-toggle="tab" href="#menu1" class="btn btn-info">Plain Text</a></li>
</ul>
<div class="tab-content">
  <div id="home" class="tab-pane fade in active">
<FORM ACTION="<?= $PHP_SELF ?>" METHOD="POST" NAME="newsentry">
<fieldset> 
<p align="center">
<div class="col-sm-10 col-sm-offset-1">
<b><label>Title:</label></b>
<input type="title" name="title" size="20" class="form-control">
</p></p>
<p align="center"><br>
<div class="col-sm-10 col-sm-offset-1">
<b><label>Links</label></b><br>
<TEXTAREA NAME="information" COLS="40" ROWS="5" class="form-control"></TEXTAREA><br>
<div id="email">
      <p align="center"><label><b>Password</b><br>
        </label>
      <input name="pass" type="password" size="20" class="form-control" />
    </div>
<!--<p align="center">
<BR>Password Protected Links?* Yes <input onclick="javascript: $('#email').show('slow');" type="radio" name="R2" value="V3" />  No
<input onclick="javascript: $('#email').hide('slow');" type="radio" name="R2" value="V4" checked /><br>-->
<br>
<p align="center">
    <div class="col-sm-10 col-sm-offset-1">
<INPUT TYPE="submit" NAME="submit" VALUE="Protecte Me!" class="btn btn-lg btn-success"><BR>
</p>
</fieldset> 
<label><br />*If a password isn't inputted, a captcha will be displayed before showing the 
links to prevent the links from being spidered.<BR></label>
</p></FORM></div>
<div id="menu1" class="tab-pane fade">
<FORM ACTION="<?= $PHP_SELF ?>" METHOD="POST" NAME="newsentry">
<fieldset> 
<p align="center">
<div class="col-sm-10 col-sm-offset-1">
<b><label>Title:</label></b>
<input type="title" name="title" size="20" class="form-control">
</p></p>
<p align="center"><br>
<div class="col-sm-10 col-sm-offset-1">
<b><label>Links</label></b><br>
<TEXTAREA NAME="information" COLS="40" ROWS="5" class="form-control"></TEXTAREA><br>
<div id="email">
      <p align="center"><label><b>Password</b><br>
        </label>
      <input name="pass" type="password" size="20" class="form-control" />
    </div>
<!--<p align="center">
<BR>Password Protected Links?* Yes <input onclick="javascript: $('#email').show('slow');" type="radio" name="R2" value="V3" />  No
<input onclick="javascript: $('#email').hide('slow');" type="radio" name="R2" value="V4" checked /><br>-->
<br>
<p align="center">
    <div class="col-sm-10 col-sm-offset-1">
    <input type="hidden" name="text" value="1"/>
<INPUT TYPE="submit" NAME="submit" VALUE="Protecte My Text!" class="btn btn-lg btn-success"><BR>
</p>
</fieldset> 
<label><br />*If a password isn't inputted, a captcha will be displayed before showing the 
links to prevent the links from being spidered.<BR></label>
</p></FORM>
</div></div>
<?
} else {
?>
<?
    $IDFile = "./files/" . $_GET["ID"] . ".dlp";
    if (file_exists($IDFile)) {
        $fop     = fopen("./config/" . $_GET["ID"] . ".dlp", "r");
        $content = fread($fop, '999');
        fclose($fop);
        $content = explode("|", $content);
        if (isset($_POST['Submit0'])) {
            if (in_array(md5($_POST['Pass1']), $content)) {
                $passplus = "allow";
            }
        }
        if ($content[1] == "Yes" && $passplus == "") {
            if (isset($_POST['Submit0'])) {
?>
<div class="error"><img src="./img/error.png">You have entered an incorrect password. Please make sure you are authorized to view these links and try again later.</div>
<?
            } else {
            }
?>
</FORM><p align="center">Password Protected Link(s):<BR>
     </p>
<form method="POST" action="<?php
            echo $_SERVER['php_SELF'];
?>">
    <p align="center"><input type="password" name="Pass1" size="20"></p>
    <p align="center"><input type="submit" value="Submit" name="Submit0"></p>
</form>
<p align="center"><BR><BR>
    </p>
<?
        } elseif ($content[1] == "No") {
?>

<?

                // Insert you code for processing the form here, e.g emailing the submission, entering it into a database. 
                if (isset($_SESSION['views']) && $_SESSION['views'] == $_GET['ID']) {
                } else {
                    $fileconfig = fopen("./config/" . $_GET['ID'] . ".dlp", "w");
                    //$content[5]  toggle for links (0) / normal text (1)
                    fwrite($fileconfig, $content[0] . "|" . $content[1] . "|" . $content[2] . "|" . $content[3] . "|" . ($content[4] + 1) . "|" . $content[5]); 
                    fclose($fileconfig);
                    $_SESSION['views'] = $_GET['ID'];
                    $views             = $content[4] + 1;
                }
?>
<center>
<p>Hidden Links:<BR>
   <?php
                $fop   = fopen('./files/' . $_GET['ID'] . '.dlp', 'r');
                $links = fread($fop, filesize('./files/' . $_GET['ID'] . '.dlp'));
                fclose($fop);
                if($content[5] == 0) { 
                    $links   = explode("\n", $links);

                    $arrayNo = count($links);
                    $i       = 0;
                    while ($links[$arrayNo] <> $links[$i]) {
    ?>
    <p><a href="<?php
                        echo $links[$i];
    ?>"><?php
                        echo $links[$i];
    ?></a></p>
    <?php
                        $i++;
                    }
                } else { 
                    echo nl2br($links); 
                } 
?>
</center></p>
<?php
                if (isset($views)) {
?>
<p align="center">Views: <?php
                    echo $views;
?></p>
<?php
                } else {
?>
<p align="center">Views: <?php
                    echo $content[4];
?></p>

<?
            }
        } elseif ($passplus == "allow") {
            if (isset($_SESSION['views']) && $_SESSION['views'] == $_GET['ID']) {
            } else {
                $fileconfig = fopen("./config/" . $_GET['ID'] . ".dlp", "w");
                fwrite($fileconfig, $content[0] . "|" . $content[1] . "|" . $content[2] . "|" . $content[3] . "|" . ($content[4] + 1) . "|" . $content[5]); 
                fclose($fileconfig);
                $_SESSION['views'] = $_GET['ID'];
                $views             = $content[4] + 1;
            }
?>
<center>
<p>Hidden Links:<BR>
   <?php
            $fop   = fopen('./files/' . $_GET['ID'] . '.dlp', 'r');
            $links = fread($fop, filesize('./files/' . $_GET['ID'] . '.dlp'));
            fclose($fop);
            if($content[5]==0)
            {
                $links   = explode("\n", $links);
                $arrayNo = count($links);
                $i       = 0;
                while ($links[$arrayNo] <> $links[$i]) {
    ?>
    <p><a href="<?php
                    echo $links[$i];
    ?>"><?php
                    echo $links[$i];
    ?></a></p>
    <?php
                    $i++;
                }
            } else {
                echo nl2br($links) . "</p>";
            }
?>
</center></p>
<?php
            if (isset($views)) {
?>
<p align="center">Views: <?php
                echo $views;
?></p>
<?php
            } else {
?>
<p align="center">Views: <?php
                echo $content[4];
?></p>
<?
            }
        }
    } else {
        echo "<div class=\"error\"><img src=\"./img/error.png\">The ID was not found, please double check your ID. However, the ID may have been deleted as per request from the uploader.</div>";
?>

<?
    }
}
include('footer.php');
?>

Note: It has a lot of html errors

Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close