本文整理汇总了PHP中Notice函数的典型用法代码示例。如果您正苦于以下问题:PHP Notice函数的具体用法?PHP Notice怎么用?PHP Notice使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了Notice函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: dogetpaypass
public function dogetpaypass()
{
false !== strpos($_POST['u'], "@") ? $data['user_email'] = text($_POST['u']) : ($data['user_name'] = text($_POST['u']));
$vo = M('members')->field('id')->where($data)->find();
if (is_array($vo)) {
$res = Notice(10, $vo['id']);
if ($res) {
ajaxmsg();
} else {
ajaxmsg('', 0);
}
} else {
ajaxmsg('', 0);
}
}
示例2: emailvsend
public function emailvsend()
{
$data['user_email'] = text($_POST['email']);
//判断该邮箱是否已被别人注册
$count = M('members')->where(array("id" => array("neq", $this->uid), "user_email" => $data['user_email']))->count("1");
if ($count > 0) {
ajaxmsg('该邮箱已被使用', 2);
}
$newid = M('members')->where("id = {$this->uid}")->save($data);
//更改邮箱,重新激活
if ($newid) {
$status = Notice(8, $this->uid);
if ($status) {
ajaxmsg('邮件已发送,请注意查收!', 1);
} else {
ajaxmsg('邮件发送失败,请重试!', 0);
}
} else {
ajaxmsg('新邮件修改失败', 2);
}
}
示例3: MakeFont
function MakeFont($fontfile, $enc = 'cp1252', $embed = true)
{
// Generate a font definition file
if (get_magic_quotes_runtime()) {
@set_magic_quotes_runtime(0);
}
ini_set('auto_detect_line_endings', '1');
if (!file_exists($fontfile)) {
Error('Font file not found: ' . $fontfile);
}
$ext = strtolower(substr($fontfile, -3));
if ($ext == 'ttf' || $ext == 'otf') {
$type = 'TrueType';
} elseif ($ext == 'pfb') {
$type = 'Type1';
} else {
Error('Unrecognized font file extension: ' . $ext);
}
$map = LoadMap($enc);
if ($type == 'TrueType') {
$info = GetInfoFromTrueType($fontfile, $embed, $map);
} else {
$info = GetInfoFromType1($fontfile, $embed, $map);
}
$basename = substr(basename($fontfile), 0, -4);
if ($embed) {
if (function_exists('gzcompress')) {
$file = $basename . '.z';
SaveToFile($file, gzcompress($info['Data']), 'b');
$info['File'] = $file;
Message('Font file compressed: ' . $file);
} else {
$info['File'] = basename($fontfile);
Notice('Font file could not be compressed (zlib extension not available)');
}
}
MakeDefinitionFile($basename . '.php', $type, $enc, $embed, $map, $info);
Message('Font definition file generated: ' . $basename . '.php');
}
示例4: sendverify
public function sendverify()
{
$r = Notice(2, $this->uid);
if ($r) {
echo 1;
} else {
echo 0;
}
}
示例5: ShowError
function ShowError($str = '', $turnto = URL_ROOT, $urltitle = '返回')
{
Notice($str, $turnto, 3, 'error', $urltitle);
}
示例6: emailverify
public function emailverify()
{
$jsoncode = file_get_contents("php://input");
$arr = array();
$arr = json_decode($jsoncode, true);
if (!is_array($arr) || empty($arr) || empty($arr['email'])) {
ajaxmsg("数据有误!", 0);
}
if ($arr['uid'] != $this->uid) {
ajaxmsg("数据有误!", 0);
}
$map['user_email'] = $arr['email'];
$count = M('members')->where($map)->count('id');
$email = M('members')->field('user_email')->find($this->uid);
$ids = M('members_status')->getFieldByUid($this->uid, 'email_status');
if ($count > 1) {
ajaxmsg('此邮箱已被注册', 0);
} elseif ($ids == 1) {
ajaxmsg('此邮箱已认证成功', 0);
} else {
$data['user_email'] = $arr['email'];
$data['last_log_time'] = time();
$newid = M('members')->where("id = {$this->uid}")->save($data);
//更改邮箱,重新激活
if ($newid) {
$status = Notice(8, $this->uid);
if ($status) {
ajaxmsg('邮件已发送,请登录邮箱认证!');
} else {
ajaxmsg('邮件发送失败,请检查邮箱格式,重新发送!', 0);
}
} else {
ajaxmsg('新邮件修改失败', 0);
}
}
}
示例7: emailvsend
public function emailvsend()
{
session('email_temp', text($_POST['email']));
$mid = $this->regaction();
$status = Notice(8, $mid);
if ($status) {
ajaxmsg('邮件已发送,请注意查收!', 1);
} else {
ajaxmsg('邮件发送失败,请重试!', 0);
}
}
示例8: getpinpass
public function getpinpass()
{
$email_status = M('members_status')->where(array("uid" => $this->uid))->getField("email_status");
if ($email_status != 1) {
$data["jumpUrl"] = __APP__ . "/member/verify?id=1#fragment-1";
ajaxmsg($data, 2);
return;
}
$res = Notice(9, $this->uid);
if ($res) {
ajaxmsg();
} else {
ajaxmsg('', 0);
}
}
示例9: tip
public function tip()
{
$id = intval($_REQUEST['id']);
$vm = M('borrow_info')->field('borrow_uid,borrow_name,borrow_money,repayment_type,deadline')->find($id);
$borrowName = $vm['borrow_name'];
$borrowMoney = $vm['borrow_money'];
if ($id) {
Notice(9, $vm['borrow_uid'], array('id' => $id, 'borrowName' => $borrowName, 'borrowMoney' => $borrowMoney));
ajaxmsg();
} else {
ajaxmsg('', 0);
}
}
示例10: Exception
if (!$acl->Access("x")) {
throw new Exception("Access denied");
}
echo "AJAXOK";
if (isset($_POST['action'])) {
switch ($_POST['action']) {
case 'save':
$phrase = $_POST['text'];
$translation = $_POST['translation'];
$lang_id = $_POST['language'];
$db = new DB("translation");
$db->select("translation_lang_id = '" . $lang_id . "' AND translation_phrase='" . $db->escape($phrase) . "'");
if ($db->numRows() == 1) {
$c = new DB("translation");
$c->translation_phrase_translated = $translation;
$c->update("translation_lang_id = '" . $lang_id . "' AND translation_phrase='" . $db->escape($phrase) . "'");
echo Notice("Saved");
} else {
$c = new DB("translation");
$c->translation_lang_id = $lang_id;
$c->translation_phrase = $phrase;
$c->translation_phrase_translated = $translation;
$c->insert();
echo Notice("insert " . $lang_id . " " . $phrase . "=>" . $translation);
}
break;
}
}
} catch (Exception $e) {
echo _t($e->getMessage());
}
示例11: dogetpass
public function dogetpass()
{
$jsoncode = file_get_contents("php://input");
$arr = array();
$arr = json_decode($jsoncode, ture);
if (!is_array($arr) || empty($arr) || empty($arr['user'])) {
ajaxmsg("数据错误!", 0);
}
false !== strpos($arr['user'], "@") ? $data['user_email'] = text($arr['user']) : ($data['user_name'] = text($arr['user']));
$vo = M('members')->field('id')->where($data)->find();
if (is_array($vo)) {
$res = Notice(7, $vo['id']);
if ($res) {
ajaxmsg('发送成功');
} else {
ajaxmsg('发送失败', 0);
}
} else {
ajaxmsg('发送失败', 0);
}
}
示例12: synlogin
function synlogin($get, $post)
{
$uid = $get['uid'];
$username = $get['username'];
if (!API_SYNLOGIN) {
return API_RETURN_FORBIDDEN;
}
$vo = M("members")->field("id,user_name")->where("user_name='{$username}'")->find();
if (is_array($vo)) {
//登陆
foreach ($vo as $key => $v) {
session("u_{$key}", $v);
}
$up['uid'] = $vo['id'];
$up['add_time'] = time();
$up['ip'] = get_client_ip();
M('member_login')->add($up);
} else {
//注册
require DISCUZ_ROOT . "uc_client/client.php";
$dataUc = uc_get_user($username);
$data['user_name'] = text($username);
$data['user_pass'] = text($get['password']);
$data['user_email'] = text($dataUc[2]);
$count = M('members')->where("user_email = '{$data['user_email']}' OR user_name='{$data['user_name']}'")->count('id');
if ($count > 0) {
exit;
}
$data['reg_time'] = time();
$data['reg_ip'] = get_client_ip();
$data['lastlog_time'] = time();
$data['lastlog_ip'] = get_client_ip();
$newid = M('members')->add($data);
if ($newid) {
session('u_id', $newid);
session('u_user_name', $data['user_name']);
Notice(1, $newid);
memberMoneyLog($newid, 1, $this->glo['award_reg'], "注册奖励");
}
}
header('P3P: CP="CURa ADMa DEVa PSAo PSDo OUR BUS UNI PUR INT DEM STA PRE COM NAV OTC NOI DSP COR"');
_setcookie('Example_auth', _authcode($uid . "\t" . $username, 'ENCODE'));
}
示例13: query_get_zone
function query_get_zone($query, $fail_if_missing = 0)
{
global $soa_table_name, $search_query, $query_host, $query_origin;
if (!strlen($query)) {
return;
}
if (!ends_with_dot($query)) {
$query .= ".";
}
/* Search left-to-right at label boundaries for exact match */
$labels = explode(".", $query);
$host = array();
do {
if ($label = implode(".", $labels)) {
/* Search for exact match */
$res = sql_query("SELECT id FROM {$soa_table_name} WHERE origin='" . esc($label) . "'") or ErrSQL("Error searching for zone called " . quote($label) . ".");
if ($res && ($row = sql_fetch_row($res))) {
$query_origin = $label;
$query_host = implode(".", $host);
$search_query = $query;
return (int) $row[0];
}
$host[] = array_shift($labels);
}
} while ($label);
/* Search left-to-right at label boundaries for fuzzy match */
$labels = explode(".", $query);
$host = array();
do {
if ($label = implode(".", $labels)) {
/* Search for similar match */
$res = sql_query("SELECT id FROM {$soa_table_name} WHERE origin LIKE '%" . esc($label) . "'") or ErrSQL("Error searching for zone like " . quote($label) . ".");
if ($res && sql_num_rows($res)) {
zone_browser(" WHERE origin LIKE '%" . esc($label) . "'");
exit;
}
}
} while ($dummy = array_shift($labels));
/* Try generic LIKE query */
if (ends_with_dot($query)) {
$query = substr($query, 0, strlen($query) - 1);
}
$sql_where = "WHERE origin LIKE '%" . esc($query) . "%'";
$res = sql_query("SELECT id FROM {$soa_table_name} {$sql_where}") or ErrSQL("Error searching for zone like " . quote($query) . ".");
if ($res && sql_num_rows($res)) {
zone_browser($sql_where, $query);
exit;
}
/* No match - fail */
if ($fail_if_missing) {
Notice("<B>No zones found matching your search query.</B>");
help_screen();
}
}
示例14: ShowError
function ShowError($str = '', $turnto = URL_ROOT, $urltitle = '返回')
{
if ($turnto == URL_ROOT) {
Notice($str, $turnto . '/index.php', 3, 'error', $urltitle);
} else {
Notice($str, $turnto, 3, 'error', $urltitle);
}
}
示例15: sendEmaila
public function sendEmaila()
{
$status = Notice(8, $this->uid);
}