Location: PHPKode > projects > SimpleHRM > simplehrm-1.0-beta1/simplehrm-1.0-beta1/templates/default/report/upcomingBirthdays.tpl.html
<div id="report_upcomingBirthdays">
{assign var=emp_sts value=$util->get_values_from_config('EMPLOYMENT_STATUS')}
{assign var=m value=$sm.next_prev->module}
{if defined($smarty.const.LINK_SEPARATOR)}
	{assign var=sep value=$smarty.const.LINK_SEPARATOR}
{else}
	{assign var=sep value="-"}
{/if}
<div class="smler_box">
	<div class="top"></div>
	<div class="mdl">
<b>Month search: </b>
<select id="search_month" name="search_month" onChange="searchUpcomingBirthdays('','','','0');">
	<option value='a'>All</a>
	{html_options options=$sm.dismon selected=$sm.m}
</select>

    	<div class="cont_hdr1 fltlft">		

            <div class="cont_hdr_lft fltlft"></div>
            <div class="cont_hdr_mdl1 fltlft" align="left">Upcoming birthdays ({$sm.next_prev->total})</div>
            <div class="cont_hdr_rht fltlft"></div>
        </div>
        <div class="clear"></div>	
        <center>
        <div class="txtbg_top_smler"></div>
        <div class="txtbg_mdl_smler">
		{if $sm.list}
			<table id="tbl" class="tbl_listing" border="0">
                <thead>
                    <tr>
                        {foreach from=$sm.field item=item key=key name=foric}
                            {if $smarty.session.user_type eq 99 || $item.0 neq Id}
                                    {if $key == $smarty.session.$m.sort_by}
                                    {if $smarty.session.$m.sort_order=="ASC"}
                                    {assign var=cls value="asc"}
                                    {else}
                                    {assign var=cls value="desc"}
                                    {/if}
                                {else}
                                    {assign var=cls value=""}
                                {/if}
                                <th title="Click on {$item.0} to sort" {if $smarty.foreach.foric.first}width='30%'{/if}>
                                {if $item.1!=0}
                                    {if $sm.ajax}
                                        <a href="javascript:get_next_page('##APP_ROOT_URL##{$sm.uri}{$sep}sort_by{$sep}{$key}',0,0,'{$smarty.request.page}_{$smarty.request.choice}')">{if $item!=""}{$item.0}{else}{$key}{/if}</a>
                                    {else}
                                        <a href="##APP_ROOT_URL##{$sm.uri}{$sep}sort_by{$sep}{$key}"><b>{if $item!=""}{$item.0}{else}{$key}{/if}</b></a>
                                    {/if}
                                {else}
                                    <b>{if $item!=""}{$item.0}{else}{$key}{/if}</b>
                                {/if}
                                </th>
                            {/if}
                        {/foreach}
                    </tr>
                </thead>
                <tbody>
                {section name=cur loop=$sm.list}
                {assign var=x value=$sm.list[cur]}
                    <tr class="{cycle values="even,odd"}">
                    <td onclick="empDetail('{$x.id_employee}');" style="cursor:pointer;" title="See details of {$x.name}" align="left"><b>{$x.name} </b></td>
                    <td align="left">{if $x.dob eq '0000-00-00'}NA{else}{$x.dob|date_format:"%B %e, %Y"}{/if}</td>
                    </tr>
                    {/section} 
                </tbody>
            </table>
            {if $sm.type=='advance'}
                <div class="pagination_adv">
                    {$sm.next_prev->generateadv()}
                </div>
            {elseif $sm.type=='box'}
                <div class="pagination_box">
                    <div align="center">{$sm.next_prev->generate()}</div>
                </div>
            {elseif $sm.type=='normal'}
                <div class="pagination">
                    <div align="center">{$sm.next_prev->generate()}</div>
                </div>
            {elseif $sm.type=='nextprev'}
                <div class="pagination">
                    <div align="center">{$sm.next_prev->onlynextprev()}</div>
                </div>
            {elseif $sm.type=='extra'}
                <div class="pagination_box">
                    <div align="center">{$sm.next_prev->generateextra()}</div>
                </div>
            {else}
                {if $sm.type!='no'}
                    <div>
                        <div align="center">{$sm.next_prev->generate()}</div>
                    </div>
                {/if}
            {/if}
        {else}
            <br><div align="center">No upcoming birthday found.</div><br>
        {/if}
        </div>
        <div class="txtbg_btm_smler"></div>
        </center>
	    </div>
	<div class="btm"></div>
</div>
</div>
{literal}
<script type="text/javascript">
	function searchUpcomingBirthdays(f,msg,k,qs){
		cShowActivity('1');
		var url="##LBL_SITE_URL##index.php/report/upcomingBirthdays";
		var m=$.trim($("#search_month").val());
		if(qs===''){
			qs=$("#qstart").val();
		}
		$.post(url,{ce:0,chk:1,qs:qs,m:m},function(res){
			$("#report_upcomingBirthdays").html(res);
			cHideActivity();
		});
	}
</script>
{/literal}
Return current item: SimpleHRM