本文整理汇总了PHP中design::delete方法的典型用法代码示例。如果您正苦于以下问题:PHP design::delete方法的具体用法?PHP design::delete怎么用?PHP design::delete使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类design
的用法示例。
在下文中一共展示了design::delete方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: foreach
//ONLY SHOWS DRAFT ON TABS EXCEPT IDEAS AND REQUEST (SINCE WE USING SORTS ON BOTH TABS)
if ($have_drafts && $design->status > 2) {
foreach ($drafts as $x => $d) {
$row .= drawDraftRow($x, $d['drafts_id'], $newclass, $design->status, $design->sub_status, $id);
}
}
$result = array();
$result['id'] = $id;
$result['row'] = $row;
$result['status'] = $status;
ajaxReturn($result);
exit;
} elseif ($_POST['me_action'] == 'DELETEDESIGN') {
$id = tep_db_prepare_input($_POST['designs_id']);
$design = new design($id);
$design->delete();
$result = array();
$result['id'] = $id;
$result['st_counter'] = designCountByStatus();
ajaxReturn($result);
exit;
} elseif ($_POST['me_action'] == 'UPDATESTATUS') {
$id = tep_db_prepare_input($_POST['designs_id']);
$old_status = tep_db_prepare_input($_POST['old_status']);
$new_status = tep_db_prepare_input($_POST['new_status']);
$temp_old_status = explode('-', $old_status);
$temp_new_status = explode('-', $new_status);
$design = new design($id);
$update_allowed = true;
if ($new_status == 2 && $old_status == 1) {
//CHECK MAX DESIGNS ALREADY REQUESTED BY DESIGNER