本文整理匯總了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');
}
}
}
}