本文整理汇总了PHP中JEVHelper::canDeleteEvent方法的典型用法代码示例。如果您正苦于以下问题:PHP JEVHelper::canDeleteEvent方法的具体用法?PHP JEVHelper::canDeleteEvent怎么用?PHP JEVHelper::canDeleteEvent使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类JEVHelper
的用法示例。
在下文中一共展示了JEVHelper::canDeleteEvent方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: _deleteFuture
function _deleteFuture()
{
$cid = JRequest::getVar('cid', array(0));
if (!is_array($cid)) {
$cid = array(intval($cid));
}
JArrayHelper::toInteger($cid);
$db = JFactory::getDBO();
foreach ($cid as $id) {
// I should be able to do this in one operation but that can come later
$event = $this->queryModel->listEventsById(intval($id), 1, "icaldb");
if (!JEVHelper::canDeleteEvent($event)) {
throw new Exception(JText::_('ALERTNOTAUTH'), 403);
return false;
}
$query = "SELECT * FROM #__jevents_repetition WHERE rp_id={$id}";
$db->setQuery($query);
$repeatdata = null;
$repeatdata = $db->loadObject();
if (is_null($repeatdata)) {
throw new Exception(JText::_('NO_SUCH_EVENT'), 4777);
return;
}
$query = "SELECT detail_id FROM #__jevents_vevent WHERE ev_id={$repeatdata->eventid}";
$db->setQuery($query);
$eventdetailid = $db->loadResult();
// Find detail ids for future repetitions that don't match the global event detail
$query = "SELECT eventdetail_id FROM #__jevents_repetition WHERE eventid=" . $repeatdata->eventid . " AND startrepeat>='" . $repeatdata->startrepeat . "' AND eventdetail_id<>" . $eventdetailid;
$db->setQuery($query);
$detailids = $db->loadColumn();
// Find repeat ids future repetitions
$query = "SELECT rp_id FROM #__jevents_repetition WHERE eventid=" . $repeatdata->eventid . " AND startrepeat>='" . $repeatdata->startrepeat . "'";
$db->setQuery($query);
$rp_ids = $db->loadColumn();
foreach ($rp_ids as $rp_id) {
// May want to send notification messages etc.
$dispatcher = JDispatcher::getInstance();
// just incase we don't have jevents plugins registered yet
JPluginHelper::importPlugin("jevents");
$res = $dispatcher->trigger('onDeleteEventRepeat', $rp_id);
}
// Change the underlying event repeat rule details !!
$query = "SELECT * FROM #__jevents_rrule WHERE eventid={$repeatdata->eventid}";
$db->setQuery($query);
$this->rrule = null;
$this->rrule = $db->loadObject();
$this->rrule = iCalRRule::iCalRRuleFromDB(get_object_vars($this->rrule));
if (intval($this->rrule->until) > 0) {
// Find latest matching repetition
$query = "SELECT max(startrepeat) FROM #__jevents_repetition WHERE eventid=" . $repeatdata->eventid . " AND startrepeat<'" . $repeatdata->startrepeat . "'";
$db->setQuery($query);
$lastrepeat = $db->loadResult();
$this->rrule->until = JevDate::strtotime($lastrepeat);
} else {
// Find latest matching repetition
$query = "SELECT count(startrepeat) FROM #__jevents_repetition WHERE eventid=" . $repeatdata->eventid . " AND startrepeat<'" . $repeatdata->startrepeat . "'";
$db->setQuery($query);
$countrepeat = $db->loadResult();
$this->rrule->count = $countrepeat;
}
$this->rrule->store();
if (!is_null($detailids) && count($detailids) > 0) {
$query = "DELETE FROM #__jevents_vevdetail WHERE evdet_id IN (" . implode(",", $detailids) . ")";
$db->setQuery($query);
$db->query();
// I also need to clean out associated custom data
$dispatcher = JDispatcher::getInstance();
// just incase we don't have jevents plugins registered yet
JPluginHelper::importPlugin("jevents");
$res = $dispatcher->trigger('onDeleteEventDetails', array(implode(",", $detailids)));
}
// setup exception data
foreach ($rp_ids as $rp_id) {
$query = "SELECT * FROM #__jevents_repetition WHERE rp_id={$rp_id}";
$db->setQuery($query);
$data = null;
$data = $db->loadObject();
$exception = iCalException::loadByRepeatId($rp_id);
if (!$exception) {
$exception = new iCalException($db);
$exception->bind(get_object_vars($data));
}
$exception->exception_type = 0;
// deleted
$exception->store();
}
$query = "DELETE FROM #__jevents_repetition WHERE eventid=" . $repeatdata->eventid . " AND startrepeat>='" . $repeatdata->startrepeat . "'";
$db->setQuery($query);
$db->query();
// Also clear out defunct exceptions
$query = "DELETE FROM #__jevents_exception WHERE eventid=" . $repeatdata->eventid . " AND startrepeat>='" . $repeatdata->startrepeat . "' and exception_type=1 ";
$db->setQuery($query);
$db->query();
}
}
示例2: DefaultEventManagementDialog
/**
* Creates mini event dialog for view detail page etc.
* note this must be contained in a position:relative block element in order to work
*
* @param Jevent or descendent $row
*/
function DefaultEventManagementDialog($view, $row, $mask, $bootstrap = false)
{
JevHtmlBootstrap::modal("action_dialogJQ" . $row->rp_id());
$user = JFactory::getUser();
if ($user->get("id") == 0) {
return "";
}
if (JEVHelper::canEditEvent($row) || JEVHelper::canPublishEvent($row) || JEVHelper::canDeleteEvent($row)) {
$popup = false;
$params = JComponentHelper::getParams(JEV_COM_COMPONENT);
if ($params->get("editpopup", 0) && JEVHelper::isEventCreator()) {
JevHtmlBootstrap::modal();
JEVHelper::script('editpopupJQ.js', 'components/' . JEV_COM_COMPONENT . '/assets/js/');
$popup = true;
$popupw = $params->get("popupw", 800);
$popuph = $params->get("popuph", 600);
}
if (JRequest::getInt("pop", 0)) {
// do not call the modal scripts if already in a popup window!
$popup = false;
}
$hasrepeat = false;
$pathIMG = JURI::root() . 'components/' . JEV_COM_COMPONENT . '/assets/images';
$editImg = JHtml::image('com_jevents/icons-32/edit.png', JText::_("EDIT_EVENT"), null, true);
$editLink = $row->editLink();
$editLink = $popup ? "javascript:jevEditPopupNoHeader('" . $editLink . "');" : $editLink;
$editCopyImg = JHtml::image('com_jevents/icons-32/copy.png', JText::_("COPY_AND_EDIT_EVENT"), null, true);
$editCopyLink = $row->editCopyLink();
$editCopyLink = $popup ? "javascript:jevEditPopupNoHeader('" . $editCopyLink . "');" : $editCopyLink;
$deleteImg = JHtml::image('com_jevents/icons-32/discard.png', JText::_("DELETE_EVENT"), null, true);
$deleteLink = $row->deleteLink();
if ($row->until() != $row->dtstart() || $row->count() > 1) {
$hasrepeat = true;
$editRepeatImg = JHtml::image('com_jevents/icons-32/edit.png', JText::_("EDIT_REPEAT"), null, true);
$editRepeatLink = $row->editRepeatLink();
$editRepeatLink = $popup ? "javascript:jevEditPopupNoHeader('" . $editRepeatLink . "');" : $editRepeatLink;
$deleteRepeatImg = JHtml::image('com_jevents/icons-32/discard.png', JText::_("DELETE_THIS_REPEAT"), null, true);
$deleteRepeatLink = $row->deleteRepeatLink();
$deleteFutureImg = JHtml::image('com_jevents/icons-32/discards.png', JText::_("JEV_DELETE_FUTURE_REPEATS"), null, true);
$deleteFutureLink = $row->deleteFutureLink();
$deleteImg = JHtml::image('com_jevents/icons-32/discards.png', JText::_("DELETE_ALL_REPEATS"), null, true);
} else {
$editRepeatLink = "";
$deleteRepeatLink = "";
$deleteFutureLink = "";
}
if (!JEVHelper::canEditEvent($row)) {
$editLink = "";
$editRepeatLink = "";
$editCopyLink = "";
}
if (!JEVHelper::canDeleteEvent($row)) {
$deleteLink = "";
$deleteRepeatLink = "";
$deleteFutureLink = "";
}
$publishLink = "";
if (JEVHelper::canPublishEvent($row)) {
if ($row->published() > 0) {
$publishImg = JHtml::image('com_jevents/icons-32/cancel.png', JText::_("UNPUBLISH_EVENT"), null, true);
$publishLink = $row->unpublishLink();
$publishText = JText::_('UNPUBLISH_EVENT');
} else {
$publishImg = JHtml::image('com_jevents/icons-32/accept.png', JText::_("PUBLISH_EVENT"), null, true);
$publishLink = $row->publishLink();
$publishText = JText::_('PUBLISH_EVENT');
}
}
if ($publishLink . $editRepeatLink . $editLink . $deleteRepeatLink . $deleteLink . $deleteFutureLink == "") {
return false;
}
?>
<div id="action_dialogJQ<?php
echo $row->rp_id();
?>
" class="action_dialogJQ modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog modal-sm">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h4 class="modal-title" id="myModalLabel"><?php
echo JText::_("JEV_MANAGE_EVENT");
?>
</h4>
</div>
<div class="modal-body">
<?php
if ($publishLink != "") {
?>
<a href="<?php
echo $publishLink;
?>
" id="publish_reccur" title="<?php
echo $publishText;
//.........这里部分代码省略.........
示例3: delete
function delete()
{
// clean out the cache
$cache =& JFactory::getCache('com_jevents');
$cache->clean(JEV_COM_COMPONENT);
/*
// This is covered by canDeleteEvent below
if (!JEVHelper::isEventDeletor()){
JError::raiseError( 403, JText::_( 'ALERTNOTAUTH' ) );
}
*/
$cid = JRequest::getVar('cid', array(0));
JArrayHelper::toInteger($cid);
// front end passes the id as evid
if (count($cid) == 1 && $cid[0] == 0) {
$cid = array(JRequest::getInt("evid", 0));
}
$db =& JFactory::getDBO();
foreach ($cid as $key => $id) {
// I should be able to do this in one operation but that can come later
$event = $this->queryModel->getEventById(intval($id), 1, "icaldb");
if (is_null($event) || !JEVHelper::canDeleteEvent($event)) {
JError::raiseWarning(534, JText::_("JEV_NO_DELETE_ROW"));
unset($cid[$key]);
}
}
if (count($cid) > 0) {
$veventidstring = implode(",", $cid);
// TODO the ruccurences should take care of all of these??
// This would fail if all recurrances have been 'adjusted'
$query = "SELECT DISTINCT (eventdetail_id) FROM #__jevents_repetition WHERE eventid IN ({$veventidstring})";
$db->setQuery($query);
$detailids = $db->loadResultArray();
$detailidstring = implode(",", $detailids);
$query = "DELETE FROM #__jevents_rrule WHERE eventid IN ({$veventidstring})";
$db->setQuery($query);
$db->query();
$query = "DELETE FROM #__jevents_repetition WHERE eventid IN ({$veventidstring})";
$db->setQuery($query);
$db->query();
$query = "DELETE FROM #__jevents_exception WHERE eventid IN ({$veventidstring})";
$db->setQuery($query);
$db->query();
if (strlen($detailidstring) > 0) {
$query = "DELETE FROM #__jevents_vevdetail WHERE evdet_id IN ({$detailidstring})";
$db->setQuery($query);
$db->query();
// I also need to clean out associated custom data
$dispatcher =& JDispatcher::getInstance();
// just incase we don't have jevents plugins registered yet
JPluginHelper::importPlugin("jevents");
$res = $dispatcher->trigger('onDeleteEventDetails', array($detailidstring));
}
$query = "DELETE FROM #__jevents_vevent WHERE ev_id IN ({$veventidstring})";
$db->setQuery($query);
$db->query();
// I also need to delete custom data
$dispatcher =& JDispatcher::getInstance();
// just incase we don't have jevents plugins registered yet
JPluginHelper::importPlugin("jevents");
$res = $dispatcher->trigger('onDeleteCustomEvent', array(&$veventidstring));
}
if (JFactory::getApplication()->isAdmin()) {
$this->setRedirect("index.php?option=" . JEV_COM_COMPONENT . "&task=icalevent.list", "ICal Event(s) deleted");
} else {
$Itemid = JRequest::getInt("Itemid");
list($year, $month, $day) = JEVHelper::getYMD();
$rettask = JRequest::getString("rettask", "day.listevents");
$this->setRedirect(JRoute::_('index.php?option=' . JEV_COM_COMPONENT . "&task={$rettask}&year={$year}&month={$month}&day={$day}&Itemid={$Itemid}", false), "IcalEvent Deleted");
}
}
示例4: DefaultViewEventRowAdmin
function DefaultViewEventRowAdmin($view, $row, $manage = false)
{
$popup = false;
$params = JComponentHelper::getParams(JEV_COM_COMPONENT);
if ($params->get("editpopup", 0)) {
JHTML::_('behavior.modal');
JEVHelper::script('editpopup.js', 'components/' . JEV_COM_COMPONENT . '/assets/js/');
$popup = true;
$popupw = $params->get("popupw", 800);
$popuph = $params->get("popuph", 600);
}
$editLink = $row->editLink(true);
$editLink = $popup ? "javascript:jevEditPopup('" . $editLink . "',{$popupw}, {$popuph});" : $editLink;
$modifylink = "";
if (!$manage && JEVHelper::canEditEvent($row)) {
$modifylink = '<a href="' . $row->editlink(true) . '" title="' . JText::_('JEV_MODIFY') . '"><b>' . JText::_('JEV_MODIFY') . "</b></a>\n";
$modifylink = '<a href="' . $editLink . '" title="' . JText::_('JEV_MODIFY') . '"><b>' . JText::_('JEV_MODIFY') . "</b></a>\n";
}
$deletelink = "";
if (!$manage && JEVHelper::canDeleteEvent($row)) {
$deletelink = '<a href="' . $row->deletelink(false) . "&rettask=admin.listevents" . '" title="' . JText::_('JEV_DELETE') . '"><b>' . JText::_('JEV_DELETE') . "</b></a>\n";
}
if (!$manage && JEVHelper::canPublishEvent($row)) {
if ($row->published()) {
$publishlink = '<a href="' . $row->unpublishlink(false) . "&rettask=admin.listevents" . '" title="' . JText::_('UNPUBLISH') . '"><b>' . JText::_('UNPUBLISH') . "</b></a>\n";
} else {
$publishlink = '<a href="' . $row->publishlink(false) . "&rettask=admin.listevents" . '" title="' . JText::_('PUBLISH') . '"><b>' . JText::_('PUBLISH') . "</b></a>\n";
}
} else {
$publishlink = "";
}
$eventlink = $row->viewDetailLink($row->yup(), $row->mup(), $row->dup(), false);
$eventlink = JRoute::_($eventlink . $view->datamodel->getCatidsOutLink());
$border = "border-color:" . $row->bgcolor() . ";";
?>
<li class="ev_td_li" style="<?php
echo $border;
?>
">
<a class="<?php
echo $row->state() ? 'ev_link_row' : 'ev_link_unpublished';
?>
" href="<?php
echo $eventlink;
?>
" title="<?php
echo JEventsHTML::special($row->title()) . ($row->state() ? '' : JText::_('JEV_UNPUBLISHED'));
?>
"><?php
echo $row->title() . ($row->state() ? '' : JText::_('JEV_UNPUBLISHED'));
?>
</a>
<?php
echo JText::_('JEV_BY');
?>
<i><?php
echo $row->contactlink('', true);
?>
</i>
<?php
echo $deletelink;
?>
<?php
echo $modifylink;
?>
<?php
echo $publishlink;
?>
</li>
<?php
}
示例5: DefaultEventManagementDialog16
function DefaultEventManagementDialog16($view, $row, $mask, $bootstrap = false)
{
$user = JFactory::getUser();
if ($user->get("id") == 0) {
return "";
}
if ((JEVHelper::canEditEvent($row) || JEVHelper::canPublishEvent($row) || JEVHelper::canDeleteEvent($row)) && !($mask & MASK_POPUP)) {
$popup = false;
$params = JComponentHelper::getParams(JEV_COM_COMPONENT);
if ($params->get("editpopup", 0) && JEVHelper::isEventCreator()) {
JEVHelper::script('editpopup.js', 'components/' . JEV_COM_COMPONENT . '/assets/js/');
$popup = true;
$popupw = $params->get("popupw", 800);
$popuph = $params->get("popuph", 600);
}
$hasrepeat = false;
$pathIMG = JURI::root() . 'components/' . JEV_COM_COMPONENT . '/assets/images';
$editImg = $pathIMG . "/edit_f2.png";
$editLink = $row->editLink();
$editLink = $popup ? "javascript:jevEditPopup('" . $editLink . "',{$popupw}, {$popuph});" : $editLink;
$editCopyImg = $pathIMG . "/copy_f2.png";
$editCopyLink = $row->editCopyLink();
$editCopyLink = $popup ? "javascript:jevEditPopup('" . $editCopyLink . "',{$popupw}, {$popuph});" : $editCopyLink;
$deleteImg = $pathIMG . "/delete_f2.png";
$deleteLink = $row->deleteLink();
if ($row->until() != $row->dtstart() || $row->count() > 1) {
$hasrepeat = true;
$editRepeatImg = $pathIMG . "/edit_f2.png";
$editRepeatLink = $row->editRepeatLink();
$editRepeatLink = $popup ? "javascript:jevEditPopup('" . $editRepeatLink . "',{$popupw}, {$popuph});" : $editRepeatLink;
$deleteRepeatImg = $pathIMG . "/delete_f2.png";
$deleteRepeatLink = $row->deleteRepeatLink();
$deleteFutureImg = $pathIMG . "/delete_f2.png";
$deleteFutureLink = $row->deleteFutureLink();
} else {
$editRepeatLink = "";
$deleteRepeatLink = "";
$deleteFutureLink = "";
}
if (!JEVHelper::canEditEvent($row)) {
$editLink = "";
$editRepeatLink = "";
$editCopyLink = "";
}
if (!JEVHelper::canDeleteEvent($row)) {
$deleteLink = "";
$deleteRepeatLink = "";
$deleteFutureLink = "";
}
$publishLink = "";
if (JEVHelper::canPublishEvent($row)) {
if ($row->published() > 0) {
$publishImg = $pathIMG . "/publish_r.png";
$publishLink = $row->unpublishLink();
$publishText = JText::_('UNPUBLISH_EVENT');
} else {
$publishImg = $pathIMG . "/publish_g.png";
$publishLink = $row->publishLink();
$publishText = JText::_('PUBLISH_EVENT');
}
}
if ($publishLink . $editRepeatLink . $editLink . $deleteRepeatLink . $deleteLink . $deleteFutureLink == "") {
return false;
}
?>
<div id="action_dialog" >
<div class="close_dialog" >
<a href="javascript:void(0)" onclick="closedialog()" >x</a>
</div>
<?php
if ($publishLink != "") {
?>
<a href="<?php
echo $publishLink;
?>
" id="publish_reccur" title="<?php
echo $publishText;
?>
" ><img src="<?php
echo $publishImg;
?>
" alt="" /><?php
echo $publishText;
?>
</a><br/>
<?php
}
?>
<?php
if ($editRepeatLink != "") {
?>
<a href="<?php
echo $editRepeatLink;
?>
" id="edit_reccur" title="edit event" ><img src="<?php
echo $editRepeatImg;
?>
" alt="" /><?php
echo JText::_('EDIT_REPEAT');
?>
//.........这里部分代码省略.........
示例6: DefaultLoadedFromTemplate
//.........这里部分代码省略.........
" name="image" alt="<?php
echo JText::_('JEV_SAVEICAL');
?>
" class="jev_ev_sml nothumb"/>
</a>
<div class="jevdialogs">
<?php
$search[] = "{{ICALDIALOG}}";
if ($view) {
ob_start();
$view->eventIcalDialog($event, $mask);
$dialog = ob_get_clean();
$replace[] = $dialog;
} else {
$replace[] = "";
}
$blank[] = "";
echo $dialog;
?>
</div>
<?php
$search[] = "{{ICALBUTTON}}";
$replace[] = ob_get_clean();
$blank[] = "";
} else {
$search[] = "{{ICALBUTTON}}";
$replace[] = "";
$blank[] = "";
$search[] = "{{ICALDIALOG}}";
$replace[] = "";
$blank[] = "";
}
if (JEVHelper::canEditEvent($event) || JEVHelper::canPublishEvent($event) || JEVHelper::canDeleteEvent($event)) {
JEVHelper::script('view_detail.js', 'components/' . JEV_COM_COMPONENT . "/assets/js/");
ob_start();
?>
<a href="javascript:void(0)" onclick='clickEditButton()' title="<?php
echo JText::_('JEV_E_EDIT');
?>
">
<?php
echo JEVHelper::imagesite('edit.png', JText::_('JEV_E_EDIT'));
?>
</a>
<div class="jevdialogs">
<?php
$search[] = "{{EDITDIALOG}}";
if ($view) {
ob_start();
$view->eventManagementDialog($event, $mask);
$dialog = ob_get_clean();
$replace[] = $dialog;
} else {
$replace[] = "";
}
$blank[] = "";
echo $dialog;
?>
</div>
<?php
$search[] = "{{EDITBUTTON}}";
$replace[] = ob_get_clean();
$blank[] = "";
} else {
示例7: DefaultEventManagementDialog
/**
* Creates mini event dialog for view detail page etc.
* note this must be contained in a position:relative block element in order to work
*
* @param Jevent or descendent $row
*/
function DefaultEventManagementDialog($view, $row, $mask)
{
if ((JEVHelper::canEditEvent($row) || JEVHelper::canPublishEvent($row) || JEVHelper::canDeleteEvent($row)) && !($mask & MASK_POPUP)) {
$popup = false;
$params = JComponentHelper::getParams(JEV_COM_COMPONENT);
if ($params->get("editpopup", 0)) {
JHTML::_('behavior.modal');
JEVHelper::script('editpopup.js', 'components/' . JEV_COM_COMPONENT . '/assets/js/');
$popup = true;
$popupw = $params->get("popupw", 800);
$popuph = $params->get("popuph", 600);
}
$hasrepeat = false;
if (JVersion::isCompatible("1.6.0")) {
$pathIMG = JURI::root() . 'components/' . JEV_COM_COMPONENT . '/assets/images';
} else {
$pathIMG = JURI::root() . 'administrator/images';
}
$editImg = $pathIMG . "/edit_f2.png";
$editLink = $row->editLink();
$editLink = $popup ? "javascript:jevEditPopup('" . $editLink . "',{$popupw}, {$popuph});" : $editLink;
$editCopyImg = $pathIMG . "/copy_f2.png";
$editCopyLink = $row->editCopyLink();
$editCopyLink = $popup ? "javascript:jevEditPopup('" . $editCopyLink . "',{$popupw}, {$popuph});" : $editCopyLink;
$deleteImg = $pathIMG . "/delete_f2.png";
$deleteLink = $row->deleteLink();
if ($row->until() != $row->dtstart() || $row->count() > 1) {
$hasrepeat = true;
$editRepeatImg = $pathIMG . "/edit_f2.png";
$editRepeatLink = $row->editRepeatLink();
$editRepeatLink = $popup ? "javascript:jevEditPopup('" . $editRepeatLink . "',{$popupw}, {$popuph});" : $editRepeatLink;
$deleteRepeatImg = $pathIMG . "/delete_f2.png";
$deleteRepeatLink = $row->deleteRepeatLink();
$deleteFutureImg = $pathIMG . "/delete_f2.png";
$deleteFutureLink = $row->deleteFutureLink();
} else {
$editRepeatLink = "";
$deleteRepeatLink = "";
$deleteFutureLink = "";
}
if (!JEVHelper::canEditEvent($row)) {
$editLink = "";
$editRepeatLink = "";
$editCopyLink = "";
}
if (!JEVHelper::canDeleteEvent($row)) {
$deleteLink = "";
$deleteRepeatLink = "";
$deleteFutureLink = "";
}
$publishLink = "";
if (JEVHelper::canPublishEvent($row)) {
if ($row->published() > 0) {
$publishImg = $pathIMG . "/publish_r.png";
$publishLink = $row->unpublishLink();
$publishText = JText::_('UNPUBLISH_EVENT');
} else {
$publishImg = $pathIMG . "/publish_g.png";
$publishLink = $row->publishLink();
$publishText = JText::_('PUBLISH_EVENT');
}
}
if ($publishLink . $editRepeatLink . $editLink . $deleteRepeatLink . $deleteLink . $deleteFutureLink == "") {
return false;
}
?>
<div id="action_dialog" style="position:absolute;right:0px;background-color:#dedede;border:solid 1px #000000;width:200px;padding:10px;visibility:hidden;z-index:999;">
<div style="width:12px!important;position:absolute;right:0px;top:0px;background-color:#ffffff;;border:solid #000000;border-width:0 0 1px 1px;text-align:center;">
<a href="javascript:void(0)" onclick="closedialog()" style="font-weight:bold;text-decoration:none;color:#000000;">x</a>
</div>
<?php
if ($publishLink != "") {
?>
<a href="<?php
echo $publishLink;
?>
" id="publish_reccur" title="<?php
echo $publishText;
?>
" style="text-decoration:none;"><img src="<?php
echo $publishImg;
?>
" style="width:20px;height:20px;border:0px;margin-right:1em;vertical-align:middle;" alt="" /><?php
echo $publishText;
?>
</a><br/>
<?php
}
?>
<?php
if ($editRepeatLink != "") {
?>
<a href="<?php
echo $editRepeatLink;
//.........这里部分代码省略.........
示例8: DefaultLoadedFromTemplate
//.........这里部分代码省略.........
">
<img src="<?php
echo JURI::root() . 'administrator/components/' . JEV_COM_COMPONENT . '/assets/images/jevents_event_sml.png';
?>
" align="middle" name="image" alt="<?php
echo JText::_('JEV_SAVEICAL');
?>
" style="height:24px;"/>
</a>
<div class="jevdialogs">
<?php
$search[] = "{{ICALDIALOG}}";
ob_start();
$view->eventIcalDialog($event, $mask);
$dialog = ob_get_clean();
$replace[] = $dialog;
$blank[] = "";
echo $dialog;
?>
</div>
<?php
$search[] = "{{ICALBUTTON}}";
$replace[] = ob_get_clean();
$blank[] = "";
} else {
$search[] = "{{ICALBUTTON}}";
$replace[] = "";
$blank[] = "";
$search[] = "{{ICALDIALOG}}";
$replace[] = "";
$blank[] = "";
}
if ((JEVHelper::canEditEvent($event) || JEVHelper::canPublishEvent($event) || JEVHelper::canDeleteEvent($event)) && !($mask & MASK_POPUP)) {
JEVHelper::script('view_detail.js', 'components/' . JEV_COM_COMPONENT . "/assets/js/");
ob_start();
?>
<a href="javascript:void(0)" onclick='clickEditButton()' title="<?php
echo JText::_('JEV_E_EDIT');
?>
">
<?php
echo JEVHelper::imagesite('edit.png', JText::_('JEV_E_EDIT'));
?>
</a>
<div class="jevdialogs">
<?php
$search[] = "{{EDITDIALOG}}";
ob_start();
$view->eventManagementDialog($event, $mask);
$dialog = ob_get_clean();
$replace[] = $dialog;
$blank[] = "";
echo $dialog;
?>
</div>
<?php
$search[] = "{{EDITBUTTON}}";
$replace[] = ob_get_clean();
$blank[] = "";
} else {
$search[] = "{{EDITBUTTON}}";
$replace[] = "";
$blank[] = "";
$search[] = "{{EDITDIALOG}}";