本文整理汇总了PHP中get_currency_sym函数的典型用法代码示例。如果您正苦于以下问题:PHP get_currency_sym函数的具体用法?PHP get_currency_sym怎么用?PHP get_currency_sym使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了get_currency_sym函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: get_currency_sym
?>
</td>
</tr>
<tr>
<td><span><?php
echo DEAL_CODE_TEXT;
?>
</span>: <?php
echo $transaction_obj->deal_coupon;
?>
</td>
<td><span><?php
echo PAID_AMOUNT;
?>
</span>: <?php
echo get_currency_sym() . number_format($transaction_obj->payable_amt, 2);
?>
</td>
</tr>
<tr>
<td><span><?php
echo PAYMENT_DATE;
?>
</span>: <?php
echo $transaction_obj->payment_date;
?>
</td>
<td><span><?php
echo TRANSACTION_ID;
?>
</span>: <?php
示例2: get_header
<?php
get_header();
global $wpdb, $upload_folder_path, $transection_db_table_name, $last_postid, $is_login;
$select_transql = $wpdb->get_row("select * from {$transection_db_table_name} where trans_id = '" . $_GET['pid'] . "' ");
$is_login = $_REQUEST['is_login'];
$paymentmethod = $select_transql->payment_method;
$paid_amount = get_currency_sym() . number_format($select_transql->payable_amt, 2);
$redirect_url = get_post_meta($select_transql->post_id, 'thankyou_page_url', true);
$fromEmail = get_site_emailId();
$fromEmailName = get_site_emailName();
$paymentupdsql = "select option_value from {$wpdb->options} where option_name ='payment_method_" . $paymentmethod . "'";
$paymentupdinfo = $wpdb->get_results($paymentupdsql);
if ($paymentupdinfo) {
foreach ($paymentupdinfo as $paymentupdinfoObj) {
$option_value = unserialize($paymentupdinfoObj->option_value);
$name = $option_value['name'];
$option_value_str = serialize($option_value);
}
}
if ($is_login == 'N') {
$new_user = NEW_USER_SUCCESS;
}
$buyer_information = "<div style='line-height:30px;'>\n\t\t<div style='float:left;width:350px;'>\n\t\t<lable><strong>" . BILLING_NAME . "</strong></lable> : " . $select_transql->billing_name . "<br />\n\t\t<lable><strong>" . BILLING_ADDRESS . "</strong></lable> : " . $select_transql->billing_add . "<br />\n\t\t</div>\n\t\t<div style='float:left;'>\n\t\t<lable><strong>" . SHIPPING_NAME . "</strong></lable> : " . $select_transql->shipping_name . "<br />\n\t\t<lable><strong>" . SHIPPING_ADDRESS . "</strong></lable> : " . $select_transql->shipping_add . "<br />\n\t\t</div><div style='clear:both'> </div>\n\t\t<lable><strong>" . PAYMET_MODE . "</strong></lable> : " . $name . "<br />\n\t</div>";
if ($paymentmethod == 'prebanktransfer') {
$filecontent = stripslashes(get_option('post_pre_bank_trasfer_msg_content'));
if ($filecontent == "") {
$filecontent = __('<p>Thanks you, your information has been successfully received.</p><p>Kindly transfer amount of <u>[#payable_amt#] </u> to our bank. Our bank account details are mentioned below.</p>
<p>Bank Name : [#bank_name#]</p><p>Account Number : [#account_number#]</p><br><p>Please include the following reference : [#submition_Id#]</p><h5 class="title">View your submitted information : </h5>' . $new_user . $buyer_information . '<br /><p>Thank you for visiting us at [#site_name#].</p>', 'templatic');
}
} else {
示例3: get_currency_sym
<?php
echo CURRENT_PRICE;
?>
</span> <strong><small><?php
echo get_currency_sym();
?>
</small><?php
echo $current_price;
?>
</strong></li>
<li class="rate_our_price"><span>
<?php
echo OUR_PRICE;
?>
</span> <strong><small><?php
echo get_currency_sym();
?>
</small><?php
echo $our_price;
?>
</strong></li>
<li class="rate_percentage"><span>
<?php
echo YOU_SAVE;
?>
</span> <strong><?php
echo @number_format($percentsave, 2);
?>
%</strong></li>
<li class="bdr_none rate_item_sold"><span>
<?php
示例4: upcoming_transaction_dashboard_widget
function upcoming_transaction_dashboard_widget()
{
$args = array('meta_key' => 'is_expired', 'meta_value' => '0', 'post_status' => 'publish', 'post_type' => CUSTOM_POST_TYPE1, 'orderby' => 'DESC');
$live_posts = get_posts($args);
if ($live_posts) {
echo '<link href="' . get_template_directory_uri() . '/monetize/admin.css" rel="stylesheet" type="text/css" />';
echo '<table class="widefat" width="100%" >
<thead>
<tr>
<th valign="top" align="left">ID</th>
<th valign="top" align="left">Deal Title</th>
<th valign="top" align="left">Total Transaction</th>
<th valign="top" align="left">Original Price</th>
<th valign="top" align="left">Discounted Price</th>
<th valign="top" align="left">Status</th>
</tr>';
foreach ($live_posts as $post) {
if (get_post_meta($post->ID, 'status', true) == '1' || get_post_meta($post->ID, 'status', true) == '2') {
$status = ifetch_status(get_post_meta($post->ID, 'status', true), get_post_meta($post->ID, 'is_expired', true));
if ($status == 'Pending') {
$status_dis = "<span class='color_pending'>Pending</span>";
} else {
if ($status == 'Expired') {
$status_dis = "<span class='color_expire'>Expired</span>";
} else {
if ($status == 'Accepted') {
$status_dis = "<span class='color_active'>Accepted</span>";
} else {
if ($status == 'Active') {
$status_dis = "<span class='color_active'>Active</span>";
} else {
if ($status == 'Rejected') {
$status_dis = "<span class='color_reject'><strong>Rejected</strong></span>";
} else {
$status_dis = "<span class='color_terminate'><strong>Terminated</strong></span>";
}
}
}
}
}
echo '<tr>
<td valign="top" align="left">' . $post->ID . '</td>
<td valign="top" align="left"><a href="' . site_url() . '/wp-admin/admin.php?page=report&deal_id=' . $post->ID . '#option_deal_report">' . $post->post_title . '</a></td>
<td valign="top" align="left">' . deal_transaction($post->ID) . '</td>
<td valign="top" align="left">' . get_currency_sym() . get_post_meta($post->ID, 'current_price', true) . '</td>
<td valign="top" align="left">' . get_currency_sym() . get_post_meta($post->ID, 'our_price', true) . '</td>
<td valign="top" align="left">' . $status_dis . '</td>';
}
}
echo '</thead> </table>';
}
}
示例5: elseif
$coupon_address = $_SESSION['coupon_address'];
if ($coupon_type == '1') {
$coupon_type = 'Custom Link Deal';
} elseif ($coupon_type == '2') {
$coupon_type = 'Fixed Deal';
} elseif ($coupon_type == '3') {
$coupon_type = 'Custom Generated Deal';
} elseif ($coupon_type == '4') {
$coupon_type = 'Physical Barcode Deal';
} elseif ($coupon_type == '5') {
$coupon_type = 'Physical Product Deal';
}
if ($coupon_address != "") {
$deal_detail = sprintf(__("\n\t\t\t<h5 class='title'>" . DEAL_DETAILS_TEXT . "</h5>\n\t\t\t<ul>\n\t\t\t<li><strong>" . DEAL_TITLE_TEXT . ": </strong>%s \t</li>\n \t\t\t<li><strong>" . DEAL_CONTENT_TEXT . ":</strong> %s \t</li>\t\n \t\t\t<li><strong>" . NO_OF_ITEMS . ":</strong> %s \t</li>\t\n\t\t\t<li><strong>" . DEAL_TYPE . ":</strong> %s </li>\t\n\t\t\t<li><strong>" . DEAL_CPRICE_TEXT . ": </strong>%s </li>\t\n\t\t\t<li><strong>" . DEAL_YOUR_PRICE_TEXT . ": </strong>%s </li>\t\n\t\t\t<li><strong>" . STORE_ADDRESS . ": </strong>%s </li>\t\n\t\t</ul>\n\t\t\t", 'templatic'), $deal_title, $deal_desc, $no_of_coupon, get_currency_sym() . $current_price, get_currency_sym() . $our_price, $current_price, $coupon_address);
} else {
$deal_detail = sprintf(__("\n\t\t\t<h5 class='title'>" . DEAL_DETAILS_TEXT . "</h5>\n\t\t\t<ul>\n\t\t\t<li><strong>" . DEAL_TITLE_TEXT . ": </strong>%s \t</li>\n \t\t\t<li><strong>" . DEAL_CONTENT_TEXT . ":</strong> %s \t</li>\t\n \t\t\t<li><strong>" . NO_OF_ITEMS . ":</strong> %s \t</li>\t\n\t\t\t<li><strong>" . DEAL_TYPE . ":</strong> %s </li>\t\n\t\t\t<li><strong>" . DEAL_CPRICE_TEXT . ": </strong>%s </li>\t\n\t\t\t<li><strong>" . DEAL_YOUR_PRICE_TEXT . ": </strong>%s </li>\t\n\t\t</ul>\n\t\t\t", 'templatic'), $deal_title, $deal_desc, $no_of_coupon, $coupon_type, get_currency_sym() . $current_price, get_currency_sym() . $our_price);
}
// End All Transection Details With Deal
?>
<div class="post-content">
<div ><?php
if ($current_user->data->ID == "") {
$fromEmail = get_site_emailId();
$site_name = get_option('blogname');
$search_array = array('[#user_email#]', '[#admin_email#]', '[#blog_name#]', '[#deal_detail#]');
$replace_array = array($_SESSION['owner_email'], $fromEmail, $site_name, $deal_detail);
$filecontent = str_replace($search_array, $replace_array, SUCCESS_NEW_USER_DEAL);
_e($filecontent, 'templatic');
} else {
$fromEmail = get_site_emailId();
$site_name = get_option('blogname');
示例6: get_post_meta
</span><span>: <?php
echo get_post_meta($total_deals_obj->ID, 'no_of_coupon', true);
?>
</span></li>
<li><span class="field"><?php
echo DEAL_CPRICE_TEXT;
?>
</span><span>: <?php
echo get_currency_sym() . get_post_meta($total_deals_obj->ID, 'current_price', true);
?>
</span></li>
<li><span class="field"><?php
echo DEAL_PRICE_TEXT;
?>
</span><span>: <?php
echo get_currency_sym() . get_post_meta($total_deals_obj->ID, 'our_price', true);
?>
</span></li>
</ul>
<p class="deallistinglinks">
<span class="link"><?php
echo DEAL_WEBLINK_TEXT;
?>
: <a href="<?php
echo get_post_meta($total_deals_obj->ID, 'coupon_website', true);
?>
" title="<?php
echo $total_deals_obj->coupon_website;
?>
" target="_blank"><?php
echo get_post_meta($total_deals_obj->ID, 'coupon_website', true);
示例7: widget
//.........这里部分代码省略.........
<?php
}
?>
</a> </div>
<div class="content_right content_right_inner"><span class="title_grey"><?php
_e(PROVIDE_BY, 'templatic');
?>
</span>
<?php
$user_db_table_name = get_user_table();
$user_data = $wpdb->get_row("select * from {$user_db_table_name} where ID = '" . $post->post_author . "'");
?>
<a href="<?php
echo get_author_posts_url($post->post_author);
?>
" class="top_lnk" title="<?php
echo $user_data->display_name;
?>
"><?php
echo get_post_meta($post->ID, 'owner_name', true);
?>
</a>
<h3><a href="<?php
the_permalink();
?>
"><?php
echo $post->post_title;
?>
</a></h3>
<div class="grid_price"><span class="strike_rate"><?php
_e('Our Price :', 'templatic');
?>
<s><?php
echo get_currency_sym();
echo $current_price;
?>
</s></span> <span class="rate"><?php
_e('Offer Price :', 'templatic');
?>
<?php
echo get_currency_sym();
echo $our_price;
?>
</span> </div>
<?php
if (date("Y-m-d H:i:s") >= $enddate1 || strtotime($stdate) >= strtotime($tardate) || get_post_meta($post->ID, 'no_of_coupon', true) == $sellsqlinfo) {
if (get_post_meta($post->ID, 'is_expired', true) == '1') {
?>
<div class="i_expire"><?php
echo THIS_DEAL;
?>
<span><?php
echo EXPIRED;
?>
</span> <?php
echo ON;
?>
<span><?php
echo $tardate1;
?>
</span></div>
<?php
}
if (get_post_meta($post->ID, 'no_of_coupon', true) == $sellsqlinfo && get_post_meta($post->ID, 'is_expired', true) != '1') {
?>
<div class="i_start"><span><?php
示例8: get_property_price
function get_property_price($postid)
{
if (get_post_meta($postid, 'price', true) && get_post_meta($postid, 'price', true) > 0) {
//return get_currency_sym().number_format(get_post_meta($postid,'price',true));
return get_currency_sym() . get_post_meta($postid, 'price', true);
}
}
示例9: get_post_meta
:</strong><br /> <?php
echo $transaction_childdeal->shipping_add;
?>
<?php
} else {
echo get_post_meta($transaction_childdeal->post_id, 'voucher_text', true);
}
}
?>
</p>
<p class="deal_paid"><?php
echo PAID_AMOUNT;
?>
<span class="amount"><?php
echo get_currency_sym() . number_format($transaction_childdeal->payable_amt, 2);
?>
</span></p>
<p class="coupon_expire"><?php
if (get_post_meta($transaction_childdeal->post_id, 'coupon_end_date_time', true) != '') {
//echo EXPIRE_ON.date("F d,Y H:i:s",get_post_meta($transaction_childdeal->post_id,'coupon_end_date_time',true));
} else {
//echo START_FROM.date("F d,Y H:i:s",get_post_meta($transaction_childdeal->post_id,'coupon_start_date_time',true));
}
?>
</p>
<center><?php
if (get_post_meta($transaction_childdeal->post_id, 'coupon_type', true) == '4' && get_option(ptttheme_google_map_opt) == 'Enable' && get_option('pttheme_google_map_api') != '') {
$geo_longitude = get_post_meta($transaction_childdeal->post_id, 'geo_longitude', true);
$geo_latitude = get_post_meta($transaction_childdeal->post_id, 'geo_latitude', true);
$shipping_address = get_post_meta($transaction_childdeal->post_id, 'shhiping_address', true);
示例10: seller_accept_deal
function seller_accept_deal($deal_id)
{
global $wpdb;
/*-------Fetch Email details --------*/
$email_table = $wpdb->prefix . "email_setup";
$email_data = $wpdb->get_row("select * from {$email_table} where eid='1412'");
/*-------Fetch Seller data--------*/
$deal_table = $wpdb->prefix . "deal_entry";
$deal_id = '5';
$deal_data = $wpdb->get_row("select * from {$deal_table} where deal_id='" . $deal_id . "'");
/*-------Fetch LOgin data--------*/
$user_table = $wpdb->prefix . "users";
$user_name = $deal_data->owner_name;
$user = $wpdb->get_row("select * from {$user_table} where user_login='" . $user_name . "'");
$to_name = $deal_data->owner_name;
$to_email = $deal_data->owner_email;
$start_date = htmlspecialchars_decode(date('F d,Y H:i:s', $deal_data->coupon_start_date_time));
$end_date = htmlspecialchars_decode(date('F d,Y H:i:s', $deal_data->coupon_end_date_time));
$deal_details = "<b>Title : </b>" . $deal_data->post_title . "<br/><br/>" . "<b>Duration : </b>" . $start_date . " to " . $end_date . "<br/><br/>" . "<b>Your price : </b>" . get_currency_sym() . $deal_data->our_price . "<br/><br/>" . "<b>Current price : </b>" . get_currency_sym() . $deal_data->current_price . "<br/><br/>" . "<b>Total Items :</b>" . $deal_data->no_of_coupon . "<br/><br/><b>Coupon code :</b>" . $deal_data->coupon_code;
$login_details = "<b>Seller details</b><br/>" . "<b>User name :</b>" . $user->user_login . "<br/><b>Email :</b>" . $user->user_email;
$senderemail = $email_data->senderemail;
$sendersub = $email_data->seller_deal_accept_sub;
$sendercontent = $email_data->seller_deal_accept_content;
$smessage1 = str_replace("[#to_name#]", $to_name . ",", $sendercontent);
$smessage2 = str_replace("[#deal_details#]", $deal_details, $smessage1);
$smessage3 = str_replace("[#site_name#]", "http://" . $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF'], $smessage2);
$seller_message = str_replace("[#seller_details#]", $login_details, $smessage3);
$headers = "From :" . $senderemail . "\r\n";
$headers .= "MIME-Version: 1.0" . "\r\n";
$headers .= "Content-type:text/html;charset=iso-8859-1" . "\r\n";
$mail_success = @mail($to_email, $sendersub, $seller_message, $headers);
}
示例11: get_currency_sym
"><?php
echo $post->post_title;
?>
</a>
</div>
<div class="form_row clearfix">
<label style="padding:0px;width:100px;">
Deal Price :
</label>
<?php
echo get_currency_sym();
echo $price;
if (get_post_meta($post->ID, 'shipping_cost', true) > 0) {
?>
<?php
echo "(Including Shipping price " . get_currency_sym() . get_post_meta($post->ID, 'shipping_cost', true) . " )";
}
?>
</div>
<p><?php
_e(BUY_DEAL_DESC, 'templatic');
?>
</p>
<div id="post_<?php
the_ID();
?>
">
<div class="post-content">
<?php
if ($_REQUEST['msg'] == 'nopaymethod') {
?>
示例12: elseif
if ($coupon_type == '1') {
$coupon_type = 'Custom Link Deal';
} elseif ($coupon_type == '2') {
$coupon_type = 'Fixed Deal';
} elseif ($coupon_type == '3') {
$coupon_type = 'Custom Generated Deal';
} elseif ($coupon_type == '4') {
$coupon_type = 'Physical Barcode Deal';
} elseif ($coupon_type == '5') {
$coupon_type = 'Physical Product Deal';
}
// Start All Transection Details With Deal
if ($coupon_address != "") {
$transaction_details = sprintf(__("\n\t\t\t<p><strong>" . DEAL_DETAILS_TEXT . "</strong> \r</p>\n\t\t\t<p><strong>" . DEAL_TITLE_TEXT . ": </strong>%s \r\t</p>\n\t\t\t<p><strong>" . DEAL_CONTENT_TEXT . ": </strong>%s \r\t</p>\n\t\t\t<p><strong>" . NO_OF_ITEMS . ": </strong>%s \r\t</p>\n\t\t\t<p><strong>" . DEAL_TYPE . ": </strong>%s \r\t</p>\n\t\t\t<p><strong>" . DEAL_CPRICE_TEXT . ": </strong>%s \r\t</p>\n\t\t\t<p><strong>" . DEAL_YOUR_PRICE_TEXT . ": </strong>%s \r\t</p>\n\t\t\t<p><strong>" . STORE_ADDRESS . ":</strong> %s \r\t</p>\n\t\t\t", 'templatic'), $deal_title, $deal_desc, $no_of_coupon, get_currency_sym() . $current_price, get_currency_sym() . $our_price, $current_price, $coupon_address);
} else {
$transaction_details = sprintf(__("\n\t\t\t<p><strong>" . DEAL_DETAILS_TEXT . "</strong> \r</p>\n\t\t\t<p><strong>" . DEAL_TITLE_TEXT . ": </strong>%s \r\t</p>\n\t\t\t<p><strong>" . DEAL_CONTENT_TEXT . ": </strong>%s \r\t</p>\n\t\t\t<p><strong>" . NO_OF_ITEMS . ": </strong>%s \r\t</p>\n\t\t\t<p><strong>" . DEAL_TYPE . ": </strong>%s \r\t</p>\n\t\t\t<p><strong>" . DEAL_CPRICE_TEXT . ": </strong>%s \r\t</p>\n\t\t\t<p><strong>" . DEAL_YOUR_PRICE_TEXT . ": </strong>%s \r\t</p>\n\t\t\t", 'templatic'), $deal_title, $deal_desc, $no_of_coupon, $coupon_type, get_currency_sym() . $current_price, get_currency_sym() . $our_price);
}
// End All Transection Details With Deal
// Start User Details With Deal
$users_details = sprintf(__("\n\t<p><strong>" . SELLER_DETAIL . "</strong> \r</p>\n\t<p><strong>" . NAME . ":</strong> %s \r\t</p>\n\t<p><strong>" . EMAIL . ":</strong> %s \r\t</p><p><strong>Password :</strong> %s \r</p>", 'templatic'), $user_fname, $user_email, $password);
$fromEmail = get_site_emailId();
$fromEmailName = get_site_emailName();
/*-------Fetch Email details --------*/
$client_message = get_option('post_submited_success_email_content');
if ($client_message == "") {
$client_message = $transaction_details;
}
$subject = get_option('post_submited_success_email_subject');
if ($subject == "") {
$subject = 'A new deal is submitted';
}
示例13: elseif
$coupon_type = $u_data->deal_type;
$deal_title = $u_data->post_title;
$payable_amount = $u_data->payable_amt;
$paymentmethod = $u_data->payment_method;
if ($coupon_type == '1') {
$coupon_type = 'Custom Link Deal';
} elseif ($coupon_type == '2') {
$coupon_type = 'Fixed Deal';
} elseif ($coupon_type == '3') {
$coupon_type = 'Custom Generated Deal';
} elseif ($coupon_type == '4') {
$coupon_type = 'Physical Barcode Deal';
} elseif ($coupon_type == '5') {
$coupon_type = 'Physical Product Deal';
}
$transaction_details = sprintf(__("\n\t\t<p><h3 >" . DEAL_DETAILS_TEXT . "</h3></p>\n\t\t<p><strong>" . DEAL_TITLE_TEXT . ":</strong> %s </p>\n\t\t<p><strong>" . DEAL_COUPON . ":</strong> %s\t</p>\n\t\t<p><strong>" . DEAL_TYPE . ":</strong> %s </p>\n\t\t<p><strong>" . PAYABLE_AMOUT . ": </strong>%s</p>\n\t\t<p><strong>" . PAYMENT_METHOD . ": </strong>%s</p>\n\t\t", 'templatic'), $deal_title, $deal_coupon, $coupon_type, get_currency_sym() . $payable_amount, $paymentmethod);
$seller_name = get_post_meta($did1, 'owner_name', true);
$seller_email = get_post_meta($did1, 'owner_email', true);
// End All Transection Details With Deal
// Start User Details With Deal
$users_details = sprintf(__("\n\t<p><h3 >" . SELLER_DETAIL . "</h3> \r</p>\n\t<p><strong>" . NAME . ":</strong> %s \r\t</p>\n\t<p><strong>" . EMAIL . ":</strong> %s \r\t</p>", 'templatic'), $seller_name, $seller_email);
$buyer_detail = sprintf(__("\n\t<p><h3 >Buyer Details</h3> \r</p>\n\t<table border='0'>\n\t\t<tr>\n\t\t\t<td valign='top'><strong>" . BILLING_NAME . "</strong></td>\n\t\t\t<td valign='top'>%s</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td valign='top'><strong>" . BILLING_ADDRESS . "</strong></td>\n\t\t\t<td valign='top'>%s</td>\n\t\t</tr><tr>\n\t\t\t<td valign='top'><strong>" . SHIPPING_NAME . "</strong></td>\n\t\t\t<td valign='top'>%s</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td valign='top'><strong>" . SHIPPING_ADDRESS . "</strong></td>\n\t\t\t<td valign='top'>%s</td>\n\t\t</tr>\n\t</table>", 'templatic'), $user_billing_name, $billing_Address, $buser_shipping_name, $ship_add);
/*-------Fetch Email details --------*/
$client_message = '<p>Dear [#to_name#]</p><p>A buyer with the following details bought your deal [#deal_title#] on [#site_name#]</p><p>[#buyer_detail#]</p> <p>[#deal_details#]</p><br /><br /><p>Thanks!</p><p>[#site_name#]</p>';
$subject = 'Congratulations, a new sale has occured to your deal ' . $deal_title;
$site_name = get_option('blogname');
$search_array = array('[#to_name#]', '[#deal_title#]', '[#buyer_detail#]', '[#deal_details#]', '[#site_name#]');
$replace_array = array($seller_name . ",", $deal_title, $buyer_detail, $transaction_details, $site_name);
$email_seller_content = str_replace($search_array, $replace_array, $client_message);
$admin_message = '<p>Dear [#to_name#]</p>
<p>A buyer with the following details bought a deal [#deal_title#] on [#site_name#]</p><p>[#buyer_detail#]</p> <p>[#deal_details#]</p><p>[#seller_details#]</p><br /><br /><p>Thanks!</p><p>[#site_name#]</p>';
示例14: foreach
$ordersql_from = " from {$trans_table} t,{$post_table} p ";
$ordersql_conditions = " where p.ID = t.post_id and t.status = '1'";
if ($_REQUEST['deal_id'] != '') {
$id = $_REQUEST['deal_id'];
$ordersql_conditions .= " and t.post_id = {$id}";
}
$ordersql_conditions .= " group by p.ID";
$priceinfo_count = $wpdb->get_results($ordersql_select . $ordersql_from . $ordersql_conditions);
if ($priceinfo_count > 0) {
foreach ($priceinfo_count as $priceinfoObj) {
$post_title = str_replace(',', ' ', $priceinfoObj->post_title);
echo "ID,Title,Total Transaction,Status\r ";
echo "{$priceinfoObj->ID},{$post_title}," . deal_transaction($priceinfoObj->ID) . "," . ($status = ifetch_status(get_post_meta($post->ID, 'status', true), get_post_meta($post->ID, 'is_expired', true)) . " \r\n \r\n");
$deal_cnt = $wpdb->get_results("select * from {$trans_table} where post_id = '" . $priceinfoObj->ID . "' and status = '1'");
if (count($deal_cnt) > 0) {
echo "Title,Deal Coupon,Pay Date,Billing name,Billing address,Shipping name, Shipping address,Pay Method,Amount\r\n";
$trans_table = $wpdb->prefix . "deal_transaction";
foreach ($deal_cnt as $postObj) {
$sub_post_title = str_replace(',', ' ', $postObj->post_title);
$billing_add = str_replace(array(',', '<br />'), ' ', $postObj->billing_add);
$shipping_add = str_replace(array(',', '<br />'), ' ', $postObj->shipping_add);
echo "{$sub_post_title},{$postObj->deal_coupon}," . date('d/m/Y', strtotime($postObj->payment_date)) . ",{$postObj->billing_name},{$billing_add},{$postObj->shipping_name},{$shipping_add},{$postObj->payment_method}," . get_currency_sym() . number_format($postObj->payable_amt, 2) . " \r";
}
}
echo "\r\n";
}
} else {
echo "No record available";
}
?>
示例15: header
<?php
header('Content-Description: File Transfer');
header("Content-type: application/force-download");
header('Content-Disposition: inline; filename="transaction.csv"');
$file = dirname(__FILE__);
$file = substr($file, 0, stripos($file, "wp-content"));
require $file . "/wp-load.php";
global $wpdb, $current_user, $transection_db_table_name, $qry_string;
echo "Title,Deal Coupon,Pay Date,Billing name,Billing address,Shipping name,Shipping address,Pay Method,Amount\r\n";
$transinfo = $wpdb->get_results($_SESSION['qry_string']);
$totamt = 0;
if ($transinfo) {
foreach ($transinfo as $priceinfoObj) {
$totamt = $totamt + $priceinfoObj->payable_amt;
$post_title = str_replace(',', ' ', $priceinfoObj->post_title);
$billing_add = str_replace(array(',', '<br />'), ' ', $priceinfoObj->billing_add);
$shipping_add = str_replace(array(',', '<br />'), ' ', $priceinfoObj->shipping_add);
echo "{$post_title},{$priceinfoObj->deal_coupon}," . date('d/m/Y', strtotime($priceinfoObj->payment_date)) . ",{$priceinfoObj->billing_name},{$billing_add},{$priceinfoObj->shipping_name},{$shipping_add},{$priceinfoObj->payment_method}," . get_currency_sym() . number_format($priceinfoObj->payable_amt, 2) . " \r";
}
echo " , , , , , , ,Total Amount :, " . get_currency_sym() . " {$totamt} \r\n";
} else {
echo "No record available";
}
?>