本文整理汇总了PHP中Message::showSucc方法的典型用法代码示例。如果您正苦于以下问题:PHP Message::showSucc方法的具体用法?PHP Message::showSucc怎么用?PHP Message::showSucc使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Message
的用法示例。
在下文中一共展示了Message::showSucc方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: message
public function message()
{
if (empty($_REQUEST['format'])) {
$_REQUEST['format'] = 'json';
}
$arr = array(array('name' => '张三', 'age' => 18), array('name' => '李四', 'age' => 22));
Message::showSucc('获取数据成功', $arr);
}
示例2: getList
/**
* get list comment
* http://www.missy-blue.com/comment/get_list/?format=json
*/
public function getList()
{
$commentModelDb = new CommentModelDB();
$result = $commentModelDb->getList(5);
if (!empty($result)) {
Message::showSucc('add comment success', $result);
} else {
Message::showError('add comment failed');
}
}
示例3: setOnlineDebugUrl
public function setOnlineDebugUrl()
{
$OnlineDebugKeyDB = new OnlineDebugKeyModelDB();
$insertArr = array();
$insertArr['rand_key'] = md5(mt_rand(1, 10000) + time());
$insertArr['redirect'] = $_POST['redirect'];
//$insertArr['expire'] = $_POST['expire'];
$insertArr['expire'] = time() + 86400;
$insertArr['valid'] = 1;
$rs = $OnlineDebugKeyDB->insert($insertArr);
$rs ? Message::showSucc('设置成功', $insertArr['rand_key']) : Message::showError('设置失败');
}
示例4: waterfall
public function waterfall()
{
$sid = intval($_GET['sub_mid']);
$pageId = max(intval($_GET['page']), 1);
$limit = 10;
$start = ($pageId - 1) * $limit;
$stop = $start + $limit;
$submoduleDB = new SubmoduleModelDB();
$submodule = $submoduleDB->getRow('SELECT mid, code FROM `' . $submoduleDB->getTableName() . '` WHERE id=?', array(intval($sid)));
$details = MyRedis::getSubmoduleDetail($submodule, $start, $stop);
Common::debug($details);
foreach ($details['messages'] as $key => $value) {
if ($tmp = unserialize($value)) {
$value = array_map('urldecode', array_map('htmlspecialchars', $tmp));
// $detail = date('[Y-m-d H:i:s] ', $time)."{$submodule['name']} 错误号:{$submodule['code']} 详细:{$message}, 邮件:第{$mailMsgCount}次,短信:第{$smsMsgCount}次,来自{$client_ip}/{$onlineip},xhprofId[{$xhprofId}]";
$details['messages'][$key] = date('[Y-m-d H:i:s] ', $value['time']) . "{$value['name']} 错误号:{$value['code']},脚本:{$value['script']},详细:{$value['message']},来自{$value['clientIp']}/{$value['serverIp']}";
} else {
$details['messages'][$key] = htmlspecialchars($value);
}
}
Message::showSucc('详细信息', $details['messages']);
}
示例5: logicResume
public function logicResume()
{
$tmpLogDB = new TmpLogModelDB();
$updateArr = array('' => 0);
$whereArr = array();
$whereArr['id'] = $_GET['id'];
$rs = $tmpLogDB->update($updateArr, $whereArr);
Log::write($this->adminUserName, $this->ip, $_GET['id'], self::$state . "__" . self::$action, $rs);
$rs ? Message::showSucc('恢复成功') : Message::showError('恢复失败:' . implode(" ", $tmpLogDB->getErrorInfo()));
}
示例6: resetPasswordManually
public function resetPasswordManually()
{
if ($this->user['role'] == 'member') {
if ($this->isPost()) {
$old_password = trim($_POST['old_password']);
$uid = $this->user['uid'];
$userModelDB = new UserModelDB();
$userInfo = $userModelDB->getUserByUid($uid);
if (empty($old_password)) {
Message::showError('您输入的旧密码不能为空');
}
if (!preg_match('/[0-9a-zA-Z_\\.\\@\\#\\$\\%]{6,18}/', $old_password)) {
$this->putErrorMsg('/[0-9a-zA-Z_\\.\\@\\#\\$\\%]{6,18}/');
Message::showError('你输入的密码不符合正则');
}
if (sha1($old_password) != $userInfo['password']) {
Message::showError('您的旧密码输入有误');
}
$password = trim($_POST['password']);
$password_repeat = trim($_POST['password_repeat']);
if (empty($password) || empty($password_repeat)) {
Message::showError('新输入的密码不能为空');
}
if (!preg_match('/[0-9a-zA-Z_\\.\\@\\#\\$\\%]{6,18}/', $password)) {
$this->putErrorMsg('/[0-9a-zA-Z_\\.\\@\\#\\$\\%]{6,18}/');
Message::showError('你输入的密码不符合正则');
}
if ($password_repeat != $password) {
Message::showError('两次输入的密码不一致');
}
//save db
$success = $userModelDB->updatePassword($uid, sha1($password_repeat));
if (!$success) {
Message::showError('failed');
}
Message::showSucc('Modify password success!');
}
} else {
Message::showError('请登陆');
}
$this->display('reset_password_manually.html');
}
示例7: debug
public function debug()
{
session_start();
//print_r(json_decode($_GET['online_debug'], true));
$onlineDebugDB = new OnlineDebugModelDB();
$insertArr = array();
$insertArr['pid'] = $_POST['pid'];
$insertArr['domain'] = $_POST['domain'];
$insertArr['request'] = $_POST['request'];
$insertArr['response'] = $_POST['response'];
$insertArr['html'] = $_POST['html'];
$insertArr['debug_msg'] = $_POST['debug_msg'];
$insertArr['client_ip'] = $_POST['client_ip'];
$insertArr['server_ip'] = $_SERVER['REMOTE_ADDR'];
$insertArr['datetime'] = time();
$rs = $onlineDebugDB->insert($insertArr);
$rs ? Message::showSucc('添加成功') : Message::showError('添加失败:' . implode(" ", $onlineDebugDB->getErrorInfo()));
}
示例8: getGrapheDetail
public function getGrapheDetail()
{
$ids = explode(',', $_GET['ids']);
$submoduleDB = new SubmoduleModelDB();
$name = $submoduleDB->getData('SELECT id, name FROM `' . $submoduleDB->getTableName() . '` WHERE id IN ?', array($ids));
Message::showSucc('模块名', $name);
}
示例9: version
public function version()
{
Message::showSucc('有新功能哦!', '0.9');
}