" /> </td> <td class="user-info"> <div class="fullname"><?php echo get_author_info('name'); ?> </div> <div class="username"> <span>@</span> <span class="screen-name"><?php echo get_author_info('short_name'); ?> </span> </div> <div class="location"><?php echo get_author_info('city'); ?> </div> </td> </tr> <tr> <td class="details" colspan="2"> <div class="bio"> <div class="dir-ltr" dir="ltr"> <?php $this->options->description(); ?> </div> </div> <div class="url"> <div class="dir-ltr">
" class="respond"> <div class="inline-reply-tweetbox swift"> <div class="cancel-comment-reply" style="display:none;"> <?php $comments->cancelReply(); ?> </div> <form class="t1-form tweet-form" method="post" action="<?php $this->commentUrl(); ?> " id="comment-form"> <?php if ($this->user->hasLogin()) { ?> <img class="inline-reply-user-image avatar size32" src="<?php echo get_author_info('avatar'); ?> " alt=""> <?php } else { ?> <img class="inline-reply-user-image avatar size32" src="<?php echo get_avatar($this->remember('mail', true), 120); ?> " alt=""> <?php } ?> <span class="inline-reply-caret"> <span class="caret-inner"></span> </span>
" /> </a> </td> <td class="user-info"> <a href="<?php $this->options->siteUrl(); ?> "> <strong class="fullname"><?php echo get_author_info('name'); ?> </strong> <div class="username"> <span>@</span><?php echo get_author_info('short_name'); ?> </div> </a> </td> <td class="timestamp"> <a href="<?php $this->permalink(); ?> "><?php $this->date('m月d日'); ?>
function geodir_ipn_handler_2co() { global $Cart, $General; $req = ''; foreach ($_POST as $field => $value) { $ipnData["{$field}"] = $value; $req .= "&{$field}={$value}"; } $postid = intval($ipnData['x_invoice_num']); $pnref = $ipnData['x_trans_id']; $amount = geodir_get_currency_sym() . doubleval($ipnData['x_amount']); $result = intval($ipnData['x_response_code']); $respmsg = $ipnData['x_response_reason_text']; $customer_email = $ipnData['x_email']; $customer_name = $ipnData['x_first_name']; $fromEmail = get_option('site_email'); $fromEmailName = get_site_emailName(); $subject = "Acknowledge for Place Listing ID #{$postid} payment"; // get current post status $current_post_status = get_post_status($postid); if ($result == '1') { /* Valid IPN transaction.*/ $post_default_status = geodir_new_post_default_status(); if ($post_default_status == '') { $post_default_status = 'publish'; } set_property_status($postid, $post_default_status); $productinfosql = $wpdb->prepare("select ID,post_title,guid,post_author from {$wpdb->posts} where ID = %d", array($postid)); $productinfo = $wpdb->get_results($productinfosql); foreach ($productinfo as $productinfoObj) { $post_title = '<a href="' . $productinfoObj->guid . '">' . $productinfoObj->post_title . '</a>'; $aid = $productinfoObj->post_author; $userInfo = get_author_info($aid); $to_name = $userInfo->user_nicename; $to_email = $userInfo->user_email; } $message = __('<p>payment for Place Listing ID #' . $postid . ' confirmation.<br></p><p><b>You may find the details below:</b></p><p>----</p><p>Place Listing Id : ' . $postid . '</p><p>Place Listing Title : ' . $post_title . '</p><p>User Name : ' . $to_name . '</p><p>User Email : ' . $to_email . '</p><p>Paid Amount : ' . $amount . '</p><p>Transaction ID : ' . $pnref . '</p><p>Result Code : ' . $result . '</p><p>Response Message : ' . $respmsg . '</p><p>----</p><br><br><p>Thank you.</p>', GEODIRPAYMENT_TEXTDOMAIN); $subject = get_option('post_payment_success_admin_email_subject'); if (!$subject) { $subject = __("Place Listing Submitted and Payment Success Confirmation Email", GEODIRPAYMENT_TEXTDOMAIN); } $content = get_option('post_payment_success_admin_email_content'); $store_name = get_option('blogname'); $fromEmail = get_option('site_email'); $search_array = array('[#to_name#]', '[#information_details#]', '[#site_name#]'); $replace_array = array($fromEmail, $message, $store_name); /*$message = str_replace($search_array,$replace_array,$content);*/ geodir_payment_adminEmail($postid, $aid, 'payment_success', $message); /* email to admin*/ geodir_payment_clientEmail($postid, $aid, 'payment_success', $message); /* email to client*/ /*@wp_mail($fromEmail,$subject,$message,$headerarr);*/ /* email to admin*/ // Extend expire date start $invoice_info = $wpdb->get_row($wpdb->prepare("SELECT * FROM " . INVOICE_TABLE . " WHERE post_id = %d AND is_current=%s", array($postid, '1'))); $invoice_id = $invoice_info->id; $invoice_package_id = ''; if (!empty($invoice_info) && isset($invoice_info->package_id)) { $invoice_package_id = $invoice_info->package_id; $invoice_alive_days = $invoice_info->alive_days; $invoice_status = $invoice_info->status; } $geodir_post_info = geodir_get_post_info($postid); if (!empty($geodir_post_info)) { $post_package_id = $geodir_post_info->package_id; $post_expire_date = $geodir_post_info->expire_date; if (!empty($invoice_package_id) && $invoice_alive_days > 0 && $invoice_package_id == $post_package_id && strtolower($post_expire_date) != 'never' && strtotime($post_expire_date) >= strtotime(date('Y-m-d')) && $current_post_status == 'publish') { $alive_days = (int) ($geodir_post_info->alive_days + $invoice_alive_days); $expire_date = date('Y-m-d', strtotime($post_expire_date . "+" . $invoice_alive_days . " days")); } else { $alive_days = (int) $geodir_post_info->alive_days; if (strtolower($post_expire_date) != 'never' && strtotime($post_expire_date) < strtotime(date('Y-m-d'))) { $alive_days = $invoice_alive_days; } $expire_date = $alive_days > 0 ? date('Y-m-d', strtotime(date('Y-m-d') . "+" . $alive_days . " days")) : 'Never'; } geodir_save_post_meta($postid, 'alive_days', $alive_days); geodir_save_post_meta($postid, 'expire_date', $expire_date); } // Extend expire date start end /*############ SET THE INVOICE STATUS START ############*/ // update invoice statuse and transactio details $transaction_details = $message; geodir_update_invoice_status($invoice_id, 'Paid'); geodir_update_invoice_transaction_details($invoice_id, $transaction_details); /*############ SET THE INVOICE STATUS END ############*/ if ($ct_on && file_exists($child_dir . '/library/includes/success.php')) { include_once $child_dir . '/library/includes/success.php'; } else { include_once TEMPLATEPATH . '/library/includes/success.php'; } exit; return true; } else { if ($result != '1') { $message = __('<p>payment for Place Listing ID #' . $postid . ' incompleted.<br>because of ' . $respmsg . '</p><p><b>You may find the details below:</b></p><p>----</p><p>Place Listing Id : ' . $postid . '</p><p>Place Listing Title : ' . $post_title . '</p><p>User Name : ' . $to_name . '</p><p>User Email : ' . $to_email . '</p><p>Paid Amount : ' . $amount . '</p><p>Transaction ID : ' . $pnref . '</p><p>Result Code : ' . $result . '</p><p>Response Message : ' . $respmsg . '</p><p>----</p><br><br><p>Thank you.</p>', GEODIRPAYMENT_TEXTDOMAIN); $subject = get_option('post_payment_success_client_email_subject'); if (!$subject) { $subject = __("Place Listing Submitted and Payment Success Confirmation Email", GEODIRPAYMENT_TEXTDOMAIN); } $content = get_option('post_payment_success_client_email_content'); $store_name = get_option('blogname'); $search_array = array('[#to_name#]', '[#information_details#]', '[#site_name#]'); $replace_array = array($to_name, $message, $store_name); /*$message = str_replace($search_array,$replace_array,$content);*/ geodir_payment_adminEmail($postid, $aid, 'payment_success', $message); /* email to admin*/ geodir_payment_clientEmail($postid, $aid, 'payment_success', $message); /* email to client*/ /*@wp_mail($to_email,$subject,$message,$headerarr);*/ /* email to client*/ /*############ SET THE INVOICE STATUS START ############*/ global $wpdb; $invoice_info = $wpdb->get_row($wpdb->prepare("SELECT * FROM " . INVOICE_TABLE . " WHERE post_id = %d AND is_current=%s", array($postid, '1'))); $invoice_id = $invoice_info->id; // update invoice statuse and transactio details $transaction_details = $message; geodir_update_invoice_status($invoice_id, 'Unpaid'); geodir_update_invoice_transaction_details($invoice_id, $transaction_details); /*############ SET THE INVOICE STATUS END ############*/ if ($ct_on && file_exists($child_dir . '/library/includes/success.php')) { include_once $child_dir . '/library/includes/success.php'; } else { include_once TEMPLATEPATH . '/library/includes/success.php'; } exit; return false; } } }
function get_comment_at($coid) { $db = Typecho_Db::get(); $prow = $db->fetchRow($db->select('parent')->from('table.comments')->where('coid = ? AND status = ?', $coid, 'approved')); $parent = $prow['parent']; if ($parent != 0) { $arow = $db->fetchRow($db->select('author')->from('table.comments')->where('coid = ? AND status = ?', $parent, 'approved')); $author = $arow['author']; echo $author; } else { echo get_author_info('name'); } }