本文整理汇总了PHP中design::retrieveDrafts方法的典型用法代码示例。如果您正苦于以下问题:PHP design::retrieveDrafts方法的具体用法?PHP design::retrieveDrafts怎么用?PHP design::retrieveDrafts使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类design
的用法示例。
在下文中一共展示了design::retrieveDrafts方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: elseif
exit;
} elseif ($_POST['me_action'] == 'DESIGNDRAFTSLOAD') {
$designs_id = tep_db_prepare_input($_POST['designs_id']);
$status = tep_db_prepare_input($_POST['status']);
$sub_status = tep_db_prepare_input($_POST['sub_status']);
$rowclass = tep_db_prepare_input($_POST['rowclass']);
$drafts_id = isset($_POST['drafts_id']) ? tep_db_prepare_input($_POST['drafts_id']) : '0';
$design = new design($designs_id);
$draft_filter = $drafts_id == '0' ? '' : "drafts_id={$drafts_id}";
if ($status >= 5) {
if ($draft_filter != '') {
$draft_filter .= " AND ";
}
$draft_filter .= "approve_status!='R'";
}
$drafts = $design->retrieveDrafts($draft_filter);
$row = '';
if (count($drafts) > 0) {
foreach ($drafts as $x => $d) {
$row .= drawDraftRow($x, $d['drafts_id'], $rowclass, $status, $sub_status, $designs_id);
}
} else {
$row .= 'REMOVE';
}
$result = array();
$result['id'] = $designs_id;
$result['status'] = $status;
$result['row'] = $row;
$result['drafts_id'] = $drafts_id;
ajaxReturn($result);
exit;
示例2: webImage
$result['result'] = webImage($draft->{'image_' . $imgno}, $thumbsize, $thumbsize, $draft_title, 'img-border');
}
$result['drafts_id'] = $draft->id;
$result['draft_key'] = $draft_key;
$result['prevdraft'] = count($drafts);
$result['box_colors'] = drawBoxColor($draft->colors_request);
$result['colors_added'] = getColorNumbers($draft->colors_request);
echo ajaxReturn($result);
exit;
} elseif ($_POST['me_action'] == 'DELETEDRAFT') {
$drafts_id = tep_db_prepare_input($_POST['drafts_id']);
$draft_key = tep_db_prepare_input($_POST['draft_key']);
$draft = new design_draft($drafts_id);
$design = new design($draft->designs_id);
$draft->delete();
$drafts = $design->retrieveDrafts();
$result = array();
$result['drafts_id'] = $drafts_id;
$result['draft_key'] = $draft_key;
$result['total_drafts'] = count($drafts);
$result['image'] = webImage($draft->image_1, $imgsize, $imgsize, $draft_title);
echo ajaxReturn($result);
exit;
} elseif ($_POST['me_action'] == 'UPDATEDRAFTNAME') {
$drafts_id = tep_db_prepare_input($_POST['drafts_id']);
$draft_name = tep_db_prepare_input($_POST['draft_name']);
$draft_namekey = tep_db_prepare_input($_POST['draft_namekey']);
$draft = new design_draft($drafts_id);
$draft->update($draft_name);
$result = array();
$result['draft_namekey'] = $draft_namekey;
示例3: design
<?php
use_class('design');
$imgsize = '150';
$rowListReload = false;
if (isset($_GET['id']) && !isset($design)) {
$id = tep_db_prepare_input($_GET['id']);
$design = new design($id);
$drafts = $design->retrieveDrafts("approve_status != 'R'");
}
if (is_null($design->id)) {
$content .= '<h3 class="red">Can not found requested Design in database</h2>';
$content .= '<a href="?open=designs-new">» Click here to Create New Design</a>';
} else {
$img1 = webImage($design->image_1, $imgsize, $imgsize, 'Main Image', 'img-border', '');
$img2 = webImage($design->image_2, $imgsize, $imgsize, 'Additional Image', 'img-border', '');
$content .= '<form name="copydesign" method="post" action="?open=designs-detail">';
$content .= '<input type="hidden" name="me_action" value="CREATENEWDESIGN" />';
$content .= '<div style="float:left;margin-left:15px;">';
//LEFT Part open
$margin_left = 15;
if (strpos($img1, 'color-pattern') === false) {
$cbid = 'cb-img-1';
$content .= '<div id="image_1" style="float:left;width:' . $imgsize . 'px;height:210px;text-align:center;">';
$content .= '<label for="' . $cbid . '"><strong>Main Image</strong><br />';
$content .= $img1 . '</label>';
$content .= '<br /><input type="checkbox" id="' . $cbid . '" name="image_1" value="' . $design->image_1 . '" checked="checked" style="margin-top:2px;" /> <label for="' . $cbid . '">Copy Image</label>';
$content .= '</div>';
$margin_left += $imgsize;
}
if (strpos($img2, 'color-pattern') === false) {