Ejemplo n.º 1
0
        ?>
;" href="<?php 
        echo get_permalink($prd->ID);
        ?>
"><?php 
        echo $prd->post_title;
        ?>
</a></p>
                                    </div>
                                    <div class="description">
                                        <p class="price" style="color: <?php 
        echo get_field('wdrink_category_text_color', 'products_cat_' . $item->term_id);
        ?>
;"><?php 
        if (get_field('product_gia_500', $prd->ID) != '') {
            echo number_format(get_field('product_gia_500', $prd->ID)) . get_custom('product_unit');
        }
        ?>
</p>
                                    </div>
                                </li>
    <?php 
    }
    ?>
    <?php 
    wp_reset_query();
    ?>
                        </ul>
                    </div>
                    <p class="xemnhieuhon" style="text-align: right;height: 30px;">
                        <a href="<?php 
Ejemplo n.º 2
0
<div class="email-call-block">
	<div class="email-call">
		<img src="<?php 
echo get_template_directory_uri();
?>
/library/images/email-us.png">
		<div class="contact-method">
			<h3>Email Us:</h3>
			<p><?php 
get_custom('contact_email');
?>
</p>
		</div>
	</div>
	<div class="email-call">
		<img src="<?php 
echo get_template_directory_uri();
?>
/library/images/call-us.png">
		<div class="contact-method">
			<h3>Call Us:</h3>
			<p><?php 
get_custom('contact_number');
?>
</p>
		</div>
	</div>
</div>
Ejemplo n.º 3
0
            </ul>
        </div>
        
        <div class="col col14">
            <h4>Twitter</h4>
            <ul class="no_bullet">
                <li><a href="#">@templatemo</a> at scelerisque urna in tellus varius ultricies ante gravid sed eu vulputate.</li>
                <li>Suspendisse enean <a href="#">#FREE</a> tincidunt massa in tellus varius ultricies. Ut eget ante sem.</li>
                <li> Aenean tincidunt massa in tellus varius et. Nullam metus ut diam neque. <a href="#">http://bit.ly/13IwZO</a></li>
            </ul>
        </div>
        
        <div class="col col14 no_margin_right">
            <h4>About</h4>
            <p>
            Etiam tempus volutpat velit eget egestas. Sed tempor, sapien a tincidunt commodo, ante nisl aliquam tortor, et tempus tellus ante vitae elit. Vivamus eget justo est, ac auctor nibh. Mauris sed pretium turpis. Proin vitae nibh enim, vel blandit massa. Maecenas sit amet elit lectus, id porttitor dignissim lacus.</p>
        </div>
        
        <div class="cleaner"></div>
    </div>
    
    <div id="templatemo_footer_wrapper">
        <div id="templatemo_footer">
           <?php 
echo get_custom('copy');
?>
        </div>
    </div>
</div>
</body>
</html>
Ejemplo n.º 4
0
    $result = mysql_fetch_array($query);
    return $result;
}
// GET
function get_custom($post_id_param, $post_lang_code)
{
    $conn = connDB();
    $sql = "SELECT * FROM tbl_category_lang WHERE `id_param` = '{$post_id_param}' AND `language_code` = '{$post_lang_code}'";
    $query = mysql_query($sql, $conn);
    $result = mysql_fetch_array($query);
    return $result;
}
// CALL FUNCTION
$language = get_languages();
$check = count_custom($ajx_id, $ajx_lang);
$get = get_custom($ajx_id, $ajx_lang);
/* -- DEFAULT --*/
// GET
function get_default($post_cat_id)
{
    $conn = connDB();
    $sql = "SELECT * FROM tbl_category WHERE `category_id` = '{$post_cat_id}'";
    $query = mysql_query($sql, $conn);
    $result = mysql_fetch_array($query);
    return $result;
}
// CALL FUNCTION
$default = get_default($ajx_id);
// CONTROL
if ($check['rows'] > 0) {
    $lang_category_name = $get['category_name'];
Ejemplo n.º 5
0
// CALL FUNCTION
$language = get_languages();
$check = count_custom($ajx_id, $ajx_lang);
$get = get_custom($ajx_id, $ajx_lang);
/* -- DEFAULT --*/
// GET
function get_default($post_cat_id)
{
    $conn = connDB();
    $sql = "SELECT * FROM tbl_category WHERE `category_id` = '{$post_cat_id}'";
    $query = mysql_query($sql, $conn);
    $result = mysql_fetch_array($query);
    return $result;
}
// CALL FUNCTION
$default = get_custom($ajx_id, $ajx_lang);
// CONTROL
if ($check['rows'] > 0) {
    $lang_category_name = $get['category_name'];
} else {
    $lang_category_name = $default['category_name'];
}
echo "<select class=\"input-select\" style=\"margin-bottom: 15px\" onChange=\"changeLanguage()\" id=\"id_custom_select_lang\" name=\"custom_option_lang\">";
echo "  <option value=\"default\">English</option>";
foreach ($language as $language) {
    echo "  <option value=\"" . $language['language_code'] . "\" selected=\"selected\">" . $language['language_name'] . "</option>";
}
echo "</select>";
?>

<li class="field hidden">
Ejemplo n.º 6
0
    ?>
">Instagram</a></li>
						</ul>

						<p class="source-org copyright helvetica small">&copy; <?php 
    echo date('Y');
    ?>
 <?php 
    bloginfo('name');
    ?>
.</p>
						<p class="source-org copyright helvetica small"><a href="/terms">Terms</a> | <a href="/privacy">Privacy</a></p>
					</div>
				</div>

			</footer>
			<?php 
}
?>

		<?php 
get_custom('footer_scripts');
?>
		<?php 
wp_footer();
?>
		

	</body>

</html> <!-- end of site. what a ride! -->
Ejemplo n.º 7
0
</cite>
									<p><?php 
get_custom('testimonial_1_testimonial');
?>
</p>
								</blockquote>
							</div>

							<div class="testimonial">
								<img src="<?php 
get_custom('testimonial_2_img');
?>
" >
								<blockquote class="testimonial-content">
									<cite><?php 
get_custom('testimonial_2_name');
?>
, <br><?php 
get_custom('testimonial_2_position');
?>
</cite>
									<p><?php 
get_custom('testimonial_2_testimonial');
?>
</p>
								</blockquote>
							</div>

						</div>
					</div>
				</section>
Ejemplo n.º 8
0
function settings_page()
{
    global $pagenow;
    $settings = get_option("theme_settings");
    $theme_data = get_theme_data(TEMPLATEPATH . '/style.css');
    ?>
	
	<div class="wrap">
		<h2><?php 
    echo $theme_data['Name'];
    ?>
 Theme Settings</h2>
		
		<?php 
    if ('true' == esc_attr($_GET['updated'])) {
        echo '<div class="updated" ><p>Theme Settings updated.</p></div>';
    }
    if (isset($_GET['tab'])) {
        admin_tabs($_GET['tab']);
    } else {
        admin_tabs('general');
    }
    ?>

		<div id="poststuff">
			<form method="post" action="<?php 
    admin_url('themes.php?page=theme-settings');
    ?>
">
				<?php 
    wp_nonce_field("ilc-settings-page");
    if ($pagenow == 'themes.php' && $_GET['page'] == 'theme-settings') {
        if (isset($_GET['tab'])) {
            $tab = $_GET['tab'];
        } else {
            $tab = 'general';
        }
        echo '<table class="form-table">';
        switch ($tab) {
            case 'general':
                ?>
							<tr>
								<th><label for="login_url">Login URL:</label></th>
								<td>
									<input id="login_url" name="login_url" cols="60" type="text" value="<?php 
                echo esc_html(stripslashes($settings["login_url"]));
                ?>
" /> 
									<span class="description">Default login URL for nav</span>
								</td>
							</tr>
							<tr>
								<th><label for="signup_url">Signup URL:</label></th>
								<td>
									<input id="signup_url" name="signup_url" cols="60" type="text" value="<?php 
                echo esc_html(stripslashes($settings["signup_url"]));
                ?>
" /> 
									<span class="description">Default signup URL for nav</span>
								</td>
							</tr>
							<tr>
								<th><label for="blog_title">Blog Title:</label></th>
								<td>
									<input id="blog_title" name="blog_title" cols="60" type="text" value="<?php 
                echo esc_html(stripslashes($settings["blog_title"]));
                ?>
" /> 
									<span class="description">Header in green header block on each blog post.</span>
								</td>
							</tr>
							<tr>
								<th><label for="blog_subtitle">Blog Subtitle:</label></th>
								<td>
									<input id="blog_subtitle" name="blog_subtitle" cols="60" type="text" value="<?php 
                echo esc_html(stripslashes($settings["blog_subtitle"]));
                ?>
" /> 
									<span class="description">Subtitle in green header block on each blog post.</span>
								</td>
							</tr>
							<tr>
								<th><label for="contact_email">Public Email Address:</label></th>
								<td>
									<input id="contact_email" name="contact_email" cols="60" type="text" value="<?php 
                echo esc_html(stripslashes($settings["contact_email"]));
                ?>
" /> 
								</td>
							</tr>
							<tr>
								<th><label for="contact_number">Public Phone Number:</label></th>
								<td>
									<input id="contact_number" name="contact_number" cols="60" type="text" value="<?php 
                echo esc_html(stripslashes($settings["contact_number"]));
                ?>
" /> 
								</td>
							</tr>

							<tr>
								<th><label for="blog_footer_h2">Blog Footer Title:</label></th>
								<td>
									<input id="blog_footer_h2" name="blog_footer_h2" cols="60" type="text" value="<?php 
                echo esc_html(stripslashes($settings["blog_footer_h2"]));
                ?>
" /> 
								</td>
							</tr>
							<tr>
								<th><label for="blog_footer_subtitle">Bloog Footer Subtitle:</label></th>
								<td>
									<input id="blog_footer_subtitle" name="blog_footer_subtitle" cols="60" type="text" value="<?php 
                echo esc_html(stripslashes($settings["blog_footer_subtitle"]));
                ?>
" /> 
								</td>
							</tr>

							<tr>
								<th><label for="blog_footer_primary_button_url">Blog Footer Button URL:</label></th>
								<td>
									<input id="blog_footer_primary_button_url" name="blog_footer_primary_button_url" cols="60" type="text" value="<?php 
                echo esc_html(stripslashes($settings["blog_footer_primary_button_url"]));
                ?>
" /> 
								</td>
							</tr>

							<tr>
								<th><label for="blog_footer_primary_button_text">Blog Footer Button Text:</label></th>
								<td>
									<input id="blog_footer_primary_button_text" name="blog_footer_primary_button_text" cols="60" type="text" value="<?php 
                echo esc_html(stripslashes($settings["blog_footer_primary_button_text"]));
                ?>
" /> 
								</td>
							</tr>

							<?php 
                break;
            case 'testimonials':
                ?>
							<tr>
								<th><label for="testimonial_1_img">Testimonial 1 Image</label></th>
								<td>
									<img class="testimonial_1_img" src="<?php 
                echo get_custom('testimonial_1_img');
                ?>
" height="100" width="100"/><br>
									<input class="testimonial_1_img_url" type="text" name="testimonial_1_img" size="60" value="<?php 
                echo get_custom('testimonial_1_img');
                ?>
"><br/>
									<a href="#" class="testimonial_1_img_upload">Upload</a>
								</td>
							</tr>
							<tr>
								<th><label for="btestimonial_1_name">Testimonial 1 Name:</label></th>
								<td>
									<input id="testimonial_1_name" name="testimonial_1_name" cols="60" type="text" value="<?php 
                echo get_custom('testimonial_1_name');
                ?>
" /> <br/>
									<span class="description">Subtitle in green header block on each blog post.</span>
								</td>
							</tr>
							<tr>
								<th><label for="testimonial_1_position">Testimonial 1 Position:</label></th>
								<td>
									<input id="testimonial_1_position" name="testimonial_1_position" cols="60" type="text" value="<?php 
                echo get_custom('testimonial_1_position');
                ?>
" /> <br/>
									<span class="description">First Testimonial Job/Company</span>
								</td>
							</tr>
							<tr>
								<th><label for="testimonial_1_testimonial">Testimonial 1 Testimonial:</label></th>
								<td>
									<textarea id="testimonial_1_testimonial" name="testimonial_1_testimonial" cols="60" type="text" value="<?php 
                echo get_custom('testimonial_1_testimonial');
                ?>
" /><?php 
                echo get_custom('testimonial_1_testimonial');
                ?>
</textarea><br/>
									<span class="description">The Testimonial</span>
								</td>
							</tr>



							<tr>
								<th><label for="testimonial_2_img">Testimonial 2 Image</label></th>
								<td>
									<img class="testimonial_2_img" src="<?php 
                echo get_custom('testimonial_2_img');
                ?>
" height="100" width="100"/><br>
									<input class="testimonial_2_img_url" type="text" name="testimonial_2_img" size="60" value="<?php 
                echo get_custom('testimonial_2_img');
                ?>
"><br/>
									<a href="#" class="testimonial_2_img_upload">Upload</a>
								</td>
							</tr>
							<tr>
								<th><label for="btestimonial_2_name">Testimonial 2 Name:</label></th>
								<td>
									<input id="testimonial_2_name" name="testimonial_2_name" cols="60" type="text" value="<?php 
                echo get_custom('testimonial_2_name');
                ?>
" /> <br/>
									<span class="description">Subtitle in green header block on each blog post.</span>
								</td>
							</tr>
							<tr>
								<th><label for="testimonial_2_position">Testimonial 2 Position:</label></th>
								<td>
									<input id="testimonial_2_position" name="testimonial_2_position" cols="60" type="text" value="<?php 
                echo get_custom('testimonial_2_position');
                ?>
" /> <br/>
									<span class="description">First Testimonial Job/Company</span>
								</td>
							</tr>
							<tr>
								<th><label for="testimonial_2_testimonial">Testimonial 2 Testimonial:</label></th>
								<td>
									<textarea id="testimonial_2_testimonial" name="testimonial_2_testimonial" cols="60" type="text" value="<?php 
                echo get_custom('testimonial_2_testimonial');
                ?>
" /><?php 
                echo get_custom('testimonial_2_testimonial');
                ?>
</textarea><br/>
									<span class="description">The Testimonial</span>
								</td>
							</tr>
							<?php 
                break;
            case 'footer':
                ?>
							<tr>
								<th><label for="footer_scripts">Insert Scripts here</label></th>
								<td>
									<textarea id="footer_scripts" name="footer_scripts" cols="60" rows="5"><?php 
                echo esc_html(stripslashes($settings["footer_scripts"]));
                ?>
</textarea><br/>
									<span class="description">Tracking codes go here (i.e. Google Analytics)</span>
								</td>
							</tr>
							<tr>
								<th><label for="facebook_url">Facebook URL:</label></th>
								<td>
									<input id="facebook_url" name="facebook_url" cols="60" type="text" value="<?php 
                echo esc_html(stripslashes($settings["facebook_url"]));
                ?>
" /> 
								</td>
							</tr>
							<tr>
								<th><label for="twitter_url">Twitter URL:</label></th>
								<td>
									<input id="twitter_url" name="twitter_url" cols="60" type="text" value="<?php 
                echo esc_html(stripslashes($settings["twitter_url"]));
                ?>
" /> 
								</td>
							</tr>
							<tr>
								<th><label for="linkedin_url">LinkedIn URL:</label></th>
								<td>
									<input id="linkedin_url" name="linkedin_url" cols="60" type="text" value="<?php 
                echo esc_html(stripslashes($settings["linkedin_url"]));
                ?>
" /> 
								</td>
							</tr>
							<tr>
								<th><label for="instagram_url">Instagram URL:</label></th>
								<td>
									<input id="instagram_url" name="instagram_url" cols="60" type="text" value="<?php 
                echo esc_html(stripslashes($settings["instagram_url"]));
                ?>
" /> 
								</td>
							</tr>
							<?php 
                break;
        }
        echo '</table>';
    }
    ?>
				<p class="submit" style="clear: both;">
					<input type="submit" name="Submit"  class="button-primary" value="Update Settings" />
					<input type="hidden" name="ilc-settings-submit" value="Y" />
				</p>
			</form>
		</div>

	</div>

	<script>
    jQuery(document).ready(function($) {
        $('.testimonial_1_img_upload').click(function(e) {
            e.preventDefault();

            var custom_uploader = wp.media({
                title: 'Custom Image',
                button: {
                    text: 'Upload Image'
                },
                multiple: false  // Set this to true to allow multiple files to be selected
            })
            .on('select', function() {
                var attachment = custom_uploader.state().get('selection').first().toJSON();
                $('.testimonial_1_img').attr('src', attachment.url);
                $('.testimonial_1_img_url').val(attachment.url);

            })
            .open();
        });

         $('.testimonial_2_img_upload').click(function(e) {
            e.preventDefault();

            var custom_uploader = wp.media({
                title: 'Custom Image',
                button: {
                    text: 'Upload Image'
                },
                multiple: false  // Set this to true to allow multiple files to be selected
            })
            .on('select', function() {
                var attachment = custom_uploader.state().get('selection').first().toJSON();
                $('.testimonial_2_img').attr('src', attachment.url);
                $('.testimonial_2_img_url').val(attachment.url);

            })
            .open();
        });

          $('.header_testimonial_img_upload').click(function(e) {
            e.preventDefault();

            var custom_uploader = wp.media({
                title: 'Custom Image',
                button: {
                    text: 'Upload Image'
                },
                multiple: false  // Set this to true to allow multiple files to be selected
            })
            .on('select', function() {
                var attachment = custom_uploader.state().get('selection').first().toJSON();
                $('.header_testimonial_img').attr('src', attachment.url);
                $('.header_testimonial_img_url').val(attachment.url);

            })
            .open();
        });
    });
</script>


<?php 
}
Ejemplo n.º 9
0
                        <div class="clr"></div>
                        <form id="frmorder" name="frmorder" action="" method="post" >
                            <input type="hidden" name="link" value="<?php 
    echo get_permalink($post->ID);
    ?>
" />
                            <input type="hidden" name="price500" id="price500" value="<?php 
    echo get_field('product_gia_500', $post->ID);
    ?>
" />							
                            <input type="hidden" name="price1" id="price1" value="<?php 
    echo get_field('product_gia_1', $post->ID);
    ?>
" />							
                            <input type="hidden" name="priceunit" id="priceunit" value="<?php 
    echo get_custom('product_unit');
    ?>
" />							
                            <input type="hidden" name="thanhtien" id="thanhtien" value="" />							
                            <p class="message"></p>
                            <table style="margin-top: 15px;">
                                <tr>
                                    <td><label for="sanpham"><?php 
    _e('Tên sản phẩm');
    ?>
&nbsp;<span class="sp_error">*</span></label></td>
                                    <td><input id="sanpham" name="sanpham" type="text" value="<?php 
    echo $post->post_title;
    ?>
" size="43"></td>
                                </tr>
Ejemplo n.º 10
0
?>
/images/business.jpg" class="business_img fl"/>
            <span class="business_span fl fo"><?php 
echo get_custom('home_welcome');
?>
</span>
            </a>
        </div>
        <div class="business_des fl">
            <span class="fl fo"><?php 
echo get_custom('home_description');
?>
</span>
        </div>
        <a href="<?php 
echo trim(get_custom('home_link _products'));
?>
">
            <img src="<?php 
echo get_template_directory_uri();
?>
/images/cungthuongthuc.png" class="linkprd fl"/>
        </a>
        <div class="clr"></div>
    </div>
</div>



<?php 
get_footer();
Ejemplo n.º 11
0
    $menu = preg_replace('/ class="sub-menu"/', '/ class="menu_sub" /', $menu);
    return $menu;
}
function my_connection_types()
{
    p2p_register_connection_type(array('name' => 'posts_to_projects', 'from' => 'post', 'to' => 'projects'));
}
add_action('p2p_init', 'my_connection_types');
global $_OURCARE_LANG;
global $_OURCARE_OPTIONS;
$_OURCARE_OPTIONS = ['phone_code' => '+380 (44)', 'phone_number' => '234-34-34', 'phone' => '+380 (44) 456-45-54', 'mail' => '*****@*****.**', 'address' => 'Адрес'];
if (!is_admin()) {
    // GET LANG ARRAYS
    $lang = 'ru';
    if (function_exists('pll_current_language')) {
        $lang = pll_current_language();
    }
    if (isset($lang)) {
        if ($lang == '') {
            $lang = 'ru';
        }
    }
    $_OURCARE_LANG = (include "lang/{$lang}.php");
    if (function_exists('get_custom')) {
        $_OURCARE_OPTIONS['phone_code'] = substr(get_custom('phone'), 0, 9);
        $_OURCARE_OPTIONS['phone_number'] = substr(get_custom('phone'), 9);
        $_OURCARE_OPTIONS['phone'] = get_custom('phone');
        $_OURCARE_OPTIONS['mail'] = get_custom('mail');
        $_OURCARE_OPTIONS['address'] = get_custom('address');
    }
}
Ejemplo n.º 12
0
function export_to_saleforce(
  $to_address,
  $account_holder_name = null,
  $account_sort_code = null,
  $account_number = null
) {

  require_once "salesforce-api/soapclient/SforceEnterpriseClient.php";

  try {
    // get a salesforce connection object instance
    $my_sforce_connection = new SforceEnterpriseClient();

    if (SALESFORCE_SANDBOX === true) {
      $from_address = get_custom("worldpay_confirmation_email_from_sandbox");
      $salesforce_password = get_custom("salesforce_password_sandbox");
      $salesforce_security_token = get_custom("salesforce_security_token_sandbox");
      $salesforce_username = get_custom("salesforce_username_sandbox");
      $my_sforce_connection->createConnection(dirname(__FILE__) . "/enterprise_staging.wsdl.xml");
    } else {
      $from_address = get_custom("worldpay_confirmation_email_from");
      $salesforce_password = get_custom("salesforce_password");
      $salesforce_security_token = get_custom("salesforce_security_token");
      $salesforce_username = get_custom("salesforce_username");
      $my_sforce_connection->createConnection(dirname(__FILE__) . "/enterprise_main.wsdl.xml");
    }
    // fill in the definition of the SF system we are connecting
    // Woodenspoon will need to supply an up to date enterprise WSDL
    $ini = ini_set("soap.wsdl_cache_enabled", "0");

    // from userAuth.php or somewhere else
    $my_sforce_connection->login(
      $salesforce_username,
      $salesforce_password . $salesforce_security_token
    );

    $s_contact_obj = new stdclass();
    $s_member_obj = new stdclass();
    $s_direct_deb_obj = new stdclass();

    /*Contact Entry*/
    $s_contact_obj->Email = $_SESSION["email"]; //Monthly
    $s_contact_obj->FirstName = $_SESSION["firstName"];
    $s_contact_obj->LastName = $_SESSION["lastName"];
    $s_contact_obj->MobilePhone = $_SESSION["phone"];
    $s_contact_obj->Salutation = $_SESSION["title"];
    // $s_contact_obj->HomePhone = $_SESSION["home-phone"];

    // if ($_SESSION["date_of_birth"] != "--") { $s_contact_obj->Birthdate = $_SESSION["date_of_birth"]; }
    $s_contact_obj->MailingCity = $_SESSION["town"];
    $s_contact_obj->MailingCountry = $_SESSION["country"];
    $s_contact_obj->MailingPostalCode = $_SESSION["postcode"];
    $s_contact_obj->MailingStreet = $_SESSION["addressLine1"] . " " . $_SESSION["addressLine2"];
    $s_contact_obj->Description = $_SESSION["comments"];
    if ($_SESSION["dataProtection"]) {
      $s_contact_obj->Data_Protection_Received__c = 1;
    }
    $s_contact_obj->Date_Relationship_Begun__c = date("Y-m-d");

    // $s_contact_obj->Primary_Address_Type__c = $_SESSION["address_type"];
    if ($_SESSION["giftAid"] == "true") {
      $s_contact_obj->Said_Yes_to_Gift_Aid__c = 1; //Monthly
    } else {
      $s_contact_obj->Not_eligible_for_Gift_Aid__c = 1; //Monthly
    }
    // create the SF record. This process returns the unique SF id of the record
    // there is NO checking for duplicates here. This is performed in SF.
    $createResponse2 = $my_sforce_connection->create(array($s_contact_obj), "Contact");

    /*Membership Entry*/
    // this field links the just created contact (the id) to the about to be created membership entry
    $s_member_obj->Members_Name__c = $createResponse2[0]->id;

    $s_member_obj->Date_Membership_From__c = date("Y-m-d"); //"2014-08-14";
    // $s_member_obj->Stirred_Into_Action_By__c = $_SESSION["hear_about_us"];

    if ($_SESSION["donationRepetition"] == "oneoff") {
      $s_member_obj->Membership_Status__c = "Non Member";
    } else {
      $s_member_obj->Membership_Status__c = "Member";
    }
    $createResponse1 = $my_sforce_connection->create(array($s_member_obj), "Membership__c");

    /*
    the next two bits of code NEED logic to be placed around them
    I do not know how you are going to decide if this is a direct debit
    or non direct debit money.

    You will need to put an IF ELSE around the next two blocks of code

    Remember these field format values MUST be validated earlier at input
    by the customer

     */
    $s_direct_deb_obj->Payment_Method__c = $_SESSION["paymentMethod"];
    if ($_SESSION["paymentMethod"] == "Direct Debit") {
      /* BLOCK 1 Direct Debit Entry*/
      $s_direct_deb_obj->Bank_Account_Name__c = $account_holder_name;
      $s_direct_deb_obj->Sort_Code__c = $account_sort_code;
      $s_direct_deb_obj->Account_Number__c = $account_number;
      $s_direct_deb_obj->First_Collection_Amount__c = $_SESSION["donationAmountOther"];
      $s_direct_deb_obj->Payment_Type__c = "Membership Payment"; //Monthly
    } else {
      /* BLOCK2 Non-Direct Debit Entry*/
      $s_direct_deb_obj->RecordTypeId = "01240000000DjRYAA0";
      $s_direct_deb_obj->Gift_Amount__c = $_SESSION["donationAmountOther"];
    }

    //Monthly

    if ($_SESSION["donationRepetition"] == "oneoff") {
      $s_direct_deb_obj->Payment_Status__c = "One-off Payment";
      $s_direct_deb_obj->Collection_Frequency__c = "One-off Payment";
      $s_direct_deb_obj->Annual_Reminder__c = date("F");
    } else {
      $s_direct_deb_obj->Payment_Status__c = "Ongoing Collection";
      $s_direct_deb_obj->Payment_Type__c = "Membership Payment";
      if ($_SESSION["donationRepetition"] == "year") {
        $s_direct_deb_obj->Collection_Frequency__c = "Annually";
      }
      if ($_SESSION["donationRepetition"] == "month") {
        $s_direct_deb_obj->Collection_Frequency__c = "Monthly";
      }
    }
    /* end of block 2 */

    /* for both types of collection this bit of code actually creates the record in SF */

    // create the direct debit record in SF - not truely a DD always
    $s_direct_deb_obj->Contact__c = $createResponse2[0]->id;
    $s_direct_deb_obj->Membership__c = $createResponse1[0]->id;
    $createResponse = $my_sforce_connection->create(array($s_direct_deb_obj), "Direct_Debit__c");

    $to = $_SESSION["email"];
    $subject = get_custom("thank_you_email_subject");
    $message = str_replace("%name%", $_SESSION["firstName"], get_custom("thank_you_email_body"));

    $headers[] = "Content-Type: text/plain; charset=UTF-8";
    $headers[] = "From: Woodenspoon <" . $from_address . ">";

    wp_mail($to, $subject, $message, $headers);

    if ($createResponse[0]->success != 1 || $createResponse2[0]->success != 1 || $createResponse1[0]->success != 1) {
      salesforce_error_mail($to_address, $account_holder_name, $account_sort_code, $account_number, $createResponse, $createResponse2, $createResponse1);
    }

  } catch (Exception $e) {
    salesforce_error_mail($to_address, $account_holder_name, $account_sort_code, $account_number, bull, null, null);
  }
  session_destroy();
}
Ejemplo n.º 13
0
" class="button-black-outline nav-button">Log In</a>
						<a href="<?php 
        get_custom('signup_url');
        ?>
" class="button-green-fill nav-button">Sign Up</a>
					<div class="closebutton"></div>
				</nav>

				<div class="dheader-content flex full-width text-center" style="width:100%;">
					<div class="wide-650">
						<h1 class="title"><?php 
        get_custom('blog_title');
        ?>
</h1>
						<p class="subhead"><?php 
        get_custom('blog_subtitle');
        ?>
</p>
					</div>
						
				</div>
			</header>

			<?php 
    } else {
        ?>
			<header class="header flex flex-column background-green flex-wrap <?php 
        if (is_page_template("page-home.php") || is_page_template("page-home-v2.php") || is_page_template("page-home-v3.php")) {
            echo "viewport-height-block";
        }
        ?>
Ejemplo n.º 14
0
function getthefield($thefield)
{
    if (!empty(get_post_meta(get_the_ID(), $thefield, 1))) {
        echo stripslashes(get_post_meta(get_the_ID(), $thefield, 1));
    } else {
        if (!empty(get_custom($thefield))) {
            echo stripslashes(get_custom($thefield));
        } else {
            echo 'PLEASE SPECIFY CONTENT FOR THIS AREA';
        }
    }
}