本文整理汇总了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();
}
示例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);
}
示例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);
}
示例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');
}
}
}
}