From geeklog-cvs-admin at lists.geeklog.net Thu May 1 13:05:03 2003 From: geeklog-cvs-admin at lists.geeklog.net (geeklog-cvs-admin at lists.geeklog.net) Date: Thu, 1 May 2003 12:05:03 -0500 Subject: [geeklog-cvs] geeklog-1.3/public_html/layout/gameserver header.thtml,1.2,1.3 commentheader.thtml,1.1.1.1,NONE Message-ID: <200305011705.h41H53i09131@internal.geeklog.net> Update of /usr/cvs/geeklog/geeklog-1.3/public_html/layout/gameserver In directory internal.geeklog.net:/tmp/cvs-serv8972 Added Files: header.thtml Removed Files: commentheader.thtml Log Message: Accidentally removed header.thtml instead of header.thtml --- commentheader.thtml DELETED --- From geeklog-cvs-admin at lists.geeklog.net Thu May 1 13:05:47 2003 From: geeklog-cvs-admin at lists.geeklog.net (geeklog-cvs-admin at lists.geeklog.net) Date: Thu, 1 May 2003 12:05:47 -0500 Subject: [geeklog-cvs] geeklog-1.3/public_html/layout/clean/calendar/weekview weekview.thtml,1.1.1.1,1.2 Message-ID: <200305011705.h41H5li09179@internal.geeklog.net> Update of /usr/cvs/geeklog/geeklog-1.3/public_html/layout/clean/calendar/weekview In directory internal.geeklog.net:/tmp/cvs-serv9139/clean/calendar/weekview Modified Files: weekview.thtml Log Message: Some CSS fixes Index: weekview.thtml =================================================================== RCS file: /usr/cvs/geeklog/geeklog-1.3/public_html/layout/clean/calendar/weekview/weekview.thtml,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** weekview.thtml 30 Apr 2003 20:41:34 -0000 1.1.1.1 --- weekview.thtml 1 May 2003 17:05:45 -0000 1.2 *************** *** 1,66 **** ! ! ! ! ! ! !
DayWeekMonth

! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! !
<<  {date_range}  >>
{calendar_title} {calendar_toggle} !
{day1}{langlink_addevent1}
{events_day1}
 
{day2}{langlink_addevent2}
{events_day2}
 
{day3}{langlink_addevent3}
{events_day3}
 
{day4}{langlink_addevent4}
{events_day4}
 
{day5}{langlink_addevent5}
{events_day5}
 
{day6}{langlink_addevent6}
{events_day6}
 
{day7}{langlink_addevent7}
{events_day7}
 

! {quickadd_form} --- 1,66 ---- ! ! ! ! ! ! !
DayWeekMonth

! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! !
<<  {date_range}  >>
{calendar_title} {calendar_toggle} !
{day1}{langlink_addevent1}
{events_day1}
 
{day2}{langlink_addevent2}
{events_day2}
 
{day3}{langlink_addevent3}
{events_day3}
 
{day4}{langlink_addevent4}
{events_day4}
 
{day5}{langlink_addevent5}
{events_day5}
 
{day6}{langlink_addevent6}
{events_day6}
 
{day7}{langlink_addevent7}
{events_day7}
 

! {quickadd_form} From geeklog-cvs-admin at lists.geeklog.net Thu May 1 13:05:47 2003 From: geeklog-cvs-admin at lists.geeklog.net (geeklog-cvs-admin at lists.geeklog.net) Date: Thu, 1 May 2003 12:05:47 -0500 Subject: [geeklog-cvs] geeklog-1.3/public_html/layout/gameserver/calendar calendar.thtml,1.1.1.1,1.2 Message-ID: <200305011705.h41H5li09185@internal.geeklog.net> Update of /usr/cvs/geeklog/geeklog-1.3/public_html/layout/gameserver/calendar In directory internal.geeklog.net:/tmp/cvs-serv9139/gameserver/calendar Modified Files: calendar.thtml Log Message: Some CSS fixes Index: calendar.thtml =================================================================== RCS file: /usr/cvs/geeklog/geeklog-1.3/public_html/layout/gameserver/calendar/calendar.thtml,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** calendar.thtml 30 Apr 2003 20:53:25 -0000 1.1.1.1 --- calendar.thtml 1 May 2003 17:05:45 -0000 1.2 *************** *** 28,40 ****
! !
! !
{previous_months_cal} --- 28,40 ----

! ! ! *************** *** 81,91 **** ! ! ! ! ! ! ! {cal_week} --- 81,91 ---- ! ! ! ! ! ! ! {cal_week} From geeklog-cvs-admin at lists.geeklog.net Thu May 1 13:05:47 2003 From: geeklog-cvs-admin at lists.geeklog.net (geeklog-cvs-admin at lists.geeklog.net) Date: Thu, 1 May 2003 12:05:47 -0500 Subject: [geeklog-cvs] geeklog-1.3/public_html/layout/clean/calendar calendar.thtml,1.1.1.1,1.2 Message-ID: <200305011705.h41H5li09174@internal.geeklog.net> Update of /usr/cvs/geeklog/geeklog-1.3/public_html/layout/clean/calendar In directory internal.geeklog.net:/tmp/cvs-serv9139/clean/calendar Modified Files: calendar.thtml Log Message: Some CSS fixes Index: calendar.thtml =================================================================== RCS file: /usr/cvs/geeklog/geeklog-1.3/public_html/layout/clean/calendar/calendar.thtml,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** calendar.thtml 30 Apr 2003 20:41:30 -0000 1.1.1.1 --- calendar.thtml 1 May 2003 17:05:45 -0000 1.2 *************** *** 1,101 **** ! ! ! !
! ! ! --- 73,77 ----
{previous_months_cal} *************** *** 73,77 ****
{next_months_cal}
{next_months_cal}
 {lang_sunday}{lang_monday}{lang_tuesday}{lang_wednesday}{lang_thursday}{lang_friday}{lang_saturday}
 {lang_sunday}{lang_monday}{lang_tuesday}{lang_wednesday}{lang_thursday}{lang_friday}{lang_saturday}
! ! ! ! ! !
DayWeekMonth

! ! ! ! ! ! ! ! ! ! ! ! ! ! ! {cal_week} !
! ! ! ! ! !
! {previous_months_cal} ! ! ! ! ! ! ! ! ! !
!
! !   ! !

!
! {add_event_option} ! ! {personal_calendar_option} ! {master_calendar_option} !
!
! {next_months_cal} !
!
 {lang_sunday}{lang_monday}{lang_tuesday}{lang_wednesday}{lang_thursday}{lang_friday}{lang_saturday}
! ! ! ! ! ! ! !
!
! ! ! !
!
! {add_event_option} ! ! {personal_calendar_option} ! {master_calendar_option} ! !
! ! ! !
!
! ! ! --- 1,101 ---- ! ! ! ! ! ! ! ! ! !
DayWeekMonth

! ! ! ! ! ! ! ! ! ! ! ! ! ! ! {cal_week} !
! ! ! ! ! !
! {previous_months_cal} ! ! ! ! ! ! ! ! ! !
!
! !   ! !

!
! {add_event_option} ! ! {personal_calendar_option} ! {master_calendar_option} !
!
! {next_months_cal} !
!
 {lang_sunday}{lang_monday}{lang_tuesday}{lang_wednesday}{lang_thursday}{lang_friday}{lang_saturday}
! ! ! ! ! ! ! !
!
! ! ! !
!
! {add_event_option} ! ! {personal_calendar_option} ! {master_calendar_option} ! !
! ! ! !
!
! ! ! From geeklog-cvs-admin at lists.geeklog.net Thu May 1 13:05:47 2003 From: geeklog-cvs-admin at lists.geeklog.net (geeklog-cvs-admin at lists.geeklog.net) Date: Thu, 1 May 2003 12:05:47 -0500 Subject: [geeklog-cvs] geeklog-1.3/public_html/layout/gameserver/calendar/dayview dayview.thtml,1.1.1.1,1.2 quickaddform.thtml,1.1.1.1,1.2 Message-ID: <200305011705.h41H5li09192@internal.geeklog.net> Update of /usr/cvs/geeklog/geeklog-1.3/public_html/layout/gameserver/calendar/dayview In directory internal.geeklog.net:/tmp/cvs-serv9139/gameserver/calendar/dayview Modified Files: dayview.thtml quickaddform.thtml Log Message: Some CSS fixes Index: dayview.thtml =================================================================== RCS file: /usr/cvs/geeklog/geeklog-1.3/public_html/layout/gameserver/calendar/dayview/dayview.thtml,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** dayview.thtml 30 Apr 2003 20:53:27 -0000 1.1.1.1 --- dayview.thtml 1 May 2003 17:05:45 -0000 1.2 *************** *** 20,24 **** ! --- 20,24 ---- !
{lang_day}
*************** *** 27,134 ****
{lang_day}

! ! ! ! ! {0_cols} ! {1_cols} ! {2_cols} ! {3_cols} ! {4_cols} ! {5_cols} ! {6_cols} ! {7_cols} ! {8_cols} ! {9_cols} ! {10_cols} ! {11_cols} ! {12_cols} ! {13_cols} ! {14_cols} ! {15_cols} ! {16_cols} ! {17_cols} ! {18_cols} ! {19_cols} ! {20_cols} ! {21_cols} ! {22_cols} ! {23_cols} --- 27,134 ----
<<  {currentday}  >>
{calendar_title} {calendar_toggle}
{lang_week} {week_num} {allday_events}
12:00am
1:00am
2:00am
3:00am
4:00am
5:00am
6:00am
7:00am
8:00am
9:00am
10:00am
11:00am
12:00pm
1:00pm
2:00pm
3:00pm
4:00pm
5:00pm
6:00pm
7:00pm
8:00pm
9:00pm
10:00pm
11:00pm

! ! ! ! ! {0_cols} ! {1_cols} ! {2_cols} ! {3_cols} ! {4_cols} ! {5_cols} ! {6_cols} ! {7_cols} ! {8_cols} ! {9_cols} ! {10_cols} ! {11_cols} ! {12_cols} ! {13_cols} ! {14_cols} ! {15_cols} ! {16_cols} ! {17_cols} ! {18_cols} ! {19_cols} ! {20_cols} ! {21_cols} ! {22_cols} ! {23_cols} Index: quickaddform.thtml =================================================================== RCS file: /usr/cvs/geeklog/geeklog-1.3/public_html/layout/gameserver/calendar/dayview/quickaddform.thtml,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** quickaddform.thtml 30 Apr 2003 20:53:27 -0000 1.1.1.1 --- quickaddform.thtml 1 May 2003 17:05:45 -0000 1.2 *************** *** 5,9 ****
<<  {currentday}  >>
{calendar_title} {calendar_toggle}
{lang_week} {week_num} {allday_events}
12:00am
1:00am
2:00am
3:00am
4:00am
5:00am
6:00am
7:00am
8:00am
9:00am
10:00am
11:00am
12:00pm
1:00pm
2:00pm
3:00pm
4:00pm
5:00pm
6:00pm
7:00pm
8:00pm
9:00pm
10:00pm
11:00pm
! --- 5,9 ----
{lang_quickadd}
! From geeklog-cvs-admin at lists.geeklog.net Thu May 1 13:05:47 2003 From: geeklog-cvs-admin at lists.geeklog.net (geeklog-cvs-admin at lists.geeklog.net) Date: Thu, 1 May 2003 12:05:47 -0500 Subject: [geeklog-cvs] geeklog-1.3/public_html/layout/gameserver style.css,1.1.1.1,1.2 Message-ID: <200305011705.h41H5li09182@internal.geeklog.net> Update of /usr/cvs/geeklog/geeklog-1.3/public_html/layout/gameserver In directory internal.geeklog.net:/tmp/cvs-serv9139/gameserver Modified Files: style.css Log Message: Some CSS fixes Index: style.css =================================================================== RCS file: /usr/cvs/geeklog/geeklog-1.3/public_html/layout/gameserver/style.css,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** style.css 30 Apr 2003 20:53:20 -0000 1.1.1.1 --- style.css 1 May 2003 17:05:45 -0000 1.2 *************** *** 9,25 **** H2 { color: #d7d8e1; font-weight: bold; font-size: 12px; font-family: Arial, Verdana, Helvetica, sans-serif } ! .cal_day { font-size: 14px; font-weight: bold; } ! .cal_nullday { background: #152442; } ! .cal_oldday { background: #2e4166; } ! .cal_today { background: #546a95; } ! .weekview_caltitle { background: #2e4166; font-weight: bold; font-size: 14px; } ! .weekview_curday { background: yellow; } ! .weekview_offday { background: #2e4166; } ! .weekview_dayformat { font-weight: bold; } ! .weekview_addevent { font-size: 9px; } ! .weekview_daterange { font-size: 16px; font-weight: bold; } ! .dayview_times { font-weight: bold; text-align: center; } ! .dayview_datecol { font-weight: bold; background: #2e4166; font-size: 16px; } ! .dayview_quickaddtitle { font-weight: bold; background: #2e4166; font-size: 14px; } .box { color: #000; scrollbar-face-color: #0066FF; scrollbar-highlight-color: #00ccff; scrollbar-shadow-color: #003366; scrollbar-track-color: #003366 } --- 9,25 ---- H2 { color: #d7d8e1; font-weight: bold; font-size: 12px; font-family: Arial, Verdana, Helvetica, sans-serif } ! .cal-day { font-size: 14px; font-weight: bold; } ! .cal-nullday { background: #152442; } ! .cal-oldday { background: #2e4166; } ! .cal-today { background: #546a95; } ! .weekview-caltitle { background: #2e4166; font-weight: bold; font-size: 14px; } ! .weekview-curday { background: yellow; } ! .weekview-offday { background: #2e4166; } ! .weekview-dayformat { font-weight: bold; } ! .weekview-addevent { font-size: 9px; } ! .weekview-daterange { font-size: 16px; font-weight: bold; } ! .dayview-times { font-weight: bold; text-align: center; } ! .dayview-datecol { font-weight: bold; background: #2e4166; font-size: 16px; } ! .dayview-quickaddtitle { font-weight: bold; background: #2e4166; font-size: 14px; } .box { color: #000; scrollbar-face-color: #0066FF; scrollbar-highlight-color: #00ccff; scrollbar-shadow-color: #003366; scrollbar-track-color: #003366 } *************** *** 67,69 **** select { color: #000033; font-weight: normal; font-size: 10px; font-family: Verdana, Helvetica, sans-serif; background-color: #6a7da3; text-indent: 10px; } ! button { font-family: Verdana, Helvetica, sans-serif; font-size: 14px; font-weight: normal; border-color: #000033; border-style: solid; text-indent: 12px; } \ No newline at end of file --- 67,69 ---- select { color: #000033; font-weight: normal; font-size: 10px; font-family: Verdana, Helvetica, sans-serif; background-color: #6a7da3; text-indent: 10px; } ! button { font-family: Verdana, Helvetica, sans-serif; font-size: 14px; font-weight: normal; border-color: #000033; border-style: solid; text-indent: 12px; } From geeklog-cvs-admin at lists.geeklog.net Thu May 1 13:05:47 2003 From: geeklog-cvs-admin at lists.geeklog.net (geeklog-cvs-admin at lists.geeklog.net) Date: Thu, 1 May 2003 12:05:47 -0500 Subject: [geeklog-cvs] geeklog-1.3/public_html/layout/gameserver/calendar/weekview weekview.thtml,1.1.1.1,1.2 Message-ID: <200305011705.h41H5li09190@internal.geeklog.net> Update of /usr/cvs/geeklog/geeklog-1.3/public_html/layout/gameserver/calendar/weekview In directory internal.geeklog.net:/tmp/cvs-serv9139/gameserver/calendar/weekview Modified Files: weekview.thtml Log Message: Some CSS fixes Index: weekview.thtml =================================================================== RCS file: /usr/cvs/geeklog/geeklog-1.3/public_html/layout/gameserver/calendar/weekview/weekview.thtml,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** weekview.thtml 30 Apr 2003 20:53:28 -0000 1.1.1.1 --- weekview.thtml 1 May 2003 17:05:45 -0000 1.2 *************** *** 28,39 ****
{lang_quickadd}
! ! ! --- 28,39 ----
<<  {date_range}  >>
{calendar_title} {calendar_toggle}
{day1}{langlink_addevent1}
! ! ! *************** *** 41,45 **** ! --- 41,45 ---- ! *************** *** 47,51 **** ! --- 47,51 ---- ! *************** *** 53,57 **** ! --- 53,57 ---- ! *************** *** 59,63 **** ! --- 59,63 ---- ! *************** *** 65,69 **** ! --- 65,69 ---- ! *************** *** 71,75 **** ! --- 71,75 ---- ! From geeklog-cvs-admin at lists.geeklog.net Thu May 1 13:05:47 2003 From: geeklog-cvs-admin at lists.geeklog.net (geeklog-cvs-admin at lists.geeklog.net) Date: Thu, 1 May 2003 12:05:47 -0500 Subject: [geeklog-cvs] geeklog-1.3/public_html/layout/clean style.css,1.1.1.1,1.2 Message-ID: <200305011705.h41H5li09169@internal.geeklog.net> Update of /usr/cvs/geeklog/geeklog-1.3/public_html/layout/clean In directory internal.geeklog.net:/tmp/cvs-serv9139/clean Modified Files: style.css Log Message: Some CSS fixes Index: style.css =================================================================== RCS file: /usr/cvs/geeklog/geeklog-1.3/public_html/layout/clean/style.css,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** style.css 30 Apr 2003 20:41:25 -0000 1.1.1.1 --- style.css 1 May 2003 17:05:45 -0000 1.2 *************** *** 26,42 **** .commentbar3 { color: black; background: #DDDDDD; font-size: 10px; font-family: verdana, arial, sans-serif; } .commenttitle { font-size: 12px; font-weight: bold; background: #DDDDDD; font-family: verdana, arial, sans-serif; } ! .cal_day { font-size: 14px; font-weight: bold; } ! .cal_nullday { background: #EEEEEE; } ! .cal_oldday { background: #DDDDDD; } ! .cal_today { background: #fceead; } ! .weekview_caltitle { background: #DDDDDD; font-weight: bold; font-size: 14px; } ! .weekview_curday { background: yellow; } ! .weekview_offday { background: #DDDDDD; } ! .weekview_dayformat { font-weight: bold; } ! .weekview_addevent { font-size: 9px; } ! .weekview_daterange { font-size: 16px; font-weight: bold; } ! .dayview_times { font-weight: bold; text-align: center; } ! .dayview_datecol { font-weight: bold; background: #DDDDDD; font-size: 16px; } ! .dayview_quickaddtitle { font-weight: bold; background: #DDDDDD; font-size: 14px; } .box { color: #000; scrollbar-face-color: #0066FF; scrollbar-highlight-color: #00ccff; scrollbar-shadow-color: #003366; scrollbar-track-color: #003366 } --- 26,42 ---- .commentbar3 { color: black; background: #DDDDDD; font-size: 10px; font-family: verdana, arial, sans-serif; } .commenttitle { font-size: 12px; font-weight: bold; background: #DDDDDD; font-family: verdana, arial, sans-serif; } ! .cal-day { font-size: 14px; font-weight: bold; } ! .cal-nullday { background: #EEEEEE; } ! .cal-oldday { background: #DDDDDD; } ! .cal-today { background: #fceead; } ! .weekview-caltitle { background: #DDDDDD; font-weight: bold; font-size: 14px; } ! .weekview-curday { background: yellow; } ! .weekview-offday { background: #DDDDDD; } ! .weekview-dayformat { font-weight: bold; } ! .weekview-addevent { font-size: 9px; } ! .weekview-daterange { font-size: 16px; font-weight: bold; } ! .dayview-times { font-weight: bold; text-align: center; } ! .dayview-datecol { font-weight: bold; background: #DDDDDD; font-size: 16px; } ! .dayview-quickaddtitle { font-weight: bold; background: #DDDDDD; font-size: 14px; } .box { color: #000; scrollbar-face-color: #0066FF; scrollbar-highlight-color: #00ccff; scrollbar-shadow-color: #003366; scrollbar-track-color: #003366 } From geeklog-cvs-admin at lists.geeklog.net Thu May 1 13:05:47 2003 From: geeklog-cvs-admin at lists.geeklog.net (geeklog-cvs-admin at lists.geeklog.net) Date: Thu, 1 May 2003 12:05:47 -0500 Subject: [geeklog-cvs] geeklog-1.3/public_html/layout/clean/calendar/dayview dayview.thtml,1.1.1.1,1.2 quickaddform.thtml,1.1.1.1,1.2 Message-ID: <200305011705.h41H5li09176@internal.geeklog.net> Update of /usr/cvs/geeklog/geeklog-1.3/public_html/layout/clean/calendar/dayview In directory internal.geeklog.net:/tmp/cvs-serv9139/clean/calendar/dayview Modified Files: dayview.thtml quickaddform.thtml Log Message: Some CSS fixes Index: dayview.thtml =================================================================== RCS file: /usr/cvs/geeklog/geeklog-1.3/public_html/layout/clean/calendar/dayview/dayview.thtml,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** dayview.thtml 30 Apr 2003 20:41:33 -0000 1.1.1.1 --- dayview.thtml 1 May 2003 17:05:45 -0000 1.2 *************** *** 1,113 **** !
<<  {date_range}  >>
{calendar_title} {calendar_toggle}
{day1}{langlink_addevent1}
{day2}{langlink_addevent2}
{day2}{langlink_addevent2}
{day3}{langlink_addevent3}
{day3}{langlink_addevent3}
{day4}{langlink_addevent4}
{day4}{langlink_addevent4}
{day5}{langlink_addevent5}
{day5}{langlink_addevent5}
{day6}{langlink_addevent6}
{day6}{langlink_addevent6}
{day7}{langlink_addevent7}
{day7}{langlink_addevent7}
!
DayWeek Month

! ! ! ! {0_cols} ! {1_cols} ! {2_cols} ! {3_cols} ! {4_cols} ! {5_cols} ! {6_cols} ! {7_cols} ! {8_cols} ! {9_cols} ! {10_cols} ! {11_cols} ! {12_cols} ! {13_cols} ! {14_cols} ! {15_cols} ! {16_cols} ! {17_cols} ! {18_cols} ! {19_cols} ! {20_cols} ! {21_cols} ! {22_cols} ! {23_cols} --- 1,113 ---- !
<<  {currentday}  >>
{calendar_title} {calendar_toggle}
{lang_week} {week_num} {allday_events}
12:00am
1:00am
2:00am
3:00am
4:00am
5:00am
6:00am
7:00am
8:00am
9:00am
10:00am
11:00am
12:00pm
1:00pm
2:00pm
3:00pm
4:00pm
5:00pm
6:00pm
7:00pm
8:00pm
9:00pm
10:00pm
11:00pm
!
DayWeek Month

! ! ! ! {0_cols} ! {1_cols} ! {2_cols} ! {3_cols} ! {4_cols} ! {5_cols} ! {6_cols} ! {7_cols} ! {8_cols} ! {9_cols} ! {10_cols} ! {11_cols} ! {12_cols} ! {13_cols} ! {14_cols} ! {15_cols} ! {16_cols} ! {17_cols} ! {18_cols} ! {19_cols} ! {20_cols} ! {21_cols} ! {22_cols} ! {23_cols} Index: quickaddform.thtml =================================================================== RCS file: /usr/cvs/geeklog/geeklog-1.3/public_html/layout/clean/calendar/dayview/quickaddform.thtml,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** quickaddform.thtml 30 Apr 2003 20:41:33 -0000 1.1.1.1 --- quickaddform.thtml 1 May 2003 17:05:45 -0000 1.2 *************** *** 5,9 ****
<<  {currentday}  >>
{calendar_title} {calendar_toggle}
{lang_week} {week_num} {allday_events}
12:00am
1:00am
2:00am
3:00am
4:00am
5:00am
6:00am
7:00am
8:00am
9:00am
10:00am
11:00am
12:00pm
1:00pm
2:00pm
3:00pm
4:00pm
5:00pm
6:00pm
7:00pm
8:00pm
9:00pm
10:00pm
11:00pm
! --- 5,9 ----
{lang_quickadd}
! *************** *** 11,21 ****
{lang_quickadd}
! ! ! ! !
{lang_event}{lang_date}{lang_time}
! ! ! ! ! ! !
{lang_event}{lang_date}{lang_time}
! ! + + +
--- 2,6 ----
! !
From geeklog-cvs-admin at lists.geeklog.net Fri May 2 12:47:57 2003 From: geeklog-cvs-admin at lists.geeklog.net (geeklog-cvs-admin at lists.geeklog.net) Date: Fri, 2 May 2003 11:47:57 -0500 Subject: [geeklog-cvs] MVCnPHP Controller.class.php,1.2,1.3 Message-ID: <200305021647.h42Glvi24189@internal.geeklog.net> Update of /usr/cvs/geeklog/MVCnPHP In directory internal.geeklog.net:/tmp/cvs-serv24176 Modified Files: Controller.class.php Log Message: Fixed controller so that when processing a command other than a few it will do a isForward() check. This is necessary to avoid unnecessary errors that would be produced when using QuickForm Index: Controller.class.php =================================================================== RCS file: /usr/cvs/geeklog/MVCnPHP/Controller.class.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Controller.class.php 9 Apr 2003 15:28:51 -0000 1.2 --- Controller.class.php 2 May 2003 16:47:55 -0000 1.3 *************** *** 265,269 **** $tmp = &CommandFactory::getCommand($this->_mapping->getPath(), $this->_mapping->getName()); $strForward = $tmp->execute(); ! $this->_forwardControl($strForward); } } --- 265,272 ---- $tmp = &CommandFactory::getCommand($this->_mapping->getPath(), $this->_mapping->getName()); $strForward = $tmp->execute(); ! // This IF is required to avoid errors using quickform ! if ($this->_isForward($strForward)) { ! $this->_forwardControl($strForward); ! } } } From geeklog-cvs-admin at lists.geeklog.net Fri May 2 13:58:42 2003 From: geeklog-cvs-admin at lists.geeklog.net (geeklog-cvs-admin at lists.geeklog.net) Date: Fri, 2 May 2003 12:58:42 -0500 Subject: [geeklog-cvs] MVCnPHP/quickform - New directory Message-ID: <200305021758.h42Hwgi25312@internal.geeklog.net> Update of /usr/cvs/geeklog/MVCnPHP/quickform In directory internal.geeklog.net:/tmp/cvs-serv25300/quickform Log Message: Directory /usr/cvs/geeklog/MVCnPHP/quickform added to the repository From geeklog-cvs-admin at lists.geeklog.net Fri May 2 13:59:14 2003 From: geeklog-cvs-admin at lists.geeklog.net (geeklog-cvs-admin at lists.geeklog.net) Date: Fri, 2 May 2003 12:59:14 -0500 Subject: [geeklog-cvs] MVCnPHP/quickform/views - New directory Message-ID: <200305021759.h42HxEi25344@internal.geeklog.net> Update of /usr/cvs/geeklog/MVCnPHP/quickform/views In directory internal.geeklog.net:/tmp/cvs-serv25328/views Log Message: Directory /usr/cvs/geeklog/MVCnPHP/quickform/views added to the repository From geeklog-cvs-admin at lists.geeklog.net Fri May 2 14:00:41 2003 From: geeklog-cvs-admin at lists.geeklog.net (geeklog-cvs-admin at lists.geeklog.net) Date: Fri, 2 May 2003 13:00:41 -0500 Subject: [geeklog-cvs] MVCnPHP/quickform index.php,NONE,1.1 mvcconfig.xml,NONE,1.1 Message-ID: <200305021800.h42I0fi25414@internal.geeklog.net> Update of /usr/cvs/geeklog/MVCnPHP/quickform In directory internal.geeklog.net:/tmp/cvs-serv25395 Added Files: index.php mvcconfig.xml Log Message: Initial release for QuickForm example --- NEW FILE: index.php --- * @copyright Tony Bibbs 2003 * @package net.geeklog.mvc.sampleapp * @version $Id: index.php,v 1.1 2003/05/02 18:00:39 tony Exp $ * */ /** * Controller part of the MVC */ require_once '../Controller.class.php'; $configData = '/var/www/MVCnPHP/quickform/mvcconfig.xml'; $controller = &new Controller($configData, MVC_XML); $controller->setMVCBase('/var/www/MVCnPHP/'); $controller->setBaseURL('http://localhost/MVCnPHP/quickform'); $controller->setViewDir('/var/www/MVCnPHP/quickform/views/'); $controller->setCommandDir('/var/www/MVCnPHP/quickform/views/'); $controller->processRequest(); ?> --- NEW FILE: mvcconfig.xml --- show From geeklog-cvs-admin at lists.geeklog.net Fri May 2 14:00:41 2003 From: geeklog-cvs-admin at lists.geeklog.net (geeklog-cvs-admin at lists.geeklog.net) Date: Fri, 2 May 2003 13:00:41 -0500 Subject: [geeklog-cvs] MVCnPHP/quickform/views QFExampleOne.class.php,NONE,1.1 Message-ID: <200305021800.h42I0fi25416@internal.geeklog.net> Update of /usr/cvs/geeklog/MVCnPHP/quickform/views In directory internal.geeklog.net:/tmp/cvs-serv25395/views Added Files: QFExampleOne.class.php Log Message: Initial release for QuickForm example --- NEW FILE: QFExampleOne.class.php --- _setQFormAttributes('frmTest','get'); // Fills with some defaults values $defaultValues['itxtTest'] = 'Test Text Box'; $defaultValues['itxaTest'] = 'Hello World'; $defaultValues['ichkTest'] = true; $defaultValues['iradTest'] = 1; $defaultValues['iselTest'] = array('B', 'C'); $defaultValues['name'] = array('first'=>'Adam', 'last'=>'Daniel'); $defaultValues['phoneNo'] = array('513', '123', '3456'); $defaultValues['iradYesNo'] = 'Y'; $defaultValues['ichkABC'] = array('A'=>true,'B'=>true); $defaultValues['QFText'] = '153.5'; $defaultValues['dateTest1'] = array('d'=>11, 'm'=>1, 'Y'=>2003); $this->_QForm->setDefaults($defaultValues); $constantValues['dateTest3'] = time(); $this->_QForm->setConstants($constantValues); // Elements will be displayed in the order they are declared $this->_QForm->addHeader('Normal Elements'); // Classic form elements $this->_QForm->addElement('hidden', 'ihidTest', 'hiddenField'); $this->_QForm->addElement('hidden','cmd','validate'); $this->_QForm->addElement('text', 'itxtTest', 'Test Text:'); $this->_QForm->addElement('textarea', 'itxaTest', 'Test TextArea:'); $this->_QForm->addElement('password', 'ipwdTest', 'Test Password:'); //$this->_QForm->addElement('file', 'ifilTest', 'File:'); $this->_QForm->addElement('checkbox', 'ichkTest', 'Test CheckBox:', 'Check the box'); $this->_QForm->addElement('radio', 'iradTest', 'Test Radio Buttons:', 'Check the radio button #1', 1); $this->_QForm->addElement('radio', 'iradTest', '(Not a group)', 'Check the radio button #2', 2); $this->_QForm->addElement('button', 'ibtnTest', 'Test Button'); $this->_QForm->addElement('reset', 'iresTest', 'Test Reset'); $this->_QForm->addElement('submit', 'isubTest', 'Test Submit'); $this->_QForm->addElement('image', 'iimgTest', 'http://www.php.net/gifs/php_logo.gif'); $this->_QForm->addElement('select', 'iselTest', 'Test Select:', array('A'=>'A', 'B'=>'B','C'=>'C','D'=>'D')); $select = &$this->_QForm->getElement('iselTest'); $select->setSize(5); $select->setMultiple(true); $this->_QForm->addHeader('Date Elements'); // Date elements $this->_QForm->addElement('date', 'dateTest1', 'Date1:', array('format'=>'dmY', 'minYear'=>2000, 'maxYear'=>2004)); $this->_QForm->addElement('date', 'dateTest2', 'Date2:', array('format'=>'d-F-Y', 'language'=>'de')); $this->_QForm->addElement('date', 'dateTest3', 'Today is:', array('format'=>'l D d M Y')); $this->_QForm->addHeader('Grouped Elements'); // Grouped elements $name['last'] = &HTML_QuickForm::createElement('text', 'last'); $name['last']->setSize(30); $name['first'] = &HTML_QuickForm::createElement('text', 'first'); $name['first']->setSize(20); $this->_QForm->addGroup($name, 'name', 'Name (last, first):', ', '); // Creates a group of text inputs $areaCode = &HTML_QuickForm::createElement('text', ''); $areaCode->setSize(3); $areaCode->setMaxLength(3); $phoneNo1 = &HTML_QuickForm::createElement('text', ''); $phoneNo1->setSize(3); $phoneNo1->setMaxLength(3); $phoneNo2 = &HTML_QuickForm::createElement('text', ''); $phoneNo2->setSize(4); $phoneNo2->setMaxLength(4); $this->_QForm->addGroup(array($areaCode, $phoneNo1, $phoneNo2), 'phoneNo', 'Telephone:', '-'); // Creates a radio buttons group $radio[] = &HTML_QuickForm::createElement('radio', null, null, 'Yes', 'Y'); $radio[] = &HTML_QuickForm::createElement('radio', null, null, 'No', 'N'); $this->_QForm->addGroup($radio, 'iradYesNo', 'Yes/No:'); // Creates a checkboxes group $checkbox[] = &HTML_QuickForm::createElement('checkbox', 'A', null, 'A'); $checkbox[] = &HTML_QuickForm::createElement('checkbox', 'B', null, 'B'); $checkbox[] = &HTML_QuickForm::createElement('checkbox', 'C', null, 'C'); $this->_QForm->addGroup($checkbox, 'ichkABC', 'ABC:', '
'); // Creates a group of buttons to be displayed at the bottom of the form $buttons[] = &HTML_QuickForm::createElement('submit', null, 'Submit'); $buttons[] = &HTML_QuickForm::createElement('reset', null, 'Reset'); $buttons[] = &HTML_QuickForm::createElement('image', 'iimgTest', '/images/apache_pb.gif'); $buttons[] = &HTML_QuickForm::createElement('button', 'ibutTest', 'Test Button'); $this->_QForm->addGroup($buttons); $this->_QForm->addHeader('Using the form element classes directly'); $text = new HTML_QuickForm_text('QFText', 'QuickForm Text:'); $this->_QForm->addElement($text); // applies new filters to the element values $this->_QForm->applyFilter('__ALL__', 'trim'); $this->_QForm->applyFilter('QFText', 'doubleval'); // applies new filters to the element values $this->_QForm->applyFilter('__ALL__', 'trim'); $this->_QForm->applyFilter('QFText', 'doubleval'); // Adds some validation rules $this->_QForm->addRule('itxtTest', 'Test Text is a required field', 'required'); $this->_QForm->addRule('itxaTest', 'Test TextArea is a required field', 'required'); $this->_QForm->addRule('itxaTest', 'Test TextArea must be at least 5 characters', 'minlength', '5'); $this->_QForm->addRule('ipwdTest', 'Password must be between 8 to 10 characters', 'rangelength', '8,10'); $this->_QForm->addRule('QFText', 'Value must be numeric', 'numeric', '', 'client'); if ($this->_QForm->validate()) { $this->_QForm->freeze(); $this->_QForm->process(); echo "\n
\n"; } $this->_QForm->display(); } function execute() { $this->getView(); } } ?> From geeklog-cvs-admin at lists.geeklog.net Fri May 2 14:29:38 2003 From: geeklog-cvs-admin at lists.geeklog.net (geeklog-cvs-admin at lists.geeklog.net) Date: Fri, 2 May 2003 13:29:38 -0500 Subject: [geeklog-cvs] MVCnPHP CHANGELOG,1.1,1.2 Message-ID: <200305021829.h42ITci25753@internal.geeklog.net> Update of /usr/cvs/geeklog/MVCnPHP In directory internal.geeklog.net:/tmp/cvs-serv25740 Modified Files: CHANGELOG Log Message: Updated with latest QuickForm status Index: CHANGELOG =================================================================== RCS file: /usr/cvs/geeklog/MVCnPHP/CHANGELOG,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** CHANGELOG 8 Apr 2003 21:51:10 -0000 1.1 --- CHANGELOG 2 May 2003 18:29:36 -0000 1.2 *************** *** 7,9 **** the view. MVCnPHP typically separates validation logic into a command whereas HTML_QuickForm couples both tasks. This class allows you to do both but, then, requires you to put all your views and ! commands in the same directory. (08 April 2003) \ No newline at end of file --- 7,11 ---- the view. MVCnPHP typically separates validation logic into a command whereas HTML_QuickForm couples both tasks. This class allows you to do both but, then, requires you to put all your views and ! commands in the same directory. (08 April 2003) ! - Fixed bug with QuickForm example that was caused because the Controller::ProcessRequest() method expects ! all commands. (02 May 2003) \ No newline at end of file From geeklog-cvs-admin at lists.geeklog.net Fri May 2 14:30:48 2003 From: geeklog-cvs-admin at lists.geeklog.net (geeklog-cvs-admin at lists.geeklog.net) Date: Fri, 2 May 2003 13:30:48 -0500 Subject: [geeklog-cvs] MVCnPHP README.txt,1.2,1.3 Message-ID: <200305021830.h42IUmi25810@internal.geeklog.net> Update of /usr/cvs/geeklog/MVCnPHP In directory internal.geeklog.net:/tmp/cvs-serv25797 Modified Files: README.txt Log Message: Added a pros/cons section as well as resources to MVC related information. Also updated the organization structure a bit Index: README.txt =================================================================== RCS file: /usr/cvs/geeklog/MVCnPHP/README.txt,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** README.txt 5 Apr 2003 20:15:18 -0000 1.2 --- README.txt 2 May 2003 18:30:46 -0000 1.3 *************** *** 8,15 **** INTRODUCTION TO MVC ORGANIZATION OF MVCnPHP INSTALLATION REQUIREMENTS ! INSTALLING THE EXAMPLE INSTALLING FOR GENERAL USE TODO --- 8,18 ---- INTRODUCTION TO MVC + MVC FEATURES + MVC DRAWBACKS ORGANIZATION OF MVCnPHP INSTALLATION REQUIREMENTS ! INSTALLING THE CONTACT MANAGER EXAMPLE ! INSTALLING THE QUCKFORM EXAMPLE INSTALLING FOR GENERAL USE TODO *************** *** 44,55 **** http://phrame.itsd.ttu.edu/ ORGANIZATION OF MVCnPHP ------------------------- MVCnPHP (holds base MVCnPHP code files) ! contactmanager (folder for sample application) ! commands (holds commands used in contact manager application) ! views (holds views used in contact manager application) ! docs (phpDocumentor documentation) INSTALLATION --- 47,99 ---- http://phrame.itsd.ttu.edu/ + MVC FEATURES + ------------ + + Obviously using a framework package like MVCnPHP you would expect to see the benefits before + you invest. Here is a run down of the benefits of implementing MVC in your applications: + + - The MVC is a solution to the classic problem of separating the user interface, business + logic and related data. + - Render views (user interfaces) via a variety of technologies like XHTML, XML/XSL, WML, + Web services, or any other 3rd party technology (e.g. PEAR::HTML_QuickForm). + - Have multiple views that rely upon a single model. Thus your HTML and WML views can call + on the same underlying business logic for processing. + - Ability to switch backend DBMS with little effort (e.g. MySQL -> PostgreSQL) + - Code ends up being in smaller, more manageable files. + + MVC DRAWBACKS + -------------- + + In an effort to show two sides of the MVC fence here are a few drawbacks: + + - MVC implementations time a fair amount of time to learn how to use them. + - Debugging between models and veiws can be more difficult + - Because MVC breaks tasks down to atomic parts, you end up with a lot of relatively small + files you have to manage. + - Because of the associated ramp-up, MVC in smaller applications may not make much sense. + + MVC RESOURCES + ------------- + + You are encouraged to learn as much about the MVC design pattern as possible. Below are + a few sites related to the MVC pattern you may find useful. Of course, spend time doing + a few Google searches if you desire more diverse information: + + - http://java.sun.com/blueprints/guidelines/designing_enterprise_applications_2e/web-tier/web-tier5.html + - http://phrame.itsd.ttu.edu/ + - http://ootips.org/mvc-pattern.html + - http://www.phppatterns.com/index.php/article/articleview/19/1/1/ + - http://www.google.com and http://groups.google.com for more information + ORGANIZATION OF MVCnPHP ------------------------- MVCnPHP (holds base MVCnPHP code files) ! /contactmanager (folder for sample application) ! /commands (holds commands used in contact manager application) ! /views (holds views used in contact manager application) ! /quickform (folder for quick form example) ! /views (holds an example view that uses PEAR::HTML_QuickForm) ! /docs (phpDocumentor documentation) INSTALLATION *************** *** 62,68 **** 2) MySQL 3.23.x or better (Only needed if you want to run the contact manager application) ! INSTALLING THE EXAMPLE ! ---------------------- It is strongly recommended that you install the example before you begin using this MVC --- 106,113 ---- 2) MySQL 3.23.x or better (Only needed if you want to run the contact manager application) + 3) PEAR::HTML_QuickForm (Only needed if you require QuickForm integration ! INSTALLING THE CONTACT MANAGER EXAMPLE ! --------------------------------------- It is strongly recommended that you install the example before you begin using this MVC *************** *** 80,83 **** --- 125,137 ---- use. It is merely meant to show you that MVCnPHP works and give you a taste at how you might you it in your PHP applications. + + INSTALLING THE QUCKFORM EXAMPLE + ------------------------------- + + PEAR::HTML_QuickForm is a PEAR package that provides object oriented methods for creating + HTML forms and for doing data validation. This example is provided to prove that MVCnPHP + can be easily extended to use other packages for the creation of views. Furthermore, + MVCnPHP includes QF_View.class.php as part of the base distribution so that you could begin + using HTML QuickForm right out-of-the-box. INSTALLATION FOR GENERAL USE From geeklog-cvs-admin at lists.geeklog.net Fri May 2 14:43:38 2003 From: geeklog-cvs-admin at lists.geeklog.net (geeklog-cvs-admin at lists.geeklog.net) Date: Fri, 2 May 2003 13:43:38 -0500 Subject: [geeklog-cvs] MVCnPHP QF_View.class.php,1.2,1.3 Message-ID: <200305021843.h42Ihci26001@internal.geeklog.net> Update of /usr/cvs/geeklog/MVCnPHP In directory internal.geeklog.net:/tmp/cvs-serv25988 Modified Files: QF_View.class.php Log Message: Minor clarification to docs. Index: QF_View.class.php =================================================================== RCS file: /usr/cvs/geeklog/MVCnPHP/QF_View.class.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** QF_View.class.php 9 Apr 2003 18:54:44 -0000 1.2 --- QF_View.class.php 2 May 2003 18:43:36 -0000 1.3 *************** *** 35,39 **** * NOTE: if you use this class you will need to set * Controller::setViewDir() and Controller::setCommandDir() ! * to the same directory lest you want to duplicate code. * * @author Tony Bibbs --- 35,41 ---- * NOTE: if you use this class you will need to set * Controller::setViewDir() and Controller::setCommandDir() ! * to the same directory lest you want to duplicate code. Also, ! * it goes without saying you'll need to make sure you have installed ! * PEAR::HTML_QuickForm prior to using this. * * @author Tony Bibbs From geeklog-cvs-admin at lists.geeklog.net Sat May 3 14:28:23 2003 From: geeklog-cvs-admin at lists.geeklog.net (geeklog-cvs-admin at lists.geeklog.net) Date: Sat, 3 May 2003 13:28:23 -0500 Subject: [geeklog-cvs] geeklog-1.3/public_html users.php,1.56,1.57 Message-ID: <200305031828.h43ISNi04060@internal.geeklog.net> Update of /usr/cvs/geeklog/geeklog-1.3/public_html In directory internal.geeklog.net:/tmp/cvs-serv4054/public_html Modified Files: users.php Log Message: Further edits for the custom registration feature Index: users.php =================================================================== RCS file: /usr/cvs/geeklog/geeklog-1.3/public_html/users.php,v retrieving revision 1.56 retrieving revision 1.57 diff -C2 -d -r1.56 -r1.57 *** users.php 16 Apr 2003 13:20:27 -0000 1.56 --- users.php 3 May 2003 18:28:21 -0000 1.57 *************** *** 457,468 **** return COM_refresh($_CONF['site_url'] . '/index.php?msg=' . $msg); } else { ! $retval .= COM_siteHeader ('Menu') ! . newuserform ($LANG04[19]) ! . COM_siteFooter (); } } else { $retval .= COM_siteHeader ('Menu') . newuserform ($LANG04[18]) ! . COM_siteFooter(); } --- 457,471 ---- return COM_refresh($_CONF['site_url'] . '/index.php?msg=' . $msg); } else { ! $retval .= COM_siteHeader('menu'); ! if ($_CONF['custom_registration'] AND (function_exists(custom_userform))) { ! $retval .= custom_userform('new','',$LANG04[19]); ! } else { ! $retval .= newuserform($LANG04[19]); ! } } } else { $retval .= COM_siteHeader ('Menu') . newuserform ($LANG04[18]) ! . COM_siteFooter (); } *************** *** 634,638 **** $uid = strip_tags ($HTTP_GET_VARS['uid']); if (is_numeric ($uid)) { ! $display .= COM_siteHeader('menu') . userprofile($uid) . COM_siteFooter(); } else { $display .= COM_refresh ($_CONF['site_url'] . '/index.php'); --- 637,646 ---- $uid = strip_tags ($HTTP_GET_VARS['uid']); if (is_numeric ($uid)) { ! // Call custom registration and account record create function if enabled and exists ! if ($_CONF['custom_registration'] AND (function_exists(custom_userform)) AND SEC_hasRights("user.edit")) { ! $display .= COM_siteHeader('menu') . custom_userform('moderate',$uid) . COM_siteFooter(); ! } else { ! $display .= COM_siteHeader('menu') . userprofile($uid) . COM_siteFooter(); ! } } else { $display .= COM_refresh ($_CONF['site_url'] . '/index.php'); *************** *** 651,661 **** break; case 'new': - $display .= COM_siteHeader('menu'); // Call custom registration and account record create function if enabled and exists if ($_CONF['custom_registration'] AND (function_exists(custom_userform))) { $display .= custom_userform('new'); } else { $display .= newuserform($msg); ! } $display .= COM_siteFooter(); break; --- 659,669 ---- break; case 'new': // Call custom registration and account record create function if enabled and exists + $display .= COM_siteHeader('menu'); if ($_CONF['custom_registration'] AND (function_exists(custom_userform))) { $display .= custom_userform('new'); } else { $display .= newuserform($msg); ! } $display .= COM_siteFooter(); break; From geeklog-cvs-admin at lists.geeklog.net Mon May 5 05:33:41 2003 From: geeklog-cvs-admin at lists.geeklog.net (geeklog-cvs-admin at lists.geeklog.net) Date: Mon, 5 May 2003 04:33:41 -0500 Subject: [geeklog-cvs] geeklog-1.3/language english.php,1.79,1.80 german.php,1.66,1.67 Message-ID: <200305050933.h459Xfi00516@internal.geeklog.net> Update of /usr/cvs/geeklog/geeklog-1.3/language In directory internal.geeklog.net:/tmp/cvs-serv474/language Modified Files: english.php german.php Log Message: Introduced new "forgot password" functionality (see docs/history for details). Index: english.php =================================================================== RCS file: /usr/cvs/geeklog/geeklog-1.3/language/english.php,v retrieving revision 1.79 retrieving revision 1.80 diff -C2 -d -r1.79 -r1.80 *** english.php 24 Apr 2003 15:50:33 -0000 1.79 --- english.php 5 May 2003 09:33:38 -0000 1.80 *************** *** 293,297 **** 85 => 'Total number of comments:', 86 => 'Find all postings by', ! 87 => 'Your login name' ); --- 293,302 ---- 85 => 'Total number of comments:', 86 => 'Find all postings by', ! 87 => 'Your login name', ! 88 => 'Someone (possibly you) has requested a new password for your account "%s" on ' . $_CONF['site_name'] . ', <' . $_CONF['site_url'] . ">.\n\nIf you really want this action to be taken, please click on the following link:\n\n", ! 89 => "If you do not want this action to be taken, simply ignore this message and the request will be disregarded (your password will remain unchanged).\n\n", ! 90 => 'You can enter a new password for your account below. Please note that your old password is still valid until you submit this form.', ! 91 => 'Set New Password', ! 92 => 'Enter New Password' ); *************** *** 991,995 **** 50 => "The group has been successfully deleted.", 51 => 'This username is already in use. Please choose another one.', ! 52 => 'The email address provided does not appear to be a valid email address' ); --- 996,1002 ---- 50 => "The group has been successfully deleted.", 51 => 'This username is already in use. Please choose another one.', ! 52 => 'The email address provided does not appear to be a valid email address', ! 53 => 'Your new password has been accepted. Please use your new password below to log in now.', ! 54 => 'Your request for a new password has expired. Please try again below.' ); Index: german.php =================================================================== RCS file: /usr/cvs/geeklog/geeklog-1.3/language/german.php,v retrieving revision 1.66 retrieving revision 1.67 diff -C2 -d -r1.66 -r1.67 *** german.php 24 Apr 2003 15:50:33 -0000 1.66 --- german.php 5 May 2003 09:33:38 -0000 1.67 *************** *** 299,302 **** --- 299,308 ---- 85 => 'Gesamtanzahl Kommentare', 86 => 'Alle Artikel und Kommentare von' + 87 => 'Dein Username', + 88 => 'Jemand (m?glicherweise Du selbst) hat ein neues Passwort f?r Deinen Account "%s" auf ' . $_CONF['site_name'] . ', <' . $_CONF['site_url'] . "> angefordert.\n\nWenn Du tats?chlich ein neues Passwort ben?tigst, klicke bitte auf den folgenden Link:\n\n", + 89 => "M?chtest Du Dein Passwort nicht ?ndern, so kannst Du diese E-Mail einfach ignorieren (Dein bisheriges Passwort bleibt unver?ndert g?ltig).\n\n", + 90 => 'Du kannst hier jetzt ein neues Passwort f?r Deinen Account eingeben. Dein altes Passwort bleibt noch solange g?ltig, bis Du dieses Formular abschickst.', + 91 => 'Neues Passwort', + 92 => 'Neues Passwort eingeben' ); *************** *** 985,988 **** --- 991,998 ---- 49 => "Deine Gruppe wurde gespeichert.", 50 => "Die Gruppe wurde gel?scht." + 51 => 'Dieser Username ist schon vergeben. Bitte w?hle einen anderen.', + 52 => 'Die angegebene E-Mail-Adresse scheint nicht g?ltig zu sein.', + 53 => 'Dein neues Passwort wurde gespeichert. Bitte melde Dich nun mit dem neuen Passwort an.', + 54 => 'Diese Anfrage f?r ein neues Passwort ist nicht mehr g?ltig. Bitte fordere erneut ein neues Passwort an.' ); From geeklog-cvs-admin at lists.geeklog.net Mon May 5 05:33:41 2003 From: geeklog-cvs-admin at lists.geeklog.net (geeklog-cvs-admin at lists.geeklog.net) Date: Mon, 5 May 2003 04:33:41 -0500 Subject: [geeklog-cvs] geeklog-1.3/public_html/layout/clean/users newpassword.thtml,NONE,1.1 Message-ID: <200305050933.h459Xfi00532@internal.geeklog.net> Update of /usr/cvs/geeklog/geeklog-1.3/public_html/layout/clean/users In directory internal.geeklog.net:/tmp/cvs-serv474/public_html/layout/clean/users Added Files: newpassword.thtml Log Message: Introduced new "forgot password" functionality (see docs/history for details). --- NEW FILE: newpassword.thtml ---

{lang_explain}

{lang_username}: {user_name}
{lang_newpassword}:
From geeklog-cvs-admin at lists.geeklog.net Mon May 5 05:33:41 2003 From: geeklog-cvs-admin at lists.geeklog.net (geeklog-cvs-admin at lists.geeklog.net) Date: Mon, 5 May 2003 04:33:41 -0500 Subject: [geeklog-cvs] geeklog-1.3/docs history,1.89,1.90 theme.html,1.16,1.17 Message-ID: <200305050933.h459Xfi00514@internal.geeklog.net> Update of /usr/cvs/geeklog/geeklog-1.3/docs In directory internal.geeklog.net:/tmp/cvs-serv474/docs Modified Files: history theme.html Log Message: Introduced new "forgot password" functionality (see docs/history for details). Index: history =================================================================== RCS file: /usr/cvs/geeklog/geeklog-1.3/docs/history,v retrieving revision 1.89 retrieving revision 1.90 diff -C2 -d -r1.89 -r1.90 *** history 30 Apr 2003 21:06:51 -0000 1.89 --- history 5 May 2003 09:33:38 -0000 1.90 *************** *** 4,7 **** --- 4,14 ---- ------- + - Introduced new "forgot password" functionality: When requesting a new password + for an account, the user will now receive an email with a link that s/he has + to click on. It will take the user to a form where s/he can enter a new + password (a unique id is contained in the URL and checked when entering the + new password, thus preventing misuse). The old password remains valid until a + new password is entered from this form, so the email can simply be ignored in + case the user didn't request a new password (cf. Feature Request #567979). - Removed unused commentheader.thtml file from all default themes. - Fixed the redirect after posting a comment to a poll (should return to the Index: theme.html =================================================================== RCS file: /usr/cvs/geeklog/geeklog-1.3/docs/theme.html,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** theme.html 30 Apr 2003 21:06:51 -0000 1.16 --- theme.html 5 May 2003 09:33:38 -0000 1.17 *************** *** 168,171 **** --- 168,172 ---- preferences/username.thtml preferences/userphoto.thtml + users/newpassword.thtml From geeklog-cvs-admin at lists.geeklog.net Mon May 5 05:33:41 2003 From: geeklog-cvs-admin at lists.geeklog.net (geeklog-cvs-admin at lists.geeklog.net) Date: Mon, 5 May 2003 04:33:41 -0500 Subject: [geeklog-cvs] geeklog-1.3/public_html/layout/Yahoo/users newpassword.thtml,NONE,1.1 Message-ID: <200305050933.h459Xfi00530@internal.geeklog.net> Update of /usr/cvs/geeklog/geeklog-1.3/public_html/layout/Yahoo/users In directory internal.geeklog.net:/tmp/cvs-serv474/public_html/layout/Yahoo/users Added Files: newpassword.thtml Log Message: Introduced new "forgot password" functionality (see docs/history for details). --- NEW FILE: newpassword.thtml ---

{lang_explain}

{lang_username}: {user_name}
{lang_newpassword}:
From geeklog-cvs-admin at lists.geeklog.net Mon May 5 05:33:41 2003 From: geeklog-cvs-admin at lists.geeklog.net (geeklog-cvs-admin at lists.geeklog.net) Date: Mon, 5 May 2003 04:33:41 -0500 Subject: [geeklog-cvs] geeklog-1.3/public_html users.php,1.57,1.58 Message-ID: <200305050933.h459Xfi00519@internal.geeklog.net> Update of /usr/cvs/geeklog/geeklog-1.3/public_html In directory internal.geeklog.net:/tmp/cvs-serv474/public_html Modified Files: users.php Log Message: Introduced new "forgot password" functionality (see docs/history for details). Index: users.php =================================================================== RCS file: /usr/cvs/geeklog/geeklog-1.3/public_html/users.php,v retrieving revision 1.57 retrieving revision 1.58 diff -C2 -d -r1.57 -r1.58 *** users.php 3 May 2003 18:28:21 -0000 1.57 --- users.php 5 May 2003 09:33:38 -0000 1.58 *************** *** 287,291 **** { global $_TABLES, $_CONF, $LANG04, $LANG_CHARSET; ! $result = DB_query("SELECT email,passwd FROM {$_TABLES['users']} WHERE username = '$username'"); $nrows = DB_numRows($result); --- 287,291 ---- { global $_TABLES, $_CONF, $LANG04, $LANG_CHARSET; ! $result = DB_query("SELECT email,passwd FROM {$_TABLES['users']} WHERE username = '$username'"); $nrows = DB_numRows($result); *************** *** 301,304 **** --- 301,305 ---- $passwd2 = md5($passwd); DB_change($_TABLES['users'],'passwd',"$passwd2",'username',$username); + DB_change($_TABLES['users'],'pwrequestid',"NULL",'username',$username); $mailtext = "{$LANG04[15]}\r\n\r\n"; $mailtext .= "{$LANG04[2]}: $username\r\n"; *************** *** 319,323 **** ,"{$_CONF["site_name"]}: {$LANG04[16]}" ,$mailtext ! ,"From: {$_CONF["site_name"]} <{$_CONF["site_mail"]}>\r\nReturn-Path: <{$_CONF["site_mail"]}>\r\nContent-Type: text/plain; charset={$charset}\r\nX-Mailer: GeekLog $VERSION" ); --- 320,324 ---- ,"{$_CONF["site_name"]}: {$LANG04[16]}" ,$mailtext ! ,"From: {$_CONF["site_name"]} <{$_CONF["site_mail"]}>\r\nReturn-Path: <{$_CONF["site_mail"]}>\r\nX-Mailer: GeekLog " . VERSION . "\r\nContent-Type: text/plain; charset={$charset}" ); *************** *** 335,344 **** /** * Send an email notification when a new user registers with the site. * ! * @username string User name of the new user ! * @email string Email address of the new user ! * @uid int User id of the new user ! * @queued bool true = user was added to user submission queue * */ --- 336,435 ---- /** + * User request for a new password - send email with a link and request id + * + * @param username string name of user who requested the new password + * @param msg int index of message to display (if any) + * @return string form or meta redirect + * + */ + function requestpassword ($username, $msg = 0) + { + global $_TABLES, $_CONF, $LANG04, $LANG_CHARSET; + + $result = DB_query ("SELECT uid,email,passwd FROM {$_TABLES['users']} WHERE username = '$username'"); + $nrows = DB_numRows ($result); + if ($nrows == 1) { + $A = DB_fetchArray ($result); + if (($_CONF['usersubmission'] == 1) && ($A['passwd'] == md5 (''))) { + return COM_refresh ($_CONF['site_url'] . '/index.php?msg=48'); + } + $reqid = substr (md5 (uniqid (rand (), 1)), 1, 16); + DB_change ($_TABLES['users'], 'pwrequestid', "$reqid", + 'username', $username); + + $mailtext = sprintf ($LANG04[88], $username); + $mailtext .= $_CONF['site_url'] . '/users.php?mode=newpwd&uid=' . $A['uid'] . '&rid=' . $reqid . "\n\n"; + $mailtext .= $LANG04[89]; + $mailtext .= "{$_CONF["site_name"]}\n"; + $mailtext .= "{$_CONF['site_url']}\n"; + + if (empty ($LANG_CHARSET)) { + $charset = $_CONF['default_charset']; + if (empty ($charset)) { + $charset = "iso-8859-1"; + } + } else { + $charset = $LANG_CHARSET; + } + mail ($A['email'], + "{$_CONF['site_name']}: {$LANG04[16]}", + $mailtext, + "From: {$_CONF['site_name']} <{$_CONF['site_mail']}>\r\nReturn-Path: <{$_CONF['site_mail']}>\r\nX-Mailer: GeekLog " . VERSION . "\r\nContent-Type: text/plain; charset={$charset}" + ); + + if ($msg) { + $retval .= COM_refresh ($_CONF['site_url'] . "/index.php?msg=$msg"); + } else { + $retval .= COM_refresh ($_CONF['site_url'] . '/index.php'); + } + } else { + $retval .= COM_siteHeader ('menu') + . defaultform ($LANG04[17]) . COM_siteFooter (); + } + + return $retval; + } + + /** + * Display a form where the user can enter a new password. + * + * @param uid int user id + * @param requestid string request id for password change + * @return string new password form + * + */ + function newpasswordform ($uid, $requestid) + { + global $_CONF, $_TABLES, $LANG04; + + $pwform = new Template ($_CONF['path_layout'] . 'users'); + $pwform->set_file (array ('newpw' => 'newpassword.thtml')); + $pwform->set_var ('site_url', $_CONF['site_url']); + $pwform->set_var ('layout_url', $_CONF['layout_url']); + + $pwform->set_var ('user_id', $uid); + $pwform->set_var ('user_name', DB_getItem ($_TABLES['users'], 'username', + "uid = '{$uid}'")); + $pwform->set_var ('request_id', $requestid); + + $pwform->set_var ('lang_explain', $LANG04[90]); + $pwform->set_var ('lang_username', $LANG04[2]); + $pwform->set_var ('lang_newpassword', $LANG04[4]); + $pwform->set_var ('lang_setnewpwd', $LANG04[91]); + + $retval = COM_startBlock ($LANG04[92]); + $retval .= $pwform->finish ($pwform->parse ('output', 'newpw')); + $retval .= COM_endBlock (); + + return $retval; + } + + /** * Send an email notification when a new user registers with the site. * ! * @param username string User name of the new user ! * @param email string Email address of the new user ! * @param uid int User id of the new user ! * @param queued bool true = user was added to user submission queue * */ *************** *** 372,377 **** $mailheaders = "From: {$_CONF['site_name']} <{$_CONF['site_mail']}>\r\n" . "Return-Path: {$_CONF['site_mail']}\r\n" ! . "Content-Type: text/plain; charset=$charset\r\n" ! . "X-Mailer: GeekLog " . VERSION; @mail ($_CONF['site_mail'], $mailsubject, $mailbody, $mailheaders); --- 463,468 ---- $mailheaders = "From: {$_CONF['site_name']} <{$_CONF['site_mail']}>\r\n" . "Return-Path: {$_CONF['site_mail']}\r\n" ! . "X-Mailer: GeekLog " . VERSION . "\r\n" ! . "Content-Type: text/plain; charset=$charset"; @mail ($_CONF['site_mail'], $mailsubject, $mailbody, $mailheaders); *************** *** 451,455 **** if ($_CONF['custom_registration'] AND (function_exists(custom_usercreate))) { custom_usercreate($uid); ! } PLG_createUser ($uid); --- 542,546 ---- if ($_CONF['custom_registration'] AND (function_exists(custom_usercreate))) { custom_usercreate($uid); ! } PLG_createUser ($uid); *************** *** 457,471 **** return COM_refresh($_CONF['site_url'] . '/index.php?msg=' . $msg); } else { ! $retval .= COM_siteHeader('menu'); ! if ($_CONF['custom_registration'] AND (function_exists(custom_userform))) { ! $retval .= custom_userform('new','',$LANG04[19]); ! } else { ! $retval .= newuserform($LANG04[19]); ! } } } else { $retval .= COM_siteHeader ('Menu') . newuserform ($LANG04[18]) ! . COM_siteFooter (); } --- 548,563 ---- return COM_refresh($_CONF['site_url'] . '/index.php?msg=' . $msg); } else { ! $retval .= COM_siteHeader ('Menu'); ! if ($_CONF['custom_registration'] AND (function_exists(custom_userform))) { ! $retval .= custom_userform ('new', '', $LANG04[19]); ! } else { ! $retval .= newuserform ($LANG04[19]) ! } ! $retval .= COM_siteFooter (); } } else { $retval .= COM_siteHeader ('Menu') . newuserform ($LANG04[18]) ! . COM_siteFooter(); } *************** *** 637,646 **** $uid = strip_tags ($HTTP_GET_VARS['uid']); if (is_numeric ($uid)) { ! // Call custom registration and account record create function if enabled and exists ! if ($_CONF['custom_registration'] AND (function_exists(custom_userform)) AND SEC_hasRights("user.edit")) { ! $display .= COM_siteHeader('menu') . custom_userform('moderate',$uid) . COM_siteFooter(); ! } else { ! $display .= COM_siteHeader('menu') . userprofile($uid) . COM_siteFooter(); } } else { $display .= COM_refresh ($_CONF['site_url'] . '/index.php'); --- 729,742 ---- $uid = strip_tags ($HTTP_GET_VARS['uid']); if (is_numeric ($uid)) { ! $display .= COM_siteHeader('menu'); ! // Call custom registration and account record create function if ! // enabled and exists ! if ($_CONF['custom_registration'] AND (function_exists(custom_userform)) ! AND SEC_hasRights("user.edit")) { ! $display .= custom_userform ('moderate', $uid); ! } else { ! $display .= userprofile ($uid); } + $display .= COM_siteFooter (); } else { $display .= COM_refresh ($_CONF['site_url'] . '/index.php'); *************** *** 655,669 **** $display .= COM_siteFooter(); break; case 'emailpasswd': ! $display .= emailpassword($HTTP_POST_VARS['username'], 1); break; case 'new': - // Call custom registration and account record create function if enabled and exists $display .= COM_siteHeader('menu'); ! if ($_CONF['custom_registration'] AND (function_exists(custom_userform))) { $display .= custom_userform('new'); ! } else { ! $display .= newuserform($msg); ! } $display .= COM_siteFooter(); break; --- 751,817 ---- $display .= COM_siteFooter(); break; + case 'newpwd': + $uid = $HTTP_GET_VARS['uid']; + $reqid = $HTTP_GET_VARS['rid']; + if (!empty ($uid) && is_numeric ($uid) && !empty ($reqid)) { + $valid = DB_count ($_TABLES['users'], array ('uid', 'pwrequestid'), array ($uid, $reqid)); + if ($valid == 1) { + $display .= COM_siteHeader ('menu'); + $display .= newpasswordform ($uid, $reqid); + $display .= COM_siteFooter (); + } else { // request invalid or expired + $display .= COM_siteHeader ('menu'); + $display .= COM_showMessage (54); + $display .= getpasswordform (); + $display .= COM_siteFooter (); + } + } else { + // this request doesn't make sense - ignore it + $display = COM_refresh ($_CONF['site_url']); + } + break; + case 'setnewpwd': + if (empty ($HTTP_POST_VARS['passwd'])) { + $display = COM_refresh ($_CONF['site_url'] + . '/users.php?mode=newpwd&uid=' . $HTTP_POST_VARS['uid'] + . '&rid=' . $HTTP_POST_VARS['rid']); + } else { + $uid = $HTTP_POST_VARS['uid']; + $reqid = $HTTP_POST_VARS['rid']; + if (!empty ($uid) && is_numeric ($uid) && !empty ($reqid)) { + $valid = DB_count ($_TABLES['users'], array ('uid', 'pwrequestid'), + array ($uid, $reqid)); + if ($valid == 1) { + $passwd = md5 ($HTTP_POST_VARS['passwd']); + DB_change ($_TABLES['users'], 'passwd', "$passwd", + "uid", $uid); + DB_delete ($_TABLES['sessions'], 'uid', $uid); + DB_change ($_TABLES['users'], 'pwrequestid', "NULL", + 'username', $username); + $display = COM_refresh ($_CONF['site_url'] . '/users.php?msg=53'); + } else { // request invalid or expired + $display .= COM_siteHeader ('menu'); + $display .= COM_showMessage (54); + $display .= getpasswordform (); + $display .= COM_siteFooter (); + } + } else { + // this request doesn't make sense - ignore it + $display = COM_refresh ($_CONF['site_url']); + } + } + break; case 'emailpasswd': ! $display .= requestpassword ($HTTP_POST_VARS['username'], 1); break; case 'new': $display .= COM_siteHeader('menu'); ! // Call custom registration and account record create function ! // if enabled and exists ! if ($_CONF['custom_registration'] AND (function_exists(custom_userform))) { $display .= custom_userform('new'); ! } else { ! $display .= newuserform($msg); ! } $display .= COM_siteFooter(); break; *************** *** 682,685 **** --- 830,834 ---- } if (!empty($passwd) && $mypasswd == md5($passwd)) { + DB_change($_TABLES['users'],'pwrequestid',"NULL",'username',$loginname); $userdata = SESS_getUserData($loginname); $_USER=$userdata; *************** *** 723,732 **** } ! // Now that we have users data see if their theme cookie is set. If not set it ! setcookie($_CONF['cookie_theme'],$_USER['theme'],time() + 31536000,$_CONF['cookie_path']); ! ! // Increment the numlogins counter for this user ! // DB_change("users","numlogins","numlogins + 1","username","$loginname"); ! if (($HTTP_REFERER) && ($HTTP_REFERER <> ($_CONF['site_url']."/users.php"))) { $indexMsg = $_CONF['site_url'] . '/index.php?msg='; if (substr ($HTTP_REFERER, 0, strlen ($indexMsg)) == $indexMsg) { --- 872,881 ---- } ! // Now that we have users data see if their theme cookie is set. ! // If not set it ! setcookie ($_CONF['cookie_theme'], $_USER['theme'], time() + 31536000, ! $_CONF['cookie_path']); ! ! if (($HTTP_REFERER) && (strstr ($HTTP_REFERER, '/users.php') === false)) { $indexMsg = $_CONF['site_url'] . '/index.php?msg='; if (substr ($HTTP_REFERER, 0, strlen ($indexMsg)) == $indexMsg) { *************** *** 745,750 **** switch ($mode) { case 'create': ! // Got bad account info from registration process, show error message ! // and display form again $display .= newuserform(); break; --- 894,899 ---- switch ($mode) { case 'create': ! // Got bad account info from registration process, show error ! // message and display form again $display .= newuserform(); break; *************** *** 759,763 **** } - //$display .= defaultform($msg) . COM_siteFooter(); $display .= COM_siteFooter(); } --- 908,911 ---- From geeklog-cvs-admin at lists.geeklog.net Mon May 5 05:33:41 2003 From: geeklog-cvs-admin at lists.geeklog.net (geeklog-cvs-admin at lists.geeklog.net) Date: Mon, 5 May 2003 04:33:41 -0500 Subject: [geeklog-cvs] geeklog-1.3/sql/updates mysql_1.3.7_to_1.3.8.php,1.1,1.2 Message-ID: <200305050933.h459Xfi00553@internal.geeklog.net> Update of /usr/cvs/geeklog/geeklog-1.3/sql/updates In directory internal.geeklog.net:/tmp/cvs-serv474/sql/updates Modified Files: mysql_1.3.7_to_1.3.8.php Log Message: Introduced new "forgot password" functionality (see docs/history for details). Index: mysql_1.3.7_to_1.3.8.php =================================================================== RCS file: /usr/cvs/geeklog/geeklog-1.3/sql/updates/mysql_1.3.7_to_1.3.8.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** mysql_1.3.7_to_1.3.8.php 24 Mar 2003 17:42:18 -0000 1.1 --- mysql_1.3.7_to_1.3.8.php 5 May 2003 09:33:39 -0000 1.2 *************** *** 3,5 **** --- 3,7 ---- $_SQL[] = "ALTER TABLE {$_TABLES['topics']} ADD is_default tinyint(1) unsigned NOT NULL DEFAULT '0'"; + $_SQL[] = "ALTER TABLE {$_TABLES['users']} ADD pwrequestid varchar(16) DEFAULT NULL"; + ?> From geeklog-cvs-admin at lists.geeklog.net Mon May 5 05:33:41 2003 From: geeklog-cvs-admin at lists.geeklog.net (geeklog-cvs-admin at lists.geeklog.net) Date: Mon, 5 May 2003 04:33:41 -0500 Subject: [geeklog-cvs] geeklog-1.3/public_html/layout/gameserver/users newpassword.thtml,NONE,1.1 Message-ID: <200305050933.h459Xfi00542@internal.geeklog.net> Update of /usr/cvs/geeklog/geeklog-1.3/public_html/layout/gameserver/users In directory internal.geeklog.net:/tmp/cvs-serv474/public_html/layout/gameserver/users Added Files: newpassword.thtml Log Message: Introduced new "forgot password" functionality (see docs/history for details). --- NEW FILE: newpassword.thtml ---

{lang_explain}

{lang_username}: {user_name}
{lang_newpassword}:
From geeklog-cvs-admin at lists.geeklog.net Mon May 5 05:33:41 2003 From: geeklog-cvs-admin at lists.geeklog.net (geeklog-cvs-admin at lists.geeklog.net) Date: Mon, 5 May 2003 04:33:41 -0500 Subject: [geeklog-cvs] geeklog-1.3/public_html/layout/XSilver/users newpassword.thtml,NONE,1.1 Message-ID: <200305050933.h459Xfi00528@internal.geeklog.net> Update of /usr/cvs/geeklog/geeklog-1.3/public_html/layout/XSilver/users In directory internal.geeklog.net:/tmp/cvs-serv474/public_html/layout/XSilver/users Added Files: newpassword.thtml Log Message: Introduced new "forgot password" functionality (see docs/history for details). --- NEW FILE: newpassword.thtml ---

{lang_explain}

{lang_username}: {user_name}
{lang_newpassword}:
From geeklog-cvs-admin at lists.geeklog.net Mon May 5 05:33:41 2003 From: geeklog-cvs-admin at lists.geeklog.net (geeklog-cvs-admin at lists.geeklog.net) Date: Mon, 5 May 2003 04:33:41 -0500 Subject: [geeklog-cvs] geeklog-1.3/public_html/layout/Digital_Monochrome/users newpassword.thtml,NONE,1.1 Message-ID: <200305050933.h459Xfi00524@internal.geeklog.net> Update of /usr/cvs/geeklog/geeklog-1.3/public_html/layout/Digital_Monochrome/users In directory internal.geeklog.net:/tmp/cvs-serv474/public_html/layout/Digital_Monochrome/users Added Files: newpassword.thtml Log Message: Introduced new "forgot password" functionality (see docs/history for details). --- NEW FILE: newpassword.thtml ---

{lang_explain}

{lang_username}: {user_name}
{lang_newpassword}:
From geeklog-cvs-admin at lists.geeklog.net Mon May 5 05:33:41 2003 From: geeklog-cvs-admin at lists.geeklog.net (geeklog-cvs-admin at lists.geeklog.net) Date: Mon, 5 May 2003 04:33:41 -0500 Subject: [geeklog-cvs] geeklog-1.3/sql mysql_tableanddata.php,1.45,1.46 Message-ID: <200305050933.h459Xfi00551@internal.geeklog.net> Update of /usr/cvs/geeklog/geeklog-1.3/sql In directory internal.geeklog.net:/tmp/cvs-serv474/sql Modified Files: mysql_tableanddata.php Log Message: Introduced new "forgot password" functionality (see docs/history for details). Index: mysql_tableanddata.php =================================================================== RCS file: /usr/cvs/geeklog/geeklog-1.3/sql/mysql_tableanddata.php,v retrieving revision 1.45 retrieving revision 1.46 diff -C2 -d -r1.45 -r1.46 *** mysql_tableanddata.php 24 Mar 2003 17:42:18 -0000 1.45 --- mysql_tableanddata.php 5 May 2003 09:33:39 -0000 1.46 *************** *** 511,514 **** --- 511,515 ---- theme varchar(64) default NULL, language varchar(64) default NULL, + pwrequestid varchar(16) default NULL, PRIMARY KEY (uid), KEY LOGIN (uid,passwd,username) From geeklog-cvs-admin at lists.geeklog.net Mon May 5 05:33:41 2003 From: geeklog-cvs-admin at lists.geeklog.net (geeklog-cvs-admin at lists.geeklog.net) Date: Mon, 5 May 2003 04:33:41 -0500 Subject: [geeklog-cvs] geeklog-1.3/public_html/layout/Smooth_Blue/users newpassword.thtml,NONE,1.1 Message-ID: <200305050933.h459Xfi00526@internal.geeklog.net> Update of /usr/cvs/geeklog/geeklog-1.3/public_html/layout/Smooth_Blue/users In directory internal.geeklog.net:/tmp/cvs-serv474/public_html/layout/Smooth_Blue/users Added Files: newpassword.thtml Log Message: Introduced new "forgot password" functionality (see docs/history for details). --- NEW FILE: newpassword.thtml ---

{lang_explain}

{lang_username}: {user_name}
{lang_newpassword}:
From geeklog-cvs-admin at lists.geeklog.net Mon May 5 05:33:41 2003 From: geeklog-cvs-admin at lists.geeklog.net (geeklog-cvs-admin at lists.geeklog.net) Date: Mon, 5 May 2003 04:33:41 -0500 Subject: [geeklog-cvs] geeklog-1.3/public_html/layout/Classic/users newpassword.thtml,NONE,1.1 Message-ID: <200305050933.h459Xfi00522@internal.geeklog.net> Update of /usr/cvs/geeklog/geeklog-1.3/public_html/layout/Classic/users In directory internal.geeklog.net:/tmp/cvs-serv474/public_html/layout/Classic/users Added Files: newpassword.thtml Log Message: Introduced new "forgot password" functionality (see docs/history for details). --- NEW FILE: newpassword.thtml ---

{lang_explain}

{lang_username}: {user_name}
{lang_newpassword}:
From geeklog-cvs-admin at lists.geeklog.net Mon May 5 05:45:18 2003 From: geeklog-cvs-admin at lists.geeklog.net (geeklog-cvs-admin at lists.geeklog.net) Date: Mon, 5 May 2003 04:45:18 -0500 Subject: [geeklog-cvs] geeklog-1.3/language german.php,1.67,1.68 Message-ID: <200305050945.h459jIi00618@internal.geeklog.net> Update of /usr/cvs/geeklog/geeklog-1.3/language In directory internal.geeklog.net:/tmp/cvs-serv606 Modified Files: german.php Log Message: Missing commas ... Index: german.php =================================================================== RCS file: /usr/cvs/geeklog/geeklog-1.3/language/german.php,v retrieving revision 1.67 retrieving revision 1.68 diff -C2 -d -r1.67 -r1.68 *** german.php 5 May 2003 09:33:38 -0000 1.67 --- german.php 5 May 2003 09:45:16 -0000 1.68 *************** *** 298,305 **** 84 => 'Gesamtanzahl Artikel:', 85 => 'Gesamtanzahl Kommentare', ! 86 => 'Alle Artikel und Kommentare von' 87 => 'Dein Username', ! 88 => 'Jemand (m?glicherweise Du selbst) hat ein neues Passwort f?r Deinen Account "%s" auf ' . $_CONF['site_name'] . ', <' . $_CONF['site_url'] . "> angefordert.\n\nWenn Du tats?chlich ein neues Passwort ben?tigst, klicke bitte auf den folgenden Link:\n\n", ! 89 => "M?chtest Du Dein Passwort nicht ?ndern, so kannst Du diese E-Mail einfach ignorieren (Dein bisheriges Passwort bleibt unver?ndert g?ltig).\n\n", 90 => 'Du kannst hier jetzt ein neues Passwort f?r Deinen Account eingeben. Dein altes Passwort bleibt noch solange g?ltig, bis Du dieses Formular abschickst.', 91 => 'Neues Passwort', --- 298,305 ---- 84 => 'Gesamtanzahl Artikel:', 85 => 'Gesamtanzahl Kommentare', ! 86 => 'Alle Artikel und Kommentare von', 87 => 'Dein Username', ! 88 => 'Jemand (m?glicherweise Du selbst) hat ein neues Passwort f?r Deinen Account "%s" auf ' . $_CONF['site_name'] . ' <' . $_CONF['site_url'] . "> angefordert.\n\nWenn Du tats?chlich ein neues Passwort ben?tigst, klicke bitte auf den folgenden Link:\n\n", ! 89 => "M?chtest Du Dein Passwort nicht ?ndern, so kannst Du diese E-Mail einfach ignorieren (Dein bisheriges Passwort bleibt dann unver?ndert g?ltig).\n\n", 90 => 'Du kannst hier jetzt ein neues Passwort f?r Deinen Account eingeben. Dein altes Passwort bleibt noch solange g?ltig, bis Du dieses Formular abschickst.', 91 => 'Neues Passwort', *************** *** 990,994 **** 48 => 'Danke, dass Du dich bei ' . $_CONF['site_name'] . ' angemeldet hast. Dein Aufnahmeantrag wird von unserem Team gepr?ft. Sobald er akzeptiert wird, wirst Du Dein Passwort per E-Mail erhalten.', 49 => "Deine Gruppe wurde gespeichert.", ! 50 => "Die Gruppe wurde gel?scht." 51 => 'Dieser Username ist schon vergeben. Bitte w?hle einen anderen.', 52 => 'Die angegebene E-Mail-Adresse scheint nicht g?ltig zu sein.', --- 990,994 ---- 48 => 'Danke, dass Du dich bei ' . $_CONF['site_name'] . ' angemeldet hast. Dein Aufnahmeantrag wird von unserem Team gepr?ft. Sobald er akzeptiert wird, wirst Du Dein Passwort per E-Mail erhalten.', 49 => "Deine Gruppe wurde gespeichert.", ! 50 => "Die Gruppe wurde gel?scht.", 51 => 'Dieser Username ist schon vergeben. Bitte w?hle einen anderen.', 52 => 'Die angegebene E-Mail-Adresse scheint nicht g?ltig zu sein.', From geeklog-cvs-admin at lists.geeklog.net Mon May 5 05:45:46 2003 From: geeklog-cvs-admin at lists.geeklog.net (geeklog-cvs-admin at lists.geeklog.net) Date: Mon, 5 May 2003 04:45:46 -0500 Subject: [geeklog-cvs] geeklog-1.3/public_html users.php,1.58,1.59 Message-ID: <200305050945.h459jki00634@internal.geeklog.net> Update of /usr/cvs/geeklog/geeklog-1.3/public_html In directory internal.geeklog.net:/tmp/cvs-serv622/public_html Modified Files: users.php Log Message: Missing semicolon ... Index: users.php =================================================================== RCS file: /usr/cvs/geeklog/geeklog-1.3/public_html/users.php,v retrieving revision 1.58 retrieving revision 1.59 diff -C2 -d -r1.58 -r1.59 *** users.php 5 May 2003 09:33:38 -0000 1.58 --- users.php 5 May 2003 09:45:44 -0000 1.59 *************** *** 552,556 **** $retval .= custom_userform ('new', '', $LANG04[19]); } else { ! $retval .= newuserform ($LANG04[19]) } $retval .= COM_siteFooter (); --- 552,556 ---- $retval .= custom_userform ('new', '', $LANG04[19]); } else { ! $retval .= newuserform ($LANG04[19]); } $retval .= COM_siteFooter (); From geeklog-cvs-admin at lists.geeklog.net Mon May 5 12:52:37 2003 From: geeklog-cvs-admin at lists.geeklog.net (geeklog-cvs-admin at lists.geeklog.net) Date: Mon, 5 May 2003 11:52:37 -0500 Subject: [geeklog-cvs] geeklog-1.3/system lib-database.php,1.24,1.25 Message-ID: <200305051652.h45Gqbi05137@internal.geeklog.net> Update of /usr/cvs/geeklog/geeklog-1.3/system In directory internal.geeklog.net:/tmp/cvs-serv5089/system Modified Files: lib-database.php Log Message: Replaced separate commentspeedlimit and submitspeedlimit tables with a general speedlimit table and new COM_ functions operating on it. Index: lib-database.php =================================================================== RCS file: /usr/cvs/geeklog/geeklog-1.3/system/lib-database.php,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** lib-database.php 23 Sep 2002 08:27:24 -0000 1.24 --- lib-database.php 5 May 2003 16:52:35 -0000 1.25 *************** *** 57,61 **** $_TABLES['commentmodes'] = $_DB_table_prefix . 'commentmodes'; $_TABLES['comments'] = $_DB_table_prefix . 'comments'; - $_TABLES['commentspeedlimit'] = $_DB_table_prefix . 'commentspeedlimit'; $_TABLES['cookiecodes'] = $_DB_table_prefix . 'cookiecodes'; $_TABLES['dateformats'] = $_DB_table_prefix . 'dateformats'; --- 57,60 ---- *************** *** 78,85 **** $_TABLES['sessions'] = $_DB_table_prefix . 'sessions'; $_TABLES['sortcodes'] = $_DB_table_prefix . 'sortcodes'; $_TABLES['statuscodes'] = $_DB_table_prefix . 'statuscodes'; $_TABLES['stories'] = $_DB_table_prefix . 'stories'; $_TABLES['storysubmission'] = $_DB_table_prefix . 'storysubmission'; - $_TABLES['submitspeedlimit'] = $_DB_table_prefix . 'submitspeedlimit'; $_TABLES['topics'] = $_DB_table_prefix . 'topics'; $_TABLES['tzcodes'] = $_DB_table_prefix . 'tzcodes'; --- 77,84 ---- $_TABLES['sessions'] = $_DB_table_prefix . 'sessions'; $_TABLES['sortcodes'] = $_DB_table_prefix . 'sortcodes'; + $_TABLES['speedlimit'] = $_DB_table_prefix . 'speedlimit'; $_TABLES['statuscodes'] = $_DB_table_prefix . 'statuscodes'; $_TABLES['stories'] = $_DB_table_prefix . 'stories'; $_TABLES['storysubmission'] = $_DB_table_prefix . 'storysubmission'; $_TABLES['topics'] = $_DB_table_prefix . 'topics'; $_TABLES['tzcodes'] = $_DB_table_prefix . 'tzcodes'; *************** *** 94,99 **** $_TABLES['staticpage'] = $_DB_table_prefix . 'staticpage'; ! // this table isn't used by Geeklog any more, but the table name is needed // when upgrading from old versions $_TABLES['userevent'] = $_DB_table_prefix . 'userevent'; --- 93,100 ---- $_TABLES['staticpage'] = $_DB_table_prefix . 'staticpage'; ! // these tables aren't used by Geeklog any more, but the table names are needed // when upgrading from old versions + $_TABLES['commentspeedlimit'] = $_DB_table_prefix . 'commentspeedlimit'; + $_TABLES['submitspeedlimit'] = $_DB_table_prefix . 'submitspeedlimit'; $_TABLES['userevent'] = $_DB_table_prefix . 'userevent'; From geeklog-cvs-admin at lists.geeklog.net Mon May 5 12:52:37 2003 From: geeklog-cvs-admin at lists.geeklog.net (geeklog-cvs-admin at lists.geeklog.net) Date: Mon, 5 May 2003 11:52:37 -0500 Subject: [geeklog-cvs] geeklog-1.3/sql/updates mysql_1.3.7_to_1.3.8.php,1.2,1.3 Message-ID: <200305051652.h45Gqbi05134@internal.geeklog.net> Update of /usr/cvs/geeklog/geeklog-1.3/sql/updates In directory internal.geeklog.net:/tmp/cvs-serv5089/sql/updates Modified Files: mysql_1.3.7_to_1.3.8.php Log Message: Replaced separate commentspeedlimit and submitspeedlimit tables with a general speedlimit table and new COM_ functions operating on it. Index: mysql_1.3.7_to_1.3.8.php =================================================================== RCS file: /usr/cvs/geeklog/geeklog-1.3/sql/updates/mysql_1.3.7_to_1.3.8.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** mysql_1.3.7_to_1.3.8.php 5 May 2003 09:33:39 -0000 1.2 --- mysql_1.3.7_to_1.3.8.php 5 May 2003 16:52:35 -0000 1.3 *************** *** 5,7 **** --- 5,18 ---- $_SQL[] = "ALTER TABLE {$_TABLES['users']} ADD pwrequestid varchar(16) DEFAULT NULL"; + $_SQL[] = "CREATE TABLE {$_TABLES['speedlimit']} ( + id int(10) unsigned NOT NULL auto_increment, + ipaddress varchar(15) NOT NULL default '', + date int(10) unsigned default NULL, + type varchar(30) NOT NULL default 'submit', + PRIMARY KEY (id) + ) TYPE = MyISAM"; + + $_SQL[] = "DROP TABLES {$_TABLES['commentspeedlimit']}"; + $_SQL[] = "DROP TABLES {$_TABLES['submitspeedlimit']}"; + ?> From geeklog-cvs-admin at lists.geeklog.net Mon May 5 12:52:37 2003 From: geeklog-cvs-admin at lists.geeklog.net (geeklog-cvs-admin at lists.geeklog.net) Date: Mon, 5 May 2003 11:52:37 -0500 Subject: [geeklog-cvs] geeklog-1.3/public_html lib-common.php,1.218,1.219 submit.php,1.51,1.52 Message-ID: <200305051652.h45Gqbi05128@internal.geeklog.net> Update of /usr/cvs/geeklog/geeklog-1.3/public_html In directory internal.geeklog.net:/tmp/cvs-serv5089/public_html Modified Files: lib-common.php submit.php Log Message: Replaced separate commentspeedlimit and submitspeedlimit tables with a general speedlimit table and new COM_ functions operating on it. Index: lib-common.php =================================================================== RCS file: /usr/cvs/geeklog/geeklog-1.3/public_html/lib-common.php,v retrieving revision 1.218 retrieving revision 1.219 diff -C2 -d -r1.218 -r1.219 *** lib-common.php 28 Apr 2003 08:15:33 -0000 1.218 --- lib-common.php 5 May 2003 16:52:35 -0000 1.219 *************** *** 4551,4554 **** --- 4551,4612 ---- /** + * Check if speed limit applies for current IP address. + * + * @param type string type of speed limit to check, e.g. 'submit', 'comment' + * @return int 0 = does not apply, else: seconds since last post + */ + function COM_checkSpeedlimit ($type = 'submit') + { + global $_TABLES, $REMOTE_ADDR; + + $last = 0; + + $date = DB_getItem ($_TABLES['speedlimit'], 'date', + "(type = '$type') AND (ipaddress = '$REMOTE_ADDR')"); + if (!empty ($date)) { + $last = time () - $date; + if ($last == 0) { + // just in case someone manages to submit something in < 1 sec. + $last = 1; + } + } + + return $last; + } + + /** + * Store post info for current IP address. + * + * @param type string type of speed limit, e.g. 'submit', 'comment' + * + */ + function COM_updateSpeedlimit ($type = 'submit') + { + global $_TABLES, $REMOTE_ADDR; + + DB_save ($_TABLES['speedlimit'], 'ipaddress,date,type', + "'$REMOTE_ADDR',unix_timestamp(),'$type'"); + } + + /** + * Clear out expired speed limits, i.e. entries older than 'x' seconds + * + * @param speedlimit int number of seconds + * @param type string type of speed limit, e.g. 'submit', 'comment' + * + */ + function COM_clearSpeedlimit ($speedlimit = 60, $type = '') + { + global $_TABLES; + + $sql = "DELETE FROM {$_TABLES['speedlimit']} WHERE "; + if (!empty ($type)) { + $sql .= "(type = '$type') AND "; + } + $sql .= "(date < unix_timestamp() - $speedlimit)"; + DB_query ($sql); + } + + /** * Wrapper function for URL class so as to not confuse people as this will eventually get * used all over the place Index: submit.php =================================================================== RCS file: /usr/cvs/geeklog/geeklog-1.3/public_html/submit.php,v retrieving revision 1.51 retrieving revision 1.52 diff -C2 -d -r1.51 -r1.52 *** submit.php 24 Mar 2003 17:42:17 -0000 1.51 --- submit.php 5 May 2003 16:52:35 -0000 1.52 *************** *** 59,71 **** $retval = ''; ! DB_query("DELETE FROM {$_TABLES['submitspeedlimit']} WHERE date < unix_timestamp() - {$_CONF["speedlimit"]}"); ! ! $id = DB_count($_TABLES['submitspeedlimit'],'ipaddress',$REMOTE_ADDR); ! if ($id > 0) { ! $result = DB_query("SELECT date FROM {$_TABLES['submitspeedlimit']} WHERE ipaddress = '$REMOTE_ADDR'"); ! $A = DB_fetchArray($result); ! $last = time() - $A['date']; $retval .= COM_startBlock($LANG12[26]) . $LANG12[30] --- 59,67 ---- $retval = ''; ! COM_clearSpeedlimit ($_CONF['speedlimit'], 'submit'); ! $last = COM_checkSpeedlimit ('submit'); ! if ($last > 0) { $retval .= COM_startBlock($LANG12[26]) . $LANG12[30] *************** *** 551,555 **** } $A['lid'] = COM_makeSid(); ! DB_save($_TABLES['submitspeedlimit'],'ipaddress, date',"'$REMOTE_ADDR',unix_timestamp()"); if (($_CONF['linksubmission'] == 1) && !SEC_hasRights('link.submit')) { $result = DB_save($_TABLES['linksubmission'],'lid,category,url,description,title,date',"{$A["lid"]},'{$A["category"]}','{$A["url"]}','{$A["description"]}','{$A['title']}',NOW()",$_CONF['site_url']."/index.php?msg=3"); --- 547,551 ---- } $A['lid'] = COM_makeSid(); ! COM_updateSpeedlimit ('submit'); if (($_CONF['linksubmission'] == 1) && !SEC_hasRights('link.submit')) { $result = DB_save($_TABLES['linksubmission'],'lid,category,url,description,title,date',"{$A["lid"]},'{$A["category"]}','{$A["url"]}','{$A["description"]}','{$A['title']}',NOW()",$_CONF['site_url']."/index.php?msg=3"); *************** *** 609,613 **** } ! DB_save($_TABLES['submitspeedlimit'],'ipaddress, date',"'$REMOTE_ADDR',unix_timestamp()"); if ($A['allday'] == 'on') { --- 605,609 ---- } ! COM_updateSpeedlimit ('submit'); if ($A['allday'] == 'on') { *************** *** 670,684 **** default: if ((strlen($type) > 0) && ($type <> 'story')) { ! // Update the submitspeedlimit for user - assuming Plugin approves submission record ! DB_save($_TABLES['submitspeedlimit'],'ipaddress, date',"'$REMOTE_ADDR',unix_timestamp()"); ! // see if this is a submission that needs to be handled by a plugin and should include it's own redirect ! if (!PLG_saveSubmission($type, $A)) { ! COM_errorLog("Could not save your submission. Bad type: $type"); ! } ! // plugin and should include it's own redirect - but in case handle it here and redirect to the main page ! $retval = COM_refresh ($_CONF['site_url'] . '/index.php'); return $retval; - } if (!empty($A['title']) && !empty($A['introtext'])) { $A['title'] = addslashes(strip_tags(COM_checkWords($A['title']))); --- 666,684 ---- default: if ((strlen($type) > 0) && ($type <> 'story')) { ! // Update the submitspeedlimit for user - assuming Plugin approves ! // submission record ! COM_updateSpeedlimit ('submit'); ! ! // see if this is a submission that needs to be handled by a plugin ! // and should include it's own redirect ! if (!PLG_saveSubmission($type, $A)) { ! COM_errorLog("Could not save your submission. Bad type: $type"); ! } ! // plugin should include it's own redirect - but in case handle ! // it here and redirect to the main page ! $retval = COM_refresh ($_CONF['site_url'] . '/index.php'); return $retval; } + if (!empty($A['title']) && !empty($A['introtext'])) { $A['title'] = addslashes(strip_tags(COM_checkWords($A['title']))); *************** *** 694,698 **** $_USER['uid'] = 1; } ! DB_save($_TABLES['submitspeedlimit'],'ipaddress, date',"'$REMOTE_ADDR',unix_timestamp()"); if (($_CONF['storysubmission'] == 1) && !SEC_hasRights('story.submit')) { DB_save($_TABLES['storysubmission'],"sid,tid,uid,title,introtext,date,postmode","{$A["sid"]},'{$A["tid"]}',{$_USER['uid']},'{$A['title']}','{$A["introtext"]}',NOW(),'{$A["postmode"]}'",$_CONF['site_url']."/index.php?msg=2"); --- 694,698 ---- $_USER['uid'] = 1; } ! COM_updateSpeedlimit ('submit'); if (($_CONF['storysubmission'] == 1) && !SEC_hasRights('story.submit')) { DB_save($_TABLES['storysubmission'],"sid,tid,uid,title,introtext,date,postmode","{$A["sid"]},'{$A["tid"]}',{$_USER['uid']},'{$A['title']}','{$A["introtext"]}',NOW(),'{$A["postmode"]}'",$_CONF['site_url']."/index.php?msg=2"); From geeklog-cvs-admin at lists.geeklog.net Mon May 5 12:52:37 2003 From: geeklog-cvs-admin at lists.geeklog.net (geeklog-cvs-admin at lists.geeklog.net) Date: Mon, 5 May 2003 11:52:37 -0500 Subject: [geeklog-cvs] geeklog-1.3/sql mysql_tableanddata.php,1.46,1.47 Message-ID: <200305051652.h45Gqbi05131@internal.geeklog.net> Update of /usr/cvs/geeklog/geeklog-1.3/sql In directory internal.geeklog.net:/tmp/cvs-serv5089/sql Modified Files: mysql_tableanddata.php Log Message: Replaced separate commentspeedlimit and submitspeedlimit tables with a general speedlimit table and new COM_ functions operating on it. Index: mysql_tableanddata.php =================================================================== RCS file: /usr/cvs/geeklog/geeklog-1.3/sql/mysql_tableanddata.php,v retrieving revision 1.46 retrieving revision 1.47 diff -C2 -d -r1.46 -r1.47 *** mysql_tableanddata.php 5 May 2003 09:33:39 -0000 1.46 --- mysql_tableanddata.php 5 May 2003 16:52:35 -0000 1.47 *************** *** 75,87 **** $_SQL[6] = " - CREATE TABLE {$_TABLES['commentspeedlimit']} ( - id int(10) unsigned NOT NULL auto_increment, - ipaddress varchar(15) NOT NULL default '', - date int(10) unsigned default NULL, - PRIMARY KEY (id) - ) TYPE=MyISAM - "; - - $_SQL[7] = " CREATE TABLE {$_TABLES['cookiecodes']} ( cc_value int(8) unsigned NOT NULL default '0', --- 75,78 ---- *************** *** 91,95 **** "; ! $_SQL[8] = " CREATE TABLE {$_TABLES['dateformats']} ( dfid tinyint(4) NOT NULL default '0', --- 82,86 ---- "; ! $_SQL[7] = " CREATE TABLE {$_TABLES['dateformats']} ( dfid tinyint(4) NOT NULL default '0', *************** *** 100,104 **** "; ! $_SQL[9] = " CREATE TABLE {$_TABLES['events']} ( eid varchar(20) NOT NULL default '', --- 91,95 ---- "; ! $_SQL[8] = " CREATE TABLE {$_TABLES['events']} ( eid varchar(20) NOT NULL default '', *************** *** 130,134 **** "; ! $_SQL[10] = " CREATE TABLE {$_TABLES['eventsubmission']} ( eid varchar(20) NOT NULL default '', --- 121,125 ---- "; ! $_SQL[9] = " CREATE TABLE {$_TABLES['eventsubmission']} ( eid varchar(20) NOT NULL default '', *************** *** 152,156 **** "; ! $_SQL[11] = " CREATE TABLE {$_TABLES['featurecodes']} ( code tinyint(4) NOT NULL default '0', --- 143,147 ---- "; ! $_SQL[10] = " CREATE TABLE {$_TABLES['featurecodes']} ( code tinyint(4) NOT NULL default '0', *************** *** 160,164 **** "; ! $_SQL[12] = " CREATE TABLE {$_TABLES['features']} ( ft_id mediumint(8) NOT NULL auto_increment, --- 151,155 ---- "; ! $_SQL[11] = " CREATE TABLE {$_TABLES['features']} ( ft_id mediumint(8) NOT NULL auto_increment, *************** *** 171,175 **** "; ! $_SQL[13] = " CREATE TABLE {$_TABLES['frontpagecodes']} ( code tinyint(4) NOT NULL default '0', --- 162,166 ---- "; ! $_SQL[12] = " CREATE TABLE {$_TABLES['frontpagecodes']} ( code tinyint(4) NOT NULL default '0', *************** *** 179,183 **** "; ! $_SQL[14] = " CREATE TABLE {$_TABLES['group_assignments']} ( ug_main_grp_id mediumint(8) NOT NULL default '0', --- 170,174 ---- "; ! $_SQL[13] = " CREATE TABLE {$_TABLES['group_assignments']} ( ug_main_grp_id mediumint(8) NOT NULL default '0', *************** *** 189,193 **** "; ! $_SQL[15] = " CREATE TABLE {$_TABLES['groups']} ( grp_id mediumint(8) NOT NULL auto_increment, --- 180,184 ---- "; ! $_SQL[14] = " CREATE TABLE {$_TABLES['groups']} ( grp_id mediumint(8) NOT NULL auto_increment, *************** *** 200,204 **** "; ! $_SQL[16] = " CREATE TABLE {$_TABLES['links']} ( lid varchar(20) NOT NULL default '', --- 191,195 ---- "; ! $_SQL[15] = " CREATE TABLE {$_TABLES['links']} ( lid varchar(20) NOT NULL default '', *************** *** 220,224 **** "; ! $_SQL[17] = " CREATE TABLE {$_TABLES['linksubmission']} ( lid varchar(20) NOT NULL default '', --- 211,215 ---- "; ! $_SQL[16] = " CREATE TABLE {$_TABLES['linksubmission']} ( lid varchar(20) NOT NULL default '', *************** *** 233,237 **** "; ! $_SQL[18] = " CREATE TABLE {$_TABLES['maillist']} ( code int(1) NOT NULL default '0', --- 224,228 ---- "; ! $_SQL[17] = " CREATE TABLE {$_TABLES['maillist']} ( code int(1) NOT NULL default '0', *************** *** 241,245 **** "; ! $_SQL[19] = " CREATE TABLE {$_TABLES['personal_events']} ( eid varchar(20) NOT NULL default '', --- 232,236 ---- "; ! $_SQL[18] = " CREATE TABLE {$_TABLES['personal_events']} ( eid varchar(20) NOT NULL default '', *************** *** 270,274 **** "; ! $_SQL[20] = " CREATE TABLE {$_TABLES['plugins']} ( pi_name varchar(30) NOT NULL default '', --- 261,265 ---- "; ! $_SQL[19] = " CREATE TABLE {$_TABLES['plugins']} ( pi_name varchar(30) NOT NULL default '', *************** *** 281,285 **** "; ! $_SQL[21] = " CREATE TABLE {$_TABLES['pollanswers']} ( qid varchar(20) NOT NULL default '', --- 272,276 ---- "; ! $_SQL[20] = " CREATE TABLE {$_TABLES['pollanswers']} ( qid varchar(20) NOT NULL default '', *************** *** 291,295 **** "; ! $_SQL[22] = " CREATE TABLE {$_TABLES['pollquestions']} ( qid varchar(20) NOT NULL default '', --- 282,286 ---- "; ! $_SQL[21] = " CREATE TABLE {$_TABLES['pollquestions']} ( qid varchar(20) NOT NULL default '', *************** *** 314,318 **** "; ! $_SQL[23] = " CREATE TABLE {$_TABLES['pollvoters']} ( id int(10) unsigned NOT NULL auto_increment, --- 305,309 ---- "; ! $_SQL[22] = " CREATE TABLE {$_TABLES['pollvoters']} ( id int(10) unsigned NOT NULL auto_increment, *************** *** 324,328 **** "; ! $_SQL[24] = " CREATE TABLE {$_TABLES['postmodes']} ( code char(10) NOT NULL default '', --- 315,319 ---- "; ! $_SQL[23] = " CREATE TABLE {$_TABLES['postmodes']} ( code char(10) NOT NULL default '', *************** *** 332,336 **** "; ! $_SQL[25] = " CREATE TABLE {$_TABLES['sessions']} ( sess_id int(10) unsigned NOT NULL default '0', --- 323,327 ---- "; ! $_SQL[24] = " CREATE TABLE {$_TABLES['sessions']} ( sess_id int(10) unsigned NOT NULL default '0', *************** *** 346,350 **** "; ! $_SQL[26] = " CREATE TABLE {$_TABLES['sortcodes']} ( code char(4) NOT NULL default '0', --- 337,341 ---- "; ! $_SQL[25] = " CREATE TABLE {$_TABLES['sortcodes']} ( code char(4) NOT NULL default '0', *************** *** 354,357 **** --- 345,358 ---- "; + $_SQL[26] = " + CREATE TABLE {$_TABLES['speedlimit']} ( + id int(10) unsigned NOT NULL auto_increment, + ipaddress varchar(15) NOT NULL default '', + date int(10) unsigned default NULL, + type varchar(30) NOT NULL default 'submit', + PRIMARY KEY (id) + ) TYPE = MyISAM + "; + $_SQL[27] = " CREATE TABLE {$_TABLES['statuscodes']} ( *************** *** 411,423 **** $_SQL[30] = " - CREATE TABLE {$_TABLES['submitspeedlimit']} ( - id int(10) unsigned NOT NULL auto_increment, - ipaddress varchar(15) NOT NULL default '', - date int(10) unsigned default NULL, - PRIMARY KEY (id) - ) TYPE=MyISAM - "; - - $_SQL[31] = " CREATE TABLE {$_TABLES['topics']} ( tid varchar(20) NOT NULL default '', --- 412,415 ---- *************** *** 437,441 **** "; ! $_SQL[32] = " CREATE TABLE {$_TABLES['tzcodes']} ( tz char(3) NOT NULL default '', --- 429,433 ---- "; ! $_SQL[31] = " CREATE TABLE {$_TABLES['tzcodes']} ( tz char(3) NOT NULL default '', *************** *** 446,450 **** "; ! $_SQL[33] = " CREATE TABLE {$_TABLES['usercomment']} ( uid mediumint(8) NOT NULL default '1', --- 438,442 ---- "; ! $_SQL[32] = " CREATE TABLE {$_TABLES['usercomment']} ( uid mediumint(8) NOT NULL default '1', *************** *** 456,460 **** "; ! $_SQL[34] = " CREATE TABLE {$_TABLES['userindex']} ( uid mediumint(8) NOT NULL default '1', --- 448,452 ---- "; ! $_SQL[33] = " CREATE TABLE {$_TABLES['userindex']} ( uid mediumint(8) NOT NULL default '1', *************** *** 471,475 **** "; ! $_SQL[35] = " CREATE TABLE {$_TABLES['userinfo']} ( uid mediumint(8) NOT NULL default '1', --- 463,467 ---- "; ! $_SQL[34] = " CREATE TABLE {$_TABLES['userinfo']} ( uid mediumint(8) NOT NULL default '1', *************** *** 484,488 **** "; ! $_SQL[36] = " CREATE TABLE {$_TABLES['userprefs']} ( uid mediumint(8) NOT NULL default '1', --- 476,480 ---- "; ! $_SQL[35] = " CREATE TABLE {$_TABLES['userprefs']} ( uid mediumint(8) NOT NULL default '1', *************** *** 497,501 **** "; ! $_SQL[37] = " CREATE TABLE {$_TABLES['users']} ( uid mediumint(8) NOT NULL auto_increment, --- 489,493 ---- "; ! $_SQL[36] = " CREATE TABLE {$_TABLES['users']} ( uid mediumint(8) NOT NULL auto_increment, *************** *** 517,521 **** "; ! $_SQL[38] = " CREATE TABLE {$_TABLES['vars']} ( name varchar(20) NOT NULL default '', --- 509,513 ---- "; ! $_SQL[37] = " CREATE TABLE {$_TABLES['vars']} ( name varchar(20) NOT NULL default '', *************** *** 525,529 **** "; ! $_SQL[39] = " CREATE TABLE {$_TABLES['article_images']} ( ai_sid varchar(20) NOT NULL, --- 517,521 ---- "; ! $_SQL[38] = " CREATE TABLE {$_TABLES['article_images']} ( ai_sid varchar(20) NOT NULL, *************** *** 534,538 **** "; ! $_SQL[40] = " CREATE TABLE {$_TABLES['staticpage']} ( sp_id varchar(20) NOT NULL default '', --- 526,530 ---- "; ! $_SQL[39] = " CREATE TABLE {$_TABLES['staticpage']} ( sp_id varchar(20) NOT NULL default '', From geeklog-cvs-admin at lists.geeklog.net Mon May 5 12:53:39 2003 From: geeklog-cvs-admin at lists.geeklog.net (geeklog-cvs-admin at lists.geeklog.net) Date: Mon, 5 May 2003 11:53:39 -0500 Subject: [geeklog-cvs] geeklog-1.3/public_html comment.php,1.41,1.42 Message-ID: <200305051653.h45Grdi05161@internal.geeklog.net> Update of /usr/cvs/geeklog/geeklog-1.3/public_html In directory internal.geeklog.net:/tmp/cvs-serv5149 Modified Files: comment.php Log Message: A couple of (mostly minor) fixes after a code review, also changed it to use the new speedlimit table & functions. Index: comment.php =================================================================== RCS file: /usr/cvs/geeklog/geeklog-1.3/public_html/comment.php,v retrieving revision 1.41 retrieving revision 1.42 diff -C2 -d -r1.41 -r1.42 *** comment.php 28 Apr 2003 12:55:31 -0000 1.41 --- comment.php 5 May 2003 16:53:37 -0000 1.42 *************** *** 58,79 **** * * @param int $uid User ID - * @param string $save ?? - * @param string $anon Indicates if this is posted anonymously * @param string $title Title of comment * @param string $comment Text of comment * @param string $sid ID of object comment belongs to ! * @param string $pid ?? * @param string $type Type of object comment is posted to ! * @param string $mode ?? * @param string $postmode Indicates if comment is plain text or HTML * @return string HTML for comment form * */ ! function commentform($uid,$save,$anon,$title,$comment,$sid,$pid='0',$type,$mode,$postmode) { global $_TABLES, $HTTP_POST_VARS, $REMOTE_ADDR, $_CONF, $LANG03, $LANG12, $LANG_LOGIN, $_USER; ! if ($uid > 1) { ! $sig = DB_getItem($_TABLES['users'], 'sig', "uid='$uid'"); } --- 58,84 ---- * * @param int $uid User ID * @param string $title Title of comment * @param string $comment Text of comment * @param string $sid ID of object comment belongs to ! * @param string $pid ID of parent comment * @param string $type Type of object comment is posted to ! * @param string $mode Mode, e.g. 'preview' * @param string $postmode Indicates if comment is plain text or HTML * @return string HTML for comment form * */ ! function commentform($uid,$title,$comment,$sid,$pid='0',$type,$mode,$postmode) { global $_TABLES, $HTTP_POST_VARS, $REMOTE_ADDR, $_CONF, $LANG03, $LANG12, $LANG_LOGIN, $_USER; ! $retval = ''; ! ! if (empty ($postmode)) { ! $postmode = $_CONF['postmode']; ! } ! ! $sig = ''; ! if ($uid > 1) { ! $sig = DB_getItem ($_TABLES['users'], 'sig', "uid = '$uid'"); } *************** *** 92,104 **** return $retval; } else { ! DB_query("DELETE FROM {$_TABLES['commentspeedlimit']} WHERE date < unix_timestamp() - {$_CONF['commentspeedlimit']}"); ! ! $id = DB_count($_TABLES['commentspeedlimit'], 'ipaddress', $REMOTE_ADDR); ! if ($id > 0) { ! $result = DB_query("SELECT date FROM {$_TABLES['commentspeedlimit']} WHERE ipaddress = '$REMOTE_ADDR'"); ! $A = DB_fetchArray($result); ! $last = time() - $A[0]; $retval .= COM_startBlock($LANG12[26]) . $LANG03[7] --- 97,105 ---- return $retval; } else { ! COM_clearSpeedlimit ($_CONF['commentspeedlimit'], 'comment'); ! $last = COM_checkSpeedlimit ('comment'); + if ($last > 0) { $retval .= COM_startBlock($LANG12[26]) . $LANG03[7] *************** *** 152,160 **** $mode = 'error'; } ! ! if (empty($postmode)) { ! $postmode = $_CONF['postmode']; ! } ! $comment_template = new Template($_CONF['path_layout'] . 'comment'); if (($_CONF['advanced_editor'] == 1) && file_exists ($_CONF['path_layout'] . 'comment/commentform_advanced.thtml')) { --- 153,157 ---- $mode = 'error'; } ! $comment_template = new Template($_CONF['path_layout'] . 'comment'); if (($_CONF['advanced_editor'] == 1) && file_exists ($_CONF['path_layout'] . 'comment/commentform_advanced.thtml')) { *************** *** 169,173 **** $comment_template->set_var('pid', $pid); $comment_template->set_var('type', $type); ! if (!empty($_USER['username'])) { $comment_template->set_var('uid', $_USER['uid']); --- 166,170 ---- $comment_template->set_var('pid', $pid); $comment_template->set_var('type', $type); ! if (!empty($_USER['username'])) { $comment_template->set_var('uid', $_USER['uid']); *************** *** 181,185 **** $comment_template->set_var('lang_logoutorcreateaccount', $LANG03[04]); } ! $comment_template->set_var('lang_title', $LANG03[16]); $comment_template->set_var('title', stripslashes($title)); --- 178,182 ---- $comment_template->set_var('lang_logoutorcreateaccount', $LANG03[04]); } ! $comment_template->set_var('lang_title', $LANG03[16]); $comment_template->set_var('title', stripslashes($title)); *************** *** 196,210 **** $comment_template->set_var('lang_instr_line5', $LANG03[23]); $comment_template->set_var('lang_preview', $LANG03[14]); ! if (($_CONF['skip_preview'] == 1) || ($mode == $LANG03[14])) { $comment_template->set_var('save_option', ''); } ! $comment_template->set_var('end_block', COM_endBlock()); $comment_template->parse('output', 'form'); $retval .= $comment_template->finish($comment_template->get_var('output')); } } ! return $retval; } --- 193,207 ---- $comment_template->set_var('lang_instr_line5', $LANG03[23]); $comment_template->set_var('lang_preview', $LANG03[14]); ! if (($_CONF['skip_preview'] == 1) || ($mode == $LANG03[14])) { $comment_template->set_var('save_option', ''); } ! $comment_template->set_var('end_block', COM_endBlock()); $comment_template->parse('output', 'form'); $retval .= $comment_template->finish($comment_template->get_var('output')); } } ! return $retval; } *************** *** 214,232 **** * * @param int $uid User ID of user making the comment - * @param string $save ?? - * @param string $anon Indicates an anonymous post * @param string $title Title of comment * @param string $comment Text of comment * @param string $sid ID of object receiving comment * @param string $pid ID of parent comment ! * @param string $type Type of comment this is (story, poll, etc) * @param string $postmode Indicates if text is HTML or plain text * @return string either nothing or HTML formated error * */ ! function savecomment($uid,$save,$anon,$title,$comment,$sid,$pid,$type,$postmode) { global $_TABLES, $_CONF, $LANG03, $REMOTE_ADDR; // Get signature $sig = ''; --- 211,229 ---- * * @param int $uid User ID of user making the comment * @param string $title Title of comment * @param string $comment Text of comment * @param string $sid ID of object receiving comment * @param string $pid ID of parent comment ! * @param string $type Type of comment this is (article, poll, etc) * @param string $postmode Indicates if text is HTML or plain text * @return string either nothing or HTML formated error * */ ! function savecomment($uid,$title,$comment,$sid,$pid,$type,$postmode) { global $_TABLES, $_CONF, $LANG03, $REMOTE_ADDR; + $retval = ''; + // Get signature $sig = ''; *************** *** 258,277 **** if (!empty($title) && !empty($comment)) { ! DB_save($_TABLES['commentspeedlimit'],'ipaddress, date',"'$REMOTE_ADDR',unix_timestamp()"); DB_save($_TABLES['comments'],'sid,uid,comment,date,title,pid,type',"'$sid',$uid,'$comment',now(),'$title',$pid,'$type'"); ! // See if plugin will handle this to update it's records PLG_handlePluginComment($type,$sid,'save'); ! // If we reach here then no plugin issued a COM_refresh() so continue - $comments = DB_count($_TABLES['comments'],'sid',$sid); - if ($type == 'poll') { - if ($comments > 0) { - DB_change($_TABLES['stories'],'comments',$comments,'sid',$sid); - } $retval .= COM_refresh("{$_CONF['site_url']}/pollbooth.php?qid=$sid&aid=-1"); } else { DB_change($_TABLES['stories'],'comments',$comments,'sid',$sid); $retval .= COM_refresh("{$_CONF['site_url']}/article.php?story=$sid"); --- 255,270 ---- if (!empty($title) && !empty($comment)) { ! COM_updateSpeedlimit ('comment'); DB_save($_TABLES['comments'],'sid,uid,comment,date,title,pid,type',"'$sid',$uid,'$comment',now(),'$title',$pid,'$type'"); ! // See if plugin will handle this to update it's records PLG_handlePluginComment($type,$sid,'save'); ! // If we reach here then no plugin issued a COM_refresh() so continue if ($type == 'poll') { $retval .= COM_refresh("{$_CONF['site_url']}/pollbooth.php?qid=$sid&aid=-1"); } else { + $comments = DB_count($_TABLES['comments'],'sid',$sid); DB_change($_TABLES['stories'],'comments',$comments,'sid',$sid); $retval .= COM_refresh("{$_CONF['site_url']}/article.php?story=$sid"); *************** *** 279,288 **** } else { $retval .= COM_siteHeader() ! . commentform ($uid, $save, $anon, $title, $comment, $sid, $pid, ! $type, $LANG03[14], $postmode) . COM_siteFooter(); } ! return $retval; } --- 272,281 ---- } else { $retval .= COM_siteHeader() ! . commentform ($uid, $title, $comment, $sid, $pid, $type, ! $LANG03[14], $postmode) . COM_siteFooter(); } ! return $retval; } *************** *** 292,296 **** * @param string $cid Comment ID * @param string $sid ID of object comment belongs to ! * @param string $type Comment type (e.g. story, poll, etc) * @return string Returns string needed to redirect page to right place * --- 285,289 ---- * @param string $cid Comment ID * @param string $sid ID of object comment belongs to ! * @param string $type Comment type (e.g. article, poll, etc) * @return string Returns string needed to redirect page to right place * *************** *** 300,332 **** global $_TABLES, $_CONF, $_USER, $REMOTE_ADDR; if (!empty ($sid) && !empty ($cid) && is_numeric ($cid)) { $result = DB_query ("SELECT owner_id,group_id,perm_owner,perm_group,perm_members,perm_anon FROM {$_TABLES['stories']} WHERE sid = '{$sid}'"); ! $P = DB_fetchArray ($result); if (SEC_hasAccess ($A['owner_id'], $A['group_id'], $A['perm_owner'], $A['perm_group'], $A['perm_members'], $A['perm_anon']) == 3) { ! $result = DB_query("SELECT pid FROM {$_TABLES['comments']} WHERE cid = $cid"); ! $A = DB_fetchArray($result); ! DB_change($_TABLES['comments'],'pid',$A['pid'],'pid',$cid); ! DB_delete($_TABLES['comments'],'cid',$cid); // See if plugin will handle this to update it's records PLG_handlePluginComment($type,$sid,'delete'); - $comments = DB_count($_TABLES['comments'],'sid',$sid); - if ($type == 'poll') { ! if ($comments > 0) { ! DB_change($_TABLES['stories'],'comments',$comments,'sid',$sid); ! } ! $retval .= COM_refresh("{$_CONF['site_url']}/pollbooth.php?qid=$sid&aid=-1"); } else { DB_change($_TABLES['stories'],'comments',$comments,'sid',$sid); ! $retval .= COM_refresh("{$_CONF['site_url']}/article.php?story=$sid"); } } else { COM_errorLog ('User ' . $_USER['username'] . ' (IP: ' . $REMOTE_ADDR . ') tried to illegally delete comment ' . $cid ! . ' from story ' . $sid); ! $retval .= COM_refresh ($_CONF['site_url'] . '/article.php?story=' . $sid); } } else { --- 293,324 ---- global $_TABLES, $_CONF, $_USER, $REMOTE_ADDR; + $retval = ''; + if (!empty ($sid) && !empty ($cid) && is_numeric ($cid)) { $result = DB_query ("SELECT owner_id,group_id,perm_owner,perm_group,perm_members,perm_anon FROM {$_TABLES['stories']} WHERE sid = '{$sid}'"); ! $A = DB_fetchArray ($result); if (SEC_hasAccess ($A['owner_id'], $A['group_id'], $A['perm_owner'], $A['perm_group'], $A['perm_members'], $A['perm_anon']) == 3) { ! $pid = DB_getItem ($_TABLES['comments'], 'pid', "cid = '$cid'"); ! DB_change ($_TABLES['comments'], 'pid', $pid, 'pid', $cid); ! DB_delete ($_TABLES['comments'], 'cid', $cid); // See if plugin will handle this to update it's records PLG_handlePluginComment($type,$sid,'delete'); if ($type == 'poll') { ! $retval .= COM_refresh ($_CONF['site_url'] ! . '/pollbooth.php?qid=$sid&aid=-1'); } else { + $comments = DB_count($_TABLES['comments'],'sid',$sid); DB_change($_TABLES['stories'],'comments',$comments,'sid',$sid); ! $retval .= COM_refresh ($_CONF['site_url'] ! . '/article.php?story=$sid'); } } else { COM_errorLog ('User ' . $_USER['username'] . ' (IP: ' . $REMOTE_ADDR . ') tried to illegally delete comment ' . $cid ! . ' from ' . $type . ' ' . $sid); ! $retval .= COM_refresh ($_CONF['site_url'] . '/index.php'); } } else { *************** *** 342,355 **** case $LANG03[14]: //Preview $display .= COM_siteHeader() ! . commentform($uid,$save,$anon,$title,$comment,$sid,$pid,$type,$mode,$postmode) . COM_siteFooter(); break; case $LANG03[11]: //Submit Comment ! $display .= savecomment($uid,$save,$anon,$title,$comment,$sid,$pid,$type,$postmode); break; case $LANG01[28]: //Delete $display .= deletecomment (strip_tags ($cid), strip_tags ($sid), $type); break; ! case display: $display .= COM_siteHeader() . COM_userComments($sid,$title,$type,$order,'threaded',$pid) --- 334,347 ---- case $LANG03[14]: //Preview $display .= COM_siteHeader() ! . commentform($uid,$title,$comment,$sid,$pid,$type,$mode,$postmode) . COM_siteFooter(); break; case $LANG03[11]: //Submit Comment ! $display .= savecomment($uid,$title,$comment,$sid,$pid,$type,$postmode); break; case $LANG01[28]: //Delete $display .= deletecomment (strip_tags ($cid), strip_tags ($sid), $type); break; ! case 'display': $display .= COM_siteHeader() . COM_userComments($sid,$title,$type,$order,'threaded',$pid) *************** *** 359,368 **** if (!empty($sid)) { if (empty ($title)) { ! $result = DB_query ("SELECT title FROM {$_TABLES['stories']} WHERE sid = '$sid'"); ! $A = DB_fetchArray ($result); ! $title = str_replace('$','$',$A['title']); } $display .= COM_siteHeader() ! . commentform('','','',$title,'',$sid,$pid,$type,$mode,$postmode) . COM_siteFooter(); } else { --- 351,359 ---- if (!empty($sid)) { if (empty ($title)) { ! $title = DB_getItem ($_TABLES['stories'], 'title', "sid = '{$sid}'"); ! $title = str_replace ('$', '$', $title); } $display .= COM_siteHeader() ! . commentform('',$title,'',$sid,$pid,$type,$mode,$postmode) . COM_siteFooter(); } else { From geeklog-cvs-admin at lists.geeklog.net Mon May 5 17:11:08 2003 From: geeklog-cvs-admin at lists.geeklog.net (geeklog-cvs-admin at lists.geeklog.net) Date: Mon, 5 May 2003 16:11:08 -0500 Subject: [geeklog-cvs] geeklog-1.3 config.php,1.80,1.81 Message-ID: <200305052111.h45LB8i09450@internal.geeklog.net> Update of /usr/cvs/geeklog/geeklog-1.3 In directory internal.geeklog.net:/tmp/cvs-serv9426 Modified Files: config.php Log Message: Added a speed limit to the new password request feature. Index: config.php =================================================================== RCS file: /usr/cvs/geeklog/geeklog-1.3/config.php,v retrieving revision 1.80 retrieving revision 1.81 diff -C2 -d -r1.80 -r1.81 *** config.php 18 Apr 2003 21:12:04 -0000 1.80 --- config.php 5 May 2003 21:11:06 -0000 1.81 *************** *** 400,403 **** --- 400,406 ---- $_CONF['polladdresstime'] = 604800; + // Password setting: minimum time between two requests for a new password + $_CONF['passwordspeedlimit'] = 300; // seconds = 5 minutes + // Links Settings // You can set both of the following to 0 to get back the old (pre-1.3.6) From geeklog-cvs-admin at lists.geeklog.net Mon May 5 17:11:08 2003 From: geeklog-cvs-admin at lists.geeklog.net (geeklog-cvs-admin at lists.geeklog.net) Date: Mon, 5 May 2003 16:11:08 -0500 Subject: [geeklog-cvs] geeklog-1.3/language english.php,1.80,1.81 german.php,1.68,1.69 Message-ID: <200305052111.h45LB8i09460@internal.geeklog.net> Update of /usr/cvs/geeklog/geeklog-1.3/language In directory internal.geeklog.net:/tmp/cvs-serv9426/language Modified Files: english.php german.php Log Message: Added a speed limit to the new password request feature. Index: english.php =================================================================== RCS file: /usr/cvs/geeklog/geeklog-1.3/language/english.php,v retrieving revision 1.80 retrieving revision 1.81 diff -C2 -d -r1.80 -r1.81 *** english.php 5 May 2003 09:33:38 -0000 1.80 --- english.php 5 May 2003 21:11:06 -0000 1.81 *************** *** 298,302 **** 90 => 'You can enter a new password for your account below. Please note that your old password is still valid until you submit this form.', 91 => 'Set New Password', ! 92 => 'Enter New Password' ); --- 298,303 ---- 90 => 'You can enter a new password for your account below. Please note that your old password is still valid until you submit this form.', 91 => 'Set New Password', ! 92 => 'Enter New Password', ! 93 => 'Your last request for a new password was %d seconds ago. This site requires at least %d seconds between password requests.' ); Index: german.php =================================================================== RCS file: /usr/cvs/geeklog/geeklog-1.3/language/german.php,v retrieving revision 1.68 retrieving revision 1.69 diff -C2 -d -r1.68 -r1.69 *** german.php 5 May 2003 09:45:16 -0000 1.68 --- german.php 5 May 2003 21:11:06 -0000 1.69 *************** *** 190,194 **** 6 => "Um einen Kommentar abgeben zu k?nnen, musst Du angemeldet sein. Wenn Du noch keinen Account hast, benutze bitte das Formular um einen anzulegen.", 7 => "Dein letzter Kommentar war vor ", ! 8 => " Sekunden. Zwischen zwei Kommentaren m?ssen aber mindestens {$_CONF["commentspeedlimit"]} Sekunden vergangen sein", 9 => "Kommentar", 10 => '', --- 190,194 ---- 6 => "Um einen Kommentar abgeben zu k?nnen, musst Du angemeldet sein. Wenn Du noch keinen Account hast, benutze bitte das Formular um einen anzulegen.", 7 => "Dein letzter Kommentar war vor ", ! 8 => " Sekunden. Zwischen zwei Kommentaren m?ssen aber mindestens {$_CONF["commentspeedlimit"]} Sekunden vergangen sein.", 9 => "Kommentar", 10 => '', *************** *** 304,308 **** 90 => 'Du kannst hier jetzt ein neues Passwort f?r Deinen Account eingeben. Dein altes Passwort bleibt noch solange g?ltig, bis Du dieses Formular abschickst.', 91 => 'Neues Passwort', ! 92 => 'Neues Passwort eingeben' ); --- 304,309 ---- 90 => 'Du kannst hier jetzt ein neues Passwort f?r Deinen Account eingeben. Dein altes Passwort bleibt noch solange g?ltig, bis Du dieses Formular abschickst.', 91 => 'Neues Passwort', ! 92 => 'Neues Passwort eingeben', ! 93 => 'Du hast zuletzt vor %d Sekunden ein neues Passwort angefordert. Zwischen zwei Passwort-Anforderungen m?ssen aber mindestens %d Sekunden vergangen sein.' ); From geeklog-cvs-admin at lists.geeklog.net Mon May 5 17:11:08 2003 From: geeklog-cvs-admin at lists.geeklog.net (geeklog-cvs-admin at lists.geeklog.net) Date: Mon, 5 May 2003 16:11:08 -0500 Subject: [geeklog-cvs] geeklog-1.3/docs config.html,1.18,1.19 history,1.90,1.91 Message-ID: <200305052111.h45LB8i09454@internal.geeklog.net> Update of /usr/cvs/geeklog/geeklog-1.3/docs In directory internal.geeklog.net:/tmp/cvs-serv9426/docs Modified Files: config.html history Log Message: Added a speed limit to the new password request feature. Index: config.html =================================================================== RCS file: /usr/cvs/geeklog/geeklog-1.3/docs/config.html,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** config.html 13 Apr 2003 17:16:09 -0000 1.18 --- config.html 5 May 2003 21:11:06 -0000 1.19 *************** *** 426,433 ****
allow_username_change0 If set to 1, users will be allowed to change their username (login name). Stories and comments posted under the old username will automatically show the new username.
--- 426,436 ----
allow_username_change0 If set to 1, users will be allowed to change their username (login name). Stories and comments posted under the old username will automatically show the new username.
passwordspeedlimit300Minimum delay between two requests for a new password, in seconds.
Index: history =================================================================== RCS file: /usr/cvs/geeklog/geeklog-1.3/docs/history,v retrieving revision 1.90 retrieving revision 1.91 diff -C2 -d -r1.90 -r1.91 *** history 5 May 2003 09:33:38 -0000 1.90 --- history 5 May 2003 21:11:06 -0000 1.91 *************** *** 4,7 **** --- 4,13 ---- ------- + - Added a speed limit for requests for a new password (defaults to 5 minutes + between requests). + - The commentspeedlimit and submitspeedlimit tables have been replaced with a + general speedlimit table and three new functions operating on it have been + introduced (in lib-common.php). The new table has a 'type' field, so plugins + could easily implement their own speed limits. - Introduced new "forgot password" functionality: When requesting a new password for an account, the user will now receive an email with a link that s/he has From geeklog-cvs-admin at lists.geeklog.net Mon May 5 17:11:08 2003 From: geeklog-cvs-admin at lists.geeklog.net (geeklog-cvs-admin at lists.geeklog.net) Date: Mon, 5 May 2003 16:11:08 -0500 Subject: [geeklog-cvs] geeklog-1.3/public_html users.php,1.59,1.60 Message-ID: <200305052111.h45LB8i09461@internal.geeklog.net> Update of /usr/cvs/geeklog/geeklog-1.3/public_html In directory internal.geeklog.net:/tmp/cvs-serv9426/public_html Modified Files: users.php Log Message: Added a speed limit to the new password request feature. Index: users.php =================================================================== RCS file: /usr/cvs/geeklog/geeklog-1.3/public_html/users.php,v retrieving revision 1.59 retrieving revision 1.60 diff -C2 -d -r1.59 -r1.60 *** users.php 5 May 2003 09:45:44 -0000 1.59 --- users.php 5 May 2003 21:11:06 -0000 1.60 *************** *** 383,386 **** --- 383,387 ---- $retval .= COM_refresh ($_CONF['site_url'] . '/index.php'); } + COM_updateSpeedlimit ('password'); } else { $retval .= COM_siteHeader ('menu') *************** *** 747,753 **** break; case 'getpassword': ! $display .= COM_siteHeader('menu'); ! $display .= getpasswordform(); ! $display .= COM_siteFooter(); break; case 'newpwd': --- 748,765 ---- break; case 'getpassword': ! $display .= COM_siteHeader ('menu'); ! if ($_CONF['passwordspeedlimit'] == 0) { ! $_CONF['passwordspeedlimit'] = 300; // 5 minutes ! } ! COM_clearSpeedlimit ($_CONF['passwordspeedlimit'], 'password'); ! $last = COM_checkSpeedlimit ('password'); ! if ($last > 0) { ! $display .= COM_startBlock ($LANG12[26]) ! . sprintf ($LANG04[93], $last, $_CONF['passwordspeedlimit']) ! . COM_endBlock (); ! } else { ! $display .= getpasswordform (); ! } ! $display .= COM_siteFooter (); break; case 'newpwd': *************** *** 803,807 **** break; case 'emailpasswd': ! $display .= requestpassword ($HTTP_POST_VARS['username'], 1); break; case 'new': --- 815,832 ---- break; case 'emailpasswd': ! if ($_CONF['passwordspeedlimit'] == 0) { ! $_CONF['passwordspeedlimit'] = 300; // 5 minutes ! } ! COM_clearSpeedlimit ($_CONF['passwordspeedlimit'], 'password'); ! $last = COM_checkSpeedlimit ('password'); ! if ($last > 0) { ! $display .= COM_siteHeader ('menu') ! . COM_startBlock ($LANG12[26]) ! . sprintf ($LANG04[93], $last, $_CONF['passwordspeedlimit']) ! . COM_endBlock () ! . COM_siteFooter (); ! } else { ! $display .= requestpassword ($HTTP_POST_VARS['username'], 1); ! } break; case 'new': From geeklog-cvs-admin at lists.geeklog.net Tue May 6 06:31:04 2003 From: geeklog-cvs-admin at lists.geeklog.net (geeklog-cvs-admin at lists.geeklog.net) Date: Tue, 6 May 2003 05:31:04 -0500 Subject: [geeklog-cvs] geeklog-1.3/public_html/layout/XSilver/users getpasswordform.thtml,1.1.1.1,1.2 Message-ID: <200305061031.h46AV4i19114@internal.geeklog.net> Update of /usr/cvs/geeklog/geeklog-1.3/public_html/layout/XSilver/users In directory internal.geeklog.net:/tmp/cvs-serv19062/public_html/layout/XSilver/users Modified Files: getpasswordform.thtml Log Message: To request a new password, you can not enter either your username or your email address. Index: getpasswordform.thtml =================================================================== RCS file: /usr/cvs/geeklog/geeklog-1.3/public_html/layout/XSilver/users/getpasswordform.thtml,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** getpasswordform.thtml 20 Apr 2002 14:32:08 -0000 1.1.1.1 --- getpasswordform.thtml 6 May 2003 10:31:02 -0000 1.2 *************** *** 1,26 **** ! {start_block_forgetpassword} ! ! ! ! !
!
! ! ! ! ! ! ! ! ! ! ! !
{lang_instructions}
{lang_username}:
! ! !
!
!
! {end_block} ! --- 1,30 ---- ! {start_block_forgetpassword} ! ! ! ! !
!
! ! ! ! ! ! ! ! ! ! ! ! ! ! ! !
{lang_instructions}
{lang_username}:
{lang_email}:
! ! !
!
!
! {end_block} ! From geeklog-cvs-admin at lists.geeklog.net Tue May 6 06:31:04 2003 From: geeklog-cvs-admin at lists.geeklog.net (geeklog-cvs-admin at lists.geeklog.net) Date: Tue, 6 May 2003 05:31:04 -0500 Subject: [geeklog-cvs] geeklog-1.3/public_html users.php,1.60,1.61 Message-ID: <200305061031.h46AV4i19102@internal.geeklog.net> Update of /usr/cvs/geeklog/geeklog-1.3/public_html In directory internal.geeklog.net:/tmp/cvs-serv19062/public_html Modified Files: users.php Log Message: To request a new password, you can not enter either your username or your email address. Index: users.php =================================================================== RCS file: /usr/cvs/geeklog/geeklog-1.3/public_html/users.php,v retrieving revision 1.60 retrieving revision 1.61 diff -C2 -d -r1.60 -r1.61 *** users.php 5 May 2003 21:11:06 -0000 1.60 --- users.php 6 May 2003 10:31:02 -0000 1.61 *************** *** 573,577 **** * */ ! function loginform() { global $_CONF, $LANG04; --- 573,577 ---- * */ ! function loginform ($hide_forgotpw_link = false) { global $_CONF, $LANG04; *************** *** 586,590 **** $user_templates->set_var('lang_username', $LANG04[2]); $user_templates->set_var('lang_password', $LANG04[4]); ! $user_templates->set_var('lang_forgetpassword', $LANG04[25]); $user_templates->set_var('lang_login', $LANG04[80]); $user_templates->set_var('end_block', COM_endBlock()); --- 586,594 ---- $user_templates->set_var('lang_username', $LANG04[2]); $user_templates->set_var('lang_password', $LANG04[4]); ! if ($hide_forgotpw_link) { ! $user_templates->set_var('lang_forgetpassword', ''); ! } else { ! $user_templates->set_var('lang_forgetpassword', $LANG04[25]); ! } $user_templates->set_var('lang_login', $LANG04[80]); $user_templates->set_var('end_block', COM_endBlock()); *************** *** 644,647 **** --- 648,652 ---- $user_templates->set_var('lang_instructions', $LANG04[26]); $user_templates->set_var('lang_username', $LANG04[2]); + $user_templates->set_var('lang_email', $LANG04[5]); $user_templates->set_var('lang_emailpassword', $LANG04[28]); $user_templates->set_var('end_block', COM_endBlock()); *************** *** 665,696 **** global $LANG04, $_CONF; ! if (!empty($msg)) { ! $retval .= COM_startBlock($LANG04[21]) . $msg . COM_endBlock(); ! } ! ! $retval .= COM_startBlock($LANG04[65]) ! . '
' . LB ! . '' . LB ! . '' . LB ! . '' . LB ! . '' . LB ! . '' . LB ! . '
' . $LANG04[66] . '
' . $LANG04[2] . ':
' . $LANG04[4] . ':
' ! . COM_endBlock(); ! ! $retval .= COM_startBlock($LANG04[22]) ! . '
' . LB ! . '' . LB ! . '' . LB ! . '' . LB ! . '' . LB ! . '' . LB ! . '' . LB ! . '
' . $LANG04[23] . '
' . $LANG04[2] ! . ':
' . $LANG04[5] ! . ':
' . $LANG04[24] . '
' ! . COM_endBlock(); ! $retval .= COM_startBlock($LANG04[25]) . '
' . LB --- 670,685 ---- global $LANG04, $_CONF; ! $retval = ''; ! ! if (!empty ($msg)) { ! $retval .= COM_startBlock ($LANG04[21]) . $msg . COM_endBlock (); ! } ! ! $retval .= loginform (true); ! ! $retval .= newuserform (); ! ! $retval .= getpasswordform (); ! /* $retval .= COM_startBlock($LANG04[25]) . '' . LB *************** *** 703,707 **** . '
' . COM_endBlock(); ! return $retval; } --- 692,696 ---- . '
' . COM_endBlock(); ! */ return $retval; } *************** *** 827,831 **** . COM_siteFooter (); } else { ! $display .= requestpassword ($HTTP_POST_VARS['username'], 1); } break; --- 816,825 ---- . COM_siteFooter (); } else { ! $username = $HTTP_POST_VARS['username']; ! if (empty ($username) && !empty ($HTTP_POST_VARS['email'])) { ! $username = DB_getItem ($_TABLES['users'], 'username', ! "email = '{$HTTP_POST_VARS['email']}'"); ! } ! $display .= requestpassword ($username, 55); } break; From geeklog-cvs-admin at lists.geeklog.net Tue May 6 06:31:04 2003 From: geeklog-cvs-admin at lists.geeklog.net (geeklog-cvs-admin at lists.geeklog.net) Date: Tue, 6 May 2003 05:31:04 -0500 Subject: [geeklog-cvs] geeklog-1.3/public_html/layout/clean/users getpasswordform.thtml,1.1.1.1,1.2 Message-ID: <200305061031.h46AV4i19120@internal.geeklog.net> Update of /usr/cvs/geeklog/geeklog-1.3/public_html/layout/clean/users In directory internal.geeklog.net:/tmp/cvs-serv19062/public_html/layout/clean/users Modified Files: getpasswordform.thtml Log Message: To request a new password, you can not enter either your username or your email address. Index: getpasswordform.thtml =================================================================== RCS file: /usr/cvs/geeklog/geeklog-1.3/public_html/layout/clean/users/getpasswordform.thtml,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** getpasswordform.thtml 30 Apr 2003 20:41:43 -0000 1.1.1.1 --- getpasswordform.thtml 6 May 2003 10:31:02 -0000 1.2 *************** *** 2,6 **** !
--- 2,6 ----
!
*************** *** 11,14 **** --- 11,18 ---- + + + + From geeklog-cvs-admin at lists.geeklog.net Tue May 6 06:31:04 2003 From: geeklog-cvs-admin at lists.geeklog.net (geeklog-cvs-admin at lists.geeklog.net) Date: Tue, 6 May 2003 05:31:04 -0500 Subject: [geeklog-cvs] geeklog-1.3/public_html/layout/Smooth_Blue/users getpasswordform.thtml,1.2,1.3 Message-ID: <200305061031.h46AV4i19111@internal.geeklog.net> Update of /usr/cvs/geeklog/geeklog-1.3/public_html/layout/Smooth_Blue/users In directory internal.geeklog.net:/tmp/cvs-serv19062/public_html/layout/Smooth_Blue/users Modified Files: getpasswordform.thtml Log Message: To request a new password, you can not enter either your username or your email address. Index: getpasswordform.thtml =================================================================== RCS file: /usr/cvs/geeklog/geeklog-1.3/public_html/layout/Smooth_Blue/users/getpasswordform.thtml,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** getpasswordform.thtml 19 Aug 2002 14:51:19 -0000 1.2 --- getpasswordform.thtml 6 May 2003 10:31:02 -0000 1.3 *************** *** 13,16 **** --- 13,20 ---- + + + +
{lang_username}:
{lang_email}:
{lang_email}:
From geeklog-cvs-admin at lists.geeklog.net Tue May 6 06:31:04 2003 From: geeklog-cvs-admin at lists.geeklog.net (geeklog-cvs-admin at lists.geeklog.net) Date: Tue, 6 May 2003 05:31:04 -0500 Subject: [geeklog-cvs] geeklog-1.3/public_html/layout/Classic/users getpasswordform.thtml,1.1,1.2 Message-ID: <200305061031.h46AV4i19105@internal.geeklog.net> Update of /usr/cvs/geeklog/geeklog-1.3/public_html/layout/Classic/users In directory internal.geeklog.net:/tmp/cvs-serv19062/public_html/layout/Classic/users Modified Files: getpasswordform.thtml Log Message: To request a new password, you can not enter either your username or your email address. Index: getpasswordform.thtml =================================================================== RCS file: /usr/cvs/geeklog/geeklog-1.3/public_html/layout/Classic/users/getpasswordform.thtml,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** getpasswordform.thtml 16 Nov 2001 18:53:30 -0000 1.1 --- getpasswordform.thtml 6 May 2003 10:31:02 -0000 1.2 *************** *** 2,6 **** !
--- 2,6 ----
!
*************** *** 11,14 **** --- 11,18 ---- + + + + From geeklog-cvs-admin at lists.geeklog.net Tue May 6 06:31:04 2003 From: geeklog-cvs-admin at lists.geeklog.net (geeklog-cvs-admin at lists.geeklog.net) Date: Tue, 6 May 2003 05:31:04 -0500 Subject: [geeklog-cvs] geeklog-1.3/public_html/layout/Yahoo/users getpasswordform.thtml,1.1,1.2 Message-ID: <200305061031.h46AV4i19117@internal.geeklog.net> Update of /usr/cvs/geeklog/geeklog-1.3/public_html/layout/Yahoo/users In directory internal.geeklog.net:/tmp/cvs-serv19062/public_html/layout/Yahoo/users Modified Files: getpasswordform.thtml Log Message: To request a new password, you can not enter either your username or your email address. Index: getpasswordform.thtml =================================================================== RCS file: /usr/cvs/geeklog/geeklog-1.3/public_html/layout/Yahoo/users/getpasswordform.thtml,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** getpasswordform.thtml 5 Nov 2001 20:24:06 -0000 1.1 --- getpasswordform.thtml 6 May 2003 10:31:02 -0000 1.2 *************** *** 2,6 ****
{lang_username}:
{lang_email}:
!
--- 2,6 ----
!
*************** *** 11,14 **** --- 11,18 ---- + + + + From geeklog-cvs-admin at lists.geeklog.net Tue May 6 06:31:04 2003 From: geeklog-cvs-admin at lists.geeklog.net (geeklog-cvs-admin at lists.geeklog.net) Date: Tue, 6 May 2003 05:31:04 -0500 Subject: [geeklog-cvs] geeklog-1.3/language english.php,1.81,1.82 german.php,1.69,1.70 Message-ID: <200305061031.h46AV4i19099@internal.geeklog.net> Update of /usr/cvs/geeklog/geeklog-1.3/language In directory internal.geeklog.net:/tmp/cvs-serv19062/language Modified Files: english.php german.php Log Message: To request a new password, you can not enter either your username or your email address. Index: english.php =================================================================== RCS file: /usr/cvs/geeklog/geeklog-1.3/language/english.php,v retrieving revision 1.81 retrieving revision 1.82 diff -C2 -d -r1.81 -r1.82 *** english.php 5 May 2003 21:11:06 -0000 1.81 --- english.php 6 May 2003 10:31:02 -0000 1.82 *************** *** 232,236 **** 24 => "Your password will be sent to the email address you enter.", 25 => "Did You Forget Your Password?", ! 26 => "Enter your username and click Email Password and a new password will be mailed to the email address on record.", 27 => "Register Now!", 28 => "Email Password", --- 232,236 ---- 24 => "Your password will be sent to the email address you enter.", 25 => "Did You Forget Your Password?", ! 26 => "Enter either your username or the email address you used to register and click Email Password. Instructions on how to set a new password will be mailed to the email address on record.", 27 => "Register Now!", 28 => "Email Password", *************** *** 999,1003 **** 52 => 'The email address provided does not appear to be a valid email address', 53 => 'Your new password has been accepted. Please use your new password below to log in now.', ! 54 => 'Your request for a new password has expired. Please try again below.' ); --- 999,1004 ---- 52 => 'The email address provided does not appear to be a valid email address', 53 => 'Your new password has been accepted. Please use your new password below to log in now.', ! 54 => 'Your request for a new password has expired. Please try again below.', ! 55 => 'An email has been sent to you and should arrive momentarily. Please follow the directions in the message to set a new password for your account.' ); Index: german.php =================================================================== RCS file: /usr/cvs/geeklog/geeklog-1.3/language/german.php,v retrieving revision 1.69 retrieving revision 1.70 diff -C2 -d -r1.69 -r1.70 *** german.php 5 May 2003 21:11:06 -0000 1.69 --- german.php 6 May 2003 10:31:02 -0000 1.70 *************** *** 238,242 **** 24 => "Dein Passwort wird Dir an die angegebene E-Mail-Adresse geschickt.", 25 => "Passwort vergessen?", ! 26 => "Gib Deinen Usernamen ein und klicke auf Passwort schicken. Ein neues Passwort wird dann an die gespeicherte E-Mail-Adresse geschickt.", 27 => "Jetzt anmelden!", 28 => "Passwort schicken", --- 238,242 ---- 24 => "Dein Passwort wird Dir an die angegebene E-Mail-Adresse geschickt.", 25 => "Passwort vergessen?", ! 26 => "Gib entweder Deinen Usernamen oder die E-Mail-Adresse ein, mit der Du Dich angemeldet hast, und klicke auf Passwort schicken. Eine E-Mail mit einer Anleitung, wie Du ein neues Passwort eingeben kannst, wird dann an die gespeicherte E-Mail-Adresse geschickt.", 27 => "Jetzt anmelden!", 28 => "Passwort schicken", *************** *** 995,999 **** 52 => 'Die angegebene E-Mail-Adresse scheint nicht g?ltig zu sein.', 53 => 'Dein neues Passwort wurde gespeichert. Bitte melde Dich nun mit dem neuen Passwort an.', ! 54 => 'Diese Anfrage f?r ein neues Passwort ist nicht mehr g?ltig. Bitte fordere erneut ein neues Passwort an.' ); --- 995,1000 ---- 52 => 'Die angegebene E-Mail-Adresse scheint nicht g?ltig zu sein.', 53 => 'Dein neues Passwort wurde gespeichert. Bitte melde Dich nun mit dem neuen Passwort an.', ! 54 => 'Diese Anfrage f?r ein neues Passwort ist nicht mehr g?ltig. Bitte fordere erneut ein neues Passwort an.', ! 55 => 'Du solltest in K?rze eine E-Mail erhalten, in der beschrieben wird, wie Du ein neues Passwort f?r Deinen Account eingeben kannst.' ); From geeklog-cvs-admin at lists.geeklog.net Tue May 6 06:31:04 2003 From: geeklog-cvs-admin at lists.geeklog.net (geeklog-cvs-admin at lists.geeklog.net) Date: Tue, 6 May 2003 05:31:04 -0500 Subject: [geeklog-cvs] geeklog-1.3/public_html/layout/Digital_Monochrome/users getpasswordform.thtml,1.1,1.2 Message-ID: <200305061031.h46AV4i19108@internal.geeklog.net> Update of /usr/cvs/geeklog/geeklog-1.3/public_html/layout/Digital_Monochrome/users In directory internal.geeklog.net:/tmp/cvs-serv19062/public_html/layout/Digital_Monochrome/users Modified Files: getpasswordform.thtml Log Message: To request a new password, you can not enter either your username or your email address. Index: getpasswordform.thtml =================================================================== RCS file: /usr/cvs/geeklog/geeklog-1.3/public_html/layout/Digital_Monochrome/users/getpasswordform.thtml,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** getpasswordform.thtml 16 Nov 2001 19:07:51 -0000 1.1 --- getpasswordform.thtml 6 May 2003 10:31:02 -0000 1.2 *************** *** 2,6 ****
{lang_username}:
{lang_email}:
!
--- 2,6 ----
!
*************** *** 11,14 **** --- 11,18 ---- + + + + From geeklog-cvs-admin at lists.geeklog.net Tue May 6 06:31:04 2003 From: geeklog-cvs-admin at lists.geeklog.net (geeklog-cvs-admin at lists.geeklog.net) Date: Tue, 6 May 2003 05:31:04 -0500 Subject: [geeklog-cvs] geeklog-1.3/docs history,1.91,1.92 theme.html,1.17,1.18 Message-ID: <200305061031.h46AV4i19095@internal.geeklog.net> Update of /usr/cvs/geeklog/geeklog-1.3/docs In directory internal.geeklog.net:/tmp/cvs-serv19062/docs Modified Files: history theme.html Log Message: To request a new password, you can not enter either your username or your email address. Index: history =================================================================== RCS file: /usr/cvs/geeklog/geeklog-1.3/docs/history,v retrieving revision 1.91 retrieving revision 1.92 diff -C2 -d -r1.91 -r1.92 *** history 5 May 2003 21:11:06 -0000 1.91 --- history 6 May 2003 10:31:01 -0000 1.92 *************** *** 4,7 **** --- 4,9 ---- ------- + - When requesting a new password for your account, you can now enter either + your username or the email address you used to register with the site. - Added a speed limit for requests for a new password (defaults to 5 minutes between requests). Index: theme.html =================================================================== RCS file: /usr/cvs/geeklog/geeklog-1.3/docs/theme.html,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** theme.html 5 May 2003 09:33:38 -0000 1.17 --- theme.html 6 May 2003 10:31:02 -0000 1.18 *************** *** 195,198 **** --- 195,199 ---- search/resulttitle.thtml submit/submitevent.thtml + users/getpasswordform.thtml From geeklog-cvs-admin at lists.geeklog.net Tue May 6 06:31:04 2003 From: geeklog-cvs-admin at lists.geeklog.net (geeklog-cvs-admin at lists.geeklog.net) Date: Tue, 6 May 2003 05:31:04 -0500 Subject: [geeklog-cvs] geeklog-1.3/public_html/layout/gameserver/users getpasswordform.thtml,1.1.1.1,1.2 Message-ID: <200305061031.h46AV4i19125@internal.geeklog.net> Update of /usr/cvs/geeklog/geeklog-1.3/public_html/layout/gameserver/users In directory internal.geeklog.net:/tmp/cvs-serv19062/public_html/layout/gameserver/users Modified Files: getpasswordform.thtml Log Message: To request a new password, you can not enter either your username or your email address. Index: getpasswordform.thtml =================================================================== RCS file: /usr/cvs/geeklog/geeklog-1.3/public_html/layout/gameserver/users/getpasswordform.thtml,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** getpasswordform.thtml 30 Apr 2003 20:53:37 -0000 1.1.1.1 --- getpasswordform.thtml 6 May 2003 10:31:02 -0000 1.2 *************** *** 2,6 ****
{lang_username}:
{lang_email}:
!
--- 2,6 ----
! + + +
*************** *** 11,14 **** --- 11,18 ---- + + + + From geeklog-cvs-admin at lists.geeklog.net Tue May 6 09:56:23 2003 From: geeklog-cvs-admin at lists.geeklog.net (geeklog-cvs-admin at lists.geeklog.net) Date: Tue, 6 May 2003 08:56:23 -0500 Subject: [geeklog-cvs] geeklog-1.3/public_html lib-common.php,1.219,1.220 Message-ID: <200305061356.h46DuMi21949@internal.geeklog.net> Update of /usr/cvs/geeklog/geeklog-1.3/public_html In directory internal.geeklog.net:/tmp/cvs-serv21919 Modified Files: lib-common.php Log Message: Picked up Vincent Furia's improvements for COM_article(). Index: lib-common.php =================================================================== RCS file: /usr/cvs/geeklog/geeklog-1.3/public_html/lib-common.php,v retrieving revision 1.219 retrieving revision 1.220 diff -C2 -d -r1.219 -r1.220 *** lib-common.php 5 May 2003 16:52:35 -0000 1.219 --- lib-common.php 6 May 2003 13:56:20 -0000 1.220 *************** *** 352,361 **** if( $_CONF['contributedbyline'] == 1 ) { $article->set_var( 'lang_contributed_by', $LANG01[1] ); $article->set_var( 'contributedby_uid', $A['uid'] ); ! $username = DB_getItem( $_TABLES['users'],'username',"uid = '{$A['uid']}'" ); $article->set_var( 'contributedby_user', $username ); ! $fullname = DB_getItem( $_TABLES['users'],'fullname',"uid = '{$A['uid']}'" ); if( empty( $fullname )) { --- 352,365 ---- if( $_CONF['contributedbyline'] == 1 ) { + $sql = "SELECT username, fullname, photo FROM {$_TABLES['users']} WHERE uid = '{$A['uid']}'"; + $results = DB_query( $sql ); + $U = DB_fetchArray( $results ); + $article->set_var( 'lang_contributed_by', $LANG01[1] ); $article->set_var( 'contributedby_uid', $A['uid'] ); ! $username = $U['username']; $article->set_var( 'contributedby_user', $username ); ! $fullname = $U['fullname']; if( empty( $fullname )) { *************** *** 369,379 **** if( $A['uid'] > 1 ) { ! $article->set_var( 'start_contributedby_anchortag', '' ); $article->set_var( 'end_contributedby_anchortag', '' ); $article->set_var( 'contributedby_url', $_CONF['site_url'] . '/users.php?mode=profile&uid=' . $A['uid'] ); ! $photo = DB_getItem( $_TABLES['users'], 'photo', ! "uid = {$A['uid']}" ); if( !empty( $photo )) { --- 373,384 ---- if( $A['uid'] > 1 ) { ! $article->set_var( 'start_contributedby_anchortag', ! '' ); $article->set_var( 'end_contributedby_anchortag', '' ); $article->set_var( 'contributedby_url', $_CONF['site_url'] . '/users.php?mode=profile&uid=' . $A['uid'] ); ! $photo = $U['photo']; if( !empty( $photo )) { From geeklog-cvs-admin at lists.geeklog.net Tue May 6 11:53:23 2003 From: geeklog-cvs-admin at lists.geeklog.net (geeklog-cvs-admin at lists.geeklog.net) Date: Tue, 6 May 2003 10:53:23 -0500 Subject: [geeklog-cvs] geeklog-1.3/system lib-security.php,1.13,1.14 Message-ID: <200305061553.h46FrNi23239@internal.geeklog.net> Update of /usr/cvs/geeklog/geeklog-1.3/system In directory internal.geeklog.net:/tmp/cvs-serv23196 Modified Files: lib-security.php Log Message: Picking up Vincent Furia's improvement for SEC_getUserGroups(). Index: lib-security.php =================================================================== RCS file: /usr/cvs/geeklog/geeklog-1.3/system/lib-security.php,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** lib-security.php 27 Mar 2003 21:07:16 -0000 1.13 --- lib-security.php 6 May 2003 15:53:21 -0000 1.14 *************** *** 122,133 **** if (!in_array($A['ug_main_grp_id'], $groups)) { array_push($cgroups, $A['ug_main_grp_id']); } - $groups[$A['grp_name']] = $A['ug_main_grp_id']; } ! ! $glist = join(',', $cgroups); ! $result = DB_query("SELECT ug_main_grp_id,grp_name FROM {$_TABLES["group_assignments"]},{$_TABLES["groups"]}" ! . " WHERE grp_id = ug_main_grp_id AND ug_grp_id IN ($glist)",1); ! $nrows = DB_numRows($result); } --- 122,137 ---- if (!in_array($A['ug_main_grp_id'], $groups)) { array_push($cgroups, $A['ug_main_grp_id']); + $groups[$A['grp_name']] = $A['ug_main_grp_id']; } } ! ! if (sizeof ($cgroups) > 0) { ! $glist = join(',', $cgroups); ! $result = DB_query("SELECT ug_main_grp_id,grp_name FROM {$_TABLES["group_assignments"]},{$_TABLES["groups"]}" ! . " WHERE grp_id = ug_main_grp_id AND ug_grp_id IN ($glist)",1); ! $nrows = DB_numRows($result); ! } else { ! $nrows = 0; ! } } From geeklog-cvs-admin at lists.geeklog.net Thu May 8 13:23:12 2003 From: geeklog-cvs-admin at lists.geeklog.net (geeklog-cvs-admin at lists.geeklog.net) Date: Thu, 8 May 2003 12:23:12 -0500 Subject: [geeklog-cvs] geeklog-1.3/system lib-sessions.php,1.15,1.16 Message-ID: <200305081723.h48HNCi23388@internal.geeklog.net> Update of /usr/cvs/geeklog/geeklog-1.3/system In directory internal.geeklog.net:/tmp/cvs-serv23339/system Modified Files: lib-sessions.php Log Message: Made sure all setcookie() calls use all 6 parameters and other changes in another attempt to solve the "www vs. non-www" and related login problems. Index: lib-sessions.php =================================================================== RCS file: /usr/cvs/geeklog/geeklog-1.3/system/lib-sessions.php,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** lib-sessions.php 20 Feb 2003 18:48:42 -0000 1.15 --- lib-sessions.php 8 May 2003 17:23:10 -0000 1.16 *************** *** 42,45 **** --- 42,54 ---- $_SESS_VERBOSE = false; + if (empty ($_CONF['cookiedomain'])) { + preg_match ("/\/\/([^\/]*)/", $_CONF['site_url'], $server); + if (substr ($server[1], 0, 4) == 'www.') { + $_CONF['cookiedomain'] = substr ($server[1], 3); + } else { + $_CONF['cookiedomain'] = '.' . $server[1]; + } + } + // LOAD USER DATA. NOTE: I'm not sure why I have to set $_USER like this because // it's suppose to be a global variable. I tried setting $_USER from within *************** *** 271,275 **** // This sets a cookie that will persist until the user closes their browser window. // since session expiry is handled on the server-side, cookie expiry time isn't a big deal. ! setcookie($cookiename,$sessid,0,$cookiepath); } --- 280,284 ---- // This sets a cookie that will persist until the user closes their browser window. // since session expiry is handled on the server-side, cookie expiry time isn't a big deal. ! setcookie($cookiename,$sessid,0,$cookiepath,$cookiedomain,$cookiesecure); } From geeklog-cvs-admin at lists.geeklog.net Thu May 8 13:23:12 2003 From: geeklog-cvs-admin at lists.geeklog.net (geeklog-cvs-admin at lists.geeklog.net) Date: Thu, 8 May 2003 12:23:12 -0500 Subject: [geeklog-cvs] geeklog-1.3/public_html/admin auth.inc.php,1.15,1.16 Message-ID: <200305081723.h48HNCi23384@internal.geeklog.net> Update of /usr/cvs/geeklog/geeklog-1.3/public_html/admin In directory internal.geeklog.net:/tmp/cvs-serv23339/public_html/admin Modified Files: auth.inc.php Log Message: Made sure all setcookie() calls use all 6 parameters and other changes in another attempt to solve the "www vs. non-www" and related login problems. Index: auth.inc.php =================================================================== RCS file: /usr/cvs/geeklog/geeklog-1.3/public_html/admin/auth.inc.php,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** auth.inc.php 31 Dec 2002 11:45:24 -0000 1.15 --- auth.inc.php 8 May 2003 17:23:10 -0000 1.16 *************** *** 61,65 **** // They want their cookie to persist for some amount of time so set it now ! setcookie($_CONF["cookie_name"],$_USER['uid'],time() + $cooktime,$_CONF["cookie_path"]); } } --- 61,67 ---- // They want their cookie to persist for some amount of time so set it now ! setcookie ($_CONF['cookie_name'], $_USER['uid'], ! time() + $cooktime, $_CONF['cookie_path'], ! $_CONF['cookiedomain'], $_CONF['cookiesecure']); } } From geeklog-cvs-admin at lists.geeklog.net Thu May 8 13:23:12 2003 From: geeklog-cvs-admin at lists.geeklog.net (geeklog-cvs-admin at lists.geeklog.net) Date: Thu, 8 May 2003 12:23:12 -0500 Subject: [geeklog-cvs] geeklog-1.3 config.php,1.81,1.82 Message-ID: <200305081723.h48HNCi23375@internal.geeklog.net> Update of /usr/cvs/geeklog/geeklog-1.3 In directory internal.geeklog.net:/tmp/cvs-serv23339 Modified Files: config.php Log Message: Made sure all setcookie() calls use all 6 parameters and other changes in another attempt to solve the "www vs. non-www" and related login problems. Index: config.php =================================================================== RCS file: /usr/cvs/geeklog/geeklog-1.3/config.php,v retrieving revision 1.81 retrieving revision 1.82 diff -C2 -d -r1.81 -r1.82 *** config.php 5 May 2003 21:11:06 -0000 1.81 --- config.php 8 May 2003 17:23:09 -0000 1.82 *************** *** 176,180 **** $_CONF['session_cookie_timeout'] = 7200; $_CONF['cookie_path'] = '/'; ! $_CONF['cookiedomain'] = ''; $_CONF['cookiesecure'] = 0; --- 176,180 ---- $_CONF['session_cookie_timeout'] = 7200; $_CONF['cookie_path'] = '/'; ! $_CONF['cookiedomain'] = ''; // e.g. '.example.com' $_CONF['cookiesecure'] = 0; From geeklog-cvs-admin at lists.geeklog.net Thu May 8 13:23:12 2003 From: geeklog-cvs-admin at lists.geeklog.net (geeklog-cvs-admin at lists.geeklog.net) Date: Thu, 8 May 2003 12:23:12 -0500 Subject: [geeklog-cvs] geeklog-1.3/docs history,1.92,1.93 Message-ID: <200305081723.h48HNCi23376@internal.geeklog.net> Update of /usr/cvs/geeklog/geeklog-1.3/docs In directory internal.geeklog.net:/tmp/cvs-serv23339/docs Modified Files: history Log Message: Made sure all setcookie() calls use all 6 parameters and other changes in another attempt to solve the "www vs. non-www" and related login problems. Index: history =================================================================== RCS file: /usr/cvs/geeklog/geeklog-1.3/docs/history,v retrieving revision 1.92 retrieving revision 1.93 diff -C2 -d -r1.92 -r1.93 *** history 6 May 2003 10:31:01 -0000 1.92 --- history 8 May 2003 17:23:10 -0000 1.93 *************** *** 4,7 **** --- 4,12 ---- ------- + - In another attempt to solve the various issues regarding "www vs. non-www" + URLs and related login problems: + + Made sure all setcookie() calls use all 6 parameters + + Try to guess the correct value for $_CONF['cookiedomain'] if it isn't set + + Removed the redirection attempt from index.php - When requesting a new password for your account, you can now enter either your username or the email address you used to register with the site. *************** *** 38,42 **** comments to polls. - Fixed a bug that prevented certain right blocks from showing up when there ! where no stories for a topic. - When a new user registeres, we need to check for a valid email address first (before searching the database to see if that address is already in use) --- 43,47 ---- comments to polls. - Fixed a bug that prevented certain right blocks from showing up when there ! were no stories for a topic. - When a new user registeres, we need to check for a valid email address first (before searching the database to see if that address is already in use) From geeklog-cvs-admin at lists.geeklog.net Thu May 8 13:23:12 2003 From: geeklog-cvs-admin at lists.geeklog.net (geeklog-cvs-admin at lists.geeklog.net) Date: Thu, 8 May 2003 12:23:12 -0500 Subject: [geeklog-cvs] geeklog-1.3/public_html index.php,1.45,1.46 pollbooth.php,1.17,1.18 users.php,1.61,1.62 usersettings.php,1.56,1.57 Message-ID: <200305081723.h48HNCi23386@internal.geeklog.net> Update of /usr/cvs/geeklog/geeklog-1.3/public_html In directory internal.geeklog.net:/tmp/cvs-serv23339/public_html Modified Files: index.php pollbooth.php users.php usersettings.php Log Message: Made sure all setcookie() calls use all 6 parameters and other changes in another attempt to solve the "www vs. non-www" and related login problems. Index: index.php =================================================================== RCS file: /usr/cvs/geeklog/geeklog-1.3/public_html/index.php,v retrieving revision 1.45 retrieving revision 1.46 diff -C2 -d -r1.45 -r1.46 *** index.php 13 Apr 2003 17:14:56 -0000 1.45 --- index.php 8 May 2003 17:23:10 -0000 1.46 *************** *** 47,65 **** require_once('lib-common.php'); - if (isset ($HTTP_SERVER_VARS['HTTP_HOST']) && - !empty ($HTTP_SERVER_VARS['HTTP_HOST'])) { - preg_match ("/\/\/([^\/]*)/", $_CONF['site_url'], $server); - if (strcasecmp ($HTTP_SERVER_VARS['HTTP_HOST'], $server[1]) != 0) { - // this may be a case of a www. vs. non-www. URL ... - if (!empty ($QUERY_STRING)) { - $query = '?' . $QUERY_STRING; - } else { - $query = ''; - } - echo COM_refresh ($_CONF['site_url'] . '/index.php' . $query); - exit; - } - } - $display = ''; --- 47,50 ---- Index: pollbooth.php =================================================================== RCS file: /usr/cvs/geeklog/geeklog-1.3/public_html/pollbooth.php,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** pollbooth.php 9 Apr 2003 17:44:51 -0000 1.17 --- pollbooth.php 8 May 2003 17:23:10 -0000 1.18 *************** *** 161,165 **** empty($HTTP_COOKIE_VARS[$qid])) { $aid = $HTTP_POST_VARS['aid']; ! setcookie($qid,$aid,time()+$_CONF['pollcookietime']); $display .= COM_siteHeader() . pollsave(); } else { --- 161,167 ---- empty($HTTP_COOKIE_VARS[$qid])) { $aid = $HTTP_POST_VARS['aid']; ! setcookie ($qid, $aid, time() + $_CONF['pollcookietime'], ! $_CONF['cookie_path'], $_CONF['cookiedomain'], ! $_CONF['cookiesecure']); $display .= COM_siteHeader() . pollsave(); } else { Index: users.php =================================================================== RCS file: /usr/cvs/geeklog/geeklog-1.3/public_html/users.php,v retrieving revision 1.61 retrieving revision 1.62 diff -C2 -d -r1.61 -r1.62 *** users.php 6 May 2003 10:31:02 -0000 1.61 --- users.php 8 May 2003 17:23:10 -0000 1.62 *************** *** 712,717 **** COM_accessLog("userid = {$HTTP_COOKIE_VARS[$_CONF["cookie_session"]]} {$LANG04[29]} $REMOTE_ADDR."); } ! setcookie($_CONF['cookie_session'],'',time() - 10000,$_CONF['cookie_path']); ! setcookie($_CONF['cookie_name'],'',time() - 10000,$_CONF['cookie_path']); $display = COM_refresh($_CONF['site_url'] . '/index.php?msg=8'); break; --- 712,720 ---- COM_accessLog("userid = {$HTTP_COOKIE_VARS[$_CONF["cookie_session"]]} {$LANG04[29]} $REMOTE_ADDR."); } ! setcookie ($_CONF['cookie_session'], '', time() - 10000, ! $_CONF['cookie_path'], $_CONF['cookiedomain'], ! $_CONF['cookiesecure']); ! setcookie ($_CONF['cookie_name'], '', time() - 10000, $_CONF['cookie_path'], ! $_CONF['cookiedomain'], $_CONF['cookiesecure']); $display = COM_refresh($_CONF['site_url'] . '/index.php?msg=8'); break; *************** *** 867,872 **** COM_errorLog('Trying to set permanent cookie',1); } ! setcookie($_CONF['cookie_name'],$_USER['uid'],time() + $cooktime,$_CONF['cookie_path']); ! setcookie($_CONF['cookie_password'],md5($passwd),time() + $cooktime,$_CONF['cookie_path']); } } else { --- 870,879 ---- COM_errorLog('Trying to set permanent cookie',1); } ! setcookie ($_CONF['cookie_name'], $_USER['uid'], ! time() + $cooktime, $_CONF['cookie_path'], ! $_CONF['cookiedomain'], $_CONF['cookiesecure']); ! setcookie ($_CONF['cookie_password'], md5 ($passwd), ! time() + $cooktime, $_CONF['cookie_path'], ! $_CONF['cookiedomain'], $_CONF['cookiesecure']); } } else { *************** *** 894,898 **** // If not set it setcookie ($_CONF['cookie_theme'], $_USER['theme'], time() + 31536000, ! $_CONF['cookie_path']); if (($HTTP_REFERER) && (strstr ($HTTP_REFERER, '/users.php') === false)) { --- 901,906 ---- // If not set it setcookie ($_CONF['cookie_theme'], $_USER['theme'], time() + 31536000, ! $_CONF['cookie_path'], $_CONF['cookiedomain'], ! $_CONF['cookiesecure']); if (($HTTP_REFERER) && (strstr ($HTTP_REFERER, '/users.php') === false)) { Index: usersettings.php =================================================================== RCS file: /usr/cvs/geeklog/geeklog-1.3/public_html/usersettings.php,v retrieving revision 1.56 retrieving revision 1.57 diff -C2 -d -r1.56 -r1.57 *** usersettings.php 23 Feb 2003 20:45:09 -0000 1.56 --- usersettings.php 8 May 2003 17:23:10 -0000 1.57 *************** *** 505,511 **** $A['cooktime'] = 'NULL'; $cooktime = 1000; ! setcookie($_CONF['cookie_name'],$_USER['uid'],time() - $cooktime,$_CONF['cookie_path']); } else { ! setcookie($_CONF['cookie_name'],$_USER['uid'],time() + $A['cooktime'],$_CONF['cookie_path']); } --- 505,515 ---- $A['cooktime'] = 'NULL'; $cooktime = 1000; ! setcookie ($_CONF['cookie_name'], $_USER['uid'], time() - $cooktime, ! $_CONF['cookie_path'], $_CONF['cookiedomain'], ! $_CONF['cookiesecure']); } else { ! setcookie ($_CONF['cookie_name'], $_USER['uid'], ! time() + $A['cooktime'], $_CONF['cookie_path'], ! $_CONF['cookiedomain'], $_CONF['cookiesecure']); } *************** *** 682,688 **** // Save theme, when doing so, put in cookie so we can set the user's theme even when they aren't logged in DB_query("UPDATE {$_TABLES['users']} SET theme='{$A["theme"]}',language='{$A["language"]}' WHERE uid = {$_USER['uid']}"); ! setcookie($_CONF['cookie_theme'],$A['theme'],time() + 31536000,$_CONF['cookie_path']); ! setcookie($_CONF['cookie_language'],$A['language'],time() + 31536000,$_CONF['cookie_path']); ! DB_query("UPDATE {$_TABLES['userprefs']} SET noicons='{$A['noicons']}', willing='{$A["willing"]}', dfid='{$A["dfid"]}', tzid='{$A["tzid"]}' WHERE uid='{$_USER['uid']}'"); --- 686,696 ---- // Save theme, when doing so, put in cookie so we can set the user's theme even when they aren't logged in DB_query("UPDATE {$_TABLES['users']} SET theme='{$A["theme"]}',language='{$A["language"]}' WHERE uid = {$_USER['uid']}"); ! setcookie ($_CONF['cookie_theme'], $A['theme'], time() + 31536000, ! $_CONF['cookie_path'], $_CONF['cookiedomain'], ! $_CONF['cookiesecure']); ! setcookie ($_CONF['cookie_language'], $A['language'], time() + 31536000, ! $_CONF['cookie_path'], $_CONF['cookiedomain'], ! $_CONF['cookiesecure']); ! DB_query("UPDATE {$_TABLES['userprefs']} SET noicons='{$A['noicons']}', willing='{$A["willing"]}', dfid='{$A["dfid"]}', tzid='{$A["tzid"]}' WHERE uid='{$_USER['uid']}'"); From geeklog-cvs-admin at lists.geeklog.net Fri May 9 06:27:47 2003 From: geeklog-cvs-admin at lists.geeklog.net (geeklog-cvs-admin at lists.geeklog.net) Date: Fri, 9 May 2003 05:27:47 -0500 Subject: [geeklog-cvs] geeklog-1.3/public_html/admin story.php,1.88,1.89 Message-ID: <200305091027.h49ARli01410@internal.geeklog.net> Update of /usr/cvs/geeklog/geeklog-1.3/public_html/admin In directory internal.geeklog.net:/tmp/cvs-serv1398 Modified Files: story.php Log Message: The last (attempted) fix actually made things worse - this should do it now ... Index: story.php =================================================================== RCS file: /usr/cvs/geeklog/geeklog-1.3/public_html/admin/story.php,v retrieving revision 1.88 retrieving revision 1.89 diff -C2 -d -r1.88 -r1.89 *** story.php 21 Apr 2003 09:52:58 -0000 1.88 --- story.php 9 May 2003 10:27:45 -0000 1.89 *************** *** 122,125 **** --- 122,126 ---- $A['perm_anon'] = $T['perm_anon']; $access = 3; + $A['title'] = htmlspecialchars ($A['title']); } elseif ($mode == "edit") { $A['sid'] = COM_makesid(); *************** *** 155,159 **** // Convert array values to numeric permission values list($A['perm_owner'],$A['perm_group'],$A['perm_members'],$A['perm_anon']) = SEC_getPermissionValues($A['perm_owner'],$A['perm_group'],$A['perm_members'],$A['perm_anon']); - if ($A["postmode"] == "html") { $A["introtext"] = COM_checkHTML(COM_checkWords($A["introtext"])); --- 156,159 ---- *************** *** 291,296 **** $A['title'] = str_replace('{','{',$A['title']); $A['title'] = str_replace('}','}',$A['title']); ! $story_templates->set_var('story_title', ! htmlspecialchars (stripslashes ($A['title']))); $story_templates->set_var('lang_topic', $LANG24[14]); if (empty ($A['tid'])) { --- 291,295 ---- $A['title'] = str_replace('{','{',$A['title']); $A['title'] = str_replace('}','}',$A['title']); ! $story_templates->set_var('story_title', stripslashes ($A['title'])); $story_templates->set_var('lang_topic', $LANG24[14]); if (empty ($A['tid'])) { From geeklog-cvs-admin at lists.geeklog.net Sun May 11 14:28:57 2003 From: geeklog-cvs-admin at lists.geeklog.net (geeklog-cvs-admin at lists.geeklog.net) Date: Sun, 11 May 2003 13:28:57 -0500 Subject: [geeklog-cvs] geeklog-1.3/docs history,1.93,1.94 Message-ID: <200305111828.h4BISvi07088@internal.geeklog.net> Update of /usr/cvs/geeklog/geeklog-1.3/docs In directory internal.geeklog.net:/tmp/cvs-serv7071/docs Modified Files: history Log Message: Plugins will have to handle comments themselves (mostly) from now on. Index: history =================================================================== RCS file: /usr/cvs/geeklog/geeklog-1.3/docs/history,v retrieving revision 1.93 retrieving revision 1.94 diff -C2 -d -r1.93 -r1.94 *** history 8 May 2003 17:23:10 -0000 1.93 --- history 11 May 2003 18:28:54 -0000 1.94 *************** *** 4,7 **** --- 4,12 ---- ------- + - Changes handling of plugin comments slightly: Plugins will have to do the + 'delete' operation on their comments on their own now since Geeklog can't + possibly know which (if any) permissions are needed to delete a comment. + The 'id' parameter in the call to plugin_handlecomment_ will now + always be the comment id. - In another attempt to solve the various issues regarding "www vs. non-www" URLs and related login problems: From geeklog-cvs-admin at lists.geeklog.net Sun May 11 14:28:57 2003 From: geeklog-cvs-admin at lists.geeklog.net (geeklog-cvs-admin at lists.geeklog.net) Date: Sun, 11 May 2003 13:28:57 -0500 Subject: [geeklog-cvs] geeklog-1.3/system lib-plugins.php,1.17,1.18 Message-ID: <200305111828.h4BISvi07093@internal.geeklog.net> Update of /usr/cvs/geeklog/geeklog-1.3/system In directory internal.geeklog.net:/tmp/cvs-serv7071/system Modified Files: lib-plugins.php Log Message: Plugins will have to handle comments themselves (mostly) from now on. Index: lib-plugins.php =================================================================== RCS file: /usr/cvs/geeklog/geeklog-1.3/system/lib-plugins.php,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** lib-plugins.php 2 May 2003 04:05:35 -0000 1.17 --- lib-plugins.php 11 May 2003 18:28:55 -0000 1.18 *************** *** 205,226 **** /** ! * No clue what this does yet * * @param string $type Plugin to have handle the comment ! * @param string $id Comment ID maybe?!? ! * @param string $operation "save" or "delete" ! * */ ! function PLG_handlePluginComment($type, $id,$operation='') { ! $args[1] = $id; ! $args[2] = $operation; ! PLG_callFunctionForOnePlugin('plugin_handlecomment_' . $type, $args); } /** ! * User has reuested to create a comment for the plugin * Redirects user to comment form if initial comment for plugin record or returns * formated HTML including the Site footer and the comments --- 205,226 ---- /** ! * Plugin should perform an operation on one of its comments. * * @param string $type Plugin to have handle the comment ! * @param string $id Comment ID ! * @param string $operation "save" or "delete" ! * @return string COM_refresh() string to redirect to the proper URL */ ! function PLG_handlePluginComment ($type, $id, $operation='') { ! $args[1] = $id; ! $args[2] = $operation; ! return PLG_callFunctionForOnePlugin('plugin_handlecomment_' . $type, $args); } /** ! * User has requested to create a comment for the plugin * Redirects user to comment form if initial comment for plugin record or returns * formated HTML including the Site footer and the comments From geeklog-cvs-admin at lists.geeklog.net Sun May 11 14:28:57 2003 From: geeklog-cvs-admin at lists.geeklog.net (geeklog-cvs-admin at lists.geeklog.net) Date: Sun, 11 May 2003 13:28:57 -0500 Subject: [geeklog-cvs] geeklog-1.3/public_html comment.php,1.42,1.43 Message-ID: <200305111828.h4BISvi07090@internal.geeklog.net> Update of /usr/cvs/geeklog/geeklog-1.3/public_html In directory internal.geeklog.net:/tmp/cvs-serv7071/public_html Modified Files: comment.php Log Message: Plugins will have to handle comments themselves (mostly) from now on. Index: comment.php =================================================================== RCS file: /usr/cvs/geeklog/geeklog-1.3/public_html/comment.php,v retrieving revision 1.42 retrieving revision 1.43 diff -C2 -d -r1.42 -r1.43 *** comment.php 5 May 2003 16:53:37 -0000 1.42 --- comment.php 11 May 2003 18:28:55 -0000 1.43 *************** *** 254,272 **** $title = addslashes(strip_tags(COM_checkWords($title))); ! if (!empty($title) && !empty($comment)) { COM_updateSpeedlimit ('comment'); ! DB_save($_TABLES['comments'],'sid,uid,comment,date,title,pid,type',"'$sid',$uid,'$comment',now(),'$title',$pid,'$type'"); ! ! // See if plugin will handle this to update it's records ! PLG_handlePluginComment($type,$sid,'save'); ! ! // If we reach here then no plugin issued a COM_refresh() so continue if ($type == 'poll') { ! $retval .= COM_refresh("{$_CONF['site_url']}/pollbooth.php?qid=$sid&aid=-1"); ! } else { ! $comments = DB_count($_TABLES['comments'],'sid',$sid); DB_change($_TABLES['stories'],'comments',$comments,'sid',$sid); ! $retval .= COM_refresh("{$_CONF['site_url']}/article.php?story=$sid"); } } else { --- 254,276 ---- $title = addslashes(strip_tags(COM_checkWords($title))); ! if (!empty ($title) && !empty ($comment)) { COM_updateSpeedlimit ('comment'); ! DB_save ($_TABLES['comments'], 'sid,uid,comment,date,title,pid,type', ! "'$sid',$uid,'$comment',now(),'$title',$pid,'$type'"); if ($type == 'poll') { ! $retval = COM_refresh ($_CONF['site_url'] ! . "/pollbooth.php?qid=$sid&aid=-1"); ! } elseif ($type == 'article') { ! $comments = DB_count ($_TABLES['comments'], 'sid', $sid); DB_change($_TABLES['stories'],'comments',$comments,'sid',$sid); ! $retval = COM_refresh ($_CONF['site_url'] ! . "/article.php?story=$sid"); ! } else { // assume it's a comment handled by a plugin ! $cid = DB_getItem ($_TABLES['comments'], 'cid', "(type = '$type') AND (pid = '$pid') AND (sid = '$sid') AND (uid = '$uid')"); ! $retval = PLG_handlePluginComment ($type, $cid, 'save'); ! if (empty ($retval)) { ! $retval = COM_refresh ($_CONF['site_url'] . '/index.php'); ! } } } else { *************** *** 296,324 **** if (!empty ($sid) && !empty ($cid) && is_numeric ($cid)) { - $result = DB_query ("SELECT owner_id,group_id,perm_owner,perm_group,perm_members,perm_anon FROM {$_TABLES['stories']} WHERE sid = '{$sid}'"); - $A = DB_fetchArray ($result); - if (SEC_hasAccess ($A['owner_id'], $A['group_id'], $A['perm_owner'], $A['perm_group'], $A['perm_members'], $A['perm_anon']) == 3) { - $pid = DB_getItem ($_TABLES['comments'], 'pid', "cid = '$cid'"); ! DB_change ($_TABLES['comments'], 'pid', $pid, 'pid', $cid); ! DB_delete ($_TABLES['comments'], 'cid', $cid); ! // See if plugin will handle this to update it's records ! PLG_handlePluginComment($type,$sid,'delete'); ! if ($type == 'poll') { ! $retval .= COM_refresh ($_CONF['site_url'] ! . '/pollbooth.php?qid=$sid&aid=-1'); } else { ! $comments = DB_count($_TABLES['comments'],'sid',$sid); ! DB_change($_TABLES['stories'],'comments',$comments,'sid',$sid); ! $retval .= COM_refresh ($_CONF['site_url'] ! . '/article.php?story=$sid'); } } else { ! COM_errorLog ('User ' . $_USER['username'] . ' (IP: ' . $REMOTE_ADDR ! . ') tried to illegally delete comment ' . $cid ! . ' from ' . $type . ' ' . $sid); ! $retval .= COM_refresh ($_CONF['site_url'] . '/index.php'); } } else { --- 300,345 ---- if (!empty ($sid) && !empty ($cid) && is_numeric ($cid)) { ! // only comments of type 'article' and 'poll' are handled by Geeklog ! if (($type == 'article') || ($type == 'poll')) { ! if ($type == 'article') { ! $table = $_TABLES['stories']; ! $idname = 'sid'; ! } else { ! $table = $_TABLES['pollquestions']; ! $idname = 'qid'; ! } ! $result = DB_query ("SELECT owner_id,group_id,perm_owner,perm_group,perm_members,perm_anon FROM {$table} WHERE {$idname} = '{$sid}'"); ! $A = DB_fetchArray ($result); ! if (SEC_hasAccess ($A['owner_id'], $A['group_id'], $A['perm_owner'], ! $A['perm_group'], $A['perm_members'], $A['perm_anon']) == 3) { ! $pid = DB_getItem ($_TABLES['comments'], 'pid', "cid = '$cid'"); ! DB_change ($_TABLES['comments'], 'pid', $pid, 'pid', $cid); ! DB_delete ($_TABLES['comments'], 'cid', $cid); ! ! if ($type == 'poll') { ! $retval .= COM_refresh ($_CONF['site_url'] ! . '/pollbooth.php?qid=' . $sid . '&aid=-1'); ! } else { ! $comments = DB_count ($_TABLES['comments'], 'sid', $sid); ! DB_change ($_TABLES['stories'], 'comments', $comments, ! 'sid', $sid); ! $retval .= COM_refresh ($_CONF['site_url'] ! . '/article.php?story=' . $sid); ! } } else { ! COM_errorLog ('User ' . $_USER['username'] . ' (IP: ' ! . $REMOTE_ADDR . ') tried to illegally delete comment ' ! . $cid . ' from ' . $type . ' ' . $sid); ! $retval .= COM_refresh ($_CONF['site_url'] . '/index.php'); } } else { ! // See if plugin will handle this ! $retval = PLG_handlePluginComment ($type, $cid, 'delete'); ! if (empty ($retval)) { ! $retval = COM_refresh ($_CONF['site_url'] . '/index.php'); ! } } } else { *************** *** 351,355 **** if (!empty($sid)) { if (empty ($title)) { ! $title = DB_getItem ($_TABLES['stories'], 'title', "sid = '{$sid}'"); $title = str_replace ('$', '$', $title); } --- 372,382 ---- if (!empty($sid)) { if (empty ($title)) { ! if ($type == 'article') { ! $title = DB_getItem ($_TABLES['stories'], 'title', ! "sid = '{$sid}'"); ! } elseif ($type == 'poll') { ! $title = DB_getItem ($_TABLES['pollquestions'], 'question', ! "qid = '{$sid}'"); ! } $title = str_replace ('$', '$', $title); } From geeklog-cvs-admin at lists.geeklog.net Sun May 11 14:34:41 2003 From: geeklog-cvs-admin at lists.geeklog.net (geeklog-cvs-admin at lists.geeklog.net) Date: Sun, 11 May 2003 13:34:41 -0500 Subject: [geeklog-cvs] geeklog-1.3/public_html lib-common.php,1.220,1.221 Message-ID: <200305111834.h4BIYfi07185@internal.geeklog.net> Update of /usr/cvs/geeklog/geeklog-1.3/public_html In directory internal.geeklog.net:/tmp/cvs-serv7165 Modified Files: lib-common.php Log Message: Added title attributes to the printer and email icons (in articles). Index: lib-common.php =================================================================== RCS file: /usr/cvs/geeklog/geeklog-1.3/public_html/lib-common.php,v retrieving revision 1.220 retrieving revision 1.221 diff -C2 -d -r1.220 -r1.221 *** lib-common.php 6 May 2003 13:56:20 -0000 1.220 --- lib-common.php 11 May 2003 18:34:39 -0000 1.221 *************** *** 318,322 **** function COM_article( $A, $index='', $storytpl='storytext.thtml' ) { ! global $_TABLES, $mode, $_CONF, $LANG01, $_USER, $LANG05, $_THEME_URL; $curtime = COM_getUserDateTimeFormat( $A['day'] ); --- 318,322 ---- function COM_article( $A, $index='', $storytpl='storytext.thtml' ) { ! global $_TABLES, $mode, $_CONF, $_USER, $LANG01, $LANG05, $LANG11, $_THEME_URL; $curtime = COM_getUserDateTimeFormat( $A['day'] ); *************** *** 502,506 **** . '' . $LANG01[64]
!                 . '' ); } if( $_CONF['hideprintericon'] == 1 ) --- 502,506 ---- . '' . $LANG01[64]
!                 . '' ); } if( $_CONF['hideprintericon'] == 1 ) *************** *** 514,518 **** . '&mode=print">'
!                 . $LANG01[65] . '' ); } } --- 514,518 ---- . '&mode=print">'
!                 . $LANG01[65] . '' ); } } From geeklog-cvs-admin at lists.geeklog.net Sun May 11 14:35:46 2003 From: geeklog-cvs-admin at lists.geeklog.net (geeklog-cvs-admin at lists.geeklog.net) Date: Sun, 11 May 2003 13:35:46 -0500 Subject: [geeklog-cvs] geeklog-1.3/plugins/staticpages/language german.php,1.7,1.8 Message-ID: <200305111835.h4BIZki07227@internal.geeklog.net> Update of /usr/cvs/geeklog/geeklog-1.3/plugins/staticpages/language In directory internal.geeklog.net:/tmp/cvs-serv7211 Modified Files: german.php Log Message: Rephrased a string & some source code cosmetics. Index: german.php =================================================================== RCS file: /usr/cvs/geeklog/geeklog-1.3/plugins/staticpages/language/german.php,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** german.php 10 Mar 2003 18:36:01 -0000 1.7 --- german.php 11 May 2003 18:35:43 -0000 1.8 *************** *** 35,57 **** $LANG_STATIC= array( ! newpage => "Neue Seite", ! adminhome => "Admin Home", ! staticpages => "Statische Seiten", ! staticpageeditor => "Editor f?r Statische Seiten", ! writtenby => "Autor", ! date => "Letztes Update", ! title => "Titel", ! content => "Inhalt", ! hits => "Treffer", ! staticpagelist => "Liste der Statischen Seiten", ! usealtheader => "Alt. Header verwenden", ! url => "URL", ! edit => "?ndern", ! lastupdated => "Letztes Update", ! pageformat => "Seitenformat", ! leftrightblocks => "Bl?cke links & rechts", ! blankpage => "Leere Seite", ! noblocks => "Keine Bl?cke", ! leftblocks => "Bl?cke links", addtomenu => 'Ins Men? aufnehmen', label => 'Label', --- 35,57 ---- $LANG_STATIC= array( ! newpage => 'Neue Seite', ! adminhome => 'Admin Home', ! staticpages => 'Statische Seiten', ! staticpageeditor => 'Editor f?r Statische Seiten', ! writtenby => 'Autor', ! date => 'Letzte ?nderung', ! title => 'Titel', ! content => 'Inhalt', ! hits => 'Treffer', ! staticpagelist => 'Liste der Statischen Seiten', ! usealtheader => 'Alt. Header verwenden', ! url => 'URL', ! edit => '?ndern', ! lastupdated => 'Letzte ?nderung', ! pageformat => 'Seitenformat', ! leftrightblocks => 'Bl?cke links & rechts', ! blankpage => 'Leere Seite', ! noblocks => 'Keine Bl?cke', ! leftblocks => 'Bl?cke links', addtomenu => 'Ins Men? aufnehmen', label => 'Label', From geeklog-cvs-admin at lists.geeklog.net Sun May 11 17:05:31 2003 From: geeklog-cvs-admin at lists.geeklog.net (geeklog-cvs-admin at lists.geeklog.net) Date: Sun, 11 May 2003 16:05:31 -0500 Subject: [geeklog-cvs] geeklog-1.3/language spanish.php,1.3,1.4 Message-ID: <200305112105.h4BL5Vi08687@internal.geeklog.net> Update of /usr/cvs/geeklog/geeklog-1.3/language In directory internal.geeklog.net:/tmp/cvs-serv8665 Modified Files: spanish.php Log Message: Fixed a translation error, reported by Alejandro Grijalba. Index: spanish.php =================================================================== RCS file: /usr/cvs/geeklog/geeklog-1.3/language/spanish.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** spanish.php 18 Mar 2003 10:29:43 -0000 1.3 --- spanish.php 11 May 2003 21:05:29 -0000 1.4 *************** *** 944,948 **** 11 => "Su Bloque ha sido grabado con ?xito.", 12 => "El Bloque ha sido borrado con ?xito.", ! 13 => "Su Secci?n ha sido borrada con ?xito.", 14 => "La Secci?n junto con todas sus Noticias y Bloques han sido borrado con ?xito.", 15 => "Su enlace fue grabado con ?xito.", --- 944,948 ---- 11 => "Su Bloque ha sido grabado con ?xito.", 12 => "El Bloque ha sido borrado con ?xito.", ! 13 => "Su Secci?n ha sido grabada con ?xito.", 14 => "La Secci?n junto con todas sus Noticias y Bloques han sido borrado con ?xito.", 15 => "Su enlace fue grabado con ?xito.", From geeklog-cvs-admin at lists.geeklog.net Wed May 14 04:13:40 2003 From: geeklog-cvs-admin at lists.geeklog.net (geeklog-cvs-admin at lists.geeklog.net) Date: Wed, 14 May 2003 03:13:40 -0500 Subject: [geeklog-cvs] geeklog-1.3/public_html lib-common.php,1.221,1.222 Message-ID: <200305140813.h4E8Dei14464@internal.geeklog.net> Update of /usr/cvs/geeklog/geeklog-1.3/public_html In directory internal.geeklog.net:/tmp/cvs-serv14452 Modified Files: lib-common.php Log Message: Using implode() is really much more elegant ... Index: lib-common.php =================================================================== RCS file: /usr/cvs/geeklog/geeklog-1.3/public_html/lib-common.php,v retrieving revision 1.221 retrieving revision 1.222 diff -C2 -d -r1.221 -r1.222 *** lib-common.php 11 May 2003 18:34:39 -0000 1.221 --- lib-common.php 14 May 2003 08:13:37 -0000 1.222 *************** *** 4865,4868 **** --- 4865,4875 ---- } + if( empty( $_GROUPS )) + { + // this shouldn't really happen, but if it does, handle user + // like an anonymous user + $uid = 1; + } + if( SEC_inGroup( 'Root', $uid )) { *************** *** 4876,4887 **** $sql .= "(({$table}owner_id = '{$uid}') AND ({$table}perm_owner >= $access)) OR "; ! $groupList = ''; ! foreach( $GROUPS as $grp ) ! { ! $groupList .= $grp . ','; ! } ! $groupList = substr( $groupList, 0, -1 ); ! $sql .= "(({$table}group_id IN ($groupList)) AND ({$table}perm_group >= $access)) OR "; ! $sql .= "({$table}perm_members >= $access)"; } --- 4883,4888 ---- $sql .= "(({$table}owner_id = '{$uid}') AND ({$table}perm_owner >= $access)) OR "; ! $sql .= "(({$table}group_id IN (" . implode (',', $_GROUPS) ! . ")) AND ({$table}perm_group >= $access)) OR "; $sql .= "({$table}perm_members >= $access)"; } From geeklog-cvs-admin at lists.geeklog.net Wed May 14 06:48:55 2003 From: geeklog-cvs-admin at lists.geeklog.net (geeklog-cvs-admin at lists.geeklog.net) Date: Wed, 14 May 2003 05:48:55 -0500 Subject: [geeklog-cvs] geeklog-1.3/public_html pollbooth.php,1.18,1.19 stats.php,1.22,1.23 users.php,1.62,1.63 usersettings.php,1.57,1.58 Message-ID: <200305141048.h4EAmti15531@internal.geeklog.net> Update of /usr/cvs/geeklog/geeklog-1.3/public_html In directory internal.geeklog.net:/tmp/cvs-serv15512 Modified Files: pollbooth.php stats.php users.php usersettings.php Log Message: Use COM_getPermSQL(), now that we have it ... Index: pollbooth.php =================================================================== RCS file: /usr/cvs/geeklog/geeklog-1.3/public_html/pollbooth.php,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** pollbooth.php 8 May 2003 17:23:10 -0000 1.18 --- pollbooth.php 14 May 2003 10:48:52 -0000 1.19 *************** *** 92,110 **** $retval .= $login->finish ($login->get_var('output')); } else { ! $sql = "SELECT qid,question,voters FROM {$_TABLES['pollquestions']} WHERE "; ! if (!empty ($_USER['uid'])) { ! $groupList = ''; ! if (!empty ($_USER['uid'])) { ! foreach ($_GROUPS as $grp) { ! $groupList .= $grp . ','; ! } ! $groupList = substr ($groupList, 0, -1); ! } ! $sql .= "(owner_id = {$_USER['uid']} AND perm_owner >= 2) OR "; ! $sql .= "(group_id IN ($groupList) AND perm_group >= 2) OR "; ! $sql .= "(perm_members >= 2) OR "; ! } ! $sql .= "(perm_anon >= 2)"; ! $result = DB_query($sql); $nrows = DB_numRows($result); --- 92,97 ---- $retval .= $login->finish ($login->get_var('output')); } else { ! $sql = "SELECT qid,question,voters FROM {$_TABLES['pollquestions']}" ! . COM_getPermSQL (); $result = DB_query($sql); $nrows = DB_numRows($result); Index: stats.php =================================================================== RCS file: /usr/cvs/geeklog/geeklog-1.3/public_html/stats.php,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** stats.php 19 Jan 2003 17:22:26 -0000 1.22 --- stats.php 14 May 2003 10:48:52 -0000 1.23 *************** *** 65,83 **** 'statrow'=>'singlestat.thtml')); - $groupList = ''; - if (!empty ($_USER['uid'])) { - foreach ($_GROUPS as $grp) { - $groupList .= $grp . ','; - } - $groupList = substr ($groupList, 0, -1); - } - $permsql = ''; - if (!empty ($_USER['uid'])) { - $permsql .= "(owner_id = {$_USER['uid']} AND perm_owner >= 2) OR " - . "(group_id IN ($groupList) AND perm_group >= 2) OR " - . "(perm_members >= 2) OR "; - } - $permsql .= "(perm_anon >= 2)"; - // Overall Site Statistics --- 65,68 ---- *************** *** 88,92 **** $id = array('draft_flag','date'); $values = array('0','NOW()'); ! $result = DB_query("SELECT count(*) AS count,SUM(comments) as ccount FROM {$_TABLES['stories']} WHERE (draft_flag = 0) AND (date <= NOW()) AND ({$permsql})"); $A = DB_fetchArray($result); $total_stories = $A['count']; --- 73,77 ---- $id = array('draft_flag','date'); $values = array('0','NOW()'); ! $result = DB_query("SELECT count(*) AS count,SUM(comments) as ccount FROM {$_TABLES['stories']} WHERE (draft_flag = 0) AND (date <= NOW())" . COM_getPermSQL ('AND')); $A = DB_fetchArray($result); $total_stories = $A['count']; *************** *** 99,106 **** $stat_templates->set_var('total_comments',$comments); ! $result = DB_query ("SELECT count(*) AS count FROM {$_TABLES['pollquestions']} WHERE ({$permsql})"); $A = DB_fetchArray($result); $total_polls = $A['count']; ! $result = DB_query ("SELECT qid FROM {$_TABLES['pollquestions']} WHERE ({$permsql})"); $nrows = DB_numRows ($result); if ($nrows > 0) { --- 84,91 ---- $stat_templates->set_var('total_comments',$comments); ! $result = DB_query ("SELECT count(*) AS count FROM {$_TABLES['pollquestions']}" . COM_getPermSQL ()); $A = DB_fetchArray($result); $total_polls = $A['count']; ! $result = DB_query ("SELECT qid FROM {$_TABLES['pollquestions']}" . COM_getPermSQL ()); $nrows = DB_numRows ($result); if ($nrows > 0) { *************** *** 123,127 **** $stat_templates->set_var('total_answers', $total_answers); ! $result = DB_query ("SELECT count(*) AS count,SUM(hits) AS clicks FROM {$_TABLES['links']} WHERE ({$permsql})"); $A = DB_fetchArray($result); $total_links = $A['count']; --- 108,112 ---- $stat_templates->set_var('total_answers', $total_answers); ! $result = DB_query ("SELECT count(*) AS count,SUM(hits) AS clicks FROM {$_TABLES['links']}" . COM_getPermSQL ()); $A = DB_fetchArray($result); $total_links = $A['count']; *************** *** 134,138 **** $stat_templates->set_var('total_clicks',$total_clicks); ! $result = DB_query ("SELECT count(*) AS count FROM {$_TABLES['events']} WHERE ({$permsql})"); $A = DB_fetchArray($result); $total_events = $A['count']; --- 119,123 ---- $stat_templates->set_var('total_clicks',$total_clicks); ! $result = DB_query ("SELECT count(*) AS count FROM {$_TABLES['events']}" . COM_getPermSQL ()); $A = DB_fetchArray($result); $total_events = $A['count']; *************** *** 151,155 **** // Detailed story statistics ! $result = DB_query("SELECT sid,title,hits FROM {$_TABLES["stories"]} WHERE (draft_flag = 0) AND (date <= NOW()) AND (Hits > 0) AND ({$permsql}) ORDER BY Hits desc LIMIT 10"); $nrows = DB_numRows($result); --- 136,140 ---- // Detailed story statistics ! $result = DB_query("SELECT sid,title,hits FROM {$_TABLES["stories"]} WHERE (draft_flag = 0) AND (date <= NOW()) AND (Hits > 0)" . COM_getPermSQL ('AND') . " ORDER BY Hits desc LIMIT 10"); $nrows = DB_numRows($result); *************** *** 176,180 **** // Top Ten Commented Stories ! $result = DB_query("SELECT sid,title,comments from {$_TABLES['stories']} WHERE (draft_flag = 0) AND (date <= NOW()) AND (comments > 0) AND ({$permsql}) ORDER BY comments desc LIMIT 10"); $nrows = DB_numRows($result); $display .= COM_startBlock($LANG10[11]); --- 161,165 ---- // Top Ten Commented Stories ! $result = DB_query("SELECT sid,title,comments from {$_TABLES['stories']} WHERE (draft_flag = 0) AND (date <= NOW()) AND (comments > 0)" . COM_getPermSQL ('AND') . " ORDER BY comments desc LIMIT 10"); $nrows = DB_numRows($result); $display .= COM_startBlock($LANG10[11]); *************** *** 199,203 **** // Top Ten Emailed Stories ! $result = DB_query("SELECT sid,title,numemails FROM {$_TABLES["stories"]} WHERE (numemails > 0) AND (draft_flag = 0) AND (date <= NOW()) AND ({$permsql}) ORDER BY numemails desc LIMIT 10"); $nrows = DB_numRows($result); $display .= COM_startBlock($LANG10[22]); --- 184,188 ---- // Top Ten Emailed Stories ! $result = DB_query("SELECT sid,title,numemails FROM {$_TABLES["stories"]} WHERE (numemails > 0) AND (draft_flag = 0) AND (date <= NOW())" . COM_getPermSQL ('AND') . " ORDER BY numemails desc LIMIT 10"); $nrows = DB_numRows($result); $display .= COM_startBlock($LANG10[22]); *************** *** 223,227 **** // Top Ten Polls ! $result = DB_query("SELECT qid,question,voters from {$_TABLES['pollquestions']} WHERE (voters > 0) AND ({$permsql}) ORDER BY voters desc LIMIT 10"); $nrows = DB_numRows($result); $display .= COM_startBlock($LANG10[14]); --- 208,212 ---- // Top Ten Polls ! $result = DB_query("SELECT qid,question,voters from {$_TABLES['pollquestions']} WHERE (voters > 0)" . COM_getPermSQL ('AND') . " ORDER BY voters desc LIMIT 10"); $nrows = DB_numRows($result); $display .= COM_startBlock($LANG10[14]); *************** *** 247,251 **** // Top Ten Links ! $result = DB_query("SELECT lid,url,title,hits from {$_TABLES['links']} WHERE (hits > 0) AND ({$permsql}) ORDER BY hits desc LIMIT 10"); $nrows = DB_numRows($result); $display .= COM_startBlock($LANG10[18]); --- 232,236 ---- // Top Ten Links ! $result = DB_query("SELECT lid,url,title,hits from {$_TABLES['links']} WHERE (hits > 0)" . COM_getPermSQL ('AND') . " ORDER BY hits desc LIMIT 10"); $nrows = DB_numRows($result); $display .= COM_startBlock($LANG10[18]); Index: users.php =================================================================== RCS file: /usr/cvs/geeklog/geeklog-1.3/public_html/users.php,v retrieving revision 1.62 retrieving revision 1.63 diff -C2 -d -r1.62 -r1.63 *** users.php 8 May 2003 17:23:10 -0000 1.62 --- users.php 14 May 2003 10:48:52 -0000 1.63 *************** *** 133,148 **** // list of last 10 stories by this user ! $groupList = ''; ! $sql = "SELECT sid,title,UNIX_TIMESTAMP(date) AS unixdate FROM {$_TABLES['stories']} WHERE (uid = $user) AND (draft_flag = 0) AND (date <= NOW()) AND ("; ! if (!empty ($_USER['uid'])) { ! foreach ($_GROUPS as $grp) { ! $groupList .= $grp . ','; ! } ! $groupList = substr ($groupList, 0, -1); ! $sql .= "(owner_id = {$_USER['uid']} AND perm_owner >= 2) OR "; ! $sql .= "(group_id IN ($groupList) AND perm_group >= 2) OR "; ! $sql .= "(perm_members >= 2) OR "; ! } ! $sql .= "(perm_anon >= 2)) ORDER BY unixdate DESC LIMIT 10"; $result = DB_query($sql); $nrows = DB_numRows($result); --- 133,138 ---- // list of last 10 stories by this user ! $sql = "SELECT sid,title,UNIX_TIMESTAMP(date) AS unixdate FROM {$_TABLES['stories']} WHERE (uid = $user) AND (draft_flag = 0) AND (date <= NOW())" . COM_getPermSQL ('AND'); ! $sql .= " ORDER BY unixdate DESC LIMIT 10"; $result = DB_query($sql); $nrows = DB_numRows($result); *************** *** 166,176 **** // list of last 10 comments by this user // first, get a list of all stories the current visitor has access to ! $sql = "SELECT sid FROM {$_TABLES['stories']} WHERE (draft_flag = 0) AND (date <= NOW()) AND ("; ! if (!empty ($_USER['uid'])) { ! $sql .= "(owner_id = {$_USER['uid']} AND perm_owner >= 2) OR "; ! $sql .= "(group_id IN ($groupList) AND perm_group >= 2) OR "; ! $sql .= "(perm_members >= 2) OR "; ! } ! $sql .= "(perm_anon >= 2))"; $result = DB_query($sql); $numsids = DB_numRows($result); --- 156,160 ---- // list of last 10 comments by this user // first, get a list of all stories the current visitor has access to ! $sql = "SELECT sid FROM {$_TABLES['stories']} WHERE (draft_flag = 0) AND (date <= NOW())" . COM_getPermSQL ('AND'); $result = DB_query($sql); $numsids = DB_numRows($result); *************** *** 181,191 **** } // add all polls the current visitor has access to ! $sql = "SELECT qid FROM {$_TABLES['pollquestions']} WHERE "; ! if (!empty ($_USER['uid'])) { ! $sql .= "(owner_id = {$_USER['uid']} AND perm_owner >= 2) OR "; ! $sql .= "(group_id IN ($groupList) AND perm_group >= 2) OR "; ! $sql .= "(perm_members >= 2) OR "; ! } ! $sql .= "(perm_anon >= 2)"; $result = DB_query($sql); $numqids = DB_numRows($result); --- 165,169 ---- } // add all polls the current visitor has access to ! $sql = "SELECT qid FROM {$_TABLES['pollquestions']}" . COM_getPermSQL (); $result = DB_query($sql); $numqids = DB_numRows($result); *************** *** 244,254 **** // posting stats for this user $user_templates->set_var ('lang_number_stories', $LANG04[84]); ! $sql = "SELECT count(*) AS count FROM {$_TABLES['stories']} WHERE (uid = $user) AND (draft_flag = 0) AND (date <= NOW()) AND ("; ! if (!empty ($_USER['uid'])) { ! $sql .= "(owner_id = {$_USER['uid']} AND perm_owner >= 2) OR "; ! $sql .= "(group_id IN ($groupList) AND perm_group >= 2) OR "; ! $sql .= "(perm_members >= 2) OR "; ! } ! $sql .= "(perm_anon >= 2))"; $result = DB_query($sql); $N = DB_fetchArray ($result); --- 222,226 ---- // posting stats for this user $user_templates->set_var ('lang_number_stories', $LANG04[84]); ! $sql = "SELECT count(*) AS count FROM {$_TABLES['stories']} WHERE (uid = $user) AND (draft_flag = 0) AND (date <= NOW())" . COM_getPermSQL ('AND'); $result = DB_query($sql); $N = DB_fetchArray ($result); Index: usersettings.php =================================================================== RCS file: /usr/cvs/geeklog/geeklog-1.3/public_html/usersettings.php,v retrieving revision 1.57 retrieving revision 1.58 diff -C2 -d -r1.57 -r1.58 *** usersettings.php 8 May 2003 17:23:10 -0000 1.57 --- usersettings.php 14 May 2003 10:48:52 -0000 1.58 *************** *** 361,380 **** // excluded items block ! $groupList = ''; ! if (!empty ($_USER['uid'])) { ! foreach ($_GROUPS as $grp) { ! $groupList .= $grp . ','; ! } ! $groupList = substr ($groupList, 0, -1); ! } ! ! $permissions = ''; ! if (!empty ($_USER['uid'])) { ! $permissions .= "(owner_id = {$_USER['uid']} AND perm_owner >= 2) OR "; ! $permissions .= "(group_id IN ($groupList) AND perm_group >= 2) OR "; ! $permissions .= "(perm_members >= 2) OR "; ! } ! $permissions .= "(perm_anon >= 2)"; ! $preferences->set_var ('exclude_topic_checklist', COM_checkList($_TABLES['topics'],'tid,topic',$permissions,$A['tids'])); --- 361,365 ---- // excluded items block ! $permissions = COM_getPermSQL (''); $preferences->set_var ('exclude_topic_checklist', COM_checkList($_TABLES['topics'],'tid,topic',$permissions,$A['tids'])); *************** *** 426,430 **** } } ! $whereblock = "(" . $permissions . ") AND ((type != 'layout' AND type != 'gldefault' AND is_enabled = 1) OR (type = 'gldefault' AND is_enabled = 1 AND name IN ('whats_new_block','poll_block','events_block','older_stories'))) ORDER BY onleft desc,blockorder,title"; $preferences->set_var ('boxes_checklist', COM_checkList ($_TABLES['blocks'], 'bid,title,blockorder', $whereblock, $selectedblocks)); --- 411,419 ---- } } ! $whereblock = ''; ! if (!empty ($permissions)) { ! $whereblock .= $permissions . ' AND '; ! } ! $whereblock = "((type != 'layout' AND type != 'gldefault' AND is_enabled = 1) OR (type = 'gldefault' AND is_enabled = 1 AND name IN ('whats_new_block','poll_block','events_block','older_stories'))) ORDER BY onleft desc,blockorder,title"; $preferences->set_var ('boxes_checklist', COM_checkList ($_TABLES['blocks'], 'bid,title,blockorder', $whereblock, $selectedblocks)); From geeklog-cvs-admin at lists.geeklog.net Thu May 15 11:25:24 2003 From: geeklog-cvs-admin at lists.geeklog.net (geeklog-cvs-admin at lists.geeklog.net) Date: Thu, 15 May 2003 10:25:24 -0500 Subject: [geeklog-cvs] geeklog-1.3/public_html index.php,1.46,1.47 Message-ID: <200305151525.h4FFPOi04112@internal.geeklog.net> Update of /usr/cvs/geeklog/geeklog-1.3/public_html In directory internal.geeklog.net:/tmp/cvs-serv4036 Modified Files: index.php Log Message: This fixes the same problems as the replacement index.php for 1.3.7sr1, i.e. the topic permissions and the "google paging" (right blocks on empty topics have already been fixed in an earlier revision). Index: index.php =================================================================== RCS file: /usr/cvs/geeklog/geeklog-1.3/public_html/index.php,v retrieving revision 1.46 retrieving revision 1.47 diff -C2 -d -r1.46 -r1.47 *** index.php 8 May 2003 17:23:10 -0000 1.46 --- index.php 15 May 2003 15:25:21 -0000 1.47 *************** *** 182,186 **** COM_featuredCheck(); ! $sql = "SELECT *,unix_timestamp(date) AS day FROM {$_TABLES['stories']} WHERE (date <= NOW()) AND (draft_flag = 0)"; // if a topic was provided only select those stories. --- 182,186 ---- COM_featuredCheck(); ! $sql = "FROM {$_TABLES['stories']} WHERE (date <= NOW()) AND (draft_flag = 0)"; // if a topic was provided only select those stories. *************** *** 191,207 **** } ! $sql .= " AND ("; ! if (!empty ($_USER['uid'])) { ! $groupList = ''; ! foreach ($_GROUPS as $grp) { ! $groupList .= $grp . ','; ! } ! $groupList = substr ($groupList, 0, -1); ! $sql .= "(owner_id = {$_USER['uid']} AND perm_owner >= 2) OR "; ! $sql .= "(group_id IN ($groupList) AND perm_group >= 2) OR "; ! $sql .= "(perm_members >= 2))"; ! } else { ! $sql .= "perm_anon >= 2)"; ! } if (!empty($U['aids'])) { --- 191,195 ---- } ! $sql .= COM_getPermSQL ('AND'); if (!empty($U['aids'])) { *************** *** 221,224 **** --- 209,225 ---- } + $tresult = DB_query ("SELECT tid FROM {$_TABLES['topics']}" . COM_getPermSQL()); + $trows = DB_numRows ($tresult); + if ($trows > 0) { + $tids = array (); + for ($i = 0; $i < $trows; $i++) { + $T = DB_fetchArray ($tresult); + $tids[] = $T['tid']; + } + if (sizeof ($tids) > 0) { + $sql .= "AND (tid IN ('" . implode ("','", $tids) . "')) "; + } + } + if ($newstories) { $sql .= "AND (date >= (NOW() - INTERVAL {$_CONF['newstoriesinterval']} SECOND)) "; *************** *** 226,258 **** $offset = ($page - 1) * $limit; ! $sql .= "ORDER BY featured DESC, date DESC LIMIT $offset, $limit"; ! ! $result = DB_query($sql); ! $nrows = DB_numRows($result); ! ! $countsql = "SELECT count(*) AS count FROM {$_TABLES['stories']} WHERE (date <= NOW()) AND (draft_flag = 0)"; ! if (!empty($topic)) { ! $countsql = $countsql . " AND tid='$topic'"; ! } elseif (!$newstories) { ! $countsql = $countsql . ' AND frontpage = 1'; ! } ! ! $countsql .= " AND ("; ! if (!empty ($_USER['uid'])) { ! // Note: $groupList re-used from above ! $countsql .= "(owner_id = {$_USER['uid']} AND perm_owner >= 2) OR "; ! $countsql .= "(group_id IN ($groupList) AND perm_group >= 2) OR "; ! $countsql .= "(perm_members >= 2))"; ! } else { ! $countsql .= "perm_anon >= 2)"; ! } ! if ($newstories) { ! $countsql .= " AND (date >= (NOW() - INTERVAL {$_CONF['newstoriesinterval']} SECOND))"; ! } ! $data = DB_query($countsql); ! $D = DB_fetchArray($data); ! $num_pages = ceil($D['count'] / $limit); if ($nrows > 0) { --- 227,239 ---- $offset = ($page - 1) * $limit; ! $sql .= "ORDER BY featured DESC, date DESC"; ! $result = DB_query ("SELECT *,unix_timestamp(date) AS day " . $sql ! . " LIMIT $offset, $limit"); ! $nrows = DB_numRows ($result); ! $data = DB_query ("SELECT count(*) AS count " . $sql); ! $D = DB_fetchArray ($data); ! $num_pages = ceil ($D['count'] / $limit); if ($nrows > 0) { From geeklog-cvs-admin at lists.geeklog.net Thu May 15 11:41:10 2003 From: geeklog-cvs-admin at lists.geeklog.net (geeklog-cvs-admin at lists.geeklog.net) Date: Thu, 15 May 2003 10:41:10 -0500 Subject: [geeklog-cvs] geeklog-1.3/public_html index.php,1.40,1.40.2.1 Message-ID: <200305151541.h4FFfAi04354@internal.geeklog.net> Update of /usr/cvs/geeklog/geeklog-1.3/public_html In directory internal.geeklog.net:/tmp/cvs-serv4336 Modified Files: Tag: geeklog_1_3_7sr1_1 index.php Log Message: Fixes for 1) topic permissions, 2) google paging, 3) right blocks on empty topics Index: index.php =================================================================== RCS file: /usr/cvs/geeklog/geeklog-1.3/public_html/index.php,v retrieving revision 1.40 retrieving revision 1.40.2.1 diff -C2 -d -r1.40 -r1.40.2.1 *** index.php 31 Dec 2002 10:58:55 -0000 1.40 --- index.php 15 May 2003 15:41:07 -0000 1.40.2.1 *************** *** 169,173 **** COM_featuredCheck(); ! $sql = "SELECT *,unix_timestamp(date) AS day FROM {$_TABLES['stories']} WHERE (date <= NOW()) AND (draft_flag = 0)"; // if a topic was provided only select those stories. --- 169,173 ---- COM_featuredCheck(); ! $sql = "FROM {$_TABLES['stories']} WHERE (date <= NOW()) AND (draft_flag = 0)"; // if a topic was provided only select those stories. *************** *** 178,193 **** } ! $sql .= " AND ("; if (!empty ($_USER['uid'])) { ! $groupList = ''; ! foreach ($_GROUPS as $grp) { ! $groupList .= $grp . ','; ! } ! $groupList = substr ($groupList, 0, -1); ! $sql .= "(owner_id = {$_USER['uid']} AND perm_owner >= 2) OR "; ! $sql .= "(group_id IN ($groupList) AND perm_group >= 2) OR "; ! $sql .= "(perm_members >= 2) OR "; } ! $sql .= "(perm_anon >= 2))"; if (!empty($U['aids'])) { --- 178,191 ---- } ! $groupsql = " ("; if (!empty ($_USER['uid'])) { ! $groupsql .= "(owner_id = {$_USER['uid']} AND perm_owner >= 2) OR "; ! $groupsql .= "(group_id IN (" . implode (',', $_GROUPS) . ") AND perm_group >= 2) OR "; ! $groupsql .= "(perm_members >= 2)) "; ! } else { ! $groupsql .= "perm_anon >= 2) "; } ! ! $sql .= " AND" . $groupsql; if (!empty($U['aids'])) { *************** *** 205,239 **** } ! if ($newstories) { ! $sql .= "AND (date >= (NOW() - INTERVAL {$_CONF['newstoriesinterval']} SECOND))"; } ! $offset = ($page - 1) * $limit; ! $sql .= "ORDER BY featured DESC, date DESC LIMIT $offset, $limit"; ! ! $result = DB_query($sql); ! $nrows = DB_numRows($result); ! $countsql = "SELECT count(*) AS count FROM {$_TABLES['stories']} WHERE (date <= NOW()) AND (draft_flag = 0)"; ! if (!empty($topic)) { ! $countsql = $countsql . " AND tid='$topic'"; ! } elseif (!$newstories) { ! $countsql = $countsql . ' AND frontpage = 1'; } ! $countsql .= " AND ("; ! if (!empty ($_USER['uid'])) { ! // Note: $groupList re-used from above ! $countsql .= "(owner_id = {$_USER['uid']} AND perm_owner >= 2) OR "; ! $countsql .= "(group_id IN ($groupList) AND perm_group >= 2) OR "; ! $countsql .= "(perm_members >= 2) OR "; ! } ! $countsql .= "(perm_anon >= 2))"; ! if ($newstories) { ! $countsql .= " AND (date >= (NOW() - INTERVAL {$_CONF['newstoriesinterval']} SECOND))"; ! } ! $data = DB_query($countsql); $D = DB_fetchArray($data); $num_pages = ceil($D['count'] / $limit); --- 203,234 ---- } ! $tresult = DB_query ("SELECT tid FROM {$_TABLES['topics']} WHERE" . $groupsql); ! $trows = DB_numRows ($tresult); ! $topicsql = ''; ! if ($trows > 0) { ! $tids = array (); ! for ($i = 0; $i < $trows; $i++) { ! $T = DB_fetchArray ($tresult); ! $tids[] = $T['tid']; ! } ! if (sizeof ($tids) > 0) { ! $topicsql = "AND (tid IN ('" . implode ("','", $tids) . "')) "; ! } } ! $sql .= $topicsql; ! if ($newstories) { ! $sql .= "AND (date >= (NOW() - INTERVAL {$_CONF['newstoriesinterval']} SECOND)) "; } ! $offset = ($page - 1) * $limit; ! $sql .= "ORDER BY featured DESC, date DESC"; ! $result = DB_query ("SELECT *,unix_timestamp(date) AS day " . $sql ! . " LIMIT $offset, $limit"); ! $nrows = DB_numRows($result); ! $data = DB_query("SELECT count(*) AS count " . $sql); $D = DB_fetchArray($data); $num_pages = ceil($D['count'] / $limit); *************** *** 242,256 **** for ($x = 1; $x <= $nrows; $x++) { $A = DB_fetchArray($result); ! if (SEC_hasAccess($A['owner_id'],$A['group_id'],$A['perm_owner'],$A['perm_group'],$A['perm_members'],$A['perm_anon']) > 0) { ! if ($A['featured'] == 1) { ! $feature = 'true'; ! } elseif (($x == 1) && ($_CONF['showfirstasfeatured'] == 1)) { ! $feature = 'true'; ! $A['featured'] = 1; ! } ! $display .= COM_article($A,'y'); } } ! // Print Google-like paging navigation if (empty($topic)) { --- 237,249 ---- for ($x = 1; $x <= $nrows; $x++) { $A = DB_fetchArray($result); ! if ($A['featured'] == 1) { ! $feature = 'true'; ! } elseif (($x == 1) && ($_CONF['showfirstasfeatured'] == 1)) { ! $feature = 'true'; ! $A['featured'] = 1; } + $display .= COM_article($A,'y'); } ! // Print Google-like paging navigation if (empty($topic)) { *************** *** 266,275 **** $display .= COM_startBlock($LANG05[1]) . $LANG05[2]; if (!empty($topic)) { ! $result = DB_query ("SELECT topic FROM {$_TABLES['topics']} WHERE tid='$topic'"); ! $A = DB_fetchArray ($result); ! if (!empty ($A['topic'])) { ! $topic = $A['topic']; ! } ! $display .= $LANG05[3]; } $display .= COM_endBlock(); --- 259,264 ---- $display .= COM_startBlock($LANG05[1]) . $LANG05[2]; if (!empty($topic)) { ! $topicname = DB_getItem ($_TABLES['topics'], 'topic', "tid='{$topic}'"); ! $display .= sprintf ($LANG05[3], $topicname); } $display .= COM_endBlock(); From geeklog-cvs-admin at lists.geeklog.net Thu May 15 15:09:39 2003 From: geeklog-cvs-admin at lists.geeklog.net (geeklog-cvs-admin at lists.geeklog.net) Date: Thu, 15 May 2003 14:09:39 -0500 Subject: [geeklog-cvs] geeklog-2/lib/MVCnPHP - New directory Message-ID: <200305151909.h4FJ9di08946@internal.geeklog.net> Update of /usr/cvs/geeklog/geeklog-2/lib/MVCnPHP In directory internal.geeklog.net:/tmp/cvs-serv8934/MVCnPHP Log Message: Directory /usr/cvs/geeklog/geeklog-2/lib/MVCnPHP added to the repository From geeklog-cvs-admin at lists.geeklog.net Thu May 15 15:10:23 2003 From: geeklog-cvs-admin at lists.geeklog.net (geeklog-cvs-admin at lists.geeklog.net) Date: Thu, 15 May 2003 14:10:23 -0500 Subject: [geeklog-cvs] geeklog-2/lib/MVCnPHP ArrayLoader.class.php,NONE,1.1 BaseCommand.class.php,NONE,1.1 BaseLoader.class.php,NONE,1.1 BaseView.class.php,NONE,1.1 CHANGELOG,NONE,1.1 CommandFactory.class.php,NONE,1.1 Constants.php,NONE,1.1 Controller.class.php,NONE,1.1 Form.class.php,NONE,1.1 LoaderFactory.class.php,NONE,1.1 MVC_Base.class.php,NONE,1.1 MVC_XMLParser.class.php,NONE,1.1 Mapping.class.php,NONE,1.1 QF_View.class.php,NONE,1.1 README.txt,NONE,1.1 Validator.class.php,NONE,1.1 ViewFactory.class.php,NONE,1.1 XMLLoader.class.php,NONE,1.1 Message-ID: <200305151910.h4FJANi09009@internal.geeklog.net> Update of /usr/cvs/geeklog/geeklog-2/lib/MVCnPHP In directory internal.geeklog.net:/tmp/cvs-serv8975 Added Files: ArrayLoader.class.php BaseCommand.class.php BaseLoader.class.php BaseView.class.php CHANGELOG CommandFactory.class.php Constants.php Controller.class.php Form.class.php LoaderFactory.class.php MVC_Base.class.php MVC_XMLParser.class.php Mapping.class.php QF_View.class.php README.txt Validator.class.php ViewFactory.class.php XMLLoader.class.php Log Message: Initial import of MVCnPHP into Geeklog 2 --- NEW FILE: ArrayLoader.class.php --- * @copyright Tony Bibbs 2003 * @package net.geeklog.mvc * @version $Id: ArrayLoader.class.php,v 1.1 2003/05/15 19:10:20 tony Exp $ * */ /** * Base Loader class which does most of the work */ require_once 'BaseLoader.class.php'; /** * This loader creates a mapping from an PHP array * * @author Tony Bibbs * @package net.geeklog.mvc * @see LoaderFactory * */ class ArrayLoader extends BaseLoader { /** * @access private * @var array */ var $_arrayData = null; /** * Gets config data for given object in the form of * a mapping object * * @author Tony Bibbs * @access public * @param string $name Name of object to get mapping for * @param string $viewsDir Directory where controllers views are stored * @param string $commandsDir DIrectory where controllers commands are stored * @param string $baseURL Base URL, all redirects are relative to this URL * @param array $arrayData Array of configuration data * @return object Mapping object * */ function &getMapping($name, $viewsDir, $commandsDir, $baseURL, $arrayData = '') { if (!is_array($arrayData) AND !is_array($this->_arrayData)) { return false; } if (empty($this->_arrayData)) { $this->_arrayData = $arrayData; } return parent::getMapping($name, $viewsDir, $commandsDir, $baseURL, $this->_arrayData); } } ?> --- NEW FILE: BaseCommand.class.php --- * @copyright Tony Bibbs 2003 * @package net.geeklog.mvc * @version $Id: BaseCommand.class.php,v 1.1 2003/05/15 19:10:20 tony Exp $ * */ /** * Abstract class to be extended by all commands * * @author Tony Bibbs * @package net.geeklog.mvc * */ class BaseCommand extends MVC_Base { /** * Constructor * * @author Tony Bibbs * @access public * */ function BaseCommand() { } /** * Executes this command * * @author Tony Bibbs * @access public * @return string Name of forward to send processing to * */ function execute() { } } ?> --- NEW FILE: BaseLoader.class.php --- * @copyright Tony Bibbs 2003 * @package net.geeklog.mvc * @version $Id: BaseLoader.class.php,v 1.1 2003/05/15 19:10:20 tony Exp $ * */ /** * Mapping class which holds all data mapped to a given * model or view */ require_once 'Mapping.class.php'; /** * This is an abstract loader class which provides * 90% of all functionality to the various loaders since * we assume all config data will eventually be turned into * a PHP array * * @author Tony Bibbs * @package net.geeklog.mvc * */ class BaseLoader { /** * Constructor * * @author Tony Bibbs * @access public * */ function BaseLoader() { } /** * Gets config data for given object in the form of * a mapping object * * @author Tony Bibbs * @access public * @param string $name Name of object to get mapping for * @param array $arrayData Array of configuration data * @return object Mapping object * */ function &getMapping($name, $viewsDir, $commandsDir, $baseURL, $arrayData = '') { $mapping = new Mapping(); if ($name == 'default') { $name = $this->_getDefaultMapping(); } if (!empty($this->_arrayData[MVC_VIEWS][$name])) { $mapping->setName($this->_arrayData[MVC_VIEWS][$name][MVC_NAME]); $mapping->setType('view'); $mapping->setTypePath($viewsDir); } else { $mapping->setName($this->_arrayData[MVC_MODELS][$name][MVC_NAME]); $mapping->setType('command'); $mapping->setTypePath($commandsDir); } $mapping->setBaseURL($baseURL); $mapping->setForwards($this->_getForwards($name)); return $mapping; } /** * If no object was specified in the request, this will return * the default mapping if one was specified in the configuration * * @author Tony Bibbs * @access private * @return array Mapping data for given model or view * */ function _getDefaultMapping() { foreach ($this->_arrayData[MVC_VIEWS] as $curView) { $curView = current($this->_arrayData[MVC_VIEWS]); if ($curView[MVC_DEFAULT] == true) { return key($this->_arrayData[MVC_VIEWS]); } next($this->_arrayData[MVC_VIEWS]); } } /** * Gets all forwards for a given object * * @author Tony Bibbs * @access private * @param string $name Name of model to get forwards for * @return array Forwards for given model * */ function _getForwards($name) { return $this->_arrayData[MVC_MODELS][$name][MVC_FORWARDS]; } } --- NEW FILE: BaseView.class.php --- * @copyright Tony Bibbs 2003 * @package net.geeklog.mvc * @version $Id: BaseView.class.php,v 1.1 2003/05/15 19:10:20 tony Exp $ * */ /** * Abstract class to be extended by all views * * @author Tony Bibbs * @package net.geeklog.mvc * */ class BaseView extends MVC_Base { /** * @access private * @var int */ var $_outputMethod = MVC_PRINT; /** * Returns if view should be printed * * View can be printed using echo or returned as a string. * This method is a tool used by the controller to determine * if it needs to return a string or not * * @author Tony Bibbs * @access public * @return boolean True if view is printed, otherwise false * */ function printView() { if ($this->_outputMethod == MVC_PRINT) { return true; } else { return false; } } /** * Sets views output method * * View can either be printed immediately using PHP's * echo command or the view can be returned as a string * * @author Tony Bibbs * @access public * @param int $method One of two constanst, _PRINT or _STRING * */ function setOutputMethod($method) { if ($method == MVC_PRINT) { $this->_outputMethod = MVC_PRINT; } else { $this->_outputMethod = MVC_STRING; } } /** * Renders a view in either printed HTML or * as an HTML string back to caller * * @author Tony Bibbs * @access public * @return string OPTIONAL: not always returned * */ function getView() { } } ?> --- NEW FILE: CHANGELOG --- $Id: CHANGELOG,v 1.1 2003/05/15 19:10:20 tony Exp $ MVCnPHP Change Log ------------------- - Added QF_View.class.php which adds support for PEAR::HTML_QuickForm. This class is a unique child of the view. MVCnPHP typically separates validation logic into a command whereas HTML_QuickForm couples both tasks. This class allows you to do both but, then, requires you to put all your views and commands in the same directory. (08 April 2003) - Fixed bug with QuickForm example that was caused because the Controller::ProcessRequest() method expects all commands. (02 May 2003) --- NEW FILE: CommandFactory.class.php --- * @copyright Tony Bibbs 2003 * @package net.geeklog.mvc * @version $Id: CommandFactory.class.php,v 1.1 2003/05/15 19:10:20 tony Exp $ * */ /** * This implements the factory design pattern and is * responsible for building command objects * * @author Tony Bibbs * @package net.geeklog.mvc * */ class CommandFactory { /** * Builds the requested command object * * @author Tony Bibbs * @access public * @param string $path Path to directory holding commands * @param string $name Name of command to create * @return object Command object * */ function &getCommand($path, $name) { if (empty($name)) { trigger_error('No command name specified in CommandFactory::getCommand'); exit; } $filename = $path . $name . '.class.php'; if (file_exists($filename)) { require_once($filename); return new $name(); } else { trigger_error('Bad set of parameters to CommandFactory::getCommand'); exit; } } } ?> --- NEW FILE: Constants.php --- * @copyright Tony Bibbs 2003 * @package net.geeklog.mvc * @version $Id: Constants.php,v 1.1 2003/05/15 19:10:20 tony Exp $ * */ // MVC configuration types define('MVC_XML', 'XMLLoader'); define('MVC_ARRAY', 'ArrayLoader'); // FORM attributes define('MVC_POST', 1); define('MVC_GET', 2); define('MVC_BOTH', 0); // Security constants define('MVC_TRUSTED', 1); define('MVC_UNTRUSTED', 0); // General configuration settings define('MVC_BASE_URL', 'baseurl'); define('MVC_BASE', 'dirbase'); define('MVC_DIRS', 'dirs'); // Mapping constants define('MVC_VIEWS', 'views'); define('MVC_MODELS', 'models'); define('MVC_FORWARDS', 'forwards'); define('MVC_NAME', 'name'); define('MVC_SECURE', 'secure'); define('MVC_DEFAULT', 'default'); define('MVC_TARGET', 'target'); define('MVC_TYPE', 'type'); define('MVC_MESSAGE', 'mvc_message'); define('MVC_ERRORS', 'mvc_errors'); define('MVC_PRINT', 1); define('MVC_STRING', 2); ?> --- NEW FILE: Controller.class.php --- * @copyright Tony Bibbs 2003 * @package net.geeklog.mvc * @version $Id: Controller.class.php,v 1.1 2003/05/15 19:10:20 tony Exp $ * */ /** * MVCnPHP constants */ require_once 'Constants.php'; /** * Base object for models, views and controllers */ require_once 'MVC_Base.class.php'; /** * Loader factory will create a configuration loader. * Right now we only support PHP arrays and XML files */ require_once 'LoaderFactory.class.php'; /** * Constants used within this MVC framework */ require_once 'Constants.php'; /** * The controller part of the MVC * * This class controls processing for the program * indiscriminately. The focus is always on the underlying * views or commands. This class allows you to store application * messages such as status messages (e.g. something was saved * successfully) or error messages from failed validation or * security reasons. By default these are stored in the $_SESSION * superglobal in $_SESSION['MVC_MESSAGE'] and $_SESSION['MVC_ERRORS'] * respectively (note: the later is an array). If your application is * not using PHP4 sessions you will want to follow the directions given * in the documentation for Controller::_clearMessages * * @author Tony Bibbs * @package net.geeklog.mvc * */ class Controller extends MVC_Base { /** * @access private * @var int */ var $_allowedFormMethod = null; /** * @access private * @var array */ var $_request = null; /** * @access private * @var string */ var $_object = null; /** * @access private * @var object */ var $_mapLoader = null; /** * @access private * @var object */ var $_mapping = null; /** * @access private * @var string */ var $_mvcBase = null; /** * @access private * @var string */ var $_viewDir = null; /** * @access private * @var string */ var $_commandDir = null; /** * @access private * @var string */ var $_baseURL = null; /** * @access private * @var int */ var $_configType = null; /** * @access private * @var array */ var $_configData = null; /** * Constructor * * Loads MVC configuration data and sets up data needed for * further processing * * @author Tony Bibbs * @access public * @param variant $configData Configuration data * @param string $configType Denotes type of config data structure, MVC_ARRAY or MVC_XML * @param string $allowedFormMethod Controller can accept MVC_GET, MVC_POST or MVC_BOTH * */ function Controller($configData, $configType = MVC_XML, $allowedFormMethod = MVC_BOTH) { $this->_clearMessages(); switch ($allowedFormMethod) { case MVC_GET: $this->_request = &$_GET; break; case MVC_POST: $this->_request = &$_POST; break; default: $this->_request = &$_REQUEST; } if (!empty($this->_request['cmd'])) { $this->_object = $this->_request['cmd']; } else { $this->_object = 'default'; } $this->_configType = $configType; $this->_configData = $configData; $this->_allowedFormMethod = $allowedFormMethod; } /** * Sets location of the base MVC package so other MVC classes can be * loaded at a later time. * * @author Tony Bibbs * @access public * @param string $path Path to MVC base dir, must end with trailing slash * @return boolean True if view path is set, otherwise false * */ function setMVCBase($path) { if (!is_dir($path)) { trigger_error('bad path in Controller::setMVCBase'); exit; } $this->_mvcBase = $path; return true; } /** * Sets location of views for this controller * * @author Tony Bibbs * @access public * @param string $path Path to view dir, must end with trailing slash * @return boolean True if view path is set, otherwise false * */ function setViewDir($path) { if (!is_dir($path)) { return false; } $this->_viewDir = $path; return true; } /** * Sets location of commands for this controller * * @author Tony Bibbs * @access public * @param string $path Path to command dir, must end with trailing slash * @return boolean True if view path is set, otherwise false * */ function setCommandDir($path) { if (!is_dir($path)) { return false; } $this->_commandDir = $path; return true; } /** * Sets base URL for this controller * * The base url allows all subsequent references to URL's to be relative * to the URL specified here * * @author Tony Bibbs * @access public * @param string $url Base URL * */ function setBaseURL($url) { $this->_baseURL = $url; } /** * Process a request (or forward) * * @author Tony Bibbs * @access public * @return string Optional, may return HTML string of view * */ function processRequest() { // Ensure user isn't submitted data via an illegal method $this->_checkMethod(); if (empty($this->_mapping)) { $this->_loadMapping($this->_configType, $this->_configData); } if ($this->_mapping->getType() == 'view') { require_once 'ViewFactory.class.php'; $view = &ViewFactory::getView($this->_mapping->getPath(), $this->_mapping->getName()); $retval = $view->getView(); if ($this->_isForward($retval)) { $this->_forwardControl($retval); } if (!$view->printView()) { return $retval; } } else { require_once 'CommandFactory.class.php'; $tmp = &CommandFactory::getCommand($this->_mapping->getPath(), $this->_mapping->getName()); $strForward = $tmp->execute(); // This IF is required to avoid errors using quickform if ($this->_isForward($strForward)) { $this->_forwardControl($strForward); } } } /** * Clears any existing errors or messages * * This method assumes the application is using PHP4 sessions * to store MVC errors and messages. If that is not the case, * the application should create a new class that extends this * controller and override this function to clear the messages * in the way desired. * * @author Tony Bibs * @access private * */ function _clearMessages() { unset($_SESSION[MVC_MESSAGE]); unset($_SESSION[MVC_ERRORS]); } /** * Ensures only supported methods are used * * @author Tony Bibbs * @access private * */ function _checkMethod() { $errors = Array(); switch ($this->_allowedFormMethod) { case MVC_GET: if (count($_POST) > 0) { trigger_error('POST method is not supported by this controller'); exit; } case MVC_POST: if (count($_GET) > 0) { trigger_error('GET method is not supported by this controller'); exit; } } } /** * Loads the mapping data for a model or view * * This will load only the mapping data needed by the * current object. * * @author Tony Bibbs * @access private * @param string $configType Dontes the type of config data structure * @param variant $configData this is the data or file pointer for config data * */ function _loadMapping($configType, $configData) { if (empty($this->_mvcBase)) { trigger_error('_mvcBase for Controller is empty in Controller::_loadMapping'); exit; } if (empty($this->_mapLoader)) { $this->_mapLoader = &LoaderFactory::getLoader($this->_mvcBase, $configType); } $this->_mapping = &$this->_mapLoader->getMapping($this->_object, $this->_viewDir, $this->_commandDir, $this->_baseURL, $this->_configData); } /** * Determines if string is a name of an existing forward. * * Because views can return the HTML string it won't be obvious * if the call to the view's getView() is a forward or actually * HTML. This function makes that determintation. * * @author Tony Bibbs * @access private * @param string $name Name of forward to look for * @return boolean True if forward is found, otherwise false * */ function _isForward($name) { if ($this->_mapping->getForward($name)) { return true; } else { return false; } } /** * Forwards control onto another command or view * * A model will typically try to forward control to a view * (less likely, but possible, another command) after processing. * This object handles that forwarding and can even handle forwarding * to a different URL if configured to do so. * * @author Tony Bibbs * @access private * @param string $name Name of next model or view to go to * */ function _forwardControl($name) { $forward = $this->_mapping->getForward($name); if ($forward[MVC_TYPE] == 'redirect') { $url = $this->_mapping->getBaseURL() . $forward[MVC_TARGET]; header('Location: ' . $url); } else { $this->_object = $forward[MVC_TARGET]; $this->_mapping = &$this->_mapLoader->getMapping($this->_object, $this->_viewDir, $this->_commandDir, $this->_baseURL); $this->processRequest(); } } } ?> --- NEW FILE: Form.class.php --- * @copyright Tony Bibbs 2003 * @package net.geeklog.mvc * @version $Id: Form.class.php,v 1.1 2003/05/15 19:10:20 tony Exp $ * */ /** * This is a basic form class that can aid in form validation and * manipulation. * * @author Tony Bibbs * @package net.geeklog.mvc * */ class Form { /** * @access private * @var array */ var $_values = null; /** * Constructor * * @author Tony Bibbs * @access public * @param array $formArray Array of form fieds (typical $_GET, $_POST or $_REQUEST) * */ function Form($formArray) { $this->_values = $formArray; } /** * Returns if the given variable name exists in form * * @author Tony Bibbs * @access public * @param string $varName Name of form variable * @return boolean True if found, otherwise false * */ function contains($varName) { return isset($this->_values[$varName]); } /** * Gets value for given variable name * * @author Tony Bibbs * @access public * @param string $varName Name of form variable to get value for * @return variant Value of form variable * */ function get($varName) { if (!$this->contains($varName)) { return null; } return $this->_values[$varName]; } /** * Deletes a form variable * * @author Tony Bibbs * @access public * @param string $varName Name of form variable to delete * */ function remove($varName) { if ($this->contains($varName)) { unset($this->_values[$varName]); } } /** * Sets a field to given value * * @author Tony Bibbs * @access public * @param string $varName Name of field to set * @param string $value Value to set field to * */ function set($varName, $value) { $this->_values[$varName] = $value; } /** * Returns value array * * @author Tony Bibbs * @access public * @return array Values array * */ function &getValues() { return $this->_values; } } ?> --- NEW FILE: LoaderFactory.class.php --- * @copyright Tony Bibbs 2003 * @package net.geeklog.mvc * @version $Id: LoaderFactory.class.php,v 1.1 2003/05/15 19:10:20 tony Exp $ * */ /** * Builds MVC Config Loaders * * I doubt much more besides arrays and XML files * will be used but just in case I used the factory * pattern in here to enable easily adding new configuration * data structures * * @author Tony Bibbs * @package net.geeklog.mvc * */ class LoaderFactory { /** * Builds requested MVC configuration loaders. * * Config loaders each represent one way of parsing * an MVC configuration data structure into the objects * needed by the controller. * * @author Tony Bibbs * @access public * @param string $path Path to base MVC directory * @param int $configType Constant, either MVC_XML or MVC_ARRAY * @return object MVC config loader * */ function &getLoader($path, $configType = MVC_XML) { if (empty($path)) { echo 'no MVC base dir specified in LoaderFactory::getLoader'; exit; } $filename = $path . $configType . '.class.php'; if (file_exists($filename)) { require_once $filename; return new $configType(); } else { return; } } } ?> --- NEW FILE: MVC_Base.class.php --- * @copyright Tony Bibbs 2003 * @package net.geeklog.mvc * @version $Id: MVC_Base.class.php,v 1.1 2003/05/15 19:10:20 tony Exp $ * */ /** * Abstract MVC Base class that provides one place * to add things like security to MVC objects if you * so choose. * * @author Tony Bibbs * @package net.geeklog.mvc * */ class MVC_Base { /** * Constructor * * @author Tony Bibbs * @access public * */ function MVC_Base() { } } ?> --- NEW FILE: MVC_XMLParser.class.php --- * @copyright Tony Bibbs 2003 * @package net.geeklog.mvc * @version $Id: MVC_XMLParser.class.php,v 1.1 2003/05/15 19:10:20 tony Exp $ * */ /** * This class parses MVC configuration files * * NOTE: for you Java/Struts lovers out there, this is in now * way deemed consistent with their implementation. * * @author Tony Bibbs * @package net.geeklog.mvc * */ class MVC_XMLParser { /** * @access private * @var array */ var $_elements = null; /** * @access private * @var array */ var $_attributes = null; /** * @access private * @var array */ var $_values = null; /** * @access private * @var int */ var $_curElement = null; /** * @access private * @var int */ var $_level = 0; /** * Constructor * * Initializes object properties and, if the XML has been supplied * it will parse it immediately instead of waiting for an explicit * call to parseXML * * @author Tony Bibbs * @access public * @param string $xmlString XML to parse * */ function MVC_XMLParser($xmlString = '') { $this->_elements = Array(); $this->_attributes = Array(); $this->_values = Array(); if (!empty($xmlString)) { $this->parseXML($xmlString); } } /** * Parses the given MVC XML file * * @author Tony Bibbs * @access public * @param string $xmlString XML to parse * */ function parseXML($xmlString) { // Create Expat parser object $this->_parser = xml_parser_create(); // Lets expat know this class will handle the parsing xml_set_object($this->_parser, &$this); xml_set_element_handler($this->_parser, '_handleStartElement', '_handleEndElement'); xml_set_character_data_handler($this->_parser, '_handleData'); // Actually parse the XML now. if (!xml_parse($this->_parser, $xmlString)) { trigger_error(sprintf("XML error: %s at line %d", xml_error_string(xml_get_error_code($this->_parser)), xml_get_current_line_number($this->_parser))); exit; } xml_parser_free($this->_parser); } /** * Called by expat functions to handle a start tag in XML stream * * This grabs a reference to the parent tag and any pertinent data * such as the tag name and any associate XML attributes * * @author Tony Bibbs * @access private * @param object $parser Reference to Expat parser object * @param string $name Name of XML tag that was encountered * @param array $attributes Any associated XML attributes * */ function _handleStartElement($parser, $name, $attributes) { // This tidbit of code grabs the index into _elements for // the parent and sets that as an attribute if ($this->_level > 1) { $attributes['PARENT'] = $this->_curElement; } else { $attributes['PARENT'] = $this->_level; } $this->_level++; $this->_elements[] = $name; $this->_curElement = count($this->_elements) - 1; $this->_attributes[$this->_curElement] = $attributes; } /** * Called by expat functions to handle an end tag in XML stream * * This adjusts some pointers that allow us to get handles to parent * XML tags * * @author Tony Bibbs * @access private * */ function _handleEndElement() { $this->_level--; $this->_curElement--; } /** * Called by expat functions to handle the data taken * from XML stream * * @author Tony Bibbs * @access private * @param object $parser Expat parser object * @param string $data Data to handle * */ function _handleData($parser, $data) { // NOTE: the use of trim() here is necessary as // empty() will not produce desired results if (empty($this->_curElement) OR !trim($data)) return; $this->_values[$this->_curElement] = $data; } /** * Gets the XML tag represented by given index * * @author TonyBibbs * @access public * @return string XML Tag name * */ function getTag($index) { return $this->_elements[$index]; } /** * Gets all indexes for _elements array * * @author Tony Bibbs * @access public * @return array Keys for _elements array * */ function getElementIndexes() { return array_keys($this->_elements); } /** * Gets an attribute for given index * * @author Tony Bibbs * @access public * @param int $index Index representing an XML tag in _elements array * @param string $attribute Name of attribute to get * @return string Requested attribute * */ function getAttribute($index, $attribute) { return $this->_attributes[$index][strtoupper($attribute)]; } /** * Returns value for given index * * @author Tony Bibbs * @access public * @param int $index Index into _elements array * @return string Value for given index * */ function getValue($index) { return $this->_values[$index]; } } ?> --- NEW FILE: Mapping.class.php --- * @copyright Tony Bibbs 2003 * @package net.geeklog.mvc * @version $Id: Mapping.class.php,v 1.1 2003/05/15 19:10:20 tony Exp $ * */ /** * This is the mapping object. This holds all pertinent mapping data for * a specific model or view. NOTE: not all available mappings are loaded * for each request, only those needed for the current request. * * @author Tony Bibbs * @package net.geeklog.mvc * */ class Mapping { /** * @access private * @var string */ var $_name = null; /** * @access private * @var string */ var $_type = null; /** * @access private * @var string */ var $_typePath = null; /** * @access private * @var string */ var $_forwards = null; /** * @access private * @var string */ var $_baseURL = null; /** * Sets the base URL for any redirects * * @author Tony Bibbs * @access public * @param string $url Base url for all redirects * */ function setBaseURL($url) { $this->_baseURL = $url; } /** * Gets the base URL for any redirects * Any forwards to other URL's must be relative to the * base URL provided * * @author Tony Bibbs * @access public * @return string Base url * */ function getBaseURL() { return $this->_baseURL; } /** * Sets the name for the model or view this mapping * belongs to. * * @author Tony Bibbs * @access public * @param string $name Name of model or view * */ function setName($name) { $this->_name = $name; } /** * Gets the name for the model or view this mapping * belongs to. * * @author Tony Bibbs * @access public * @return string Name of the model or view * */ function getName() { return $this->_name; } /** * Sets the type of object this mapping belongs to (model or view) * * @author Tony Bibbs * @access public * @param string $type Type of object (model or view) * */ function setType($type) { $this->_type = $type; } /** * Gets the type of object this mapping belongs to (model or view) * * @author Tony Bibbs * @access public * @return string Type of object (model or view) * */ function getType() { return $this->_type; } /** * Sets all forwards associated with this mapping. Note * that you won't have forwards for any views * * @author Tony Bibbs * @access public * @param array $forwards Array of forwards tied to this object * */ function setForwards($forwards) { $this->_forwards = $forwards; } /** * Retrieves the requested forward * * @author Tony Bibbs * @access public * @param string $name Name of forward to get * @return array|boolean The forward data or false if not found * */ function getForward($name) { if (!empty($this->_forwards[$name])) { return $this->_forwards[$name]; } else { return false; } } /** * Sets the path where the models or views can be found * * @author Tony Bibbs * @access public * @param string $path Absolute path ending with trailing slash * */ function setTypePath($path) { $this->_typePath = $path; } /** * Gets the absolute path where the code for this model or view this * mapping belongs to can be found * * @author Tony Bibbs * @access public * @return string Path to model or view directory * */ function getPath() { return $this->_typePath; } } ?> --- NEW FILE: QF_View.class.php --- * @copyright Tony Bibbs 2003 * @package net.geeklog.mvc * @version $Id: QF_View.class.php,v 1.1 2003/05/15 19:10:20 tony Exp $ * */ /** * Abstract view class */ require 'BaseView.class.php'; /** * PEAR::HTML_QuickForm */ require 'HTML/QuickForm.php'; /** * This view uses PEAR::HTML_QuickForm to show and validate * HTML forms. * * NOTE: if you use this class you will need to set * Controller::setViewDir() and Controller::setCommandDir() * to the same directory lest you want to duplicate code. Also, * it goes without saying you'll need to make sure you have installed * PEAR::HTML_QuickForm prior to using this. * * @author Tony Bibbs * @package net.geeklog.mvc * */ class QF_View extends BaseView { /** * @access private * @var HTML_QuickForm */ var $_QForm = null; /** * Constructor for QF_View class * * Instantiates an HTML_QuickForm object * * @author Tony Bibbs * @access public * */ function QF_View() { $this->_QForm = new HTML_QuickForm(); } /** * This is a way to get around the fact you don't get to send arguments * to HTML_QuickForm's constructor. You will probably call this from * getView() * * @author Tony Bibbs * @access private * */ function _setQFormAttributes($formName='', $method='post', $action='') { $this->_QForm->HTML_QuickForm($formName, $method, $action); } /** * This method is where you would put the code to have HTML_QuickForm display * the form * * @author Tony Bibbs * @access public * */ function getView() { } /** * This method fools MVC into thinking this view is also able to validate * * For PEAR::HTML_QuickForm, the display and valdation is tightly coupled so * both sets of code need to be put in the getView method. This method simply * fools the controller into calling getView for validation. * * @author Tony Bibbs * @access public * */ function execute() { $this->getView(); } } --- NEW FILE: README.txt --- $Id: README.txt,v 1.1 2003/05/15 19:10:20 tony Exp $ MVCnPHP README -------------- Contents -------- INTRODUCTION TO MVC MVC FEATURES MVC DRAWBACKS ORGANIZATION OF MVCnPHP INSTALLATION REQUIREMENTS INSTALLING THE CONTACT MANAGER EXAMPLE INSTALLING THE QUCKFORM EXAMPLE INSTALLING FOR GENERAL USE TODO KNOWN BUGS SUPPORT CREDITS INTRODUCTION TO MVC -------------------- MVCnPHP stands for the model-view-controller in PHP. The model-view-controller design pattern is a popular pattern used primarily with Java developers doing servlet programming. PHP is maturing as a full-fledged, object oriented, programming language and it can benefit by many of the software engineering principles developed by more traditional OO languages. The MVC design pattern takes the common principle of separating business logic (models) from the user interfaces (views) a step further by introducing the concept of a controller which is responsible transferring execution to the models and views. What you end up with is smaller, more manageable code and, typically, more efficient use of server resources because with the MVC only the code needed to process a given request gets loaded. This introduction doesn't begin adequately highlight all the benefits of the MVC design pattern in PHP. It is strongly recommended that you spend a little time on Google learning more about the MVC as well as many of the other design patterns out there. With that said, sometimes an example is better than words. Within this package is included a simplistic contact manager that uses most of the features of this MVC package. NOTE: this is NOT an attempt to reimplement the MVC provided by Struts. If you are a Java purist and insist on a 100% Struts compatible version you may feel welcome to rework what I have here OR check out the Phrame project at http://phrame.itsd.ttu.edu/ MVC FEATURES ------------ Obviously using a framework package like MVCnPHP you would expect to see the benefits before you invest. Here is a run down of the benefits of implementing MVC in your applications: - The MVC is a solution to the classic problem of separating the user interface, business logic and related data. - Render views (user interfaces) via a variety of technologies like XHTML, XML/XSL, WML, Web services, or any other 3rd party technology (e.g. PEAR::HTML_QuickForm). - Have multiple views that rely upon a single model. Thus your HTML and WML views can call on the same underlying business logic for processing. - Ability to switch backend DBMS with little effort (e.g. MySQL -> PostgreSQL) - Code ends up being in smaller, more manageable files. MVC DRAWBACKS -------------- In an effort to show two sides of the MVC fence here are a few drawbacks: - MVC implementations time a fair amount of time to learn how to use them. - Debugging between models and veiws can be more difficult - Because MVC breaks tasks down to atomic parts, you end up with a lot of relatively small files you have to manage. - Because of the associated ramp-up, MVC in smaller applications may not make much sense. MVC RESOURCES ------------- You are encouraged to learn as much about the MVC design pattern as possible. Below are a few sites related to the MVC pattern you may find useful. Of course, spend time doing a few Google searches if you desire more diverse information: - http://java.sun.com/blueprints/guidelines/designing_enterprise_applications_2e/web-tier/web-tier5.html - http://phrame.itsd.ttu.edu/ - http://ootips.org/mvc-pattern.html - http://www.phppatterns.com/index.php/article/articleview/19/1/1/ - http://www.google.com and http://groups.google.com for more information ORGANIZATION OF MVCnPHP ------------------------- MVCnPHP (holds base MVCnPHP code files) /contactmanager (folder for sample application) /commands (holds commands used in contact manager application) /views (holds views used in contact manager application) /quickform (folder for quick form example) /views (holds an example view that uses PEAR::HTML_QuickForm) /docs (phpDocumentor documentation) INSTALLATION ------------- REQUIREMENTS ------------- 1) PHP with PEAR::DB (Only needed if you want to run the contact manager application) 2) MySQL 3.23.x or better (Only needed if you want to run the contact manager application) 3) PEAR::HTML_QuickForm (Only needed if you require QuickForm integration INSTALLING THE CONTACT MANAGER EXAMPLE --------------------------------------- It is strongly recommended that you install the example before you begin using this MVC package in any other programs. Doing so will let you see this package in action. You are encouraged to dig into the code and learn how this package works and how you might leverage it to make your PHP applications better. 1) Uncompress the tarball *inside* your webtree 2) Create a new MySQL database name something logical like 'contactmanager' 3) import the mysql.sql file into your new database 3) Edit /path/to/MVC/contactmanager/config.php according to the comments 4) Point your browser to the location of the index.php page. NOTE: this application is only a sample and is in no way meant for real world use. It is merely meant to show you that MVCnPHP works and give you a taste at how you might you it in your PHP applications. INSTALLING THE QUCKFORM EXAMPLE ------------------------------- PEAR::HTML_QuickForm is a PEAR package that provides object oriented methods for creating HTML forms and for doing data validation. This example is provided to prove that MVCnPHP can be easily extended to use other packages for the creation of views. Furthermore, MVCnPHP includes QF_View.class.php as part of the base distribution so that you could begin using HTML QuickForm right out-of-the-box. INSTALLATION FOR GENERAL USE ---------------------------- This installation procedure assumes you have already test drove the sample contactmanager application and that you want to use this MVC framework in you PHP application. 1) Uncompress the tarball preferrably to a folder outside of your webtree but accessible to your web server. 2) It is likely you will have quite a few different controllers within your application one for each functional area of your application. Each controller will require it's own configuration settings. 3) ...coming soon TODO ---- 1) Fill in holes in documentation 2) Remove dependence on $_SESSION superglobal since not all application may use it. KNOWN BUGS ---------- There are currently no known bugs for MVCnPHP. If you feel you have found a bug please see the SUPPORT section. SUPPORT ------- This package is considered a release condidate and is unsupported. Once it is deemed stable we will release a supported package. Until that time, send any bugs, comments or questions to Tony Bibbs, tony at geeklog.net. CREDITS ------- This MVC framework was inspired by the great work done on the Phrame Project, http://phrame.itsd.ttu.edu/. Many thanks is owed to Arnold Cano for managing that project and a special shout-out to Jason Sweat who is a regular contributor to Phrame. At the time of this writing no decision on the future of this project and Phrame has been decided. I am in constant communication with the Phrame developers hoping we can combine what I have built here into some of the Phrame principles that were omitted in this package. By doing so I hope to end up with *the* definitive PHP-MVC package and, at that time, we would look at submitting this framework to PEAR. --- NEW FILE: Validator.class.php --- * @copyright Tony Bibbs 2003 * @package net.geeklog.mvc * @version $Id: Validator.class.php,v 1.1 2003/05/15 19:10:20 tony Exp $ * */ /** * MVC base command object */ require_once dirname(__FILE__) . '/BaseCommand.class.php'; /** * MVC form object */ require_once dirname(__FILE__) . '/Form.class.php'; /** * This is a validator class meant to ease the tasks * often done by validation logic * * @author Tony Bibbs * @package net.geeklog.mvc * */ class Validator extends BaseCommand { /** * @access private * @var object */ var $_form = null; /** * Constructor * * Initializes form object * * @author Tony Bibbs * @access public * */ function Validator() { $this->_form = new Form($_REQUEST); } /** * Determines if the submitted form has a value for a given * variable name * * This is a simple pass thru to the form object * * @author Tony Bibbs * @access public * @param string $varName Name of form variable * @return boolean True if found, otherwise false * */ function contains($varName) { return $this->_form->contains($varName); } /** * Gets value for given variable name * * This is a simple pass thru to the form object * * @author Tony Bibbs * @access public * @param string $varName Name of form variable to get value for * @return variant Value of form variable * */ function get($varName) { return $this->_form->get($varName); } /** * Deletes a form variable * * This is a simple pass thru to the form object * * @author Tony Bibbs * @access public * @param string $varName Name of form variable to delete * */ function remove($varName) { $this->_form->remove($varName); } /** * Sets a field to given value * * This is a simple pass thru to the form object * * @author Tony Bibbs * @access public * @param string $varName Name of field to set * @param string $value Value to set field to * */ function set($varName, $value) { $this->_form->set($varName, $value); } /** * Returns value array * * This is a simple pass thru to the form object * * @author Tony Bibbs * @access public * @return array Values array * */ function &getValues() { return $this->_form->getValues(); } } ?> --- NEW FILE: ViewFactory.class.php --- * @copyright Tony Bibbs 2003 * @package net.geeklog.mvc * @version $Id: ViewFactory.class.php,v 1.1 2003/05/15 19:10:20 tony Exp $ * */ /** * This implements the factory design pattern and is * responsible for building view objects * * @author Tony Bibbs * @package net.geeklog.mvc * */ class ViewFactory { /** * Builds the requested view object * * @author Tony Bibbs * @access public * @param string $path Path to directory holding views * @param string $name Name of view to create * @return object viewobject * */ function &getView($path, $name) { $filename = $path . $name . '.class.php'; if (file_exists($filename)) { require_once($filename); return new $name(); } else { return; } } } ?> --- NEW FILE: XMLLoader.class.php --- * @copyright Tony Bibbs 2003 * @package net.geeklog.mvc * @version $Id: XMLLoader.class.php,v 1.1 2003/05/15 19:10:20 tony Exp $ * */ /** * Base Loader class which does most of the work */ require_once 'BaseLoader.class.php'; /** * MVC XML parser */ require_once 'MVC_XMLParser.class.php'; /** * This loader creates a mapping from an XML file * * @author Tony Bibbs * @package net.geeklog.mvc * */ class XMLLoader extends BaseLoader { /** * @access private * @var array */ var $_arrayData = null; /** * Gets config data for given object in the form of * a mapping object * * @author Tony Bibbs * @access public * @param string $name Name of object to get mapping for * @param array $arrayData Array of configuration data * @return object Mapping object * */ function &getMapping($name, $viewsDir, $commandsDir, $baseURL, $arrayData = '') { if (!file_exists($arrayData) AND !is_array($this->_arrayData)) { return false; } if (empty($this->_arrayData)) { $xmlData = file_get_contents($arrayData); $this->_arrayData = $this->_XMLToArray($xmlData); } return parent::getMapping($name, $viewsDir, $commandsDir, $baseURL, $this->_arrayData); } /** * Parses XML string into loader's expected array format * * @author Tony Bibbs * @access private * @param string $xmlData XML to be parsed * */ function _XMLToArray($xmlData) { $parser = new MVC_XMLParser($xmlData); $elements = $parser->getElementIndexes(); $configData = Array(); foreach ($elements as $curIndex) { switch ($parser->getTag($curIndex)) { case 'VIEW': $view = $parser->getAttribute($curIndex, 'id'); $default = $parser->getAttribute($curIndex, 'default'); $configData[MVC_VIEWS][$view][MVC_NAME] = $parser->getAttribute($curIndex, 'name'); if ($default) { $configData[MVC_VIEWS][$view][MVC_DEFAULT] = true; } break; case 'MODEL': $model = $parser->getAttribute($curIndex, 'id'); $default = $parser->getAttribute($curIndex, 'default'); $configData[MVC_MODELS][$model][MVC_NAME] = $parser->getAttribute($curIndex, 'name'); if ($default) { $configData[MVC_MODELS][$model][MVC_DEFAULT] = true; } break; case 'FORWARD': $name = $parser->getAttribute($curIndex, 'id'); $parentTag = $parser->getTag($parser->getAttribute($curIndex, 'parent')); $parentIDAttr = $parser->getAttribute($parser->getAttribute($curIndex, 'parent'), 'id'); if ($parentTag == 'VIEW') { $configData[MVC_VIEWS][$parentIDAttr][MVC_FORWARDS][$name][MVC_TARGET] = $parser->getValue($curIndex); $configData[MVC_VIEWS][$parentIDAttr][MVC_FORWARDS][$name][MVC_TYPE] = $parser->getAttribute($curIndex, 'type'); } else { if ($parentTag == 'MODEL') { $configData[MVC_MODELS][$parentIDAttr][MVC_FORWARDS][$name][MVC_TARGET] = $parser->getValue($curIndex); $configData[MVC_MODELS][$parentIDAttr][MVC_FORWARDS][$name][MVC_TYPE] = $parser->getAttribute($curIndex, 'type'); } else { trigger_error('Hit unexpected XML tag in XMLLoader::_XMLToArray'); exit; } } break; default: } } return $configData; } } ?> From geeklog-cvs-admin at lists.geeklog.net Fri May 16 17:16:57 2003 From: geeklog-cvs-admin at lists.geeklog.net (geeklog-cvs-admin at lists.geeklog.net) Date: Fri, 16 May 2003 16:16:57 -0500 Subject: [geeklog-cvs] geeklog-2/lib/A_and_A/client XMLInvoker.class.php,NONE,1.1 Message-ID: <200305162116.h4GLGvi02610@internal.geeklog.net> Update of /usr/cvs/geeklog/geeklog-2/lib/A_and_A/client In directory internal.geeklog.net:/tmp/cvs-serv2598 Added Files: XMLInvoker.class.php Log Message: Initial release of the XML Invoker strategy. This is the bulk of the code that use to be in AAServiceInterface.class.php. That class is being completely refactored to allow for other methods of talking to the A&A server. --- NEW FILE: XMLInvoker.class.php --- * @package net.geeklog.enterprise.aa.client * */ class XMLInvoker extends Invoker { var $_server = null; var $_port = null; var $_path = null; /** * Constructor * * Sets up the A&A server properties * */ function XMLInvoker($aaServer, $aaPort, $aaPath) { if (emtpy($aaServer) OR empty($aaPort) OR empty($aaPath)) { trigger_error('Missing paramater to XMLInvoker::XMLInvoker()', E_USER_ERROR); } $this->_server = $aaServer; $this->_port = $aaPort; $this->_path = $aaPath; } /** * Authenticates a user to an application * * This method authenticates the userId and password for the specified * application. It returns an AAUser object which holds authorization * privieges for that user and any exeptions that may have occured * during authentication * * @author Tony Bibbs * @param string $appId Application to authenticate to * @param string $userId User to authenticate * @param string $password Password to authenticate with * @return AAUser Object containing a list of authorization levels * */ function &authenticate($appId, $userName, $password) { // Build and send XML request $requestXML = AAServiceInterface::_buildAuthenticateRequest($appId, $userName, $password); $responseXML = AAServiceInterface::_request($aaServer,'POST',$aaPath,$requestXML,$aaPort); $user = &AAServiceInterface::_handleAuthenticateResponse($responseXML, $aaServer, $aaPort); if (get_class($user) == 'aaexception') { // Doing this just to make it obvious that we got an exception, not a valid user object $exception = &$user; // Need to log this problem at some point, until then just return false return false; } $user->setAppId($appId); $user->setUserName($userName); $user->setPassword($password); return $user; } /** * Changes a password for a user * * This method changes the password for the given userId, password and * application ID combination. * * @author Tony Bibbs * @param string $appId Application to change password for * @param string $userId User to change password for * @param string $password Current password * @param string $newPassword New password * @return boolean True if change worked, otherwise false * */ function changePassword($appId, $userName, $password, $newPassword) { $requestXML = AAServiceInterface::_buildChangePasswordRequest($appId, $userName, $password, $newPassword); $responseXML = AAServiceInterface::_request($aaServer,'POST','/~tony/server/A_and_A/',$requestXML,$aaPort); $error = AAServiceInterface::_handleResponse($responseXML); if ($error) { return false; } return true; } /** * Allows admin to change a user's password * * This method allows an admin user ot change the password of a user to a * particular value. * * @author Tony Bibbs * @access public * @param string $appId Application to change password for * @param string $adminUserId User to change password for * @param string $adminPassword Current password * @param string $userId User to change password for * @param string $newPassword New password * */ function changePasswordByAdmin($appId, $adminUserName, $adminPassword, $userName, $newPassword) { $requestXML = AAServiceInterface::_buildChangePasswordByAdminRequest($appId, $adminUserName, $adminPassword, $userName, $newPassword); $responseXML = AAServiceInterface::_request($aaServer,'POST','/~tony/server/A_and_A/',$requestXML,$aaPort); $error = AAServiceInterface::_handleResponse($responseXML); if ($error) { return false; } return true; } function resetPassword($appId, $adminUserName, $adminPassword, $userName) { $requestXML = AAServiceInterface::_buildResetPasswordRequest($appId, $adminUserName, $adminPassword, $userName); $responseXML = AAServiceInterface::_request($aaServer, 'POST', '/~tony/server/A_and_A/', $requestXML, $aaPort); $newPassword = AAServiceInterface::_handleResetPasswordResponse($responseXML); if (get_class($newPassword) == 'aaexception') { return false; } return $newPassword; } /** * Gets application priveliges for specified user * * This method retrieves the privilges of the specified user * * @param string $appId Application to get privilegs for * @param string $adminUserId Admin making the request * @param string $adminPassword Admin's password * @param string $userId User to get privileges for * @return AAPrivilegeInterface Object holding the user's privileges * */ function getUserPrivileges($appId, $adminUserId, $adminPassword, $userIdcool) { $requestXML = AAServiceInterface::_buildGetUserPrivilegesRequest($appId, $adminUserId, $adminPassword, $userId); $responseXML = AAServiceInterface::_request($aaServer, 'POST', '/entaaa/', $requestXML, $aaPort); $privArray= AAServiceInterface::_handleGetUserPrivilegesResponse($responseXML); if (get_class($privArray) == 'aaexception') { return false; } return $privArray; } /** * Sets the privileges for a given user and application * * @param string $appId App to set privileges for * @param string $adminUserId Admin making the request * @param string $adminPassword Admin's password * @param string $userId User to set privileges for * @param AAPrivilege[] $privileges Privileges to give to the user * */ function setUserPrivileges($appId, $adminUserId, $adminPassword, $userId, $privArray) { $requestXML = AAServiceInterface::_buildSetUserPrivilegesRequest($appId, $adminUserId, $adminPassword, $userId, $privArray); $responseXML = AAServiceInterface::_request($aaServer, 'POST', '/~tony/server/A_and_A/', $requestXML, $aaPort); $error = AAServiceInterface::_handleResponse($responseXML); if ($error) { return false; } return true; } /** * Lists all available privileges for a given application * * @param string $appId App to set privileges for * @param string $adminUserId Admin making the request * @param string $adminPassword Admin's password * @return AAPrivilegeInterface Complete list of privileges * */ function listAppPrivileges($aaServer, $appId, $adminUserName, $adminPassword, $aaPort=80) { $requestXML = AAServiceInterface::_buildListAppPrivilegesRequest($appId, $adminUserName, $adminPassword); $responseXML = AAServiceInterface::_request($aaServer, 'POST', '/~tony/server/A_and_A/', $requestXML, $aaPort); $privArray = AAServiceInterface::_handleListAppPrivilegesResponse($responseXML); if (get_class($privArray) == 'aaexception') { return false; } return $privArray; } function listAppGroups($appId, $adminUserName, $adminPassword) { $requestXML = AAServiceInterface::_buildListAppGroupsRequest($appId, $adminUserName, $adminPassword); $responseXML = AAServiceInterface::_request($aaServer, 'POST', '/~tony/server/A_and_A/', $requestXML, $aaPort); $groupArray = AAServiceInterface::_handleListAppGroupsResponse($responseXML); if (get_class($groupArray) == 'aaexception') { return false; } return $groupArray; } // Private Methods /** * Makes HTTP resquests and returns the results. Code take from * http://dodds.net/~cardinal/sentohost.txt * * Examples: $this->_request('localhost','post','/search','q=php_imlib'); * * @access private * @param string $host Host to make request to * @param string $method Method of request (POST or GET) * @param string $data * @param integer $port Port to connect to * @param string $useragent * @return string Response from the request * */ function _request($host, $method, $path, $data, $port=80, $useragent=0) { // The following two lines are for testing only. This will test all methods against // a mock server. The mock server makes no attempts to validate the incoming // XML nor use any real provider. It simply prints a valid response for the // method called. It is meant for regressing testing the client separate from // the server. //$host = 'localhost'; //$path = '/A_and_A/client/testscripts/mockserver.php'; //print "host: $host, method = $method, path = $path, port = $port"; //exit; // We are doing a form post and this variable is always expected $data = 'xmlInParam=' . $data; // Xerces can't seem to handle any sort of whitespace $data = str_replace("|",'',$data); $data = str_replace("\n",'',$data); $data = str_replace(' ','',$data); $data = str_replace('> <','><',$data); $data = stripslashes($data); // Supply a default method of GET if the one passed was empty if (empty($method)) { $method = 'GET'; } // Open the socket $method = strtoupper($method); $fp = fsockopen($host,$port); if (!$fp) { print 'error connect to A&A server in _request'; exit; } if ($method == 'GET') { $path .= '?' . $data; } // Post the request fputs($fp, "$method $path HTTP/1.1\n"); fputs($fp, "Host: $host\n"); fputs($fp, "Content-type: application/x-www-form-urlencoded\n"); fputs($fp, "Content-length: " . strlen($data) . "\n"); if ($useragent) { fputs($fp, "User-Agent: MSIE\n"); } fputs($fp, "Connection: close\n\n"); if ($method == 'POST') { fputs($fp, $data); } $response = ''; // Get the response while (!feof($fp)) { $response .= fgets($fp,128); } fclose($fp); // Since we are reading from the socket let's get rid of any header // info $startPos = strpos($response,'<'); $endPos = strrpos($response,'>') + 1; $length = ($endPos - $startPos) + 1; $response = substr($response, $startPos, $length); // Now we have just the XML return $response; } /** * Builds an XML request string for the A&A service * * @access private * @param string $host Hostname or IP for A&A Server * @param string $appId ID of application making the request * @param string $userID ID of user to authenticate * @param string $password Password to use * @return string XML request is outputed. * */ function _buildAuthenticateRequest($appId, $userId, $password) { $tree = new XML_Tree; $root = &$tree->addRoot(AA_SERVICE_TAG); $authNode = &$root->addChild('Authenticate'); $appIDNode = &$authNode->addChild(APPLICATION_ID_TAG,'',array('value'=>"$appId")); $userIDNode = &$authNode->addChild(USER_NAME_TAG,'',array('value'=>"$userId")); $passwordNode = &$authNode->addChild(PASSWORD_TAG,'',array('value'=>"$password")); return $tree->get(); } /** * Parses a XML response from the authenticate service method* and builds * a user object * * @param string $responseXML XML returned from authenticate() * @return AAUser User object * */ function &_handleAuthenticateResponse($responseXML, $aaServer, $aaPort='80') { $p = xml_parser_create(); xml_parse_into_struct($p,$responseXML,$vals,$index) or die(xml_error_string(xml_get_error_code($p))); xml_parser_free($p); $error = AAServiceInterface::_exceptionCheck($index, $vals); if ($error) { return $error; } $user = new AAUser($aaServer, $aaPort); $user->setEmpId($vals[$index['EMPID'][0]]); $groupIndexes = $index['GROUP']; $privIndexes = $index['PRIVILEGE']; // Get all the groups foreach ($groupIndexes as $curIndex) { $curGroup = $vals[$curIndex]; $user->_groups[] = &AAServiceInterface::_buildGroup($curGroup); } // Get all the privileges foreach ($privIndexes as $curIndex) { $curPriv = $vals[$curIndex]; $user->_privileges[] = &AAServiceInterface::_buildPrivilege($curPriv); } return $user; } /** * Generic response handler. * * This handles all responses from A&A server. This is called by all commands * except for authenticate and privilege-related calls. * * @access private * @param string $responseXML XML returned from changePasswordByAdmin() * */ function _handleResponse($responseXML) { $p = xml_parser_create(); xml_parse_into_struct($p,$responseXML,$vals,$index) or die(xml_error_string(xml_get_error_code($p))); xml_parser_free($p); $error = AAServiceInterface::_exceptionCheck($index, $vals); if ($error) { return $error; } return false; } /** * Builds XML request string for A&A Service to change a user's password * * @access private * @param string $appId Applicatoin ID * @param string $userId User ID * @param string $oldPassword Old password * @param string $newPassword NewPassword * @return string XML request * */ function _buildChangePasswordRequest($appId, $userId, $oldPassword, $newPassword) { $tree = new XML_Tree; $root = &$tree->addRoot(AA_SERVICE_TAG); $changePasswordNode = &$root->addChild('ChangePassword'); $tmpNode = &$changePasswordNode->addChild(APPLICATION_ID_TAG, '', array('value'=>$appId)); $tmpNode = &$changePasswordNode->addChild(USER_NAME_TAG, '', array('value'=>$userId)); $tmpNode = &$changePasswordNode->addChild(OLD_PASSWORD_TAG, '', array('value'=>"$oldPassword")); $tmpNode = &$changePasswordNode->addChild(NEW_PASSWORD_TAG, '', array('value'=>"$newPassword")); return $tree->get(); } /** * Builds an XML request for A&A Service to call changePasswordByAdmin on server * * @access private * @param string $appId Application ID * @param string $userId User ID * @param string $password Old password * @param string $newPassword New Password * @return string XML request * */ function _buildChangePasswordByAdminRequest($appId, $adminUserId, $adminPassword, $userId, $newPassword) { $tree = new XML_Tree; $root = &$tree->addRoot(AA_SERVICE_TAG); $changePassNode = &$root->addChild('ChangePasswordByAdmin'); $tmpNode = &$changePassNode->addChild(APPLICATION_ID_TAG, '', array('value'=>"$appId")); $tmpNode = &$changePassNode->addChild(ADMIN_USER_NAME_TAG, '', array('value'=>"$adminUserId")); $tmpNode = &$changePassNode->addChild(ADMIN_PASSWORD_TAG, '', array('value'=>"$adminPassword")); $tmpNode = &$changePassNode->addChild(USER_NAME_TAG, '', array('value'=>"$userId")); $tmpNode = &$changePassNode->addChild(NEW_PASSWORD_TAG, '', array('value'=>"$newPassword")); return $tree->get(); } /** * Handles the response from the A&A server to our request to changePasswordByAdmin * * @access private * @param string $responseXML XML returned from changePasswordByAdmin * */ function _handleChangePasswordByAdminResponse($responseXML) { $p = xml_parser_create(); xml_parse_into_struct($p,$responseXML,$vals,$index) or die(xml_error_string(xml_get_error_code($p))); xml_parser_free($p); $error = AAServiceInterface::_exceptionCheck($index, $vals); if ($error) { return true; } return false; } /** * Builds an XML request for A&A Service to call resetPassword on server * * @access private * @param string $appId Application ID * @param string $adminUserName Admin's username * @param string $adminPassword Admin's password * @param string $userName username of user to reset password for * return string XML request * */ function _buildResetPasswordRequest($appId, $adminUserName, $adminPassword, $userName) { $tree = new XML_Tree; $root = &$tree->addRoot(AA_SERVICE_TAG); $resetPassNode = &$root->addChild('ResetPassword'); $tmpNode = &$resetPassNode->addChild(APPLICATION_ID_TAG, '', array('value'=>"$appId")); $tmpNode = &$resetPassNode->addChild(ADMIN_USER_NAME_TAG, '', array('value'=>"$adminUserName")); $tmpNode = &$resetPassNode->addChild(ADMIN_PASSWORD_TAG, '', array('value'=>"$adminPassword")); $tmpNode = &$resetPassNode->addChild(USER_NAME_TAG, '', array('value'=>"$userName")); return $tree->get(); } function _handleResetPasswordResponse($responseXML) { $p = xml_parser_create(); xml_parse_into_struct($p,$responseXML,$vals,$index) or die(xml_error_string(xml_get_error_code($p))); xml_parser_free($p); $error = AAServiceInterface::_exceptionCheck($index, $vals); if ($error) { return $error; } return $vals[$index['NEWPASSWORD'][0]]; } /** * Builds an XML request for A&A Service to call getUserPrivilges on server * * @access private * @param string $appId Application ID * @param string $adminUserId Admin's user ID * @param string $adminPassword Admin's password * @param string $userId User to get privileges for * @return string XML request * */ function _buildGetUserPrivilegesRequest($appId, $adminUserName, $adminPassword, $userName) { $tree = new XML_Tree; $root = &$tree->addRoot(AA_SERVICE_TAG); $getUserPrivilegesNode = &$root->addChild('GetUserPrivileges'); $tmpNode = &$getUserPrivilegesNode->addChild(APPLICATION_ID_TAG, '', array('value'=>"$appId")); $tmpNode = &$getUserPrivilegesNode->addChild(ADMIN_USER_NAME_TAG, '', array('value'=>"$adminUserName")); $tmpNode = &$getUserPrivilegesNode->addChild(ADMIN_PASSWORD_TAG, '', array('value'=>"$adminPassword")); $tmpNode = &$getUserPrivilegesNode->addChild(USER_NAME_TAG, '', array('value'=>"$userName")); return $tree->get(); } function _handleGetUserPrivilegesResponse($responseXML) { $p = xml_parser_create(); xml_parse_into_struct($p,$responseXML,$vals,$index) or die(xml_error_string(xml_get_error_code($p))); xml_parser_free($p); $error = AAServiceInterface::_exceptionCheck($index, $vals); if ($error) { return $error; } $privIndexes = $index['PRIVILEGE']; $privArray = array(); // Get all the privileges foreach ($privIndexes as $curIndex) { $curPriv = $vals[$curIndex]; $privArray[] = &AAServiceInterface::_buildPrivilege($curPriv); } return $privArray; } /** * Builds an XML request for A&A Service to call setUserPrivileges on server * * @access private * @param string $appId Application ID * @param string $adminUserId Admin's user ID * @param string $adminPassword Admin's password * @param string $userId User to set privileges for * @param AAPrivilege[] $privileges Array of privileges to give user * @return string XML request * */ function _buildSetUserPrivilegesRequest($appId, $adminUserId, $adminPassword, $userId, $privileges) { $tree = new XML_Tree; $root = &$tree->addRoot(AA_SERVICE_TAG); $setUserPrivilegesNode = &$root->addChild('SetUserPrivileges'); $tmpNode = &$setUserPrivilegesNode->addChild(APPLICATION_ID_TAG, '', array('value'=>$appId)); $tmpNode = &$setUserPrivilegesNode->addChild(ADMIN_USER_ID_TAG, '', array('value'=>$adminUserId)); $tmpNode = &$setUserPrivilegesNode->addChild(ADMIN_PASSWORD_TAG, '', array('value'=>$adminPassword)); $tmpNode = &$setUserPrivilegesNode->addChild(USER_ID_TAG, '', array('value'=>$userId)); $privilegeListNode = &$setUserPrivilegesNode->addChild(PRIVILEGE_LIST_TAG); foreach ($privileges as $curPriv) { $tmpNode = &$privilegeListNode->addChild(PRIVILEGE_TAG, $curPriv->getPrivilegeDesc(), array('value'=>$curPriv->getPrivilegeCode())); } return $tree->get(); } function _handleSetUserPrivilegesResponse($responseXML) { } /** * Builds an XML request for A&A Service to call listAllPrivileges on server * * @access private * @param string $appId Application ID * @param string $adminUserId Admin's user ID * @param string $adminPassword Admin's password * @return AAPrivilege[] Array of privileges * */ function _buildListAppPrivilegesRequest($appId, $adminUserName, $adminPassword) { $tree = new XML_Tree; $root = &$tree->addRoot(AA_SERVICE_TAG); $listAppPrivilegesNode = &$root->addChild('ListAppPrivileges'); $tmpNode = &$listAppPrivilegesNode->addChild(APPLICATION_ID_TAG, '', array('value'=>"$appId")); $tmpNode = &$listAppPrivilegesNode->addChild(ADMIN_USER_NAME_TAG, '', array('value'=>"$adminUserName")); $tmpNode = &$listAppPrivilegesNode->addChild(ADMIN_PASSWORD_TAG, '', array('value'=>"$adminPassword")); return $tree->get(); } function _handleListAppPrivilegesResponse($responseXML) { $p = xml_parser_create(); xml_parse_into_struct($p,$responseXML,$vals,$index) or die(xml_error_string(xml_get_error_code($p))); xml_parser_free($p); $error = AAServiceInterface::_exceptionCheck($index, $vals); if ($error) { return $error; } $privIndexes = $index['PRIVILEGE']; $privArray = array(); // Get all the privileges foreach ($privIndexes as $curIndex) { $curPriv = $vals[$curIndex]; $privArray[] = &AAServiceInterface::_buildPrivilege($curPriv); } return $privArray; } /** * Builds an XML request for A&A Service to call listAllPrivileges on server * * @access private * @param string $appId Application ID * @param string $adminUserId Admin's user ID * @param string $adminPassword Admin's password * @return AAPrivilege[] Array of privileges * */ function _buildListAppGroupsRequest($appId, $adminUserName, $adminPassword) { $tree = new XML_Tree; $root = &$tree->addRoot(AA_SERVICE_TAG); $listAppGroupNode = &$root->addChild('ListAppGroups'); $tmpNode = &$listAppGroupNode->addChild(APPLICATION_ID_TAG, '', array('value'=>"$appId")); $tmpNode = &$listAppGroupNode->addChild(ADMIN_USER_NAME_TAG, '', array('value'=>"$adminUserName")); $tmpNode = &$listAppGroupNode->addChild(ADMIN_PASSWORD_TAG, '', array('value'=>"$adminPassword")); return $tree->get(); } function _handleListAppGroupsResponse($responseXML) { $p = xml_parser_create(); xml_parse_into_struct($p,$responseXML,$vals,$index) or die(xml_error_string(xml_get_error_code($p))); xml_parser_free($p); $error = AAServiceInterface::_exceptionCheck($index, $vals); if ($error) { return $error; } $groupArray = array(); $groupIndexes = $index['GROUP']; // Get all the groups foreach ($groupIndexes as $curIndex) { $curGroupVals = $vals[$curIndex]; $curGroup = &AAServiceInterface::_buildGroup($curGroupVals); $privIndexes = $index['PRIVILEGE']; // Get all the privileges foreach ($privIndexes as $curIndex) { $curPriv = $vals[$curIndex]; $curGroup->_privileges[] = &AAServiceInterface::_buildPrivilege($curPriv); } $groupArray[] = $curGroup; } return $groupArray; } /** * Return a group object built from a string array * * @access private * @param string[] String array to create group from * @return AAGroup Group object * */ function &_buildGroup($groupArray) { // Make sure we got a good array is_array($groupArray) or die ('_buildGroup did not get a valid array sent to it'); $curGroup = new AAGroup(); $curGroup->setGroupId($groupArray['attributes']['ID']); $curGroup->setGroupLogicalName($groupArray['attributes']['LOGICAL']); $curGroup->setGroupId($groupArray['attributes']['DISPLAY']); $curGroup->setGroupDesc($groupArray['value']); /*$privIndexes = $index['PRIVILEGE']; // Get all the privileges foreach ($privIndexes as $curIndex) { $curPriv = $vals[$curIndex]; $user->_privileges[] = &AAServiceInterface::_buildPrivilege($curPriv); }*/ return $curGroup; } /** * Return a privilige object built from a string array * * @access private * @param string[] String array to create privilege from * @return AAPrivilege Privilege object * */ function &_buildPrivilege($privilegeArray) { // Make sure we got a good array is_array($privilegeArray) or die ('_buildPrivilege did not get a valid array sent to it'); $privilege = new AAPrivilege(); $privilege->setPrivilegeCode($privilegeArray['attributes']['CODE']); $privilege->setPrivilegeDesc($privilegeArray['value']); return $privilege; } /** * Checks to see if we received some sort of exception * * @access private * @param string $responseXML * @return object|boolean returns an exception object, otherwise false * */ function _exceptionCheck($index, $vals) { $retval = $vals[$index['RESULT'][0]]['attributes']['VALUE']; if ($retval == 0) { return false; } $exception = new AAException($retval); $exception->message = $vals[$index['RESULT'][0]]['value']; return $exception; } } ?> From geeklog-cvs-admin at lists.geeklog.net Fri May 16 17:44:25 2003 From: geeklog-cvs-admin at lists.geeklog.net (geeklog-cvs-admin at lists.geeklog.net) Date: Fri, 16 May 2003 16:44:25 -0500 Subject: [geeklog-cvs] geeklog-2/lib/A_and_A/client AAServiceInterface.class.php,1.1,1.2 Message-ID: <200305162144.h4GLiPi03551@internal.geeklog.net> Update of /usr/cvs/geeklog/geeklog-2/lib/A_and_A/client In directory internal.geeklog.net:/tmp/cvs-serv3538 Modified Files: AAServiceInterface.class.php Log Message: Refactored this to use a stategy design pattern so we can better support alternative methods to raw XML for interacting with A&A server. Index: AAServiceInterface.class.php =================================================================== RCS file: /usr/cvs/geeklog/geeklog-2/lib/A_and_A/client/AAServiceInterface.class.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** AAServiceInterface.class.php 11 Jan 2003 06:07:58 -0000 1.1 --- AAServiceInterface.class.php 16 May 2003 21:44:23 -0000 1.2 *************** *** 13,42 **** /** - * PEAR's XML tree builder - */ - require_once('XML/Tree.php'); - - /** * A&A User Class */ ! require_once('AAUser.class.php'); /** * Constants for the Enterprise A&A services and client */ ! require_once(dirname(__FILE__) . '/../common/AAConstants.php'); /** * Privilege class for the A&A Service */ ! require_once(dirname(__FILE__) . '/../common/AAPrivilege.class.php'); /** * Group class for the A&A Service */ ! require_once(dirname(__FILE__) . '/../common/AAGroup.class.php'); ! class AAServiceInterface { // Public Methods --- 13,74 ---- /** * A&A User Class */ ! require_once 'AAUser.class.php'; /** * Constants for the Enterprise A&A services and client */ ! require_once dirname(__FILE__) . '/../common/AAConstants.php'; /** * Privilege class for the A&A Service */ ! require_once dirname(__FILE__) . '/../common/AAPrivilege.class.php'; /** * Group class for the A&A Service */ ! require_once dirname(__FILE__) . '/../common/AAGroup.class.php'; ! /** ! * Abstract invoker class ! */ ! require_once dirname(__FILE__) . 'Invoker.class.php'; ! ! define('INVOKE_LOCALHOST', 'LocalhostInvoker'); ! define('INVOKE_XML', 'XMLInvoker'); ! define('INVOKE_XMLRPC', 'RPCInvoker'); ! define('INVOKE_SOAP', 'SoapInvoker'); + class AAServiceInterface extends Invoker { + var $_invoker = null; + + /** + * Constructor + * + * Implements a strategy pattern for interacting with the A&A server in + * one of three ways: + * 1) XML strings - This strategy uses raw XML via HTTP to call methods on + * A&A server + * 2) XMLRPC - This strategy uses PEAR's XMLRPC package to talk to A&A + * 3) SOAP - This strategy uses SOAP/WSDL to talk to A&A server. + * + * @author Tony Bibbs + * @access public + * @param $invokeMethod string Constant representing class of strategy to use + * @param $aaServer string hostname of A&A server + * @param $aaPort integer port to use when connecting to A&A server + * @param $aaPath string Relative path to send A&A requests to + * @return object User object + * + */ + function AAServiceInterface($invokeMethod = INVOKE_LOCALHOST, $aaServer = '', $aaPort = '', $aaPath = '') + { + require_once dirname(__FILE__) . $invokeMethod . '.class.php'; + + $this->_invoker = new $invokeMethod($aaServer, $aaPort, $aaPath); + } + // Public Methods *************** *** 44,81 **** * Authenticates a user to an application * ! * This moethod authenticates the userId and password for the specified ! * application. It returns an AAUser object which holds authorization ! * privieges for that user and any exeptions that may have occured ! * during authentication * * @author Tony Bibbs - * @param string $aaServer A&A Server to connect to * @param string $appId Application to authenticate to * @param string $userId User to authenticate * @param string $password Password to authenticate with ! * @param integer $aaPort Port on A&A server to connect ot ! * @return AAUser Object containinga list of authorization levels * */ ! function &authenticate($aaServer, $aaPath, $appId, $userName, $password, $aaPort=80) { ! // Build and send XML request ! $requestXML = AAServiceInterface::_buildAuthenticateRequest($appId, $userName, $password); ! $responseXML = AAServiceInterface::_request($aaServer,'POST',$aaPath,$requestXML,$aaPort); ! $user = &AAServiceInterface::_handleAuthenticateResponse($responseXML, $aaServer, $aaPort); ! ! if (get_class($user) == 'aaexception') { ! // Doing this just to make it obvious that we got an exception, not a valid user object ! $exception = &$user; ! ! // Need to log this problem at some point, until then just return false ! return false; ! } ! ! $user->setAppId($appId); ! $user->setUserName($userName); ! $user->setPassword($password); ! ! return $user; } --- 76,92 ---- * Authenticates a user to an application * ! * This is a pass through method that sends the authentication request on ! * to the invoker. * * @author Tony Bibbs * @param string $appId Application to authenticate to * @param string $userId User to authenticate * @param string $password Password to authenticate with ! * @return AAUser Object containing a list of authorization levels * */ ! function &authenticate($appId, $userName, $password) { ! return $this->_invoker->authenticate($appId, $userName, $password); } *************** *** 83,108 **** * Changes a password for a user * ! * This method changes the password for the given userId, password and ! * application ID combination. * ! * @author Tony Bibbs ! * @param string $aaServer A&A Server to execute against * @param string $appId Application to change password for * @param string $userId User to change password for * @param string $password Current password * @param string $newPassword New password - * @param string $aaPort Port on A&A server to execute against * @return boolean True if change worked, otherwise false * */ ! function changePassword($aaServer, $appId, $userName, $password, $newPassword, $aaPort=80) { ! $requestXML = AAServiceInterface::_buildChangePasswordRequest($appId, $userName, $password, $newPassword); ! $responseXML = AAServiceInterface::_request($aaServer,'POST','/~tony/server/A_and_A/',$requestXML,$aaPort); ! $error = AAServiceInterface::_handleResponse($responseXML); ! if ($error) { ! return false; ! } ! return true; } --- 94,112 ---- * Changes a password for a user * ! * This is a pass through method that sends the change password request ! * on to the invoker. * ! * @author Tony Bibbs ! * @access public * @param string $appId Application to change password for * @param string $userId User to change password for * @param string $password Current password * @param string $newPassword New password * @return boolean True if change worked, otherwise false * */ ! function changePassword($appId, $userName, $password, $newPassword) { ! return $this->_invoker->changePassword($appId, $userName, $password, $newPassword); } *************** *** 110,145 **** * Allows admin to change a user's password * ! * This method allows an admin user ot change the password of a user to a ! * particular value. * ! * @param string $aaServer A&A Server to execute against * @param string $appId Application to change password for ! * @param string $adminUserId User to change password for ! * @param string $adminPassword Current password * @param string $userId User to change password for * @param string $newPassword New password - * @param string $aaPort Port on A&A server to execute against * */ ! function changePasswordByAdmin($aaServer, $appId, $adminUserName, $adminPassword, $userName, $newPassword, $aaPort=80) { ! $requestXML = AAServiceInterface::_buildChangePasswordByAdminRequest($appId, $adminUserName, $adminPassword, $userName, $newPassword); ! $responseXML = AAServiceInterface::_request($aaServer,'POST','/~tony/server/A_and_A/',$requestXML,$aaPort); ! $error = AAServiceInterface::_handleResponse($responseXML); ! if ($error) { ! return false; ! } ! return true; } ! function resetPassword($aaServer, $appId, $adminUserName, $adminPassword, $userName, $aaPort=80) { ! $requestXML = AAServiceInterface::_buildResetPasswordRequest($appId, $adminUserName, $adminPassword, $userName); ! $responseXML = AAServiceInterface::_request($aaServer, 'POST', '/~tony/server/A_and_A/', $requestXML, $aaPort); ! $newPassword = AAServiceInterface::_handleResetPasswordResponse($responseXML); ! if (get_class($newPassword) == 'aaexception') { ! return false; ! } ! return $newPassword; } --- 114,147 ---- * Allows admin to change a user's password * ! * Pass through method to the invoker's changePasswordByAdmin function * ! * @author Tony Bibbs ! * @access public * @param string $appId Application to change password for ! * @param string $adminUserId Admin's username ! * @param string $adminPassword Admin's current password * @param string $userId User to change password for * @param string $newPassword New password * */ ! function changePasswordByAdmin($appId, $adminUserName, $adminPassword, $userName, $newPassword) { ! return $this->_invoker->changePasswordByAdmin($appId, $adminUserName, $adminPassword, $userName, $newPassword); } ! /** ! * Resets a user's password ! * ! * @author Tony BIbbs ! * @access public ! * @param string $appId Application to perform action on ! * @param string $adminUserName Admin's username ! * @param string $adminPassword Admin's password ! * @return string New password ! * ! */ ! function resetPassword($appId, $adminUserName, $adminPassword, $userName) { ! return $this->_invoker->resetPassword($appId, $adminUserName, $adminPassword, $userName); } *************** *** 156,168 **** * */ ! function getUserPrivileges($aaServer, $appId, $adminUserId, $adminPassword, $userId, $aaPort=80) { ! $requestXML = AAServiceInterface::_buildGetUserPrivilegesRequest($appId, $adminUserId, $adminPassword, $userId); ! $responseXML = AAServiceInterface::_request($aaServer, 'POST', '/entaaa/', $requestXML, $aaPort); ! $privArray= AAServiceInterface::_handleGetUserPrivilegesResponse($responseXML); ! if (get_class($privArray) == 'aaexception') { ! return false; ! } ! return $privArray; } --- 158,164 ---- * */ ! function getUserPrivileges($appId, $adminUserId, $adminPassword, $userId) { ! return $this->_invoker->getUserPrivileges($appId, $adminUserId, $adminPassword); } *************** *** 177,189 **** * */ ! function setUserPrivileges($aaServer, $appId, $adminUserId, $adminPassword, $userId, $privArray, $aaPort=80) { ! $requestXML = AAServiceInterface::_buildSetUserPrivilegesRequest($appId, $adminUserId, $adminPassword, $userId, $privArray); ! $responseXML = AAServiceInterface::_request($aaServer, 'POST', '/~tony/server/A_and_A/', $requestXML, $aaPort); ! $error = AAServiceInterface::_handleResponse($responseXML); ! if ($error) { ! return false; ! } ! return true; } --- 173,179 ---- * */ ! function setUserPrivileges($appId, $adminUserId, $adminPassword, $userId, $privArray) { ! return $this->_invoker->setUserPrivileges($appId, $adminUserId, $adminPassword, $userId, $privArray); } *************** *** 197,752 **** * */ ! function listAppPrivileges($aaServer, $appId, $adminUserName, $adminPassword, $aaPort=80) { ! $requestXML = AAServiceInterface::_buildListAppPrivilegesRequest($appId, $adminUserName, $adminPassword); ! $responseXML = AAServiceInterface::_request($aaServer, 'POST', '/~tony/server/A_and_A/', $requestXML, $aaPort); ! $privArray = AAServiceInterface::_handleListAppPrivilegesResponse($responseXML); ! ! if (get_class($privArray) == 'aaexception') { ! return false; ! } ! return $privArray; } ! function listAppGroups($aaServer, $appId, $adminUserName, $adminPassword, $aaPort=80) ! { ! $requestXML = AAServiceInterface::_buildListAppGroupsRequest($appId, $adminUserName, $adminPassword); ! $responseXML = AAServiceInterface::_request($aaServer, 'POST', '/~tony/server/A_and_A/', $requestXML, $aaPort); ! $groupArray = AAServiceInterface::_handleListAppGroupsResponse($responseXML); ! ! if (get_class($groupArray) == 'aaexception') { ! return false; ! } ! return $groupArray; ! } ! ! // Private Methods ! ! /** ! * Makes HTTP resquests and returns the results. Code take from ! * http://dodds.net/~cardinal/sentohost.txt ! * ! * Examples: $this->_request('localhost','post','/search','q=php_imlib'); ! * ! * @access private ! * @param string $host Host to make request to ! * @param string $method Method of request (POST or GET) ! * @param string $data ! * @param integer $port Port to connect to ! * @param string $useragent ! * @return string Response from the request ! * ! */ ! function _request($host, $method, $path, $data, $port=80, $useragent=0) ! { ! // The following two lines are for testing only. This will test all methods against ! // a mock server. The mock server makes no attempts to validate the incoming ! // XML nor use any real provider. It simply prints a valid response for the ! // method called. It is meant for regressing testing the client separate from ! // the server. ! //$host = 'localhost'; ! //$path = '/A_and_A/client/testscripts/mockserver.php'; ! ! //print "host: $host, method = $method, path = $path, port = $port"; ! //exit; ! ! // We are doing a form post and this variable is always expected ! $data = 'xmlInParam=' . $data; ! ! // Xerces can't seem to handle any sort of whitespace ! $data = str_replace("|",'',$data); ! $data = str_replace("\n",'',$data); ! $data = str_replace(' ','',$data); ! $data = str_replace('> <','><',$data); ! ! $data = stripslashes($data); ! ! // Supply a default method of GET if the one passed was empty ! if (empty($method)) { ! $method = 'GET'; ! } ! ! // Open the socket ! $method = strtoupper($method); ! ! $fp = fsockopen($host,$port); ! if (!$fp) { ! print 'error connect to A&A server in _request'; ! exit; ! } ! ! if ($method == 'GET') { ! $path .= '?' . $data; ! } ! ! // Post the request ! fputs($fp, "$method $path HTTP/1.1\n"); ! fputs($fp, "Host: $host\n"); ! fputs($fp, "Content-type: application/x-www-form-urlencoded\n"); ! fputs($fp, "Content-length: " . strlen($data) . "\n"); ! ! if ($useragent) { ! fputs($fp, "User-Agent: MSIE\n"); ! } ! ! fputs($fp, "Connection: close\n\n"); ! if ($method == 'POST') { ! fputs($fp, $data); ! } ! ! $response = ''; ! ! // Get the response ! while (!feof($fp)) { ! $response .= fgets($fp,128); ! } ! ! fclose($fp); ! ! // Since we are reading from the socket let's get rid of any header ! // info ! $startPos = strpos($response,'<'); ! $endPos = strrpos($response,'>') + 1; ! $length = ($endPos - $startPos) + 1; ! $response = substr($response, $startPos, $length); ! ! // Now we have just the XML ! return $response; ! } ! ! /** ! * Builds an XML request string for the A&A service ! * ! * @access private ! * @param string $host Hostname or IP for A&A Server ! * @param string $appId ID of application making the request ! * @param string $userID ID of user to authenticate ! * @param string $password Password to use ! * @return string XML request is outputed. ! * ! */ ! function _buildAuthenticateRequest($appId, $userId, $password) ! { ! $tree = new XML_Tree; ! $root = &$tree->addRoot(AA_SERVICE_TAG); ! $authNode = &$root->addChild('Authenticate'); ! $appIDNode = &$authNode->addChild(APPLICATION_ID_TAG,'',array('value'=>"$appId")); ! $userIDNode = &$authNode->addChild(USER_NAME_TAG,'',array('value'=>"$userId")); ! $passwordNode = &$authNode->addChild(PASSWORD_TAG,'',array('value'=>"$password")); ! return $tree->get(); ! } ! ! /** ! * Parses a XML response from the authenticate service method* and builds ! * a user object ! * ! * @param string $responseXML XML returned from authenticate() ! * @return AAUser User object ! * ! */ ! function &_handleAuthenticateResponse($responseXML, $aaServer, $aaPort='80') ! { ! $p = xml_parser_create(); ! xml_parse_into_struct($p,$responseXML,$vals,$index) or die(xml_error_string(xml_get_error_code($p))); ! xml_parser_free($p); ! $error = AAServiceInterface::_exceptionCheck($index, $vals); ! if ($error) { ! return $error; ! } ! ! $user = new AAUser($aaServer, $aaPort); ! $user->setEmpId($vals[$index['EMPID'][0]]); ! $groupIndexes = $index['GROUP']; ! $privIndexes = $index['PRIVILEGE']; ! ! // Get all the groups ! foreach ($groupIndexes as $curIndex) { ! $curGroup = $vals[$curIndex]; ! $user->_groups[] = &AAServiceInterface::_buildGroup($curGroup); ! } ! ! // Get all the privileges ! foreach ($privIndexes as $curIndex) { ! $curPriv = $vals[$curIndex]; ! $user->_privileges[] = &AAServiceInterface::_buildPrivilege($curPriv); ! } ! ! return $user; ! } ! ! /** ! * Generic response handler. ! * ! * This handles all responses from A&A server. This is called by all commands ! * except for authenticate and privilege-related calls. ! * ! * @access private ! * @param string $responseXML XML returned from changePasswordByAdmin() ! * ! */ ! function _handleResponse($responseXML) ! { ! $p = xml_parser_create(); ! xml_parse_into_struct($p,$responseXML,$vals,$index) or die(xml_error_string(xml_get_error_code($p))); ! xml_parser_free($p); ! $error = AAServiceInterface::_exceptionCheck($index, $vals); ! if ($error) { ! return $error; ! } ! return false; ! } ! ! /** ! * Builds XML request string for A&A Service to change a user's password ! * ! * @access private ! * @param string $appId Applicatoin ID ! * @param string $userId User ID ! * @param string $oldPassword Old password ! * @param string $newPassword NewPassword ! * @return string XML request ! * ! */ ! function _buildChangePasswordRequest($appId, $userId, $oldPassword, $newPassword) ! { ! $tree = new XML_Tree; ! $root = &$tree->addRoot(AA_SERVICE_TAG); ! $changePasswordNode = &$root->addChild('ChangePassword'); ! $tmpNode = &$changePasswordNode->addChild(APPLICATION_ID_TAG, '', array('value'=>$appId)); ! $tmpNode = &$changePasswordNode->addChild(USER_NAME_TAG, '', array('value'=>$userId)); ! $tmpNode = &$changePasswordNode->addChild(OLD_PASSWORD_TAG, '', array('value'=>"$oldPassword")); ! $tmpNode = &$changePasswordNode->addChild(NEW_PASSWORD_TAG, '', array('value'=>"$newPassword")); ! ! return $tree->get(); ! } ! ! ! /** ! * Builds an XML request for A&A Service to call changePasswordByAdmin on server ! * ! * @access private ! * @param string $appId Application ID ! * @param string $userId User ID ! * @param string $password Old password ! * @param string $newPassword New Password ! * @return string XML request ! * ! */ ! function _buildChangePasswordByAdminRequest($appId, $adminUserId, $adminPassword, $userId, $newPassword) ! { ! $tree = new XML_Tree; ! $root = &$tree->addRoot(AA_SERVICE_TAG); ! $changePassNode = &$root->addChild('ChangePasswordByAdmin'); ! $tmpNode = &$changePassNode->addChild(APPLICATION_ID_TAG, '', array('value'=>"$appId")); ! $tmpNode = &$changePassNode->addChild(ADMIN_USER_NAME_TAG, '', array('value'=>"$adminUserId")); ! $tmpNode = &$changePassNode->addChild(ADMIN_PASSWORD_TAG, '', array('value'=>"$adminPassword")); ! $tmpNode = &$changePassNode->addChild(USER_NAME_TAG, '', array('value'=>"$userId")); ! $tmpNode = &$changePassNode->addChild(NEW_PASSWORD_TAG, '', array('value'=>"$newPassword")); ! ! return $tree->get(); ! } ! ! /** ! * Handles the response from the A&A server to our request to changePasswordByAdmin ! * ! * @access private ! * @param string $responseXML XML returned from changePasswordByAdmin ! * ! */ ! function _handleChangePasswordByAdminResponse($responseXML) ! { ! $p = xml_parser_create(); ! xml_parse_into_struct($p,$responseXML,$vals,$index) or die(xml_error_string(xml_get_error_code($p))); ! xml_parser_free($p); ! $error = AAServiceInterface::_exceptionCheck($index, $vals); ! if ($error) { ! return true; ! } ! return false; ! } ! ! /** ! * Builds an XML request for A&A Service to call resetPassword on server ! * ! * @access private ! * @param string $appId Application ID ! * @param string $adminUserName Admin's username ! * @param string $adminPassword Admin's password ! * @param string $userName username of user to reset password for ! * return string XML request ! * ! */ ! function _buildResetPasswordRequest($appId, $adminUserName, $adminPassword, $userName) ! { ! $tree = new XML_Tree; ! $root = &$tree->addRoot(AA_SERVICE_TAG); ! $resetPassNode = &$root->addChild('ResetPassword'); ! $tmpNode = &$resetPassNode->addChild(APPLICATION_ID_TAG, '', array('value'=>"$appId")); ! $tmpNode = &$resetPassNode->addChild(ADMIN_USER_NAME_TAG, '', array('value'=>"$adminUserName")); ! $tmpNode = &$resetPassNode->addChild(ADMIN_PASSWORD_TAG, '', array('value'=>"$adminPassword")); ! $tmpNode = &$resetPassNode->addChild(USER_NAME_TAG, '', array('value'=>"$userName")); ! ! return $tree->get(); ! } ! ! ! function _handleResetPasswordResponse($responseXML) ! { ! $p = xml_parser_create(); ! xml_parse_into_struct($p,$responseXML,$vals,$index) or die(xml_error_string(xml_get_error_code($p))); ! xml_parser_free($p); ! $error = AAServiceInterface::_exceptionCheck($index, $vals); ! if ($error) { ! return $error; ! } ! ! return $vals[$index['NEWPASSWORD'][0]]; ! } ! /** ! * Builds an XML request for A&A Service to call getUserPrivilges on server ! * ! * @access private ! * @param string $appId Application ID ! * @param string $adminUserId Admin's user ID ! * @param string $adminPassword Admin's password ! * @param string $userId User to get privileges for ! * @return string XML request ! * ! */ ! function _buildGetUserPrivilegesRequest($appId, $adminUserName, $adminPassword, $userName) ! { ! $tree = new XML_Tree; ! $root = &$tree->addRoot(AA_SERVICE_TAG); ! $getUserPrivilegesNode = &$root->addChild('GetUserPrivileges'); ! $tmpNode = &$getUserPrivilegesNode->addChild(APPLICATION_ID_TAG, '', array('value'=>"$appId")); ! $tmpNode = &$getUserPrivilegesNode->addChild(ADMIN_USER_NAME_TAG, '', array('value'=>"$adminUserName")); ! $tmpNode = &$getUserPrivilegesNode->addChild(ADMIN_PASSWORD_TAG, '', array('value'=>"$adminPassword")); ! $tmpNode = &$getUserPrivilegesNode->addChild(USER_NAME_TAG, '', array('value'=>"$userName")); ! ! return $tree->get(); ! } ! ! function _handleGetUserPrivilegesResponse($responseXML) ! { ! $p = xml_parser_create(); ! xml_parse_into_struct($p,$responseXML,$vals,$index) or die(xml_error_string(xml_get_error_code($p))); ! xml_parser_free($p); ! $error = AAServiceInterface::_exceptionCheck($index, $vals); ! if ($error) { ! return $error; ! } ! ! $privIndexes = $index['PRIVILEGE']; ! $privArray = array(); ! ! // Get all the privileges ! foreach ($privIndexes as $curIndex) { ! $curPriv = $vals[$curIndex]; ! $privArray[] = &AAServiceInterface::_buildPrivilege($curPriv); ! } ! ! return $privArray; ! } ! ! /** ! * Builds an XML request for A&A Service to call setUserPrivileges on server ! * ! * @access private ! * @param string $appId Application ID ! * @param string $adminUserId Admin's user ID ! * @param string $adminPassword Admin's password ! * @param string $userId User to set privileges for ! * @param AAPrivilege[] $privileges Array of privileges to give user ! * @return string XML request ! * ! */ ! function _buildSetUserPrivilegesRequest($appId, $adminUserId, $adminPassword, $userId, $privileges) ! { ! $tree = new XML_Tree; ! $root = &$tree->addRoot(AA_SERVICE_TAG); ! $setUserPrivilegesNode = &$root->addChild('SetUserPrivileges'); ! $tmpNode = &$setUserPrivilegesNode->addChild(APPLICATION_ID_TAG, '', array('value'=>$appId)); ! $tmpNode = &$setUserPrivilegesNode->addChild(ADMIN_USER_ID_TAG, '', array('value'=>$adminUserId)); ! $tmpNode = &$setUserPrivilegesNode->addChild(ADMIN_PASSWORD_TAG, '', array('value'=>$adminPassword)); ! $tmpNode = &$setUserPrivilegesNode->addChild(USER_ID_TAG, '', array('value'=>$userId)); ! $privilegeListNode = &$setUserPrivilegesNode->addChild(PRIVILEGE_LIST_TAG); ! foreach ($privileges as $curPriv) { ! $tmpNode = &$privilegeListNode->addChild(PRIVILEGE_TAG, $curPriv->getPrivilegeDesc(), array('value'=>$curPriv->getPrivilegeCode())); ! } ! ! return $tree->get(); ! } ! ! function _handleSetUserPrivilegesResponse($responseXML) ! { ! } ! ! /** ! * Builds an XML request for A&A Service to call listAllPrivileges on server ! * ! * @access private ! * @param string $appId Application ID ! * @param string $adminUserId Admin's user ID ! * @param string $adminPassword Admin's password ! * @return AAPrivilege[] Array of privileges ! * ! */ ! function _buildListAppPrivilegesRequest($appId, $adminUserName, $adminPassword) ! { ! $tree = new XML_Tree; ! $root = &$tree->addRoot(AA_SERVICE_TAG); ! $listAppPrivilegesNode = &$root->addChild('ListAppPrivileges'); ! $tmpNode = &$listAppPrivilegesNode->addChild(APPLICATION_ID_TAG, '', array('value'=>"$appId")); ! $tmpNode = &$listAppPrivilegesNode->addChild(ADMIN_USER_NAME_TAG, '', array('value'=>"$adminUserName")); ! $tmpNode = &$listAppPrivilegesNode->addChild(ADMIN_PASSWORD_TAG, '', array('value'=>"$adminPassword")); ! ! return $tree->get(); ! } ! ! function _handleListAppPrivilegesResponse($responseXML) ! { ! $p = xml_parser_create(); ! xml_parse_into_struct($p,$responseXML,$vals,$index) or die(xml_error_string(xml_get_error_code($p))); ! xml_parser_free($p); ! $error = AAServiceInterface::_exceptionCheck($index, $vals); ! if ($error) { ! return $error; ! } ! ! $privIndexes = $index['PRIVILEGE']; ! $privArray = array(); ! ! // Get all the privileges ! foreach ($privIndexes as $curIndex) { ! $curPriv = $vals[$curIndex]; ! $privArray[] = &AAServiceInterface::_buildPrivilege($curPriv); ! } ! ! return $privArray; ! } ! ! /** ! * Builds an XML request for A&A Service to call listAllPrivileges on server ! * ! * @access private ! * @param string $appId Application ID ! * @param string $adminUserId Admin's user ID ! * @param string $adminPassword Admin's password ! * @return AAPrivilege[] Array of privileges ! * ! */ ! function _buildListAppGroupsRequest($appId, $adminUserName, $adminPassword) { ! $tree = new XML_Tree; ! $root = &$tree->addRoot(AA_SERVICE_TAG); ! $listAppGroupNode = &$root->addChild('ListAppGroups'); ! $tmpNode = &$listAppGroupNode->addChild(APPLICATION_ID_TAG, '', array('value'=>"$appId")); ! $tmpNode = &$listAppGroupNode->addChild(ADMIN_USER_NAME_TAG, '', array('value'=>"$adminUserName")); ! $tmpNode = &$listAppGroupNode->addChild(ADMIN_PASSWORD_TAG, '', array('value'=>"$adminPassword")); ! ! return $tree->get(); } - function _handleListAppGroupsResponse($responseXML) - { - $p = xml_parser_create(); - xml_parse_into_struct($p,$responseXML,$vals,$index) or die(xml_error_string(xml_get_error_code($p))); - xml_parser_free($p); - $error = AAServiceInterface::_exceptionCheck($index, $vals); - if ($error) { - return $error; - } - - $groupArray = array(); - $groupIndexes = $index['GROUP']; - - // Get all the groups - foreach ($groupIndexes as $curIndex) { - $curGroupVals = $vals[$curIndex]; - $curGroup = &AAServiceInterface::_buildGroup($curGroupVals); - - $privIndexes = $index['PRIVILEGE']; - // Get all the privileges - foreach ($privIndexes as $curIndex) { - $curPriv = $vals[$curIndex]; - $curGroup->_privileges[] = &AAServiceInterface::_buildPrivilege($curPriv); - } - $groupArray[] = $curGroup; - } - - return $groupArray; - } - /** - * Return a group object built from a string array - * - * @access private - * @param string[] String array to create group from - * @return AAGroup Group object - * - */ - function &_buildGroup($groupArray) - { - // Make sure we got a good array - is_array($groupArray) or die ('_buildGroup did not get a valid array sent to it'); - - $curGroup = new AAGroup(); - $curGroup->setGroupId($groupArray['attributes']['ID']); - $curGroup->setGroupLogicalName($groupArray['attributes']['LOGICAL']); - $curGroup->setGroupId($groupArray['attributes']['DISPLAY']); - $curGroup->setGroupDesc($groupArray['value']); - - /*$privIndexes = $index['PRIVILEGE']; - - // Get all the privileges - foreach ($privIndexes as $curIndex) { - $curPriv = $vals[$curIndex]; - $user->_privileges[] = &AAServiceInterface::_buildPrivilege($curPriv); - }*/ - - return $curGroup; - } - - /** - * Return a privilige object built from a string array - * - * @access private - * @param string[] String array to create privilege from - * @return AAPrivilege Privilege object - * - */ - function &_buildPrivilege($privilegeArray) - { - // Make sure we got a good array - is_array($privilegeArray) or die ('_buildPrivilege did not get a valid array sent to it'); - - $privilege = new AAPrivilege(); - $privilege->setPrivilegeCode($privilegeArray['attributes']['CODE']); - $privilege->setPrivilegeDesc($privilegeArray['value']); - - return $privilege; - } - - /** - * Checks to see if we received some sort of exception - * - * @access private - * @param string $responseXML - * @return object|boolean returns an exception object, otherwise false - * - */ - function _exceptionCheck($index, $vals) - { - $retval = $vals[$index['RESULT'][0]]['attributes']['VALUE']; - - if ($retval == 0) { - return false; - } - - $exception = new AAException($retval); - $exception->message = $vals[$index['RESULT'][0]]['value']; - - return $exception; - } } --- 187,201 ---- * */ ! function listAppPrivileges($appId, $adminUserName, $adminPassword) { ! return $this->_invoker->listAppPrivileges($appId, $adminUserName, $adminPassword); } ! function listAppGroups($appId, $adminUserName, $adminPassword) { ! return $this->_invoker->listAppGroups($appId, $adminUserName, $adminPassword); } } From geeklog-cvs-admin at lists.geeklog.net Fri May 16 17:45:12 2003 From: geeklog-cvs-admin at lists.geeklog.net (geeklog-cvs-admin at lists.geeklog.net) Date: Fri, 16 May 2003 16:45:12 -0500 Subject: [geeklog-cvs] geeklog-2/lib/A_and_A/client Invoker.class.php,NONE,1.1 Message-ID: <200305162145.h4GLjCi03642@internal.geeklog.net> Update of /usr/cvs/geeklog/geeklog-2/lib/A_and_A/client In directory internal.geeklog.net:/tmp/cvs-serv3630 Added Files: Invoker.class.php Log Message: Abstract Invoker class --- NEW FILE: Invoker.class.php --- From geeklog-cvs-admin at lists.geeklog.net Mon May 19 04:47:14 2003 From: geeklog-cvs-admin at lists.geeklog.net (geeklog-cvs-admin at lists.geeklog.net) Date: Mon, 19 May 2003 03:47:14 -0500 Subject: [geeklog-cvs] geeklog-1.3/public_html lib-common.php,1.222,1.223 Message-ID: <200305190847.h4J8lEi07147@internal.geeklog.net> Update of /usr/cvs/geeklog/geeklog-1.3/public_html In directory internal.geeklog.net:/tmp/cvs-serv7133 Modified Files: lib-common.php Log Message: In the Daily Digest, sort new stories by date (as on the index page). Index: lib-common.php =================================================================== RCS file: /usr/cvs/geeklog/geeklog-1.3/public_html/lib-common.php,v retrieving revision 1.222 retrieving revision 1.223 diff -C2 -d -r1.222 -r1.223 *** lib-common.php 14 May 2003 08:13:37 -0000 1.222 --- lib-common.php 19 May 2003 08:47:12 -0000 1.223 *************** *** 3762,3765 **** --- 3762,3766 ---- $storysql .= COM_getPermSQL( 'AND', $U['uuid'] ); + $storysql .= ' ORDER BY featured DESC, date DESC'; $stories = DB_query( $storysql ); From geeklog-cvs-admin at lists.geeklog.net Mon May 19 04:52:21 2003 From: geeklog-cvs-admin at lists.geeklog.net (geeklog-cvs-admin at lists.geeklog.net) Date: Mon, 19 May 2003 03:52:21 -0500 Subject: [geeklog-cvs] geeklog-1.3/public_html/admin story.php,1.89,1.90 Message-ID: <200305190852.h4J8qLi07180@internal.geeklog.net> Update of /usr/cvs/geeklog/geeklog-1.3/public_html/admin In directory internal.geeklog.net:/tmp/cvs-serv7166 Modified Files: story.php Log Message: Pick up the 'postmode' default setting for the Admin story editor. Index: story.php =================================================================== RCS file: /usr/cvs/geeklog/geeklog-1.3/public_html/admin/story.php,v retrieving revision 1.89 retrieving revision 1.90 diff -C2 -d -r1.89 -r1.90 *** story.php 9 May 2003 10:27:45 -0000 1.89 --- story.php 19 May 2003 08:52:19 -0000 1.90 *************** *** 129,136 **** $A['unixdate'] = time(); $A['commentcode'] = $_CONF['comment_code']; $A['statuscode'] = 0; $A['featured'] = 0; $A['owner_id'] = $_USER['uid']; ! $A['group_id'] = DB_getItem($_TABLES['groups'],'grp_id',"grp_name = 'Story Admin'"); $A['perm_owner'] = 3; $A['perm_group'] = 2; --- 129,138 ---- $A['unixdate'] = time(); $A['commentcode'] = $_CONF['comment_code']; + $A['postmode'] = $_CONF['postmode']; $A['statuscode'] = 0; $A['featured'] = 0; $A['owner_id'] = $_USER['uid']; ! $A['group_id'] = DB_getItem ($_TABLES['groups'], 'grp_id', ! "grp_name = 'Story Admin'"); $A['perm_owner'] = 3; $A['perm_group'] = 2; From geeklog-cvs-admin at lists.geeklog.net Tue May 20 03:42:12 2003 From: geeklog-cvs-admin at lists.geeklog.net (geeklog-cvs-admin at lists.geeklog.net) Date: Tue, 20 May 2003 02:42:12 -0500 Subject: [geeklog-cvs] geeklog-1.3/language portuguese.php,NONE,1.1 Message-ID: <200305200742.h4K7gCi29094@internal.geeklog.net> Update of /usr/cvs/geeklog/geeklog-1.3/language In directory internal.geeklog.net:/tmp/cvs-serv29081 Added Files: portuguese.php Log Message: Portuguese language file, provided by Mario Seabra --- NEW FILE: portuguese.php --- (This appears to be a binary file; contents omitted.) From geeklog-cvs-admin at lists.geeklog.net Tue May 20 04:55:15 2003 From: geeklog-cvs-admin at lists.geeklog.net (geeklog-cvs-admin at lists.geeklog.net) Date: Tue, 20 May 2003 03:55:15 -0500 Subject: [geeklog-cvs] geeklog-1.3/public_html users.php,1.63,1.64 Message-ID: <200305200855.h4K8tFi29827@internal.geeklog.net> Update of /usr/cvs/geeklog/geeklog-1.3/public_html In directory internal.geeklog.net:/tmp/cvs-serv29809 Modified Files: users.php Log Message: Removed some unused code. Index: users.php =================================================================== RCS file: /usr/cvs/geeklog/geeklog-1.3/public_html/users.php,v retrieving revision 1.63 retrieving revision 1.64 diff -C2 -d -r1.63 -r1.64 *** users.php 14 May 2003 10:48:52 -0000 1.63 --- users.php 20 May 2003 08:55:13 -0000 1.64 *************** *** 6,11 **** // +---------------------------------------------------------------------------+ // | users.php | - // | User authentication module. | // | | // +---------------------------------------------------------------------------+ // | Copyright (C) 2000-2003 by the following authors: | --- 6,11 ---- // +---------------------------------------------------------------------------+ // | users.php | // | | + // | User authentication module. | // +---------------------------------------------------------------------------+ // | Copyright (C) 2000-2003 by the following authors: | *************** *** 633,645 **** * Shows user their account info form * ! * @param int $msg Id of message to display if one is needed ! * @param string $referrer * @return string HTML for form * */ ! function defaultform($msg, $referrer='') { ! global $LANG04, $_CONF; ! $retval = ''; --- 633,644 ---- * Shows user their account info form * ! * @param string $msg message to display if one is needed * @return string HTML for form * */ ! function defaultform ($msg) { ! global $LANG04; ! $retval = ''; *************** *** 653,670 **** $retval .= getpasswordform (); ! /* ! $retval .= COM_startBlock($LANG04[25]) ! . '' . LB ! . '
{lang_username}:
{lang_email}:
' . LB ! . '' . LB ! . '' . LB ! . '' . LB ! . '
' . $LANG04[26] . '
' . $LANG04[2] ! . ':
' ! . '
' ! . COM_endBlock(); ! */ ! return $retval; } // MAIN --- 652,659 ---- $retval .= getpasswordform (); ! ! return $retval; } + // MAIN From geeklog-cvs-admin at lists.geeklog.net Tue May 20 04:56:48 2003 From: geeklog-cvs-admin at lists.geeklog.net (geeklog-cvs-admin at lists.geeklog.net) Date: Tue, 20 May 2003 03:56:48 -0500 Subject: [geeklog-cvs] geeklog-1.3/language english.php,1.82,1.83 Message-ID: <200305200856.h4K8umi29894@internal.geeklog.net> Update of /usr/cvs/geeklog/geeklog-1.3/language In directory internal.geeklog.net:/tmp/cvs-serv29882 Modified Files: english.php Log Message: Added message for existing email address warning. Index: english.php =================================================================== RCS file: /usr/cvs/geeklog/geeklog-1.3/language/english.php,v retrieving revision 1.82 retrieving revision 1.83 diff -C2 -d -r1.82 -r1.83 *** english.php 6 May 2003 10:31:02 -0000 1.82 --- english.php 20 May 2003 08:56:46 -0000 1.83 *************** *** 808,812 **** 10 => "Please fill in the Username, Full name, Security Level and Email Address fields", 11 => "User Manager", ! 12 => "To modify or delete a user, click on that user below. To create a new user click the new user button to the left. You can do simple searches by entering parts of a username,email address or fullname (e.g.*son* or *.edu) in the form below.", 13 => "SecLev", 14 => "Reg. Date", --- 808,812 ---- 10 => "Please fill in the Username, Full name, Security Level and Email Address fields", 11 => "User Manager", ! 12 => "To modify or delete a user, click on that user below. To create a new user click the new user button to the left. You can do simple searches by entering parts of a username, email address or fullname (e.g. *son* or *.edu) in the form below.", 13 => "SecLev", 14 => "Reg. Date", *************** *** 997,1004 **** 50 => "The group has been successfully deleted.", 51 => 'This username is already in use. Please choose another one.', ! 52 => 'The email address provided does not appear to be a valid email address', 53 => 'Your new password has been accepted. Please use your new password below to log in now.', 54 => 'Your request for a new password has expired. Please try again below.', ! 55 => 'An email has been sent to you and should arrive momentarily. Please follow the directions in the message to set a new password for your account.' ); --- 997,1005 ---- 50 => "The group has been successfully deleted.", 51 => 'This username is already in use. Please choose another one.', ! 52 => 'The email address provided does not appear to be a valid email address.', 53 => 'Your new password has been accepted. Please use your new password below to log in now.', 54 => 'Your request for a new password has expired. Please try again below.', ! 55 => 'An email has been sent to you and should arrive momentarily. Please follow the directions in the message to set a new password for your account.', ! 56 => 'The email address provided is already in use for another account.' ); From geeklog-cvs-admin at lists.geeklog.net Tue May 20 04:55:56 2003 From: geeklog-cvs-admin at lists.geeklog.net (geeklog-cvs-admin at lists.geeklog.net) Date: Tue, 20 May 2003 03:55:56 -0500 Subject: [geeklog-cvs] geeklog-1.3/public_html usersettings.php,1.58,1.59 Message-ID: <200305200855.h4K8tui29876@internal.geeklog.net> Update of /usr/cvs/geeklog/geeklog-1.3/public_html In directory internal.geeklog.net:/tmp/cvs-serv29863 Modified Files: usersettings.php Log Message: Added check for existing email address. Index: usersettings.php =================================================================== RCS file: /usr/cvs/geeklog/geeklog-1.3/public_html/usersettings.php,v retrieving revision 1.58 retrieving revision 1.59 diff -C2 -d -r1.58 -r1.59 *** usersettings.php 14 May 2003 10:48:52 -0000 1.58 --- usersettings.php 20 May 2003 08:55:54 -0000 1.59 *************** *** 446,449 **** --- 446,474 ---- /** + * Check if an email address already exists in the database + * + * @param email string email address to check + * @param uid int user id of current user + * @return bool true = exists, false = does not exist + * + */ + function emailAddressExists ($email, $uid) + { + global $_TABLES; + + $result = DB_query ("SELECT uid FROM {$_TABLES['users']} WHERE email = '{$email}'"); + $numrows = DB_numRows ($result); + for ($i = 0; $i < $numrows; $i++) { + $A = DB_fetchArray ($result); + if ($A['uid'] != $uid) { + // email address is already in use for another account + return true; + } + } + + return false; + } + + /** * Saves the user's information back to the database * *************** *** 486,490 **** $A['pgpkey'] = strip_tags (COM_stripslashes ($A['pgpkey'])); ! if (COM_isEmail ($A['email'])) { if ($_US_VERBOSE) { COM_errorLog('cooktime = ' . $A['cooktime'],1); --- 511,521 ---- $A['pgpkey'] = strip_tags (COM_stripslashes ($A['pgpkey'])); ! if (!COM_isEmail ($A['email'])) { ! return COM_refresh ($_CONF['site_url'] ! . '/usersettings.php?mode=edit&msg=52'); ! } else if (emailAddressExists ($A['email'], $_USER['uid'])) { ! return COM_refresh ($_CONF['site_url'] ! . '/usersettings.php?mode=edit&msg=56'); ! } else { if ($_US_VERBOSE) { COM_errorLog('cooktime = ' . $A['cooktime'],1); *************** *** 602,608 **** return COM_refresh ($_CONF['site_url'] . '/usersettings.php?mode=edit&msg=5'); - } else { - return COM_refresh ($_CONF['site_url'] - . '/usersettings.php?mode=edit&msg=52'); } } --- 633,636 ---- From geeklog-cvs-admin at lists.geeklog.net Tue May 20 04:57:44 2003 From: geeklog-cvs-admin at lists.geeklog.net (geeklog-cvs-admin at lists.geeklog.net) Date: Tue, 20 May 2003 03:57:44 -0500 Subject: [geeklog-cvs] geeklog-1.3/language german.php,1.70,1.71 Message-ID: <200305200857.h4K8vii29912@internal.geeklog.net> Update of /usr/cvs/geeklog/geeklog-1.3/language In directory internal.geeklog.net:/tmp/cvs-serv29898 Modified Files: german.php Log Message: Added message for existing email address warning; fixed typos; rephrased some texts; source code cosmetics. Index: german.php =================================================================== RCS file: /usr/cvs/geeklog/geeklog-1.3/language/german.php,v retrieving revision 1.70 retrieving revision 1.71 diff -C2 -d -r1.70 -r1.71 *** german.php 6 May 2003 10:31:02 -0000 1.70 --- german.php 20 May 2003 08:57:42 -0000 1.71 *************** *** 85,91 **** 36 => "am", 37 => "Keine Artikel.", ! 38 => "", 39 => "Neuladen", ! 40 => "", 41 => "G?ste", 42 => "Autor:", --- 85,91 ---- 36 => "am", 37 => "Keine Artikel.", ! 38 => '', 39 => "Neuladen", ! 40 => '', 41 => "G?ste", 42 => "Autor:", *************** *** 162,180 **** $LANG02 = array( ! 1 => "Terminkalender", ! 2 => "Sorry, es gibt keine Termine anzuzeigen.", ! 3 => "Wann", ! 4 => "Wo", ! 5 => "Beschreibung", ! 6 => "Termin hinzuf?gen", ! 7 => "Anstehende Termine", ! 8 => 'Wenn Du diesen Termin zu Deinem Kalender hinzuf?gst, kannst Du Dir schneller einen ?berblick ?ber die Termine verschaffen, die Dich interessieren, indem Du einfach auf "Mein Kalender" klickst.', ! 9 => "Zu Meinem Kalender hinzuf?gen", ! 10 => "Aus Meinem Kalender entfernen", ! 11 => "Termin wird zum Kalender von {$_USER['username']} hinzugef?gt", ! 12 => "Termin", ! 13 => "Beginnt", ! 14 => "Endet", ! 15 => "Zur?ck zum Kalender" ); --- 162,180 ---- $LANG02 = array( ! 1 => 'Terminkalender', ! 2 => 'Sorry, es gibt keine Termine anzuzeigen.', ! 3 => 'Wann', ! 4 => 'Wo', ! 5 => 'Beschreibung', ! 6 => 'Termin hinzuf?gen', ! 7 => 'Anstehende Termine', ! 8 => 'Wenn Du diesen Termin zu Deinem Kalender hinzuf?gst, kannst Du Dir schneller einen ?berblick ?ber die Termine verschaffen, die Dich interessieren, indem Du einfach auf "Mein Kalender" klickst.', ! 9 => 'Zu Meinem Kalender hinzuf?gen', ! 10 => 'Aus Meinem Kalender entfernen', ! 11 => "Termin wird zum Kalender von {$_USER['username']} hinzugef?gt", ! 12 => 'Termin', ! 13 => 'Beginnt', ! 14 => 'Endet', ! 15 => 'Zur?ck zum Kalender' ); *************** *** 183,210 **** $LANG03 = array( ! 1 => "Kommentar schreiben", ! 2 => "Format", ! 3 => "Abmelden", ! 4 => "Account anlegen", ! 5 => "Username", ! 6 => "Um einen Kommentar abgeben zu k?nnen, musst Du angemeldet sein. Wenn Du noch keinen Account hast, benutze bitte das Formular um einen anzulegen.", ! 7 => "Dein letzter Kommentar war vor ", ! 8 => " Sekunden. Zwischen zwei Kommentaren m?ssen aber mindestens {$_CONF["commentspeedlimit"]} Sekunden vergangen sein.", ! 9 => "Kommentar", ! 10 => '', ! 11 => "Kommentar abschicken", ! 12 => "Bitte die Felder Betreff und Kommentar ausf?llen, um einen Kommentar zu diesem Artikel abzugeben.", ! 13 => "Deine Information", ! 14 => "Vorschau", ! 15 => "", ! 16 => "Betreff", ! 17 => "Fehler", ! 18 => 'Wichtige Hinweise:', ! 19 => 'Bitte gib nur Kommentare ab, die zum Thema geh?ren.', ! 20 => 'Beziehe Dich m?glichst auf Kommentare anderer Personen statt einen neuen Thread zu er?ffnen.', ! 21 => 'Lies bitte die vorhandenen Kommentare bevor Du Deinen eigenen abgibst, um nicht noch einmal zu schreiben, was schon gesagt wurde.', ! 22 => 'Benutze eine eindeutige Betreffzeile, die den Inhalt Deines Kommentars zusammenfasst.', ! 23 => 'Deine E-Mail-Adresse wird NICHT ver?ffentlicht.', ! 24 => 'Anonymous' ); --- 183,210 ---- $LANG03 = array( ! 1 => 'Kommentar schreiben', ! 2 => 'Format', ! 3 => 'Abmelden', ! 4 => 'Account anlegen', ! 5 => 'Username', ! 6 => 'Um einen Kommentar abgeben zu k?nnen, musst Du angemeldet sein. Wenn Du noch keinen Account hast, benutze bitte das Formular um einen anzulegen.', ! 7 => 'Dein letzter Kommentar war vor ', ! 8 => " Sekunden. Zwischen zwei Kommentaren m?ssen aber mindestens {$_CONF['commentspeedlimit']} Sekunden vergangen sein.", ! 9 => 'Kommentar', ! 10 => '', ! 11 => 'Kommentar abschicken', ! 12 => 'Bitte die Felder Betreff und Kommentar ausf?llen, um einen Kommentar zu diesem Artikel abzugeben.', ! 13 => 'Deine Information', ! 14 => 'Vorschau', ! 15 => '', ! 16 => 'Betreff', ! 17 => 'Fehler', ! 18 => 'Wichtige Hinweise:', ! 19 => 'Bitte gib nur Kommentare ab, die zum Thema geh?ren.', ! 20 => 'Beziehe Dich m?glichst auf Kommentare anderer Personen statt einen neuen Thread zu er?ffnen.', ! 21 => 'Lies bitte die vorhandenen Kommentare bevor Du Deinen eigenen abgibst, um nicht noch einmal zu schreiben, was schon gesagt wurde.', ! 22 => 'Benutze eine eindeutige Betreffzeile, die den Inhalt Deines Kommentars zusammenfasst.', ! 23 => 'Deine E-Mail-Adresse wird NICHT ver?ffentlicht.', ! 24 => 'Anonymous' ); *************** *** 312,321 **** $LANG05 = array( ! 1 => "Keine Artikel", ! 2 => "Es gibt keine Artikel, die angezeigt werden k?nnten. Entweder gibt es f?r diese Kategorie keine Artikel oder Deine Einstellungen sind zu restriktiv", ! 3 => " f?r die Kategorie $topic.", ! 4 => "Hauptartikel", ! 5 => "weiter", ! 6 => "zur?ck" ); --- 312,321 ---- $LANG05 = array( ! 1 => 'Keine Artikel', ! 2 => 'Es gibt keine Artikel, die angezeigt werden k?nnten. Entweder gibt es f?r diese Kategorie keine Artikel oder Deine Einstellungen sind zu restriktiv', ! 3 => " f?r die Kategorie $topic.", ! 4 => 'Hauptartikel', ! 5 => 'weiter', ! 6 => 'zur?ck' ); *************** *** 324,330 **** $LANG06 = array( ! 1 => "Links", ! 2 => "Es gibt keine Links anzuzeigen.", ! 3 => "Link hinzuf?gen" ); --- 324,330 ---- $LANG06 = array( ! 1 => 'Links', ! 2 => 'Es gibt keine Links anzuzeigen.', ! 3 => 'Link hinzuf?gen' ); *************** *** 333,341 **** $LANG07 = array( ! 1 => "Stimme gespeichert", ! 2 => "Deine Stimme wurde f?r die Umfrage gespeichert: ", ! 3 => "Stimme", ! 4 => "Umfragen im System", ! 5 => "Stimme(n)" ); --- 333,341 ---- $LANG07 = array( ! 1 => 'Stimme gespeichert', ! 2 => 'Deine Stimme wurde f?r die Umfrage gespeichert: ', ! 3 => 'Stimme', ! 4 => 'Umfragen im System', ! 5 => 'Stimme(n)' ); *************** *** 432,459 **** $LANG10 = array( ! 1 => "Site-Statistik", ! 2 => "Gesamtzahl der Seitenabrufe", ! 3 => "Anzahl Artikel (Kommentare)", ! 4 => "Anzahl Umfragen (Stimmen)", ! 5 => "Anzahl Links (Klicks)", ! 6 => "Anzahl Termine", ! 7 => "Top Ten der Artikel", ! 8 => "Artikel-?berschrift", ! 9 => "Angezeigt", ! 10 => "Es gibt keine Artikel oder sie wurden von niemandem gelesen.", ! 11 => "Top Ten der Kommentare", ! 12 => "Kommentare", ! 13 => "Es gibt keine Artikel oder es wurden keine Kommentare dazu abgegeben.", ! 14 => "Top Ten der Umfragen", ! 15 => "Thema der Umfrage", ! 16 => "Stimmen", ! 17 => "Es gibt keine Umfragen oder es wurden keine Stimmen abgegeben.", ! 18 => "Top Ten der Links", ! 19 => "Links", ! 20 => "Angeklickt", ! 21 => "Es gibt keine Links oder sie wurden von niemandem angeklickt.", ! 22 => "Top Ten der verschickten Artikel", ! 23 => "E-Mails", ! 24 => "Es wurden keine Artikel per E-Mail verschickt." ); --- 432,459 ---- $LANG10 = array( ! 1 => 'Site-Statistik', ! 2 => 'Gesamtzahl der Seitenabrufe', ! 3 => 'Anzahl Artikel (Kommentare)', ! 4 => 'Anzahl Umfragen (Stimmen)', ! 5 => 'Anzahl Links (Klicks)', ! 6 => 'Anzahl Termine', ! 7 => 'Top Ten der Artikel', ! 8 => 'Artikel-?berschrift', ! 9 => 'Angezeigt', ! 10 => 'Es gibt keine Artikel oder sie wurden von niemandem gelesen.', ! 11 => 'Top Ten der Kommentare', ! 12 => 'Kommentare', ! 13 => 'Es gibt keine Artikel oder es wurden keine Kommentare dazu abgegeben.', ! 14 => 'Top Ten der Umfragen', ! 15 => 'Thema der Umfrage', ! 16 => 'Stimmen', ! 17 => 'Es gibt keine Umfragen oder es wurden keine Stimmen abgegeben.', ! 18 => 'Top Ten der Links', ! 19 => 'Links', ! 20 => 'Angeklickt', ! 21 => 'Es gibt keine Links oder sie wurden von niemandem angeklickt.', ! 22 => 'Top Ten der verschickten Artikel', ! 23 => 'E-Mails', ! 24 => 'Es wurden keine Artikel per E-Mail verschickt.' ); *************** *** 462,469 **** $LANG11 = array( ! 1 => "Zum Thema", ! 2 => "An einen Freund schicken", ! 3 => "Druckf?hige Version", ! 4 => "Optionen" ); --- 462,469 ---- $LANG11 = array( ! 1 => 'Zum Thema', ! 2 => 'An einen Freund schicken', ! 3 => 'Druckf?hige Version', ! 4 => 'Optionen' ); *************** *** 492,496 **** 19 => "Bitte lesen", 20 => "Fehler: Kategorie fehlt", ! 21 => "When selecting \"Other\" please also provide a category name", 22 => "Fehler: Nicht alle Felder ausgef?llt", 23 => "Bitte alle Felder des Formulars ausf?llen. Alle Felder werden ben?tigt.", --- 492,496 ---- 19 => "Bitte lesen", 20 => "Fehler: Kategorie fehlt", ! 21 => 'Wenn Du "Andere" ausw?hlst, gib bitte auch eine neue Kategorie ein', 22 => "Fehler: Nicht alle Felder ausgef?llt", 23 => "Bitte alle Felder des Formulars ausf?llen. Alle Felder werden ben?tigt.", *************** *** 536,546 **** $LANG20 = array( ! 1 => "Bitte authentifizieren!", ! 2 => "Zugriff verweigert! Login-Information ung?ltig", ! 3 => "Ung?ltiges Passwort f?r User", ! 4 => "Username:", ! 5 => "Passwort:", ! 6 => "Zugriffe auf die Administrationsseiten dieser Website werden aufgezeichnet und kontrolliert.
Diese Seiten sind nur f?r befugte Personen zug?nglich.", ! 7 => "einloggen" ); --- 536,546 ---- $LANG20 = array( ! 1 => 'Bitte authentifizieren!', ! 2 => 'Zugriff verweigert! Login-Information ung?ltig', ! 3 => 'Ung?ltiges Passwort f?r User', ! 4 => 'Username:', ! 5 => 'Passwort:', ! 6 => 'Zugriffe auf die Administrationsseiten dieser Website werden aufgezeichnet und kontrolliert.
Diese Seiten sind nur f?r befugte Personen zug?nglich.', ! 7 => 'einloggen' ); *************** *** 552,556 **** 2 => "Du hast nicht die n?tigen Rechte, um diesen Block ?ndern zu k?nnen.", 3 => "Block-Editor", ! 4 => "", 5 => "Block-Titel", 6 => "Kategorie", --- 552,556 ---- 2 => "Du hast nicht die n?tigen Rechte, um diesen Block ?ndern zu k?nnen.", 3 => "Block-Editor", ! 4 => '', 5 => "Block-Titel", 6 => "Kategorie", *************** *** 612,616 **** $LANG22 = array( 1 => "Termin-Editor", ! 2 => "", 3 => "Titel", 4 => "URL", --- 612,616 ---- $LANG22 = array( 1 => "Termin-Editor", ! 2 => '', 3 => "Titel", 4 => "URL", *************** *** 640,644 **** $LANG23 = array( 1 => "Link-Editor", ! 2 => "", 3 => "Titel", 4 => "URL", --- 640,644 ---- $LANG23 = array( 1 => "Link-Editor", ! 2 => '', 3 => "Titel", 4 => "URL", *************** *** 679,683 **** 10 => "Abbruch", 11 => "L?schen", ! 12 => "", 13 => "Titel", 14 => "Kategorie", --- 679,683 ---- 10 => "Abbruch", 11 => "L?schen", ! 12 => '', 13 => "Titel", 14 => "Kategorie", *************** *** 687,701 **** 18 => "Treffer", 19 => "Kommentare", ! 20 => "", ! 21 => "", 22 => "Artikel-Liste", 23 => "Auf die Nummer klicken, um einen Artikel zu ?ndern oder zu l?schen. Um einen Artikel anzusehen, auf dessen Titel klicken. Auf Neuer Artikel (s.o.) klicken, um einen neuen Artikel zu schreiben.", ! 24 => "", ! 25 => "", 26 => "Artikel-Vorschau", ! 27 => "", ! 28 => "", ! 29 => "", ! 30 => "", 31 => "Bitte mindestens die Felder Titel und Einleitung ausf?llen", 32 => "Hauptartikel", --- 687,701 ---- 18 => "Treffer", 19 => "Kommentare", ! 20 => '', ! 21 => '', 22 => "Artikel-Liste", 23 => "Auf die Nummer klicken, um einen Artikel zu ?ndern oder zu l?schen. Um einen Artikel anzusehen, auf dessen Titel klicken. Auf Neuer Artikel (s.o.) klicken, um einen neuen Artikel zu schreiben.", ! 24 => '', ! 25 => '', 26 => "Artikel-Vorschau", ! 27 => '', ! 28 => '', ! 29 => '', ! 30 => '', 31 => "Bitte mindestens die Felder Titel und Einleitung ausf?llen", 32 => "Hauptartikel", *************** *** 732,736 **** $LANG25 = array( 1 => "Modus", ! 2 => "", 3 => "angelegt", 4 => "Umfrage $qid wurde gespeichert", --- 732,736 ---- $LANG25 = array( 1 => "Modus", ! 2 => '', 3 => "angelegt", 4 => "Umfrage $qid wurde gespeichert", *************** *** 747,751 **** 15 => "Abbruch", 16 => "L?schen", ! 17 => "", 18 => "Liste der Umfragen", 19 => "Um eine Umfrage zu ?ndern oder l?schen, auf die Umfrage klicken. Mit Neue Umfrage (s.o.) wird eine neue Umfrage angelegt.", --- 747,751 ---- 15 => "Abbruch", 16 => "L?schen", ! 17 => '', 18 => "Liste der Umfragen", 19 => "Um eine Umfrage zu ?ndern oder l?schen, auf die Umfrage klicken. Mit Neue Umfrage (s.o.) wird eine neue Umfrage angelegt.", *************** *** 837,859 **** $LANG29 = array( ! 1 => "Akzeptieren", ! 2 => "L?schen", ! 3 => "Editieren", 4 => 'Profil', ! 10 => "Titel", ! 11 => "Startdatum", ! 12 => "URL", ! 13 => "Kategorie", ! 14 => "Datum", ! 15 => "Kategorie", 16 => 'Username', 17 => 'Name', 18 => 'E-Mail', ! 34 => "Kommandozentrale", ! 35 => "Beitr?ge: Artikel", ! 36 => "Beitr?ge: Links", ! 37 => "Beitr?ge: Termine", ! 38 => "Abschicken", ! 39 => "Derzeit gibt es keine Beitr?ge zu moderieren.", 40 => 'Neue User' ); --- 837,859 ---- $LANG29 = array( ! 1 => 'Akzeptieren', ! 2 => 'L?schen', ! 3 => 'Editieren', 4 => 'Profil', ! 10 => 'Titel', ! 11 => 'Startdatum', ! 12 => 'URL', ! 13 => 'Kategorie', ! 14 => 'Datum', ! 15 => 'Kategorie', 16 => 'Username', 17 => 'Name', 18 => 'E-Mail', ! 34 => 'Kommandozentrale', ! 35 => 'Beitr?ge: Artikel', ! 36 => 'Beitr?ge: Links', ! 37 => 'Beitr?ge: Termine', ! 38 => 'Abschicken', ! 39 => 'Derzeit gibt es keine Beitr?ge zu moderieren.', 40 => 'Neue User' ); *************** *** 996,1000 **** 53 => 'Dein neues Passwort wurde gespeichert. Bitte melde Dich nun mit dem neuen Passwort an.', 54 => 'Diese Anfrage f?r ein neues Passwort ist nicht mehr g?ltig. Bitte fordere erneut ein neues Passwort an.', ! 55 => 'Du solltest in K?rze eine E-Mail erhalten, in der beschrieben wird, wie Du ein neues Passwort f?r Deinen Account eingeben kannst.' ); --- 996,1001 ---- 53 => 'Dein neues Passwort wurde gespeichert. Bitte melde Dich nun mit dem neuen Passwort an.', 54 => 'Diese Anfrage f?r ein neues Passwort ist nicht mehr g?ltig. Bitte fordere erneut ein neues Passwort an.', ! 55 => 'Du solltest in K?rze eine E-Mail erhalten, in der beschrieben wird, wie Du ein neues Passwort f?r Deinen Account eingeben kannst.', ! 56 => 'Die angegebene E-Mail-Adresse wird schon f?r einen anderen Account verwendet.' ); *************** *** 1002,1027 **** $LANG32 = array ( ! 1 => "Installing plugins could possibly cause damage to your Geeklog installation and, possibly, to your system. It is important that you only install plugins downloaded from the Geeklog Homepage as we thoroughly test all plugins submitted to our site on a variety of operating systems. It is important that you understand that the plugin installation process will require the execution of a few filesystem commands which could lead to security problems particularly if you use plugins from third party sites. Even with this warning you are getting, we do not gaurantee the success of any installation nor are we liable for damage caused by installing a Geeklog plugin. In other words, install at your own risk. For the wary, directions on how to manually install a plugin is included with each plugin package.", ! 2 => "Plugin-Installation -- Disclaimer", ! 3 => "Plugin-Installationsformular", ! 4 => "Plugin-Datei", ! 5 => "Plugin-Liste", ! 6 => "Warnung: Plugin schon installiert!", ! 7 => "Das Plugin, das Du installieren willst, ist schon vorhande. Bitte l?sche es, bevor Du noch einmal versuchst, es zu installieren", ! 8 => "Plugin-Kompatibilit?tstest fehlgeschlagen", ! 9 => "Dieses Plugin ben?tigt eine neuere Version von Geeklog. Abhilfe schafft ein Update von Geeklog oder evtl. eine andere Version dieses Plugins.", ! 10 => "
Es sind derzeit keine Plugins installiert.

", ! 11 => "Um ein Plugin zu ?ndern oder l?schen, auf die Nummer des Plugins klicken. Wenn Du auf den Namen des Plugins klickst, wird die Homepage des Plugins aufgerufen. Um ein Plugin zu installieren oder aktualisieren bitte dessen Dokumentation lesen.", ! 12 => '(kein Name angegeben)', ! 13 => 'Plugin-Editor', ! 14 => 'Neues Plugin', ! 15 => 'Admin Home', ! 16 => 'Name des Plugins', ! 17 => 'Plugin-Version', ! 18 => 'Geeklog-Version', ! 19 => 'Aktiv', ! 20 => 'Ja', ! 21 => 'Nein', ! 22 => 'Installieren', 23 => 'Speichern', 24 => 'Abbruch', --- 1003,1028 ---- $LANG32 = array ( ! 1 => 'Installing plugins could possibly cause damage to your Geeklog installation and, possibly, to your system. It is important that you only install plugins downloaded from the Geeklog Homepage as we thoroughly test all plugins submitted to our site on a variety of operating systems. It is important that you understand that the plugin installation process will require the execution of a few filesystem commands which could lead to security problems particularly if you use plugins from third party sites. Even with this warning you are getting, we do not gaurantee the success of any installation nor are we liable for damage caused by installing a Geeklog plugin. In other words, install at your own risk. For the wary, directions on how to manually install a plugin is included with each plugin package.', ! 2 => 'Plugin-Installation -- Disclaimer', ! 3 => 'Plugin-Installationsformular', ! 4 => 'Plugin-Datei', ! 5 => 'Plugin-Liste', ! 6 => 'Warnung: Plugin schon installiert!', ! 7 => 'Das Plugin, das Du installieren willst, ist schon vorhanden. Bitte l?sche es, bevor Du noch einmal versuchst, es zu installieren', ! 8 => 'Plugin-Kompatibilit?tstest fehlgeschlagen', ! 9 => 'Dieses Plugin ben?tigt eine neuere Version von Geeklog. Abhilfe schafft ein Update von Geeklog oder evtl. eine andere Version dieses Plugins.', ! 10 => '
Es sind derzeit keine Plugins installiert.

', ! 11 => "Um ein Plugin zu ?ndern oder l?schen, auf die Nummer des Plugins klicken. Wenn Du auf den Namen des Plugins klickst, wird die Homepage des Plugins aufgerufen. Um ein Plugin zu installieren oder aktualisieren bitte dessen Dokumentation lesen.", ! 12 => '(kein Name angegeben)', ! 13 => 'Plugin-Editor', ! 14 => 'Neues Plugin', ! 15 => 'Admin Home', ! 16 => 'Name des Plugins', ! 17 => 'Plugin-Version', ! 18 => 'Geeklog-Version', ! 19 => 'Aktiv', ! 20 => 'Ja', ! 21 => 'Nein', ! 22 => 'Installieren', 23 => 'Speichern', 24 => 'Abbruch', *************** *** 1036,1078 **** $LANG_ACCESS = array( ! access => "Zugriff", ! ownerroot => "Eigent./Root", ! group => "Gruppe", ! readonly => "Nur Lesen", ! accessrights => "Zugriffsrechte", ! owner => "Eigent.", ! grantgrouplabel => "Grant Above Group Edit Rights", ! permmsg => "Hinweis: Mitglieder meint alle eingeloggten Mitglieder und Anonymous steht f?r alle nicht eingeloggten Besucher.", ! securitygroups => "Security-Gruppen", editrootmsg => "Even though you are a User Administrator, you can't edit a root user without first being a root user yourself. You can edit all other users except root users. Please note that all attempts to illegally edit root users are logged. Please go back to the User Administration page.", ! securitygroupsmsg => "Mit den Checkboxen kannst Du festlegen, zu welchen Gruppen dieser User geh?rt.", ! groupeditor => "Gruppen-Editor", ! description => "Beschreibung", ! name => "Name", ! rights => "Rechte", ! missingfields => "Fehlende Angaben", ! missingfieldsmsg => "Du musst den Namen und eine Beschreibung f?r die Gruppe angeben.", ! groupmanager => "Gruppen-Manager", ! newgroupmsg => "Um eine Gruppe zu ?ndern oder l?schen, einfach auf den Namen der Gruppe klicken. Neue Gruppe (s.o.) legt eine neue Gruppe an. Hinweis: Core-Gruppen k?nnen nicht gel?scht werden, da sie vom System ben?tigt werden.", ! groupname => "Gruppen-Name", ! coregroup => "Core-Gruppe", ! yes => "Ja", ! no => "Nein", corerightsdescr => "Diese Gruppe ist eine Core-Gruppe auf {$_CONF["site_name"]}. Die Rechte dieser Gruppe k?nnen daher nicht ge?ndert werden. Das Folgende ist eine (nicht ver?nderbare) Liste der Rechte dieser Gruppe.", ! groupmsg => "Security-Gruppen auf dieser Site sind hierarchisch organisiert. Wenn Du diese Gruppe zu einer der folgenden Gruppen hinzuf?gst, bekommt diese Gruppe die gleichen Rechte wie die unten ausgew?hlte(n). Wenn m?glich, sollten Gruppenrechte durch Auswahl von Gruppen aus dieser Liste vergeben werden. Werden nur einzelne Rechte ben?tigt, k?nnen diese auch aus der Liste der Rechte weiter unten ausgew?hlt werden. Um diese Gruppe zu einer der folgenden hinzuzuf?gen, kannst Du die gew?nschte(n) Gruppe(n) einfach anklicken.", coregroupmsg => "Diese Gruppe ist eine Core-Gruppe auf {$_CONF["site_name"]}. Die Rechte dieser Gruppe k?nnen daher nicht ge?ndert werden. Das Folgende ist eine (nicht ver?nderbare) Liste der Gruppen, zu der diese Gruppe geh?rt.", ! rightsdescr => "Die folgenden Rechte k?nnen an eine Gruppe entweder direkt (durch Ausw?hlen) oder indirekt vergeben werden (wenn die Gruppe zu einer anderen Gruppe geh?rt, die diese Rechte hat). Die im Folgenden aufgef?hrten Rechte ohne Checkbox sind indirekte Rechte, die von einer anderen Gruppe geerbt wurden, zu der die aktuelle Gruppe geh?rt. Alle anderen Rechte k?nnen hier direkt vergeben werden.", ! lock => "Lock", ! members => "Mitglieder", ! anonymous => "Anonymous", ! permissions => "Rechte", ! permissionskey => "R = lesen, E = editieren, Editier-Rechte setzen Lese-Rechte voraus", ! edit => "Edit", ! none => "None", ! accessdenied => "Zugriff verweigert", storydenialmsg => "Du hast nicht die n?tigen Rechte, um diesen Artikel zu lesen. M?glicherweise bist Du kein registrierter User von {$_CONF["site_name"]}. Bitte melde Dich als neuer User von {$_CONF["site_name"]} an um vollen Zugriff auf alle Bereiche zu bekommen.", eventdenialmsg => "Du hast nicht die n?tigen Rechte, um diesen Termin abzurufen. M?glicherweise bist Du kein registrierter User von {$_CONF["site_name"]}. Bitte melde Dich als neuer User von {$_CONF["site_name"]} an um vollen Zugriff auf alle Bereiche zu bekommen.", ! nogroupsforcoregroup => "Diese Gruppe geh?rt zu keiner anderen Gruppe.", ! grouphasnorights => "Diese Gruppe hat keine Rechte f?r die Administration der Website", newgroup => 'Neue Gruppe', adminhome => 'Admin Home', --- 1037,1079 ---- $LANG_ACCESS = array( ! access => 'Zugriff', ! ownerroot => 'Eigent./Root', ! group => 'Gruppe', ! readonly => 'Nur Lesen', ! accessrights => 'Zugriffsrechte', ! owner => 'Eigent.', ! grantgrouplabel => 'Grant Above Group Edit Rights', ! permmsg => 'Hinweis: Mitglieder meint alle eingeloggten Mitglieder und Anonymous steht f?r alle nicht eingeloggten Besucher.', ! securitygroups => 'Security-Gruppen', editrootmsg => "Even though you are a User Administrator, you can't edit a root user without first being a root user yourself. You can edit all other users except root users. Please note that all attempts to illegally edit root users are logged. Please go back to the User Administration page.", ! securitygroupsmsg => 'Mit den Checkboxen kannst Du festlegen, zu welchen Gruppen dieser User geh?rt.', ! groupeditor => 'Gruppen-Editor', ! description => 'Beschreibung', ! name => 'Name', ! rights => 'Rechte', ! missingfields => 'Fehlende Angaben', ! missingfieldsmsg => 'Du musst den Namen und eine Beschreibung f?r die Gruppe angeben.', ! groupmanager => 'Gruppen-Manager', ! newgroupmsg => 'Um eine Gruppe zu ?ndern oder l?schen, einfach auf den Namen der Gruppe klicken. Neue Gruppe (s.o.) legt eine neue Gruppe an. Hinweis: Core-Gruppen k?nnen nicht gel?scht werden, da sie vom System ben?tigt werden.', ! groupname => 'Gruppen-Name', ! coregroup => 'Core-Gruppe', ! yes => 'Ja', ! no => 'Nein', corerightsdescr => "Diese Gruppe ist eine Core-Gruppe auf {$_CONF["site_name"]}. Die Rechte dieser Gruppe k?nnen daher nicht ge?ndert werden. Das Folgende ist eine (nicht ver?nderbare) Liste der Rechte dieser Gruppe.", ! groupmsg => 'Security-Gruppen auf dieser Site sind hierarchisch organisiert. Wenn Du diese Gruppe zu einer der folgenden Gruppen hinzuf?gst, bekommt diese Gruppe die gleichen Rechte wie die unten ausgew?hlte(n). Wenn m?glich, sollten Gruppenrechte durch Auswahl von Gruppen aus dieser Liste vergeben werden. Werden nur einzelne Rechte ben?tigt, k?nnen diese auch aus der Liste der Rechte weiter unten ausgew?hlt werden. Um diese Gruppe zu einer der folgenden hinzuzuf?gen, kannst Du die gew?nschte(n) Gruppe(n) einfach anklicken.', coregroupmsg => "Diese Gruppe ist eine Core-Gruppe auf {$_CONF["site_name"]}. Die Rechte dieser Gruppe k?nnen daher nicht ge?ndert werden. Das Folgende ist eine (nicht ver?nderbare) Liste der Gruppen, zu der diese Gruppe geh?rt.", ! rightsdescr => 'Die folgenden Rechte k?nnen an eine Gruppe entweder direkt (durch Ausw?hlen) oder indirekt vergeben werden (wenn die Gruppe zu einer anderen Gruppe geh?rt, die diese Rechte hat). Die im Folgenden aufgef?hrten Rechte ohne Checkbox sind indirekte Rechte, die von einer anderen Gruppe geerbt wurden, zu der die aktuelle Gruppe geh?rt. Alle anderen Rechte k?nnen hier direkt vergeben werden.', ! lock => 'Lock', ! members => 'Mitglieder', ! anonymous => 'Anonymous', ! permissions => 'Rechte', ! permissionskey => 'R = lesen, E = editieren, Editier-Rechte setzen Lese-Rechte voraus', ! edit => 'Edit', ! none => 'None', ! accessdenied => 'Zugriff verweigert', storydenialmsg => "Du hast nicht die n?tigen Rechte, um diesen Artikel zu lesen. M?glicherweise bist Du kein registrierter User von {$_CONF["site_name"]}. Bitte melde Dich als neuer User von {$_CONF["site_name"]} an um vollen Zugriff auf alle Bereiche zu bekommen.", eventdenialmsg => "Du hast nicht die n?tigen Rechte, um diesen Termin abzurufen. M?glicherweise bist Du kein registrierter User von {$_CONF["site_name"]}. Bitte melde Dich als neuer User von {$_CONF["site_name"]} an um vollen Zugriff auf alle Bereiche zu bekommen.", ! nogroupsforcoregroup => 'Diese Gruppe geh?rt zu keiner anderen Gruppe.', ! grouphasnorights => 'Diese Gruppe hat keine Rechte f?r die Administration der Website', newgroup => 'Neue Gruppe', adminhome => 'Admin Home', *************** *** 1083,1097 **** ); - #admin/word.php - $LANG_WORDS = array( - editor => "Word Replacment editor", - wordid => "Word ID", - intro => "To modify or delete a word, click on that word. To create a new word replacement click the new word button to the left.", - wordmanager => "Word Manager", - word => "Word", - replacmentword => "Replacment Word", - newword => "New Word" - ); - $LANG_DB_BACKUP = array( last_ten_backups => 'Die 10 letzten Backups', --- 1084,1087 ---- *************** *** 1111,1124 **** $LANG_BUTTONS = array( ! 1 => "Home", ! 2 => "Kontakt", ! 3 => "Mitmachen", ! 4 => "Links", ! 5 => "Umfragen", ! 6 => "Kalender", ! 7 => "Statistik", ! 8 => "Einstellungen", ! 9 => "Suchen", ! 10 => "Erweiterte Suche" ); --- 1101,1114 ---- $LANG_BUTTONS = array( ! 1 => 'Home', ! 2 => 'Kontakt', ! 3 => 'Mitmachen', ! 4 => 'Links', ! 5 => 'Umfragen', ! 6 => 'Kalender', ! 7 => 'Statistik', ! 8 => 'Einstellungen', ! 9 => 'Suchen', ! 10 => 'Erweiterte Suche' ); From geeklog-cvs-admin at lists.geeklog.net Wed May 21 06:33:23 2003 From: geeklog-cvs-admin at lists.geeklog.net (geeklog-cvs-admin at lists.geeklog.net) Date: Wed, 21 May 2003 05:33:23 -0500 Subject: [geeklog-cvs] geeklog-1.3/system lib-sessions.php,1.16,1.17 Message-ID: <200305211033.h4LAXNi23691@internal.geeklog.net> Update of /usr/cvs/geeklog/geeklog-1.3/system In directory internal.geeklog.net:/tmp/cvs-serv23666 Modified Files: lib-sessions.php Log Message: Added debug output and cleaned up comments in SESS_setSessionCookie(). Index: lib-sessions.php =================================================================== RCS file: /usr/cvs/geeklog/geeklog-1.3/system/lib-sessions.php,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** lib-sessions.php 8 May 2003 17:23:10 -0000 1.16 --- lib-sessions.php 21 May 2003 10:33:20 -0000 1.17 *************** *** 245,249 **** // Create new session ! $sql = "INSERT INTO {$_TABLES['sessions']} (sess_id, md5_sess_id, uid, start_time, remote_ip) VALUES ($sessid, '$md5_sessid', $userid, $currtime, '$remote_ip')"; $result = DB_query($sql); if ($result) { --- 245,253 ---- // Create new session ! if (empty ($md5_sessid)) { ! $sql = "INSERT INTO {$_TABLES['sessions']} (sess_id, uid, start_time, remote_ip) VALUES ($sessid, $userid, $currtime, '$remote_ip')"; ! } else { ! $sql = "INSERT INTO {$_TABLES['sessions']} (sess_id, md5_sess_id, uid, start_time, remote_ip) VALUES ($sessid, '$md5_sessid', $userid, $currtime, '$remote_ip')"; ! } $result = DB_query($sql); if ($result) { *************** *** 269,284 **** * * @param string $sessid Session ID to save to cookie ! * @param string $cookietime Cookie timeout value * @param string $cookiename Name of cookie to save sessiond ID to * @param string $cookiepath Path in which cookie should be sent to server for * @param string $cookiedomain Domain in which cookie should be sent to server for ! * @param string $cookiesecure Not sure but don't use it anyway * */ function SESS_setSessionCookie($sessid, $cookietime, $cookiename, $cookiepath, $cookiedomain, $cookiesecure) { ! // This sets a cookie that will persist until the user closes their browser window. ! // since session expiry is handled on the server-side, cookie expiry time isn't a big deal. ! setcookie($cookiename,$sessid,0,$cookiepath,$cookiedomain,$cookiesecure); } --- 273,298 ---- * * @param string $sessid Session ID to save to cookie ! * @param int $cookietime Cookie timeout value (not used) * @param string $cookiename Name of cookie to save sessiond ID to * @param string $cookiepath Path in which cookie should be sent to server for * @param string $cookiedomain Domain in which cookie should be sent to server for ! * @param int $cookiesecure if =1, set cookie only on https connection * */ function SESS_setSessionCookie($sessid, $cookietime, $cookiename, $cookiepath, $cookiedomain, $cookiesecure) { ! global $_SESS_VERBOSE; ! ! // This sets a cookie that will persist until the user closes their browser ! // window. since session expiry is handled on the server-side, cookie expiry ! // time isn't a big deal. ! if ($_SESS_VERBOSE) { ! COM_errorLog ("Setting session cookie: setcookie($cookiename, $sessid, 0, $cookiepath, $cookiedomain, $cookiesecure);", 1); ! } ! ! if (setcookie ($cookiename, $sessid, 0, $cookiepath, $cookiedomain, ! $cookiesecure) === false) { ! COM_errorLog ('Failed to set session cookie.', 1); ! } } From geeklog-cvs-admin at lists.geeklog.net Wed May 21 11:49:06 2003 From: geeklog-cvs-admin at lists.geeklog.net (geeklog-cvs-admin at lists.geeklog.net) Date: Wed, 21 May 2003 10:49:06 -0500 Subject: [geeklog-cvs] geeklog-1.3/public_html/admin database.php,1.9,1.10 Message-ID: <200305211549.h4LFn6i28353@internal.geeklog.net> Update of /usr/cvs/geeklog/geeklog-1.3/public_html/admin In directory internal.geeklog.net:/tmp/cvs-serv28319/public_html/admin Modified Files: database.php Log Message: Moved -Q option for mysqldump to new config option $_CONF['mysqldump_options'] Index: database.php =================================================================== RCS file: /usr/cvs/geeklog/geeklog-1.3/public_html/admin/database.php,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** database.php 9 Apr 2003 15:07:07 -0000 1.9 --- database.php 21 May 2003 15:49:04 -0000 1.10 *************** *** 60,71 **** if ($mode == $LANG_DB_BACKUP['do_backup']) { ! if(is_dir($_CONF['backup_path'])) { ! $curdatetime = date("Y_m_d"); ! $backupfile = "{$_CONF['backup_path']}geeklog_db_backup_{$curdatetime}.sql"; ! if (!empty($_DB_pass)) { ! $command = $_DB_mysqldump_path . " -h$_DB_host -u$_DB_user -p$_DB_pass -Q $_DB_name > {$backupfile}"; ! } else { ! $command = $_DB_mysqldump_path . " -h$_DB_host -u$_DB_user -Q $_DB_name > {$backupfile}"; ! } if (function_exists ('is_executable')) { $canExec = is_executable($_DB_mysqldump_path); --- 60,75 ---- if ($mode == $LANG_DB_BACKUP['do_backup']) { ! if (is_dir ($_CONF['backup_path'])) { ! $curdatetime = date ("Y_m_d"); ! $backupfile = "{$_CONF['backup_path']}geeklog_db_backup_{$curdatetime}.sql"; ! $command = $_DB_mysqldump_path . " -h$_DB_host -u$_DB_user"; ! if (!empty ($_DB_pass)) { ! $command .= " -p$_DB_pass"; ! } ! if (!empty ($_CONF['mysqldump_options'])) { ! $command .= ' ' . $_CONF['mysqldump_options']; ! } ! $command .= " $_DB_name > {$backupfile}"; ! if (function_exists ('is_executable')) { $canExec = is_executable($_DB_mysqldump_path); From geeklog-cvs-admin at lists.geeklog.net Wed May 21 11:49:06 2003 From: geeklog-cvs-admin at lists.geeklog.net (geeklog-cvs-admin at lists.geeklog.net) Date: Wed, 21 May 2003 10:49:06 -0500 Subject: [geeklog-cvs] geeklog-1.3 config.php,1.82,1.83 Message-ID: <200305211549.h4LFn6i28350@internal.geeklog.net> Update of /usr/cvs/geeklog/geeklog-1.3 In directory internal.geeklog.net:/tmp/cvs-serv28319 Modified Files: config.php Log Message: Moved -Q option for mysqldump to new config option $_CONF['mysqldump_options'] Index: config.php =================================================================== RCS file: /usr/cvs/geeklog/geeklog-1.3/config.php,v retrieving revision 1.82 retrieving revision 1.83 diff -C2 -d -r1.82 -r1.83 *** config.php 8 May 2003 17:23:09 -0000 1.82 --- config.php 21 May 2003 15:49:04 -0000 1.83 *************** *** 57,60 **** --- 57,61 ---- $_DB_mysqldump_path = '/usr/bin/mysqldump'; // path to mysqldump binary e.g. /usr/bin/mysqldump $_CONF['allow_mysqldump'] = 1; // 1 = on, 0 = off + $_CONF['mysqldump_options'] = '-Q'; // additional options for mysqldump // +---------------------------------------------------------------------------+ From geeklog-cvs-admin at lists.geeklog.net Wed May 21 12:00:32 2003 From: geeklog-cvs-admin at lists.geeklog.net (geeklog-cvs-admin at lists.geeklog.net) Date: Wed, 21 May 2003 11:00:32 -0500 Subject: [geeklog-cvs] geeklog-1.3/docs themevars.html,NONE,1.1 config.html,1.19,1.20 history,1.94,1.95 theme.html,1.18,1.19 Message-ID: <200305211600.h4LG0Wi28537@internal.geeklog.net> Update of /usr/cvs/geeklog/geeklog-1.3/docs In directory internal.geeklog.net:/tmp/cvs-serv28512 Modified Files: config.html history theme.html Added Files: themevars.html Log Message: Updated documentation --- NEW FILE: themevars.html --- Geeklog Documentation - Variables in Themes
Geeklog Documentation

Variables in Themes

Note: This is not a complete documentation of the theme variables - it only covers variables that can be used in the story templates.

Introduction

Geeklog uses the template engine of the PHP Base Library (also known as PHPlib). This library allows the use of so-called variables in the template files. A variable is a word enclosed in curly brackets, like this: {variable}. When Geeklog creates a web page it will replace the variables in the template files with certain values. A variable can hold static text (i.e. it will alway be replaced with the same text), dynamic content (e.g. the number of comments to a story or the entire text of a story), or even the content of another template file (used for lists, for example).

Please note that not all variables are available in all template files. While the variable {site_url} (which holds the URL of your Geeklog site) is available in most template files, many variables are only available in one template file (e.g. the variable {formatted_article} is only available in the article.thtml template file). Geeklog will remove any variables which are not defined for the current template file (i.e. they will be replaced with an empty string). No error or warning messages will be created when you use an undefined variable.

Site Header

The following variables are available in the site header, i.e. in the header.thtml template file:

Variable Example Description
site_url http://www.yoursite.com The URL of your Geeklog site (the exact same URL you specified in $_CONF['site_url'] in your config.php file).
layout_url http://www.yoursite.com/layout/XSilver The URL of the layout folder of the user's current theme.
page_title Geeklog Site - Another Nifty Geeklog Site Holds either the site's name and slogan or the site name and the title of the current story.
background_image http://www.yoursite.com/layout/
XSilver/images/bg.gif
Points to a file named bg.gif in the images folder of the current theme, intended to be used as a background image.
site_mail admin at example.com Email address where people can contact the site's administrator. Because of the spam problem, it is recommended you don't actually use this on your site and provide a link to the Admin's email submission form instead: {site_url}/profiles.php?uid=2 (where "2" is the user id of the person who will receive the email, usually the Admin user.
site_name Geeklog Site The name of your Geeklog site.
site_slogan Another Nifty Geeklog Site The slogan of your site.
welcome_msg Welcome to Geeklog Site A welcome message, followed by the user's name (for registered users).
datetime Thursday, November 28 2002 @ 11:43 AM PST The current date and time, formatted according to $_CONF['date'].
site_logo http://www.yoursite.com/layout/
XSilver/images/logo.gif
Points to a file named logo.gif in the images directory of the current theme, intended to be used as the site's logo.
css_url http://www.yoursite.com/layout/
XSilver/style.css
Points to the style sheet of the current theme.
theme XSilver Name of the current theme.
charset iso-8859-1 The character set for the current language file.

Stories

The following variables are available in the storytext.thtml, storybodytext.thtml, featuredstorytext.thtml, and featuredstorybodytext.thtml template files. These files are used to render stories for the index page as well as the content of the {formatted_article} variable in the article/article.thtml file (which is used to display a story on its own page).

Variable Example Description
site_url http://www.yoursite.com The URL of your Geeklog site (the exact same URL you specified in $_CONF['site_url'] in your config.php file).
layout_url http://www.yoursite.com/layout/XSilver The URL of the layout folder of the user's current theme.
story_date Tuesday, October 22 2002 @ 11:50 PM PDT The date and time of the story, formatted according to the user's preferred date and time format.
lang_views Views The word "Views" in the user's preferred language.
story_hits 42 Number of times the story was read.
story_id 20021022234959146 The ID of a story (can be used to build URLs, e.g. for a "link to this story" link).
story_title Welcome to Geeklog! The title of the story.
story_introtext Welcome and let me be the first to congratulate you on installing GeekLog ... When displayed on the index page, this variable contains The "intro text" part of a story. However, when displayed as an article on a single page, it contains both the intro text and the body text of the story.
lang_todays_featured_article Today's Featured Article The words "Today's Featured Article" in the user's preferred language. Only available when the story is the featured story.

The following variables are only available when the story is displayed on the index page and the body text of the story is not empty:

Variable Example Description
lang_readmore read more The words "read more" in the user's preferred language.
lang_readmore_words words The word "words" in the user's preferred language.
readmore_words 62 The number of words in the body text of the story.
readmore_link <a href="...">read more</a> (62 words) Link to the story on a separate page, including the number of word in the body text.
start_readmore_anchortag <a href=".../article.php
?story=20021022234959146">
Opening tag for a link to the story on a separate page.
end_readmore_anchortag </a> Closing tag for a link to the story.
email_icon (icon) The email icon, linking to the form to send the story by email.
print_icon (icon) The printer icon, linking to a "printer friendly" version of the story.
recent_post_anchortag -- When no comments have been posted yet, this variable contains just a link to the comment submission form (just like {post_comment_link}). When there are comments to the story, then this variable does not contain a link but instead contains the user name of the person who posted the last comment as well as the date and time when that comment was posted.

The following variables are only available when comments on a story are enabled and when comments have been made to the story already:

Variable Example Description
comments_url http://www.yoursite.com/article.php
?story=20021022234959146#comments
URL of the comments section (when a story is displayed on a separate page).
comments_text 2 comments The number of comments, followed by the word "comments" in the user's preferred language.
comments_count 2 The number of comments to the story (will always be 1 or greater).
lang_comments comments The word "comments" in the user's preferred language.
start_comments_anchortag <a href=".../article.php
?story=20021022234959146#comments">
Opening tag for a link to the comments section of a story.
end_comments_anchortag </a> Closing tag for a link to the comments section of a story.
post_comment_link <a href=".../comment.php
?sid=20021022234959146&pid=0
&type=article">Post a comment</a>
Link to the comment submission form (using "Post a comment" in the user's preferred language as the link text).

The following variables are only available when $_CONF['contributedbyline'] = 1; in your config.php, i.e. when you allow the name of the story's author to be displayed:

Variable Example Description
lang_contributed_by Contributed by: The text "Contributed by:" in the user's preferred language.
contributedby_uid 7 The user id of the story's author.
contributedby_user Tony The user name (short name) of the story's author.
contributedby_fullname Tony Bibbs The full name of the story's author. If the user hasn't filled in his/her full name, the user name is used instead.
start_contributedby_anchortag <a class="storybyline" href="http://www.yoursite.com/
users.php?mode=profile&uid=7">
Opening tag for a link to the story author's profile (empty for anonymous authors).
end_contributedby_anchortag </a> Closing tag for a link to the story author's profile (empty for anonymous authors).
contributedby_url http://www.yoursite.com/
users.php?mode=profile&uid=7
Link to the story author's profile (empty for anonymous authors).
contributedby_photo <img src=".../images/userphotos/Tony.gif" alt="Tony Bibbs"> User photo of the story author, if provided (always empty for anonymous authors).

The following variables are only available if topic icons are enabled for the story and the user has not disabled topic icons in his/her display preferences:

Variable Example Description
story_anchortag_and_image <a href="http://www.yoursite.com/
index.php?topic=Geeklog"><img src="..." ...></a>
(shortened)
Topic icon for the story's topic, enclosed in a link to the site's index page, sorted by topic.
story_topic_image <img align="right" src="http://www.yoursite.com/
images/topics/topic_gl.gif" alt="Geeklog" title="Geeklog">
Topic icon for the story.
story_topic_id General Id (internal name) of the topic, e.g. to be used in links.
story_topic_name General News Topic name (as seen on the Sections block).
story_topic_url <a href="http://www.yoursite.com/
index.php?topic=General">
URL to your site's index page, so that only stories with the story's topic are displayed.

The following variables are only available when the current user has the permissions to edit a story:

Variable Example Description
edit_link <a href=".../admin/story.php
?mode=edit&sid=20021022234959146">edit</a>
Link to open the story in the admin's story editor.
edit_url http://www.yoursite.com/admin/story.php
?mode=edit&sid=20021022234959146
URL to open the story in the admin's story editor
lang_edit_text edit The word "edit" in the user's preferred language.


Index: config.html =================================================================== RCS file: /usr/cvs/geeklog/geeklog-1.3/docs/config.html,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** config.html 5 May 2003 21:11:06 -0000 1.19 --- config.html 21 May 2003 16:00:29 -0000 1.20 *************** *** 59,62 **** --- 59,65 ----
1 Enable or disable the backup functionality (1 = on, 0 = off)
mysqldump_options-QHere you can include additional options for the mysqldump call that Geeklog uses to create a backup from your database.
Index: history =================================================================== RCS file: /usr/cvs/geeklog/geeklog-1.3/docs/history,v retrieving revision 1.94 retrieving revision 1.95 diff -C2 -d -r1.94 -r1.95 *** history 11 May 2003 18:28:54 -0000 1.94 --- history 21 May 2003 16:00:29 -0000 1.95 *************** *** 4,8 **** ------- ! - Changes handling of plugin comments slightly: Plugins will have to do the 'delete' operation on their comments on their own now since Geeklog can't possibly know which (if any) permissions are needed to delete a comment. --- 4,22 ---- ------- ! - Introduced new config.php variable $_CONF['mysqldump_options'] that holds ! additional options to be used when Geeklog calls mysqldump to do a backup ! of the database. ! - Added a check for an existing email address in the user's profile so that ! users can't change their email address to one that's already in use for ! another account. ! - Pick up the 'postmode' default setting for the Admin's story editor. ! - Stories in the Daily Digest are now sorted by date (newest first, as on the ! index page). ! - Fixed a problem with topic permissions in index.php: If the user doesn't ! have access to a topic, s/he shouldn't be able to see any stories posted under ! that topic, even if the story permissions would allow that. ! - The "Google paging" on the index page may have displayed the wrong number ! of pages for users who disabled topics in their display preferences. ! - Changed handling of plugin comments slightly: Plugins will have to do the 'delete' operation on their comments on their own now since Geeklog can't possibly know which (if any) permissions are needed to delete a comment. *************** *** 154,157 **** --- 168,172 ---- - Updated Spanish and Spanish (Argentina) language files, provided by Fernando Bernardini + - New Portuguese language file, provided by Mario Seabra - New Bulgarian language file, provided by lachko - New Turkish language file, provided by Sinan Ussakli Index: theme.html =================================================================== RCS file: /usr/cvs/geeklog/geeklog-1.3/docs/theme.html,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** theme.html 6 May 2003 10:31:02 -0000 1.18 --- theme.html 21 May 2003 16:00:29 -0000 1.19 *************** *** 89,92 **** --- 89,95 ---- from the users directory within the theme's layout directory.

+

An incomplete list of variables that can be + used in templates files is also included.

+

Testing a theme and further information

From geeklog-cvs-admin at lists.geeklog.net Wed May 21 12:35:24 2003 From: geeklog-cvs-admin at lists.geeklog.net (geeklog-cvs-admin at lists.geeklog.net) Date: Wed, 21 May 2003 11:35:24 -0500 Subject: [geeklog-cvs] geeklog-1.3/public_html users.php,1.64,1.65 Message-ID: <200305211635.h4LGZOi29060@internal.geeklog.net> Update of /usr/cvs/geeklog/geeklog-1.3/public_html In directory internal.geeklog.net:/tmp/cvs-serv29044/public_html Modified Files: users.php Log Message: Remove whitespace from beginning and end of new user's usernames. Index: users.php =================================================================== RCS file: /usr/cvs/geeklog/geeklog-1.3/public_html/users.php,v retrieving revision 1.64 retrieving revision 1.65 diff -C2 -d -r1.64 -r1.65 *** users.php 20 May 2003 08:55:13 -0000 1.64 --- users.php 21 May 2003 16:35:22 -0000 1.65 *************** *** 458,461 **** --- 458,463 ---- if (COM_isEmail($email)) { + $username = trim ($username); + $ucount = DB_count($_TABLES['users'],'username',$username); $ecount = DB_count($_TABLES['users'],'email',$email); From geeklog-cvs-admin at lists.geeklog.net Thu May 22 17:05:48 2003 From: geeklog-cvs-admin at lists.geeklog.net (geeklog-cvs-admin at lists.geeklog.net) Date: Thu, 22 May 2003 16:05:48 -0500 Subject: [geeklog-cvs] geeklog-1.3/system lib-plugins.php,1.18,1.19 Message-ID: <200305222105.h4ML5mi23820@internal.geeklog.net> Update of /usr/cvs/geeklog/geeklog-1.3/system In directory internal.geeklog.net:/tmp/cvs-serv23808 Modified Files: lib-plugins.php Log Message: New (extended & buffered) implementation of PLG_showCenterblock(). Index: lib-plugins.php =================================================================== RCS file: /usr/cvs/geeklog/geeklog-1.3/system/lib-plugins.php,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** lib-plugins.php 11 May 2003 18:28:55 -0000 1.18 --- lib-plugins.php 22 May 2003 21:05:46 -0000 1.19 *************** *** 41,44 **** --- 41,49 ---- require_once($_CONF['path_system'] . 'classes/plugin.class.php'); + // buffer for function names for the center block API + $PLG_bufferCenterAPI = array (); + $PLG_buffered = false; + + /** * Calls a function for all enabled plugins *************** *** 590,611 **** * The plugin is responsible to format the output correctly. * * @return Formatted center block content * */ ! function PLG_showCenterblock() { ! global $_TABLES; ! $result = DB_query("SELECT * FROM {$_TABLES['plugins']} WHERE pi_enabled = 1"); ! $nrows = DB_numRows($result); ! $plugin = new Plugin(); ! $counter = 0; ! for ($i = 1; $i <= $nrows; $i++) { ! $A = DB_fetchArray($result); ! $function = 'plugin_centerblock_' . $A['pi_name']; ! if (function_exists($function)) { ! $retval .= $function(); } } return $retval; } --- 595,633 ---- * The plugin is responsible to format the output correctly. * + * @param where int 1 = top, 2 = after feat. story, 3 = bottom of page + * @param page int page number (1, ...) + * @param topic string topic ID or empty string == front page * @return Formatted center block content * */ ! function PLG_showCenterblock($where = 1, $page = 1, $topic = '') { ! global $_TABLES, $PLG_bufferCenterAPI, $PLG_buffered; ! $retval = ''; ! ! // buffer function names since we're coming back for them two more times ! if (!$PLG_buffered) { ! $result = DB_query("SELECT pi_name FROM {$_TABLES['plugins']} WHERE pi_enabled = 1"); ! $nrows = DB_numRows($result); ! $PLG_bufferCenterAPI = array (); ! for ($i = 0; $i < $nrows; $i++) { ! $A = DB_fetchArray ($result); ! $function = 'plugin_centerblock_' . $A['pi_name']; ! if (function_exists ($function)) { ! $PLG_bufferCenterAPI[$A['pi_name']] = $function; ! } } + $PLG_buffered = true; } + + foreach ($PLG_bufferCenterAPI as $function) { + $retval .= $function ($where, $page, $topic); + + if (($where == 0) && !empty ($retval)) { + break; + } + } + return $retval; } From geeklog-cvs-admin at lists.geeklog.net Thu May 22 17:07:12 2003 From: geeklog-cvs-admin at lists.geeklog.net (geeklog-cvs-admin at lists.geeklog.net) Date: Thu, 22 May 2003 16:07:12 -0500 Subject: [geeklog-cvs] geeklog-1.3/sql mysql_tableanddata.php,1.47,1.48 Message-ID: <200305222107.h4ML7Ci23857@internal.geeklog.net> Update of /usr/cvs/geeklog/geeklog-1.3/sql In directory internal.geeklog.net:/tmp/cvs-serv23839 Modified Files: mysql_tableanddata.php Log Message: Added an index for pi_enabled in the 'plugins' table. Index: mysql_tableanddata.php =================================================================== RCS file: /usr/cvs/geeklog/geeklog-1.3/sql/mysql_tableanddata.php,v retrieving revision 1.47 retrieving revision 1.48 diff -C2 -d -r1.47 -r1.48 *** mysql_tableanddata.php 5 May 2003 16:52:35 -0000 1.47 --- mysql_tableanddata.php 22 May 2003 21:07:10 -0000 1.48 *************** *** 268,271 **** --- 268,272 ---- pi_enabled tinyint(3) unsigned NOT NULL default '1', pi_homepage varchar(128) NOT NULL default '', + INDEX plugins_enabled(pi_enabled), PRIMARY KEY (pi_name) ) TYPE=MyISAM From geeklog-cvs-admin at lists.geeklog.net Thu May 22 17:08:33 2003 From: geeklog-cvs-admin at lists.geeklog.net (geeklog-cvs-admin at lists.geeklog.net) Date: Thu, 22 May 2003 16:08:33 -0500 Subject: [geeklog-cvs] geeklog-1.3/plugins/staticpages functions.inc,1.19,1.20 Message-ID: <200305222108.h4ML8Xi23905@internal.geeklog.net> Update of /usr/cvs/geeklog/geeklog-1.3/plugins/staticpages In directory internal.geeklog.net:/tmp/cvs-serv23869/plugins/staticpages Modified Files: functions.inc Log Message: Re-implemented "static pages on frontpage hack" using the new center block API. Index: functions.inc =================================================================== RCS file: /usr/cvs/geeklog/geeklog-1.3/plugins/staticpages/functions.inc,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** functions.inc 11 Mar 2003 17:00:56 -0000 1.19 --- functions.inc 22 May 2003 21:08:31 -0000 1.20 *************** *** 343,346 **** --- 343,425 ---- /** + * Display static pages in the center block. + * + * @param where int where the static page will be displayed (0..2) + * @param page int page number + * @param topic string topic ID + * @return string HTML for the static page (can be empty) + */ + function plugin_centerblock_staticpages ($where = 1, $page = 1, $topic ='') + { + global $_CONF, $_TABLES, $_SP_CONF, $HTTP_GET_VARS; + + $retval = ''; + + if ($where > 1) { + return $retval; + } else if (($where == 0) && (($page > 1) || !empty ($topic))) { + return $retval; + } + + if (($where == 0) && ($page == 1) && empty ($topic)) { + $staticpage_label = 'nonews'; + } else if (empty ($topic)) { + $staticpage_label = 'frontpage'; + } else { + $staticpage_label = 'topic:' . $topic; + } + + $perms = SP_getPerms (); + if (!empty ($perms)) { + $perms = ' AND ' . $perms; + } + $spsql = "SELECT sp_content,sp_title,sp_format,sp_php FROM {$_TABLES['staticpage']} WHERE sp_label = '{$staticpage_label}'" . $perms; + $result = DB_query ($spsql); + + if (DB_numRows ($result) > 0) { + $spresult = DB_fetchArray ($result); + + if ($where == 0) { + switch ($spresult['sp_format']) { + case 'noblocks': + $retval .= COM_siteHeader ('none'); + break; + case 'allblocks': + case 'leftblocks': + $retval .= COM_siteHeader ('menu'); + break; + } + $retval .= COM_showMessage ($HTTP_GET_VARS['msg']); + } + + if (($_SP_CONF['in_block'] == 1) && !empty ($spresult['sp_title'])) { + $retval .= COM_startBlock ($spresult['sp_title']); + } + + // Check for type (ie html or php) + if ($spresult['sp_php'] == 1) { + $retval .= eval (stripslashes ($spresult['sp_content'])); + } else { + $retval .= stripslashes ($spresult['sp_content']); + } + + if (($_SP_CONF['in_block'] == 1) && !empty ($spresult['sp_title'])) { + $retval .= COM_endBlock (); + } + + if ($where == 0) { + if ($spresult['sp_format'] == 'allblocks') { + $retval .= COM_siteFooter (true); + } else if ($spresult['sp_format'] != 'blankpage') { + $retval .= COM_siteFooter (); + } + } + } + + return $retval; + } + + + /** * Removes the datastructures for this plugin from the Geeklog database * From geeklog-cvs-admin at lists.geeklog.net Thu May 22 17:08:33 2003 From: geeklog-cvs-admin at lists.geeklog.net (geeklog-cvs-admin at lists.geeklog.net) Date: Thu, 22 May 2003 16:08:33 -0500 Subject: [geeklog-cvs] geeklog-1.3/public_html index.php,1.47,1.48 Message-ID: <200305222108.h4ML8Xi23908@internal.geeklog.net> Update of /usr/cvs/geeklog/geeklog-1.3/public_html In directory internal.geeklog.net:/tmp/cvs-serv23869/public_html Modified Files: index.php Log Message: Re-implemented "static pages on frontpage hack" using the new center block API. Index: index.php =================================================================== RCS file: /usr/cvs/geeklog/geeklog-1.3/public_html/index.php,v retrieving revision 1.47 retrieving revision 1.48 diff -C2 -d -r1.47 -r1.48 *** index.php 15 May 2003 15:25:21 -0000 1.47 --- index.php 22 May 2003 21:08:31 -0000 1.48 *************** *** 40,151 **** $topic = ''; } - if (isset ($HTTP_GET_VARS['display']) && ($HTTP_GET_VARS['display'] == 'new') && empty ($topic)) { - $newstories = true; - } else { - $newstories = false; - } - require_once('lib-common.php'); - - $display = ''; - - /* - * Staticpage on Frontpage Addon (Hacked together by MLimburg) - * - * If a staticpage with the title 'frontpage' exists, then it is shown before - * the news messages. If this staticpage has the label 'nonews', then it is - * shown INSTEAD of news messages. - * This will only occur on the basic index.php page, and not on the $topic - * pages. - */ - - $shownews = true; ! // check if static pages plugin is installed and enabled ! if (DB_getItem ($_TABLES['plugins'], 'pi_enabled', "pi_name = 'staticpages'") == 1) { ! ! if (empty ($topic)) { ! $staticpage_title = 'frontpage'; ! } else { ! $staticpage_title = 'topic:' . $topic; } ! $perms = SP_getPerms (); ! if (!empty ($perms)) { ! $perms = ' AND ' . $perms; ! } ! $spsql = "SELECT sp_content,sp_label,sp_format,sp_php FROM {$_TABLES['staticpage']} WHERE sp_title = '{$staticpage_title}'" . $perms; ! $result = DB_query ($spsql); ! if (DB_numRows ($result) > 0) { ! $spresult = DB_fetchArray ($result); ! if ($spresult['sp_label'] == 'nonews') { // replace news entirely ! $shownews = false; ! switch ($spresult['sp_format']) { ! case 'noblocks': ! $display .= COM_siteHeader ('none') ! . COM_showMessage ($HTTP_GET_VARS['msg']); ! break; ! case 'allblocks': ! case 'leftblocks': ! $display .= COM_siteHeader ('menu') ! . COM_showMessage ($HTTP_GET_VARS['msg']); ! break; ! } ! // Check for type (ie html or php) ! if ($spresult['sp_php'] == 1) { ! $display .= eval (stripslashes ($spresult['sp_content'])); ! } else { ! $display .= stripslashes ($spresult['sp_content']); ! } ! if ($spresult['sp_format'] == 'allblocks') { ! $display .= COM_siteFooter (true); ! } else if ($spresult['sp_format'] != 'blankpage') { ! $display .= COM_siteFooter (); ! } ! } else { // display static page content before the news ! $display .= COM_siteHeader () ! . COM_showMessage ($HTTP_GET_VARS['msg']); ! if (($_SP_CONF['in_block'] == 1) && !empty ($spresult['sp_label'])) { ! $display .= COM_startBlock ($spresult['sp_label']); ! } - // Check for type (ie html or php) - if ($spresult['sp_php'] == 1) { - $display .= eval (stripslashes ($spresult['sp_content'])); - } else { - $display .= stripslashes ($spresult['sp_content']); - } - if (($_SP_CONF['in_block'] == 1) && !empty ($spresult['sp_label'])) { - $display .= COM_endBlock (); - } - } - } else { - $display .= COM_siteHeader() . COM_showMessage ($HTTP_GET_VARS['msg']); - } - } else { - $display .= COM_siteHeader() . COM_showMessage ($HTTP_GET_VARS['msg']); - } // Show any Plugin formatted blocks // Requires a plugin to have a function called plugin_centerblock_ ! $display .= PLG_showCenterblock (); ! ! if ($shownews) { $maxstories = 0; - if (isset ($HTTP_GET_VARS['page'])) { - $page = $HTTP_GET_VARS['page']; - } - - if (empty($page)) { - // If no page sent then assume the first. - $page = 1; - } - if (!empty($_USER['uid'])) { $result = DB_query("SELECT noboxes,maxstories,tids,aids FROM {$_TABLES['userindex']} WHERE uid = '{$_USER['uid']}'"); --- 40,85 ---- $topic = ''; } ! $newstories = false; ! $displayall = false; ! if (isset ($HTTP_GET_VARS['display']) && empty ($topic)) { ! if ($HTTP_GET_VARS['display'] == 'new') { ! $newstories = true; ! } else if ($HTTP_GET_VARS['display'] == 'all') { ! $displayall = true; } + } ! if (isset ($HTTP_GET_VARS['page'])) { ! $page = $HTTP_GET_VARS['page']; ! } ! if (empty ($page)) { ! // If no page sent then assume the first. ! $page = 1; ! } ! require_once('lib-common.php'); ! $display = ''; ! if (!$newstories && !$displayall) { ! // give plugins a chance to replace this page entirely ! $newcontent = PLG_showCenterblock (0, $page, $topic); ! if (!empty ($newcontent)) { ! echo $newcontent; ! exit; ! } ! } ! $display .= COM_siteHeader() . COM_showMessage ($HTTP_GET_VARS['msg']); // Show any Plugin formatted blocks // Requires a plugin to have a function called plugin_centerblock_ ! $display .= PLG_showCenterblock (1, $page, $topic); // top blocks $maxstories = 0; if (!empty($_USER['uid'])) { $result = DB_query("SELECT noboxes,maxstories,tids,aids FROM {$_TABLES['userindex']} WHERE uid = '{$_USER['uid']}'"); *************** *** 247,250 **** --- 181,187 ---- } $display .= COM_article($A,'y'); + if ($A['featured'] == 1) { + $display .= PLG_showCenterblock (2, $page, $topic); + } } *************** *** 268,274 **** } ! $display .= COM_siteFooter(true); // The true value enables right hand blocks. ! } // Output page --- 205,211 ---- } ! $display .= PLG_showCenterblock (3, $page, $topic); // bottom blocks ! $display .= COM_siteFooter(true); // The true value enables right hand blocks. // Output page From geeklog-cvs-admin at lists.geeklog.net Fri May 23 07:42:08 2003 From: geeklog-cvs-admin at lists.geeklog.net (geeklog-cvs-admin at lists.geeklog.net) Date: Fri, 23 May 2003 06:42:08 -0500 Subject: [geeklog-cvs] geeklog-1.3/system lib-sessions.php,1.17,1.18 Message-ID: <200305231142.h4NBg8i03562@internal.geeklog.net> Update of /usr/cvs/geeklog/geeklog-1.3/system In directory internal.geeklog.net:/tmp/cvs-serv3547/system Modified Files: lib-sessions.php Log Message: Don't trust the cookie data too much ... Index: lib-sessions.php =================================================================== RCS file: /usr/cvs/geeklog/geeklog-1.3/system/lib-sessions.php,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** lib-sessions.php 21 May 2003 10:33:20 -0000 1.17 --- lib-sessions.php 23 May 2003 11:42:06 -0000 1.18 *************** *** 109,118 **** if (isset($HTTP_COOKIE_VARS[$_CONF['cookie_name']])) { $userid = $HTTP_COOKIE_VARS[$_CONF['cookie_name']]; ! if (empty ($userid) || ($userid == 'deleted')) { unset ($userid); } else { $cookie_password = $HTTP_COOKIE_VARS[$_CONF['cookie_password']]; $userpass = DB_getItem($_TABLES['users'],'passwd',"uid = $userid"); ! if ($cookie_password <> $userpass) { //User may have modified their UID in cookie, ignore them } else { --- 109,118 ---- if (isset($HTTP_COOKIE_VARS[$_CONF['cookie_name']])) { $userid = $HTTP_COOKIE_VARS[$_CONF['cookie_name']]; ! if (empty ($userid) || !is_int ($userid)) { unset ($userid); } else { $cookie_password = $HTTP_COOKIE_VARS[$_CONF['cookie_password']]; $userpass = DB_getItem($_TABLES['users'],'passwd',"uid = $userid"); ! if (empty ($cookie_password) || ($cookie_password <> $userpass)) { //User may have modified their UID in cookie, ignore them } else { *************** *** 143,159 **** $userid = $HTTP_COOKIE_VARS[$_CONF['cookie_name']]; ! $cookie_password = $HTTP_COOKIE_VARS[$_CONF['cookie_password']]; ! $userpass = DB_getItem($_TABLES['users'],'passwd',"uid = $userid"); ! if ($cookie_password <> $userpass) { ! // User could have modified UID in cookie, don't do shit } else { ! if ($userid) { ! $user_logged_in = 1; ! // Create new session and write cookie ! $sessid = SESS_newSession($userid, $REMOTE_ADDR, $_CONF['session_cookie_timeout'], $_CONF['cookie_ip']); ! SESS_setSessionCookie($sessid, $_CONF['session_cookie_timeout'], $_CONF['cookie_session'], $_CONF['cookie_path'], $_CONF['cookiedomain'], $_CONF['cookiesecure']); ! $userdata = SESS_getUserDataFromId($userid); ! $_USER = $userdata; } } --- 143,163 ---- $userid = $HTTP_COOKIE_VARS[$_CONF['cookie_name']]; ! if (!is_int ($userid)) { ! unset ($userid); } else { ! $userpass = DB_getItem($_TABLES['users'],'passwd',"uid = $userid"); ! $cookie_password = $HTTP_COOKIE_VARS[$_CONF['cookie_password']]; ! if (empty ($cookie_password) || ($cookie_password <> $userpass)) { ! // User could have modified UID in cookie, don't do shit ! } else { ! if ($userid) { ! $user_logged_in = 1; ! // Create new session and write cookie ! $sessid = SESS_newSession($userid, $REMOTE_ADDR, $_CONF['session_cookie_timeout'], $_CONF['cookie_ip']); ! SESS_setSessionCookie($sessid, $_CONF['session_cookie_timeout'], $_CONF['cookie_session'], $_CONF['cookie_path'], $_CONF['cookiedomain'], $_CONF['cookiesecure']); ! $userdata = SESS_getUserDataFromId($userid); ! $_USER = $userdata; ! } } } From geeklog-cvs-admin at lists.geeklog.net Fri May 23 07:42:22 2003 From: geeklog-cvs-admin at lists.geeklog.net (geeklog-cvs-admin at lists.geeklog.net) Date: Fri, 23 May 2003 06:42:22 -0500 Subject: [geeklog-cvs] geeklog-1.3/system lib-sessions.php,1.14,1.14.2.1 Message-ID: <200305231142.h4NBgMi03577@internal.geeklog.net> Update of /usr/cvs/geeklog/geeklog-1.3/system In directory internal.geeklog.net:/tmp/cvs-serv3565/system Modified Files: Tag: geeklog_1_3_7sr1_1 lib-sessions.php Log Message: Don't trust the cookie data too much ... Index: lib-sessions.php =================================================================== RCS file: /usr/cvs/geeklog/geeklog-1.3/system/lib-sessions.php,v retrieving revision 1.14 retrieving revision 1.14.2.1 diff -C2 -d -r1.14 -r1.14.2.1 *** lib-sessions.php 5 Sep 2002 19:38:46 -0000 1.14 --- lib-sessions.php 23 May 2003 11:42:20 -0000 1.14.2.1 *************** *** 100,114 **** if (isset($HTTP_COOKIE_VARS[$_CONF['cookie_name']])) { $userid = $HTTP_COOKIE_VARS[$_CONF['cookie_name']]; ! if (empty ($userid) || ($userid == 'deleted')) { unset ($userid); } else { $cookie_password = $HTTP_COOKIE_VARS[$_CONF['cookie_password']]; $userpass = DB_getItem($_TABLES['users'],'passwd',"uid = $userid"); ! if ($cookie_password <> $userpass) { //User may have modified their UID in cookie, ignore them } else { if ($userid) { $user_logged_in = 1; ! $sess_id = SESS_newSession($userid, $REMOTE_ADDR, $_CONF['session_cookie_timeout'], $_CONF['cookie_ip']); SESS_setSessionCookie($sessid, $_CONF['session_cookie_timeout'], $_CONF['cookie_session'], $_CONF['cookie_path'], $_CONF['cookiedomain'], $_CONF['cookiesecure']); $userdata = SESS_getUserDataFromId($userid); --- 100,114 ---- if (isset($HTTP_COOKIE_VARS[$_CONF['cookie_name']])) { $userid = $HTTP_COOKIE_VARS[$_CONF['cookie_name']]; ! if (empty ($userid) || !is_int ($userid)) { unset ($userid); } else { $cookie_password = $HTTP_COOKIE_VARS[$_CONF['cookie_password']]; $userpass = DB_getItem($_TABLES['users'],'passwd',"uid = $userid"); ! if (empty ($cookie_password) || ($cookie_password <> $userpass)) { //User may have modified their UID in cookie, ignore them } else { if ($userid) { $user_logged_in = 1; ! $sessid = SESS_newSession($userid, $REMOTE_ADDR, $_CONF['session_cookie_timeout'], $_CONF['cookie_ip']); SESS_setSessionCookie($sessid, $_CONF['session_cookie_timeout'], $_CONF['cookie_session'], $_CONF['cookie_path'], $_CONF['cookiedomain'], $_CONF['cookiesecure']); $userdata = SESS_getUserDataFromId($userid); *************** *** 134,150 **** $userid = $HTTP_COOKIE_VARS[$_CONF['cookie_name']]; ! $cookie_password = $HTTP_COOKIE_VARS[$_CONF['cookie_password']]; ! $userpass = DB_getItem($_TABLES['users'],'passwd',"uid = $userid"); ! if ($cookie_password <> $userpass) { ! // User could have modified UID in cookie, don't do shit } else { ! if ($userid) { ! $user_logged_in = 1; ! // Create new session and write cookie ! $sessid = SESS_newSession($userid, $REMOTE_ADDR, $_CONF['session_cookie_timeout'], $_CONF['cookie_ip']); ! SESS_setSessionCookie($sessid, $_CONF['session_cookie_timeout'], $_CONF['cookie_session'], $_CONF['cookie_path'], $_CONF['cookiedomain'], $_CONF['cookiesecure']); ! $userdata = SESS_getUserDataFromId($userid); ! $_USER = $userdata; } } --- 134,154 ---- $userid = $HTTP_COOKIE_VARS[$_CONF['cookie_name']]; ! if (!is_int ($userid)) { ! unset ($userid); } else { ! $cookie_password = $HTTP_COOKIE_VARS[$_CONF['cookie_password']]; ! $userpass = DB_getItem($_TABLES['users'],'passwd',"uid = $userid"); ! if (empty ($cookie_password) || ($cookie_password <> $userpass)) { ! // User could have modified UID in cookie, don't do shit ! } else { ! if ($userid) { ! $user_logged_in = 1; ! // Create new session and write cookie ! $sessid = SESS_newSession($userid, $REMOTE_ADDR, $_CONF['session_cookie_timeout'], $_CONF['cookie_ip']); ! SESS_setSessionCookie($sessid, $_CONF['session_cookie_timeout'], $_CONF['cookie_session'], $_CONF['cookie_path'], $_CONF['cookiedomain'], $_CONF['cookiesecure']); ! $userdata = SESS_getUserDataFromId($userid); ! $_USER = $userdata; ! } } } *************** *** 169,173 **** // Set cookie. ! setcookie($_CONF['cookie_lastvisittemp'], $temptime ,$expiredate2, $_CONF['cookie_path'], $_CONF['site_url'], $_CONF['cookiesecure']); if ($_SESS_VERBOSE) { --- 173,177 ---- // Set cookie. ! setcookie($_CONF['cookie_lastvisittemp'], $temptime ,$expiredate2, $_CONF['cookie_path'], $_CONF['cookiedomain'], $_CONF['cookiesecure']); if ($_SESS_VERBOSE) { From geeklog-cvs-admin at lists.geeklog.net Fri May 23 07:43:29 2003 From: geeklog-cvs-admin at lists.geeklog.net (geeklog-cvs-admin at lists.geeklog.net) Date: Fri, 23 May 2003 06:43:29 -0500 Subject: [geeklog-cvs] geeklog-1.3/public_html usersettings.php,1.59,1.60 Message-ID: <200305231143.h4NBhTi03601@internal.geeklog.net> Update of /usr/cvs/geeklog/geeklog-1.3/public_html In directory internal.geeklog.net:/tmp/cvs-serv3581/public_html Modified Files: usersettings.php Log Message: Check for file extension (in addition to the MIME type) when uploading images. Index: usersettings.php =================================================================== RCS file: /usr/cvs/geeklog/geeklog-1.3/public_html/usersettings.php,v retrieving revision 1.59 retrieving revision 1.60 diff -C2 -d -r1.59 -r1.60 *** usersettings.php 20 May 2003 08:55:54 -0000 1.59 --- usersettings.php 23 May 2003 11:43:27 -0000 1.60 *************** *** 553,557 **** $upload->setAutomaticResize(true); } ! $upload->setAllowedMimeTypes(array('image/gif','image/jpeg','image/pjpeg','image/x-png','image/png')); if (!$upload->setPath($_CONF['path_html'] . 'images/userphotos')) { print 'File Upload Errors:
' . $upload->printErrors(); --- 553,557 ---- $upload->setAutomaticResize(true); } ! $upload->setAllowedMimeTypes(array('image/gif'=>'.gif','image/jpeg'=>'.jpg,.jpeg','image/pjpeg'=>'.jpg,.jpeg','image/x-png'=>'.png','image/png'=>'.png')); if (!$upload->setPath($_CONF['path_html'] . 'images/userphotos')) { print 'File Upload Errors:
' . $upload->printErrors(); From geeklog-cvs-admin at lists.geeklog.net Fri May 23 07:43:29 2003 From: geeklog-cvs-admin at lists.geeklog.net (geeklog-cvs-admin at lists.geeklog.net) Date: Fri, 23 May 2003 06:43:29 -0500 Subject: [geeklog-cvs] geeklog-1.3/system/classes upload.class.php,1.26,1.27 Message-ID: <200305231143.h4NBhTi03608@internal.geeklog.net> Update of /usr/cvs/geeklog/geeklog-1.3/system/classes In directory internal.geeklog.net:/tmp/cvs-serv3581/system/classes Modified Files: upload.class.php Log Message: Check for file extension (in addition to the MIME type) when uploading images. Index: upload.class.php =================================================================== RCS file: /usr/cvs/geeklog/geeklog-1.3/system/classes/upload.class.php,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** upload.class.php 27 Mar 2003 20:20:00 -0000 1.26 --- upload.class.php 23 May 2003 11:43:27 -0000 1.27 *************** *** 252,267 **** $this->_availableMimeTypes = array( ! 'application/x-gzip-compressed' => '.tar.gz, .tgz', 'application/x-zip-compressed' => '.zip', 'application/x-tar' => '.tar', ! 'text/plain' => '.php, .txt, .inc (etc)', ! 'text/html' => '.html, .htm (etc)', ! 'image/bmp' => '.bmp, .ico', 'image/gif' => '.gif', ! 'image/pjpeg' => '.jpg, .jpeg', ! 'image/jpeg' => '.jpg, .jpeg', ! 'image/png' => '.png', 'image/x-png' => '.png', ! 'audio/mpeg' => '.mp3 etc', 'audio/wav' => '.wav', 'application/pdf' => '.pdf', --- 252,267 ---- $this->_availableMimeTypes = array( ! 'application/x-gzip-compressed' => '.tar.gz,.tgz', 'application/x-zip-compressed' => '.zip', 'application/x-tar' => '.tar', ! 'text/plain' => '.phps,.txt,.inc', ! 'text/html' => '.html,.htm', ! 'image/bmp' => '.bmp,.ico', 'image/gif' => '.gif', ! 'image/pjpeg' => '.jpg,.jpeg', ! 'image/jpeg' => '.jpg,.jpeg', ! 'image/png' => '.png', 'image/x-png' => '.png', ! 'audio/mpeg' => '.mp3', 'audio/wav' => '.wav', 'application/pdf' => '.pdf', *************** *** 269,273 **** 'application/msword' => '.doc', 'application/vnd.ms-excel' => '.xls', ! 'application/octet-stream' => '.exe, .fla, .psd (etc)' ); } else { --- 269,273 ---- 'application/msword' => '.doc', 'application/vnd.ms-excel' => '.xls', ! 'application/octet-stream' => '.fla,.psd' ); } else { *************** *** 880,889 **** $this->_currentFile['type'] = substr ($this->_currentFile['type'], 0, $sc); } ! if (!in_array($this->_currentFile['type'],$this->getAllowedMimeTypes())) { ! $this->_addError('Mime type, ' . $this->_currentFile['type'] . ', not in list of allowed mime types'); ! return false; ! } else { ! return true; ! } } --- 880,898 ---- $this->_currentFile['type'] = substr ($this->_currentFile['type'], 0, $sc); } ! $mimeTypes = $this->getAllowedMimeTypes (); ! foreach ($mimeTypes as $mimeT => $extList) { ! if ($mimeT == $this->_currentFile['type']) { ! $extensions = explode (',', $extList); ! $fileName = $this->_currentFile['name']; ! foreach ($extensions as $ext) { ! if (strcasecmp (substr ($fileName, -strlen ($ext)), $ext) == 0) { ! return true; ! } ! } ! } ! } ! $this->_addError ('Mime type, ' . $this->_currentFile['type'] ! . ', not in list of allowed mime types'); ! return false; } From geeklog-cvs-admin at lists.geeklog.net Fri May 23 07:43:29 2003 From: geeklog-cvs-admin at lists.geeklog.net (geeklog-cvs-admin at lists.geeklog.net) Date: Fri, 23 May 2003 06:43:29 -0500 Subject: [geeklog-cvs] geeklog-1.3/public_html/admin story.php,1.90,1.91 Message-ID: <200305231143.h4NBhTi03605@internal.geeklog.net> Update of /usr/cvs/geeklog/geeklog-1.3/public_html/admin In directory internal.geeklog.net:/tmp/cvs-serv3581/public_html/admin Modified Files: story.php Log Message: Check for file extension (in addition to the MIME type) when uploading images. Index: story.php =================================================================== RCS file: /usr/cvs/geeklog/geeklog-1.3/public_html/admin/story.php,v retrieving revision 1.90 retrieving revision 1.91 diff -C2 -d -r1.90 -r1.91 *** story.php 19 May 2003 08:52:19 -0000 1.90 --- story.php 23 May 2003 11:43:27 -0000 1.91 *************** *** 817,821 **** } } ! $upload->setAllowedMimeTypes(array('image/gif','image/jpeg','image/pjpeg','image/x-png','image/png')); if (!$upload->setPath($_CONF['path_html'] . 'images/articles')) { print 'File Upload Errors:
' . $upload->printErrors(); --- 817,821 ---- } } ! $upload->setAllowedMimeTypes(array('image/gif'=>'.gif','image/jpeg'=>'.jpg,.jpeg','image/pjpeg'=>'.jpg,.jpeg','image/x-png'=>'.png','image/png'=>'.png')); if (!$upload->setPath($_CONF['path_html'] . 'images/articles')) { print 'File Upload Errors:
' . $upload->printErrors(); From geeklog-cvs-admin at lists.geeklog.net Fri May 23 07:43:49 2003 From: geeklog-cvs-admin at lists.geeklog.net (geeklog-cvs-admin at lists.geeklog.net) Date: Fri, 23 May 2003 06:43:49 -0500 Subject: [geeklog-cvs] geeklog-1.3/public_html usersettings.php,1.49,1.49.2.1 Message-ID: <200305231143.h4NBhni03642@internal.geeklog.net> Update of /usr/cvs/geeklog/geeklog-1.3/public_html In directory internal.geeklog.net:/tmp/cvs-serv3615/public_html Modified Files: Tag: geeklog_1_3_7sr1_1 usersettings.php Log Message: Check for file extension (in addition to the MIME type) when uploading images. Index: usersettings.php =================================================================== RCS file: /usr/cvs/geeklog/geeklog-1.3/public_html/usersettings.php,v retrieving revision 1.49 retrieving revision 1.49.2.1 diff -C2 -d -r1.49 -r1.49.2.1 *** usersettings.php 5 Jan 2003 21:35:07 -0000 1.49 --- usersettings.php 23 May 2003 11:43:47 -0000 1.49.2.1 *************** *** 481,485 **** $upload->setAutomaticResize(true); } ! $upload->setAllowedMimeTypes(array('image/gif','image/jpeg','image/pjpeg','image/x-png','image/png')); if (!$upload->setPath($_CONF['path_html'] . 'images/userphotos')) { print 'File Upload Errors:
' . $upload->printErrors(); --- 481,485 ---- $upload->setAutomaticResize(true); } ! $upload->setAllowedMimeTypes(array('image/gif'=>'.gif','image/jpeg'=>'.jpg,.jpeg','image/pjpeg'=>'.jpg,.jpeg','image/x-png'=>'.png','image/png'=>'.png')); if (!$upload->setPath($_CONF['path_html'] . 'images/userphotos')) { print 'File Upload Errors:
' . $upload->printErrors(); From geeklog-cvs-admin at lists.geeklog.net Fri May 23 07:43:49 2003 From: geeklog-cvs-admin at lists.geeklog.net (geeklog-cvs-admin at lists.geeklog.net) Date: Fri, 23 May 2003 06:43:49 -0500 Subject: [geeklog-cvs] geeklog-1.3/public_html/admin story.php,1.79,1.79.2.1 Message-ID: <200305231143.h4NBhni03645@internal.geeklog.net> Update of /usr/cvs/geeklog/geeklog-1.3/public_html/admin In directory internal.geeklog.net:/tmp/cvs-serv3615/public_html/admin Modified Files: Tag: geeklog_1_3_7sr1_1 story.php Log Message: Check for file extension (in addition to the MIME type) when uploading images. Index: story.php =================================================================== RCS file: /usr/cvs/geeklog/geeklog-1.3/public_html/admin/story.php,v retrieving revision 1.79 retrieving revision 1.79.2.1 diff -C2 -d -r1.79 -r1.79.2.1 *** story.php 10 Jan 2003 14:21:28 -0000 1.79 --- story.php 23 May 2003 11:43:47 -0000 1.79.2.1 *************** *** 638,641 **** --- 638,644 ---- global $_TABLES, $_CONF, $LANG24, $MESSAGE, $HTTP_POST_FILES; + // Convert array values to numeric permission values + list($perm_owner,$perm_group,$perm_members,$perm_anon) = SEC_getPermissionValues($perm_owner,$perm_group,$perm_members,$perm_anon); + $access = 0; if (DB_count ($_TABLES['stories'], 'sid', $sid) > 0) { *************** *** 680,686 **** } - // Convert array values to numeric permission values - list($perm_owner,$perm_group,$perm_members,$perm_anon) = SEC_getPermissionValues($perm_owner,$perm_group,$perm_members,$perm_anon); - if ($featured == '1') { // there can only be one non-draft featured story --- 683,686 ---- *************** *** 755,759 **** $upload->setAutomaticResize(true); } ! $upload->setAllowedMimeTypes(array('image/gif','image/jpeg','image/pjpeg','image/x-png','image/png')); if (!$upload->setPath($_CONF['path_html'] . 'images/articles')) { print 'File Upload Errors:
' . $upload->printErrors(); --- 755,759 ---- $upload->setAutomaticResize(true); } ! $upload->setAllowedMimeTypes(array('image/gif'=>'.gif','image/jpeg'=>'.jpg,.jpeg','image/pjpeg'=>'.jpg,.jpeg','image/x-png'=>'.png','image/png'=>'.png')); if (!$upload->setPath($_CONF['path_html'] . 'images/articles')) { print 'File Upload Errors:
' . $upload->printErrors(); From geeklog-cvs-admin at lists.geeklog.net Fri May 23 07:43:49 2003 From: geeklog-cvs-admin at lists.geeklog.net (geeklog-cvs-admin at lists.geeklog.net) Date: Fri, 23 May 2003 06:43:49 -0500 Subject: [geeklog-cvs] geeklog-1.3/system/classes upload.class.php,1.23,1.23.2.1 Message-ID: <200305231143.h4NBhni03648@internal.geeklog.net> Update of /usr/cvs/geeklog/geeklog-1.3/system/classes In directory internal.geeklog.net:/tmp/cvs-serv3615/system/classes Modified Files: Tag: geeklog_1_3_7sr1_1 upload.class.php Log Message: Check for file extension (in addition to the MIME type) when uploading images. Index: upload.class.php =================================================================== RCS file: /usr/cvs/geeklog/geeklog-1.3/system/classes/upload.class.php,v retrieving revision 1.23 retrieving revision 1.23.2.1 diff -C2 -d -r1.23 -r1.23.2.1 *** upload.class.php 1 Jan 2003 18:56:21 -0000 1.23 --- upload.class.php 23 May 2003 11:43:47 -0000 1.23.2.1 *************** *** 251,263 **** 'application/x-zip-compressed' => '.zip', 'application/x-tar' => '.tar', ! 'text/plain' => '.php, .txt, .inc (etc)', ! 'text/html' => '.html, .htm (etc)', ! 'image/bmp' => '.bmp, .ico', 'image/gif' => '.gif', ! 'image/pjpeg' => '.jpg, .jpeg', ! 'image/jpeg' => '.jpg, .jpeg', ! 'image/png' => '.png', 'image/x-png' => '.png', ! 'audio/mpeg' => '.mp3 etc', 'audio/wav' => '.wav', 'application/pdf' => '.pdf', --- 251,263 ---- 'application/x-zip-compressed' => '.zip', 'application/x-tar' => '.tar', ! 'text/plain' => '.phps,.txt,.inc', ! 'text/html' => '.html,.htm', ! 'image/bmp' => '.bmp,.ico', 'image/gif' => '.gif', ! 'image/pjpeg' => '.jpg,.jpeg', ! 'image/jpeg' => '.jpg,.jpeg', ! 'image/png' => '.png', 'image/x-png' => '.png', ! 'audio/mpeg' => '.mp3', 'audio/wav' => '.wav', 'application/pdf' => '.pdf', *************** *** 265,269 **** 'application/msword' => '.doc', 'application/vnd.ms-excel' => '.xls', ! 'application/octet-stream' => '.exe, .fla, .psd (etc)' ); } else { --- 265,269 ---- 'application/msword' => '.doc', 'application/vnd.ms-excel' => '.xls', ! 'application/octet-stream' => '.fla,.psd' ); } else { *************** *** 645,651 **** { if ($switch) { ! $this->_continueOnError = $true; } else { ! $this->_continueOnError = $false; } } --- 645,651 ---- { if ($switch) { ! $this->_continueOnError = true; } else { ! $this->_continueOnError = false; } } *************** *** 823,834 **** $this->_currentFile['type'] = substr ($this->_currentFile['type'], 0, $sc); } ! if (!in_array($this->_currentFile['type'],$this->getAllowedMimeTypes())) { ! $this->_addError('Mime type, ' . $this->_currentFile['type'] . ', not in list of allowed mime types'); ! return false; ! } else { ! return true; ! } } ! /** * Sets file upload path --- 823,843 ---- $this->_currentFile['type'] = substr ($this->_currentFile['type'], 0, $sc); } ! $mimeTypes = $this->getAllowedMimeTypes (); ! foreach ($mimeTypes as $mimeT => $extList) { ! if ($mimeT == $this->_currentFile['type']) { ! $extensions = explode (',', $extList); ! $fileName = $this->_currentFile['name']; ! foreach ($extensions as $ext) { ! if (strcasecmp (substr ($fileName, -strlen ($ext)), $ext) == 0) { ! return true; ! } ! } ! } ! } ! $this->_addError ('Mime type, ' . $this->_currentFile['type'] ! . ', not in list of allowed mime types'); ! return false; } ! /** * Sets file upload path From geeklog-cvs-admin at lists.geeklog.net Fri May 23 07:49:30 2003 From: geeklog-cvs-admin at lists.geeklog.net (geeklog-cvs-admin at lists.geeklog.net) Date: Fri, 23 May 2003 06:49:30 -0500 Subject: [geeklog-cvs] geeklog-1.3/public_html/admin block.php,1.45,1.45.2.1 event.php,1.35,1.35.2.1 link.php,1.30,1.30.2.1 poll.php,1.28,1.28.2.1 topic.php,1.31,1.31.2.1 Message-ID: <200305231149.h4NBnUi03777@internal.geeklog.net> Update of /usr/cvs/geeklog/geeklog-1.3/public_html/admin In directory internal.geeklog.net:/tmp/cvs-serv3761 Modified Files: Tag: geeklog_1_3_7sr1_1 block.php event.php link.php poll.php topic.php Log Message: Conversion of permission arrays to numerical values has to happen before they are used ... Index: block.php =================================================================== RCS file: /usr/cvs/geeklog/geeklog-1.3/public_html/admin/block.php,v retrieving revision 1.45 retrieving revision 1.45.2.1 diff -C2 -d -r1.45 -r1.45.2.1 *** block.php 10 Jan 2003 14:21:28 -0000 1.45 --- block.php 23 May 2003 11:49:27 -0000 1.45.2.1 *************** *** 321,324 **** --- 321,327 ---- global $_TABLES, $_CONF, $LANG21, $LANG01, $MESSAGE, $HTTP_POST_VARS; + // Convert array values to numeric permission values + list($perm_owner,$perm_group,$perm_members,$perm_anon) = SEC_getPermissionValues($perm_owner,$perm_group,$perm_members,$perm_anon); + $access = 0; if (DB_count ($_TABLES['blocks'], 'bid', $bid) > 0) { *************** *** 391,396 **** } - // Convert array values to numeric permission values - list($perm_owner,$perm_group,$perm_members,$perm_anon) = SEC_getPermissionValues($perm_owner,$perm_group,$perm_members,$perm_anon); $title = addslashes (COM_stripslashes ($title)); DB_save($_TABLES['blocks'],'bid,name,title,help,type,blockorder,content,tid,rdfurl,rdfupdated,phpblockfn,onleft,owner_id,group_id,perm_owner,perm_group,perm_members,perm_anon,is_enabled',"$bid,'$name','$title','$help','$type','$blockorder','$content','$tid','$rdfurl','$rdfupdated','$phpblockfn',$onleft,$owner_id,$group_id,$perm_owner,$perm_group,$perm_members,$perm_anon,$is_enabled",$_CONF['site_admin_url'] . "/block.php?msg=11"); --- 394,397 ---- Index: event.php =================================================================== RCS file: /usr/cvs/geeklog/geeklog-1.3/public_html/admin/event.php,v retrieving revision 1.35 retrieving revision 1.35.2.1 diff -C2 -d -r1.35 -r1.35.2.1 *** event.php 10 Jan 2003 14:21:28 -0000 1.35 --- event.php 23 May 2003 11:49:27 -0000 1.35.2.1 *************** *** 400,404 **** function saveevent($eid,$title,$event_type,$url,$allday,$start_month, $start_day, $start_year, $start_hour, $start_minute, $start_ampm, $end_month, $end_day, $end_year, $end_hour, $end_minute, $end_ampm, $location, $address1, $address2, $city, $state, $zipcode,$description,$owner_id,$group_id,$perm_owner,$perm_group,$perm_members,$perm_anon,$mode) { ! global $_TABLES, $_CONF, $LANG22; $access = 0; --- 400,407 ---- function saveevent($eid,$title,$event_type,$url,$allday,$start_month, $start_day, $start_year, $start_hour, $start_minute, $start_ampm, $end_month, $end_day, $end_year, $end_hour, $end_minute, $end_ampm, $location, $address1, $address2, $city, $state, $zipcode,$description,$owner_id,$group_id,$perm_owner,$perm_group,$perm_members,$perm_anon,$mode) { ! global $_TABLES, $_CONF, $LANG22; ! ! // Convert array values to numeric permission values ! list($perm_owner,$perm_group,$perm_members,$perm_anon) = SEC_getPermissionValues($perm_owner,$perm_group,$perm_members,$perm_anon); $access = 0; *************** *** 487,493 **** DB_delete($_TABLES['eventsubmission'],'eid',$eid); - // Convert array values to numeric permission values - list($perm_owner,$perm_group,$perm_members,$perm_anon) = SEC_getPermissionValues($perm_owner,$perm_group,$perm_members,$perm_anon); - DB_save($_TABLES['events'],'eid,title,event_type,url,allday,datestart,dateend,timestart,timeend,location,address1,address2,city,state,zipcode,description,owner_id,group_id,perm_owner,perm_group,perm_members,perm_anon',"$eid,'$title','$event_type','$url',$allday,'$datestart','$dateend','$timestart','$timeend','$location','$address1','$address2','$city','$state','$zipcode','$description',$owner_id,$group_id,$perm_owner,$perm_group,$perm_members,$perm_anon"); if (DB_count ($_TABLES['personal_events'], 'eid', $eid) > 0) { --- 490,493 ---- Index: link.php =================================================================== RCS file: /usr/cvs/geeklog/geeklog-1.3/public_html/admin/link.php,v retrieving revision 1.30 retrieving revision 1.30.2.1 diff -C2 -d -r1.30 -r1.30.2.1 *** link.php 10 Jan 2003 14:21:28 -0000 1.30 --- link.php 23 May 2003 11:49:27 -0000 1.30.2.1 *************** *** 193,196 **** --- 193,201 ---- global $_TABLES, $_CONF, $LANG23, $MESSAGE, $_USER; + // Convert array values to numeric permission values + if (is_array($perm_owner) OR is_array($perm_group) OR is_array($perm_members) OR is_array($perm_anon)) { + list($perm_owner,$perm_group,$perm_members,$perm_anon) = SEC_getPermissionValues($perm_owner,$perm_group,$perm_members,$perm_anon); + } + // clean 'em up $description = addslashes (COM_checkHTML (COM_checkWords ($description))); *************** *** 240,247 **** } - // Convert array values to numeric permission values - if (is_array($perm_owner) OR is_array($perm_group) OR is_array($perm_members) OR is_array($perm_anon)) { - list($perm_owner,$perm_group,$perm_members,$perm_anon) = SEC_getPermissionValues($perm_owner,$perm_group,$perm_members,$perm_anon); - } DB_delete($_TABLES['linksubmission'],'lid',$lid); DB_delete($_TABLES['links'],'lid',$lid); --- 245,248 ---- Index: poll.php =================================================================== RCS file: /usr/cvs/geeklog/geeklog-1.3/public_html/admin/poll.php,v retrieving revision 1.28 retrieving revision 1.28.2.1 diff -C2 -d -r1.28 -r1.28.2.1 *** poll.php 10 Jan 2003 14:21:28 -0000 1.28 --- poll.php 23 May 2003 11:49:27 -0000 1.28.2.1 *************** *** 83,86 **** --- 83,89 ---- global $_TABLES, $LANG25, $_CONF, $MESSAGE, $_POLL_VERBOSE; + // Convert array values to numeric permission values + list($perm_owner,$perm_group,$perm_members,$perm_anon) = SEC_getPermissionValues($perm_owner,$perm_group,$perm_members,$perm_anon); + $question = COM_stripslashes ($question); for ($i = 0; $i < sizeof($A); $i++) { *************** *** 117,123 **** $voters = '0'; } - - // Convert array values to numeric permission values - list($perm_owner,$perm_group,$perm_members,$perm_anon) = SEC_getPermissionValues($perm_owner,$perm_group,$perm_members,$perm_anon); if ($_POLL_VERBOSE) { --- 120,123 ---- Index: topic.php =================================================================== RCS file: /usr/cvs/geeklog/geeklog-1.3/public_html/admin/topic.php,v retrieving revision 1.31 retrieving revision 1.31.2.1 diff -C2 -d -r1.31 -r1.31.2.1 *** topic.php 10 Jan 2003 14:21:28 -0000 1.31 --- topic.php 23 May 2003 11:49:27 -0000 1.31.2.1 *************** *** 162,165 **** --- 162,168 ---- global $_TABLES, $_CONF, $LANG27, $MESSAGE; + //Convert array values to numeric permission values + list($perm_owner,$perm_group,$perm_members,$perm_anon) = SEC_getPermissionValues($perm_owner,$perm_group,$perm_members,$perm_anon); + $access = 0; if (DB_count ($_TABLES['topics'], 'tid', $tid) > 0) { *************** *** 187,192 **** } $topic = addslashes ($topic); - //Convert array values to numeric permission values - list($perm_owner,$perm_group,$perm_members,$perm_anon) = SEC_getPermissionValues($perm_owner,$perm_group,$perm_members,$perm_anon); DB_save($_TABLES['topics'],'tid, topic, imageurl, sortnum, limitnews, owner_id, group_id, perm_owner, perm_group, perm_members, perm_anon',"'$tid', '$topic', '$imageurl','$sortnum','$limitnews',$owner_id,$group_id,$perm_owner,$perm_group,$perm_members,$perm_anon",$_CONF['site_admin_url'] . "/topic.php?msg=13"); } else { --- 190,193 ---- From geeklog-cvs-admin at lists.geeklog.net Fri May 23 13:48:40 2003 From: geeklog-cvs-admin at lists.geeklog.net (geeklog-cvs-admin at lists.geeklog.net) Date: Fri, 23 May 2003 12:48:40 -0500 Subject: [geeklog-cvs] geeklog-2/lib/database lib-database.php,1.3,1.4 Message-ID: <200305231748.h4NHmei09760@internal.geeklog.net> Update of /usr/cvs/geeklog/geeklog-2/lib/database In directory internal.geeklog.net:/tmp/cvs-serv9747 Modified Files: lib-database.php Log Message: Don't assume we need any path when requiring PEAR::DB Index: lib-database.php =================================================================== RCS file: /usr/cvs/geeklog/geeklog-2/lib/database/lib-database.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** lib-database.php 21 Oct 2002 20:16:32 -0000 1.3 --- lib-database.php 23 May 2003 17:48:38 -0000 1.4 *************** *** 26,30 **** * Include PEAR's DB library */ ! require_once($_CONF['path_pear'] . 'DB.php'); /** --- 26,34 ---- * Include PEAR's DB library */ ! if (!$_CONF['have_pear']) { ! require_once $_CONF['path_pear'] . 'DB.php'; ! } else { ! require_once 'DB.php'; ! } /** From geeklog-cvs-admin at lists.geeklog.net Fri May 23 13:49:48 2003 From: geeklog-cvs-admin at lists.geeklog.net (geeklog-cvs-admin at lists.geeklog.net) Date: Fri, 23 May 2003 12:49:48 -0500 Subject: [geeklog-cvs] geeklog-2/lib Geeklog.class.php,1.3,1.4 Message-ID: <200305231749.h4NHnmi09818@internal.geeklog.net> Update of /usr/cvs/geeklog/geeklog-2/lib In directory internal.geeklog.net:/tmp/cvs-serv9805 Modified Files: Geeklog.class.php Log Message: No longer assume we have PEAR in php.ini's include_path Index: Geeklog.class.php =================================================================== RCS file: /usr/cvs/geeklog/geeklog-2/lib/Geeklog.class.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Geeklog.class.php 22 Oct 2002 23:13:37 -0000 1.3 --- Geeklog.class.php 23 May 2003 17:49:46 -0000 1.4 *************** *** 27,32 **** global $_CONF; ! include_once($_CONF['path_pear'] . 'Log.php'); ! if (!isset($errorLog)) { $errorLog = &Log::singleton('file', $_CONF['path_logs'] . 'error_log.txt', 'Geeklog Errors'); --- 27,35 ---- global $_CONF; ! if ($_CONF['have_pear']) { ! require_once 'Log/Log.php'; ! } else { ! require_once $_CONF['path_pear'] . 'Log/Log.php'; ! } if (!isset($errorLog)) { $errorLog = &Log::singleton('file', $_CONF['path_logs'] . 'error_log.txt', 'Geeklog Errors'); From geeklog-cvs-admin at lists.geeklog.net Sun May 25 11:57:06 2003 From: geeklog-cvs-admin at lists.geeklog.net (geeklog-cvs-admin at lists.geeklog.net) Date: Sun, 25 May 2003 10:57:06 -0500 Subject: [geeklog-cvs] geeklog-1.3/language dutch.php,1.8,1.9 Message-ID: <200305251557.h4PFv5i09310@internal.geeklog.net> Update of /usr/cvs/geeklog/geeklog-1.3/language In directory internal.geeklog.net:/tmp/cvs-serv9292 Modified Files: dutch.php Log Message: Updated Dutch language file, provided by Claudio Index: dutch.php =================================================================== RCS file: /usr/cvs/geeklog/geeklog-1.3/language/dutch.php,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** dutch.php 31 Dec 2002 14:26:26 -0000 1.8 --- dutch.php 25 May 2003 15:57:03 -0000 1.9 *************** *** 67,71 **** 24 => "Anoniem", 25 => "Beantwoord", ! 26 => "Voor de volgende reacties en/of zijn voor verantwoording van degene die deze plaatst. Deze site is niet verantwoordelijk voor wat deze inhoud(en).", 27 => "Laatste plaatsingen", 28 => "Verwijder", --- 67,71 ---- 24 => "Anoniem", 25 => "Beantwoord", ! 26 => "Voor de volgende reacties zijn voor verantwoording van degene die deze plaatst. Deze site is niet verantwoordelijk voor wat deze inhouden.", 27 => "Laatste plaatsingen", 28 => "Verwijder", *************** *** 163,167 **** 6 => "Voeg Evenement Toe", 7 => "Aankomende Evenementen", ! 8 => "Door dit evenement aan uw kalender toe te voegen, kunt u snel de evenementen zien waarin u ge?nterresseerd bent door op Mijn Kalender te klikken onder Gebruikers Funkties.", 9 => "Voeg toe aan Mijn Kalender", 10 => "Verwijder van Mijn Kalender", --- 163,167 ---- 6 => "Voeg Evenement Toe", 7 => "Aankomende Evenementen", ! 8 => "Door dit evenement aan uw kalender toe te voegen, kunt u snel de evenementen zien waarin u ge?nteresseerd bent door op Mijn Kalender te klikken onder Gebruikers Funkties.", 9 => "Voeg toe aan Mijn Kalender", 10 => "Verwijder van Mijn Kalender", *************** *** 169,173 **** 12 => "Evenement", 13 => "Begint", ! 14 => "Eindigd", 15 => "Terug naar Kalender" ); --- 169,173 ---- 12 => "Evenement", 13 => "Begint", ! 14 => "Eindigt", 15 => "Terug naar Kalender" ); *************** *** 182,186 **** 4 => "Cre?er Account", 5 => "Gebruikersnaam", ! 6 => "Deze site vereist, dat u bent ingelogd om een reactie te versturen, log in aub. Indien u geen account heeft, kunt u het onderstaande formulier gebruiken om er ??n te cre?eren.", 7 => "Uw laatste reactie was ", 8 => " seconden geleden. Deze site vereist tenminste {$_CONF["commentspeedlimit"]} seconden tussen reacties", --- 182,186 ---- 4 => "Cre?er Account", 5 => "Gebruikersnaam", ! 6 => "Deze site vereist dat u bent ingelogd om een reactie te versturen, log in aub. Indien u geen account heeft, kunt u het onderstaande formulier gebruiken om er ??n te cre?eren.", 7 => "Uw laatste reactie was ", 8 => " seconden geleden. Deze site vereist tenminste {$_CONF["commentspeedlimit"]} seconden tussen reacties", *************** *** 229,234 **** 21 => "Fout", 22 => "Registreer bij {$_CONF['site_name']}!", ! 23 => "Door het aanmaken van een gebruiker account profiteerd u van alle voordelen van {$_CONF['site_name']} site lidmaadschap en geeft u de mogelijkheid reacties en artikelen onder uw eigen naam te plaatsen. Indien u niet registreerd, is dit allen anoniem mogelijk. Let op, uw email adres zal nooit publiekelijk worden weergegeven op deze site.", ! 24 => "Uw wachtwoord wordt verstuurd naar het email adres dat u invoerd.", 25 => "Bent u uw Wachtwoord vergeten?", 26 => "Vul uw gebruikersnaam in en klik op Email Wachtwoord en een nieuw wachtwoord wordt verstuurd naar het opgeslagen email adres.", --- 229,234 ---- 21 => "Fout", 22 => "Registreer bij {$_CONF['site_name']}!", ! 23 => "Door het aanmaken van een gebruiker account profiteert u van alle voordelen van {$_CONF['site_name']} site lidmaadschap en geeft u de mogelijkheid reacties en artikelen onder uw eigen naam te plaatsen. Indien u niet registreert, is dit alleen anoniem mogelijk. Let op, uw email adres zal nooit publiekelijk worden weergegeven op deze site.", ! 24 => "Uw wachtwoord wordt verstuurd naar het email adres dat u invoert.", 25 => "Bent u uw Wachtwoord vergeten?", 26 => "Vul uw gebruikersnaam in en klik op Email Wachtwoord en een nieuw wachtwoord wordt verstuurd naar het opgeslagen email adres.", From geeklog-cvs-admin at lists.geeklog.net Sun May 25 12:00:29 2003 From: geeklog-cvs-admin at lists.geeklog.net (geeklog-cvs-admin at lists.geeklog.net) Date: Sun, 25 May 2003 11:00:29 -0500 Subject: [geeklog-cvs] geeklog-1.3/language bulgarian.php,NONE,1.2.2.1 chinese_gb2312.php,NONE,1.1.2.1 czech.php,NONE,1.1.2.1 portuguese.php,NONE,1.1.2.1 romanian.php,NONE,1.1.2.1 slovak.php,NONE,1.2.2.1 slovenian.php,NONE,1.1.2.1 turkish.php,NONE,1.1.2.1 dutch.php,1.8,1.8.2.1 french_france.php,1.6,1.6.2.1 hellenic.php,1.5,1.5.2.1 spanish.php,1.2,1.2.2.1 spanish_argentina.php,1.6,1.6.2.1 Message-ID: <200305251600.h4PG0Ti09368@internal.geeklog.net> Update of /usr/cvs/geeklog/geeklog-1.3/language In directory internal.geeklog.net:/tmp/cvs-serv9343 Modified Files: Tag: geeklog_1_3_7sr1_1 dutch.php french_france.php hellenic.php spanish.php spanish_argentina.php Added Files: Tag: geeklog_1_3_7sr1_1 bulgarian.php chinese_gb2312.php czech.php portuguese.php romanian.php slovak.php slovenian.php turkish.php Log Message: Copied new and updated language files over from the main branch --- NEW FILE: bulgarian.php --- "???????????????????? ???? ??????????", 8 => "????????????????????????????", 9 => "??????????", 10 => "???????????????? ??????????????" ); $LANG_404 = array( 1 => "???????????? 404", 2 => "????????, ???? ?????????????? ???????????? ???? ???????? ???? ???? ?????????????? http://{$HTTP_SERVER_VARS["HTTP_HOST"]}{$HTTP_SERVER_VARS["REQUEST_URI"]}.", 3 => "

??????????????????, ???? ?????????? ?????????? ???????????? ???? ???? ??????????????. ???????? ?????????????????? ???????????????? ???????????????? ?????? ???????????????? ?????????????? ???? ???? ???????????? ???????? ???? ???? ???????????????? ??????????????????." ); $LANG_LOGIN = array ( 1 => '?????????????? ???? ??????????????', 2 => '??????????????????, ???? ???? ???????????????? ???????? ???????????? ???? ?????? ????????????.', 3 => '????????', 4 => '??????' ); ?> --- NEW FILE: chinese_gb2312.php --- "????????????", 8 => "??????", 9 => "????", 10 => "????????" ); $LANG_404 = array( 1 => "404 ????", 2 => "??????????????????????????http://{$HTTP_SERVER_VARS["HTTP_HOST"]}{$HTTP_SERVER_VARS["REQUEST_URI"]}.", 3 => "

????????????????????????????????????????????????????????????????" ); $LANG_LOGIN = array ( 1 => "????????", 2 => "????????????????????????????????", 3 => "????", 4 => "??????" ); ?> --- NEW FILE: czech.php --- "Statistika", 8 => "Vlastn? nastaven?", 9 => "Hled?n?", 10 => "roz???en? hled?n?" ); $LANG_404 = array( 1 => "404 Error", 2 => "Gee, I've looked everywhere but I can not find http://{$HTTP_SERVER_VARS["HTTP_HOST"]}{$HTTP_SERVER_VARS["REQUEST_URI"]}.", 3 => "

We're sorry, but the file you have requested does not exist. Please feel free to check the main page or the search page to see if you can find what you lost." ); $LANG_LOGIN = array ( 1 => 'Je nutn? se p?ihl?sit', 2 => 'Promi?te, pro p??stup je nutn? b?t p?ihl??en jako u?ivatel.', 3 => 'P?ihl?sit', 4 => 'Nov? u?ivatel' ); ?> --- NEW FILE: portuguese.php --- (This appears to be a binary file; contents omitted.) --- NEW FILE: romanian.php --- "Statistici", 8 => "Personalizeaza", 9 => "Cauta", 10 => "cautare avansata" ); $LANG_404 = array( 1 => "Eroare 404", 2 => "Oh, nu! Ne-am uitat peste tot, dar n-am gasit http://{$HTTP_SERVER_VARS["HTTP_HOST"]}{$HTTP_SERVER_VARS["REQUEST_URI"]}.", 3 => "

Ne pare rau, dar pagina care o cautati nu exista. Va rugam, verificati pagina principala sau pagina de cautare sa vedeti daca gasiti ceea ce cautati." ); $LANG_LOGIN = array ( 1 => 'Inregistrare necesara', 2 => 'Ne pare rau, pentru a avea acces la aceasta zona trebuie sa fiti membru/utilizator inregistrat.', 3 => 'Inregistrare', 4 => 'Membru Nou' ); ?> --- NEW FILE: slovak.php --- "?tatistiky sajty", 8 => "Prisp?sobenie", 9 => "H?adaj", 10 => "Fajnov? vyh?ad?vanie" ); $LANG_404 = array( 1 => "404 Error", 2 => "Gee, I've looked everywhere but I can not find http://{$HTTP_SERVER_VARS["HTTP_HOST"]}{$HTTP_SERVER_VARS["REQUEST_URI"]}.", 3 => "

We're sorry, but the file you have requested does not exist. Please feel free to check the main page or the search page to see if you can find what you lost." ); $LANG_LOGIN = array ( 1 => 'Login required', 2 => 'Sorry, to access this area you need to be logged in as a user.', 3 => 'Login', 4 => 'New User' ); ?> --- NEW FILE: slovenian.php --- "Statistika strani", 8 => "Osebne nastavitve", 9 => "I??i", 10 => "Napredno iskanje" ); $LANG_404 = array( 1 => "404 Error", 2 => "Gee, I've looked everywhere but I can not find http://{$HTTP_SERVER_VARS["HTTP_HOST"]}{$HTTP_SERVER_VARS["REQUEST_URI"]}.", 3 => "

We're sorry, but the file you have requested does not exist. Please feel free to check the main page or the search page to see if you can find what you lost." ); $LANG_LOGIN = array ( 1 => 'Login required', 2 => 'Sorry, to access this area you need to be logged in as a user.', 3 => 'Login', 4 => 'New User' ); ?> --- NEW FILE: turkish.php --- "Site ?statistikleri", 8 => "?zelle?tir", 9 => "Ara", 10 => "Geli?mi? Arama" ); $LANG_404 = array( 1 => "404 Hatas?", 2 => "?ff, her yere bakt?m ama http://{$HTTP_SERVER_VARS["HTTP_HOST"]}{$HTTP_SERVER_VARS["REQUEST_URI"]} bulamad?m.", 3 => "

?zg?n?z, belirtti?iniz dosya bulunam?yor. L?tfen ana sayfaya veya arama sayfas?'na bakarak kaybetti?iniz dok?man? bulabilecekmisiniz bir bak?n." ); $LANG_LOGIN = array ( 1 => 'Sisteme giri? yapman?z gerekiyor', 2 => '?zg?n?m, bu alana giri? yapabilmeniz i?in bir kullan?c? olarak giri? yapman?z gerekiyor.', 3 => 'Giri? yap', 4 => 'Yeni Kullan?c?' ); ?> Index: dutch.php =================================================================== RCS file: /usr/cvs/geeklog/geeklog-1.3/language/dutch.php,v retrieving revision 1.8 retrieving revision 1.8.2.1 diff -C2 -d -r1.8 -r1.8.2.1 *** dutch.php 31 Dec 2002 14:26:26 -0000 1.8 --- dutch.php 25 May 2003 16:00:27 -0000 1.8.2.1 *************** *** 67,71 **** 24 => "Anoniem", 25 => "Beantwoord", ! 26 => "Voor de volgende reacties en/of zijn voor verantwoording van degene die deze plaatst. Deze site is niet verantwoordelijk voor wat deze inhoud(en).", 27 => "Laatste plaatsingen", 28 => "Verwijder", --- 67,71 ---- 24 => "Anoniem", 25 => "Beantwoord", ! 26 => "Voor de volgende reacties zijn voor verantwoording van degene die deze plaatst. Deze site is niet verantwoordelijk voor wat deze inhouden.", 27 => "Laatste plaatsingen", 28 => "Verwijder", *************** *** 163,167 **** 6 => "Voeg Evenement Toe", 7 => "Aankomende Evenementen", ! 8 => "Door dit evenement aan uw kalender toe te voegen, kunt u snel de evenementen zien waarin u ge?nterresseerd bent door op Mijn Kalender te klikken onder Gebruikers Funkties.", 9 => "Voeg toe aan Mijn Kalender", 10 => "Verwijder van Mijn Kalender", --- 163,167 ---- 6 => "Voeg Evenement Toe", 7 => "Aankomende Evenementen", ! 8 => "Door dit evenement aan uw kalender toe te voegen, kunt u snel de evenementen zien waarin u ge?nteresseerd bent door op Mijn Kalender te klikken onder Gebruikers Funkties.", 9 => "Voeg toe aan Mijn Kalender", 10 => "Verwijder van Mijn Kalender", *************** *** 169,173 **** 12 => "Evenement", 13 => "Begint", ! 14 => "Eindigd", 15 => "Terug naar Kalender" ); --- 169,173 ---- 12 => "Evenement", 13 => "Begint", ! 14 => "Eindigt", 15 => "Terug naar Kalender" ); *************** *** 182,186 **** 4 => "Cre?er Account", 5 => "Gebruikersnaam", ! 6 => "Deze site vereist, dat u bent ingelogd om een reactie te versturen, log in aub. Indien u geen account heeft, kunt u het onderstaande formulier gebruiken om er ??n te cre?eren.", 7 => "Uw laatste reactie was ", 8 => " seconden geleden. Deze site vereist tenminste {$_CONF["commentspeedlimit"]} seconden tussen reacties", --- 182,186 ---- 4 => "Cre?er Account", 5 => "Gebruikersnaam", ! 6 => "Deze site vereist dat u bent ingelogd om een reactie te versturen, log in aub. Indien u geen account heeft, kunt u het onderstaande formulier gebruiken om er ??n te cre?eren.", 7 => "Uw laatste reactie was ", 8 => " seconden geleden. Deze site vereist tenminste {$_CONF["commentspeedlimit"]} seconden tussen reacties", *************** *** 229,234 **** 21 => "Fout", 22 => "Registreer bij {$_CONF['site_name']}!", ! 23 => "Door het aanmaken van een gebruiker account profiteerd u van alle voordelen van {$_CONF['site_name']} site lidmaadschap en geeft u de mogelijkheid reacties en artikelen onder uw eigen naam te plaatsen. Indien u niet registreerd, is dit allen anoniem mogelijk. Let op, uw email adres zal nooit publiekelijk worden weergegeven op deze site.", ! 24 => "Uw wachtwoord wordt verstuurd naar het email adres dat u invoerd.", 25 => "Bent u uw Wachtwoord vergeten?", 26 => "Vul uw gebruikersnaam in en klik op Email Wachtwoord en een nieuw wachtwoord wordt verstuurd naar het opgeslagen email adres.", --- 229,234 ---- 21 => "Fout", 22 => "Registreer bij {$_CONF['site_name']}!", ! 23 => "Door het aanmaken van een gebruiker account profiteert u van alle voordelen van {$_CONF['site_name']} site lidmaadschap en geeft u de mogelijkheid reacties en artikelen onder uw eigen naam te plaatsen. Indien u niet registreert, is dit alleen anoniem mogelijk. Let op, uw email adres zal nooit publiekelijk worden weergegeven op deze site.", ! 24 => "Uw wachtwoord wordt verstuurd naar het email adres dat u invoert.", 25 => "Bent u uw Wachtwoord vergeten?", 26 => "Vul uw gebruikersnaam in en klik op Email Wachtwoord en een nieuw wachtwoord wordt verstuurd naar het opgeslagen email adres.", Index: french_france.php =================================================================== RCS file: /usr/cvs/geeklog/geeklog-1.3/language/french_france.php,v retrieving revision 1.6 retrieving revision 1.6.2.1 diff -C2 -d -r1.6 -r1.6.2.1 *** french_france.php 28 Dec 2002 15:10:15 -0000 1.6 --- french_france.php 25 May 2003 16:00:27 -0000 1.6.2.1 *************** *** 55,59 **** 13 => "Sujets", 14 => "Liens", ! 15 => "Ev?nements", 16 => "Sondages", 17 => "Utilisateurs", --- 55,59 ---- 13 => "Sujets", 14 => "Liens", ! 15 => "Ev?nements", 16 => "Sondages", [...1117 lines suppressed...] not_found => "Chemin incorecte ou le fichier mysqldump n'est pas ex?cutable.
V?rifiez le param?tre \$_DB_mysqldump_path dans le fichier config.php.
Ce param?tre est actuellement positionn? ? : {$_DB_mysqldump_path}", --- 1073,1077 ---- do_backup => 'Faire une sauvegarde', backup_successful => 'Sauvegarde de la base de donn?e effectu?e avec succ?s', ! no_backups => 'Aucune sauvegarde dans le syst?me', db_explanation => 'Cliquez sur le bouton ci-dessous pour effectuer une sauvegarde de votre syst?me Geeklog', not_found => "Chemin incorecte ou le fichier mysqldump n'est pas ex?cutable.
V?rifiez le param?tre \$_DB_mysqldump_path dans le fichier config.php.
Ce param?tre est actuellement positionn? ? : {$_DB_mysqldump_path}", *************** *** 1086,1090 **** $LANG_BUTTONS = array( 1 => "Survol", ! 2 => "Contactes", 3 => "Ecrire un article", 4 => "Liens", --- 1086,1090 ---- $LANG_BUTTONS = array( 1 => "Survol", ! 2 => "Contacts", 3 => "Ecrire un article", 4 => "Liens", Index: hellenic.php =================================================================== RCS file: /usr/cvs/geeklog/geeklog-1.3/language/hellenic.php,v retrieving revision 1.5 retrieving revision 1.5.2.1 diff -C2 -d -r1.5 -r1.5.2.1 *** hellenic.php 28 Dec 2002 15:10:15 -0000 1.5 --- hellenic.php 25 May 2003 16:00:27 -0000 1.5.2.1 *************** *** 4,9 **** # hellenic.php # This is the Hellenic language page for GeekLog! ! # Revision No: 3 ! # Date 18/12/2002 # # Copyright (C) 2002 Master of Death --- 4,14 ---- # hellenic.php # This is the Hellenic language page for GeekLog! ! # Revision No: 4 [...1433 lines suppressed...] 5 => "?????????", 6 => "??????????", ! 7 => "?????????? ???????????", 8 => "????????????", 9 => "?????????", *************** *** 1136,1141 **** $LANG_404 = array( 1 => "404 Error", ! 2 => "? ?????? ???????????????? ?? ??? ?? ?????? ?????? ????? ?????????? http://{$HTTP_SERVER_VARS["HTTP_HOST"]}{$HTTP_SERVER_VARS["REQUEST_URI"]}.", ! 3 => "

???????, ???? ?? ?????? ??? ????? ??????? ??? ???????. ???????? ?? ???????? ??? ???????? ?????? or the ?????? ?????????? ??? ?? ????? ?? ???????? ?? ?????? ?,?? ??????." ); --- 1144,1149 ---- $LANG_404 = array( 1 => "404 Error", ! 2 => "? ?????? ???????????????? ?? ??? ?? ?????? ?????? ????? ?????????? http://{$HTTP_SERVER_VARS["HTTP_HOST"]}{$HTTP_SERVER_VARS["REQUEST_URI"]}.", ! 3 => "

???????, ???? ?? ?????? ??? ????? ??????? ??? ???????. ???????? ?? ???????? ??? ???????? ?????? or the ?????? ?????????? ??? ?? ????? ?? ???????? ?? ?????? ?,?? ??????." ); Index: spanish.php =================================================================== RCS file: /usr/cvs/geeklog/geeklog-1.3/language/spanish.php,v retrieving revision 1.2 retrieving revision 1.2.2.1 diff -C2 -d -r1.2 -r1.2.2.1 *** spanish.php 28 Dec 2002 15:10:16 -0000 1.2 --- spanish.php 25 May 2003 16:00:27 -0000 1.2.2.1 *************** *** 44,988 **** 1 => "Contribuido por:", - 2 => "leer art?culo completo", - 3 => "comentarios", - 4 => "Editar", - 5 => "Encuesta", [...3190 lines suppressed...] ! 1 => 'Login requerido', ! 2 => 'Lo siento, para acceder a esta ?rea tienes que estar autentificado como usuario.', ! ! 3 => 'Login', ! 4 => 'Nuevo Usuario' - ); --- 1144,1151 ---- $LANG_LOGIN = array ( ! 1 => 'se requiere ingresar', 2 => 'Lo siento, para acceder a esta ?rea tienes que estar autentificado como usuario.', ! 3 => 'ingresar', 4 => 'Nuevo Usuario' ); Index: spanish_argentina.php =================================================================== RCS file: /usr/cvs/geeklog/geeklog-1.3/language/spanish_argentina.php,v retrieving revision 1.6 retrieving revision 1.6.2.1 diff -C2 -d -r1.6 -r1.6.2.1 *** spanish_argentina.php 28 Dec 2002 15:10:16 -0000 1.6 --- spanish_argentina.php 25 May 2003 16:00:27 -0000 1.6.2.1 *************** *** 67,71 **** 28 => "Borrar", 29 => "No hay comentarios de usuarios.", ! 30 => "Historias anteriores", 31 => "Tags HTML permitidos:", 32 => "Error, usuario inv?lido", --- 67,71 ---- 28 => "Borrar", 29 => "No hay comentarios de usuarios.", ! 30 => "Art?culos anteriores", 31 => "Tags HTML permitidos:", 32 => "Error, usuario inv?lido", *************** *** 74,82 **** 35 => "Salir", 36 => "sobre", ! 37 => "", 38 => "", 39 => "Actualizar", 40 => "", ! 41 => "", 42 => "Escrito por:", 43 => "Responder a", --- 74,82 ---- 35 => "Salir", 36 => "sobre", ! 37 => "No hay noticias del usuario", 38 => "", 39 => "Actualizar", 40 => "", ! 41 => "Usuarios Inviados", 42 => "Escrito por:", 43 => "Responder a", *************** *** 117,122 **** 78 => "Pr?ximos Eventos", 79 => "Novedades", ! 80 => "notas (80)", ! 81 => "nota (81)", 82 => "horas", 83 => "COMENTARIOS", --- 117,122 ---- 78 => "Pr?ximos Eventos", 79 => "Novedades", ! 80 => "Notas", ! 81 => "Nota", 82 => "horas", 83 => "COMENTARIOS", *************** *** 143,147 **** 104 => 'por', 105 => 'Envair Mails', ! 106 => 'Vistas' ); --- 143,149 ---- 104 => 'por', 105 => 'Envair Mails', ! 106 => 'Vistas', ! 107 => 'Comprobaci?n GL', ! 108 => 'Limpiar Cach?' ); *************** *** 156,160 **** 5 => "Descripci?n", 6 => "Agregar un Evento", ! 7 => "Pr?ximos Events", 8 => 'Al agregar este evento en su calendario usted podr? ver r?pidamente los eventos que le interesan. Para ello elija "Mi Calendario" en el ?rea de Funciones del usuario.', 9 => "Agregar a Mi Calendario", --- 158,162 ---- 5 => "Descripci?n", 6 => "Agregar un Evento", ! 7 => "Pr?ximos Eventos", 8 => 'Al agregar este evento en su calendario usted podr? ver r?pidamente los eventos que le interesan. Para ello elija "Mi Calendario" en el ?rea de Funciones del usuario.', 9 => "Agregar a Mi Calendario", *************** *** 194,198 **** 22 => 'Use un t?tulo claro que describa el contenido del mensaje.', 23 => 'Su direcci?n de email NO ser? divulgada.', ! 24 => 'Usuario Anonimo' ); --- 196,200 ---- 22 => 'Use un t?tulo claro que describa el contenido del mensaje.', 23 => 'Su direcci?n de email NO ser? divulgada.', ! 24 => 'Usuario An?nimo' ); *************** *** 209,217 **** 7 => "Biograf?a", 8 => "Clave PGP", ! 9 => "Grabar la Informaci?n", 10 => "Ultimos 10 comentarios", 11 => "No hay comentarios", 12 => "Preferencias del Usuario para", ! 13 => "Enviar un resumen cada nohe por Email", 14 => "Este password es generado al azar. Se recomienda que cambie el password cuanto antes. Para cambiar el password conectese al sitio con su usuario.", 15 => "Su cuenta en {$_CONF["site_name"]} fue creada exitosamente. Para poder usarla debe ingresar utilizando los datos dados m?s abajo. Guarde este mensaje para futuras referencias.", --- 211,219 ---- 7 => "Biograf?a", 8 => "Clave PGP", ! 9 => "Guardar", 10 => "Ultimos 10 comentarios", 11 => "No hay comentarios", 12 => "Preferencias del Usuario para", ! 13 => "Enviar un resumen cada noche por Email", 14 => "Este password es generado al azar. Se recomienda que cambie el password cuanto antes. Para cambiar el password conectese al sitio con su usuario.", 15 => "Su cuenta en {$_CONF["site_name"]} fue creada exitosamente. Para poder usarla debe ingresar utilizando los datos dados m?s abajo. Guarde este mensaje para futuras referencias.", *************** *** 226,231 **** 24 => "Su password ser? enviado a la direcci?n de email que ingrese.", 25 => "Olvid? su Password?", ! 26 => "Ingrese su nombre de usuario y elija 'Enviar el Password por email' y el su nuevo password ser? enviado por email a su direcci?n", ! 27 => "?Registrate ahora!", 28 => "Enviar el password por email", 29 => "desconectado de", --- 228,233 ---- 24 => "Su password ser? enviado a la direcci?n de email que ingrese.", 25 => "Olvid? su Password?", ! 26 => "Ingrese su nombre de usuario y elija 'Enviar el Password por email' y su nuevo password ser? enviado por email a su direcci?n", ! 27 => "?Reg?strate ahora!", 28 => "Enviar el password por email", 29 => "desconectado de", *************** *** 257,270 **** 55 => "Si no selecciona ninguna significa que desea la selecci?n por defecto. De seleccionar, seleccione todas las de su inter?s ya que las opciones por defecto ya no ser?n tomadas en cuenta. Las opciones por defecto se muestran resaltadas.", 56 => "Autores", ! 57 => "Modo de visualizaci?n", 58 => "Orden", 59 => "Limite por Comentario", 60 => "?C?mo desea ver los comentarios?", ! 61 => "?Primero los m?s viejos o los m?s nuevos?", 62 => "El valor por defecto es 100", ! 63 => "Gracias por usar {$_CONF['site_name']}. Su password a sido enviado por email y estar? llenado en unos instantes. Por favor siga las instrucciones en el mensaje.", 64 => "Preferencias para los Comentarios de", ! 65 => "Intente reingresar con su usuario", ! 66 => "Los datos ingresados no son v?lidos. Intente volver conectarse aqui. ?Es un usuario nuevo?", 67 => "Miembro desde", 68 => "Recu?rdeme para", --- 259,272 ---- 55 => "Si no selecciona ninguna significa que desea la selecci?n por defecto. De seleccionar, seleccione todas las de su inter?s ya que las opciones por defecto ya no ser?n tomadas en cuenta. Las opciones por defecto se muestran resaltadas.", 56 => "Autores", ! 57 => "Modo de Presentaci?n", 58 => "Orden", 59 => "Limite por Comentario", 60 => "?C?mo desea ver los comentarios?", ! 61 => "?Primero los m?s antiguos o los m?s recientes?", 62 => "El valor por defecto es 100", ! 63 => "Gracias por usar {$_CONF['site_name']}. Su password a sido enviado por email y estar? llegando en unos instantes. Por favor siga las instrucciones en el mensaje.", 64 => "Preferencias para los Comentarios de", ! 65 => "Intente reconectarse otra vez", ! 66 => "Los datos ingresados no son v?lidos. Intente volver a conectarse aqu?. ?Es usted un usuario nuevo?", 67 => "Miembro desde", 68 => "Recu?rdeme para", *************** *** 275,280 **** 73 => "Idioma", 74 => "?Cambie la apariencia de esta p?gina!", ! 75 => "Secciones enviadas por mail a", ! 76 => "Si selecciona una o m?s Secciones de la lista de abajo, todas las Notas nuevas de esas Secciones le ser?n enviadas por mail al finalizar el d?a." ); --- 277,292 ---- 73 => "Idioma", 74 => "?Cambie la apariencia de esta p?gina!", ! 75 => "Secciones enviadas por email a", ! 76 => "Si selecciona una o m?s Secciones de la lista de abajo, todas las Notas nuevas de esas Secciones le ser?n enviadas por mail al finalizar el d?a.", ! 77 => "Foto", ! 78 => "A?adir una imagen tuya!", ! 79 => "Tildar el checkbox para borrar tu foto", ! 80 => "Identificaci?n", ! 81 => "Enviar Email", ! 82 => 'Ultimas 10 noticias para el usuario', ! 83 => 'Estad?sticas de noticias para el usuario', ! 84 => 'N?mero total de art?culos:', ! 85 => 'N?mero total de comentarios:', ! 86 => 'Encontrar todas las noticias de' ); *************** *** 287,292 **** 3 => "para la Secci?n $topic", 4 => "Nota del D?a", ! 5 => "Pr?ximo", ! 6 => "Previo" ); --- 299,304 ---- 3 => "para la Secci?n $topic", 4 => "Nota del D?a", ! 5 => "Siguiente", ! 6 => "Anterior" ); *************** *** 384,388 **** 27 => "segundos", 28 => 'No se encontraron coincidencias en Notas y Comentarios', ! 29 => 'Resultados para Notas y Comentarios' ); --- 396,413 ---- 27 => "segundos", 28 => 'No se encontraron coincidencias en Notas y Comentarios', ! 29 => 'Resultados para Notas y Comentarios', ! 30 => 'Ning?n link coincide con la b?squeda', ! 31 => 'Este plug-in no devolvi? resultados', ! 32 => 'Evento', ! 33 => 'URL', ! 34 => 'Ubicaci?n', ! 35 => 'Todo el dia', ! 36 => 'Ning?n evento coincidi? con la b?squeda', ! 37 => 'Resultados de Eventos', ! 38 => 'Resultados de Links', ! 39 => 'Links', ! 40 => 'Eventos', ! 41 => 'Tu b?squeda debe tener al menos 3 letras.', ! 42 => 'Por favor utiliza un formato de fecha como este DD-MM-YYYY (d?a-mes-a?o).' ); *************** *** 412,418 **** 20 => "Visitas", 21 => "Parecer?a que en este sitio no hay Links o que nadie nuca los visita.", ! 22 => "Las 10 Notas m?s enviadas por mail", 23 => "Emails", ! 24 => "Parecer?a que nadie mand? una nota por mail en este sitio." ); --- 437,443 ---- 20 => "Visitas", 21 => "Parecer?a que en este sitio no hay Links o que nadie nuca los visita.", ! 22 => "Las 10 Notas m?s enviadas por email", 23 => "Emails", ! 24 => "Parecer?a que nadie mand? una nota por email en este sitio." ); *************** *** 454,459 **** 22 => "Error: Faltan Campos", 23 => "Por favor complete todo los campos del formulario. Todos los campos son requeridos.", ! 24 => "Envio Grabado", ! 25 => "Sus envios fueron grabados con ?xito.", 26 => "L?mite de Velocidad", 27 => "Nombre del Usuario", --- 479,484 ---- 22 => "Error: Faltan Campos", 23 => "Por favor complete todo los campos del formulario. Todos los campos son requeridos.", ! 24 => "Env?o Guardado", ! 25 => "Sus env?os fueron grabados con ?xito.", 26 => "L?mite de Velocidad", 27 => "Nombre del Usuario", *************** *** 469,473 **** 37 => "Los Eventos enviados a {$_CONF["site_name"]} se agregan al Calendario P?blico, donde el resto de los usuarios pueden agregarlo a su Calendario Personal. Esta funcionalidad NO est? pensada para que guarde sus eventos personales como cumplea?os, citas, etc.

Una vez enviado el evento ser? evaluado por los Administradores, de ser aprobado se mostrar? en el Calendrio P?blico", 38 => "Agregar un Evento a", ! 39 => "Calendario P?blicor", 40 => "Calendario Personal", 41 => "Hora de Finalizaci?n", --- 494,498 ---- 37 => "Los Eventos enviados a {$_CONF["site_name"]} se agregan al Calendario P?blico, donde el resto de los usuarios pueden agregarlo a su Calendario Personal. Esta funcionalidad NO est? pensada para que guarde sus eventos personales como cumplea?os, citas, etc.

Una vez enviado el evento ser? evaluado por los Administradores, de ser aprobado se mostrar? en el Calendrio P?blico", 38 => "Agregar un Evento a", ! 39 => "Calendario P?blico", 40 => "Calendario Personal", 41 => "Hora de Finalizaci?n", *************** *** 482,486 **** 50 => 'Editar los Tipos de Eventos', 51 => 'Locaci?n', ! 52 => 'Borrar' ); --- 507,512 ---- 50 => 'Editar los Tipos de Eventos', 51 => 'Locaci?n', ! 52 => 'Borrar', ! 53 => 'Crear Cuenta' ); *************** *** 520,524 **** 12 => "Bloque Normal", 13 => "Opciones para el Bloque del Sistema", ! 14 => "RDF URL", 15 => "?ltima actualizaci?n RDF", 16 => "Opciones para el Bloque Normal", --- 546,550 ---- 12 => "Bloque Normal", 13 => "Opciones para el Bloque del Sistema", ! 14 => "RDF(Resource Description Framework)URL", 15 => "?ltima actualizaci?n RDF", 16 => "Opciones para el Bloque Normal", *************** *** 551,555 **** 43 => "S?lo en la P?gina de Inicio", 44 => "Acceso Denegado", ! 45 => "You are trying to access a block that you don't have rights to. This attempt has been logged. Please go back to the block administration screen.", 46 => 'Nuevo Bloque', 47 => 'P?gina de Inicio - Administrador', --- 577,581 ---- 43 => "S?lo en la P?gina de Inicio", 44 => "Acceso Denegado", ! 45 => "Usted esta tratando de acceder a un bloque en el cual usted no tiene los permisos requeridos. Este intento ha sido registrado. Por favor vuelva a la pantalla de administraci?n de bloques.", 46 => 'Nuevo Bloque', 47 => 'P?gina de Inicio - Administrador', *************** *** 559,563 **** 51 => 'incluir http://', 52 => 'Si deja este campo en blanco no se mostrar? el ?cono de ayuda', ! 53 => 'Habilitado' ); --- 585,592 ---- 51 => 'incluir http://', 52 => 'Si deja este campo en blanco no se mostrar? el ?cono de ayuda', ! 53 => 'Habilitado', ! 54 => 'grabar', ! 55 => 'cancelar', ! 56 => 'borrar' ); *************** *** 584,588 **** 17 => "No tiene permiso para acceder a este Evento. Todo intento de acceso ser? registrado. Por favor, vuelva a la p?gina de Administraci?n de Eventos.", 18 => 'Nuevo Evento', ! 19 => 'P?gina de Inicio - Administrador' ); --- 613,620 ---- 17 => "No tiene permiso para acceder a este Evento. Todo intento de acceso ser? registrado. Por favor, vuelva a la p?gina de Administraci?n de Eventos.", 18 => 'Nuevo Evento', ! 19 => 'P?gina de Inicio - Administrador', ! 20 => 'grabar', ! 21 => 'cancelar', ! 22 => 'borrar' ); *************** *** 610,614 **** 18 => 'Nuevo Link', 19 => 'P?gina de Inicio - Administrador', ! 20 => 'Si otra/o, especifique' ); --- 642,649 ---- 18 => 'Nuevo Link', 19 => 'P?gina de Inicio - Administrador', ! 20 => 'Si otra/o, especifique', ! 21 => 'grabar', ! 22 => 'cancelar', ! 23 => 'borrar' ); *************** *** 622,631 **** 4 => "Modo de envio", 5 => "Editor de Notas", ! 6 => "", 7 => "Autor", ! 8 => "", ! 9 => "", ! 10 => "", ! 11 => "", 12 => "", 13 => "T?tulo", --- 657,666 ---- 4 => "Modo de envio", 5 => "Editor de Notas", ! 6 => "No hay Noticias en el sistema", 7 => "Autor", ! 8 => "grabar", ! 9 => "prever", ! 10 => "cancelar", ! 11 => "borrar", 12 => "", 13 => "T?tulo", *************** *** 657,666 **** 39 => "Emails", 40 => "Acceso Denegado", ! 41 => "Esta intentando acceder a una Nota pra la cual no tiene derechos de acceso, por lo que podr? ver la Nota pero no editarla. Por favor vuelva a la p?gina de administraci?n cuando haya terminado.", ! 42 => "Esta intentando acceder a una Nota pra la cual no tiene derechos de acceso. Por favor vuelva a la p?gina de administraci?n.", 43 => 'Nueva Nota', 44 => 'P?gina de Inicio - Administrador', 45 => 'Acceso', ! 46 => 'NOTA: si modifica esta fecha por una futura, la Nota no ser? publicada hasta esa fecha. Esto tambi?n incluye el envi? de titulares RDF, la b?squeda y las estad?sticas del sitio.', 47 => 'Im?genes', 48 => 'imagen', --- 692,701 ---- 39 => "Emails", 40 => "Acceso Denegado", ! 41 => "Esta intentando acceder a una Nota para la cual no tiene derechos de acceso, por lo que podr? ver la Nota pero no editarla. Por favor vuelva a la p?gina de administraci?n cuando haya terminado.", ! 42 => "Esta intentando acceder a una Nota para la cual no tiene derechos de acceso. Por favor vuelva a la p?gina de administraci?n.", 43 => 'Nueva Nota', 44 => 'P?gina de Inicio - Administrador', 45 => 'Acceso', ! 46 => 'NOTA: si modifica esta fecha por una futura, la Nota no ser? publicada hasta esa fecha. Esto tambi?n incluye el envi? de titulares RDF(Resource Description Framework), la b?squeda y las estad?sticas del sitio.', 47 => 'Im?genes', 48 => 'imagen', *************** *** 671,675 **** 53 => 'no fue usada. Debe incluir esta imagen en la Introducci?n o el Texto para poder grabar los cambios', 54 => 'Im?genes no utilizadas', ! 55 => 'Los siguientes errores ocurriron al querer grabar su Nota. Por favor corrija los errores antes de grabar.' ); --- 706,711 ---- 53 => 'no fue usada. Debe incluir esta imagen en la Introducci?n o el Texto para poder grabar los cambios', 54 => 'Im?genes no utilizadas', ! 55 => 'Los siguientes errores ocurriron al querer grabar su Nota. Por favor corrija los errores antes de grabar.', ! 56 => 'Mostrar Icono de Tema' ); *************** *** 691,697 **** 12 => "Hubo un error buscando los datos para la pregunta de la Encuesta $qid", 13 => "Crear Encuesta", ! 14 => "", ! 15 => "", ! 16 => "", 17 => "", 18 => "Listado de Encuestas", --- 727,733 ---- 12 => "Hubo un error buscando los datos para la pregunta de la Encuesta $qid", 13 => "Crear Encuesta", ! 14 => "grabar", ! 15 => "cancelar", ! 16 => "borrar", 17 => "", 18 => "Listado de Encuestas", *************** *** 699,703 **** 20 => "Votantes", 21 => "Acceso Denegado", ! 22 => "Esta intentando acceder a una Encuesta pra la cual no tiene derechos de acceso. Por favor vuelva a la p?gina de administraci?n.", 23 => 'Nueva Encuesta', 24 => 'P?gina de Inicio - Administrador', --- 735,739 ---- 20 => "Votantes", 21 => "Acceso Denegado", ! 22 => "Esta intentando acceder a una Encuesta para la cual no tiene derechos de acceso. Por favor vuelva a la p?gina de administraci?n.", 23 => 'Nueva Encuesta', 24 => 'P?gina de Inicio - Administrador', *************** *** 710,714 **** $LANG27 = array( ! 1 => "Editor dse Secciones", 2 => "ID", 3 => "Nombre", --- 746,750 ---- $LANG27 = array( ! 1 => "Editor de Secciones", 2 => "ID", 3 => "Nombre", *************** *** 722,731 **** 11 => "Notas/P?gina", 12 => "Acceso Denegado", ! 13 => "Esta intentando acceder a una Secci?n pra la cual no tiene derechos de acceso. Por favor vuelva a la p?gina de administraci?n.", 14 => "Ordenamiento", 15 => "alfab?tico", 16 => "por defecto es", 17 => "Nueva Secci?n", ! 18 => "P?gina de Inicio - Administrador" ); --- 758,770 ---- 11 => "Notas/P?gina", 12 => "Acceso Denegado", ! 13 => "Esta intentando acceder a una Secci?n para la cual no tiene derechos de acceso. Por favor vuelva a la p?gina de administraci?n.", 14 => "Ordenamiento", 15 => "alfab?tico", 16 => "por defecto es", 17 => "Nueva Secci?n", ! 18 => "P?gina de Inicio - Administrador", ! 19 => 'grabar', ! 20 => 'cancelar', ! 21 => 'borrar' ); *************** *** 746,751 **** 11 => "Administrador de Usuarios", 12 => "Para modificar o borrar un Usuario el?jalo en la lista de abajo. Para crear uno nuevo selecione 'Nuevo Usuario' m?s arriba.", ! 13 => "SecLev", ! 14 => "Reg. Date", 15 => 'Nuevo Usuario', 16 => 'P?gina de Inicio - Administrador', --- 785,790 ---- 11 => "Administrador de Usuarios", 12 => "Para modificar o borrar un Usuario el?jalo en la lista de abajo. Para crear uno nuevo selecione 'Nuevo Usuario' m?s arriba.", ! 13 => "Nivel de seguridad", ! 14 => "Fecha de Registro", 15 => 'Nuevo Usuario', 16 => 'P?gina de Inicio - Administrador', *************** *** 761,770 **** 23 => 'Importaci?n Masiva', 24 => 'Importaci?n masiva de Usuarios', ! 25 => 'Puede importar una lista de Usuarios a '.$_CONF["site_name"].'. El archivo con la lista de usuarios debe tener un registro por l?nea y los campos separados por TAB. Los campos deben estar en el siguiente orden: Nombre Completo, Nombre de Usuario, Direcci?n de Mail. A cada usuario agragdo se le enviar? por mail un password generado al azar, que podr?n cambiar al ingresar al sitio. Por favor, chequee bien el archivo de importaci?n ya que los errores encontrados pueden llegar a necesaitar arreglaos manuales.', 26 => 'Buscar', ! 27 => 'Limitar los resultados' ); - ############################################################################### # moderation.php --- 800,815 ---- 23 => 'Importaci?n Masiva', 24 => 'Importaci?n masiva de Usuarios', ! 25 => 'Puede importar una lista de Usuarios a '.$_CONF["site_name"].'. El archivo con la lista de usuarios debe tener un registro por l?nea y los campos separados por TAB. Los campos deben estar en el siguiente orden: Nombre Completo, Nombre de Usuario, Direcci?n de Mail. A cada usuario agregado se le enviar? por email un password generado al azar, que podr?n cambiar al ingresar al sitio. Por favor, chequee bien el archivo de importaci?n ya que los errores encontrados pueden llegar a necesaitar arreglos manuales.', 26 => 'Buscar', ! 27 => 'Limitar los resultados', ! 28 => 'Tildar el checkbox para borrar esta imagen', ! 29 => 'Ruta', ! 30 => 'Importar', ! 31 => 'Nuevos Usuarios', ! 32 => 'Proceso finalizado. Se importaron $successes y hubieron $failures fallos', ! 33 => 'enviar', ! 34 => 'Error: Debes especificar un archivo a enviar.' ); ############################################################################### # moderation.php *************** *** 774,777 **** --- 819,832 ---- 2 => "Borrar", 3 => "Editar", + 4 => 'Perfil', + 10 => "T?tulo", + 11 => "Fecha Inicio", + 12 => "URL", + 13 => "Categor?a", + 14 => "Fecha", + 15 => "Tema", + 16 => 'Nombre del usuario', + 17 => 'Nombre completo', + 18 => 'Email', 34 => "P?gina de administraci?n", 35 => "Envios de Notas", *************** *** 779,783 **** 37 => "Envios de Eventos", 38 => "Enviar", ! 39 => "No hay envios para moderar en este momento" ); --- 834,840 ---- 37 => "Envios de Eventos", 38 => "Enviar", ! 39 => "No hay envios para moderar en este momento", ! 40 => "Envios del Usuario" ! ); *************** *** 814,818 **** 27 => "Semana", 28 => "Calendario Personal para", ! 29 => "Calendario Publico", 30 => "borrar evento", 31 => "Agregar", --- 871,875 ---- 27 => "Semana", 28 => "Calendario Personal para", ! 29 => "Calendario P?blico", 30 => "borrar evento", 31 => "Agregar", *************** *** 823,827 **** 36 => "Enviar", 37 => "Disculpe, la opci?n de calendario personal no se encuentra habilitada en este sitio", ! 38 => "Editor Personal de Eventos" ); --- 880,887 ---- 36 => "Enviar", 37 => "Disculpe, la opci?n de calendario personal no se encuentra habilitada en este sitio", ! 38 => "Editor Personal de Eventos", ! 39 => 'D?a', ! 40 => 'Semana', ! 41 => 'Mes' ); *************** *** 829,833 **** # admin/mail.php $LANG31 = array( ! 1 => "Mail", 2 => "De", 3 => "Responder a", --- 889,893 ---- # admin/mail.php $LANG31 = array( ! 1 => $_CONF['site_name'] . " Mail Utility", 2 => "De", 3 => "Responder a", *************** *** 852,859 **** 22 => 'Exitosos', 23 => 'No hubo env?os fallidos', ! 24 => 'No hubo env?os exitosos' ); - ############################################################################### # confirmation and error messages --- 912,920 ---- 22 => 'Exitosos', 23 => 'No hubo env?os fallidos', ! 24 => 'No hubo env?os exitosos' , ! 25 => '-- Selecciona Grupo --', ! 26 => "Por favor, rellena todos los campos del formulario y selecciona un grupo de usuarios de la lista desplegable." ); ############################################################################### # confirmation and error messages *************** *** 872,877 **** 11 => "Su Bloque ha sido grabado con ?xito.", 12 => "El Bloque ha sido borrado con ?xito.", ! 13 => "Su Secci?n ha sido borrado con ?xito.", ! 14 => "La Secci?n junto con todas sus Notas y Bloques ha sido borrado con ?xito.", 15 => "Su link fue grabado con ?xito.", 16 => "El link fue borrado con ?xito.", --- 933,938 ---- 11 => "Su Bloque ha sido grabado con ?xito.", 12 => "El Bloque ha sido borrado con ?xito.", ! 13 => "Su Secci?n ha sido borrada con ?xito.", ! 14 => "La Secci?n junto con todas sus Notas y Bloques han sido borrado con ?xito.", 15 => "Su link fue grabado con ?xito.", 16 => "El link fue borrado con ?xito.", *************** *** 905,909 **** 44 => 'El Plug-In fue instalado con ?xito.', 45 => 'El Plug-In fue borrado con ?xito.', ! 46 => "Disculpe, no tiene acceso a la herramienta de Backup de la base. Aclaramos que todo acceso sin autorizaci?n queda registrado en el servidor." ); --- 966,978 ---- 44 => 'El Plug-In fue instalado con ?xito.', 45 => 'El Plug-In fue borrado con ?xito.', ! 46 => "Disculpe, no tiene acceso a la herramienta de Backup de la base de datos. Aclaramos que todo acceso sin autorizaci?n queda registrado en el servidor.", ! 47 => "Esta funci?n est? disponible bajo *nix. Si est?s usando *nix como tu sistema operativo, entonces tu cach? ha sido limpiado con ?xito. Si est?s bajo Windows, necesitas buscar ficheros adodb_*.php y borrarlos manualmente.", ! ! 48 => 'Gracias por registrarte como miembro en ' . $_CONF['site_name'] . '. Nuestro equipo comprobar? tu solicitud. Si es aprobada, te ser? enviado tu password a la direcci?n email que has indicado.', ! 49 => "Tu grupo ha sido grabado con ?xito.", ! 50 => "El grupo ha sido borrado con ?xito." ! ! ! ); *************** *** 911,915 **** $LANG32 = array ( ! 1 => "Instalar plugins puede da?ar su instalaci?n de Geeklog y, posiblemente, su sistema. Es importante que s?lo instale plugins obtenidos de Geeklog ya que han sido testeados en varios entornos. Es tambi?n importante que entienda que la instalaci?n del plugin requiere la ejecuci?n de comandos del sistema que pueden traer problemas de seguridad. A?n con esta advertencia, no garabtizamos el ?xito de la instalaci?n del plugin ni nos hacemos responsables por cualquier da?o causado durante la instalaci?n (o posterior a la misma). En otras palabras, instale el plugin a su propio riesgo. Las instrucciones particulares de instalaci?n vienen dentro de cada plugin.", 2 => "Advertencia de la Instalaci?n del Plug-in", 3 => "Formulario de instalaci?n del Plug-in", --- 980,984 ---- $LANG32 = array ( ! 1 => "Instalar plugins puede da?ar su instalaci?n de Geeklog y, posiblemente, su sistema. Es importante que s?lo instale plugins obtenidos de Geeklog ya que han sido testeados en varios entornos. Es tambi?n importante que entienda que la instalaci?n del plugin requiere la ejecuci?n de comandos del sistema que pueden traer problemas de seguridad. A?n con esta advertencia, no garantizamos el ?xito de la instalaci?n del plugin ni nos hacemos responsables por cualquier da?o causado durante la instalaci?n (o posterior a la misma). En otras palabras, instale el plugin a su propio riesgo. Las instrucciones particulares de instalaci?n vienen dentro de cada plugin.", 2 => "Advertencia de la Instalaci?n del Plug-in", 3 => "Formulario de instalaci?n del Plug-in", *************** *** 954,959 **** permmsg => "NOTA: miembros son todos los miembros conectados y los usuarios an?nimos en el sitio.", securitygroups => "Grupos de Seguridad", ! editrootmsg => "Even though you are a User Administrator, you can't edit a root user without first being a root user yourself. You can edit all other users except root users. Please note that all attempts to illegally edit root users are logged. Please go back to the User Administration page.", ! securitygroupsmsg => "Select the checkboxes for the groups you want the user to belong to.", groupeditor => "Editor de Grupo", description => "Descripci?n", --- 1023,1028 ---- permmsg => "NOTA: miembros son todos los miembros conectados y los usuarios an?nimos en el sitio.", securitygroups => "Grupos de Seguridad", ! editrootmsg => "Aunque usted sea un usuario con privilegios de administrator, usted no puede editar a un usuario root sin primeramente ser usted mismo un usuario root. Usted puede editar todo tipo de usuarios menos usuarios root. Note que todo inento ilegal de editar a un usuario root queda registrado por el server. Por favor vuelva atras a La pagina de Administraci?n de Usuarios.", ! securitygroupsmsg => "Seleccione los checkboxes para los grupos que a usted quiere que el usuario pertenezca.", groupeditor => "Editor de Grupo", description => "Descripci?n", *************** *** 968,975 **** yes => "S?", no => "No", corerightsdescr => "Este grupo es un Grupo de Sistema de {$_CONF["site_name"]}, y por ende sus derechos no pueden ser editados. A continuaci?n se muestra una lista no editable de los derechos de acceso de este grupo.", groupmsg => "Los Grupos de Seguridad en este sitio son jer?rquicos. Al agregar este grupo a cualquiera de los de abajo le estar? dando los mismos derechos que esos grupos posean. De ser posible, se recomienda utilizar los grupos ya creados para dar los derechos a un nuevo grupo. Si necesita modificar los derechos del grupo, puede seleccionarlos en la secci?n llamada 'Derechos'. Para agregar este grupo a cualquiera de los de abajo simplemente marque los grupos que quiera.", coregroupmsg => "Este grupo es un Grupo de Sistema de {$_CONF["site_name"]}, y por ende los grupos que pertenezcan a este grupo no podr?n ser editados. A continuaci?n se muestar una lista (no editable) de los grupos a los cuales este grupo pertenece.", ! rightsdescr => "A groups access to a certain right below can be given directly to the group OR to a different group that this group is a part of. The ones you see below without a checkbox are the rights that have been given to this group because it belongs to another group with that right. The rights with checkboxes below are rights that can be given directly to this group.", lock => "Bloqueo", members => "Miembros", --- 1037,1049 ---- yes => "S?", no => "No", + corerightsdescr => "Este grupo es un Grupo de Sistema de {$_CONF["site_name"]}, y por ende sus derechos no pueden ser editados. A continuaci?n se muestra una lista no editable de los derechos de acceso de este grupo.", + groupmsg => "Los Grupos de Seguridad en este sitio son jer?rquicos. Al agregar este grupo a cualquiera de los de abajo le estar? dando los mismos derechos que esos grupos posean. De ser posible, se recomienda utilizar los grupos ya creados para dar los derechos a un nuevo grupo. Si necesita modificar los derechos del grupo, puede seleccionarlos en la secci?n llamada 'Derechos'. Para agregar este grupo a cualquiera de los de abajo simplemente marque los grupos que quiera.", + coregroupmsg => "Este grupo es un Grupo de Sistema de {$_CONF["site_name"]}, y por ende los grupos que pertenezcan a este grupo no podr?n ser editados. A continuaci?n se muestar una lista (no editable) de los grupos a los cuales este grupo pertenece.", ! ! rightsdescr => "El acceso de un grupo a ciertos privilegios puede ser dado directamente al grupo o a un grupo diferente al cual este grupo pertenezca. Los privilegios que usted vea debajo sin checkbox son los privilegios que fueron dados a este grupo porque ya pertenecia a otro grupo con ese privilegio. Los privilegios que veas debajo con checkbox son los derechos que pueden ser asignados directametne a este grupo.", ! lock => "Bloqueo", members => "Miembros", *************** *** 988,994 **** --- 1062,1071 ---- save => 'Grabar', cancel => 'Cancelar', + delete => 'borrar', canteditroot => 'Ha intentado editar el Grupo Root. Como no es miembro del grupo no tiene acceso al mismo. Si cree que esto ha sido un error por favor contacte al administrador del sistema.' ); + #################################################################################################################################3 + #admin/word.php $LANG_WORDS = array( *************** *** 1007,1012 **** backup_successful => 'El back up de la base se ha realizado con ?xito.', no_backups => 'No hay backups en el sistema', ! db_explanation => 'Para crear un backup del sistema utilice el bot?n de abajo' ); ?> --- 1084,1134 ---- backup_successful => 'El back up de la base se ha realizado con ?xito.', no_backups => 'No hay backups en el sistema', ! db_explanation => 'Para crear un backup del sistema utilice el bot?n de abajo', ! ! not_found => "Ruta incorrecta o la utilidad mysqldump no se puede ejecutar.
Comprueba la definici?n de \$_DB_mysqldump_path en config.php.
La variable est? definida actualmente como: {$_DB_mysqldump_path}", ! zero_size => 'Fallo de Backup: El tama?o era de 0 bytes', ! path_not_found => "{$_CONF['backup_path']} no existe o no es una carpeta", ! no_access => "ERROR: La carpeta {$_CONF['backup_path']} no es accesible.", ! backup_file => 'Archivo de backup', ! size => 'Tama?o', ! bytes => 'Bytes' ! ! ! ); ! ! ! $LANG_BUTTONS = array( ! ! 1 => "Inicio", ! 2 => "Contacto", ! 3 => "Publ?cate", ! 4 => "Links", ! 5 => "Encuentas", ! 6 => "Calendario", ! 7 => "Estad?sticas", ! 8 => "Personalizar", ! 9 => "Buscar", ! 10 => "b?squeda avanzada" ! ); ! ! ! $LANG_404 = array( ! ! 1 => "Error 404", ! 2 => "Buah, he mirado en todos los lados pero no puedo encontrar http://{$HTTP_SERVER_VARS["HTTP_HOST"]}{$HTTP_SERVER_VARS["REQUEST_URI"]}.", ! 3 => "

Lo sentimos, pero el archivo que pides no existe. Por favor, consulta la p?gina principal o la p?gina de b?squeda para ver si puedes encontrar lo que has perdido." ! ); ! ! ! ! $LANG_LOGIN = array ( ! ! 1 => 'Se requiere ingresar', ! 2 => 'Lo siento, para acceder a esta ?rea tienes que estar autentificado como usuario.', ! 3 => 'Ingresar', ! 4 => 'Nuevo Usuario' ); + + ?> From geeklog-cvs-admin at lists.geeklog.net Mon May 26 06:33:18 2003 From: geeklog-cvs-admin at lists.geeklog.net (geeklog-cvs-admin at lists.geeklog.net) Date: Mon, 26 May 2003 05:33:18 -0500 Subject: [geeklog-cvs] geeklog-1.3/system lib-sessions.php,1.14.2.1,1.14.2.2 Message-ID: <200305261033.h4QAXIi17406@internal.geeklog.net> Update of /usr/cvs/geeklog/geeklog-1.3/system In directory internal.geeklog.net:/tmp/cvs-serv17392 Modified Files: Tag: geeklog_1_3_7sr1_1 lib-sessions.php Log Message: Use is_numeric(), not is_int(). Index: lib-sessions.php =================================================================== RCS file: /usr/cvs/geeklog/geeklog-1.3/system/lib-sessions.php,v retrieving revision 1.14.2.1 retrieving revision 1.14.2.2 diff -C2 -d -r1.14.2.1 -r1.14.2.2 *** lib-sessions.php 23 May 2003 11:42:20 -0000 1.14.2.1 --- lib-sessions.php 26 May 2003 10:33:15 -0000 1.14.2.2 *************** *** 100,104 **** if (isset($HTTP_COOKIE_VARS[$_CONF['cookie_name']])) { $userid = $HTTP_COOKIE_VARS[$_CONF['cookie_name']]; ! if (empty ($userid) || !is_int ($userid)) { unset ($userid); } else { --- 100,104 ---- if (isset($HTTP_COOKIE_VARS[$_CONF['cookie_name']])) { $userid = $HTTP_COOKIE_VARS[$_CONF['cookie_name']]; ! if (empty ($userid) || !is_numeric ($userid)) { unset ($userid); } else { *************** *** 134,138 **** $userid = $HTTP_COOKIE_VARS[$_CONF['cookie_name']]; ! if (!is_int ($userid)) { unset ($userid); } else { --- 134,138 ---- $userid = $HTTP_COOKIE_VARS[$_CONF['cookie_name']]; ! if (!is_numeric ($userid)) { unset ($userid); } else { From geeklog-cvs-admin at lists.geeklog.net Mon May 26 06:33:32 2003 From: geeklog-cvs-admin at lists.geeklog.net (geeklog-cvs-admin at lists.geeklog.net) Date: Mon, 26 May 2003 05:33:32 -0500 Subject: [geeklog-cvs] geeklog-1.3/system lib-sessions.php,1.18,1.19 Message-ID: <200305261033.h4QAXWi17422@internal.geeklog.net> Update of /usr/cvs/geeklog/geeklog-1.3/system In directory internal.geeklog.net:/tmp/cvs-serv17410 Modified Files: lib-sessions.php Log Message: Use is_numeric(), not is_int(). Index: lib-sessions.php =================================================================== RCS file: /usr/cvs/geeklog/geeklog-1.3/system/lib-sessions.php,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** lib-sessions.php 23 May 2003 11:42:06 -0000 1.18 --- lib-sessions.php 26 May 2003 10:33:30 -0000 1.19 *************** *** 109,113 **** if (isset($HTTP_COOKIE_VARS[$_CONF['cookie_name']])) { $userid = $HTTP_COOKIE_VARS[$_CONF['cookie_name']]; ! if (empty ($userid) || !is_int ($userid)) { unset ($userid); } else { --- 109,113 ---- if (isset($HTTP_COOKIE_VARS[$_CONF['cookie_name']])) { $userid = $HTTP_COOKIE_VARS[$_CONF['cookie_name']]; ! if (empty ($userid) || !is_numeric ($userid)) { unset ($userid); } else { *************** *** 143,147 **** $userid = $HTTP_COOKIE_VARS[$_CONF['cookie_name']]; ! if (!is_int ($userid)) { unset ($userid); } else { --- 143,147 ---- $userid = $HTTP_COOKIE_VARS[$_CONF['cookie_name']]; ! if (!is_numeric ($userid)) { unset ($userid); } else { From geeklog-cvs-admin at lists.geeklog.net Mon May 26 07:56:51 2003 From: geeklog-cvs-admin at lists.geeklog.net (geeklog-cvs-admin at lists.geeklog.net) Date: Mon, 26 May 2003 06:56:51 -0500 Subject: [geeklog-cvs] geeklog-1.3 config.php,1.69,1.69.2.1 Message-ID: <200305261156.h4QBupi18216@internal.geeklog.net> Update of /usr/cvs/geeklog/geeklog-1.3 In directory internal.geeklog.net:/tmp/cvs-serv18198 Modified Files: Tag: geeklog_1_3_7sr1_1 config.php Log Message: Fixed typos in US state names and added a warning about the dangers of adding some HTML tags to the set of allowable HTML. Index: config.php =================================================================== RCS file: /usr/cvs/geeklog/geeklog-1.3/config.php,v retrieving revision 1.69 retrieving revision 1.69.2.1 diff -C2 -d -r1.69 -r1.69.2.1 *** config.php 13 Jan 2003 13:21:29 -0000 1.69 --- config.php 26 May 2003 11:56:49 -0000 1.69.2.1 *************** *** 356,361 **** --- 356,365 ---- // Parameters for checking words and HTML tags + // *** Warning: Adding the following tags to the list of allowable HTML can + // *** make your site vulnerable to scripting attacks! + // *** Use with care: