本文整理汇总了PHP中Newsletter::newsletterDelete方法的典型用法代码示例。如果您正苦于以下问题:PHP Newsletter::newsletterDelete方法的具体用法?PHP Newsletter::newsletterDelete怎么用?PHP Newsletter::newsletterDelete使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Newsletter
的用法示例。
在下文中一共展示了Newsletter::newsletterDelete方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: header
try {
$result = $catproduct->productDelete($_GET["id"]);
$catproduct = null;
header('Location: /admin/product-list.php');
} catch (Exception $e) {
echo 'Erreur contactez votre administrateur <br> :', $e->getMessage(), '\\n';
$catproduct = null;
if ($e->getCode() == 1234) {
header('Location: /admin/catproduct-list.php?message=' . $e->getCode());
}
exit;
}
}
}
if ($_GET["reference"] == 'newsletter') {
//supprimer
$newsletter = new Newsletter();
if ($_GET["action"] == 'delete') {
try {
$result = $newsletter->newsletterDelete($_GET["id"]);
$newsletter = null;
header('Location: /admin/newsletter-list.php');
} catch (Exception $e) {
echo 'Erreur contactez votre administrateur <br> :', $e->getMessage(), "\n";
exit;
}
}
}
} else {
header('Location: /admin/');
}
示例2: Newsletter
include_once BASE_DIR . '/modules/newsletter/class.newsletter.php';
$newsletter = new Newsletter();
if (defined('THEME_FOLDER')) {
$AVE_Template->assign('theme_folder', THEME_FOLDER);
}
$_REQUEST['action'] = empty($_REQUEST['action']) ? 'overview' : $_REQUEST['action'];
$tpl_dir = BASE_DIR . '/modules/newsletter/templates/';
$lang_file = BASE_DIR . '/modules/newsletter/lang/' . $_SESSION['admin_language'] . '.txt';
$AVE_Template->config_load($lang_file, 'admin');
$AVE_Template->assign('source', rtrim($tpl_dir, '/'));
switch ($_REQUEST['moduleaction']) {
case '':
case '1':
$newsletter->newsletterList($tpl_dir);
break;
case 'new':
include_once BASE_DIR . '/class/class.user.php';
$AVE_User = new AVE_User();
$newsletter->newsletterNew($tpl_dir);
break;
case 'shownewsletter':
$newsletter->newsletterShow($tpl_dir, (int) $_REQUEST['id'], isset($_REQUEST['nl_format']) && $_REQUEST['nl_format'] == 'html' ? 'html' : 'text');
break;
case 'delete':
$newsletter->newsletterDelete();
break;
case 'getfile':
$newsletter->_newsletterFileGet($_REQUEST['file']);
break;
}
}