1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- <?php
- /**
- * 小梦科技资源nanodreamtech.com
- *
- * ==========================================================================
- * @link https://www.nanodreamtech.com/
- * @copyright Copyright (c) 2015 liofis.com.
- * @license https://www.nanodreamtech.com/license.html License
- * ==========================================================================
- *
- * @author fish
- *
- */
- namespace Seller\Model;
- class ArticleModel{
-
-
- public function update($data)
- {
-
-
- $ins_data = array();
- $ins_data['title'] = $data['title'];
- $ins_data['content'] = $data['content'];
- $ins_data['displayorder'] = $data['displayorder'];
- $ins_data['enabled'] = $data['enabled'];
- $ins_data['addtime'] = time();
-
- $id = $data['id'];
- if( !empty($id) && $id > 0 )
- {
- unset($ins_data['addtime']);
-
- M('lionfish_comshop_article')->where( array('id' => $id) )->save( $ins_data );
- $id = $data['id'];
-
- }else{
-
- $id = M('lionfish_comshop_article')->where( array('id' => $id) )->add( $ins_data );
-
-
- }
-
-
- }
-
-
- }
- ?>
|