public static function alert($title, $content = '', $life = 0) { $msg = array(); $msg['type'] = 'alert'; $msg['title'] = empty($content) ? 'alert' : $title; $msg['content'] = empty($content) ? $title : $content; $msg['content'] = empty($content) ? $title : $content; $msg['life'] = $life; msg::show($msg); }
/** * 显示成功消息 * */ public static function success($content = '', $url = '', $life = 2) { $msg = array('type' => 'success', 'title' => zotop::t('success'), 'content' => '', 'detail' => '', 'url' => $url, 'life' => $life, 'action' => ''); if (is_array($content)) { $msg = array_merge($msg, $content, array('type' => 'success')); } else { $msg['content'] = $content; } msg::show($msg); }
/** * 显示成功消息 * */ public static function success($content = '', $url = '', $life = 3, $extra = '') { $msg = array('type' => 'success', 'title' => 'success', 'content' => '', 'life' => 0); if (is_array($content)) { $msg = array_merge($msg, $content); } else { $msg['content'] = $content; $msg['url'] = $url; $msg['extra'] = $extra; $msg['life'] = $life; } $msg['type'] = 'success'; msg::show($msg); }