当前位置: 首页>>代码示例>>PHP>>正文


PHP design::updateStatus方法代码示例

本文整理汇总了PHP中design::updateStatus方法的典型用法代码示例。如果您正苦于以下问题:PHP design::updateStatus方法的具体用法?PHP design::updateStatus怎么用?PHP design::updateStatus使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在design的用法示例。


在下文中一共展示了design::updateStatus方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: ajaxReturn

     $result['designs_id'] = $design->id;
     $result['drafts_id'] = $draft->id;
     $result['status'] = 'DELETED';
     //        $result['load_row_design'] = $need_load_row_design;
     ajaxReturn($result);
     exit;
 } elseif ($_POST['me_action'] == 'DELETEELEMENT') {
     $elements_id = tep_db_prepare_input($_POST['elements_id']);
     $new_status = tep_db_prepare_input($_POST['new_status']);
     $draft = new design_draft(null, null, $elements_id);
     $draft->deleteElement($elements_id, $session_userinfo['username']);
     $st_counter = '';
     if ($new_status != '') {
         $old_status = tep_db_prepare_input($_POST['old_status']);
         $design = new design($draft->designs_id);
         $design->updateStatus($old_status, $new_status, $session_userinfo['username']);
         $st_counter = designCountBySubStatus(10);
         //            $st_counter = designCountBySubStatus();
     }
     $result = array();
     $result['elements_id'] = $elements_id;
     $result['designs_id'] = $draft->designs_id;
     $result['drafts_id'] = $draft->id;
     $result['st_counter'] = $st_counter;
     $result['status'] = 'DELETED';
     ajaxReturn($result);
     exit;
 } elseif ($_POST['me_action'] == 'LOCATEDRAFT') {
     $drafts_id = tep_db_prepare_input($_POST['drafts_id']);
     /* OLD QUERY
        $q = "SELECT CASE d.status WHEN 10 THEN CONCAT('10-', de.status) ELSE d.status END AS status FROM designs d ";
开发者ID:blasiuscosa,项目名称:manobo-2008,代码行数:31,代码来源:designs-manage.php

示例2: setApproveStatus

 function setApproveStatus($status, $username = '')
 {
     $id = $this->id;
     if ($status == 'CLEAR') {
         //CLEAR STATUS
         $sda = array();
         $sda['approve_status'] = '0';
         $sda['approve_date'] = 'null';
         $sda['approve_by'] = 'null';
         tep_db_perform('designs_drafts', $sda, 'update', "drafts_id={$id}");
         $this->approve_status = '';
         $this->approve_date = '';
         $this->approve_by = '';
         $isReadyForSamplings = false;
     } elseif ($status == 'A' || $status == 'R') {
         //A = Approved
         //R = Rejected
         $timestamp = date('Y-m-d H:i:s');
         $sda = array();
         $sda['approve_status'] = $status;
         $sda['approve_date'] = $timestamp;
         $sda['approve_by'] = $username;
         tep_db_perform('designs_drafts', $sda, 'update', "drafts_id={$id}");
         $this->approve_status = $status;
         $this->approve_date = $timestamp;
         $this->approve_by = $username;
         if ($status == 'R') {
             //Delete All Products & Elements
             $products = $this->retrieveProducts();
             $elements = $this->retrieveElements();
             foreach ($products as $p) {
                 $this->deleteProduct($p['products_id'], 'draft-killed');
             }
             foreach ($elements as $e) {
                 $this->deleteElement($e['elements_id'], 'draft-killed');
             }
         }
         use_class('design');
         $design = new design($this->designs_id);
         if ($design->status == 4) {
             $isReadyForSamplings = $design->isReadyForSamplings();
             $new_status = $design->category == 'R' ? '5' : '10-1';
             //ONLY 'R' GOES TO SAMPLINGS, OTHER NEED TO CREATE NEW ELEMENTS
             if ($isReadyForSamplings) {
                 $design->updateStatus($design->status, $new_status, 'auto-set');
             }
         } else {
             $isReadyForSamplings = false;
         }
     }
     return $isReadyForSamplings;
 }
开发者ID:blasiuscosa,项目名称:manobo-2008,代码行数:52,代码来源:design_draft.php

示例3: basename

                 $design->uploadImage($img_no, $image_4, basename($image_4));
                 $image4_uploaded = true;
             }
             $image_uploaded = $image1_uploaded || $image2_uploaded || $image3_uploaded || $image4_uploaded;
         }
         if (!is_null($products_id) && !$image_uploaded) {
             $pids_array = explode(',', $products_id);
             use_class('products_minierp');
             $class_pm = new products_minierp();
             $product = $class_pm->retrieveDetail($pids_array[0], 'p');
             $design->uploadImage('1', DIR_WS_IMAGES . $product['p']['products_image'], basename($product['p']['products_image']));
         }
         header("Location: ?open=designs-detail&id={$design->id}" . ($hidemenuscript == '' ? '' : '&hidemenu=true'));
     }
     if (isset($_POST['status']) && $_POST['status'] == '2') {
         $design->updateStatus('1', '2', $session_userinfo['username']);
     }
     $notification_targets = $design->followers->list;
     $notification_targets[] = $design->owner_id;
     $notification_message = $obj_notifications->messageTemplateGeneral('Design', $design_copied->id, "<strong>{$session_userinfo['username']}</strong> copied", "to Design {$design->id}");
     $username = 'auto-set';
     $obj_notifications->broadcast($notification_targets, $notification_message, $username, "open=designs-detail&id={$design->id}");
     $rowListReload = true;
 } elseif ($_POST['me_action'] == 'UPDATEDESIGN') {
     $type = tep_db_prepare_input($_POST['type']);
     $cat = tep_db_prepare_input($_POST['cat']);
     $procat = tep_db_prepare_input($_POST['procat']);
     $probra = tep_db_prepare_input($_POST['probra']);
     $name = tep_db_prepare_input($_POST['name']);
     $price = tep_db_prepare_input($_POST['price']);
     $products_id = tep_db_prepare_input($_POST['products_id']);
开发者ID:blasiuscosa,项目名称:manobo-2008,代码行数:31,代码来源:designs-detail.php


注:本文中的design::updateStatus方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。