예제 #1
0
 $design_copied = new design($designs_id_copied);
 $colors_request = $copy_des_color_request == 'on' ? $design_copied->colors_request : null;
 if ($copy_des_comments == 'on') {
     $comments = $design_copied->comments->comments;
     $comments_lut = $design_copied->comments_lut;
     $comments_lub = $design_copied->comments_lub;
 } else {
     $comments = null;
     $comments_lut = null;
     $comments_lub = null;
 }
 if ($products_id == '') {
     $products_id = null;
 }
 $design = new design();
 $design->create($session_userinfo['id'], $session_userinfo['username'], $session_userinfo['users_image'], '0', $cat, $procat, $probra, $name, $price, $products_id, $styles_id_L, $styles_id_F, $structure_id, $content_id, $colors_request, $design_copied->followers->list_raw, $comments, $comments_lut, $comments_lub);
 $design_copied->comments->addComment($session_userinfo['username'], "I copied this Design to Design {$design->id}.");
 //ALSO COPY DRAFT IF REQUESTED BY USER
 if ($copy_draft_lists != '') {
     $copy_draft_lists = explode(',', $copy_draft_lists);
 }
 if (is_array($copy_draft_lists) && count($copy_draft_lists) > 0) {
     use_class('design_draft');
     $draft = new design_draft();
     foreach ($copy_draft_lists as $draft_id) {
         $draft_copied = new design_draft($draft_id);
         if (is_object($draft_copied)) {
             $colors_request = $copy_dra_color_request == 'on' ? $draft_copied->colors_request : null;
             if ($copy_dra_comments == 'on') {
                 $dra_comments = $draft_copied->comments->comments;
                 $dra_comments_lut = $draft_copied->comments_lut;