本文整理汇总了PHP中slweg函数的典型用法代码示例。如果您正苦于以下问题:PHP slweg函数的具体用法?PHP slweg怎么用?PHP slweg使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了slweg函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: foreach
//
if (count($content["file_list"])) {
foreach ($content["file_list"] as $key => $value) {
if (intval($value)) {
$content["file_list"][$key] = intval($value);
} else {
unset($content["file_list"][$key]);
}
}
if (count($content["file_list"])) {
$content["file_id_list"] = implode(":", $content["file_list"]);
} else {
$content["file_id_list"] = '';
}
}
$content["file_descr"] = explode("\n", slweg($_POST["cfile_descr"], 0, false));
//
// now check if there are more settings for each file - explode by |
//
// [0] = normal file description like before
// [1] = name the file (it's not the file name)
// [2] = title
// [3] = target (where to open a new file -> default is _blank even if empty
// [4] = if it is an image try to show a thumbnail instead of the file icon -> here thumbnail WIDTHxHEIGHT
if (count($content["file_descr"])) {
foreach ($content["file_descr"] as $key => $value) {
$value = explode('|', $value, 5);
$value[0] = trim($value[0], ' ');
$value[1] = empty($value[1]) ? '' : trim($value[1]);
$value[2] = empty($value[2]) ? '' : trim($value[2]);
$value[3] = empty($value[3]) ? '' : trim($value[3]);
示例2: die
**/
// ----------------------------------------------------------------
// obligate check for phpwcms constants
if (!defined('PHPWCMS_ROOT')) {
die("You Cannot Access This Script Directly, Have a Nice Day.");
}
// ----------------------------------------------------------------
// try
if (isset($_GET['edit'])) {
$glossary['id'] = intval($_GET['edit']);
} else {
$glossary['id'] = 0;
}
// process post form
if (isset($_POST['glossary_title'])) {
$glossary['data'] = array('glossary_id' => intval($_POST['glossary_id']), 'glossary_title' => clean_slweg($_POST['glossary_title']), 'glossary_created' => date('Y-m-d H:i:s'), 'glossary_changed' => date('Y-m-d H:i:s'), 'glossary_tag' => clean_slweg($_POST['glossary_tag']), 'glossary_keyword' => clean_slweg($_POST['glossary_keyword']), 'glossary_text' => slweg($_POST['glossary_text']), 'glossary_object' => array(), 'glossary_status' => empty($_POST['glossary_status']) ? 0 : 1, 'glossary_highlight' => empty($_POST['glossary_highlight']) ? 0 : 1);
if (empty($glossary['data']['glossary_title'])) {
$glossary['error']['glossary_title'] = 1;
}
if (empty($glossary['data']['glossary_keyword'])) {
$glossary['error']['glossary_keyword'] = 1;
} else {
$sql = 'SELECT COUNT(*) FROM ' . DB_PREPEND . "phpwcms_glossary ";
$sql .= "WHERE glossary_keyword LIKE '" . aporeplace($glossary['data']['glossary_keyword']);
$sql .= "' AND glossary_id <> " . $glossary['data']['glossary_id'];
if (_dbQuery($sql, 'COUNT')) {
$glossary['error']['glossary_keyword'] = 1;
}
}
if (!isset($glossary['error'])) {
if ($glossary['data']['glossary_id']) {
示例3: implode
} else {
$_temp = '';
}
$plugin['data']['shopprod_size'] = $_temp . implode(LF, $plugin['data']['shopprod_size']);
$plugin['data']['shopprod_color'] = explode(LF, $plugin['data']['shopprod_color']);
if (count($plugin['data']['shopprod_color']) > 3) {
$_temp = array_shift($plugin['data']['shopprod_color']) . LF;
natsort($plugin['data']['shopprod_color']);
} else {
$_temp = '';
}
$plugin['data']['shopprod_color'] = $_temp . implode(LF, $plugin['data']['shopprod_color']);
$plugin['data']['shopprod_netgross'] = empty($_POST['shopprod_netgross']) ? 0 : 1;
//0 = net, 1 = gross
$plugin['data']['shopprod_description0'] = slweg($_POST['shopprod_description0']);
$plugin['data']['shopprod_description1'] = slweg($_POST['shopprod_description1']);
$plugin['data']['shopprod_description2'] = clean_slweg($_POST['shopprod_description2']);
$plugin['data']['shopprod_description3'] = clean_slweg($_POST['shopprod_description3']);
$plugin['data']['shopprod_url'] = clean_slweg($_POST['shopprod_url']);
// Shop product language
$plugin['data']['shopprod_lang'] = empty($_POST['shopprod_lang']) ? '' : strtolower(clean_slweg($_POST['shopprod_lang']));
$plugin['data']['shopprod_status'] = empty($_POST['shopprod_status']) ? 0 : 1;
$plugin['data']['shopprod_listall'] = empty($_POST['shopprod_listall']) ? 0 : 1;
$plugin['data']['shopprod_overwrite_meta'] = empty($_POST['shopprod_overwrite_meta']) ? 0 : 1;
$plugin['data']['shopprod_opengraph'] = empty($_POST['shopprod_opengraph']) ? 0 : 1;
$plugin['data']['shopprod_category'] = isset($_POST['shopprod_category']) && is_array($_POST['shopprod_category']) ? $_POST['shopprod_category'] : array();
if (!$plugin['data']['shopprod_name1']) {
$plugin['error']['shopprod_name1'] = 'No name';
}
if (!$plugin['data']['shopprod_ordernumber']) {
$plugin['error']['shopprod_ordernumber'] = 'No order number';
示例4: die
die("You Cannot Access This Script Directly, Have a Nice Day.");
}
// ----------------------------------------------------------------
$new_login = genlogname();
$new_password = generic_string(8);
$new_email = '';
$new_name = '';
$set_user_aktiv = 0;
$set_user_admin = 0;
$set_user_fe = 0;
$send_verification = 1;
$user_err = '';
if (isset($_POST["form_aktion"]) && $_POST["form_aktion"] == "create_account") {
//Create Account Daten verarbeiten
$new_login = slweg($_POST["form_newloginname"]);
$new_password = slweg($_POST["form_newpassword"]);
$new_email = clean_slweg($_POST["form_newemail"]);
$new_name = clean_slweg($_POST["form_newrealname"]);
$set_user_aktiv = isset($_POST["form_active"]) ? 1 : 0;
$set_user_admin = isset($_POST["form_admin"]) ? 1 : 0;
$set_user_fe = isset($_POST["form_feuser"]) ? intval($_POST["form_feuser"]) : 0;
if ($set_user_admin) {
$set_user_fe = 2;
}
$send_verification = isset($_POST["verification_email"]) ? 1 : 0;
if (isEmpty($new_login)) {
$user_err = $BL['be_admin_usr_err2'] . "\n";
} else {
$sql = "SELECT COUNT(*) AS anzahl FROM " . DB_PREPEND . "phpwcms_user WHERE usr_login='" . aporeplace($new_login) . "'";
if ($result = mysql_query($sql, $db)) {
if ($check_anzahl = mysql_fetch_array($result)) {
示例5: die
**/
// ----------------------------------------------------------------
// obligate check for phpwcms constants
if (!defined('PHPWCMS_ROOT')) {
die("You Cannot Access This Script Directly, Have a Nice Day.");
}
// ----------------------------------------------------------------
// try
if (isset($_GET['edit'])) {
$plugin['id'] = intval($_GET['edit']);
} else {
$plugin['id'] = 0;
}
// process post form
if (isset($_POST['adplace_title'])) {
$plugin['data'] = array('adplace_id' => intval($_POST['adplace_id']), 'adplace_title' => clean_slweg($_POST['adplace_title']), 'adplace_created' => date('Y-m-d H:i:s'), 'adplace_changed' => date('Y-m-d H:i:s'), 'adplace_status' => empty($_POST['adplace_status']) ? 0 : 1, 'adplace_format' => intval($_POST['adplace_format']), 'adplace_width' => intval($_POST['adplace_width']), 'adplace_height' => intval($_POST['adplace_height']), 'adplace_prefix' => slweg($_POST['adplace_prefix']), 'adplace_suffix' => slweg($_POST['adplace_suffix']));
if (empty($plugin['data']['adplace_title'])) {
$plugin['error']['adplace_title'] = 1;
}
if (empty($plugin['data']['adplace_format'])) {
$plugin['error']['adplace_format'] = 1;
}
if (!isset($plugin['error'])) {
if ($plugin['data']['adplace_id']) {
// UPDATE
$sql = 'UPDATE ' . DB_PREPEND . 'phpwcms_ads_place SET ';
$sql .= "adplace_changed='" . aporeplace($plugin['data']['adplace_changed']) . "', ";
$sql .= "adplace_status=" . $plugin['data']['adplace_status'] . ", ";
$sql .= "adplace_title='" . aporeplace($plugin['data']['adplace_title']) . "', ";
$sql .= "adplace_format=" . $plugin['data']['adplace_format'] . ", ";
$sql .= "adplace_width=" . $plugin['data']['adplace_width'] . ", ";
示例6: isset
// Content Type Reference
$content['reference']["list"] = isset($_POST["cimage_list"]) ? $_POST["cimage_list"] : array();
$content['reference']["width"] = intval($_POST["creference_width"]) ? intval($_POST["creference_width"]) : '';
$content['reference']["height"] = intval($_POST["creference_height"]) ? intval($_POST["creference_height"]) : '';
$content['reference']["blockwidth"] = intval($_POST["creference_blockwidth"]) ? intval($_POST["creference_blockwidth"]) : '';
$content['reference']["blockheight"] = intval($_POST["creference_blockheight"]) ? intval($_POST["creference_blockheight"]) : '';
$temp_width = $content['reference']["width"];
$temp_height = $content['reference']["height"];
$content['reference']["space"] = intval($_POST["creference_space"]);
$content['reference']["pos"] = intval($_POST["creference_pos"]);
$content['reference']["border"] = intval($_POST["creference_border"]);
$content['reference']["listborder"] = intval($_POST["creference_listborder"]);
$content['reference']["basis"] = intval($_POST["creference_basis"]);
$content['reference']["caption"] = clean_slweg($_POST["creference_caption"]);
$content['reference']["zoom"] = isset($_POST["creference_zoom"]) ? intval($_POST["creference_zoom"]) : 0;
$content['reference']["text"] = html_specialchars(slweg($_POST["creference_text"]));
$content['reference']["tmpl"] = clean_slweg($_POST["creference_tmpl"]);
$content['reference']['showlist'] = 0;
if (is_array($content['reference']["list"]) && count($content['reference']["list"])) {
$img_sql = "SELECT * FROM " . DB_PREPEND . "phpwcms_file WHERE (";
$imgx = 0;
foreach ($content['reference']["list"] as $key => $value) {
unset($content['reference']["list"][$key]);
$content['reference']["list"][$key]['img_id'] = intval($value);
if ($imgx) {
$img_sql .= " OR ";
}
$img_sql .= "f_id=" . $content['reference']["list"][$key]['img_id'];
$imgx++;
}
$img_sql .= ");";
示例7: str_replace
CONTENT IMAGELIST</strong></a><br />
4) <a href="upgrade_articleimg.php" target="_blank"><strong>UPGRADE ARTICLE
SUMMARY IMAGE</strong></a></p>
<h1>When upgrading from releases older than 1.2.9:</h1>
<p>5) <a href="upgrade_pagelayout.php" target="_blank"><strong>UPGRADE PAGELAYOUT</strong></a></p>
<h1>When upgrading from releases older than 1.3.1:</h1>
<p>6) <a href="upgrade_multimedia.php" target="_blank"><strong>UPGRADE CONTENT PART MULTIMEDIA</strong></a></p>
<p>7) <a href="upgrade_articlealias.php" target="_blank"><strong>UPDATE ARTICLE ALIAS</strong></a></p>
<h1>Update old default article end date 2010-12-31, 23:59:59:</h1>
<p>8) <a href="upgrade_articledate.php" target="_blank"><strong>SET ARTICLE END 2010-12-31, 23:59:59 plus 20 YEARS</strong></a></p>
<?php
$do = 0;
if (isset($_POST['sqlfile']) && isset($_GET["do"]) && $_GET["do"] == "upgrade") {
$file = str_replace('inc/showsql.php?f=', '', slweg($_POST['sqlfile']));
if (file_exists("update_sql/" . $file)) {
$do = 1;
}
}
if ($do) {
@mysql_query('SET storage_engine=MYISAM', $db);
if ($phpwcms['db_version'] > 40100) {
$value = "SET SQL_MODE='NO_AUTO_VALUE_ON_ZERO'";
@mysql_query($value, $db);
$value = "SET NAMES '" . $phpwcms['db_charset'] . "'" . (empty($phpwcms['db_collation']) ? '' : " COLLATE '" . $phpwcms['db_collation'] . "'");
@mysql_query($value, $db);
}
$sql_data = read_textfile("update_sql/" . $file);
$sql_data = preg_replace("/#.*.\n/", "", $sql_data);
$sql_data = preg_replace("/ `phpwcms/", " `" . DB_PREPEND . "phpwcms", $sql_data);
示例8: slweg
$new_password = slweg($_POST["form_password"]);
if (strlen($new_password) < 5) {
$err .= str_replace('{VAL}', strlen($new_password), $BL['be_profile_account_err2']) . "\n";
}
}
} else {
$err .= $BL['be_profile_account_err3'] . "\n";
}
$new_email = slweg(trim($_POST["form_useremail"]));
if ($new_email != $_SESSION["wcs_user_email"]) {
if (!is_valid_email($new_email)) {
$err .= str_replace('{VAL}', html($new_email), $BL['be_profile_account_err4']) . "\n";
}
}
if ($_POST["form_lang"]) {
$new_language = slweg(trim($_POST["form_lang"]));
} else {
$new_language = $phpwcms["default_lang"];
}
$new_wysiwyg = empty($_POST['form_wysiwyg']) ? 0 : intval($_POST['form_wysiwyg']);
$user_var['template'] = empty($_POST['form_wysiwyg_template']) ? '' : clean_slweg($_POST['form_wysiwyg_template']);
if (isset($_POST['profile_cp_total'])) {
$profile_cp_total = intval($_POST['profile_cp_total']);
$profile_account_cp_total = isset($_POST['profile_account_cp']) && is_array($_POST['profile_account_cp']) ? count($_POST['profile_account_cp']) : 0;
if (!$profile_account_cp_total || $profile_account_cp_total === $profile_cp_total) {
$user_var['selected_cp'] = array();
} else {
$user_var['selected_cp'] = array();
foreach ($_POST['profile_account_cp'] as $cp) {
$cp = intval($cp);
$user_var['selected_cp'][$cp] = $cp;
示例9: clean_slweg
}
$phpwcms['SMTP_HOST'] = clean_slweg($_POST["smtp_host"]);
if (!$phpwcms['SMTP_HOST']) {
$phpwcms['SMTP_HOST'] = 'localhost';
}
$phpwcms['SMTP_PORT'] = intval($_POST["smtp_port"]);
if (!$phpwcms['SMTP_PORT']) {
$phpwcms['SMTP_PORT'] = 25;
}
$phpwcms['SMTP_MAILER'] = clean_slweg($_POST["smtp_mailer"]);
if (!$phpwcms['SMTP_MAILER']) {
$phpwcms['SMTP_MAILER'] = 'mail';
}
$phpwcms['SMTP_AUTH'] = empty($_POST["smtp_auth"]) ? 0 : 1;
$phpwcms['SMTP_USER'] = slweg($_POST["smtp_user"]);
$phpwcms['SMTP_PASS'] = slweg($_POST["smtp_pass"]);
$phpwcms['SMTP_SECURE'] = clean_slweg($_POST["smtp_secure"]);
write_conf_file($phpwcms);
if (!empty($_POST["admin_create"])) {
$db = mysql_connect($phpwcms["db_host"], $phpwcms["db_user"], $phpwcms["db_pass"]);
mysql_select_db($phpwcms["db_table"], $db);
mysql_query("SET NAMES '" . $phpwcms["charset"] . "'", $db);
$phpwcms["db_prepend"] = $phpwcms["db_prepend"] ? $phpwcms["db_prepend"] . "_" : "";
$sql = "INSERT INTO " . $phpwcms["db_prepend"] . "phpwcms_user (usr_login, usr_pass, usr_email, " . "usr_admin, usr_aktiv, usr_name, usr_fe, usr_wysiwyg ) VALUES ('" . aporeplace($phpwcms["admin_user"]) . "', '" . aporeplace(md5($phpwcms["admin_pass"])) . "', '" . aporeplace($phpwcms["admin_email"]) . "', 1, 1, '" . aporeplace($phpwcms['SMTP_FROM_NAME']) . "', 2, 2);";
mysql_query($sql, $db) or $err = 1;
}
if (!$err) {
header("Location: setup.php?step=3");
exit;
}
}
示例10: die
<?php
/**
* phpwcms content management system
*
* @author Oliver Georgi <og@phpwcms.org>
* @copyright Copyright (c) 2002-2015, Oliver Georgi
* @license http://opensource.org/licenses/GPL-2.0 GNU GPL-2
* @link http://www.phpwcms.de
*
**/
// ----------------------------------------------------------------
// obligate check for phpwcms constants
if (!defined('PHPWCMS_ROOT')) {
die("You Cannot Access This Script Directly, Have a Nice Day.");
}
// ----------------------------------------------------------------
// Content Type Code
$content["code"] = slweg($_POST["ccode"], 0, false);
// do not trim
$content["template"] = clean_slweg($_POST['template']);
示例11: define
define('FELOGIN_ERROR_WRONG_PASS', empty($FELOGIN['FELOGIN_ERROR_WRONG_PASS']) ? 'Wrong password' : $FELOGIN['FELOGIN_ERROR_WRONG_PASS']);
}
}
// check if we are in right section
if (defined('FELOGIN_LEVEL_DEPTH') && isset($LEVEL_ID[FELOGIN_LEVEL_DEPTH]) && $LEVEL_ID[FELOGIN_LEVEL_DEPTH] == FELOGIN_LEVEL_ID) {
if (isset($_GET['logout']) && $_GET['logout'] == FELOGIN_LOGOUT_GET_VALUE) {
unset($_SESSION['FELOGIN_IS_LOGGED'], $_SESSION['FELOGIN_USER_NAME']);
headerRedirect(PHPWCMS_URL . 'index.php' . (isset($LEVEL_ID[FELOGIN_CHILD_LEVEL]) ? '?id=' . $LEVEL_ID[FELOGIN_CHILD_LEVEL] : ''), 401);
}
$FELOGIN_ERROR = array();
if (isset($LEVEL_ID[FELOGIN_CHILD_LEVEL]) && isset($FELOGIN[$LEVEL_ID[FELOGIN_CHILD_LEVEL]])) {
$FELOGIN = $FELOGIN[$LEVEL_ID[FELOGIN_CHILD_LEVEL]];
// OK, user is trying to login
if (isset($_POST['feSubmit'])) {
$FELOGIN_USER_NAME = empty($_POST['feLogin']) ? '' : slweg($_POST['feLogin']);
$FELOGIN_USER_PASS = empty($_POST['fePassword']) ? '' : slweg($_POST['fePassword']);
if (empty($FELOGIN_USER_NAME)) {
$FELOGIN_ERROR[] = FELOGIN_ERROR_EMPTY_USER;
unset($_SESSION['FELOGIN_IS_LOGGED'], $_SESSION['FELOGIN_USER_NAME']);
} elseif (!isset($FELOGIN[$FELOGIN_USER_NAME])) {
$FELOGIN_ERROR[] = FELOGIN_ERROR_UNKNOWN_USER;
unset($_SESSION['FELOGIN_IS_LOGGED'], $_SESSION['FELOGIN_USER_NAME']);
} else {
$_SESSION['FELOGIN_USER_NAME'] = $FELOGIN_USER_NAME;
if (empty($FELOGIN_USER_PASS)) {
$FELOGIN_ERROR[] = FELOGIN_ERROR_EMPTY_PASS;
unset($_SESSION['FELOGIN_IS_LOGGED']);
} elseif ($FELOGIN[$FELOGIN_USER_NAME] !== $FELOGIN_USER_PASS) {
$FELOGIN_ERROR[] = FELOGIN_ERROR_WRONG_PASS;
unset($_SESSION['FELOGIN_IS_LOGGED']);
} else {
示例12: die
* @author Oliver Georgi <og@phpwcms.org>
* @copyright Copyright (c) 2002-2015, Oliver Georgi
* @license http://opensource.org/licenses/GPL-2.0 GNU GPL-2
* @link http://www.phpwcms.de
*
**/
// ----------------------------------------------------------------
// obligate check for phpwcms constants
if (!defined('PHPWCMS_ROOT')) {
die("You Cannot Access This Script Directly, Have a Nice Day.");
}
// ----------------------------------------------------------------
$plugin['id'] = isset($_GET['edit']) ? intval($_GET['edit']) : 0;
// process post form
if (isset($_POST['calendar_title'])) {
$plugin['data'] = array('calendar_id' => intval($_POST['calendar_id']), 'calendar_title' => clean_slweg($_POST['calendar_title']), 'calendar_created' => date('Y-m-d H:i:s'), 'calendar_changed' => date('Y-m-d H:i:s'), 'calendar_tag' => clean_slweg($_POST['calendar_tag']), 'calendar_lang' => isset($_POST['calendar_lang']) ? preg_replace('/[^a-z\\-]/', '', strtolower($_POST['calendar_lang'])) : '', 'calendar_teaser' => clean_slweg($_POST['calendar_teaser']), 'calendar_text' => slweg($_POST['calendar_text']), 'calendar_object' => array(), 'calendar_status' => empty($_POST['calendar_status']) ? 0 : 1, 'calendar_start_date' => clean_slweg($_POST['calendar_start_date']), 'calendar_start_time' => clean_slweg($_POST['calendar_start_time']), 'calendar_end_date' => clean_slweg($_POST['calendar_end_date']), 'calendar_end_time' => clean_slweg($_POST['calendar_end_time']), 'calendar_allday' => empty($_POST['calendar_allday']) ? 0 : 1, 'calendar_range' => intval($_POST['calendar_range']), 'calendar_where' => clean_slweg($_POST['calendar_where']), 'calendar_refid' => clean_slweg($_POST['calendar_refid']), 'calendar_duplicate' => empty($_POST['calendar_duplicate']) ? 0 : 1, 'calendar_rangestart' => clean_slweg($_POST['calendar_range_start']), 'calendar_rangeend' => clean_slweg($_POST['calendar_range_end']), 'calendar_image' => array('id' => intval($_POST['cnt_image_id']), 'name' => clean_slweg($_POST['cnt_image_name']), 'zoom' => empty($_POST['cnt_image_zoom']) ? 0 : 1, 'lightbox' => empty($_POST['cnt_image_lightbox']) ? 0 : 1, 'caption' => clean_slweg($_POST['cnt_image_caption']), 'link' => clean_slweg($_POST['cnt_image_link'])));
if ($plugin['data']['calendar_range'] > 7) {
$plugin['data']['calendar_range'] = 0;
}
if (!$plugin['data']['calendar_range']) {
$plugin['data']['calendar_rangestart'] = $plugin['data']['calendar_start_date'];
$plugin['data']['calendar_rangeend'] = $plugin['data']['calendar_end_date'];
}
// clean up date/time
include_once $phpwcms['modules'][$module]['path'] . 'inc/processing.datetime.inc.php';
if (empty($plugin['data']['calendar_title'])) {
$plugin['error']['calendar_title'] = 1;
}
if (!isset($glossary['error'])) {
if ($plugin['data']['calendar_duplicate']) {
$plugin['data']['calendar_id'] = 0;
示例13: die
* @author Oliver Georgi <og@phpwcms.org>
* @copyright Copyright (c) 2002-2015, Oliver Georgi
* @license http://opensource.org/licenses/GPL-2.0 GNU GPL-2
* @link http://www.phpwcms.de
*
**/
// ----------------------------------------------------------------
// obligate check for phpwcms constants
if (!defined('PHPWCMS_ROOT')) {
die("You Cannot Access This Script Directly, Have a Nice Day.");
}
// ----------------------------------------------------------------
// recipe
$content['recipe'] = array();
$content['recipe']['preparation'] = slweg($_POST['recipe_preparation']);
$content['recipe']['calorificvalue'] = intval($_POST['recipe_calorificvalue']);
$content['recipe']['calorificvalue_add'] = slweg($_POST['recipe_calorificvalue_add']);
$content['recipe']['ingredients'] = clean_slweg($_POST['recipe_ingredients']);
$content['recipe']['time'] = intval($_POST['recipe_time']);
$content['recipe']['time_add'] = slweg($_POST['recipe_time_add']);
$content['recipe']['category'] = clean_slweg($_POST['recipe_category']);
$content['recipe']['severity'] = intval($_POST['recipe_severity']);
$content['recipe']['template'] = clean_slweg($_POST['recipe_template']);
if ($content['recipe']['severity'] < 1) {
$content['recipe']['severity'] = 1;
} elseif ($content['recipe']['severity'] > 5) {
$content['recipe']['severity'] = 5;
}
$content['recipe']['category'] = convertStringToArray($content['recipe']['category']);
$content['recipe']['category'] = implode(', ', $content['recipe']['category']);
$content['recipe_search'] = optimizeForSearch($content['recipe']['preparation'], $content['recipe']['ingredients'], $content['recipe']['calorificvalue_add'], $content['recipe']['time_add'], $content['recipe']['category']);
示例14: strip_tags
}
}
}
}
//Get signature value of user
if ($result = mysql_query("SELECT detail_signature FROM " . DB_PREPEND . "phpwcms_userdetail WHERE detail_pid=" . $_SESSION["wcs_user_id"] . " LIMIT 1;")) {
if ($row = mysql_fetch_row($result)) {
if (trim($row[0])) {
$msg_message = "\n\n\t\n" . $row[0] . $msg_message;
}
}
}
if (isset($_POST['msg_send_aktion']) && intval($_POST['msg_send_aktion'])) {
$msg_subject = strip_tags(slweg(trim($_POST["msg_send_subject"])));
$msg_message = strip_tags(slweg($_POST["msg_send_msg"]));
$msg_to = slweg(trim($_POST["msg_send_receiver"]));
$msg_pid = intval($_POST['msg_send_pid']);
if (str_empty($msg_to)) {
$msg_err .= "- " . $BL['be_msg_err1'] . "\n";
}
if (str_empty($msg_subject)) {
$msg_err .= "- " . $BL['be_msg_err2'] . "\n";
}
if (str_empty($msg_message)) {
$msg_err .= "- " . $BL['be_msg_err3'] . "\n";
}
if (str_empty($msg_err)) {
//send message routine
$msg_receivers = explode(":", $msg_to);
foreach ($msg_receivers as $value) {
$sql = "INSERT INTO " . DB_PREPEND . "phpwcms_message (" . "msg_pid, msg_uid, msg_subject, msg_text, msg_to, msg_from) VALUES (" . $msg_pid . "," . intval($value) . ",'" . aporeplace($msg_subject) . "','" . aporeplace($msg_message) . "','" . aporeplace($msg_to) . "'," . $_SESSION["wcs_user_id"] . ");";
示例15: die
<?php
/**
* phpwcms content management system
*
* @author Oliver Georgi <og@phpwcms.org>
* @copyright Copyright (c) 2002-2015, Oliver Georgi
* @license http://opensource.org/licenses/GPL-2.0 GNU GPL-2
* @link http://www.phpwcms.de
*
**/
// ----------------------------------------------------------------
// obligate check for phpwcms constants
if (!defined('PHPWCMS_ROOT')) {
die("You Cannot Access This Script Directly, Have a Nice Day.");
}
// ----------------------------------------------------------------
// Content Type WYSIWYG HTML
$content["html"] = slweg($_POST["chtml"]);
$content["template"] = clean_slweg($_POST['template']);