Example #1
0
echo image_url($id);
?>
" target="_blank">Download your card as an image 	&rsaquo;&rsaquo;</a>
	<div id="new-card"><a href="/">Make another card 	&rsaquo;&rsaquo;</a></div>
	<div id="card-share-donate">
		<a href="http://strongfamiliesmovement.org/sf-donate" class="button2 yellow"  target="_blank">Donate to Strong Families</a>
	</div>
</div>
<div class="clearer"></div>
<div id="card-share-social-url">
	Share your card with this URL:<br>
	<a href="<?php 
echo card_url($id);
?>
" target="_blank"> <?php 
echo card_url($id);
?>
</a>
</div>
<?php 
while ($sender = $sender_object->fetch_assoc()) {
    ?>
	<div id="take-action-1" class="take-action">
		<iframe src="http://strongfamiliesmovement.org/cardgen-petition-1?name=<?php 
    echo $sender['first_name'];
    ?>
&email=<?php 
    echo $sender['email_address'];
    ?>
" width=424 height=500 scrolling="no" frameborder="0"></iframe>
	</div>
Example #2
0
        echo "Error: " . $card_info . ' - ' . $mysqli->sqlstate;
    } else {
        $card_id = $mysqli->insert_id;
        $card_id_hashed = hash('md5', $card_id);
        $hash_update = "UPDATE `cards` SET `hash_id`= '" . $mysqli->real_escape_string($card_id_hashed) . "' WHERE  `id` = '" . $mysqli->real_escape_string($card_id) . "';";
        if (!$mysqli->query($hash_update)) {
            echo "Error: " . $card_info . ' - ' . $mysqli->sqlstate;
        } else {
            //Send the card to Mama and show it to the sender
            $to = $mysqli->real_escape_string($val['to_first']) . ' ' . $mysqli->real_escape_string($val['to_last']) . '<' . $mysqli->real_escape_string($val['to_email']) . '>';
            $headers = 'From: ' . $mysqli->real_escape_string($val['from_first']) . ' ' . $mysqli->real_escape_string($val['from_last']) . '<' . $mysqli->real_escape_string($val['from_email']) . '>';
            $subject = 'You have a Mama\'s Day card!';
            $message = 'Dear ' . $mysqli->real_escape_string($val['to_first']) . ',
		
' . $mysqli->real_escape_string($val['from_first']) . ' created a custom Mama\'s Day e-card for you. Here\'s the link to your card:
' . card_url($mysqli->real_escape_string($card_id_hashed)) . '
		
Mama\'s Day is our own celebration to support the magic and chaos of modern motherhood. 3 out of 4 families don\'t fit the "Leave it to Beaver" model, so we figured it was time to update the way we recognize and celebrate moms, too.

Our custom cards have something for everyone. Take a look, and send your own! www.mamasday.org

Happy Mama\'s Day,
Your friends at Strong Families
www.strongfamiliesmovement.org

Strong Families is a 10-year national initiative to change the way people think, feel and act in support of families.';
            //$message = ''.$mysqli->real_escape_string($val['from_first']) . ' made a Mama\'s Day card for you! Go see your card at ' . home_url() . '/card.php?card_id=' . $card_id_hashed;
            mail($to, $subject, $message, $headers);
            header('Location: /share.php?id=' . $card_id_hashed);
        }
    }