paristemi
[ class tree: paristemi ] [ index: paristemi ] [ all elements ]

Source for file db_cal.php

Documentation is available at db_cal.php

  1. <?php
  2. /**
  3. * <b>Database Class : Calendar</b><br />
  4. * Provides all database access methods for the calendar section
  5. * @author Kristen O'Brien <kristen_paristemi-com>
  6. * @copyright Copyright 2004, Kristen O'Brien
  7. * @license http://opensource.org/licenses/gpl-license.php GNU Public License
  8. * @link http://www.paristemi.com Paristemi Main Site
  9. * @package paristemi
  10. * @subpackage paristemi_database_layer
  11. * @since Build 0.5
  12. * @version Build 0.7
  13. * @filesource
  14. */
  15. /**
  16. * <b>Database Class : Calendar</b><br />
  17. * Provides all database access methods for the calendar section
  18. * @author Kristen O'Brien <kristen_paristemi-com>
  19. * @copyright Copyright 2004, Kristen O'Brien
  20. * @license http://opensource.org/licenses/gpl-license.php GNU Public License
  21. * @link http://www.paristemi.com Paristemi Main Site
  22. * @package paristemi
  23. * @subpackage paristemi_database_layer
  24. * @since Build 0.5
  25. * @version Build 0.7
  26. * @filesource
  27. */
  28. class DB_Cal {
  29. function DB_Cal() { }
  30. // Same code as in calendar include, but repeated so that this file can stand
  31. // alone from all of the other code
  32. function &incDay ($today)
  33. {
  34. $total_days = getdate(mktime(0,0,0,$today['mon']+1,1,$today['year'])-1);
  35. if($today['mday']++ > $total_days) {
  36. if($today['mon']++ > 12) {
  37. $next_day = getdate(mktime(0,0,0,1,1,$today['year']++));
  38. }
  39. else {
  40. $next_day = getdate(mktime(0,0,0,$today['mon']++,1,$today['year']));
  41. }
  42. }
  43. else {
  44. $next_day = getdate(mktime(0,0,0,$today['mon'],$today['mday']++,$today['year']));
  45. }
  46. return $next_day;
  47. }
  48.  
  49. function &GetMonthData(&$date) {
  50. $data = Array();
  51.  
  52. $month = $date['mon'];
  53. $year = $date['year'];
  54. $nextmonth = $month+1;
  55. $nextyear = $year;
  56. if($nextmonth > 12) { $nextmonth = 1; $nextyear++; }
  57. $starttimestamp = mktime(0,0,0,$month,1,$year);
  58. $stoptimestamp = mktime(0,0,0,$nextmonth,1,$nextyear)-1;
  59.  
  60. $result = mysql_query("select I.ID, I.Type, I.Start, I.Stop, I.Recursive, I.RecEnd, I.RecDay,
  61. S.MeetByMonthDays
  62. from Instance I, Series S
  63. where S.ID = I.SeriesID
  64. and (((year(I.Start) = $year or year(I.Stop) = $year)
  65. and (month(I.Start) = $month or month(I.Stop) = $month))
  66. or ((unix_timestamp(I.Start) <= $stoptimestamp) and (unix_timestamp(I.RecEnd) >= $starttimestamp)
  67. and (I.Recursive = 1)))
  68. order by I.Start");
  69.  
  70. //Process each row.
  71. while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) {
  72. $start = getdate(strtotime($row['Start']));
  73. $stop = getdate(strtotime($row['Stop']));
  74. $itemstartstamp = strtotime($row['Start']);
  75. if($row['Recursive']) {
  76. $recendstamp = strtotime($row['RecEnd']);
  77. $end_month = getdate($stoptimestamp);
  78. if($row['MeetByMonthDays']==0) { $meetdays=0; }
  79. else { $meetdays = explode(',',$row['MeetByMonthDays']); }
  80. for ($day = 1; $day <= $end_month['mday']; $day++) {
  81. $thisday = getdate(mktime(0,0,0,$month,$day,$year));
  82. $thisdaystamp = mktime(59,59,23,$month,$day,$year);
  83. $thisdaystartstamp = mktime(0,0,0,$month,$day,$year);
  84. if($thisday['weekday'] == $row['RecDay'] && $itemstartstamp <= $thisdaystamp) {
  85. if($thisdaystartstamp <= $recendstamp) {
  86. if($meetdays==0) {
  87. $data[] = new MonthData($row['ID'], $row['Type'], $thisday['mday']);
  88. }
  89. else{
  90. $dayarr = array(); $mkr = $day;
  91. while($mkr > 0) { $mkr = $mkr-7; }
  92. $i=$mkr; while($i<=$end_month['mday']) { $dayarr[]=$i;$i=$i+7; }
  93. foreach($meetdays as $meetingdays) {
  94. if($dayarr[$meetingdays] == $day) {
  95. $data[] = new MonthData($row['ID'], $row['Type'], $thisday['mday']);
  96. }
  97. }
  98. }
  99. }
  100. }
  101. }
  102. }
  103. else {
  104. if($start['mday'] == $stop['mday']) {
  105. $data[] = new MonthData($row['ID'], $row['Type'], $start['mday']);
  106. }
  107. else {
  108. if($start['mon'] != $month) {
  109. $itemstamp = mktime(0,0,0,$month,1,$year);
  110. }
  111. else { $itemstamp = mktime(0,0,0,$start['mon'],$start['mday'],$start['year']); }
  112. $itemstampdate = getdate($itemstamp);
  113. $itemstopstamp = mktime(0,0,0,$stop['mon'],$stop['mday'],$stop['year']);
  114. while($itemstamp <= $itemstopstamp && $itemstamp <= $stoptimestamp) {
  115. $data[] = new MonthData($row['ID'], $row['Type'], $itemstampdate['mday']);
  116. $itemstampdate = $this->incDay(getdate($itemstamp));
  117. $itemstamp = $itemstampdate[0];
  118. }
  119. }
  120. }
  121. }
  122. $tempfunction = create_function('$event1,$event2',
  123. 'return strcmp($event1,$event2);');
  124. usort($data,$tempfunction);
  125. return $data;
  126. }
  127.  
  128. //Pass it the first and last date inclusively.
  129. //Doesn't work for recursive items that don't meet 4 times a month
  130. function &GetWeekDataNoRec(&$first, &$last) {
  131. $data = Array();
  132.  
  133. $firststamp = mktime(0, 0, 0, $first['mon'], $first['mday'],$first['year']);
  134. $laststamp = mktime(23, 59, 59, $last['mon'], $last['mday'],$last['year']);
  135.  
  136. $result = mysql_query("select I.ID, I.Type, S.Title as STitle,
  137. S.ShowItem as SShow, I.Title, I.Start, I.Stop
  138. from Instance I, Series S
  139. where S.ID = I.SeriesID
  140. and (unix_timestamp(I.Start) <= $laststamp) and (unix_timestamp(I.Stop) >= $firststamp)
  141. order by I.Start");
  142.  
  143. while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) {
  144. $id = $row['ID'];
  145. $result2 = mysql_query("select S.Title as SSubTitle,
  146. S.ShowItem as SSubShow,
  147. time_format(S.Start, '%l:%i %p') as SSubStart
  148. from Instance I, Series S
  149. where I.ID = $id AND S.ID = I.SubSeriesID");
  150. $datatemp2[] = mysql_fetch_array($result2, MYSQL_ASSOC);
  151. $datatemp[] = $row;
  152. }
  153. for($i = 0; $i < count($datatemp); $i++) {
  154. $item = $datatemp[$i];
  155. $item2 = $datatemp2[$i];
  156. $itemstart = getdate(strtotime($item['Start']));
  157. $itemstop = getdate(strtotime($item['Stop']));
  158. $data[] = new WeekData($item['ID'], $item['Type'], $item['Title'],
  159. $itemstart, $item['STitle'], $item['SShow'],
  160. $item2['SSubTitle'], $item2['SSubStart'],
  161. $item2['SSubShow']);
  162. }
  163. return $data;
  164. }
  165.  
  166.  
  167. //Pass it the first and last date inclusively.
  168. function &GetWeekData(&$first, &$last, $daystart=1) {
  169. $data = Array();
  170. if($daystart) {
  171. $firststamp = mktime(0, 0, 0, $first['mon'], $first['mday'],$first['year']); }
  172. else { $firststamp = mktime($first['hours'],$first['minutes'],$first['seconds'],
  173. $first['mon'],$first['mday'],$first['year'])+3600; }
  174. $laststamp = mktime(23, 59, 59, $last['mon'], $last['mday'],$last['year']);
  175. $lastday = getdate($laststamp);
  176. $nextmonth = $last['mon']+1;
  177. $nextyear = $last['year'];
  178. if($nextmonth > 12) { $nextmonth = 1; $nextyear++; }
  179. $endmonth = getdate(mktime(0,0,0,$nextmonth,1,$nextyear)-1);
  180. $datatemp2 = Array();
  181. $datatemp = Array();
  182.  
  183. $result = mysql_query("select I.ID, I.Type, S.Title as STitle, S.MeetByMonthDays,
  184. S.ShowItem as SShow, I.Title, I.Start, I.Stop, I.Recursive, I.RecDay, I.RecEnd
  185. from Instance I, Series S
  186. where S.ID = I.SeriesID
  187. and (((unix_timestamp(I.Start) <= $laststamp) and (unix_timestamp(I.Stop) >= $firststamp))
  188. or ((unix_timestamp(I.Start) <= $laststamp) and (unix_timestamp(I.RecEnd) >= $firststamp)
  189. and (I.Recursive = 1)))
  190. order by I.Start");
  191.  
  192. while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) {
  193. $id = $row['ID'];
  194. $result2 = mysql_query("select S.Title as SSubTitle,
  195. S.ShowItem as SSubShow,
  196. time_format(S.Start, '%l:%i %p') as SSubStart
  197. from Instance I, Series S
  198. where I.ID = $id AND S.ID = I.SubSeriesID
  199. order by I.Start");
  200. $datatemp2[] = mysql_fetch_array($result2, MYSQL_ASSOC);
  201. $datatemp[] = $row;
  202. }
  203. $datacount = count($datatemp);
  204. $daymkr = $first;
  205. $mytime = $firststamp;
  206. $timearr = array();
  207. while($mytime <= $laststamp) {
  208. $timearr[] = $daymkr;
  209. $daymkr = $this->incDay($daymkr);
  210. $mytime = mktime(0, 0, 0, $daymkr['mon'], $daymkr['mday'],$daymkr['year']);
  211. }
  212. foreach($timearr as $thisday) {
  213. for($i = 0; $i < $datacount; $i++) {
  214. $item = $datatemp[$i];
  215. $item2 = $datatemp2[$i];
  216. $itemstart = getdate(strtotime($item['Start']));
  217. $itemstop = getdate(strtotime($item['Stop']));
  218. $itemstime = mktime(0, 0, 0, $itemstart['mon'], $itemstart['mday'],$itemstart['year']);
  219. if(!$item['Recursive']) {
  220. if($itemstart['mday'] == $itemstop['mday']) {
  221. if($itemstart['mday'] == $thisday['mday'] && $itemstart['mon'] == $thisday['mon']) {
  222. $data[] = new WeekData($item['ID'], $item['Type'], $item['Title'],
  223. $itemstart, $item['STitle'], $item['SShow'],
  224. $item2['SSubTitle'], $item2['SSubStart'],
  225. $item2['SSubShow']);
  226. }
  227. }
  228. else {
  229. if($itemstart['mon'] != $thisday['mon']) {
  230. $itemstamp = mktime(0,0,0,$thisday['mon'],1,$thisday['year']);
  231. }
  232. else { $itemstamp = mktime(0,0,0,$itemstart['mon'],$itemstart['mday'],$itemstart['year']); }
  233. $itemstampdate = getdate($itemstamp);
  234. $itemstopstamp = mktime(0,0,0,$itemstop['mon'],$itemstop['mday'],$itemstop['year']);
  235. while($itemstamp <= $itemstopstamp && $itemstamp <= $laststamp) {
  236. if($itemstampdate['mday'] == $thisday['mday']) {
  237. $data[] = new WeekData($item['ID'],$item['Type'],$item['Title'],getdate($itemstamp),$item['STitle'],
  238. $item['SShow'],$item2['SSubTitle'],$item2['SSubStart'],$item2['SSubShow']);
  239. }
  240. $itemstampdate = $this->incDay(getdate($itemstamp));
  241. $itemstamp = $itemstampdate[0];
  242. }
  243. }
  244. }
  245. else if ((strcasecmp($thisday['weekday'],$item['RecDay']) == 0) && ($item['Recursive'])) {
  246. $dayarr = array(); $day= $thisday['mday']; $mkr = $day; $addflg=false;
  247. if($item['MeetByMonthDays']==0) { $addflg = true; }
  248. else {
  249. $meetdays = explode(',',$item['MeetByMonthDays']);
  250. while($mkr > 0) { $mkr = $mkr-7; }
  251. $j=$mkr; while($j<=$endmonth['mday']) { $dayarr[]=$j;$j=$j+7; }
  252. foreach($meetdays as $meetingdays) {
  253. if($dayarr[$meetingdays] == $day) { $addflg=true; }
  254. }
  255. }
  256. if($addflg) {
  257. $datestamp = mktime($itemstart['hours'],
  258. $itemstart['minutes'],0,$thisday['mon'],
  259. $thisday['mday'],$thisday['year']);
  260. $date = getdate($datestamp);
  261. if($datestamp >= $firststamp) {
  262. $data[] = new WeekData($item['ID'], $item['Type'], $item['Title'],
  263. $date, $item['STitle'], $item['SShow'],
  264. $item2['SSubTitle'], $item2['SSubStart'],
  265. $item2['SSubShow']);
  266. }
  267. }
  268. }
  269. }
  270. }
  271. $tempfunction = create_function('$event1,$event2',
  272. 'return strcmp($event1->Start[0],$event2->Start[0]);');
  273. usort($data,$tempfunction);
  274. return $data;
  275. }
  276.  
  277. // Pass the date
  278. // Returns ID only
  279. function &GetDayData(&$day) {
  280. $data = Array();
  281.  
  282. $begindaystamp = mktime(0, 0, 0, $day['mon'], $day['mday'], $day['year']);
  283. $enddaystamp = mktime(23, 59, 59, $day['mon'], $day['mday'], $day['year']);
  284. $weekday = $day['weekday'];
  285.  
  286. $result = mysql_query("select I.ID, I.Start, I.Recursive, I.RecDay, I.RecEnd
  287. from Instance I
  288. where ((($begindaystamp <= unix_timestamp(I.Start)) and
  289. (unix_timestamp(I.Start) <= $enddaystamp))
  290. or (($begindaystamp <= unix_timestamp(I.Stop)) and
  291. (unix_timestamp(I.Stop) <= $enddaystamp))
  292. or ((unix_timestamp(I.Start) <= $begindaystamp) and
  293. ($begindaystamp <= unix_timestamp(I.Stop)))
  294. or (
  295. (unix_timestamp(I.Start) <= $begindaystamp)
  296. and (unix_timestamp(I.RecEnd) >= $begindaystamp)
  297. and (I.RecDay = '$weekday')
  298. and (I.Recursive = 1)
  299. )
  300. )
  301. order by I.Start");
  302.  
  303. while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) {
  304. $tempdate = getdate(strtotime($row['Start']));
  305. if($row['Recursive'] || $tempdate['mday'] != $day['mday']) {
  306. $row['Start'] = getdate(mktime($tempdate['hours'],$tempdate['minutes'],0,
  307. $day['mon'],$day['mday'],$day['year']));
  308. }
  309. else { $row['Start'] = $tempdate; }
  310. $data[] = new DayData($row['ID'],$row['Start']);
  311. }
  312. $tempfunction = create_function('$event1,$event2',
  313. 'return strcmp($event1->Start[0],$event2->Start[0]);');
  314. usort($data,$tempfunction);
  315. return $data;
  316. }
  317.  
  318.  
  319. //Pass it the ID.
  320. //There must be an ID associated with all of the elements.
  321. function &GetCalItemData(&$id) {
  322. $result = mysql_query("select I.ID, I.Title, I.Start, I.Stop, I.Type,
  323. I.Recursive, I.RecDay, I.RecEnd, I.ContactEmail,
  324. I.Description, S.ShowItem, S.Title as STitle, S.MeetByMonthDays,
  325. C.Email, C.First, C.Last, C.Title as CTitle,
  326. C.ShowMainTitle, C.ShowMainFirstName, C.ID as CID,
  327. L.ID AS LID, L.Name AS LName,
  328. A.Title AS ATitle, A.LinkStream as ALinkStream,
  329. A.ID as AID, A.LinkDownload as ALinkDownload
  330. from Instance I, Series S, Contact C, Location L, Audio A
  331. where I.ID = $id
  332. and S.ID = I.SeriesID and C.ID = I.ContactID and
  333. L.ID = I.LocationID and A.ID = I.AudioID
  334. limit 1");
  335.  
  336. $row = mysql_fetch_array($result, MYSQL_ASSOC);
  337.  
  338. $start = getdate(strtotime($row['Start']));
  339. $stop = getdate(strtotime($row['Stop']));
  340. $recend = getdate(strtotime($row['RecEnd']));
  341. $result2 = mysql_query("select S.Title as SSubTitle,
  342. S.ShowItem as SSubShow,
  343. time_format(S.Start, '%l:%i %p') as SSubStart,
  344. time_format(S.Stop, '%l:%i %p') as SSubStop
  345. from Instance I, Series S
  346. where I.ID = $id
  347. AND S.ID = I.SubSeriesID");
  348. $row2 = mysql_fetch_array($result2, MYSQL_ASSOC);
  349. $fullname = "";
  350. if($row['ShowMainTitle']) { $fullname .= $row['CTitle']." "; }
  351. if($row['ShowMainFirstName']) { $fullname .= $row['First']." ".$row['Last']; }
  352.  
  353. $data = new CalItemData($row['ID'], $row['Type'], $row['Title'], $row['ContactEmail'],
  354. $start, $stop, $row['Email'], $row['CID'], $fullname, $row['Description'], $row['STitle'],
  355. $row['ShowItem'], $row['ATitle'], $row['ALinkStream'], $row['ALinkDownload'], $row['AID'], $row['LID'], $row['LName'],
  356. $row2['SSubTitle'], $row2['SSubShow'], $row2['SSubStart'], $row2['SSubStop'],
  357. $row['Recursive'], $row['RecDay'], $recend, $row['MeetByMonthDays']);
  358.  
  359. return $data;
  360. }
  361. function &SearchCalType(&$search,$atype,$limit,$blimit) {
  362. $data = Array();
  363. $query_string = "select I.ID, I.Type, S.Title as STitle, I.Description, I.Title
  364. from Instance I, Series S
  365. where S.ID = I.SeriesID AND (";
  366.  
  367. foreach($atype as $type) {
  368. if($type == "title") {
  369. $query_string = $query_string . "I.Title LIKE '%$search%' OR ";
  370. }
  371. else if($type == "stitle") {
  372. $query_string = $query_string . "STitle LIKE '%$search%' OR ";
  373. }
  374. else if($type == "description") {
  375. $query_string = $query_string . "I.Description LIKE '%$search%' OR ";
  376. }
  377. else { die("Invalid Parameters"); }
  378. }
  379. if(count($atype) == 0) { die("Invalid Parameters"); }
  380. $query_string = substr($query_string,0,strlen($query_string)-4);
  381. $query_string = $query_string . ") limit $blimit,$limit";
  382. $result = mysql_query($query_string);
  383. require_once ($GLOBALS['SERVER_DIRECTORY'].$GLOBALS['INCLUDE_PATH'].$GLOBALS['CALENDAR_INCLUDE']);
  384. $cal = new Calendar();
  385. //Process each row.
  386. while ($item = mysql_fetch_array($result, MYSQL_ASSOC)) {
  387. $tempcaldata = $this->GetCalItemData($item['ID']);
  388. $printdate = "";
  389. $timestamp = 0;
  390. if($tempcaldata->Recursive) {
  391. $recstamp = $cal->nextEventFromRecursive($tempcaldata);
  392. $timestamp = $recstamp;
  393. if($recstamp == 0) { $recstamp = $tempcaldata->RecEnd[0]; }
  394. $recdate = getdate($recstamp);
  395. $printdate = $recdate['month']." ".$recdate['mday'].", ".$recdate['year'];
  396. }
  397. else if($tempcaldata->Start['year'] == $tempcaldata->Stop['year'] &&
  398. $tempcaldata->Start['mon'] == $tempcaldata->Stop['mon'] &&
  399. $tempcaldata->Start['mday'] == $tempcaldata->Stop['mday']) {
  400. $timestamp = $tempcaldata->Start[0];
  401. $printdate .= $tempcaldata->Start['month']." ".$tempcaldata->Start['mday'].
  402. ", ".$tempcaldata->Start['year'];
  403. }
  404. else {
  405. $timestamp = $tempcaldata->Start[0];
  406. $printdate .= $tempcaldata->Start['month']." ".$tempcaldata->Start['mday'].
  407. ", ".$tempcaldata->Start['year']." - ";
  408. $printdate .= $tempcaldata->Stop['month']." ".$tempcaldata->Stop['mday'].
  409. ", ".$tempcaldata->Stop['year'];
  410. }
  411. $data[] = new SearchData($item['ID'], $item['Type'], $item['Title'],
  412. $printdate,$item['STitle'], $item['Description'],$timestamp);
  413. }
  414.  
  415. $tempfunction = create_function('$event1,$event2',
  416. 'return strcmp($event2->Timestamp,$event1->Timestamp);');
  417. usort($data,$tempfunction);
  418. return $data;
  419. }
  420.  
  421. function &SearchCalCount(&$item,$atype) {
  422. $data = Array();
  423. $query_string = "SELECT DISTINCTROW COUNT(*)
  424. from Instance I, Series S
  425. where S.ID = I.SeriesID AND (";
  426.  
  427. foreach($atype as $type) {
  428. if($type == "title") {
  429. $query_string = $query_string . "I.Title LIKE '%$item%' OR ";
  430. }
  431. else if($type == "stitle") {
  432. $query_string = $query_string . "STitle LIKE '%$item%' OR ";
  433. }
  434. else if($type == "description") {
  435. $query_string = $query_string . "I.Description LIKE '%$item%' OR ";
  436. }
  437. else { die("Invalid Parameters"); }
  438. }
  439. if(count($atype) == 0) { die("Invalid Parameters"); }
  440. $query_string = substr($query_string,0,strlen($query_string)-4);
  441. $query_string = $query_string . " )";
  442. $result = mysql_query($query_string);
  443. $row = mysql_fetch_array($result, MYSQL_ASSOC);
  444. foreach($row as $item) { $count = $item; }
  445. return $count;
  446. }
  447. }
  448.  
  449. /**
  450. * <b>Database Container Class : Month</b><br />
  451. * Contains all of the specific data for an event on the month view.
  452. * @author Kristen O'Brien <kristen_paristemi-com>
  453. * @copyright Copyright 2004, Kristen O'Brien
  454. * @license http://opensource.org/licenses/gpl-license.php GNU Public License
  455. * @link http://www.paristemi.com Paristemi Main Site
  456. * @package paristemi
  457. * @subpackage paristemi_database_layer
  458. * @since Build 0.5
  459. * @version Build 0.7
  460. * @filesource
  461. */
  462. class MonthData {
  463. var $ID;
  464. var $Type;
  465. var $Day;
  466.  
  467. function MonthData($id, $type, $day) {
  468. $this->ID = $id;
  469. $this->Type = $type;
  470. $this->Day = $day;
  471. }
  472. }
  473.  
  474.  
  475. /**
  476. * <b>Database Container Class : Week</b><br />
  477. * Contains all of the specific data for an event of the week.
  478. * @author Kristen O'Brien <kristen_paristemi-com>
  479. * @copyright Copyright 2004, Kristen O'Brien
  480. * @license http://opensource.org/licenses/gpl-license.php GNU Public License
  481. * @link http://www.paristemi.com Paristemi Main Site
  482. * @package paristemi
  483. * @subpackage paristemi_database_layer
  484. * @since Build 0.5
  485. * @version Build 0.7
  486. * @filesource
  487. */
  488. class WeekData {
  489. var $ID;
  490. var $Type;
  491. var $Title;
  492. var $Start;
  493. var $STitle;
  494. var $SShow;
  495. var $SSubTitle;
  496. var $SSubStart;
  497. var $SSubShow;
  498.  
  499. function WeekData($id, $type, $title, $start, $stitle, $sshow,
  500. $ssubtitle, $ssubstart, $ssubshow) {
  501. $this->ID = $id;
  502. $this->Type = $type;
  503. $this->Title = $title;
  504. $this->Start = $start;
  505. $this->STitle = $stitle;
  506. $this->SShow = $sshow;
  507. $this->SSubTitle = $ssubtitle;
  508. $this->SSubStart = $ssubstart;
  509. $this->SSubShow = $ssubshow;
  510. }
  511. }
  512.  
  513.  
  514. /**
  515. * <b>Database Container Class - Day</b><br />
  516. * Contains all of the specific data for an event of the day.
  517. * @author Kristen O'Brien <kristen_paristemi-com>
  518. * @copyright Copyright 2004, Kristen O'Brien
  519. * @license http://opensource.org/licenses/gpl-license.php GNU Public License
  520. * @link http://www.paristemi.com Paristemi Main Site
  521. * @package paristemi
  522. * @subpackage paristemi_database_layer
  523. * @since Build 0.5
  524. * @version Build 0.7
  525. * @filesource
  526. */
  527. class DayData {
  528. var $ID;
  529. var $Start;
  530.  
  531. function DayData($id,$start) {
  532. $this->ID = $id;
  533. $this->Start = $start;
  534. }
  535. }
  536.  
  537.  
  538. /**
  539. * <b>Database Container Class : Calendar Item</b><br />
  540. * Contains all of the specific data for a calendar event.
  541. * @author Kristen O'Brien <kristen_paristemi-com>
  542. * @copyright Copyright 2004, Kristen O'Brien
  543. * @license http://opensource.org/licenses/gpl-license.php GNU Public License
  544. * @link http://www.paristemi.com Paristemi Main Site
  545. * @package paristemi
  546. * @subpackage paristemi_database_layer
  547. * @since Build 0.5
  548. * @version Build 0.7
  549. * @filesource
  550. */
  551. class CalItemData {
  552. var $ID;
  553. var $Type;
  554. var $Title;
  555. var $ContactEmail;
  556. var $Start;
  557. var $Stop;
  558. var $Email;
  559. var $CID;
  560. var $CName;
  561. var $Description;
  562. var $STitle;
  563. var $SShow;
  564. var $ATitle;
  565. var $ALinkStream;
  566. var $ALinkDownload;
  567. var $AID;
  568. var $LID;
  569. var $LName;
  570. var $SSubTitle;
  571. var $SSubShow;
  572. var $SSubStart;
  573. var $SSubStop;
  574. var $Recursive;
  575. var $RecDay;
  576. var $RecEnd;
  577. var $MeetByMonth;
  578.  
  579. function CalItemData($id, $type, $title, $contactemail, $start, $stop, $email, $cid, $cname,
  580. $desc, $stitle, $sshow, $atitle, $alinkstream, $alinkdownload, $aid, $lid, $lname,
  581. $ssubtitle, $ssubshow, $ssubstart, $ssubstop, $rec, $recday, $recend,$meeting) {
  582. $this->ID = $id;
  583. $this->Type = $type;
  584. $this->Title = $title;
  585. $this->ContactEmail = $contactemail;
  586. $this->Start = $start;
  587. $this->Stop = $stop;
  588. $this->Email = $email;
  589. $this->CID = $cid;
  590. $this->CName = $cname;
  591. $this->Description = $desc;
  592. $this->STitle = $stitle;
  593. $this->SShow = $sshow;
  594. $this->ATitle = $atitle;
  595. $this->ALinkStream = $alinkstream;
  596. $this->ALinkDownload = $alinkdownload;
  597. $this->AID = $aid;
  598. $this->LID = $lid;
  599. $this->LName = $lname;
  600. $this->SSubTitle = $ssubtitle;
  601. $this->SSubShow = $ssubshow;
  602. $this->SSubStart = $ssubstart;
  603. $this->SSubStop = $ssubstop;
  604. $this->Recursive = $rec;
  605. $this->RecDay = $recday;
  606. $this->RecEnd = $recend;
  607. $this->MeetByMonth = $meeting;
  608. }
  609. }
  610.  
  611. /**
  612. * Database Container Class - Calendar Search
  613. * Contains all of the specific data for a calendar search result.
  614. * @author Kristen O'Brien <kristen_paristemi-com>
  615. * @copyright Copyright &copy; 2004, Kristen O'Brien
  616. * @license http://opensource.org/licenses/gpl-license.php GNU Public License
  617. * @link http://www.paristemi.com Paristemi Main Site
  618. * @package paristemi
  619. * @subpackage paristemi_database_layer
  620. * @since Build 0.5
  621. * @version Build 0.7
  622. * @filesource
  623. */
  624. class SearchData {
  625. var $ID;
  626. var $Type;
  627. var $Title;
  628. var $Date;
  629. var $STitle;
  630. var $Description;
  631. var $Timestamp;
  632. function SearchData($id, $type, $title, $date, $stitle, $desc, $timestamp=0) {
  633. $this->ID = $id;
  634. $this->Type = $type;
  635. $this->Title = $title;
  636. $this->Date = $date;
  637. $this->STitle = $stitle;
  638. $this->Description = $desc;
  639. $this->Timestamp = $timestamp;
  640. }
  641. }
  642.  
  643. ?>

Documentation generated on Mon, 10 May 2004 12:08:26 -0700 by phpDocumentor 1.3.0RC3