Jump to content

engEgy

New Members
  • Posts

    2
  • Joined

  • Last visited

    Never

Everything posted by engEgy

  1. oh sorry, I didn't realize you wanted the results to be populated in columns. I don't know php well. but I could tell you my idea. i guess that {section} is the part where the loop runs so before {section} you define a variable, for example, count and assign it a value 0 and add a main table var $count=0; <table> //then add your {section} line {section name=att loop=$rs_label} if( $count==0)//if count =0 then start a new row { <tr> } <td> //inside this td tag put your table of class "stat" <table class="stat" border = "0" width="auto"> /* put the rest of your table here*/ </table> <td> //then add 1 to count $count++; //check if count reached 3 , which is the number of columns you want, then reset to 0 if($count==3) { $count=0; //now close the row tag which is </tr> </tr> } //now close your section then your table tag {/section} </table> I hope this will help. As I said, I don't know php well, but I think I got the variable declaration correct. Anyway, double check my php syntax and tell me how it went. Good luck!
  2. Hi there! I hope I could help with this. So listen, the number of columns should be equal. So I organised them so the main table will have 2 columns. then in the "rate" row I added an inner table with 3 columns. here's the script: <table class="stat"> <tr> <td colspan="2">{$rs_label[att].COMPANY_NAME}</td> <tr/> <tr> <td>{$rs_label[att].PERIOD} </td> <td> {$rs_label[att].FROM_DATE}-{$rs_label[att].TO_DATE}</td> <tr/> <tr> <td>{$rs_label[att].NAME} </td> <td>{$rs_label[att].fullName}</td> </tr> <tr> <td colspan="2">{$rs_label[att].FIRST_LINE}</td> </tr> <tr> <td>{$rs_label[att].RATE_Label}</td> <td> {$rs_label[att].Rate}</td> </tr> <tr> <td colspan="2"> <table> <tr> <td>{$rs_label[att].EARNINGS}</td> <td>{$rs_label[att].HRS}</td> <td>{$rs_label[att].AMOUNT}</td> </tr> <tr> <td>{$rs_label[att].BASIC_PAY_Label}</td> <td>{$rs_label[att].Reg_Hours}</td> <td>{$rs_label[att].Basic_Pay}</td> </tr> <tr> <td>{$rs_label[att].REGULAR_OVERTIME}</td> <td>{$rs_label[att].OTReg_Hours}</td> <td>{$rs_label[att].OTReg_Amt}</td> </tr> <tr> <td>{$rs_label[att].SUN_SPEC_HOLIDAY}</td> <td>{$rs_label[att].SunReg_Hours}</td> <td>{$rs_label[att].SunReg_Amt}</td> </tr> <tr> <td>{$rs_label[att].SUN_SPEC_HOL_OT}</td> <td>{$rs_label[att].OTSun_Hours}</td> <td>{$rs_label[att].OTSun_Amt}</td> </tr> <tr> <td>{$rs_label[att].REG_HOLIDAY}</td> <td>{$rs_label[att].HolReg_Hours}</td> <td>{$rs_label[att].HolReg_Amt}</td> </tr> <tr> <td>{$rs_label[att].REG_HOLIDAY_OT}</td> <td>{$rs_label[att].HolRegOT_Hours}</td> <td>{$rs_label[att].HolRegOT_Amt}</td> </tr> <tr> <td>{$rs_label[att].HOLIDAY_LEAVE}</td> <td>{$rs_label[att].HolLeave_Hours_Tot}</td> <td>{$rs_label[att].HolLeave_Amt}</td> </tr> <tr> <td>{$rs_label[att].NIGHT_PREMIUM_Label}</td> <td>{$rs_label[att].NIGHT_PREMIUM}</td> <td>{$rs_label[att].NP_Amt}</td> </tr> <tr> <td>{$rs_label[att].MEAL_ALLOWANCE_Label}</td> <td>{$rs_label[att].MEAL_ALLOWANCE}</td> <td>{$rs_label[att].Meal_Amt}</td> </tr> <tr> <td>{$rs_label[att].COLA}{$rs_label[att].Cola_Hours}</td> <td>{$rs_label[att].Cola_Amt}</td> <td></td> </tr> <tr> <td colspan="3">{$rs_label[att].SECOND_LINE}</td> </tr> </table> </td> </tr> </table> Please tell me how it turned out because I can't test it without the database and all
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.