function api_get_project() { if (isset($_GET['project_id'])) { $project_id = absint($_GET['project_id']); $project = new ID_Project($project_id); $the_project = $project->the_project(); } else { $the_project = null; } print_r(json_encode($the_project)); exit; }
function hDeck() { //$the_project = parent::the_project(); $prod_settings = parent::get_project_settings(); if (empty($prod_settings)) { $prod_settings = getProductDefaultSettings(); } $post_id = parent::get_project_postid(); $end_type = get_post_meta($post_id, 'ign_end_type', true); $item_fund_goal = apply_filters('id_project_goal', parent::the_goal(), $post_id); $p_current_sale = apply_filters('id_funds_raised', parent::get_project_raised(), $post_id); // $item_fund_end = parent::end_date(); $end_day = parent::end_day(); $end_month = parent::end_month(); $end_year = parent::end_year(); $days_left = parent::days_left(); // $rating_per = apply_filters('id_percentage_raised', parent::percent(), apply_filters('id_funds_raised', parent::get_project_raised(), $post_id, true), $post_id, apply_filters('id_project_goal', parent::the_goal(), $post_id, true)); //$p_count = new stdClass; //$p_count->p_number = parent::get_project_orders(); $p_number = apply_filters('id_number_pledges', parent::get_project_orders(), $post_id); $currencyCodeValue = $prod_settings->currency_code; $cCode = setCurrencyCode($currencyCodeValue); $hDeck = new stdClass(); $hDeck->end_type = $end_type; $hDeck->goal = $item_fund_goal; $hDeck->total = $p_current_sale; // what is this for? //$hDeck->show_dates = $show_dates; $hDeck->end = $item_fund_end; $hDeck->day = $end_day; $hDeck->month = apply_filters('id_end_month', $end_month); $hDeck->year = $end_year; $hDeck->days_left = apply_filters('id_project_days_left', $days_left, $post_id); // $hDeck->percentage = $rating_per; $hDeck->pledges = $p_number; $hDeck->currency_code = $cCode; return $hDeck; }
<?php $options = get_option('fivehundred_theme_settings'); if (isset($options['home'])) { $project_id = $options['home']; $project = new ID_Project($project_id); $id = $project->get_project_postid(); $settings = getSettings(); } ?> <aside id="sidebar"> <h3 id="ign-levels-headline"><?php the_title(); ?> <?php _e('Support Levels', 'fivehundred'); ?> </h3> <div id="ign-product-levels" data-projectid="<?php echo $project_id; ?> "> <?php do_action('id_before_levels', $project_id); ?> <?php get_template_part('loop', 'levels-home'); ?> <?php do_action('id_after_levels', $project_id); ?>
<?php echo isset($float) ? '<div class="id-content-wrap id-complete-projcont" data-projectid="' . (isset($project_id) ? $project_id : '') . '">' : '<div class="id-content-wrap" data-projectid="' . (isset($project_id) ? $project_id : '') . '">'; ?> <div class="product-post-output" style="clear: both;"> <?php echo do_action('id_content_before', $project_id); $video = get_post_meta($post_id, "ign_product_video", true); ?> <div class="product-video-container <?php echo !empty($video) ? 'hasvideo' : ''; ?> "> <div class="aspect-ratio-maker"></div> <?php $id_project_thumbnail = ID_Project::get_project_thumbnail($post_id); if (empty($id_project_thumbnail)) { //$id_project_thumbnail = idcf_project_placeholder_image(); } ?> <div class="id_thevideo" style="background-image: url(<?php echo $id_project_thumbnail; ?> )"> <?php echo html_entity_decode(stripslashes($video)); ?> </div> </div> <?php include ID_PATH . 'templates/_socialButtons.php'; ?>
</td> </tr> <tr> <td> <label for="choose-featured"><?php _e('Featured Project on Home Page', 'fivehundred'); ?> </label><br/> <select id="choose-featured" name="choose-featured"> <option><?php _e('No Feature', 'fivehundred'); ?> </option> <?php foreach ($projects as $project) { $a_project = new ID_Project($project->id); $post_id = $a_project->get_project_postid(); $post = get_post($post_id); if (!empty($post)) { $selected = null; if (isset($project_id) && $project_id == $project->id) { $selected = 'selected="selected"'; } ?> <option value="<?php echo $project->id; ?> " <?php echo isset($selected) ? $selected : ''; ?> ><?php
/** * Filter to show the number of pledgers of a project and its children */ function id_number_pledges_parent($pledgers, $post_id) { // Getting the children projects if any to add the total in $amount $project_children = get_post_meta($post_id, 'ign_project_children', true); if (!empty($project_children)) { foreach ($project_children as $child_project) { $child_project_id = get_post_meta($child_project, 'ign_project_id', true); $project = new ID_Project($child_project_id); $orders = $project->get_project_orders(); $pledgers = $pledgers + $orders; $sub_children = get_post_meta($child_project, 'ign_project_children', true); if (!empty($sub_children)) { foreach ($sub_children as $subchild_id) { $subchild_project_id = get_post_meta($subchild_id, 'ign_project_id', true); $subproject = new ID_Project($subchild_project_id); $orders = $subproject->get_project_orders(); $pledgers = $pledgers + $orders; } } } } return $pledgers; }
<?php $project = new ID_Project(null); /* 1. Currency Code and Value */ $cCode = $project->currency_code();
?> " data-projectid="<?php echo isset($project_id) ? $project_id : ''; ?> "> <div class="id-product-infobox"> <div class="product-wrapper"> <?php echo do_action('id_widget_before', $project_id, $mini_deck); ?> <?php echo do_action('id_mini_widget_before', $project_id); ?> <div class="pledge"> <?php $mini_image = ID_Project::get_project_thumbnail($mini_deck->post_id); ?> <?php if (!$custom || $custom && isset($attrs['project_title'])) { ?> <h2 class="id-product-title"><a href="<?php echo getProjectURLfromType($project_id); ?> "><?php echo stripslashes(get_the_title($mini_deck->post_id)); ?> </a></h2> <?php } ?> <?php
function id_purchase_form() { $project = new ID_Project($this->project_id); $the_project = $project->the_project(); $project_id = $this->project_id; $post_id = $project->get_project_postid(); $project_settings = $project->get_project_settings(); if (empty($prod_settings)) { $defaults = $project->get_project_defaults(); $project_settings = $defaults; } $no_levels = get_post_meta($post_id, "ign_product_level_count", true); $project_type = get_post_meta($post_id, 'ign_project_type', true); $project_desc = get_post_meta($post_id, "ign_product_level_1_desc", true); $level_data = $project->get_level_data($post_id, $no_levels); // level one stuff $level_one_data = new stdClass(); $is_level_invalid = getLevelLimitReached($this->project_id, $post_id, 1); $meta_title = $the_project->ign_product_title; $meta_price = get_post_meta($post_id, "ign_product_price", true); $meta_desc = $the_project->product_details; $meta_order = get_post_meta($post_id, 'ign_projectmeta_level_order', true); $level_one_data->is_level_invalid = $is_level_invalid; $level_one_data->meta_title = $meta_title; $level_one_data->meta_price = $meta_price; $level_one_data->meta_desc = $meta_desc; $level_one_data->meta_order = $meta_order; $level_one_data->id = 1; // add level one to object array_unshift($level_data, $level_one_data); $custom_level_order = get_post_meta($post_id, 'custom_level_order', true); if ($custom_level_order) { usort($level_data, 'ID_Project::level_sort'); } //GETTING the currency symbols $currencyCodeValue = $project_settings->currency_code; $cCode = setCurrencyCode($currencyCodeValue); //GETTING the form settings $form_settings = getProductFormSettings($project_id); if (!isset($form_settings)) { $form_settings = $project_settings->form_settings; $form_settings = unserialize($form_settings); } else { $form_settings = unserialize($form_settings); } $form_id = rand(21927391, 92817275); // Getting the Payment method first, to load the appropriate URLs if needed and // submit button name // this is paypal code that could be removed if disabled $payment_method = getDefaultPaymentMethod(); if (isset($payment_method) && $payment_method->payment_gateway == "adaptive_paypal") { $adaptive_pay_settings = getAdaptivePayPalSettings(); if (isset($adaptive_pay_settings)) { if ($adaptive_pay_settings->paypal_mode == "sandbox") { $paypal_address = "https://www.sandbox.paypal.com/webapps/adaptivepayment/flow/pay"; } else { $paypal_address = "https://www.paypal.com/webapps/adaptivepayment/flow/pay"; } if ($adaptive_pay_settings->fund_type == 'fixed') { $submit_btn_name = 'btnSubmitPreapproval'; } else { $submit_btn_name = "submitPaymentAdaptive"; } } } else { $submit_btn_name = "submitPaymentPopup"; //will be caught by standard payments function for Paypal } $purchase_form = new stdClass(); $purchase_form->project_id = $project_id; $purchase_form->post_id = $post_id; $purchase_form->the_project = $the_project; $purchase_form->project_settings = $project_settings; $purchase_form->no_levels = $no_levels; $purchase_form->level_data = $level_data; $purchase_form->project_type = $project_type; $purchase_form->project_desc = $project_desc; $purchase_form->currencyCodeValue = $currencyCodeValue; $purchase_form->cCode = $cCode; $purchase_form->form_settings = $form_settings; $purchase_form->form_id = $form_id; if (isset($paypal_address)) { $purchase_form->paypal_address = $paypal_address; } $purchase_form->submit_btn_name = $submit_btn_name; if (isset($adaptive_pay_settings)) { $purchase_form->adaptive_pay_settings = $adaptive_pay_settings; } return $purchase_form; }
function add_project_parent_box($post) { require 'languages/text_variables.php'; // Getting the parent if any for auto selection $parent_id = get_post_meta($post->ID, 'ign_project_parent', true); // Getting the list of ID projects $projects = ID_Project::get_project_posts(); // If the screen is edit post, then don't show the current post id in dropdown if (isset($_GET['action']) && $_GET['action'] == 'edit') { $screen = 'edit'; } else { $screen = 'add'; } // Making the markup echo '<input type="hidden" name="add_project_parent_box" value="' . wp_create_nonce('add_project_parent_box') . '" />'; echo '<table width="100%" border="0"> <tr> <td> </td> <td></td> </tr> <tr> <td>Parent Project</td> <td> <select name="ign_option_project_parent" id="ign_option_project_parent"> <option value="">' . __('No Parent', 'ignitiondeck') . '</option>'; if (!empty($projects)) { foreach ($projects as $project) { if ($screen == "add" || $screen == 'edit' && $post->ID != $project->ID) { echo ' <option value="' . $project->ID . '" ' . ($parent_id == $project->ID ? 'selected="selected"' : '') . '>' . $project->post_title . '</option>'; } } } echo ' </select> </td> </tr> <tr> <td> </td> </tr> </table>'; }
function ide_add_project_order_thumbnail($thumbnail, $last_order) { $order_id = $last_order->id; $mdid_order = mdid_by_orderid($order_id); if (!empty($mdid_order)) { $pay_id = $mdid_order->pay_info_id; $id_order = new ID_Order($pay_id); $get_order = $id_order->get_order(); if (!empty($get_order)) { $project_id = $get_order->product_id; $project = new ID_Project($project_id); $post_id = $project->get_project_postid(); if ($post_id > 0) { $thumbnail = ID_Project::get_project_thumbnail($post_id); } } } return $thumbnail; }
function idf_sharing_settings() { if (class_exists('ID_Project')) { $settings = ID_Project::get_id_settings(); } return !empty($settings) ? $settings : null; }
function get_product_levels_callback() { global $wpdb; require 'languages/text_variables.php'; if (isset($_POST['Project'])) { $project_id = absint($_POST['Project']); $project = new ID_Project($project_id); $product_settings = $project->get_project_settings(); if (empty($product_settings)) { $product_settings = $project->get_project_defaults(); } //GETTING the currency symbol if (isset($product_settings)) { $currencyCodeValue = $product_settings->currency_code; $cCode = setCurrencyCode($currencyCodeValue); } else { $currencyCodeValue = 'USD'; $cCode = '$'; } $post_id = $project->get_project_postid(); $level_count = get_post_meta($post_id, 'ign_product_level_count', true); $meta_price_1 = get_post_meta($post_id, "ign_product_price", true); $options = "<option data-price='" . number_format($meta_price_1, 2, '.', '') . "' value=\"1\">" . $tr_Level . " 1: " . $tr_Price . " " . apply_filters('id_display_currency', apply_filters('id_price_format', absint($meta_price_1), $post_id), absint($meta_price_1), $post_id) . "</option>"; if (isset($level_count) && $level_count > 0) { for ($i = 1; $i <= $level_count; $i++) { $meta_price = get_post_meta($post_id, $name = "ign_product_level_" . $i . "_price", true); if ($meta_price !== "") { $options .= "<option data-price='" . number_format($meta_price, 2, '.', '') . "' value=\"" . $i . "\">" . $tr_Level . " " . $i . ": " . $tr_Price . " " . apply_filters('id_display_currency', apply_filters('id_price_format', $meta_price, $post_id), $meta_price, $post_id) . "</option>"; } } } echo $options; } exit; }
/** * Function to get the level of a ID project from iT exchange product */ function get_paired_level_from_itexch_product($product_id) { $project_id = get_post_meta($product_id, '_itexch_project_pairing', true); // For level, getting the post id of ID Project $project = new ID_Project($project_id); $post_id = $project->get_project_postid(); // Getting all meta of this post, and getting level against iT Exchange product_id $post_meta = get_post_meta($post_id); foreach ($post_meta as $meta_key => $meta_value) { // If we are getting $product_id as value, check if the meta_key is similar to 'iditexch_level_pairing' if ($meta_value[0] == $product_id) { // Checking meta_key, if it's like 'iditexch_level_pairing', the get the level if (stristr($meta_key, 'iditexch_level_pairing') != false) { $level = str_replace('iditexch_level_pairing_', '', $meta_key); } } } return array($project_id, $level); }
function the_project_image($id, $num) { if ($num == 1) { if (method_exists('ID_Project', 'get_project_thumbnail')) { $image = ID_Project::get_project_thumbnail($id, 'fivehundred_featured'); } else { $project_id = get_post_meta($id, 'ign_project_id', true); global $wpdb; $url = get_post_meta($id, 'ign_product_image1', true); $sql = $wpdb->prepare('SELECT ID FROM ' . $wpdb->prefix . 'posts WHERE guid = %s', $url); $res = $wpdb->get_row($sql); if (isset($res->ID)) { $src = wp_get_attachment_image_src($res->ID, 'fivehundred_featured'); $image = $src[0]; } else { $image = $url; } } } else { if ($num == 2) { $project_id = get_post_meta($id, 'ign_project_id', true); global $wpdb; $url = get_post_meta($id, 'ign_product_image2', true); $sql = $wpdb->prepare('SELECT ID FROM ' . $wpdb->prefix . 'posts WHERE guid = %s', $url); $res = $wpdb->get_row($sql); if (isset($res->ID)) { $src = wp_get_attachment_image_src($res->ID, ''); $image = $src[0]; } else { $image = $url; } } else { $key = 'ign_product_image' . $num; $image = get_post_meta($id, $key, true); } } return $image; }
public static function set_closed_meta() { $projects = self::get_all_projects(); foreach ($projects as $a_project) { $project = new ID_Project($a_project->id); $post_id = $project->get_project_postid(); $days_left = $project->days_left(); $end_type = $project->get_end_type(); if ($days_left <= 0 && $end_type == 'closed') { update_post_meta($post_id, 'ign_project_closed', true); do_action('idcf_project_closed', $post_id, $a_project->id); } else { update_post_meta($post_id, 'ign_project_closed', false); } } }
function id_setup_nags() { $settings = getSettings(); // Let's check if the notices have been cleared before $settings_notice = get_option('id_settings_notice'); $defaults_notice = get_option('id_defaults_notice'); $products_notice = get_option('id_products_notice'); $idf_notice = get_option('id_idf_notice'); if (empty($settings) && empty($settings_notice)) { // add settings nag add_action('admin_notices', 'id_settings_notice'); } $defaults = getProductDefaultSettings(); if ((empty($defaults) || !is_object($defaults)) && empty($defaults_notice)) { // add defaults nag add_action('admin_notices', 'id_defaults_notice'); } $products = ID_Project::get_all_projects(); if (empty($products) && empty($products_notice)) { // add products nag add_action('admin_notices', 'id_products_notice'); } if (!idf_exists() && empty($idf_notice)) { add_action('admin_notices', 'id_idf_notice'); } }
function form($instance) { //reasons to fail if (empty($this->widget['fields'])) { return false; } $defaults = array('id' => '', 'name' => '', 'desc' => '', 'type' => '', 'options' => '', 'std' => ''); foreach ($this->widget['fields'] as $field) { //making sure we don't throw strict errors $field = wp_parse_args($field, $defaults); $meta = false; if (isset($field['id']) && array_key_exists($field['id'], $instance)) { @($meta = attribute_escape($instance[$field['id']])); } if ($field['type'] != 'custom' && $field['type'] != 'metabox') { echo '<p><label for="', $this->get_field_id($field['id']), '">'; } if (isset($field['name']) && $field['name']) { echo $field['name'], ':<br />'; } switch ($field['type']) { case 'text': echo '<input type="text" name="', $this->get_field_name($field['id']), '" id="', $this->get_field_id($field['id']), '" value="', isset($instance[$field['id']]) ? $instance[$field['id']] : '', '" class="vibe_text" />', '<br/><span class="description">', @$field['desc'], '</span>'; break; case 'textarea': echo '<textarea class="vibe_textarea" name="', $this->get_field_name($field['id']), '" id="', $this->get_field_id($field['id']), '" cols="60" rows="4" style="width:97%">', $meta ? $meta : @$field['std'], '</textarea>', '<br/><span class="description">', @$field['desc'], '</span>'; break; case 'select': echo '<select class="vibe_select" name="', $this->get_field_name($field['id']), '" id="', $this->get_field_id($field['id']), '">'; global $wpdb; //$allproducts = ID_Project::get_all_projects(); $allproducts = ID_Project::get_project_posts(); foreach ($allproducts as $prod) { $project_id = get_post_meta($prod->ID, 'ign_project_id', true); //$project = new ID_Project($prod->id); //$post_id = $project->get_project_postid(); $selected_option = isset($value) ? $value : get_the_title($prod->ID); //echo "selected_option: ".$selected_option."<br />"; //echo "meta: ".$meta."<br />"; echo '<option', isset($project_id) ? ' value="' . $project_id . '"' : '', $meta == $project_id ? ' selected="selected"' : '', '>', get_the_title($prod->ID), '</option>'; } echo '</select>', '<br/><span class="description">', @$field['desc'], '</span>'; break; case 'radio': foreach ($field['options'] as $option) { echo '<input class="vibe_radio" type="radio" name="', $this->get_field_name($field['id']), '" value="', $option['value'], '"', $meta == $option['value'] ? ' checked="checked"' : '', ' />', $option['name'] . '<br />'; } echo '<br/><span class="description">', @$field['desc'], '</span>'; break; case 'checkbox': echo '<input type="hidden" name="', $this->get_field_name($field['id']), '" id="', $this->get_field_id($field['id']), '" /> ', '<input class="vibe_checkbox" type="checkbox" name="', $this->get_field_name($field['id']), '" id="', $this->get_field_id($field['id']), '"', $meta ? ' checked="checked"' : '', ' /> ', '<br/><span class="description">', @$field['desc'], '</span>'; break; case 'custom': echo $field['std']; break; } if ($field['type'] != 'custom' && $field['type'] != 'metabox') { echo '</label></p>'; } } return true; }
function id_projectPageContentFull($attrs) { if (isset($attrs['product'])) { ob_start(); require 'languages/text_variables.php'; $project_id = $attrs['product']; $project = new ID_Project($project_id); $the_project = $project->the_project(); $post_id = $project->get_project_postid(); $settings = getSettings(); $social_settings = maybe_unserialize(get_option('idsocial_settings')); $project_long_desc = html_entity_decode(get_post_meta($post_id, "ign_project_long_description", true)); $float = 1; include 'templates/_projectContent.php'; $content = ob_get_contents(); ob_end_clean(); } else { $content = ''; } return apply_filters('id_project_content', $content, $project_id); }
echo '<div id="fb-root"></div><div id="share-fb" class="fb-like social-share social-button" data-send="false" data-layout="button_count" data-width="100" data-show-faces="false"></div>'; } if (isset($settings->prod_page_twitter) && $settings->prod_page_twitter) { //$post_output .= '<div style="float:right;"><a href="http://twitter.com/share" target="_new" class="twitter-share-button button twitter" data-count="vertical">tweet</a></div>'; echo '<div id="share-twitter" class="social-share social-button"><a href="https://twitter.com/share" class="twitter-share-button">' . __('Tweet', 'fivehundred') . '</a> <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script></div>'; } if (isset($settings->prod_page_linkedin) && $settings->prod_page_linkedin) { echo '<div id="share-linkedin" class="social-share social-button"><script src="//platform.linkedin.com/in.js" type="text/javascript"></script> <script type="IN/Share"></script></div>'; } if (isset($settings->prod_page_google) && $settings->prod_page_google) { echo '<div id="share-google" class="social-share social-button"><script type="text/javascript" src="https://apis.google.com/js/plusone.js"></script><g:plusone size="medium"></g:plusone></div>'; } if (isset($settings->prod_page_pinterest) && $settings->prod_page_pinterest) { echo '<div id="share-pinterest" class="social-share social-button"><a href="http://pinterest.com/pin/create/button/?url=' . currentPageURL() . '&media=' . ID_Project::get_project_thumbnail($post_id) . '" class="pin-it-button" count-layout="horizontal"><img border="0" src="//assets.pinterest.com/images/PinExt.png" title="Pin It" /></a><script type="text/javascript" src="//assets.pinterest.com/js/pinit.js"></script></div>'; } } } ?> <div id="share-embed" class="social-share"><i class="fa fa-code"></i></div> <div class="embed-box social-share" style="display: none;"> <code><iframe frameBorder="0" scrolling="no" src="<?php echo home_url(); ?> /?ig_embed_widget=1&product_no=<?php echo isset($project_id) ? $project_id : ''; ?> " width="214" height="366"></iframe></code> </div> <div class="clear"></div>
<?php global $post; $id = $post->ID; $content = the_project_content($id); $project_id = get_post_meta($id, 'ign_project_id', true); if (class_exists('Deck')) { $deck = new Deck($project_id); $the_deck = $deck->the_deck(); $levels = $the_deck->level_data; //$levels = the_levels($id); $type = get_post_meta($id, 'ign_project_type', true); $end_type = get_post_meta($id, 'ign_end_type', true); $project = new ID_Project($project_id); $days_left = $project->days_left(); } ?> <aside id="sidebar"> <?php get_template_part('project', 'author'); ?> <!-- check for closed projects --> <h3 class="widget-title levels"><?php _e('REWARDS', 'fivehundred'); ?> </h3> <div class="project-sidebar-wrapper"> <div id="ign-product-levels" data-projectid="<?php echo $project_id; ?> ">
<?php /** * The default template for displaying IgnitionDeck projects. */ $project_id = get_post_meta($post->ID, 'ign_project_id', true); $project = new ID_Project($project_id); $post_id = $project->get_project_postid(); $raised = apply_filters('id_funds_raised', $project->get_project_raised(), $project->get_project_postid()); $percent = apply_filters('id_percentage_raised', $project->percent(), apply_filters('id_funds_raised', $project->get_project_raised(), $post_id, true), $post_id, apply_filters('id_project_goal', $project->the_goal(), $post_id, true)); $colors = get_option('krown_colors'); //$retina = krown_retina(); ?> <div class="col-md-4"> <article class="krown-id-item"> <?php if (has_post_thumbnail($post->ID)) { $image = aq_resize(wp_get_attachment_url(get_post_thumbnail_id(), 'full'), $retina === 'true' ? 510 : 255, null, false, false); $img_obj = '<a class="fancybox-thumb" href="' . get_permalink($post->ID) . '"><figure class="img"><img src="' . $image[0] . '" width="' . $image[1] . '" height="' . $image[2] . '" alt="' . get_the_title() . '" /></figure><span></span></a>'; } else { if (get_post_meta($post->ID, 'ign_product_image1', true) != '') { $image = aq_resize(get_post_meta($post->ID, 'ign_product_image1', true), $retina === 'true' ? 510 : 255, null, false, false); $img_obj = '<a class="fancybox-thumb" href="' . get_permalink($post->ID) . '"><figure class="img"><img src="' . $image[0] . '" width="' . $image[1] . '" height="' . $image[2] . '" alt="' . get_the_title() . '" /></figure><span></span></a>'; } else { $img_obj = ''; } } echo $img_obj; ?>
?> </b></a></th> </tr> </thead> <?php if (count($items) > 0) { $item_array = array(); $i = 0; foreach ($items as $item) { $item_array[$i] = $item; $i++; } for ($i = 0; $i < count($item_array); $i++) { $product_id = $item_array[$i]->product_id; $post_id = getPostbyProductID($product_id); $project = new ID_Project($product_id); $cCode = $project->currency_code(); ?> <tr> <td valign="top"><?php echo $item_array[$i]->id; ?> </td> <td valign="top" class="alternatetd"><?php echo stripslashes(html_entity_decode($item_array[$i]->first_name)) . " " . stripslashes(html_entity_decode($item_array[$i]->last_name)); ?> </td> <td valign="top"><?php echo isset($product_array[$product_id]) ? stripslashes($product_array[$product_id]) : ''; ?> </td>