本文整理汇总了PHP中Check::safeText方法的典型用法代码示例。如果您正苦于以下问题:PHP Check::safeText方法的具体用法?PHP Check::safeText怎么用?PHP Check::safeText使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Check
的用法示例。
在下文中一共展示了Check::safeText方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: setLanguage
/**
* void setLanguage(string $value)
*
* @param string $value new value to set
* @return void
* @access public
*/
public function setLanguage($value)
{
$this->_lang = Check::safeText($value);
}
示例2: setCssRules
/**
* void setCssRules(string $value)
*
* @param string $value css rules
* @return void
* @access public
*/
public function setCssRules($value)
{
$this->_cssRules = Check::safeText($value);
}
示例3: urlencode
// to clean previous errors
/**
* Login edits
*/
$errorFound = false;
$loginSession = urlencode(Check::safeText($_POST["login_session"]));
if ($loginSession == "") {
$errorFound = true;
$formError["login_session"] = _("This is a required field.");
}
/**
* Password edits
*/
$pwdSession = Check::safeText($_POST["md5_session"]);
if ($pwdSession == "") {
$pwdSession = Check::safeText($_POST["pwd_session"]);
// JavaScript disabled?
if ($pwdSession == "") {
$errorFound = true;
$formError["pwd_session"] = _("This is a required field.");
} else {
$pwdSession = md5($pwdSession);
// JavaScript disabled!
}
}
if (!isset($formError["pwd_session"])) {
$userQ = new Query_User();
if (!$userQ->existLogin($loginSession)) {
$errorFound = true;
$formError["login_session"] = _("Login unknown.");
$sessLoginAttempts = 1;
示例4: intval
Form::compareToken('../medical/patient_search_form.php');
require_once "../model/Query/History.php";
require_once "../model/Query/Page/Patient.php";
require_once "../model/Query/Relative.php";
// referencial integrity
require_once "../model/Query/DelPatient.php";
require_once "../model/Query/Page/Problem.php";
// referencial integrity
require_once "../model/Query/DelProblem.php";
// referencial integrity
require_once "../model/Query/Page/Record.php";
/**
* Retrieving post vars
*/
$idPatient = intval($_POST["id_patient"]);
$patName = Check::safeText($_POST["name"]);
/**
* Prevent user from aborting script
*/
$oldAbort = ignore_user_abort(true);
/**
* Delete relatives
*/
$relQ = new Query_Relative();
$numRows = $relQ->select($idPatient);
$rel = array();
for ($i = 0; $i < $numRows; $i++) {
$rel[] = $relQ->fetch();
}
$relQ->freeResult();
while ($aux = array_shift($rel)) {
示例5: loginCheck
* @copyright 2002-2008 jact
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL
* @version CVS: $Id: view_source.php,v 1.16 2008/03/23 12:00:28 jact Exp $
* @author jact <jachavar@gmail.com>
*/
/**
* Checking permissions
*/
require_once "../auth/login_check.php";
loginCheck(OPEN_PROFILE_ADMINISTRATOR);
require_once "../lib/Msg.php";
// include HTML.php
/**
* Retrieving get var
*/
$_file = Check::safeText($_GET['file']);
/**
* XHTML Start (XML prolog, DOCTYPE, title page and meta data)
*/
$title = sprintf(_("Source file: %s"), $_file);
require_once "../layout/xhtml_start.php";
echo HTML::start('link', array('rel' => 'stylesheet', 'type' => 'text/css', 'href' => '../css/style.css'), true);
echo HTML::end('head');
$array['id'] = 'viewSource';
if (count($_GET) == 0 || empty($_file)) {
$array['onload'] = 'window.close();';
}
echo HTML::start('body', $array);
if (isset($_SESSION['auth']['is_admin'])) {
if (is_file($_file)) {
highlight_file($_file);
示例6: setFamilyIllness
/**
* void setFamilyIllness(string $value)
*
* @param string $value new value to set
* @return void
* @access public
*/
public function setFamilyIllness($value)
{
$this->_familyIllness = Check::safeText($value);
}
示例7: loginCheck
/**
* Controlling vars
*/
$tab = "admin";
$nav = "staff";
$returnLocation = "../admin/staff_list.php";
/**
* Checking permissions
*/
require_once "../auth/login_check.php";
loginCheck(OPEN_PROFILE_ADMINISTRATOR);
require_once "../lib/Check.php";
/**
* Show page
*/
$memberType = isset($_GET["type"]) ? Check::safeText($_GET["type"]) : "A";
// Administrative by default
switch (strtolower($memberType)) {
case "a":
$title = _("Add New Administrative Information");
$typeValue = OPEN_ADMINISTRATIVE;
break;
case "d":
$title = _("Add New Doctor Information");
$typeValue = OPEN_DOCTOR;
break;
}
$focusFormField = "nif";
// to avoid JavaScript mistakes in demo version
require_once "../layout/header.php";
/**
示例8: setLastUpdateDate
/**
* void setLastUpdateDate(string $value)
*
* @param string $value last update date of the medical problem
* @return void
* @access public
*/
function setLastUpdateDate($value)
{
$this->_lastUpdateDate = Check::safeText($value);
}
示例9: loginCheck
exit;
}
/**
* Checking permissions
*/
require_once "../auth/login_check.php";
loginCheck(OPEN_PROFILE_ADMINISTRATIVE);
require_once "../model/Query/Page/Patient.php";
require_once "../model/Query/Page/Record.php";
/**
* Validate data
*/
$idPatient = intval($_POST["id_patient"]);
$errorLocation = "../medical/patient_edit_form.php?key=" . $idPatient;
// controlling var
$patName = urldecode(Check::safeText($_POST["first_name"] . " " . $_POST["surname1"] . " " . $_POST["surname2"]));
$pat = new Patient();
$pat->setIdPatient($_POST["id_patient"]);
require_once "../medical/patient_validate_post.php";
//$returnLocation = "../medical/patient_view.php?id_patient=" . $idPatient; // controlling var
$returnLocation = "../medical/patient_view.php";
// controlling var
/**
* Destroy form values and errors
*/
Form::unsetSession();
/**
* Prevent user from aborting script
*/
$oldAbort = ignore_user_abort(true);
/**
示例10: header
* Staff member addition process
*
* Licensed under the GNU GPL. For full terms see the file LICENSE.
*
* @package OpenClinic
* @copyright 2002-2007 jact
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL
* @version CVS: $Id: staff_new.php,v 1.20 2007/12/07 16:50:50 jact Exp $
* @author jact <jachavar@gmail.com>
*/
require_once "../config/environment.php";
require_once "../lib/Check.php";
/**
* Controlling vars
*/
$errorLocation = "../admin/staff_new_form.php?type=" . Check::safeText($_GET['type']);
$returnLocation = "../admin/staff_list.php";
/**
* Checking for post vars. Go back to $errorLocation if none found.
*/
if (count($_POST) == 0) {
header("Location: " . $errorLocation);
exit;
}
/**
* Checking permissions
*/
require_once "../auth/login_check.php";
loginCheck(OPEN_PROFILE_ADMINISTRATOR);
/**
* Validate data
示例11: header
if (count($_GET) == 0 || !is_numeric($_GET["id_theme"]) || empty($_GET["name"])) {
header("Location: " . $returnLocation);
exit;
}
/**
* Checking permissions
*/
require_once "../auth/login_check.php";
loginCheck(OPEN_PROFILE_ADMINISTRATOR);
require_once "../lib/Form.php";
require_once "../lib/Check.php";
/**
* Retrieving get vars
*/
$idTheme = intval($_GET["id_theme"]);
$name = Check::safeText($_GET["name"]);
/**
* Show page
*/
$title = _("Delete Theme");
require_once "../layout/header.php";
/**
* Breadcrumb
*/
$links = array(_("Admin") => "../admin/index.php", _("Themes") => $returnLocation, $title => "");
echo HTML::breadcrumb($links, "icon icon_theme");
unset($links);
/**
* Form
*/
echo HTML::start('form', array('method' => 'post', 'action' => '../admin/theme_del.php'));
示例12: setDescription
/**
* void setDescription(string $value)
*
* @param string $value new value to set
* @return void
* @access public
*/
public function setDescription($value)
{
$this->_description = Check::safeText($value);
}
示例13: setDocumentType
/**
* void setDocumentType(string $value)
*
* @param string $value Document Type
* @return void
* @access public
*/
public function setDocumentType($value)
{
//$value = strtolower($value);
$this->_documentType = Check::safeText($value);
}
示例14: header
*
* Contains the function focus
*
* Licensed under the GNU GPL. For full terms see the file LICENSE.
*
* @package OpenClinic
* @copyright 2002-2013 jact
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL
* @version CVS: $Id: focus.php,v 1.3 2013/01/13 14:20:54 jact Exp $
* @author jact <jachavar@gmail.com>
* @since 0.8
*/
require_once "../lib/Check.php";
require_once "../config/i18n.php";
header("Content-Type: text/javascript; charset=" . OPEN_CHARSET);
$field = Check::safeText($_GET['field']);
?>
if (typeof addEvent == 'function')
{
addEvent(window, 'load', focus, false); // event.js included!
}
/**
* void focus(void)
*/
function focus()
{
var field = document.getElementById('<?php
echo $field;
?>
');
示例15: loginCheck
}
/**
* Checking permissions
*/
require_once "../auth/login_check.php";
loginCheck(OPEN_PROFILE_ADMINISTRATOR, false);
// There are not logs in demo version
require_once "../model/Query/Page/Access.php";
require_once "../lib/Form.php";
require_once "../lib/Search.php";
require_once "../lib/Check.php";
/**
* Retrieving get vars
*/
$idUser = intval($_GET["id_user"]);
$login = Check::safeText($_GET["login"]);
$currentPage = isset($_GET["page"]) ? intval($_GET["page"]) : 1;
/**
* Search user accesses
*/
$accessQ = new Query_Page_Access();
$accessQ->setItemsPerPage(OPEN_ITEMS_PER_PAGE);
$accessQ->searchUser($idUser, $currentPage);
if ($accessQ->getRowCount() == 0) {
$accessQ->close();
FlashMsg::add(sprintf(_("No logs for user %s."), $login));
header("Location: " . $returnLocation);
exit;
}
/**
* Show page