Jump to content

MiCR0

Members
  • Posts

    114
  • Joined

  • Last visited

    Never

Posts posted by MiCR0

  1. I am trying to work out the maths to build 2 functions download and upload any help would be great.

    trying to work out how long it would take to download a file with there connection speed, as in time()+5000 until file would be finished.

    Here is some of the speeds

     

    function GetSpeed($Speed)
    $SPEEDS[ 1] = array('DownSpeed' => 56000, 'UpSpeed' => 48000, 'NAME' => 'Modem 56k (V.92)'); 
    $SPEEDS[ 2] = array('DownSpeed' => 64000, 'UpSpeed' => 64000, 'NAME' => 'ISDN 64k'); 
    $SPEEDS[ 3] = array('DownSpeed' => 128000, 'UpSpeed' => 128000, 'NAME' => 'ISDN 128k'); 
    $SPEEDS[ 4] = array('DownSpeed' => 1544000, 'UpSpeed' => 1544000, 'NAME' => 'T1');
    return $SPEEDS[$Speed];
    

     

    $speed = GetSpeed(1);

    //$filedetails->size // files size in bytes

    $speed['DownSpeed']/1024?? lost

     

  2. can not be done unless upload a .zip file and then unzip it with in your code somewhere however very not recommand action. Only one Image at a time can be uploaded. if you want stuff like this best to fo a FTP access so people can write only at a give size and format type.

  3. here is how I do it

     

    config.php

    <?php
    
    $dbhost = "localhost";
    $dbuser = "";// user name
    $dbpassword = "";//password to database
    $dbdatabase = "";// databasename
    
    $config_basedir = "http://localhost/";// address of website
    
    $config_frommail = "admin@websiteaddress.com";// E-mail address for formail
    
    ?>
    

     

    db.php

    <?php
    require("config.php");
    
    $db = mysql_connect($dbhost, $dbuser, $dbpassword);
    mysql_select_db($dbdatabase, $db);
    ?>

     

    DONE :P

    now when I am wanting a page to use the database i just call at the top of the page

    require("db.php");

    much easier...

     

  4. arrrrrrrrrrr "apache php and MySQL all in a nice bundle"

     

    Ok i think i know what is the problem.

     

    make a new file

     

    info.php

    inside it write

    <?php

    echo phpinfo();

    ?>

     

    now view this page and look at (Loaded Configuration File) is this the php.ini file you have been edited? go check as them bundles normal have a few php.ini files.

     

    Also do a search on that page for

    file_uploads

    upload_max_filesize

    upload_tmp_dir

     

  5. what is the web hosts OS? and no that is enough info from your php.ini file :P

     

    also have u tried this

     

    ; Whether to allow HTTP file uploads.
    file_uploads = On
    
    ; Temporary directory for HTTP uploaded files (will use system default if not
    ; specified).
    ;upload_tmp_dir = "${path}\\tmp\"
    
    ; Maximum allowed size for uploaded files.
    upload_max_filesize = 5000M

  6. dude your trying to connect to mysql with no data you need to hold off the mysql commands until it has the DATA in your $_POST

     

     

    if ($_POST)
    {
    // basic setup variables
    $site_name = mysql_real_escape_string($_POST['site_name']);
    $site_url = mysql_real_escape_string($_POST['site_url']);
    $administration_username = mysql_real_escape_string($_POST['administration_username']);
    $administration_password = mysql_real_escape_string($_POST['administration_password']);
    // mysql setup variables
    $mysql_server_name = mysql_real_escape_string($_POST['mysql_server_name']);
    $mysql_username = mysql_real_escape_string($_POST['mysql_username']);
    $mysql_password = mysql_real_escape_string($_POST['mysql_password']);
    $mysql_database_name = mysql_real_escape_string($_POST['mysql_database_name']);
    $mysql_table_prefix = mysql_real_escape_string($_POST['mysql_table_prefix']);
    
    $mysql_connect = mysql_connect("$mysql_server_name", "$mysql_username", "$mysql_password") or die(mysql_error());
    }

  7. hmm I looked at your code and it should work i think there is a error in your php.ini file

    Could you post it please

     

    also what OS are you on and is SELINUX Disabled ? also iptables.

    also try

    copy($_FILES['subpic'][.tmp_name'],".tmp/" . $_FILES['subpic']['name']);

    This should place a copy of the file in the .tmp directory with the same filename as the original.

    however this one will not be removed after the page loaded. will help check if it is a write protected error i think its chmod 1777 needed.

    read the apache error log  ::)

  8. this maybe somewhat OTT for your needs but here

     

    <?php
    
    if ($_POST||$_GET)
    {
    
    array_walk($_GET,'cclean');
    array_walk($_POST,'cclean');
    array_walk($_COOKIE,'cclean');
    extract($_GET,EXTR_PREFIX_ALL,'get');
    extract($_POST,EXTR_PREFIX_ALL,'post');
    extract($_COOKIE,EXTR_PREFIX_ALL,'cookie');
    
    if ($_GET) {
      foreach ($_GET as $k => $v) {
        $_GET[$k] = mysql_real_escape_string(RemoveXSS(cleanValue(trim(stripslashes ($v)))));
    	$length = strlen($v);
    	if ($length > 20 ){$v="";}
        if (is_numeric ($v)) {
    		$length = strlen($v);
    		if ($length > 11 ){$_GET[$k]="";}
          $_GET[$k] = intval ($v);
        }
      }
    }
    
    if ($_POST) {
      foreach ($_POST as $k => $v) {
        $_POST[$k] = mysql_real_escape_string(RemoveXSS(cleanValue(trim(stripslashes ($v)))));
    	$length = strlen($v);
    	if ($length > 20 ){$_POST[$k]="";}
        if (is_numeric ($v)) {
    		$length = strlen($v);
    		if ($length > 11 ){$_POST[$k]="";}
          $_POST[$k] = intval ($v);
        }
      }
    }
    
    if ($_COOKIE) {
      foreach ($_COOKIE as $k => $v) {
        $_COOKIE[$k] = RemoveXSS(cleanValue(trim(stripslashes ($v))));
        if (is_numeric ($v)) {
          $_COOKIE[$k] = intval ($v);
        }
      }
    }
    }
    
    
    function RemoveXSS($val) {
    
       $val = preg_replace('/([\x00-\x08][\x0b-\x0c][\x0e-\x20])/', '', $val);
       
       $search = 'abcdefghijklmnopqrstuvwxyz';
       $search .= 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';
       $search .= '1234567890!@#$%^&*()';
       $search .= '~`";:?+/={}[]-_|\'\\';
       for ($i = 0; $i < strlen($search); $i++) {
    
          $val = preg_replace('/(&#[xX]0{0,8}'.dechex(ord($search[$i])).';?)/i', $search[$i], $val); 
    
          $val = preg_replace('/(&#0{0,8}'.ord($search[$i]).';?)/', $search[$i], $val); 
       }
       
       $ra1 = Array('javascript', 'vbscript', 'expression', 'applet', 'meta', 'xml', 'blink', 'link', 'style', 'script', 'embed', 'object', 'iframe', 'frame', 'frameset', 'ilayer', 'layer', 'bgsound', 'title', 'base');
       $ra2 = Array('onabort', 'onactivate', 'onafterprint', 'onafterupdate', 'onbeforeactivate', 'onbeforecopy', 'onbeforecut', 'onbeforedeactivate', 'onbeforeeditfocus', 'onbeforepaste', 'onbeforeprint', 'onbeforeunload', 'onbeforeupdate', 'onblur', 'onbounce', 'oncellchange', 'onchange', 'onclick', 'oncontextmenu', 'oncontrolselect', 'oncopy', 'oncut', 'ondataavailable', 'ondatasetchanged', 'ondatasetcomplete', 'ondblclick', 'ondeactivate', 'ondrag', 'ondragend', 'ondragenter', 'ondragleave', 'ondragover', 'ondragstart', 'ondrop', 'onerror', 'onerrorupdate', 'onfilterchange', 'onfinish', 'onfocus', 'onfocusin', 'onfocusout', 'onhelp', 'onkeydown', 'onkeypress', 'onkeyup', 'onlayoutcomplete', 'onload', 'onlosecapture', 'onmousedown', 'onmouseenter', 'onmouseleave', 'onmousemove', 'onmouseout', 'onmouseover', 'onmouseup', 'onmousewheel', 'onmove', 'onmoveend', 'onmovestart', 'onpaste', 'onpropertychange', 'onreadystatechange', 'onreset', 'onresize', 'onresizeend', 'onresizestart', 'onrowenter', 'onrowexit', 'onrowsdelete', 'onrowsinserted', 'onscroll', 'onselect', 'onselectionchange', 'onselectstart', 'onstart', 'onstop', 'onsubmit', 'onunload');
       $ra = array_merge($ra1, $ra2);
       
       $found = true; 
       while ($found == true) {
          $val_before = $val;
          for ($i = 0; $i < sizeof($ra); $i++) {
             $pattern = '/';
             for ($j = 0; $j < strlen($ra[$i]); $j++) {
                if ($j > 0) {
                   $pattern .= '(';
                   $pattern .= '(&#[xX]0{0,8}([9ab])';
                   $pattern .= '|';
                   $pattern .= '|(&#0{0,8}([9|10|13])';
                   $pattern .= ')*';
                }
                $pattern .= $ra[$i][$j];
             }
             $pattern .= '/i';
             $replacement = substr($ra[$i], 0, 2).'<x>'.substr($ra[$i], 2); 
             $val = preg_replace($pattern, $replacement, $val);
             if ($val_before == $val) {
                
                $found = false;
             }
          }
       }
       return $val;
    }
    
    function cleanValue($_value)
    {
        $_value = stripslashes(strip_tags($_value));
    
        $_value = str_replace(array('delete',
                'DELETE',
                'rm -',
                ' ',
                '!',
                '|',
                '?',
                '&',
                '=',
                '-',
                '`',
                "'",
                '"',
                '\\\\',
                '\\',
                '//',
                '/',
                ',',
                ';',
                ':',
                '*',
                '>',
                '<'
                ), '', $_value);
    
        return trim($_value);
    }	
    
    function cclean($value)
    {
    if (get_magic_quotes_gpc()) $value = stripslashes($value);
    if (!is_numeric($value)) $value = mysql_real_escape_string($value);
    return $value;
    }
    ?>
    

  9. It depends on what Linux you are on however FC you can kick out of php to run Linux command with

     

    system("cd /home/whereEver;nohup ./myscipt --commands > /dev/null & echo $!;";

     

    the "> /dev/null & echo $!" changes from versions of Linux however it is needed to stop hanging of a command if you are not looking for as reply.

     

    You could also use shell_exec("whatever ");

  10. I do not know what use a Div tag in a hidden field for however you could use 1 more hidden with a number in it which u can ref in your code to use a div tag like.

     

     

    function addDivTags($ID,$input)
    {
            $tags[1] = '<div align="right">'.$input.'</div>');
            $tags[2] = '<div align="left">'.$input.'</div>');
    
            return  $tags[$ID];
    }

  11. Am working on a game and am trying to work out the delay speed of a computer...

    the higher the number the better there CPU is same with ram and Overclocking etc

     

    so a computer with CPU level 1 is not as good as someone with a CPU level of 5 etc...

    so the faster the CPU RAM CPUbit Overclocked  is the short the delay would be..

    Also there is how many Tasks are running on that computer which would / the total of the computer speed by the count of tasks..

     

    Also the Size of the File that the user is moving means it would be a longer delay the bigger the file size.

     

    $delay = ($PC->Overclocked * $PC->CPU * $PC->CPUbit * $PC->RAM  / $numrows) * $proc->size;

    the above is WAY WAY to big works out to 2MB every 90 Hours.

     

    Could someone please help me with this as I am very stuck with this logic.

    Thanks

  12. I have run into a Big problem with searching for a range on an IP address via MySQL.

     

    MySQL

    `IP_Address` int(11) unsigned NOT NULL,

     

    All of the IP's are written by IP2long() all seems to be working however when trying to search for an IP range I just can not work out why this is not working.

     

    SELECT IP_Address FROM IPS WHERE IP_Address > $startlong AND IP_Address < $endlong

     

    Linux 64 Bit System so it should not go into negative numbers any idea what is wrong please anyone?

     

     

  13. ok looks to me like you have a bug at the top

    <?php $page_title = 'once ('../head.php'); ?>

     

    what is with all of the php tags when its all php?

     

    ok anyways what u want to do is length check all of the inputs like this.

    $length1 = strlen($firstname);
    if ($length1  > 15 ){
    $firstname = '';
    echo "ERROR first name to big";
    }

     

    you also are not even checking for valid data and cross scripting.

     

    function RemoveXSS($val) {
    
       $val = preg_replace('/([\x00-\x08][\x0b-\x0c][\x0e-\x20])/', '', $val);
       
    $search = 'abcdefghijklmnopqrstuvwxyz';
       $search .= 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';
       $search .= '1234567890!@#$%^&*()';
       $search .= '~`";:?+/={}[]-_|\'\\';
       for ($i = 0; $i < strlen($search); $i++) {
    
          $val = preg_replace('/(&#[xX]0{0,8}'.dechex(ord($search[$i])).';?)/i', $search[$i], $val); 
    
          $val = preg_replace('/(&#0{0,8}'.ord($search[$i]).';?)/', $search[$i], $val); 
       }
       
       $ra1 = Array('javascript', 'vbscript', 'expression', 'applet', 'meta', 'xml', 'blink', 'link', 'style', 'script', 'embed', 'object', 'iframe', 'frame', 'frameset', 'ilayer', 'layer', 'bgsound', 'title', 'base');
       $ra2 = Array('onabort', 'onactivate', 'onafterprint', 'onafterupdate', 'onbeforeactivate', 'onbeforecopy', 'onbeforecut', 'onbeforedeactivate', 'onbeforeeditfocus', 'onbeforepaste', 'onbeforeprint', 'onbeforeunload', 'onbeforeupdate', 'onblur', 'onbounce', 'oncellchange', 'onchange', 'onclick', 'oncontextmenu', 'oncontrolselect', 'oncopy', 'oncut', 'ondataavailable', 'ondatasetchanged', 'ondatasetcomplete', 'ondblclick', 'ondeactivate', 'ondrag', 'ondragend', 'ondragenter', 'ondragleave', 'ondragover', 'ondragstart', 'ondrop', 'onerror', 'onerrorupdate', 'onfilterchange', 'onfinish', 'onfocus', 'onfocusin', 'onfocusout', 'onhelp', 'onkeydown', 'onkeypress', 'onkeyup', 'onlayoutcomplete', 'onload', 'onlosecapture', 'onmousedown', 'onmouseenter', 'onmouseleave', 'onmousemove', 'onmouseout', 'onmouseover', 'onmouseup', 'onmousewheel', 'onmove', 'onmoveend', 'onmovestart', 'onpaste', 'onpropertychange', 'onreadystatechange', 'onreset', 'onresize', 'onresizeend', 'onresizestart', 'onrowenter', 'onrowexit', 'onrowsdelete', 'onrowsinserted', 'onscroll', 'onselect', 'onselectionchange', 'onselectstart', 'onstart', 'onstop', 'onsubmit', 'onunload');
       $ra = array_merge($ra1, $ra2);
       
       $found = true; 
       while ($found == true) {
          $val_before = $val;
          for ($i = 0; $i < sizeof($ra); $i++) {
             $pattern = '/';
             for ($j = 0; $j < strlen($ra[$i]); $j++) {
                if ($j > 0) {
                   $pattern .= '(';
                   $pattern .= '(&#[xX]0{0,8}([9ab])';
                   $pattern .= '|';
                   $pattern .= '|(&#0{0,8}([9|10|13])';
                   $pattern .= ')*';
                }
                $pattern .= $ra[$i][$j];
             }
             $pattern .= '/i';
             $replacement = substr($ra[$i], 0, 2).'<x>'.substr($ra[$i], 2); 
             $val = preg_replace($pattern, $replacement, $val);
             if ($val_before == $val) {
                
                $found = false;
             }
          }
       }
       return $val;
    }
    
    function cleanValue($_value)
    {
        $_value = stripslashes(strip_tags($_value));
    
        $_value = str_replace(array('delete',
                'DELETE',
                'rm -',
                ' ',
                '!',
                '|',
                '?',
                '&',
                '=',
                '-',
                '`',
                "'",
                '"',
                '\\\\',
                '\\',
                '//',
                '/',
                ',',
                ';',
                ':',
                '*',
                '>',
                '<'
                ), '', $_value);
    
        return trim($_value);
    }

     

    using the above functions you can use them on all of your POST etc like this

    $firstname = mysql_real_escape_string(cleanValue(RemoveXSS($_POST['firstname'])));

     

    and Last when you do a form there basic HTML code to LOCK input length this is called maxlength

    as show here

    <td><input type="text" name="website" maxlength="50" size="22" value="'.$website.'" /></td>

  14. ok I think i see what you are trying to do, well 1st you should know that this session can easy be hacked and is very unsafe however for learning its a good way to start.

     

    here is a basic system that I think you are looking for.

     

    userlogin.php

    <?php
    
    require("config.php");
    require("db.php"); 
    require("functions.php");
    
    session_start();
    
    if($_SESSION['SESS_USERNAME']) {
    header("Location: " . $config_basedir . "index.php");
    }
    
    if($_POST['submit']) {
    
    $sql = "SELECT * FROM users WHERE username = '" . pf_fix_slashes($_POST['username']) . "' AND password = '" . md5(pf_fix_slashes($_POST['password'])) . "'";
    
    $result = mysql_query($sql);
    $numrows = mysql_num_rows($result);
    
    if($numrows == 1) {
    	$row = mysql_fetch_assoc($result);
    
    	session_register("SESS_USERNAME");
    	session_register("SESS_USERID");
    	session_register("SESS_USERLEVEL");
    
    	$_SESSION['SESS_USERNAME'] = $row['username'];
    	$_SESSION['SESS_USERID'] = $row['id'];
    	$_SESSION['SESS_USERLEVEL'] = $row['level'];		
    
    	header("Location: " . $config_basedir);
    }
    else {
    	header("Location: " . $config_basedir . "/userlogin.php?error=1");
    }
    }
    else {
    require("header.php");
    
    echo "<h1>Login</h1>";
    
    if($_GET['error']) {
    	echo "<p>Incorrect login, please try again!</p>";
    }
    
    ?>
    
    <form action="<?php echo $SCRIPT_NAME ?>" method="post">
    
    <table>
    <tr>
    <td>Username</td>
    <td><input type="text" name="username"></td>
    </tr>
    <tr>
    <td>Password</td>
    <td><input type="password" name="password"></td>
    </tr>
    <tr>
    <td></td>
    <td><input type="submit" name="submit" value="Login!"></td>
    </tr>
    </table>
    </form>
    
    <?php}
    ?>

     

    config.php

    <?php
    
    $dbhost = "localhost";
    $dbuser = "root";
    $dbpassword = "";
    $dbdatabase = "?";
    
    $config_basedir = "http://localhost/";
    
    ?>

    db.php

    <?php
    require("config.php");
    
    $db = mysql_connect($dbhost, $dbuser, $dbpassword);
    mysql_select_db($dbdatabase, $db);
    ?>

     

    functions.php

    <?php
    
    function pf_fix_slashes($string) {
    if (get_magic_quotes_gpc() == 1) {
    	return($string);
    }
    else {
    	return(addslashes($string));
    }
    }
    
    function pf_check_number($value) {
    if(isset($value) == FALSE) {
    	$error = 1;
    }
    
    if(is_numeric($value) == FALSE) {
    	$error = 1;
    }
    
    if($error == 1) {
    	return FALSE;
    }
    else {
    	return TRUE;
    }
    }
    
    ?>

     

    userlogout.php

    <?php
    
    session_start();
    
    require("config.php");
    
    session_unregister("SESS_USERNAME");
    session_unregister("SESS_USERID");
    session_unregister("SESS_USERLEVEL");
    
    header("Location: " . $config_basedir);
    
    ?>

     

    now for the session access code you can do from the level that you set up like the following

    if ($_SESSION['SESS_USERLEVEL'] == 10) {
    }

     

    to use this session you would add in your header.php  things like this

     

    session_start();
    
    <?php
    if($_SESSION['SESS_USERNAME']) {
    echo "Logged in as <strong>" . $_SESSION['SESS_USERNAME'] . "</strong> - <a href='userlogout.php' >Logout</a>";
    }
    else {
    echo "<a href='userlogin.php' >Login</a>";
    }
    ?>

     

    Hope this helps.

    For a real live site there is a free GPL Class system called DB_eSESSION which is safe 1 class which will handle all of the session stuff for you.

  15. I personal like xampp better however using wamp is fine.

    I am going to take a guess here and say you not set up your database right.

    You need to get into phpmyadmin (wamp should have this ) and set it up that way from there you can export your database as well as easy edit anything you like

  16. <?php
    require_once 'library/db.php';
    //require_once 'error.php';
    
    
    
    if (!($conn = mysql_connect('localhost', 'root', '')))
    {
    	showError();
    }
    
    if (!(mysql_select_db('itsupport', $conn)))
    {
    	showError();
    }
    
    $a = RemoveXSS(cleanValue($_GET['User_ID']));// safe
    
    
    $result = mysql_query("SELECT * FROM contacts WHERE User_ID='" . $a . "'");
        $numrows = mysql_num_rows($result);
        if ($numrows == 1)
            {
    	// yes it has data
    	$row = mysql_fetch_assoc($result);  
    	}else{
    	showError();
    	}
    
    mysql_close($conn);
    
    
    
    
    
    function RemoveXSS($val) {
    
       $val = preg_replace('/([\x00-\x08][\x0b-\x0c][\x0e-\x20])/', '', $val);
       
    $search = 'abcdefghijklmnopqrstuvwxyz';
       $search .= 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';
       $search .= '1234567890!@#$%^&*()';
       $search .= '~`";:?+/={}[]-_|\'\\';
       for ($i = 0; $i < strlen($search); $i++) {
    
          $val = preg_replace('/(&#[xX]0{0,8}'.dechex(ord($search[$i])).';?)/i', $search[$i], $val); 
    
          $val = preg_replace('/(&#0{0,8}'.ord($search[$i]).';?)/', $search[$i], $val); 
       }
       
       $ra1 = Array('javascript', 'vbscript', 'expression', 'applet', 'meta', 'xml', 'blink', 'link', 'style', 'script', 'embed', 'object', 'iframe', 'frame', 'frameset', 'ilayer', 'layer', 'bgsound', 'title', 'base');
       $ra2 = Array('onabort', 'onactivate', 'onafterprint', 'onafterupdate', 'onbeforeactivate', 'onbeforecopy', 'onbeforecut', 'onbeforedeactivate', 'onbeforeeditfocus', 'onbeforepaste', 'onbeforeprint', 'onbeforeunload', 'onbeforeupdate', 'onblur', 'onbounce', 'oncellchange', 'onchange', 'onclick', 'oncontextmenu', 'oncontrolselect', 'oncopy', 'oncut', 'ondataavailable', 'ondatasetchanged', 'ondatasetcomplete', 'ondblclick', 'ondeactivate', 'ondrag', 'ondragend', 'ondragenter', 'ondragleave', 'ondragover', 'ondragstart', 'ondrop', 'onerror', 'onerrorupdate', 'onfilterchange', 'onfinish', 'onfocus', 'onfocusin', 'onfocusout', 'onhelp', 'onkeydown', 'onkeypress', 'onkeyup', 'onlayoutcomplete', 'onload', 'onlosecapture', 'onmousedown', 'onmouseenter', 'onmouseleave', 'onmousemove', 'onmouseout', 'onmouseover', 'onmouseup', 'onmousewheel', 'onmove', 'onmoveend', 'onmovestart', 'onpaste', 'onpropertychange', 'onreadystatechange', 'onreset', 'onresize', 'onresizeend', 'onresizestart', 'onrowenter', 'onrowexit', 'onrowsdelete', 'onrowsinserted', 'onscroll', 'onselect', 'onselectionchange', 'onselectstart', 'onstart', 'onstop', 'onsubmit', 'onunload');
       $ra = array_merge($ra1, $ra2);
       
       $found = true; 
       while ($found == true) {
          $val_before = $val;
          for ($i = 0; $i < sizeof($ra); $i++) {
             $pattern = '/';
             for ($j = 0; $j < strlen($ra[$i]); $j++) {
                if ($j > 0) {
                   $pattern .= '(';
                   $pattern .= '(&#[xX]0{0,8}([9ab])';
                   $pattern .= '|';
                   $pattern .= '|(&#0{0,8}([9|10|13])';
                   $pattern .= ')*';
                }
                $pattern .= $ra[$i][$j];
             }
             $pattern .= '/i';
             $replacement = substr($ra[$i], 0, 2).'<x>'.substr($ra[$i], 2); 
             $val = preg_replace($pattern, $replacement, $val);
             if ($val_before == $val) {
                
                $found = false;
             }
          }
       }
       return $val;
    }
    function cleanValue($_value)
    {
        $_value = stripslashes(strip_tags($_value));
    
        $_value = str_replace(array('delete',
                'DELETE',
                'rm -',
                ' ',
                '!',
                '|',
                '?',
                '&',
                '=',
                '-',
                '`',
                "'",
                '"',
                '\\\\',
                '\\',
                '//',
                '/',
                ',',
                ';',
                ':',
                '*',
                '>',
                '<'
                ), '', $_value);
    
        return trim($_value);
    }
    ?>

     

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.