$design = new design();
$class_pm = new products_minierp();
$pid = tep_db_prepare_input($_GET['pid']);
$d_cat = tep_db_prepare_input($_GET['dcat']);
$d_cat_text = $design->getDesignCategory($d_cat);
$imgsize = '150';
$products = $class_pm->retrieveDetail($pid, 'p');
$design->original_products_id = $pid;
$design->category = $d_cat;
$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;
$content .= '<div id="image_1" style="float:left;width:' . $imgsize . 'px;height:210px;text-align:center;">';
$content .= '<label><strong>Main Image</strong><br />';
$content .= webImage($products['p']['products_image'], $imgsize, $imgsize, 'Main Image', 'img-border', '') . '</label>';
$content .= '<input type="hidden" name="image_1" value="' . $products['p']['products_image'] . '" />';
$content .= '</div>';
$margin_left += $imgsize;
$margin_left += 30;
$content .= '</div>';
//LEFT Part close
$content .= '<div style="margin-left:' . $margin_left . 'px;padding-top:20px;">';
$content .= $design->drawDetailTable(true, 'copy');
$buttons = '<input id="createcopy" type="button" value="Create" title="Create ' . $d_cat_text . '" />';
$content .= '<div style="margin-top:10px;width:395px;text-align:right;">' . $buttons . '</div>';
$content .= '</div>';
$content .= '</form>';
$javascript = $design->drawDetailTableJSRule('createcopy', 'copydesign');
$title = 'Create ' . $d_cat_text . ' from Product ' . $pid;
            $content .= '<div style="float:left">' . $value . '</div>';
            $content .= '<div style="float:left;margin-left:5px;"><strong>Draft ' . $draft['drafts_id'] . '</strong><br/>' . $draft['drafts_name'] . '</div>';
            $content .= '</td>';
            $content .= '</tr>';
        }
        $content .= '</table>';
        $content .= '<input type="hidden" id="copydraftlists" name="copy_draft_lists" value=""/>';
    }
    $content .= '</fieldset>';
    $content .= '</div>';
    $content .= '</form>';
    $javascript .= '
            $("#cat").change(function() {
                var descat = $(this).val();
                if(descat=="R" || descat=="V") {
                    $("#oriprodid").show();
                } else {
                    $("#oriprodid").hide();
                }
            });
            $(".copy-draft").click(function(){
                var copy_draft = [];
                $(".copy-draft:checkbox:checked").each(function(i){
                    copy_draft[i] = $(this).val();
                });
                $("#copydraftlists").val(copy_draft.join(","));
            });
            ' . $design->drawDetailTableJSRule('createcopy', 'copydesign') . '
';
    $title = 'Detail Copy of Design ' . $design->id;
}
예제 #3
0
}
if (isset($_GET['imageupload']) && $_GET['imageupload'] == 'none') {
    $messagebox->add('Please upload an image to create New Design');
}
$design = new design();
if (isset($_GET['cat']) && $_GET['cat'] == 'R') {
    $design->category = 'R';
    $content .= '<form name="newdesign" method="post" action="?open=designs-detail" enctype="multipart/form-data">';
    $content .= '<input type="hidden" name="me_action" value="CREATENEWDESIGN" />';
    $content .= '<input type="hidden" name="status" value="5" />';
    $messagebox->add('<strong>This Design will be created directly in SAMPLINGS Tab</strong>');
    $content .= $design->drawDetailTable();
    $submit = '<input id="create" type="button" value="Create Design" />';
    $content .= '<div class="buttons" style="width:390px;">' . $submit . '</div>';
    $content .= '</form>';
    $javscript .= $design->drawDetailTableJSRule('create', 'newdesign');
} else {
    $content .= '<div class="box ui-corner-all" style="margin-bottom:20px;">';
    $content .= '<h2>Any Design Categories with New Image</h2>';
    $content .= '<form name="newdesign" method="post" action="?open=designs-detail" enctype="multipart/form-data">';
    $content .= '<input type="hidden" name="me_action" value="CREATENEWDESIGN" />';
    $content .= '<div><table class="form" border="0" cellpadding="0" cellspacing="0">';
    $content .= '<tr><td class="label">Design Image</td><td><input type="file" name="image_1" /></td></tr>';
    $content .= '<tr><td class="label">Source of Idea</td><td><input type="text" id="source_of_ideas" name="source_of_ideas" style="width:100%;" disabled="disabled"/></td></tr>';
    $content .= '</table></div>';
    $content .= '<div class="buttons" style="width:410px;"><input type="submit" value="Create Design" /></div>';
    $content .= '</form>';
    $content .= '</div>';
    $descat_array = $design->getDesignCategory();
    unset($descat_array['B'], $descat_array['T']);
    $content .= '<div class="box ui-corner-all">';
예제 #4
0
     $label = $key > 0 && $s['status'] == '1' ? 'Moved Back to Idea' : $status_label[$s['status']];
     $content .= '<tr><td>&bull;</td><td>' . $label . '</td><td>on ' . date('d M Y H:i:s', $s['status_time']) . '</td><td>by ' . $s['status_by'] . '</td></tr>';
 }
 $content .= '</table>';
 $content .= '</div>';
 $content .= '</div>';
 //RIGHT Part close
 //FOLLOWERS
 $content .= $design->followers->drawFollowersWithContainer('Design Followers');
 //    $button_upload = '<input type=\'button\' class=\'btnupload\' value=\'New\' />';
 $button_upload = '<button class=\'btnupload\' title=\'Upload Image\'><span class=\'ui-icon ui-icon-folder-open\' style=\'float:left;\'></span></button>';
 //    $button_delete = '<input type=\'button\' class=\'btndelete\' value=\'Delete\' disabled=\'disabled\' />';
 $button_delete = '<button class=\'btndelete\' title=\'Delete Image\' disabled=\'disabled\'><span class=\'ui-icon ui-icon-trash\' style=\'float:left;\'></span></button>';
 $js_reload_followers = $design->followers->JSReloader();
 $javascript = '
         ' . $design->drawDetailTableJSRule('update', 'updatedesign') . '
         ' . $design->comments->drawCommentsJSAction('reloadList();' . $js_reload_followers) . '
         ' . $design->followers->drawFollowersJSAction($session_userinfo['id'], '') . '
         ' . drawColorsRequestJSAction('colors-request', 'UPDATECOLORSREQUEST', 'REMOVEFROMCOLORSREQUEST', 'designs_id', $design->id, $js_reload_followers) . '
         ' . drawNotesJSAction2('designs-description', 'UPDATEDESIGNSDESCRIPTION', 'designs_id', $design->id, $js_reload_followers) . '
         ' . drawNotesJSAction('source-of-ideas', 'UPDATESOURCEOFIDEAS', 'designs_id', $design->id, $js_reload_followers) . '
         function imageDeleted(xmlResult, txtStatus) {
             if(txtStatus=="success") {
                 var imgid = $("id", xmlResult).text();
                 var image = $("img", xmlResult).text();
                 $("#"+imgid+" img").replaceWith(image);
                 $("#"+imgid+" .btndelete").attr("disabled", true);
                 reloadList();
                 ' . $js_reload_followers . '
             }
         }