$image_match = ''; $image_params = array( 'w' => 100, 'contribution' => true, ); $name = $campaign->title; $photo_file = 'sites/all/themes/dw_campaigns_walking/images/no-image.gif'; $temp_filename = $campaign->field_dw_campaign_image[0]['filepath']; if(file_exists($temp_filename)) { $photo_file = $temp_filename; } $photo = _dw_campaigns_thumb($photo_file, $image_params); $amount = dw_campaigns_convert_to_usd($campaign->field_dw_currency['0']['value'], $totals[$nid]); $raw_amount = $totals[$nid]; $location = $campaign->field_dw_campaign_location[0]['value']; $fundraisers = $pcp_counts[$nid]; $url = '/dw/walking/location/' . $nid; db_query("insert into {leader_as_$num_per_page} (name, photo, position, amount, raw_amount, location, fundraisers, url, campaign_id) VALUES ('%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s')", $name, $photo, $position, $amount, $raw_amount, $location, $fundraisers, $url, $campaign->nid); } $sql_count = "select count(*) from leader_as_$num_per_page"; //$result = db_query("select * from donations_as " . tablesort_sql($headers)); $result = pager_query("select * from leader_as_$num_per_page " . tablesort_sql($headers), $num_per_page, 0, $sql_count);
// we are on the wrong page - we do the class in the middle of the page currently :) $location_create_url = "/dw/user/edit_page"; $location_create_link_words = t('Edit My Page'); $location_create_class = "location-mismatch"; $location_create_class = ''; } // 350 x 245 is about the size of the box $background_image = ''; if(!is_null($campaign)) { $temp_filename = $campaign->field_dw_campaign_image[0]['filepath']; if(file_exists($temp_filename)) { $image_params = array( 'w' => 620, ); $thumb = $image = _dw_campaigns_thumb($temp_filename, $image_params); $background_image = "background:transparent url('$thumb') no-repeat left top;"; } $vid = dw_campaigns_get_youtube($campaign->field_dw_campaign_youtube[0]['value']); } ?> <script type="text/javascript"> $(document).ready(function() { var my_loc = <?php echo $my_location;?>; $(".location-not-found").click(function(){ alert('Please Select a Location from the Find a Walk Menu before Creating A Fundraising Page'); return false; });