phpScheduleIt
May 18, 2013, 11:14:58 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: phpScheduleIt 2.4.2 has been released!
 
   Home   Help Login Register  
Pages: [1]
  Print  
Author Topic: Displaying summary on the usage page  (Read 3051 times)
yong1986
Newbie
*

Karma: 0
Posts: 4


« on: September 07, 2007, 11:40:08 AM »

Hello, I need to display the summary of each reservation on the usage search result page, what are the files I need to modify? and how?

Thank you.  Smiley
Logged
Nick
Administrator
Hero Member
*****

Karma: 15
Posts: 5403


WWW
« Reply #1 on: September 10, 2007, 11:23:30 PM »

1) usage.php - Change line 211 to:

print_reservation_data($type, $link, $resNo++, $start_date, $end_date, $created, $modified, $starttime, $endtime, $totTime, $rs['resid'], $rs['fname'], $rs['lname'], $rs['name'], $rs['memberid'], $rs['scheduletitle'], $rs['summary']);


2) templates\usage.template.php - Add a $summary parameter at the end of the print_reservation_data() function, then change the function to actually display it.
Logged
yong1986
Newbie
*

Karma: 0
Posts: 4


« Reply #2 on: September 11, 2007, 10:53:44 AM »

Thanks Nick! This is really the best reservation system  Cheesy
I have another question here, how to get the "notes" variable of the resource and place it to each reservation's data under that resource in the usage page?
This is because I'm trying to do some operation there, to multiply it with total time and get the value as the cost of reservation that needed to pay.
Logged
Nick
Administrator
Hero Member
*****

Karma: 15
Posts: 5403


WWW
« Reply #3 on: September 12, 2007, 09:39:34 AM »

Same basic idea, except you also have to change lib/db/UsageDB.class.php line 80 to:
            rs.machid, rs.name, rs.notes,
Logged
yong1986
Newbie
*

Karma: 0
Posts: 4


« Reply #4 on: September 23, 2007, 05:01:04 AM »

Thanks again  Smiley
A final question, how to display "notes" at the "printTableFooter"? I'm going to get the totalhours to multiply with the value of "notes" so it display the total cost of it.
Logged
Nick
Administrator
Hero Member
*****

Karma: 15
Posts: 5403


WWW
« Reply #5 on: September 24, 2007, 09:30:28 AM »

You'll have to change templates/usage.template.php to actually display it in the HTML.
Logged
yong1986
Newbie
*

Karma: 0
Posts: 4


« Reply #6 on: September 24, 2007, 10:23:37 PM »

I tried to add $notes at printTableFooter(), but I get
Quote
Warning: Missing argument 4 for printtablefooter()

If I add it under printTableFooter(), like this,
Quote
<?php echo $notes ?>

I get "Notice: Undefined variable: notes"
Can I know what's wrong with it? what is the correct way to add $notes at printTableFooter()?
Thanks.

Edit: Nevermind, I've got it!  Cheesy
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2006-2007, Simple Machines Valid XHTML 1.0! Valid CSS!