Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Branch: master
Fetching contributors…

Cannot retrieve contributors at this time

924 lines (754 sloc) 37.6 KB
# required fields and form validation
# personal page share features
# letter content line breaks
# thermometer
# updating of action count
# tweet and fb counts populating in sane manner
# encode share codes in twitter bitly url
# paste button copying to buffer
$DIA = new DemocracyInAction_API( $node, $user, $password);
#get the action info
#to do, populate the action key by the url slug
if ($_REQUEST['a']) {
$action_KEY = $_REQUEST['a'];
} else {
#$options = array('condition' => array('campaign_slug='.$campaign_slug));
$options = array('condition' => array('action_KEY='.$action_KEY));
$action = $DIA->get( 'action', $options);
$a = $action[0];
#get the action content
$options = array('condition' => array('action_KEY='.$a['action_KEY']));
$con = $DIA->get( 'action_content', $options);
$options = array('condition' => array('action_content_KEY='.$con[0]['action_content_KEY']));
$detail = $DIA->get( 'action_content_detail', $options);
$c = $detail[0];
#get the action targets
$options = array('condition' => array('action_KEY='.$a['action_KEY']));
$tar = $DIA->get( 'action_target', $options);
$target = $tar[0];
# if there is a user go get em
if ($_GET['u']){
$options = array('condition' => array('supporter_KEY='.$_GET['u']));
$sup = $DIA->get( 'supporter', $options);
$s = $sup[0];
#if this is a personal petition page go get the needed data
#to do, populate the supporter action key by the url slug if it is a personal petition
if ($_REQUEST['per']) {
$supporter_action_KEY = $_REQUEST['per'];
} else {
#$supporter_action_KEY ='8979243';
if ($supporter_action_KEY) {
#$options = array('condition' => array('supporter_KEY='.$pet_supporter_KEY), 'action_KEY='.$action_KEY);
$options = array('condition' => array('supporter_action_KEY='.$supporter_action_KEY));
$pet = $DIA->get( 'supporter_action', $options);
$pet = $pet[0];
$options = array('condition' => array('supporter_KEY='.$pet['supporter_KEY']));
$host = $DIA->get( 'supporter', $options);
$host = $host[0];
$track_array = array(
't' => 'twitter',
'f' => 'facebook',
'e' => 'email',
'w' => 'web',
'r' => 'ran',
'h' => 'ran_frontpage',
'u' => 'understory',
'b' => 'blog',
'p' => 'partner',
'a' => 'taf',
'v' => 'copy paste',
'm' => 'email copy'
#takes: $track, $t, $u, $e, supporter_action_KEY
<?php if ($pet['personal_petition']) { ?>
<title><?php echo $host['First_Name'] .' '.$host['Last_Name'] ;?>'s Petition: <?php echo $a['Title'] ;?></title>
<meta property="og:title" content="<?php echo $host['First_Name'] .' '.$host['Last_Name'] ;?>'s Petition: <?php echo $a['Title'] ;?>"/>
<meta name="description" content="<?php echo $pet['facebook_message'] ;?>">
<meta property="og:description" content="<?php echo $pet['facebook_message'] ;?>" />
<?php } else { ?>
<title><?php echo $a['Title'] ;?> | Rainforest Action Network</title>
<meta property="og:title" content="<?php echo $a['Title'] ;?>"/>
<meta name="description" content="<?php echo $a['share_text'] ;?>">
<meta property="og:description" content="<?php echo $a['share_text'] ;?>" />
<?php } ?>
<meta property="og:site_name" content="Rainforest Action Network"/>
<?php if ($a['image_facebook']) { ;?>
<meta property="og:image" content="<?php echo $a['image_facebook'] ;?>" />
<?php } else { ?>
<meta property="og:image" content=""/>
<?php } ?>
<meta property="og:url" content="<?php echo $a['campign_slug'] ;?>/?t=f" />
<meta property="fb:admins" content="511719841,1654947176,500387223,547808206" />
<link rel='prev' title='Take Action Online' href='' />
<link rel='canonical' href='<?php echo $a['campaign_slug'] ;?>/' />
<link rel="stylesheet" href="" />
<link rel="stylesheet" href="" />
<!-- local overrides, remove on live
<link rel="stylesheet" href="style.css" />
<link rel="stylesheet" href="topnav.css" />
<script type="text/javascript" src=""></script>
<script type="text/javascript" src=""></script>
<body class="clearfix campaigns single">
<div id="fb-root"></div>
<div id="header">
<div id="ran-banner">
<div class="menu">
<div class="topMenu">
<div class="logoMenu">
<a href="/"><img border="0" alt="Rainforest Action Network" src=""></a>
<!-- <div class="joinUsMenu">
<a href=""><img border="0" class="socialNetworkIcon" alt="Facebook" src="img/facebook.png"></a>
<a href="!/ran"><img border="0" class="socialNetworkIcon" alt="Twitter" src="img/twitter.png"></a>
<a href=""><img border="0" class="socialNetworkIcon" alt="YouTube" src="img/youtube.png"></a>
<a href=""><img border="0" class="socialNetworkIcon" alt="Flickr" src="img/flickr.png"></a>
<!-- <div class="updatesMenu">
Get email updates
<input type="text" onClick="this.value='';" class="inputText" value="Email address" name="emailAddress">
<input type="text" onClick="this.value='';" class="inputText" value="zip code" name="zipCode">
<input type="submit" class="inputSubmit" value="Submit" name="emailSubmit">
</div> -->
<div id="centering">
<div id="page" class="clearfix">
<div id="banner">
<div class="container">
<div class="content"><div class="padding">
<?php if ($pet['personal_petition']) { ?>
<!--<h1>Sign <?php echo $host['First_Name'] .' '.$host['Last_Name'] ;?>'s Petition</h1>-->
<?php } ?>
<div class="article goal">
<div class="wrap">
<?php if ( $a['video_embed']) { echo $a['video_embed'] ;} else {?>
<img src="<?php echo $a['image'] ; ?>" class="image" alt="image" />
<?php } ?>
<div class="text">
<div class="padding clearfix">
<h3><?php echo $a['Title'] ;?></h3>
</div> <!-- /text -->
</div> <!-- /article /goal -->
#TO DO make the thermo work
if ($pet['personal_petition']) { ?>
<div class="progress">
<div class="goal"><?php echo $host['First_Name'] ;?>'s Petition Goal: <?php echo $pet['signature_goal'];?></div>
<div id="progress" data-goal="<?php echo $pet['signature_goal'] ;?>" data-id="" data-addition="<?php echo $pet['signature_count']; ?>">
<div class="percent"></div>
#main thermometer
else if( ( $a['action_count'] > $a['Signature Minimum for Display']) & ($a['Signature_Goal'] !=0) & ($a['show_goal'] == '1')) {
$percent = ( ($a['action_count'] /$a['Signature_Goal']) * 100 ) ;
<div class="progress">
<div class="goal">Goal: <?php echo $a['Signature_Goal'] ;?></div>
<div id="progress" data-goal="<?php echo $a['Signature_Goal'] ;?>" data-id="107, 108, 109" data-addition="<?php echo $a['action_count'] ; ?>">
<div class="percent"></div>
<?php } ?>
</div></div> <!-- /content -->
<div class="aside"><div class="padding">
<?php if ($pet['personal_petition']) { ?>
<div class='personal_message'>
<h2><?php echo $host['First_Name'] .' '.$host['Last_Name'] ;?>'s Petition</h2>
<p><?php if ($host['image']) { ?><img src="<?php echo $host['image'];?>" width="150" class="host-image"><?php } echo $pet['personal_message'];?></p>
<div style="clear:both;"><br /></div>
<?php } ?>
<h2 id="action-ask-title"><?php echo $a['action_ask_title'] ;?></h2>
<div id="action-ask-subtitle"><?php echo $a['short_ask'] ;?></div>
<form class="form" name="actionForm" method="POST" action="" accept-charset="utf-8">
<?php if ($a['action_KEY']) { ?>
<input type="hidden" name="action_KEY" value="<?php echo $a['action_KEY'] ;?>" />
<?php } ?>
<input type="hidden" name="organization_KEY" value="6022" />
if ($_GET['track'] ) {
$referrer = $_GET['track'];
} else {
#$T = substr($_REQUEST['t'],1 ); #get first letter of $t
$referrer = $track_array[$_REQUEST['t']];
<input type="hidden" name="Tracking_Code" value="Action: <?php echo $a['action_KEY'] ;?>" />
<input type="hidden" name="referrer" value="<?php echo $referrer; ?>" />
<input type="hidden" name="partner_code" value="<?php echo $_GET['p']; ?>" />
$R = $_GET['r'] ; # or parse t for short_code and convert to supporter_KEY
<input type="hidden" name="referrer_supporter_KEY" value="<?php echo $R; ?>" />
<?php if ($pet['personal_petition']) { ?>
<input type="hidden" name="personal_petition_supporter_KEY" value="<?php echo $pet['supporter_KEY']; ?>" />
<input type="hidden" name="personal_petition_supporter_action_KEY" value="<?php echo $pet['supporter_action_KEY']; ?>" />
<?php } ;?>
<input type="hidden" name="email_blast_KEY" value="<?php echo $_GET['e']; ?>" />
<input type="hidden" name="campaign_slug" value="<?php echo $a['campaign_slug'] ;?>" />
<input type="hidden" name="campaign" value="<?php echo $a['campaign'] ;?>" />
if ( $a['redirect_path']) { $redirect = $a['redirect_path'];
} else {
$redirect= ''.$a['campaign_slug'].'/?u=[[supporter_KEY]]&p=[[supporter_action_KEY]]';
<input type="hidden" name="redirect" value="<?php echo $redirect ;?>" />
<input type="hidden" name="table" value="supporter"/>
<?php if ($a['Style'] != 'Petition') {
if ($c['action_content_KEY']) {
<?php if ($c['Recommended_Subject'] != '(No Petition Subject)') { ?>
<label for="Subject<?php echo $c['action_content_KEY'] ;?>">Subject:</label>
<input id="Subject<?php echo $c['action_content_KEY'] ;?>" class="wide" value="<?php echo $c['Recommended_Subject'] ;?>" size="45" name="Subject<?php echo $c['action_content_KEY'] ;?>">
<?php } ?>
<label for="Content<?php echo $c['action_content_KEY'] ;?>">Your Letter:</label>
<textarea id="Content<?php echo $c['action_content_KEY'] ;?>" cols="45" rows="15" name="Content<?php echo $c['action_content_KEY'] ;?>" class="full required" ><?php echo $c['Recommended_Content'] ;?></textarea>
<p> Sincerely, [Your name], [Your address] </p>
<?php if ($target['target_KEYS']) {?>
<input type="hidden" value="recipient" name="target_type">
<input type="hidden" value="<?php echo $target['target_KEYS']; ?>" name="target_key">
<input type="hidden" value="<?php echo $target['method']; ?>" name="target_method">
<input type="hidden" value="Subject<?php echo $c['action_content_KEY'] ;?>" name="target_subjectName">
<input type="hidden" value="Content<?php echo $c['action_content_KEY'] ;?>" name="target_contentName">
<input type="hidden" value="0,<?php echo $c['action_content_KEY'] ;?>" name="global:action_content_KEYS">
# this is for the future : if there is a sid the url go get it from the api and show this and not the other stuff
# if $u query the short code to get First_Name Email, supporter_KEY
if ($s['supporter_KEY']) {
$logout= ''.$a['campaign_slug'].'/?e='.$_GET['e'].'&r='.$_GET['r'];
<div id="known_user">You are signed in as <span id="known_user_name"><?php echo $s['First_Name'] ;?></span>. Not <span id="known_user_name"></span>? <a href="<?php echo $logout; ?>">Click here</a></div><div id="unknown_user">
<input type="hidden" name="Email" value="<?php echo $s['Email'] ;?>" />
<input type="hidden" name="supporter_KEY" value="<?php echo $s['supporter_KEY'] ;?>" />
} else {
##parse avavilbe fields $a['Request']
##parse requier fields $a['Required']
<input type="hidden" name="required" value="<?php echo $a['Required'] ;?>" />
## create these fields
if ($a['Request']) {
$fields = explode(",", $a['Request']);
# else {
$fields = array('First_Name'=>'required','Last_Name'=>'required','Email'=>'required','Country'=>'required','Zip'=>'required');
# }
<input type="hidden" value="3" name="Receive_Email">
<?php if ($fields["First_Name"]) { ?>
<label for="First_Name">First Name</label><input id="First_Name" type="text" name="First_Name" class="full required" />
<?php } if ($fields["Last_Name"]) { ?>
<label for="Last_Name">Last Name</label><input id="Last_Name" type="text" name="Last_Name" class="full required" />
<?php } if ($fields["Email"]) { ?>
<label for="Email">Email address</label><input id="Email" type="email" name="Email" class="full required" />
<?php } if ($fields["State"]) { ?>
<label for="State">State/Province</label>
<select id="State" name='State' class="full" >
<option value="">Select a state</option>
<option value="AL" >Alabama</option>
<option value="AK" >Alaska</option>
<option value="AS" >American Samoa</option>
<option value="AZ" >Arizona</option>
<option value="AR" >Arkansas</option>
<option value="CA" >California</option>
<option value="CO" >Colorado</option>
<option value="CT" >Connecticut</option>
<option value="DE" >Delaware</option>
<option value="DC" >D.C.</option>
<option value="FL" >Florida</option>
<option value="GA" >Georgia</option>
<option value="GU" >Guam</option>
<option value="HI" >Hawaii</option>
<option value="ID" >Idaho</option>
<option value="IL" >Illinois</option>
<option value="IN" >Indiana</option>
<option value="IA" >Iowa</option>
<option value="KS" >Kansas</option>
<option value="KY" >Kentucky</option>
<option value="LA" >Louisiana</option>
<option value="ME" >Maine</option>
<option value="MD" >Maryland</option>
<option value="MA" >Massachusetts</option>
<option value="MI" >Michigan</option>
<option value="MN" >Minnesota</option>
<option value="MS" >Mississippi</option>
<option value="MO" >Missouri</option>
<option value="MT" >Montana</option>
<option value="NE" >Nebraska</option>
<option value="NV" >Nevada</option>
<option value="NH" >New Hampshire</option>
<option value="NJ" >New Jersey</option>
<option value="NM" >New Mexico</option>
<option value="NY" >New York</option>
<option value="NC" >North Carolina</option>
<option value="ND" >North Dakota</option>
<option value="MP" >Northern Mariana Islands</option>
<option value="OH" >Ohio</option>
<option value="OK" >Oklahoma</option>
<option value="OR" >Oregon</option>
<option value="PA" >Pennsylvania</option>
<option value="PR" >Puerto Rico</option>
<option value="RI" >Rhode Island</option>
<option value="SC" >South Carolina</option>
<option value="SD" >South Dakota</option>
<option value="TN" >Tennessee</option>
<option value="TX" >Texas</option>
<option value="UT" >Utah</option>
<option value="VT" >Vermont</option>
<option value="VI" >Virgin Islands</option>
<option value="VA" >Virginia</option>
<option value="WA" >Washington</option>
<option value="WV" >West Virginia</option>
<option value="WI" >Wisconsin</option>
<option value="WY" >Wyoming</option>
<option value="AA" >Armed Forces (the) Americas</option>
<option value="AE" >Armed Forces Europe</option>
<option value="AP" >Armed Forces Pacific</option>
<option value="AB" >Alberta</option>
<option value="BC" >British Columbia</option>
<option value="MB" >Manitoba</option>
<option value="NF" >Newfoundland</option>
<option value="NB" >New Brunswick</option>
<option value="NS" >Nova Scotia</option>
<option value="NT" >Northwest Territories</option>
<option value="NU" >Nunavut</option>
<option value="ON" >Ontario</option>
<option value="PE" >Prince Edward Island</option>
<option value="QC" >Quebec</option>
<option value="SK" >Saskatchewan</option>
<option value="YT" >Yukon Territory</option>
<option value="ot" >Other</option>
<?php }if ($fields["Country"]) { ?>
<label for="State">Country</label>
<select id="Country" name='Country' class="">
<option value="">Select Country</option>
<option value="US" >United States</option>
<option value="CA" >Canada</option>
<option value="AU" >Australia</option>
<option value="GB" >United Kingdom</option>
<option value="ID" >Indonesia</option>
<option value="" >---------</option>
<option value="AF" >Afghanistan</option>
<option value="AL" >Albania</option>
<option value="DZ" >Algeria</option>
<option value="AS" >American Samoa</option>
<option value="AD" >Andorra</option>
<option value="AO" >Angola</option>
<option value="AI" >Anguilla</option>
<option value="AQ" >Antarctica</option>
<option value="AG" >Antigua and Barbuda</option>
<option value="AR" >Argentina</option>
<option value="AM" >Armenia</option>
<option value="AW" >Aruba</option>
<option value="AU" >Australia</option>
<option value="AT" >Austria</option>
<option value="AZ" >Azerbaijan</option>
<option value="BS" >Bahamas</option>
<option value="BH" >Bahrain</option>
<option value="BD" >Bangladesh</option>
<option value="BB" >Barbados</option>
<option value="BY" >Belarus</option>
<option value="BE" >Belgium</option>
<option value="BZ" >Belize</option>
<option value="BJ" >Benin</option>
<option value="BM" >Bermuda</option>
<option value="BT" >Bhutan</option>
<option value="BO" >Bolivia</option>
<option value="BA" >Bosnia and Herzegovina</option>
<option value="BW" >Botswana</option>
<option value="BV" >Bouvet Island</option>
<option value="BR" >Brazil</option>
<option value="IO" >British Indian Ocean Territory</option>
<option value="BN" >Brunei Darussalam</option>
<option value="BG" >Bulgaria</option>
<option value="BF" >Burkina Faso</option>
<option value="BI" >Burundi</option>
<option value="KH" >Cambodia</option>
<option value="CM" >Cameroon</option>
<option value="CA" >Canada</option>
<option value="CV" >Cape Verde</option>
<option value="KY" >Cayman Islands</option>
<option value="CF" >Central African Republic</option>
<option value="TD" >Chad</option>
<option value="CL" >Chile</option>
<option value="CN" >China</option>
<option value="CX" >Christmas Island</option>
<option value="CC" >Cocos (Keeling) Islands</option>
<option value="CO" >Colombia</option>
<option value="KM" >Comoros</option>
<option value="CG" >Congo</option>
<option value="CD" >Congo, The Democratic Republic of the</option>
<option value="CK" >Cook Islands</option>
<option value="CR" >Costa Rica</option>
<option value="CI" >Cote D'Ivoire</option>
<option value="HR" >Croatia</option>
<option value="CU" >Cuba</option>
<option value="CY" >Cyprus</option>
<option value="CZ" >Czech Republic</option>
<option value="DK" >Denmark</option>
<option value="DJ" >Djibouti</option>
<option value="DM" >Dominica</option>
<option value="DO" >Dominican Republic</option>
<option value="TL" >East Timor</option>
<option value="EC" >Ecuador</option>
<option value="EG" >Egypt</option>
<option value="SV" >El Salvador</option>
<option value="GQ" >Equatorial Guinea</option>
<option value="ER" >Eritrea</option>
<option value="EE" >Estonia</option>
<option value="ET" >Ethiopia</option>
<option value="FK" >Falkland Islands (Malvinas)</option>
<option value="FO" >Faroe Islands</option>
<option value="FJ" >Fiji</option>
<option value="FI" >Finland</option>
<option value="FR" >France</option>
<option value="FX" >France, Metropolitan</option>
<option value="GF" >French Guiana</option>
<option value="PF" >French Polynesia</option>
<option value="TF" >French Southern Territories</option>
<option value="GA" >Gabon</option>
<option value="GM" >Gambia</option>
<option value="GE" >Georgia</option>
<option value="DE" >Germany</option>
<option value="GH" >Ghana</option>
<option value="GI" >Gibraltar</option>
<option value="GR" >Greece</option>
<option value="GL" >Greenland</option>
<option value="GD" >Grenada</option>
<option value="GP" >Guadeloupe</option>
<option value="GU" >Guam</option>
<option value="GT" >Guatemala</option>
<option value="GN" >Guinea</option>
<option value="GW" >Guinea-Bissau</option>
<option value="GY" >Guyana</option>
<option value="HT" >Haiti</option>
<option value="HM" >Heard and McDonald Islands</option>
<option value="VA" >Holy See (Vatican City State)</option>
<option value="HN" >Honduras</option>
<option value="HK" >Hong Kong</option>
<option value="HU" >Hungary</option>
<option value="IS" >Iceland</option>
<option value="IN" >India</option>
<option value="ID" >Indonesia</option>
<option value="IR" >Iran, Islamic Republic of</option>
<option value="IQ" >Iraq</option>
<option value="IE" >Ireland</option>
<option value="IL" >Israel</option>
<option value="IT" >Italy</option>
<option value="JM" >Jamaica</option>
<option value="JP" >Japan</option>
<option value="JO" >Jordan</option>
<option value="KZ" >Kazakhstan</option>
<option value="KE" >Kenya</option>
<option value="KI" >Kiribati</option>
<option value="KP" >Korea, Dem. People's Republic of</option>
<option value="KR" >Korea, Republic of</option>
<option value="KW" >Kuwait</option>
<option value="KG" >Kyrgyzstan</option>
<option value="LA" >Lao People's Democratic Republic</option>
<option value="LV" >Latvia</option>
<option value="LB" >Lebanon</option>
<option value="LS" >Lesotho</option>
<option value="LR" >Liberia</option>
<option value="LY" >Libyan Arab Jamahiriya</option>
<option value="LI" >Liechtenstein</option>
<option value="LT" >Lithuania</option>
<option value="LU" >Luxembourg</option>
<option value="MO" >Macao</option>
<option value="MK" >Macedonia, Former Yugoslav Republic</option>
<option value="MG" >Madagascar</option>
<option value="MW" >Malawi</option>
<option value="MY" >Malaysia</option>
<option value="MV" >Maldives</option>
<option value="ML" >Mali</option>
<option value="MT" >Malta</option>
<option value="MH" >Marshall Islands</option>
<option value="MQ" >Martinique</option>
<option value="MR" >Mauritania</option>
<option value="MU" >Mauritius</option>
<option value="YT" >Mayotte</option>
<option value="MX" >Mexico</option>
<option value="FM" >Micronesia, Federated States of</option>
<option value="MD" >Moldova, Republic of</option>
<option value="MC" >Monaco</option>
<option value="MN" >Mongolia</option>
<option value="MS" >Montserrat</option>
<option value="MA" >Morocco</option>
<option value="MZ" >Mozambique</option>
<option value="MM" >Myanmar</option>
<option value="NA" >Namibia</option>
<option value="NR" >Nauru</option>
<option value="NP" >Nepal</option>
<option value="NL" >Netherlands</option>
<option value="AN" >Netherlands Antilles</option>
<option value="NC" >New Caledonia</option>
<option value="NZ" >New Zealand</option>
<option value="NI" >Nicaragua</option>
<option value="NE" >Niger</option>
<option value="NG" >Nigeria</option>
<option value="NU" >Niue</option>
<option value="NF" >Norfolk Island</option>
<option value="MP" >Northern Mariana Islands</option>
<option value="NO" >Norway</option>
<option value="OM" >Oman</option>
<option value="PK" >Pakistan</option>
<option value="PW" >Palau</option>
<option value="PS" >Palestinian Territory, Occupied</option>
<option value="PA" >Panama</option>
<option value="PG" >Papua New Guinea</option>
<option value="PY" >Paraguay</option>
<option value="PE" >Peru</option>
<option value="PH" >Philippines</option>
<option value="PN" >Pitcairn</option>
<option value="PL" >Poland</option>
<option value="PT" >Portugal</option>
<option value="PR" >Puerto Rico</option>
<option value="QA" >Qatar</option>
<option value="RE" >Reunion</option>
<option value="RO" >Romania</option>
<option value="RU" >Russian Federation</option>
<option value="RW" >Rwanda</option>
<option value="SH" >Saint Helena</option>
<option value="KN" >Saint Kitts and Nevis</option>
<option value="LC" >Saint Lucia</option>
<option value="PM" >Saint Pierre and Miquelon</option>
<option value="VC" >Saint Vincent and the Grenadines</option>
<option value="WS" >Samoa</option>
<option value="SM" >San Marino</option>
<option value="ST" >Sao Tome and Principe</option>
<option value="SA" >Saudi Arabia</option>
<option value="SN" >Senegal</option>
<option value="SP" >Serbia</option>
<option value="SC" >Seychelles</option>
<option value="SL" >Sierra Leone</option>
<option value="SG" >Singapore</option>
<option value="SK" >Slovakia</option>
<option value="SI" >Slovenia</option>
<option value="SB" >Solomon Islands</option>
<option value="SO" >Somalia</option>
<option value="ZA" >South Africa</option>
<option value="SS" >South Sudan</option>
<option value="GS" >S. Georgia and S. Sandwich Islands</option>
<option value="ES" >Spain</option>
<option value="LK" >Sri Lanka</option>
<option value="SD" >Sudan</option>
<option value="SR" >Suriname</option>
<option value="SJ" >Svalbard and Jan Mayen</option>
<option value="SZ" >Swaziland</option>
<option value="SE" >Sweden</option>
<option value="CH" >Switzerland</option>
<option value="SY" >Syrian Arab Republic</option>
<option value="TW" >Taiwan</option>
<option value="TJ" >Tajikistan</option>
<option value="TZ" >Tanzania, United Republic of</option>
<option value="TH" >Thailand</option>
<option value="TG" >Togo</option>
<option value="TK" >Tokelau</option>
<option value="TO" >Tonga</option>
<option value="TT" >Trinidad and Tobago</option>
<option value="TN" >Tunisia</option>
<option value="TR" >Turkey</option>
<option value="TM" >Turkmenistan</option>
<option value="TC" >Turks and Caicos Islands</option>
<option value="TV" >Tuvalu</option>
<option value="UG" >Uganda</option>
<option value="UA" >Ukraine</option>
<option value="AE" >United Arab Emirates</option>
<option value="GB" >United Kingdom</option>
<option value="UM" >United States Outlying Islands</option>
<option value="UY" >Uruguay</option>
<option value="UZ" >Uzbekistan</option>
<option value="VU" >Vanuatu</option>
<option value="VE" >Venezuela</option>
<option value="VN" >Vietnam</option>
<option value="VG" >Virgin Islands, British</option>
<option value="VI" >Virgin Islands, U.S.</option>
<option value="WF" >Wallis and Futuna</option>
<option value="EH" >Western Sahara</option>
<option value="YE" >Yemen</option>
<option value="YU" >Yugoslavia</option>
<option value="ZR" >Zaire</option>
<option value="ZM" >Zambia</option>
<option value="ZW" >Zimbabwe</option>
<?php } if ($fields["Zip"]) { ?>
<label for="Zip">Postal / ZIP Code</label><input id="Zip" type="text" name="Zip" class="full required" />
<?php }?>
} #end not loged in user
if ($a['form_html']){
echo $a['form_html'];
if (($a['form_html_2']) && ($_REQUEST['sp'])){
echo $a['form_html_2'];
if ($a['email_trigger_KEYS']){
<input type="hidden" name="email_trigger_KEYS" value="<?php echo $a['email_trigger_KEYS'] ;?>" />
<?php }
$optional =explode (',',$a['optionally_add_to_groups_KEYS'] );
$opt = $optional[1];
if ($opt){ ?>
<input type="checkbox" name="groups_KEY<?php echo $opt ;?>_checkbox" value="" checked="<?php echo $a['optionally_add_to_groups_checked'] ;?>" /><?php echo $a['optionally_add_to_groups_label'] ;?><br />
if ($a['add_to_groups_KEYS']) {
$add =explode (',',$a['add_to_groups_KEYS'] );
for($i = 1; $i <= sizeof($add); ++$i){
if ($add[$i]){
<input type="hidden" value="groups" name="link">
<input type="hidden" value="<?php echo $add[$i] ;?>" name="linkKey">
if ($a['action_KEY']) { ?>
<input type="hidden" value="action" name="link">
<input type="hidden" value="<?php echo $a['action_KEY'] ;?>" name="linkKey">
<?php }
if (!$a['action_button_text'] ) { $a['action_button_text'] = 'Take Action';}
<input type="submit" value="<?php echo $a['action_button_text'] ;?>" class="submit">
<div id ="opt_in">By taking action, you will receive periodic updates from us. You can unsubscribe at any time.</div>
<div id="wrapper" class="clearfix">
<div class="container">
<div id="content" class="white clearfix">
<div class="padding"><?php echo $a['Description'] ; ?></div>
<?php if (!$pet['personal_petition']) { ?>
<div class="share" style="margin: 0pt 20px; width: 500px;">
<div class="wrap">
<div class="alignleft" style="width:200px;">
<h4>Share this campaign</h4>
<ul class="social">
<?php $fb_url = urlencode(''.$a['campaign_slug'].'/?t=f&r='.$supporter_KEY);
<li> <a name="fb_share" type="icon" class="facebook" share_url="<?php echo $fb_url ;?>">Share</a><!-- <span class="count"><?php echo $a['facebook_shares']; ?></span>--></li>
<li> <a class="twitter" href="<?php echo urlencode($a['tweet']); ?>"></a> <!--<span class="count"><?php echo $a['twitter_shares']; ?></span>--></li>
<div class="alignleft">
<p class="description" style="padding-bottom:15px;">Here's a link to this campaign -- copy and paste to share this page with friends</p>
<input type="text" style="font-size: 14px;width: 216px;height:32px; padding:0 5px;vertical-align:middle;" value="<?php echo $a['campaign_slug'] ;?>/?t=v&r=<?php echo $supporter_KEY ;?>" onClick=";" />
<div id="aside">
<ul id="wrap"></ul>
<?php }else {
#personal pettion share info
<div class="petition_taf">
<div class="share box">
<h1 id="share-head">Tell Your Friends</h1>
<div class="facebook-post box"><div class="box-padder">
<h2>Share on Facebook</h2>
<p class="thumbnail">
<img src="<?php echo $a['image_facebook']; ?>" />
<p class="description">
<?php if ($pet['facebook_message']) { echo $pet['facebook_message']; } else { ?> Post a link to Facebook: <?php } ?>
<p class="trigger">
<a href="<?php echo $a['campaign_slug'] ;?>/p/<?php echo $pet['supporter_KEY'];?>/?t=f" target="_blank">Post to your wall</a>
</div></div><!-- .facebook-post -->
<div class="tweet-this box"><div class="box-padder">
<?php #TO DO: add tracking url to tweets ;?>
<textarea class="box"><?php echo $pet['twitter_message']; ?></textarea>
<p class="trigger"><a href="<?php echo urlencode($pet['twitter_message'].''.$a['campaign_slug'].'/p/'.$pet['supporter_KEY'].'/?r=t'); ?>" target="_blank">Tweet this</a></p>
</div></div> <!-- .tweet-this -->
<div class="email-friends box"><div class="box-padder">
<h2>Email your friends</h2>
<p class="trigger">
<?php # TO DO add tracking url to the letter body) ;?>
<a href="mailto:?subject=<?php echo $a['Title']; ?>&body=<?php echo $pet['email_message']; ?>.%0D%0A%0D%0A<?php echo $a['campaign_slug']; ?>/p/<?php echo $pet['supporter_KEY'];?>/?t=a" >Email your friends</a>
Or, copy and paste the text below into an email message:
<div class="copy-paste" style="height:197px;">
<p><?php echo $a['Title']; ?></p>
<?php echo $pet['email_text']; ?>
<a href="<?php echo $a['campaign_slug']; ?>/p/<?php echo $pet['supporter_KEY'];?>/?t=a"><?php echo $a['campaign_slug']; ?>/p/<?php echo $pet['supporter_KEY'];?>/?t=a</a>
</div> <!-- .copy-paste -->
</div></div> <!-- .email-friends -->
<div class="copy-link box"><div class="box-padder">
<h2>Share this link</h2>
<p>Copy the link to this campaign to IM, Skype or post it:</p>
<input type="text" id="spread_copy_text" name="url" class="url" value="<?php echo $a['campaign_slug'] ;?>/p/<?php echo $pet['supporter_KEY'];?>/?t=v">
<?php #TO DO add paste buffer button ?>
</div></div> <!-- /copy-link -->
<?php } ?>
<div id="footer">
<!-- Contact -->
<p class="centered">221 Pine Street, 5th Floor, San Francisco, CA 94104 USA |
<a href="tel:4153984404">415 398 4404</a> |
415 398 2732 fax |
<a href=""></a>
<!-- Legal -->
<p class="centered"><a href="/privacy-policy">Privacy Policy</a> |
<a href="/anti-oppression-principles">Anti-oppression Principles</a> |
<a href="/non-violence-statement">Non-violence Statement</a> |
<a href="/financial-statement">Financial Statement</a> |
<a href="/sitemap">Site Map</a> |
<a href="/">Home</a>
<p class="centered">&copy; 1995&ndash;2011 Rainforest Action Network |
<a href="/about-ran">About Us</a> |
<a href="/contact-ran">Contact Us</a>
<script type="text/javascript">actionkit.forms.contextRoot='//';actionkit.forms.initForm('act');</script>
<script type="text/javascript">var BASE_URL='';</script>
<script type="text/javascript" src=""></script>
<script type="text/javascript" src=""></script>
<script type="text/javascript" src="//"></script>
<script type="text/javascript" src=""></script>
Jump to Line
Something went wrong with that request. Please try again.