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


PHP dao::geterror方法代码示例

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


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

示例1: admin

 /**
  * Block Admin Page.
  * 
  * @param  int    $index 
  * @param  string $blockID 
  * @access public
  * @return void
  */
 public function admin($index = 0, $blockID = '')
 {
     $this->app->loadLang('block', 'sys');
     $title = $index == 0 ? $this->lang->block->createBlock : $this->lang->block->editBlock;
     if (!$index) {
         $index = $this->block->getLastKey('team') + 1;
     }
     if ($_POST) {
         $this->block->save($index, 'system', 'team');
         if (dao::isError()) {
             $this->send(array('result' => 'fail', 'message' => dao::geterror()));
         }
         $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => $this->server->http_referer));
     }
     $block = $this->block->getBlock($index, 'team');
     $blockID = $blockID ? $blockID : ($block ? $block->block : '');
     $blocks = json_decode($this->block->getAvailableBlocks(), true);
     $this->view->blocks = array_merge(array(''), $blocks);
     $this->view->title = $title;
     $this->view->params = $blockID ? json_decode($this->block->{'get' . ucfirst($blockID) . 'Params'}(), true) : array();
     $this->view->blockID = $blockID;
     $this->view->block = $block;
     $this->view->index = $index;
     $this->display();
 }
开发者ID:leowh,项目名称:colla,代码行数:33,代码来源:control.php

示例2: set

 /**
  * Set params when type is rss or html. 
  * 
  * @param  int    $index 
  * @param  string $type 
  * @param  int    $blockID 
  * @access public
  * @return void
  */
 public function set($index, $type, $blockID = 0)
 {
     if ($_POST) {
         $this->block->save($index, $type, 'sys', $blockID);
         if (dao::isError()) {
             $this->send(array('result' => 'fail', 'message' => dao::geterror()));
         }
         $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => $this->createLink('index')));
     }
     $block = $blockID ? $this->block->getByID($blockID) : $this->block->getBlock($index);
     if ($block) {
         $type = $block->block;
     }
     $this->view->type = $type;
     $this->view->index = $index;
     $this->view->blockID = $blockID;
     $this->view->block = $block ? $block : array();
     $this->display();
 }
开发者ID:leowh,项目名称:colla,代码行数:28,代码来源:control.php

示例3: save

 /**
  * Save tags.
  * 
  * @param  string    $tags 
  * @access public
  * @return void
  */
 public function save($tags)
 {
     $tags = array_unique(explode(',', $tags));
     foreach ($tags as $tag) {
         if (trim($tag) == '') {
             continue;
         }
         $rank = $this->countRank($tag);
         $count = $this->dao->select('count(*) as count')->from(TABLE_TAG)->where('tag')->eq($tag)->fetch('count');
         if ($count == 0) {
             $this->dao->insert(TABLE_TAG)->data(array('tag' => $tag, 'rank' => $rank))->exec();
         } else {
             $this->dao->update(TABLE_TAG)->set('rank')->eq($rank)->where('tag')->eq($tag)->exec();
         }
     }
     if (!dao::isError()) {
         return true;
     }
     return dao::geterror();
 }
开发者ID:leowh,项目名称:colla,代码行数:27,代码来源:model.php

示例4: finish

 /**
  * setStatus 
  * 
  * @param  string    $orderID 
  * @access public
  * @return void
  */
 public function finish($orderID)
 {
     $order = $this->order->getByID($orderID);
     if ($order->status == 'finished') {
         die($this->lang->order->statusList[$order->status]);
     }
     if ($order->payStatus != 'paid') {
         die($this->lang->order->statusList[$order->payStatus]);
     }
     if ($order->deliveryStatus == 'not_send') {
         die($this->lang->order->statusList[$order->deliveryStatus]);
     }
     $result = $this->order->finish($orderID);
     if ($result) {
         $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess));
     }
     $this->send(array('result' => 'fail', 'message' => dao::geterror()));
 }
开发者ID:AlenWon,项目名称:chanzhieps,代码行数:25,代码来源:control.php

示例5: addBlacklist

 /**
  * Add a blacklist item. 
  * 
  * @access public
  * @return void
  */
 public function addBlacklist()
 {
     $typeList = $this->lang->guarder->blacklistModes;
     if ($_POST) {
         $item = $this->post->identity;
         $type = 'keywords';
         if (validater::checkIP($item)) {
             $type = 'ip';
         }
         if (validater::checkEmail($item)) {
             $type = 'email';
         }
         if (validater::checkAccount($item)) {
             $user = $this->loadModel('user')->getByAccount($item);
             if (!empty($user)) {
                 $type = 'account';
             }
         }
         $result = $this->guarder->punish($type, $item, $this->post->reason, $this->post->expired);
         if ($result) {
             $this->send(array('result' => 'success', 'message' => $this->lang->setSuccess, 'locate' => inlink('blacklist', "mode={$type}")));
         }
         $this->send(array('result' => 'fail', 'message' => dao::geterror()));
     }
     $this->view->title = $this->lang->guarder->addBlacklist;
     $this->display();
 }
开发者ID:eric0614,项目名称:chanzhieps,代码行数:33,代码来源:control.php

示例6: edit

 /**
  * Edit auth.
  * 
  * @param  string $code 
  * @access public
  * @return void
  */
 public function edit($code)
 {
     if (!empty($_POST)) {
         if (!$this->post->buildin and strpos($this->post->login, '/') !== 0 and !preg_match('/https?\\:\\/\\//Ui', $this->post->login)) {
             $this->send(array('result' => 'fail', 'message' => $this->lang->entry->error->url));
         }
         $this->entry->update($code);
         if (dao::isError()) {
             $this->send(array('result' => 'fail', 'message' => dao::geterror()));
         }
         $this->send(array('result' => 'success', 'locate' => inlink('admin'), 'entries' => $this->entry->getJSONEntries()));
     }
     $entry = $this->entry->getByCode($code);
     if ($entry->size != 'max') {
         $size = json_decode($entry->size);
         $entry->size = 'custom';
         $entry->width = $size->width;
         $entry->height = $size->height;
     }
     $this->view->title = $this->lang->entry->common . $this->lang->colon . $this->lang->entry->edit;
     $this->view->entry = $entry;
     $this->view->code = $code;
     $this->display();
 }
开发者ID:leowh,项目名称:colla,代码行数:31,代码来源:control.php


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