本文整理汇总了PHP中pb_submit_check函数的典型用法代码示例。如果您正苦于以下问题:PHP pb_submit_check函数的具体用法?PHP pb_submit_check怎么用?PHP pb_submit_check使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了pb_submit_check函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: add
function add()
{
global $viewhelper;
if (isset($_POST['do']) && !empty($_POST['data']['market']['name'])) {
pb_submit_check("data");
$this->market->setParams();
$this->market->params['data']['market']['industry_id'] = PbController::getMultiId($_POST['industry']['id']);
$this->market->params['data']['market']['area_id'] = PbController::getMultiId($_POST['area']['id']);
$result = $this->market->Add();
if ($result) {
flash('thanks_for_adding_market');
} else {
pheader("location:add.php");
}
}
$viewhelper->setPosition(L("added_market_info", "tpl"));
render("market/add");
}
示例2: add
function add()
{
global $smarty;
using("message");
$pms = new Messages();
if (isset($_POST['do']) && !empty($_POST['friendlink'])) {
pb_submit_check('friendlink');
$data = $_POST['friendlink'];
$result = false;
$data['status'] = 0;
$data['created'] = $data['modified'] = $this->friendlink->timestamp;
$result = $this->friendlink->save($data);
if ($result) {
$pms->SendToAdmin('', array("title" => $data['title'] . L("apply_friendlink"), "content" => $data['title'] . L("apply_friendlink") . "\n" . $_POST['data']['email'] . "\n" . $data['description']));
flash('wait_apply');
}
} else {
flash();
}
}
示例3: getpasswd
function getpasswd()
{
if (isset($_POST['do'])) {
pb_submit_check('data');
$do = trim($_POST['do']);
$username = trim($_POST['data']['username']);
$userpass = trim($_POST['data']['password1']);
if (!empty($userpass) && !empty($username)) {
$user_exists = $this->member->checkUserExist($username, true);
if (!$user_exists) {
flash("member_not_exists");
} else {
$result = $this->member->dbstuff->Execute("UPDATE {$this->member->table_prefix}members SET userpass='" . $this->member->authPasswd($userpass) . "' WHERE id=" . $this->member->info['id'] . " AND status='1'");
if ($result) {
flash("reset_and_login", "logging.php");
}
}
}
} else {
flash();
}
}
示例4: post
function post()
{
require CLASS_PATH . "validation.class.php";
$validate = new Validation();
if (isset($_POST['save_service'])) {
pb_submit_check('service');
$vals = array();
$vals['status'] = 0;
$vals['member_id'] = 0;
$vals['content'] = $_POST['service']['content'];
if (isset($_POST['service']['nick_name'])) {
$vals['nick_name'] = $_POST['service']['nick_name'];
}
$vals['email'] = $_POST['service']['email'];
$vals['type_id'] = $_POST['service']['type_id'];
$vals['created'] = $time_stamp;
$vals['user_ip'] = pb_get_client_ip();
$vals['title'] = $_POST['service']['title'];
$this->service->doValidation($vals);
if (!empty($this->service->validationErrors)) {
setvar("item", $vals);
setvar("Errors", $validate->show($service));
render("service/index");
} else {
if (empty($vals['title'])) {
$vals['title'] = L("comments_and_suggestions", "tpl");
}
if ($this->service->save($vals)) {
flash('thanks_for_advise', URL);
} else {
flash();
}
}
} else {
flash("pls_enter_your_advise", "index.php");
}
}
示例5: uses
<?php
/**
* [PHPB2B] Copyright (C) 2007-2099, Ualink Inc. All Rights Reserved.
* The contents of this file are subject to the License; you may not use this file except in compliance with the License.
*
* @version $Revision: 2115 $
*/
require "../libraries/common.inc.php";
require "room.share.php";
uses("adzone");
$tpl_file = "ads";
$adzone = new Adzones();
$payment = $pdb->GetArray("SELECT id,title FROM {$tb_prefix}payments WHERE available=1");
if (isset($_POST['do'])) {
pb_submit_check('do');
uses("order");
$order = new Orders();
$result = $adzone->read("*", intval($_POST['id']));
if (!empty($result)) {
$data['member_id'] = $the_memberid;
$data['cache_username'] = $memberinfo['username'];
$data['subject'] = $result['name'];
$data['pay_id'] = $_POST['pay_id'];
$data['pay_name'] = $_POST['pay_name'];
$data['total_price'] = $result['price'];
$new_trade_no = $order->Add($data);
if (!empty($_POST['paynow'])) {
//header('Cache-Control: no-cache, no-store, max-age=0, must-revalidate');
pheader("Location:../purchase.php?do=pay&tradeno=" . $new_trade_no);
exit;
示例6: uses
/**
* [PHPB2B] Copyright (C) 2007-2099, Ualink Inc. All Rights Reserved.
* The contents of this file are subject to the License; you may not use this file except in compliance with the License.
*
* @version $Revision: 2075 $
*/
require "../libraries/common.inc.php";
require "room.share.php";
require PHPB2B_ROOT . './libraries/page.class.php';
uses("spread");
$spread = new Spreads();
$page = new Pages();
$tpl_file = "spread";
$conditions = "member_id=" . $the_memberid;
if (isset($_POST['save'])) {
pb_submit_check('save');
$record = $vals = array();
if (isset($_POST['id'])) {
$id = intval($_POST['id']);
}
$vals['keyword_name'] = $_POST['spread']['keyword_name'];
$vals['title'] = $_POST['spread']['title'];
$vals['target_url'] = $_POST['spread']['target_url'];
$vals['content'] = $_POST['spread']['content'];
if (!empty($id)) {
unset($vals['created']);
$updated = $spread->save($vals, "update", $id, null, $conditions);
} else {
$vals['created'] = $time_stamp;
//default one week
$vals['expiration'] = 7 * 86400 + $time_stamp;
示例7: define
/**
* [PHPB2B] Copyright (C) 2007-2099, Ualink Inc. All Rights Reserved.
* The contents of this file are subject to the License; you may not use this file except in compliance with the License.
*
* @version $Revision: 2048 $
*/
define('CURSCRIPT', 'query');
require "../libraries/common.inc.php";
require "../share.inc.php";
uses("product", "member", "message", "typeoption");
$pms = new Messages();
$typeoption = new Typeoption();
$member = new Members();
$product = new Products();
if (isset($_POST['id']) && !empty($_POST['do']) && !empty($_POST['title'])) {
pb_submit_check('inquery');
$vals['type'] = 'inquery';
$vals['title'] = $_POST['title'];
$vals['content'] = implode("<br />", $_POST['inquery']);
$result = $pms->SendToUser($pb_userinfo['pb_username'], $pdb->GetOne("SELECT username FROM {$tb_prefix}members WHERE id=" . intval($_POST['to_member_id'])), $vals);
if (!$result) {
flash("failed", '', 0);
} else {
flash("success", '', 0);
}
}
$pid = intval($_GET['id']);
$sql = "SELECT * FROM {$tb_prefix}products WHERE id=" . $pid;
$res = $pdb->GetRow($sql);
if (empty($res) || !$res) {
flash('data_not_exists', 'product/', 0);
示例8: uses
* [PHPB2B] Copyright (C) 2007-2099, Ualink Inc. All Rights Reserved.
* The contents of this file are subject to the License; you may not use this file except in compliance with the License.
*
* @version $Revision: 2238 $
*/
require "../libraries/common.inc.php";
require "room.share.php";
uses("attachment", "typeoption", "area");
$attachment = new Attachment('photo');
$member = new Members();
$area = new Areas();
$member_controller = new Member();
$typeoption = new Typeoption();
$conditions = null;
if (isset($_POST['save'])) {
pb_submit_check('member');
//exception
if (!$member->checkException($_POST['member'], array('email', 'office_redirect'))) {
flash("sys_error");
}
$vals['office_redirect'] = $_POST['member']['office_redirect'];
$vals['email'] = $_POST['member']['email'];
if (empty($_POST['member']['email'])) {
unset($vals['email']);
}
if (!empty($_FILES['photo']['name'])) {
$attachment->upload_dir = "profile" . DS . gmdate("Y") . gmdate("m") . DS . gmdate("d");
$attachment->insert_new = false;
$attachment->if_orignal = false;
$attachment->if_watermark = false;
$attachment->rename_file = "photo-" . $the_memberid;
示例9: define
<?php
/**
* [PHPB2B] Copyright (C) 2007-2099, Ualink Inc. All Rights Reserved.
* The contents of this file are subject to the License; you may not use this file except in compliance with the License.
*
* @version $Revision: 2098 $
*/
define('CURSCRIPT', 'getpasswd');
require "libraries/common.inc.php";
require "share.inc.php";
require LIB_PATH . "sendmail.inc.php";
uses("member");
$member = new Members();
if (isset($_POST['action'])) {
pb_submit_check("data");
$checked = true;
$login_name = trim($_POST['data']['username']);
$user_email = trim($_POST['data']['email']);
if (!pb_check_email($user_email)) {
setvar("ERRORS", L("wrong_email_format"));
$checked = false;
} else {
$member->setInfoByUserName($login_name);
$member_info = $member->getInfo();
if (!$member_info || empty($member_info)) {
setvar("ERRORS", L('member_not_exists'));
setvar("postLoginName", $login_name);
setvar("postUserEmail", $user_email);
$checked = false;
} elseif (!pb_strcomp($user_email, $member_info['email'])) {
示例10: flash
flash("allow_refresh_day");
}
$vals['submit_time'] = $time_stamp;
$vals['expire_days'] = 1;
$vals['expire_time'] = $time_stamp + 24 * 3600 * $vals['expire_days'];
$conditions[] = "status='1'";
$result = $trade->save($vals, "update", $id, null, $conditions);
if (!$result) {
flash("action_failed");
} else {
flash("success");
}
}
}
if (isset($_POST['do']) && !empty($_POST['data']['trade'])) {
pb_submit_check('data');
$res = $_POST['data']['trade'];
$now_offer_amount = $trade->findCount(null, "created>" . $today_start . " AND member_id=" . $the_memberid);
if (isset($_POST['id'])) {
$id = intval($_POST['id']);
}
if ($g['offer_check']) {
$res['status'] = 0;
$msg = 'msg_wait_check';
} else {
$res['status'] = 1;
$msg = 'success';
}
if (!empty($_FILES['pic']['name'])) {
$attach_id = empty($id) ? "offer-" . $the_memberid . "-" . ($trade->getMaxId() + 1) : "offer-" . $the_memberid . "-" . $id;
$attachment->rename_file = $attach_id;
示例11: inquery
function inquery()
{
global $viewhelper, $pb_userinfo;
using("member", "message", "typeoption");
$typeoption = new Typeoptions();
$member = new Members();
$pms = new Messages();
if (isset($_POST['id']) && !empty($_POST['do']) && !empty($_POST['title'])) {
pb_submit_check('inquery');
$vals['type'] = 'inquery';
$vals['title'] = $_POST['title'];
$vals['content'] = implode("<br />", $_POST['inquery']);
$result = $pms->SendToUser($pb_userinfo['pb_username'], $this->product->dbstuff->GetOne("SELECT username FROM {$this->product->table_prefix}members WHERE id=" . intval($_POST['to_member_id'])), $vals);
if (!$result) {
flash("failed", '', 0);
} else {
flash("success", '', 0);
}
}
$pid = intval($_GET['id']);
$sql = "SELECT * FROM {$this->product->table_prefix}products WHERE id=" . $pid;
$res = $this->product->dbstuff->GetRow($sql);
if (empty($res) || !$res) {
flash('data_not_exists', 'product/', 0);
} else {
if (!empty($res['picture'])) {
$res['imgsmall'] = "attachment/" . $res['picture'] . ".small.jpg";
$res['imgbig'] = "attachment/" . $res['picture'];
$res['image'] = "attachment/" . $res['picture'] . ".small.jpg";
} else {
$res['image'] = pb_get_attachmenturl('', '', 'small');
}
setvar("ImTypes", cache_read("typeoption", "im_type"));
setvar("TelTypes", cache_read("typeoption", "phone_type"));
setvar("item", pb_lang_split_recursive($res));
}
$viewhelper->setTitle($res['name']);
$member_info = $this->product->dbstuff->GetRow("SELECT mf.first_name,mf.last_name,m.email as MemberEmail FROM {$this->product->table_prefix}members m LEFT JOIN {$this->product->table_prefix}memberfields mf ON mf.member_id=m.id WHERE m.id=" . $res['member_id']);
setvar("CompanyUser", $member_info['first_name'] . $member_info['last_name']);
render("product/inquery");
}
示例12: uses
* [PHPB2B] Copyright (C) 2007-2099, Ualink Inc. All Rights Reserved.
* The contents of this file are subject to the License; you may not use this file except in compliance with the License.
*
* @version $Revision: 2154 $
*/
require "../libraries/common.inc.php";
require "room.share.php";
uses("industry", "companyfield");
$industry = new Industries();
$companyfield = new Companyfields();
$tpl_file = "card";
if (empty($companyinfo['name'])) {
flash("pls_complete_company_info", "company.php", 0);
}
if (isset($_POST['save'])) {
pb_submit_check("company");
$vals = array();
$vals['link_man'] = $_POST['company']['link_man'];
$vals['tel'] = $company->getPhone($_POST['data']['telcode'], $_POST['data']['telzone'], $_POST['data']['tel']);
$vals['fax'] = $company->getPhone($_POST['data']['faxcode'], $_POST['data']['faxzone'], $_POST['data']['fax']);
$vals['name'] = strip_tags($_POST['company']['name']);
$vals['mobile'] = strip_tags($_POST['company']['mobile']);
$vals['email'] = $_POST['company']['email'];
$vals['address'] = $_POST['company']['address'];
$company->primaryKey = "id";
if (!empty($_POST['maplocation'])) {
list($longi, $lati) = explode(",", $_POST['maplocation']);
$pdb->Execute("REPLACE INTO {$tb_prefix}companyfields SET company_id=" . $companyinfo['id'] . ",map_longitude='{$longi}',map_latitude='{$lati}'");
}
$result = $company->save($vals, "update", $companyinfo['id']);
if ($result) {
示例13: intval
$id = intval($_GET['id']);
}
if ($do == "edit") {
$company->newCheckStatus($companyinfo['status']);
if (!empty($id)) {
$res = $companynews->read("Companynews.id AS ID,title AS Title,content AS Content,type_id,created AS CreateDate", $id);
setvar("item", $res);
setvar("ShowCaption", "none");
}
$tpl_file = "news_edit";
vtemplate($tpl_file);
exit;
}
}
if (isset($_POST['save'])) {
pb_submit_check('title');
$vals = null;
$vals['title'] = trim($_POST['title']);
$vals['content'] = trim($_POST['content']);
$vals['type_id'] = $_POST['type_id'];
$now_companynews_amount = $companynews->findCount(null, "created>" . $today_start . " AND member_id=" . $the_memberid);
if ($g['companynews_check']) {
$vals['status'] = 0;
$msg = 'msg_wait_check';
} else {
$vals['status'] = 1;
$msg = 'success';
}
if (!empty($_POST['newsid'])) {
$vals['modified'] = $time_stamp;
unset($vals['created']);
示例14: add
function add()
{
global $G;
require CLASS_PATH . "validation.class.php";
$validate = new Validation();
uses("trade", "member", "tradefield", "tag");
$tag = new Tags();
$offer = $tradefield = new Tradefields();
$member = new Members();
$trade = new Trades();
if (isset($_POST['visit_post'])) {
capt_check("capt_post_free");
pb_submit_check('visit_post');
$_POST['data']['trade']['title'] = pb_lang_merge($_POST['data']['multi']);
$trade->setParams();
$tradefield->setParams();
$if_title_exists = $trade->findByTitle($trade->params['data']['trade']['title']);
if (!empty($if_title_exists)) {
$trade->validationErrors[] = L("semilar_offer_post");
}
if (!$validate->notEmpty($trade->params['data']['trade']['title'])) {
$trade->validationErrors[] = L("title_cant_be_empty");
}
$trade->params['expire_days'] = $_POST['expire_days'];
$if_check = $G['setting']['vis_post_check'];
$msg = null;
$words = $trade->dbstuff->GetArray("SELECT * FROM {$trade->table_prefix}words");
if (!empty($words)) {
foreach ($words as $word_val) {
if (!empty($word_val['title'])) {
str_replace($word_val['title'], "***", $trade->params['data']['trade']['title']);
str_replace($word_val['title'], "***", $trade->params['data']['trade']['content']);
}
}
$item['forbid_word'] = implode("\r\n", $tmp_str);
}
if ($if_check) {
$trade->params['data']['trade']['status'] = 0;
$msg = 'pls_wait_for_check';
} else {
$trade->params['data']['trade']['status'] = 1;
$msg = 'success';
}
if (!empty($trade->validationErrors)) {
setvar("item", am($trade->params['data']['trade'], $tradefield->params['data']['tradefield']));
setvar("Errors", $validate->show($trade));
render("offer/post");
} else {
$trade->params['data']['trade']['industry_id'] = implode(",", $_POST['industry']['id']);
$trade->params['data']['trade']['area_id'] = implode(",", $_POST['area']['id']);
$result = $trade->Add();
if ($result) {
flash($msg);
} else {
flash();
}
}
}
}
示例15: define
<?php
/**
* [PHPB2B] Copyright (C) 2007-2099, Ualink Inc. All Rights Reserved.
* The contents of this file are subject to the License; you may not use this file except in compliance with the License.
*
* @version $Revision: 2075 $
*/
define('CURSCRIPT', 'friendlink');
require "libraries/common.inc.php";
require "share.inc.php";
uses("setting", "message", "friendlink");
$pms = new Messages();
$friendlink = new Friendlinks();
$setting = new Settings();
if (isset($_POST['do']) && !empty($_POST['friendlink'])) {
pb_submit_check('friendlink');
$data = $_POST['friendlink'];
$result = false;
$data['status'] = 0;
$data['created'] = $data['modified'] = $time_stamp;
$result = $friendlink->save($data);
if ($result) {
$pms->SendToAdmin('', array("title" => $data['title'] . L("apply_friendlink"), "content" => $data['title'] . L("apply_friendlink") . "\n" . $_POST['data']['email'] . "\n" . $data['description']));
$smarty->flash('wait_apply', URL);
}
}
$viewhelper->setPosition(L("apply_friendlink", "tpl"));
formhash();
render("friendlink");