當前位置: 首頁>>代碼示例>>PHP>>正文


PHP message_box::write_warning方法代碼示例

本文整理匯總了PHP中message_box::write_warning方法的典型用法代碼示例。如果您正苦於以下問題:PHP message_box::write_warning方法的具體用法?PHP message_box::write_warning怎麽用?PHP message_box::write_warning使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在message_box的用法示例。


在下文中一共展示了message_box::write_warning方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: _create_object_operation

 function _create_object_operation()
 {
     if (isset($_FILES[$this->name]['tmp_name']['file'])) {
         if ($_FILES[$this->name]['size']['file'] > ini_get('upload_max_filesize') * 1024 * 1024) {
             message_box::write_warning('uploaded file size exceeds limit');
             return false;
         }
         $this->object->set_attribute('tmp_file_path', $_FILES[$this->name]['tmp_name']['file']);
         $this->object->set_attribute('file_name', $_FILES[$this->name]['name']['file']);
         $this->object->set_attribute('mime_type', $_FILES[$this->name]['type']['file']);
     }
     return parent::_create_object_operation();
 }
開發者ID:BackupTheBerlios,項目名稱:limb-svn,代碼行數:13,代碼來源:create_file_action.class.php

示例2: _update_object_operation

 function _update_object_operation(&$object)
 {
     if (isset($_FILES[$this->name]['tmp_name']['file'])) {
         if ($_FILES[$this->name]['size']['file'] > ini_get('upload_max_filesize') * 1024 * 1024) {
             message_box::write_warning('uploaded file size exceeds limit');
             return false;
         }
         $object_data =& fetch_mapped_by_url();
         $object->set_attribute('media_id', $object_data['media_id']);
         $object->set_attribute('tmp_file_path', $_FILES[$this->name]['tmp_name']['file']);
         $object->set_attribute('file_name', $_FILES[$this->name]['name']['file']);
         $object->set_attribute('mime_type', $_FILES[$this->name]['type']['file']);
     }
     return parent::_update_object_operation(&$object);
 }
開發者ID:BackupTheBerlios,項目名稱:limb-svn,代碼行數:15,代碼來源:edit_file_action.class.php

示例3: change_password

 function change_password()
 {
     if (!($user_id = $this->get_id())) {
         debug::write_error('user id not set', __FILE__ . ' : ' . __LINE__ . ' : ' . __FUNCTION__);
         return false;
     }
     if (!($identifier = $this->get_identifier())) {
         debug::write_error('user identifier not set', __FILE__ . ' : ' . __LINE__ . ' : ' . __FUNCTION__);
         return false;
     }
     $this->set_attribute('password', user::get_crypted_password($identifier, $this->get_attribute('password')));
     if ($user_id == user::get_id()) {
         user::logout();
         message_box::write_warning(strings::get('need_relogin', 'user'));
     } else {
         session::destroy_user_session($user_id);
     }
     return $this->update(false);
 }
開發者ID:BackupTheBerlios,項目名稱:limb-svn,代碼行數:19,代碼來源:user_object.class.php

示例4: foreach

  function _check_result($result)//it's not really the place for it...
  {
    $image_variations = $this->_get_variations_ini_list();

    foreach($image_variations as $variation => $variation_data)
    {
      $action = $this->get_attribute($variation . '_action');
      if($action == 'upload' || $action == 'generate')
      {
        if (!$result[$variation]['saved'])
        {
          message_box :: write_warning($variation . ' not saved');
        }

        if ($this->get_attribute($action . '_' . $variation . '_max_size') && !$result[$variation]['resized'])
        {
          message_box :: write_warning($variation . ' not resized');
        }
      }
    }
  }
開發者ID:BackupTheBerlios,項目名稱:limb-svn,代碼行數:21,代碼來源:image_object.class.php


注:本文中的message_box::write_warning方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。