forked from e107inc/calendar_menu
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathe_tagwords.php
71 lines (61 loc) · 1.44 KB
/
e_tagwords.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
<?php
/*
* e107 website system
*
* Copyright (C) 2008-2013 e107 Inc (e107.org)
* Released under the terms and conditions of the
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
*
* Tagwords shim for event calendar
*
* $Source: /cvs_backup/e107_0.8/e107_plugins/calendar_menu/e_tagwords.php,v $
* $Revision$
* $Date$
* $Author$
*/
/**
* e107 Event calendar plugin
*
* Tagwords shim
*
* @package e107_plugins
* @subpackage event_calendar
* @version $Id$;
*/
if (!defined('e107_INIT')) { exit; }
class e_tagwords_calendar_menu
{
function e_tagwords_calendar_menu()
{
$this->settings = array();
$this->settings['plugin'] = 'calendar_menu';
$this->settings['table'] = 'event';
$this->settings['db_id'] = 'event_id';
$this->settings['caption'] = 'calendar';
}
function getLink($id)
{
if($this->row=='')
{
if ($this->row = $this->getRecord($id))
{
$url = e_PLUGIN."calendar_menu/event.php?{$this->row['event_start']}.event.{$this->row['event_id']}";
return "<a href='".$url."'>".e107::getParser()->toHTML($this->row['event_title'], TRUE, '')."</a>";
}
}
return '';
}
function getRecord($id)
{
$sql = e107::getDb();
$this->row = '';
$qry = "SELECT * FROM #event as e WHERE e.event_id='{$id}'";
if($sql->db_Select_gen($qry))
{
$this->row=$sql->db_Fetch();
return $this->row;
}
return FALSE;
}
}
?>