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


PHP adminBase::upload_indexpic方法代码示例

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


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

示例1: update

 public function update()
 {
     if (empty($this->input['id'])) {
         $this->errorOutput(NO_ID);
     }
     if (empty($this->input['name'])) {
         $this->errorOutput(NO_NAME);
     }
     $id = intval($this->input['id']);
     $data = array('name' => trim($this->input['name']) ? trim($this->input['name']) : '', 'update_time' => TIMENOW);
     $check = $this->obj->checkName($data['name'], $id);
     if ($check) {
         $this->errorOutput(NAME_EXIST);
     }
     $material = array();
     $material = parent::upload_indexpic();
     if ($material) {
         $logo_info = array('host' => $material['host'], 'dir' => $material['dir'], 'filepath' => $material['filepath'], 'filename' => $material['filename']);
         $data['logo_info'] = serialize($logo_info);
         $data['logo_id'] = $material['id'];
     }
     $ret = $this->obj->update($data, $id);
     $this->addItem($ret);
     $this->output();
 }
开发者ID:h3len,项目名称:Project,代码行数:25,代码来源:qingjia_sort_update.php

示例2: update

 public function update()
 {
     if (empty($this->input['id'])) {
         $this->errorOutput(NO_ID);
     }
     if (!$this->user['user_id']) {
         $this->errorOutput(NO_LOGIN);
     }
     /*
     if(!$this->input['bill_id'])
     {
     	    	$this->errorOutput(NO_BILLID);
     }
     */
     if (intval($this->input['sort_id']) < 0) {
         $this->errorOutput(NO_SORT);
     }
     $id = intval($this->input['id']);
     $data = array('sort_id' => intval($this->input['sort_id']), 'cost' => intval($this->input['cost']), 'cost_capital' => hg_cny(intval($this->input['cost'])), 'remark' => trim($this->input['remark']), 'is_ticket' => intval($this->input['is_ticket']), 'cost_time' => strtotime(trim($this->input['cost_time'])), 'state' => intval($this->input['state']), 'update_time' => TIMENOW);
     if ($this->input['bill_id']) {
         include_once CUR_CONF_PATH . 'lib/bill.class.php';
         $this->bill = new bill();
         $checkbool = $this->bill->checkLocked($this->input['bill_id']);
         if ($checkbool) {
             $this->errorOutput(THIS_IS_LOCKED);
         }
     }
     $material = array();
     $material = parent::upload_indexpic();
     if ($material) {
         $logo_info = array('host' => $material['host'], 'dir' => $material['dir'], 'filepath' => $material['filepath'], 'filename' => $material['filename']);
         $data['img'] = serialize($logo_info);
         $data['material_id'] = $material['id'];
     }
     $old_info = $this->obj->detail($id);
     if ($old_info['state']) {
         $this->reTotalSort(0, $old_info['sort_id']);
     }
     $ret = $this->obj->update($data, $id);
     if ($ret['state']) {
         $this->reTotalSort($data['sort_id'], 0);
     }
     if (intval($this->input['bill_id'])) {
         $this->retotal(intval($this->input['bill_id']));
     }
     $this->addItem($ret);
     $this->output();
 }
开发者ID:h3len,项目名称:Project,代码行数:48,代码来源:bill_record_update.php

示例3: update

 public function update()
 {
     if (empty($this->input['id'])) {
         $this->errorOutput(NO_ID);
     }
     if (!$this->user['user_id']) {
         $this->errorOutput(NO_LOGIN);
     }
     if (intval($this->input['sort_id']) < 0) {
         $this->errorOutput(NO_SORT);
     }
     $id = intval($this->input['id']);
     $data = array('sort_id' => intval($this->input['sort_id']), 'remark' => trim($this->input['remark']), 'start_time' => strtotime(trim($this->input['start_time'])), 'end_time' => strtotime(trim($this->input['end_time'])), 'state' => intval($this->input['state']), 'update_time' => TIMENOW);
     $material = array();
     $material = parent::upload_indexpic();
     if ($material) {
         $logo_info = array('host' => $material['host'], 'dir' => $material['dir'], 'filepath' => $material['filepath'], 'filename' => $material['filename']);
         $data['img'] = serialize($logo_info);
         //$data['material_id'] = $material['id'];
     }
     //$old_info = $this->obj->detail($id);
     /***
     
         		if($old_info['state'])//原来是审核通过,不管是否换sort,旧的sort 先-1
         	{
         		$this->reTotalSort(0,$old_info['sort_id']);
         	}    **/
     $ret = $this->obj->update($data, $id);
     /***
       	if($ret['state'])//如果新的审核通过,不管是否换sort,当前的sort +1
       	{
       		$this->reTotalSort($data['sort_id'],0);
       	}
       	//if(intval($this->input['bill_id']))	
       	//{
       		//$this->retotal(intval($this->input['bill_id']));	
       	//}
       	**/
     //print_r($data);
     $this->addItem($ret);
     $this->output();
 }
开发者ID:h3len,项目名称:Project,代码行数:42,代码来源:qingjia_record_update.php


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