Page 1 of 7

Paste The Last Thing You Copied V.1

Posted: Thu May 23, 2019 3:56 pm
by Tzatziki Cfnmpah IV
Just paste the last thing you copied! All shibaface rules apply,of course c:

I'll start:
Image
Pet's name: Malcolm
Owner's name: Tzatziki Cfnmpah IV

Re: Paste The Last Thing You Copied V.1

Posted: Thu May 23, 2019 7:29 pm
by Misty
how long do gray parrots live

Re: Paste The Last Thing You Copied V.1

Posted: Fri May 24, 2019 2:56 am
by Red



Re: Paste The Last Thing You Copied V.1

Posted: Fri May 24, 2019 7:36 am
by Tzatziki Cfnmpah IV
whatever, you aren't worth my time, you can't even read. your probably like 12. I tried to be nice but you were nothing but rude and ignorant. have a nice life. or don't. I don't really care either way.

Re: Paste The Last Thing You Copied V.1

Posted: Fri May 24, 2019 9:39 am
by Misty
District

Re: Paste The Last Thing You Copied V.1

Posted: Sat Jul 27, 2019 12:20 am
by Doggos_on_Mars

Re: Paste The Last Thing You Copied V.1

Posted: Sat Jul 27, 2019 12:54 am
by gabrielle
voy a decir que no

Re: Paste The Last Thing You Copied V.1

Posted: Sat Jul 27, 2019 7:28 am
by BayoDino

Code: Select all

<html>
<head>
</head>

<body>
<?php
define('IN_PHPBB', true);
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
include($phpbb_root_path . 'common.' . $phpEx);

$user->session_begin();
if ($user->data['user_id'] == ANONYMOUS)
{
    login_box('', $user->lang['LOGIN']);
} 

require("adopttools.php");

/* Our visitor has picked an adoptable they want, its id is in $_REQUEST['id']. Find that
 * adoptable in adoptables.xml
 */
$adoptable=find_adoptable($_REQUEST['id']);

/* To randomly pick a variation from that adoptable, we're going have to do a little maths with
 * random numbers.
 *
 * First we find the sum of all the 'chance' attributes for this adoptable...
 */

$sum=0;
foreach ($adoptable->variation as $variation) {
	$sum=$sum + $variation['chance'];
}

/* Now we can generate a random number which goes from 0.0 to that sum. This will help us
 * pick a variation.
 */
$random=lcg_value()*$sum;

$sum=0;
foreach ($adoptable->variation as $variation) {
	$sum = $sum + $variation['chance'];
	
	if ($random <= $sum) {
		//Choose this variation
		$v_id=$variation['id'];
		break;
	}
}
include "config.php";
// Create connection
try {
    $conn = new PDO("mysql:host=$dbhost;dbname=$dbname", $dbuser, $dbpasswd);
    // set the PDO error mode to exception
    $conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);

    // prepare sql and bind parameters
    $stmt = $conn->prepare("INSERT INTO phpbb_exam (pet_type, pet_variation, pet_name, pet_owner) VALUES (:type, :variation, :name, :owner)");
    $stmt->bindParam(':type', $type);
    $stmt->bindParam(':variation', $v_id);
    $stmt->bindParam(':name', $name);
    $stmt->bindParam(':owner', $owner);

    // insert a row
    // set parameters and execute
     $type = $_POST["id"];
     $name = $_POST["petname"];
     $owner = $user->data['user_id'];
    $stmt->execute();

    echo "Pet Adopted successfully";
    }
catch(PDOException $e)
    {
    echo "Error: " . $e->getMessage();
    }
$conn = null;


?>
coding for SF!

Re: Paste The Last Thing You Copied V.1

Posted: Sat Jul 27, 2019 12:16 pm
by Doggos_on_Mars

Re: Paste The Last Thing You Copied V.1

Posted: Sat Jul 27, 2019 1:15 pm
by BayoDino
`define('WP_DEBUG', false);`