Jump to content

Open / Closed


Recommended Posts

http://www.whmcs.com/support/

 

I want to use the Open/Closed feature kinda what is used on the link above.

 

Here is mysite link

 

http://www.affordabledomains.ca/support.php

 

here is the code I have so far;

 

<div style="padding:15px 0;background-color:#eee;"><div class="container">
<div class="support-hours">
<div class="col-sm-3">
<h4><a href="http://www.affordabledomains.ca/submitticket.php?step=2&deptid=4" style="display:block;color:#222;">Customer Service</a></h4>
<div>8am to 8pm EST<br/>(Monday – Sunday)</div>
<span class="badge-closed"><i class="fa fa-times-circle"></i> Closed</span> </div>
<div class="col-sm-3">
<h4><a href="http://www.affordabledomains.ca/submitticket.php?step=2&deptid=5" style="display:block;color:#222;">Billing Department</a></h4>
<div>8am to 8pm EST<br/>(Monday – Sunday)</div>
<span class="badge-closed"><i class="fa fa-times-circle"></i> Closed</span> </div>
<div class="col-sm-3">
<h4><a href="http://www.affordabledomains.ca/submitticket.php?step=2&deptid=1" style="display:block;color:#222;">Sales Department</a></h4>
<div>8am to 8pm EST<br/>(Monday – Sunday)</div>
<span class="badge-open"><i class="fa fa-check-circle"></i> Open</span>
</div>


<div class="col-sm-3">
<h4><a href="http://www.affordabledomains.ca/submitticket.php?step=2&deptid=2" style="display:block;color:#222;">Technical Support</a></h4>
<div>24 Hours a Day<br/>(7 Days a Week)</div>
<p class="badge-open"><i class="fa fa-check-circle"></i> Open
</p>
<p class="badge-open"> </p>
</div>
</div>
<div class="clearfix"></div><br/>
<p class="text-center text-muted"><i class="fa fa-clock-o"></i> Current Time: {'+1 hour'|strtotime|date_format:'%A, %B %d/%Y - %H:%M:%S EST'}  
</p>
</div>
</div>


<br/><br/>

 

I basically want it to show green and open during 8am-8pm, but red and showing closed outside those hours, and the tech. support to be open 24/7. so always open and green.

Link to comment
Share on other sites

I basically want it to show green and open during 8am-8pm, but red and showing closed outside those hours, and the tech. support to be open 24/7. so always open and green.

how about using the following for one of your depts...

 

<h4><a href="http://www.affordabledomains.ca/submitticket.php?step=2&deptid=4" style="display:block;color:#222;">Customer Service</a></h4> <div>8am to 8pm EST<br/>(Monday – Sunday)</div>{if '+1 hour'|strtotime|date_format:'%H' gte 8 AND '+1 hour'|strtotime|date_format:'%H' lt 20}<span class="badge-open"><i class="fa fa-check-circle"></i> Open</span>{else}<span class="badge-closed"><i class="fa fa-times-circle"></i> Closed</span>{/if}</div>

that should show "Open" between 8-8 and "Closed" during other times.

Edited by brian!
Link to comment
Share on other sites

how about using the following for one of your depts...

 

<h4><a href="http://www.affordabledomains.ca/submitticket.php?step=2&deptid=4" style="display:block;color:#222;">Customer Service</a></h4> <div>8am to 8pm EST<br/>(Monday – Sunday)</div>{if '+1 hour'|strtotime|date_format:'%H' gte 8 AND '+1 hour'|strtotime|date_format:'%H' lt 20}<span class="badge-open"><i class="fa fa-check-circle"></i> Open</span>{else}<span class="badge-closed"><i class="fa fa-times-circle"></i> Closed</span>{/if}</div>

that should show "Open" between 8-8 and "Closed" during other times.

 

 

Working perfectly!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated