|
@@ 30-33 (lines=4) @@
|
| 27 |
|
$cat_title = addslashes($_GET['cid']); |
| 28 |
|
$cat = $GLOBALS['xoopsDB']->queryF("SELECT cid FROM {$GLOBALS['xoopsDB']->prefix('apcal_cat')} WHERE cat_shorttitle LIKE '$cat_title' LIMIT 0,1"); |
| 29 |
|
|
| 30 |
|
if ($cat && $GLOBALS['xoopsDB']->getRowsNum($cat)) { |
| 31 |
|
$cat = $GLOBALS['xoopsDB']->fetchObject($cat); |
| 32 |
|
$_GET['cid'] = $cat->cid; |
| 33 |
|
} |
| 34 |
|
} elseif (isset($_GET['action']) && $_GET['action'] === 'View' && !is_numeric($_GET['event_id']) |
| 35 |
|
&& isset($_GET['date']) |
| 36 |
|
) { |
|
@@ 41-44 (lines=4) @@
|
| 38 |
|
$date = isset($_GET['date']) ? strtotime($_GET['date']) : time(); |
| 39 |
|
$event = $GLOBALS['xoopsDB']->queryF("SELECT id FROM {$GLOBALS['xoopsDB']->prefix('apcal_event')} WHERE shortsummary='$summary' AND UNIX_TIMESTAMP(DATE(FROM_UNIXTIME(start)))=$date LIMIT 0,1"); |
| 40 |
|
|
| 41 |
|
if ($event && $GLOBALS['xoopsDB']->getRowsNum($event)) { |
| 42 |
|
$event = $GLOBALS['xoopsDB']->fetchObject($event); |
| 43 |
|
$_GET['event_id'] = $event->id; |
| 44 |
|
} |
| 45 |
|
} |
| 46 |
|
|
| 47 |
|
// for "Duplicatable" |