本文整理汇总了PHP中EmailTemplate::update方法的典型用法代码示例。如果您正苦于以下问题:PHP EmailTemplate::update方法的具体用法?PHP EmailTemplate::update怎么用?PHP EmailTemplate::update使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类EmailTemplate
的用法示例。
在下文中一共展示了EmailTemplate::update方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
}
/** This is for Check Duplicate Record-------------------------------------------*/
$generalobj->getRequestVars();
$redirect_file = "index.php?file={$file}&view={$view}&iFormatId={$iFormatId}";
$generalobj->checkDuplicate('iFormatId', PRJ_DB_PREFIX . "_email_template", array('vSub' => $Data['vSub']), $redirect_file, SUBJECT_ALREADY_EXISTS, $iFormatId);
if ($view == "add") {
//prints($Data);exit;
$emailTempObj->setAllVar($Data);
$result = $emailTempObj->insert();
if ($result) {
$var_msg = "Record Added Successfully.";
} else {
$var_msg = "Eror-in Add.";
}
} else {
if ($view == "edit") {
//prints($Data);exit;
$arr = $emailTempObj->select($iFormatId);
$emailTempObj->setAllVar($arr);
$emailTempObj->setAllVar($Data);
$where = " iFormatId = '" . $iFormatId . "'";
$result = $emailTempObj->update($where);
if ($result) {
$var_msg = "Record Updated Successfully.";
} else {
$var_msg = "Eror-in Update.";
}
}
}
header("Location:index.php?file=" . $actionfile . "&view=index&AX=Yes&var_msg={$var_msg}");
exit;
示例2: EmailTemplate
$obj = new EmailTemplate($id);
$id_to_show_if_new = 'NEW';
if (isset($_POST['me_action'])) {
if ($_POST['me_action'] == 'SAVEDATA') {
$template_id = tep_db_prepare_input($_POST['template_id']);
$name = tep_db_prepare_input($_POST['template_name']);
$info = tep_db_prepare_input($_POST['template_info']);
$info_technical = tep_db_prepare_input($_POST['template_info_technical']);
$default_languages_id = tep_db_prepare_input($_POST['default_languages_id']);
$ajaxResult = array();
if ($template_id == $id_to_show_if_new) {
$obj->create($name, $info, $info_technical, $default_languages_id);
$ajaxResult['id'] = is_null($obj->id) ? '0' : $obj->id;
$ajaxResult['action'] = $id_to_show_if_new;
} else {
$obj->update($name, $info, $info_technical, $default_languages_id);
$ajaxResult['id'] = $template_id;
$ajaxResult['action'] = 'UPDATED';
}
echo ajaxReturn($ajaxResult);
exit;
} elseif ($_POST['me_action'] == 'DELETEDATA') {
$template_id = tep_db_prepare_input($_POST['template_id']);
if ($template_id != $id_to_show_if_new && $template_id == $obj->id) {
$obj->delete();
}
echo is_null($obj->id) ? '1' : '0';
exit;
} elseif ($_POST['me_action'] == 'ADDLANGUAGE') {
$languages_id = tep_db_prepare_input($_POST['languages_id']);
$obj->addContent($languages_id);
示例3: admindeleteemailAction
function admindeleteemailAction()
{
$this->_helper->layout->disableLayout();
$emailTemplate = new EmailTemplate();
$emailTemplate->update(array("delete" => 1), 'id = ' . $this->_request->getParam('id'));
}