本文整理汇总了PHP中checkpost函数的典型用法代码示例。如果您正苦于以下问题:PHP checkpost函数的具体用法?PHP checkpost怎么用?PHP checkpost使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了checkpost函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: show_user_name
/**
* Liberar Usuario
* @return Booblean
*/
function show_user_name()
{
/* Parametros default */
global $hd;
$sx = '';
$msg = 'logout';
$page = 'logout.php';
$link_usr = '';
/* Modo Ghost */
$ghost = $this->user_ghost;
if (strlen($ghost) > 0) {
/* Ghost Mode */
$link_usr = '<A HREF="admin_ghost_user_sel.php?dd1=1&dd0=' . $ghost . '&dd90=' . checkpost($ghost) . '"
class="user_ghost"
title="logout ghost mode"
>';
$sx .= '<TD width="*" align="right"><NOBR>' . $link_usr . $this->user_nome . '</A></TD>' . chr(13) . chr(10);
//$sx .= '<TD><nobr> </nobr></TD>'.chr(13).chr(10);
} else {
/* Normal Mode */
$sx .= ' <TD width="*" align="right"><NOBR>' . $this->shortname($this->user_nome) . '</nobr></TD>' . chr(13) . chr(10);
$sx .= ' <TD><nobr> </nobr></TD>' . chr(13) . chr(10);
$sx .= ' ' . $hd->mount_button(msg($msg), $page) . chr(13) . chr(10);
}
return $sx;
}
示例2: report_002
function report_002()
{
global $cep;
$sql = "select * from cep_protocolos \n\t\t\t\t\t\twhere cep_tipo = 'PRO'\n\t\t\t\t\t\tand cep_status = 'P'\n\t\t\t\t\t\t\n\t\t\t\t\t\torder by cep_monitoring\t\t\t\t\n\t\t\t\t";
$rlt = db_query($sql);
$id = 0;
$sx = '<table width="100%" class="table_proj">';
$sx .= '<TR><TH>' . msg('caae');
$sx .= '<TH>' . msg('protocol_title');
$sx .= '<TH><nobr>' . msg('monitoring');
$sx .= '<TH>' . msg('status');
while ($line = db_read($rlt)) {
$bgcor = '';
if ($line['cep_monitoring'] < date("Ymd")) {
$bgcor = 'style="background-color:#FF8080; " ';
}
$id++;
$link = '<A HREF="protocolo_detalhe_investigator.php?dd0=' . $line['id_cep'] . '&dd90=' . checkpost($line['id_cep']) . '">';
$sx .= chr(13);
$sx .= '<TR valign="top">';
$sx .= '<TD>' . $link;
$sx .= $line['cep_caae'];
$sx .= '<TD>' . $link;
$sx .= $line['cep_titulo'];
$sx .= '<TD ' . $bgcor . '>' . $link;
$sx .= stodbr($line['cep_monitoring']);
$sx .= '<TD>' . $link;
$sx .= $cep->mostra_status($line['cep_status']);
}
$sx .= '</table>';
return $sx;
}
示例3: index
public function index()
{
if (!checkpost()) {
exit('error');
}
if (!$GLOBALS['islogin']) {
exit('{"stat":9, "errno":"未登录", "error":"未登录}');
}
$receiver_uid = postvar('uid', 1);
$msgModel = D('Msg');
if (!$msgModel->check_link($receiver_uid)) {
$msgModel->exitError();
}
$u = $msgModel->check_contact('uid', 'sex, uid');
$msgModel->send_1($u['uid'], 0);
echo '{"stat":9,"error":"打招呼成功","msg":"打招呼成功"}';
}
示例4: icone
function icone($id = '')
{
$sx .= '<div id="xml_oms">';
$sx .= '<div id="xml_oms_right">';
$sx .= 'OMS';
$sx .= '</div>';
$sx .= '<div id="xml_oms_left">';
$sx .= 'XML';
$sx .= '</div>';
$sx .= '</div>';
$sx .= '<script>' . chr(13);
$sx .= '$("#xml_oms").click(function() {
newxy2(\'oms_xml.php?dd0=' . $id . '&dd90=' . checkpost($id) . '\',600,400);
});' . chr(13);
$sx .= '</script>' . chr(13);
return $sx;
}
示例5: answer
public function answer()
{
if (!$GLOBALS['islogin']) {
exit;
}
if (!checkpost()) {
exit;
}
$qid = postvar('qid', 1);
$uid = $GLOBALS['i']['uid'];
$wenwen_question = M('wenwen_question');
$wq = $wenwen_question->where("qid={$qid}")->find();
if (!$wq) {
exit('not found');
}
$answer = M("wenwen_answer");
$data['qid'] = $qid;
$data['content'] = postvar('content');
$data['rsync_tsina'] = postvar('rsync_tsina', 1);
$data['uid'] = $GLOBALS['i']['uid'];
$data['username'] = $GLOBALS['i']['username'];
$date['add_time'] = time();
$condition['qid'] = $qid;
$condition['uid'] = $GLOBALS['i']['uid'];
$a = $answer->where($condition)->find();
if ($a) {
$id = $a['id'];
$answer->where($condition)->save($data);
} else {
$id = $answer->where($condition)->add($data);
$member_field = M('member_field');
$data1['wenwen_num'] = array('exp', 'wenwen_num+1');
$member_field->where("uid={$uid}")->save($data1);
//echo $member_field->getLastSql();
}
$body = array('id' => $id, 'qid' => $qid, 'wenwen_question' => $wq['wenwen_question'], 'wenwen_answer' => $data['content']);
$body_arr[$id] = $body;
//feed_publish(6, $body_arr);
$feedModel = D('Feed');
$feedModel->feed_publish(6, $body_arr);
//echo $answer->getLastSql();
echo 0;
}
示例6: other
public function other()
{
if (checkpost()) {
$act = getvar('act', array('b', 'c', 'd'));
$uid = postvar('uid', 1);
$content = postvar('content');
if ($act == 'b') {
$member = M('member');
$member->where("uid={$uid}")->setField('group_type', 2);
} elseif ($act == 'c') {
$photo = M('photo');
$photo->where("uid={$uid} AND gid=0")->setField('is_pass', 0);
} elseif ($act == 'd') {
$msgModel = D('Msg');
$msgModel->sys_notifi($uid, $content);
}
exit(1);
}
$this->display();
}
示例7: _load_feed
private function _load_feed($type = 'more')
{
if (!checkpost()) {
exit;
}
$face_size = postvar('face_size', 1);
$page = postvar('page', 1);
$is_last = postvar('is_last', 1);
$last_id = postvar('last_id', 1);
$this->_assign_feed($face_size, $type, $page, $is_last, $last_id);
$feed = $this->fetch('feed');
//if(!$feed) exit();
$arr = array('errno' => 200, 'more' => $feed, 'page' => $page, 'is_new_dt' => 0);
if ($type == 'more') {
$arr['is_last'] = 0;
$arr['last_id'] = 555484;
$arr['show_member_tips'] = 0;
$arr['show_member_tips_ssesion'] = NULL;
}
echo json_encode($arr);
}
示例8: forbid
public function forbid()
{
if (!$GLOBALS['islogin']) {
exit;
}
if (!checkpost()) {
exit;
}
$forbid_uid = postvar('forbid_uid', 1);
$data['uid'] = $GLOBALS['i']['uid'];
$data['forbid_uid'] = $forbid_uid;
$link = M('link');
$rs = $link->where($data)->find();
if ($rs) {
echo '-2';
} else {
$status = postvar('status', array(1, 2));
$data['status'] = $status;
$data['add_time'] = time();
$link->add($data);
echo $status == 2 ? 1 : 2;
}
}
示例9: praise
public function praise()
{
if (!$GLOBALS['islogin']) {
exit;
}
if (!checkpost()) {
exit;
}
$did = postvar('diary_id', 1);
$type = postvar('type', array(0, 1));
$diary = M('diary');
$d = $diary->where("did={$did}")->find();
if (!$d) {
exit;
}
if (strstr($d['praise_uids'], ",{$GLOBALS['i']['uid']},")) {
exit('{"errno":500, "msg":"\\u60a8\\u5df2\\u7ecf\\u9001\\u8fc7\\u4e86"}');
}
$data['praise_' . $type] = array('exp', "praise_{$type}+1");
$data['praise_uids'] = rtrim($d['praise_uids'], ',') . ",{$GLOBALS['i']['uid']},";
$diary->where("did={$did}")->save($data);
//echo $diary->getLastSql();
$msgModel = D('Msg');
//$msgModel->comment($d['uid'], 26, $type, $did);
$str = "<div class=\"textbg f_6\"><p class=\"word_break\">“写两句”:{$d['content']}</p></div>";
$classifier = $img = '';
if ($type == 0) {
$classifier = $GLOBALS['i']['sex'] == 1 ? '朵' : '片';
$img = $GLOBALS['i']['sex'] == 1 ? 'ico_diay.gif' : 'ico_diay1.gif';
} else {
$classifier = '块';
$img = 'ico_brick.gif';
}
$str .= "<p><a target=\"_blank\" href=\"{$GLOBALS['s']['urlsite']}/{$GLOBALS['i']['uid']}\">{$GLOBALS['i']['username']}</a>给了你一{$classifier}<img src=\"{$GLOBALS['s']['urlstatic']}/img/{$img}\" class=\"ico\"></p>";
$msgModel->sys_notifi($d['uid'], $str);
echo '{"errno":200, "msg":""}';
}
示例10: getattach
}
if ($_G['group']['allowpostattach'] || $_G['group']['allowpostimage']) {
$attachlist = getattach($pid);
$attachs = $attachlist['attachs'];
$imgattachs = $attachlist['imgattachs'];
unset($attachlist);
}
getgpc('infloat') ? include template('forum/post_infloat') : (include template('forum/post'));
} else {
if ($subject == '' && $message == '' && $thread['special'] != 2) {
showmessage('post_sm_isnull');
} elseif ($thread['closed'] && !$_G['forum']['ismoderator']) {
showmessage('post_thread_closed');
} elseif ($post_autoclose = checkautoclose($thread)) {
showmessage($post_autoclose, '', array('autoclose' => $_G['forum']['autoclose']));
} elseif ($post_invalid = checkpost($subject, $message, $special == 2 && $_G['group']['allowposttrade'])) {
showmessage($post_invalid, '', array('minpostsize' => $_G['setting']['minpostsize'], 'maxpostsize' => $_G['setting']['maxpostsize']));
} elseif (checkflood()) {
showmessage('post_flood_ctrl', '', array('floodctrl' => $_G['setting']['floodctrl']));
}
if (!empty($_G['gp_trade']) && $thread['special'] == 2 && $_G['group']['allowposttrade']) {
$item_price = floatval($_G['gp_item_price']);
$item_credit = intval($_G['gp_item_credit']);
if (!trim($_G['gp_item_name'])) {
showmessage('trade_please_name');
} elseif ($_G['group']['maxtradeprice'] && $item_price > 0 && ($_G['group']['mintradeprice'] > $item_price || $_G['group']['maxtradeprice'] < $item_price)) {
showmessage('trade_price_between', '', array('mintradeprice' => $_G['group']['mintradeprice'], 'maxtradeprice' => $_G['group']['maxtradeprice']));
} elseif ($_G['group']['maxtradeprice'] && $item_credit > 0 && ($_G['group']['mintradeprice'] > $item_credit || $_G['group']['maxtradeprice'] < $item_credit)) {
showmessage('trade_credit_between', '', array('mintradeprice' => $_G['group']['mintradeprice'], 'maxtradeprice' => $_G['group']['maxtradeprice']));
} elseif (!$_G['group']['maxtradeprice'] && $item_price > 0 && $_G['group']['mintradeprice'] > $item_price) {
showmessage('trade_price_more_than', '', array('mintradeprice' => $_G['group']['mintradeprice']));
示例11: dirname
<?php
require dirname(__FILE__) . '/../../../../wp-load.php';
$a = checkpost('key');
$b = checkpost('pid');
$c = get_post_permalink($b);
if ($a !== 'like' && !$c && !isInStr($c, 'post_type=post')) {
print_r(json_encode(array('error' => 1)));
exit;
}
$d = false;
$e = false;
if (is_user_logged_in()) {
$f = get_current_user_id();
$d = get_user_meta($f, 'like-posts', true);
$d = unserialize($d);
$e = in_array($b, $d);
}
if (!$d || !$e) {
if (!$d) {
$d = array($b);
} else {
array_unshift($d, $b);
}
upmeta($d);
$g = (int) get_post_meta($b, $a, true);
if (!$g) {
$g = 0;
}
update_post_meta($b, $a, $g + 1);
print_r(json_encode(array('error' => 0, 'like' => 1, 'response' => $g + 1)));
示例12: instituicao
* @access public
* @version v0.12.22
* @package Class
* @subpackage UC0001 - Sumissão de protocolo de pesquisa
*/
require "_class/_class_cep_submit_institution.php";
$inst = new instituicao();
$pag = 3;
echo '<B>' . msg('submit_checklist') . '</B>';
require 'submit_checklist_amendment.php';
echo '<BR>';
$sx = '<span id="create_pdf" class="form_submit">' . msg('create_PDF') . '</span>';
$sx .= '
<script>
$("#create_pdf").click(function() {
window.open(\'submit_amendment_pdf.php?dd0=' . $protocolo . '&dd90=' . checkpost($protocolo . $secu) . '\', \'pdf\', \'create pdf\');
});
</script>
';
echo $sx;
echo '<BR><BR>';
/* Compromisso */
//if (strlen($dd[81]) == 0) { $xok = 0; }
if ($xok == 1) {
if (strlen($dd[81]) > 0) {
redirecina('submit_end_monitoreo.php');
}
/* Termo */
require 'submit_pages.php';
echo '<form action="submit.php">';
echo '<BR>';
示例13: send
public function send()
{
if (!checkpost()) {
exit('error');
}
if (!$GLOBALS['islogin']) {
exit('{"stat":9, "errno":"未登录", "error":"未登录}');
}
$receiver_uid = postvar('receiver_uid', 1);
$msgModel = D('Msg');
if (!$msgModel->check_link($receiver_uid)) {
$msgModel->exitError();
}
$u = $msgModel->check_contact('receiver_uid', 'sex, uid');
$type = postvar('type', 1);
$action = 'send_' . $type;
$id = postvar('related', 1);
$msgModel->{$action}($u['uid'], $id);
echo '{"stat":0,"error":"\\u53d1\\u9001\\u6210\\u529f","pay_card":0}';
}
示例14: foreach
if ($option['type'] == 'image') {
foreach ($imgattachs['used'] as $k => $sortattach) {
if ($sortattach['aid'] == $option['value']['aid']) {
unset($imgattachs['used'][$k]);
break;
}
}
}
}
}
$imgattachs['unused'] = !$sortid ? $imgattachs['unused'] : '';
include template('forum/post');
} else {
$redirecturl = "forum.php?mod=viewthread&tid={$_G['tid']}&page={$_G['gp_page']}&extra={$extra}" . ($vid && $isfirstpost ? "&vid={$vid}" : '') . "#pid{$pid}";
if (empty($_G['gp_delete'])) {
if ($post_invalid = checkpost($subject, $message, $isfirstpost && ($special || $sortid))) {
showmessage($post_invalid, '', array('minpostsize' => $_G['setting']['minpostsize'], 'maxpostsize' => $_G['setting']['maxpostsize']));
}
if (!$isorigauthor && !$_G['group']['allowanonymous']) {
if ($orig['anonymous'] && !$isanonymous) {
$isanonymous = 0;
$authoradd = ', author=\'' . addslashes($orig['author']) . '\'';
$anonymousadd = ', anonymous=\'0\'';
} else {
$isanonymous = $orig['anonymous'];
$authoradd = $anonymousadd = '';
}
} else {
$authoradd = ', author=\'' . ($isanonymous ? '' : addslashes($orig['author'])) . '\'';
$anonymousadd = ", anonymous='{$isanonymous}'";
}
示例15: checkpost
// Copyright 2013, PAHO. All rights reserved. You can redistribute it and/or modify
// ProEthos under the terms of the ProEthos License as published by PAHO, which
// restricts commercial use of the Software.
//
// ProEthos is distributed in the hope that it will be useful, but WITHOUT ANY
// WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
// PARTICULAR PURPOSE. See the ProEthos License for more details.
//
// You should have received a copy of the ProEthos License along with the ProEthos
// Software. If not, see
// https://raw.githubusercontent.com/bireme/proethos/master/LICENSE.txt
echo '<TR>';
echo '<TD class="lt2" colspan=2>';
echo 'Registros';
$ref = 'register_' . $r;
$link = 'submit_team_ajax.php?dd1=' . $protocolo . '&dd2=listar&dd3=' . $autor . '&dd4=' . $campo . '&dd6=' . $ref . '&dd90=' . checkpost($protocol . $campo);
?>
<div id="<?php
echo $ref;
?>
">
</div>
<script>
var $tela01 = $.ajax('<?php
echo $link;
?>
')
.done(function(data) { $("#<?php
echo $ref;
?>