Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6977143
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T17:35:16+00:00 2026-05-27T17:35:16+00:00

I have been working on a site . It displays the following error, Warning:

  • 0

I have been working on a site. It displays the following error,

Warning: Division by zero in
/home/sunshine/public_html/wp-content/themes/DailyDeal/index.php on
line 63

Now I went to check the index.php file but on line 63 I have nothing but a closing brace (})

I would be very thankful if someone could point out the error here(I have tried deactivating all the plugins but the problem still holds).
Below is the complete index.php for the reference,

<?php get_header(); ?>

<script type="text/javascript" >

var root_path_js = '<?php echo get_option('siteurl')."/";?>';

</script>

<script type="text/javascript" src="<?php bloginfo('template_directory'); ?>/library/js/jquery-ui-1.8.14.custom.min.js"></script>

<script type="text/javascript" src="<?php bloginfo('template_directory'); ?>/js/timer.js"></script>

<script type="text/javascript">

jQuery.noConflict();

    function a()

    {

        return false;

    }

    jQuery(function() { 

        jQuery( "#slider-range-min-var" ).slider({

            range: "min",

            value: jQuery("#sellsqlinfo1").val(),

            min:  0,

            max: jQuery("#noofcoupon1").val(),

            enable: false,

            slide: function( event, ui ) {

                jQuery("#amount").val("$"+ ui.value );

            }

        });

        jQuery( "#amount" ).val( "$" + jQuery( "#slider-range-min-var" ).slider( "value" ) );



    });

</script>

<?php

/* Mail To Friend BOF */

if($_POST['sendact']=='email_frnd') {

    require_once (TEMPLATEPATH . '/monetize/send_to_friend/email_friend_frm.php');exit;

}

/* Mail To Friend EOF */

/* Home Page Deal Display BOF */

global $wpdb,$deal_db_table_name;   

$postmeta_db_table_name = $wpdb->prefix."postmeta";

$post_db_table_name = $wpdb->prefix."posts";

$destination_path = site_url().'/wp-content/uploads/';

$args = array('numberposts' => 1,'meta_key' =>'is_expired' , 'meta_value' =>'0','post_status' => 'publish','post_type' => 'seller','meta_key' =>'status' , 'meta_value' =>'2' ,'orderby' => 'DESC');

$recent_posts = get_posts( $args );

if(mysql_affected_rows() > 0) { // 1st IF Condition BOF

    $post_large = bdw_get_images($destination_path.get_post_meta($post->ID,'file_name',true),'large');

    $post_images = bdw_get_images($destination_path.get_post_meta($post->ID,'file_name',true),'thumb'); ?>

    <div class="top_content">

<?php if (function_exists('dynamic_sidebar') && dynamic_sidebar('home_above')) { } else {  }?>

    </div>

<!-- top content #end -->

    <div class="box_header"></div>

    <div class="box_bg">

    <div class=" box_bottom">

<?php foreach( $recent_posts as $post ){  // foreach loop BOF

        if((get_post_meta($post->ID,'status',true) == 2) && (get_post_meta($post->ID,'is_expired',true) == 0)) { 

            deal_expire_process($post->ID); 

            $home_deal_id = $post->ID;

            global $home_deal_id;

            $coupon_website= get_post_meta($post->ID,'coupon_website',true);

            $owner_name= get_post_meta($post->ID,'owner_name',true);

            $our_price= get_post_meta($post->ID,'our_price',true);

            $current_price= get_post_meta($post->ID,'current_price',true);

            $sellsql = "select count(*) from $transection_db_table_name where post_id=".$post->ID." and status=1";

            $totdiff = $current_price - $our_price;

            $percent = $totdiff * 100;

            $percentsave = $percent/$current_price;

            $sellsqlinfo = $wpdb->get_var($sellsql);

            $date = get_post_meta($post->ID,'coupon_end_date_time',true);

            $tardate= date("F d, Y H:i:s",get_post_meta($post->ID,'coupon_end_date_time',true));

            $stdate= date("F d, Y H:i:s",get_post_meta($post->ID,'coupon_start_date_time',true));

            $tardate1= date("F d, Y",get_post_meta($post->ID,'coupon_end_date_time',true));

            if(get_post_meta($post->ID,'coupon_end_date_time',true) != "") {

                if(date("Y-m-d H:i:s") >= $tardate1 && get_post_meta($post->ID,'enddate',true) != '0' || (get_post_meta($post->ID,'no_of_coupon',true)==$sellsqlinfo)) {

                    if(get_post_meta($post->ID,'is_expired',true)== '0' || get_post_meta($post->ID,'is_expired',true)== '') {

                        update_post_meta($post->ID,'is_expired','1');

                    }

                }

            } else {

                if(get_post_meta($post->ID,'enddate',true) != '0' || (get_post_meta($post->ID,'no_of_coupon',true)==$sellsqlinfo)) {

                    if(get_post_meta($post->ID,'is_expired',true)== '0' || get_post_meta($post->ID,'is_expired',true)== '') {

                        update_post_meta($post->ID,'is_expired','1');

                    }

                }

            }

            $geo_longitude  = get_post_meta($post->ID,'geo_longitude',true);

            $geo_latitude  = get_post_meta($post->ID,'geo_latitude',true);

            $shhiping_address  = get_post_meta($post->ID,'shhiping_address',true);

            $coupon_type = get_post_meta($post->ID,'coupon_type',true);

            $no_of_coupon = get_post_meta($post->ID,'no_of_coupon',true); ?>

            <div class="content_left"> <a href="<?php the_permalink(); ?>">

<?php           if(get_post_meta($post->ID,'file_name',true) != "") { ?>

                    <img src="<?php echo templ_thumbimage_filter(get_post_meta($post->ID,'file_name',true),'&amp;w=330&amp;h=250&amp;zc=1&amp;q=80');?>" alt="" />

<?php           } else { ?>

                    <img src="<?php echo templ_thumbimage_filter(get_template_directory_uri()."/images/no-image.png",'&amp;w=330&amp;h=250&amp;zc=1&amp;q=80');?>" alt="" />

<?php           } ?>

            </a> </div>

            <div class="content_right">

                <span class="title_yellow">Today's Top Cruise Holiday Deal</span> 



                <h3><a href="<?php echo get_permalink($post->ID); ?>"><?php echo $post->post_title; ?></a></h3>

<?php               if(date("Y-m-d H:i:s")>= date("Y-m-d H:i:s",get_post_meta($post->ID,'coupon_end_date_time',true))){ 

                    if(get_post_meta($post->ID,'is_expired',true)=='1' || get_post_meta($post->ID,'no_of_coupon',true)==$sellsqlinfo) {

                        ?>

                    <div class="i_expire"><?php _e('This deal has','templatic');?><span><?php _e(' expired','templatic');?></span><?php _e('on','templatic');?>

                    <span><?php echo $tardate1;?></span></div>

<?php                   } 

                } else {

                    if(get_post_meta($post->ID,'coupon_end_date_time',true)){ ?>

                        <div id="demo" style="pointer-events:none; cursor:default;">

                            <div id="slider-range-min-var"  ></div>

                        </div>

                        <div class="deal_time_box">

                            <div class="time_line"></div>

                            <div id="countdowncontainer"></div>

                            <script type="text/javascript">

                            var dealexpire=new cdtime("countdowncontainer", "<?php echo $tardate; ?>")

                            dealexpire.displaycountdown("days", formatresults)

                            </script>

                            <div class="fr">

                                <div class="price_main"> <span class="strike_rate"><?php echo get_currency_sym();?><?php echo $current_price;?></span> <span class="rate"><?php echo get_currency_sym();?><?php echo $our_price;?></span> </div>

<?php                               if(get_post_meta($post->ID,'coupon_type',true) == 1) { ?>

                                    <a href="<?php echo get_post_meta($post->ID,'coupon_link',true); ?>" title="<?php _e(BUY_NOW,'templatic');?>" class="btn_buy" target="_blank"><?php _e(BUY_NOW,'templatic');?></a>

<?php                               } else { ?>

                                    <a href="<?php echo get_option('siteurl');?>/?ptype=buydeal&amp;did=<?php _e($post->ID,'templatic'); ?>" title="<?php _e(BUY_NOW,'templatic');?>" class="btn_buy"><?php _e(BUY_NOW,'templatic');?></a>

<?php                               }?>

                            </div>

                        </div>

<?php                   } ?>

<?php               } ?>

                <!-- Rate Summery BOF -->

                <ul class="rate_summery border_bottom">

                    <li class="rate_current_price"><span><?php _e(CURRENT_PRICE,'templatic');?></span> <strong><small><?php echo get_currency_sym();?></small><?php echo $current_price;?></strong></li>

                    <li class="rate_our_price"><span><?php _e(OUR_PRICE,'templatic');?></span> <strong><small><?php echo get_currency_sym();?></small><?php echo $our_price;?></strong></li>

                    <li class="rate_percentage"><span><?php _e(YOU_SAVE,'templatic');?></span> <strong><?php echo @number_format($percentsave,2);?>%</strong></li>



<?php                   if($sellsqlinfo == 0 ) { 

                        $enddate = explode(" ",$tardate); 

                        $curdate = explode(" ",date("F d, Y H:i:s"));

                        $enddate= str_replace(",","",$enddate[1]);

                        $curdate =  str_replace(",","",$curdate[1]);

                        $startdate = explode(" ",$stdate);

                        $strdate = str_replace(","," ",$startdate[1]);

                        $curtime = $enddate - $curdate;

                        $totaltime =  ($enddate - $strdate);

                        $nowremail = $curdate - $strdate; ?>

                        <input type="hidden" value="<?php echo $nowremail ; ?>" name="sellsqlinfo1" id="sellsqlinfo1"/>

                        <input type="hidden" value="<?php  echo ($enddate - $strdate) ; ?>" name="noofcoupon1" id="noofcoupon1"/>

<?php                   } else {  ?>

                      <input type="hidden" value="<?php echo $sellsqlinfo; ?>" name="sellsqlinfo1" id="sellsqlinfo1"/>

                      <input type="hidden" value="<?php echo $no_of_coupon; ?>" name="noofcoupon1" id="noofcoupon1"/>

<?php                   } ?></li>

                </ul>

                <?php   if(get_post_meta($post->ID,'enddate',true) == '0' && get_option('ptttheme_view_opt') != 'Grid View' && (get_post_meta($post->ID,'status',true) == '1' || get_post_meta($post->ID,'status',true) == '2') ) { 



        ?>

        <?php       if(get_post_meta($post->ID,'coupon_type',true) == 1) {?>

                        <a href="<?php echo get_post_meta($post->ID,'coupon_link',true); ?>" title="<?php _e(BUY_NOW,'templatic');?>" class="btn_buy_deal" target="_blank"><?php _e(BUY_NOW,'templatic');?></a>

        <?php       } else { ?>

                        <a href="<?php echo get_option('siteurl');?>/?ptype=buydeal&amp;did=<?php _e($post->ID,'templatic'); ?>" title="<?php _e(BUY_NOW,'templatic');?>" class="btn_buy_deal"><?php _e(BUY_NOW,'templatic');?></a>

        <?php       }

                }?>

                <!-- Rate Summery EOF -->

                <div id="content" class="text_content" ><?php echo "".$post->post_excerpt."";  ?>

                    <a href="<?php the_permalink(); ?>" class="readmore_link"><?php _e(get_option('ptthemes_content_excerpt_readmore'));?></a> </div>

                </div>

                <!-- Social Network Button Like: twitter,facebook,google + one BOF -->

                <div class="share_div index_share_spacer">

                    <div class="twitt_like"><?php templ_show_twitter_button();  ?></div>

                    <div class="googleplus">

                        <script type="text/javascript" src="https://apis.google.com/js/plusone.js"></script>

                        <script type="text/javascript">

                            gapi.plusone.render(gcontent,"href": "<?php the_permalink(); ?>", "state": "on");

                            gapi.plusone.go("gcontent");

                        </script>

                        <div id="gcontent">

                            <g:plusone href="<?php the_permalink(); ?>" size="medium"></g:plusone>

                        </div>

                    </div>

                    <?php templ_show_facebook_button(); ?>

                    <a href="javascript:void(0);" onclick="show_hide_popup('basic-modal-content');" title="Mail to a friend" class="i_mail b_sendtofriend"><?php _e(MAIL_TO_FRIEND,'templatic');?></a> 

                </div>

                <!-- Social Network Button Like: twitter,facebook,google + one EOF -->

<?php       } else {  ?>

                <div class="content_left">

                    <h3><?php echo _e(NO_RECENT_DEAL,'templatic'); ?></h3>

                </div>

<?php       } 

        }  // foreach loop BOF

    } // 1st IF Condition EOF

/* Home Page Deal Display EOF */ ?>

    </div>

</div>

<!-- main post #end -->

<div class="clear">

  <?php if (function_exists('dynamic_sidebar') && dynamic_sidebar('home_below')) { } else {  }?>

</div>

<?php include_once (TEMPLATEPATH . '/monetize/send_to_friend/popup_frms.php');?>

<?php get_footer(); ?>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T17:35:16+00:00Added an answer on May 27, 2026 at 5:35 pm

    Your divide by zero is inside the include from line 61. Post that code if you still cant find the problem.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been working on a site that displays user information on every page.
The Zend Framework based site I have been working on is now being migrated
I have this classic ASP site which has been working fine until we updated
I have an enquiry form on a site, which has been working for a
So I have been working on a site (http://getcours.tk/), recently, It works fine in
I have this site I've been working on here: http://www.replyonline.co.uk/DirectionGroup/xmas/index.php When you hover over
I have been working on building my first CSS site using divs and am
I have been working on a web services related project for about the last
I have been working with Visual Studio (WinForm and ASP.NET applications using mostly C#)
I have been working with a string[] array in C# that gets returned from

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.