本文整理汇总了PHP中Security::secure_data方法的典型用法代码示例。如果您正苦于以下问题:PHP Security::secure_data方法的具体用法?PHP Security::secure_data怎么用?PHP Security::secure_data使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Security
的用法示例。
在下文中一共展示了Security::secure_data方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: secureData
/**
* Runs through all str fields class to remove possible problems with linebreaks when used with SQL
*
* @uses Security::secure_data() to do the actual problem fixing
* @return void
*/
private function secureData()
{
foreach ($this->fields as $field => $type) {
if ($type == "str") {
$this->{$field} = Security::secure_data($this->{$field});
}
}
}
示例2: ledigEpost
public static function ledigEpost($epost)
{
global $db;
$sql = "SELECT count(*) FROM " . self::classToTable(get_class()) . " WHERE epost = '" . Security::secure_data($epost) . "' AND epostBekraftad = 1";
return $db->value($sql) == "0" ? true : false;
}
示例3: loadByOrderId
public static function loadByOrderId($id)
{
global $db;
$sql = "SELECT serialize FROM " . self::classToTable(get_class()) . " WHERE orderId = '" . Security::secure_data($id) . "'";
return unserialize($db->value($sql));
}
示例4: setANamn
public function setANamn($aNamn)
{
if ($this->getId()) {
Security::demand(ADMIN);
}
global $db;
$sql = "SELECT count(*) from " . self::classToTable(get_class()) . " WHERE aNamn = '" . Security::secure_data($aNamn) . "'";
if ($this->getId()) {
$sql .= " AND id <> " . $this->getId();
}
if ($db->value($sql) > 0) {
throw new ForetagException("Anv㭤arnamnet 㰠upptaget", -4);
}
$this->aNamn = $aNamn;
}
示例5: harGruppTilltrade
public static function harGruppTilltrade($grupp_id, $fotoalbum_id)
{
global $db;
$sql = $db->query("SELECT * FROM mm_fotoalbumGruppAcl WHERE grupp_id = " . Security::secure_data($grupp_id) . " AND fotoalbum_id = " . $fotoalbum_id);
if (mysql_num_rows($sql) > 0) {
return true;
} else {
return false;
}
}
示例6: listTopMedlemmar
public static function listTopMedlemmar($limit = 10)
{
global $db;
$sql = "SELECT medlem_id, sum(steg) FROM " . self::classToTable(get_class()) . " GROUP BY medlem_id LIMIT " . Security::secure_data($limit) . ";";
$ids = $db->valuesAsArray($sql);
return Medlem::listByIds($ids);
}
示例7: rowById
public static function rowById($id)
{
global $db;
return $db->row("SELECT * FROM mm_fotoalbumbild WHERE id = '" . Security::secure_data($id) . "'");
}