本文整理汇总了PHP中phpentities函数的典型用法代码示例。如果您正苦于以下问题:PHP phpentities函数的具体用法?PHP phpentities怎么用?PHP phpentities使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了phpentities函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: dbquery
} else {
$result = dbquery("SELECT\n\t\t\tts.submit_datestamp, ts.submit_criteria, tu.user_id, tu.user_name, tu.user_avatar, tu.user_status\n\t\t\tFROM " . DB_SUBMISSIONS . " ts\n\t\t\tLEFT JOIN " . DB_USERS . " tu ON ts.submit_user=tu.user_id\n\t\t\tWHERE submit_type='n' order by submit_datestamp desc");
if (dbrows($result) > 0) {
$data = dbarray($result);
$submit_criteria = unserialize($data['submit_criteria']);
$callback_data = array("news_start" => $data['submit_datestamp'], "news_datestamp" => $data['submit_datestamp'], "news_keywords" => $submit_criteria['news_keywords'], "news_visibility" => 0, "news_image" => $submit_criteria['news_image'], "news_image_t1" => $submit_criteria['news_image_t1'], "news_image_t2" => $submit_criteria['news_image_t2'], "news_ialign" => $submit_criteria['news_ialign'], "news_end" => "", "news_draft" => 0, "news_sticky" => 0, "news_language" => $submit_criteria['news_language'], "news_subject" => $submit_criteria['news_subject'], "news_cat" => $submit_criteria['news_cat'], "news_news" => phpentities(stripslashes($submit_criteria['news_snippet'])), "news_extended" => phpentities(stripslashes($submit_criteria['news_body'])), "news_breaks" => fusion_get_settings("tinyce_enabled") ? TRUE : FALSE);
add_to_title($locale['global_200'] . $locale['503'] . $locale['global_201'] . $callback_data['news_subject'] . "?");
if (isset($_POST['preview'])) {
$news_news = "";
if ($_POST['news_news']) {
$news_news = phpentities(stripslash($_POST['news_news']));
$news_news = str_replace("src='" . str_replace("../", "", IMAGES_N), "src='" . IMAGES_N, stripslash($_POST['news_news']));
}
$news_extended = "";
if ($_POST['news_extended']) {
$news_extended = phpentities(stripslash($_POST['news_extended']));
$news_extended = str_replace("src='" . str_replace("../", "", IMAGES_N), "src='" . IMAGES_N, stripslash($_POST['news_extended']));
}
$callback_data = array("news_subject" => form_sanitizer($_POST['news_subject'], '', 'news_subject'), "news_cat" => isnum($_POST['news_cat']) ? $_POST['news_cat'] : 0, "news_language" => form_sanitizer($_POST['news_language'], '', 'news_language'), "news_news" => form_sanitizer($news_news, "", "news_news"), "news_extended" => form_sanitizer($news_extended, "", "news_extended"), "news_keywords" => form_sanitizer($_POST['news_keywords'], '', 'news_keywords'), "news_start" => isset($_POST['news_start']) && $_POST['news_start'] ? $_POST['news_start'] : '', "news_end" => isset($_POST['news_end']) && $_POST['news_end'] ? $_POST['news_end'] : '', "news_visibility" => isnum($_POST['news_visibility']) ? $_POST['news_visibility'] : "0", "news_draft" => isset($_POST['news_draft']) ? TRUE : FALSE, "news_sticky" => isset($_POST['news_sticky']) ? TRUE : FALSE, "news_datestamp" => $callback_data['news_datestamp'], "news_ialign" => isset($_POST['news_ialign']) ? $_POST['news_ialign'] : '', "news_image" => isset($_POST['news_image']) ? $_POST['news_image'] : '', "news_image_t1" => isset($_POST['news_image_t1']) ? $_POST['news_image_t1'] : "", "news_image_t2" => isset($_POST['news_image_t2']) ? $_POST['news_image_t2'] : "");
$callback_data['news_breaks'] = "";
if (isset($_POST['news_breaks'])) {
$callback_data['news_breaks'] = TRUE;
$callback_data['news_news'] = nl2br($callback_data['news_news']);
if ($callback_data['news_extended']) {
$callback_data['news_extended'] = nl2br($callback_data['news_extended']);
}
}
if (defender::safe()) {
echo openmodal('news_preview', $locale['news_0141']);
echo "<h3>" . $callback_data['news_subject'] . "</h3>\n";
echo $callback_data['news_news'];
示例2: dbquery
} else {
$result = dbquery("SELECT\n\t\t\tts.submit_datestamp, ts.submit_criteria, tu.user_id, tu.user_name, tu.user_avatar, tu.user_status\n\t\t\tFROM " . DB_SUBMISSIONS . " ts\n\t\t\tLEFT JOIN " . DB_USERS . " tu ON ts.submit_user=tu.user_id\n\t\t\tWHERE submit_type='b' order by submit_datestamp desc");
if (dbrows($result) > 0) {
$data = dbarray($result);
$submit_criteria = unserialize($data['submit_criteria']);
$callback_data = array("blog_start" => $data['submit_datestamp'], "blog_datestamp" => $data['submit_datestamp'], "blog_keywords" => $submit_criteria['blog_keywords'], "blog_visibility" => 0, "blog_image" => $submit_criteria['blog_image'], "blog_image_t1" => $submit_criteria['blog_image_t1'], "blog_image_t2" => $submit_criteria['blog_image_t2'], "blog_ialign" => $submit_criteria['blog_ialign'], "blog_end" => "", "blog_draft" => 0, "blog_sticky" => 0, "blog_language" => $submit_criteria['blog_language'], "blog_subject" => $submit_criteria['blog_subject'], "blog_cat" => $submit_criteria['blog_cat'], "blog_blog" => phpentities(stripslashes($submit_criteria['blog_blog'])), "blog_extended" => phpentities(stripslashes($submit_criteria['blog_body'])), "blog_breaks" => fusion_get_settings("tinyce_enabled") ? TRUE : FALSE);
add_to_title($locale['global_200'] . $locale['503'] . $locale['global_201'] . $callback_data['blog_subject'] . "?");
if (isset($_POST['preview'])) {
$blog_blog = "";
if ($_POST['blog_blog']) {
$blog_blog = phpentities(stripslash($_POST['blog_blog']));
$blog_blog = str_replace("src='" . str_replace("../", "", IMAGES_B), "src='" . IMAGES_B, stripslash($_POST['blog_blog']));
}
$blog_extended = "";
if ($_POST['blog_extended']) {
$blog_extended = phpentities(stripslash($_POST['blog_extended']));
$blog_extended = str_replace("src='" . str_replace("../", "", IMAGES_B), "src='" . IMAGES_B, stripslash($_POST['blog_extended']));
}
$callback_data = array("blog_subject" => form_sanitizer($_POST['blog_subject'], '', 'blog_subject'), "blog_cat" => isnum($_POST['blog_cat']) ? $_POST['blog_cat'] : 0, "blog_language" => form_sanitizer($_POST['blog_language'], '', 'blog_language'), "blog_blog" => form_sanitizer($blog_blog, "", "blog_blog"), "blog_extended" => form_sanitizer($blog_extended, "", "blog_extended"), "blog_keywords" => form_sanitizer($_POST['blog_keywords'], '', 'blog_keywords'), "blog_start" => isset($_POST['blog_start']) && $_POST['blog_start'] ? $_POST['blog_start'] : '', "blog_end" => isset($_POST['blog_end']) && $_POST['blog_end'] ? $_POST['blog_end'] : '', "blog_visibility" => isnum($_POST['blog_visibility']) ? $_POST['blog_visibility'] : "0", "blog_draft" => isset($_POST['blog_draft']) ? TRUE : FALSE, "blog_sticky" => isset($_POST['blog_sticky']) ? TRUE : FALSE, "blog_datestamp" => $callback_data['blog_datestamp'], "blog_ialign" => isset($_POST['blog_ialign']) ? $_POST['blog_ialign'] : '', "blog_image" => isset($_POST['blog_image']) ? $_POST['blog_image'] : '', "blog_image_t1" => isset($_POST['blog_image_t1']) ? $_POST['blog_image_t1'] : "", "blog_image_t2" => isset($_POST['blog_image_t2']) ? $_POST['blog_image_t2'] : "");
$callback_data['blog_breaks'] = "";
if (isset($_POST['blog_breaks'])) {
$callback_data['blog_breaks'] = TRUE;
$callback_data['blog_blog'] = nl2br($callback_data['blog_blog']);
if ($callback_data['blog_extended']) {
$callback_data['blog_extended'] = nl2br($callback_data['blog_extended']);
}
}
if (defender::safe()) {
echo openmodal('blog_preview', $locale['blog_0141']);
echo "<h3>" . $callback_data['blog_subject'] . "</h3>\n";
echo $callback_data['blog_blog'];
示例3: closetable
echo "<br /><div style='text-align:center'>" . $locale['533'] . "<br /><br />\n";
echo "<a href='" . FUSION_SELF . $aidlink . "'>" . $locale['402'] . "</a><br /><br />\n";
echo "<a href='index.php" . $aidlink . "'>" . $locale['403'] . "</a></div><br />\n";
closetable();
} else {
if ($settings['tinymce_enabled'] == 1) {
echo "<script type='text/javascript'>advanced();</script>\n";
}
$result = dbquery("SELECT ts.submit_criteria, tu.user_id, tu.user_name, tu.user_status\r\n\t\t\tFROM " . DB_SUBMISSIONS . " ts\r\n\t\t\tLEFT JOIN " . DB_USERS . " tu ON ts.submit_user=tu.user_id\r\n\t\t\tWHERE submit_id='" . $_GET['submit_id'] . "'");
if (dbrows($result)) {
$data = dbarray($result);
$submit_criteria = unserialize($data['submit_criteria']);
$article_cat = $submit_criteria['article_cat'];
$article_subject = $submit_criteria['article_subject'];
$article_snippet = phpentities(stripslashes($submit_criteria['article_snippet']));
$article_body = phpentities(stripslashes($submit_criteria['article_body']));
$article_breaks = "";
$result2 = dbquery("SELECT article_cat_id, article_cat_name FROM " . DB_ARTICLE_CATS . " ORDER BY article_cat_name DESC");
$article_cat_opts = "";
$sel = "";
while ($data2 = dbarray($result2)) {
if (isset($article_cat)) {
$sel = $article_cat == $data2['article_cat_id'] ? " selected='selected'" : "";
}
$article_cat_opts .= "<option value='" . $data2['article_cat_id'] . "'{$sel}>" . $data2['article_cat_name'] . "</option>\n";
}
add_to_title($locale['global_200'] . $locale['543'] . $locale['global_201'] . $article_subject . "?");
if (isset($_POST['preview']) && (isset($_GET['submit_id']) && isnum($_GET['submit_id']))) {
$article_cat = isnum($_POST['article_cat']) ? $_POST['article_cat'] : "0";
$article_subject = stripinput($_POST['article_subject']);
$article_snippet = stripslash($_POST['article_snippet']);
示例4: form_textarea
function form_textarea($title = FALSE, $input_name, $input_id, $input_value = FALSE, $array = FALSE)
{
global $userdata;
// for editor
$title2 = isset($title) && !empty($title) ? stripinput($title) : ucfirst(strtolower(str_replace("_", " ", $input_name)));
$input_name = isset($input_name) && !empty($input_name) ? stripinput($input_name) : "";
$input_id = isset($input_id) && !empty($input_id) ? stripinput($input_id) : "";
if (!is_array($array)) {
$required = 0;
$safemode = 0;
$deactivate = "";
$width = "100%";
$height = "80px";
$editor = 0;
$placeholder = "";
$inline = '';
$form_name = 'input_form';
$bbcode = 0;
$error_text = '';
$class = '';
} else {
$required = array_key_exists('required', $array) && $array['required'] == 1 ? 1 : 0;
$safemode = array_key_exists('safemode', $array) && $array['safemode'] == 1 ? 1 : 0;
$placeholder = array_key_exists('placeholder', $array) ? $array['placeholder'] : "";
$deactivate = array_key_exists('deactivate', $array) ? $array['deactivate'] : "";
$bbcode = array_key_exists('bbcode', $array) && $array['bbcode'] == 1 ? 1 : 0;
$editor = array_key_exists('editor', $array) ? $array['editor'] : "";
$width = array_key_exists('width', $array) ? $array['width'] : "100%";
$height = array_key_exists('height', $array) ? $array['height'] : "80";
$inline = array_key_exists("inline", $array) ? 1 : 0;
$form_name = array_key_exists('form_name', $array) ? $array['form_name'] : 'input_form';
$error_text = array_key_exists("error_text", $array) ? $array['error_text'] : "";
$class = array_key_exists("class", $array) && $array['class'] ? $array['class'] : '';
}
$input_value = phpentities(stripslashes($input_value));
$input_value = str_replace("<br />", "", $input_value);
if ($bbcode) {
require_once INCLUDES . "bbcode_include.php";
}
$html = "";
$html .= "<div id='{$input_id}-field' class='form-group m-b-0 " . $class . "'>\n";
$html .= $title ? "<label class='control-label " . ($inline ? "col-xs-12 col-sm-3 col-md-3 col-lg-3" : '') . "' for='{$input_id}'>{$title} " . ($required == 1 ? "<span class='required'>*</span>" : '') . "</label>\n" : '';
$html .= $inline ? "<div class='col-xs-12 col-sm-9 col-md-9 col-lg-9'>\n" : "";
$html .= $bbcode ? "" . display_bbcodes('90%', $input_name, $form_name) . "" : '';
$html .= "<textarea name='{$input_name}' style='width:100%; min-height:100px;' class='form-control textbox' placeholder='{$placeholder}' id='{$input_id}' " . ($deactivate == "1" && isnum($deactivate) ? "readonly" : "") . ">{$input_value}</textarea>\n";
$html .= "<div id='{$input_id}-help' class='display-inline-block'></div>";
$html .= $inline ? "</div>\n" : "";
$html .= "</div>\n";
$html .= "<input type='hidden' name='def[{$input_name}]' value='[type=textarea],[title={$title2}],[id={$input_id}],[required={$required}],[safemode={$safemode}]" . ($error_text ? ",[error_text={$error_text}]" : '') . "' readonly />";
// Editor Parse Configurations.
if ($editor) {
$result = dbquery("SELECT * FROM " . DB_EDITOR . " WHERE " . groupaccess('editor_access') . " AND editor_enable='1' ORDER BY editor_access DESC LIMIT 1");
if (dbrows($result) > 0) {
$data = dbarray($result);
if (!defined('text_editor_on')) {
define('text_editor_on', TRUE);
// load editor js
add_to_head("<script src='" . DYNAMICS . "assets/editor/development/jquery.sceditor.bbcode.js'></script>\n");
// load editor theme
$editor_theme = DYNAMICS . "assets/editor/development/themes/css/monocons.css";
if (file_exists(DYNAMICS . "assets/editor/development/themes/css/" . $data['editor_theme'] . "")) {
$editor_theme = DYNAMICS . "assets/editor/development/themes/css/" . $data['editor_theme'];
}
add_to_head("<link rel='stylesheet' href='{$editor_theme}' type='text/css' media='all' />\n");
// load smileys;
$editor_smiley = cache_editor_smiley();
// load editor bbcode settings;
$editor_config = get_editor_buttons($data['editor_name']);
// initialize the editor
add_to_jquery("\n \$('#{$input_id}').sceditor({\n plugins: 'bbcode',\n id: '{$input_id}-editor',\n height : '300',\n width : '{$width}',\n //toolbar: '{$editor_config}',\n autoUpdate: true,\n style: '{$editor_theme}',\n {$editor_smiley}\n });\n ");
}
/*
* width: '720',
* height: '300'
* resizeEnabled: false,
*/
}
}
// endif editor config
// Api for Adding Custom BBCodes - Example
/*
add_to_jquery("
$.sceditor.plugins.bbcode.bbcode.set('spoiler', {
tags: {
'div': {
'class': ['spoiler']
}
},
format: '[spoiler]{0}[/spoiler]',
html: '<div class=\"spoiler\">{0}</div>'
});
");
*/
return $html;
}
示例5: opentable
if (isset($_GET['action']) && $_GET['action'] == "edit" && (isset($_GET['faq_cat_id']) && isnum($_GET['faq_cat_id'])) && $_GET['t'] == "faq") {
$sel = $data2['faq_cat_id'] == $_GET['faq_cat_id'] ? " selected" : "";
}
$cat_opts .= "<option value='" . $data2['faq_cat_id'] . "'{$sel}>" . $data2['faq_cat_name'] . "</option>\n";
}
opentable($faq_title);
echo "<form name='inputform' method='post' action='" . $faq_action . "'>\n";
echo "<table cellpadding='0' cellspacing='0' class='center'>\n<tr>\n";
echo "<td class='tbl'>" . $locale['520'] . "</td>\n";
echo "<td class='tbl'><select name='faq_cat' class='textbox' style='width:250px;'>\n" . $cat_opts . "</select></td>\n";
echo "</tr>\n<tr>\n";
echo "<td class='tbl'>" . $locale['521'] . "</td>\n";
echo "<td class='tbl'><input type='text' name='faq_question' value='" . $faq_question . "' class='textbox' style='width:330px' /></td>\n";
echo "</tr>\n<tr>\n";
echo "<td valign='top' class='tbl'>" . $locale['522'] . "</td>\n";
echo "<td class='tbl'><textarea name='faq_answer' cols='60' rows='5' class='textbox' style='width:330px;'>" . phpentities(stripslashes($faq_answer)) . "</textarea></td>\n";
echo "</tr>\n<tr>\n";
echo "<td class='tbl'></td><td class='tbl'>\n";
echo display_html("inputform", "faq_answer") . "</td>\n";
echo "</tr>\n<tr>\n";
echo "<td align='center' colspan='2' class='tbl'><br />\n";
echo "<input type='submit' name='save_faq' value='" . $locale['523'] . "' class='button' /></td>\n";
echo "</tr>\n</table>\n</form>\n";
closetable();
}
}
opentable($locale['502']);
$result = dbquery("SELECT faq_cat_id, faq_cat_name FROM " . DB_FAQ_CATS . " ORDER BY faq_cat_name");
if (dbrows($result) != 0) {
echo "<table cellpadding='0' cellspacing='0' width='400' class='center'>\n<tr>\n";
echo "<td class='tbl2'>" . $locale['540'] . "</td>\n";
示例6: showdate
}
echo '<table style="width: 100%;" class="tbl-border forum_thread_table">';
if ($blogarr = dbarray($bloglist)) {
echo '
<tr>
<td style="width: 25%;" class="tbl2 forum-caption">' . showdate('forumdate', $blogarr['bp_timestamp']) . '</td>
<td style="width: 75%;" class="tbl2 forum-caption">' . $blogarr['bp_title'] . '</td>
</tr>
<tr>
<td style="width: 25%;" class="tbl2 forum-caption">
' . profile_link($blogarr['bp_author'], $blogarr['user_name'], $blogarr['user_status']) . '<br />';
if ($blogarr['user_avatar'] && file_exists(IMAGES . "avatars/" . $blogarr['user_avatar']) && $blogarr['user_status'] != 6 && $blogarr['user_status'] != 5) {
echo "<img src='" . IMAGES . "avatars/" . $blogarr['user_avatar'] . "' alt='Avatar' /><br /><br />\n";
}
echo 'Antal blogindlæg: ' . $blogarr['user_blog'] . '<br />
<a href="/blog/liste.php?list=' . $blogarr['user_id'] . '">Se blog</a>
' . (iADMIN || $blogarr['user_id'] == $userdata['user_id'] ? '<br /><a href="/blog/slet.php?id=' . $blogarr['bp_id'] . '" onclick="return confirm(\'Er du sikker på, du vil slette dette indlæg?\')">Slet indlæg</a>' : '') . '
<br /><a href="/report.php?action=new&bp_id=' . $blogarr['bp_id'] . '">Anmeld</a>
</td>
<td style="width: 75%;" class="tbl1">' . nl2br(parseubb(phpentities($blogarr['bp_content']))) . '</td>
</tr>
<tr>
<td colSpan="2" style="width: 5px;"> </td>
</tr>
';
} else {
echo 'Indlægget kunne ikke findes.';
}
echo '</table>';
closetable();
require_once THEMES . "templates/footer.php";
示例7: dbquery
$result = dbquery("SELECT * FROM " . DB_AL_CATALOG_ITEMS . " WHERE ctg_item_id='" . $_POST['item_id'] . "'");
if (dbrows($result)) {
$data = dbarray($result);
$title = $data['ctg_item_title'];
$cost = $data['ctg_item_cost'];
$short_desc = $data['ctg_item_short_desc'];
$desc = $data['ctg_item_desc'];
$cat_id = $data['ctg_item_cat'];
$cover_image = $data['ctg_item_image'];
$cat_id = $data['ctg_item_cat'];
$item_id = $data['ctg_item_id'];
$is_edit = true;
$tabs = array();
for ($i = 1; $i <= 10; $i++) {
if ($data['ctg_item_tab_' . $i . '_title'] && !empty($data['ctg_item_tab_' . $i . '_title'])) {
$tabs[] = array('title' => $data['ctg_item_tab_' . $i . '_title'], 'desc' => phpentities(stripslashes($data['ctg_item_tab_' . $i . '_desc'])));
}
}
$images_result = dbquery("SELECT ii.*,i.* FROM " . DB_AL_CATALOG_IMAGES_ITEMS . " ii LEFT JOIN " . DB_AL_CATALOG_IMAGES . " i ON i.ctg_image_id=ii.ctg_image_id WHERE ii.ctg_item_id='" . $data['ctg_item_id'] . "'");
$images = array();
if (dbrows($images_result)) {
$images = make_assoc($images_result);
}
} else {
redirect(FUSION_SELF . $aidlink . "&page=items");
}
} else {
$title = '';
$cost = '';
$short_desc = '';
$desc = '';
示例8: redirect
redirect(FUSION_SELF . $aidlink . "&page=2&error=" . $error);
} else {
redirect(FUSION_SELF . $aidlink . "&page=2&error=2");
}
}
opentable($locale['ads_title']);
echo $navigation;
echo "<form name='ads_form' method='post' action='" . FUSION_SELF . $aidlink . "&page=2'>\n";
echo "<table cellpadding='0' cellspacing='0' width='450' align='center'>\n";
echo "<tr>\n";
echo "<td class='tbl'>" . $locale['ads_name'] . "</td>";
echo "<td class='tbl'><input type='text' class='textbox' name='ads_in_name' value='" . $settings['ads_in_name'] . "' style='width:500px' /></td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td valign='top' class='tbl'>" . $locale['ads_code'] . "<br /><span class='small2'><em>" . $locale['ads_code_info'] . "</em></span></td>";
echo "<td class='tbl'><textarea rows='20' class='textbox' name='ads_in_code' style='width:500px'>" . phpentities(stripslashes($settings['ads_in_code'])) . "</textarea></td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<tr>\n";
echo "<td class='tbl'>" . $locale['ads_show'] . "</td>";
echo "<td class='tbl'><input type='checkbox' name='ads_in_show' value='1' " . ($settings['ads_in_show'] ? "checked='checked' " : "") . "/></td>";
echo "</tr><tr>\n";
if (!check_admin_pass(isset($_POST['admin_password']) ? stripinput($_POST['admin_password']) : "")) {
echo "<td class='tbl'>Admin Password:</td>\n";
echo "<td class='tbl'><input type='password' name='admin_password' value='" . (isset($_POST['admin_password']) ? stripinput($_POST['admin_password']) : "") . "' class='textbox' style='width:150px;' /></td>\n";
echo "</tr>\n<tr>\n";
}
echo "<td colspan='2' align='center' class='tbl'><input type='submit' class='button' name='ads_save' value='" . $locale['ads_save'] . "' /></td></tr>\n";
echo "</table>\n";
echo "</form>\n";
closetable();
示例9: phpentities
} else {
$ticker_content .= "<br>";
}
} else {
if ($scrolling_ticker_boxover == 0) {
if ($scrolling_category == 1) {
$ticker_content .= "<b>" . $locale['ans107'] . ":</b> <a href='" . BASEDIR . "news_cats.php?cat_id=" . $data2['news_cat_id'] . "'><font color='{$scrolling_ticker_cat_color}'><b>" . $data2['news_cat_name'] . "</b></font></a>";
$ticker_content .= "<br><img style='vertical-align:middle;' alt='' src='" . BASEDIR . "advanced_news/images/scroll_news_icon.gif'> <a href='" . BASEDIR . "news.php?readmore=" . $data['news_id'] . "'>{$itemsubject}</a>";
} else {
if ($scrolling_category == 0) {
$ticker_content .= "<br><img style='vertical-align:middle;' alt='' src='" . BASEDIR . "advanced_news/images/scroll_news_icon.gif'> <a href='" . BASEDIR . "news.php?readmore=" . $data['news_id'] . "'>{$itemsubject}</a>";
}
}
if (checkrights("N")) {
$ticker_content .= " <a href='javascript:void(0)' onclick=\"document.editnews.news_id.value=" . $data['news_id'] . "; document.editnews.submit(); return false;\"><span style='cursor:pointer; text-decoration: none;' title=\"header=[<img src='" . BASEDIR . "advanced_news/images/adv_editnews.gif' style='vertical-align:middle;'> " . $locale['admin100'] . " <font color='red'>" . $data['news_id'] . "</font>] body=[" . $locale['pop107'] . "] delay=[0] fade=[on]\"><img style='vertical-align:middle;' src='" . BASEDIR . "advanced_news/images/icon_editnews.gif' alt='' border='0'></span></a> <a href='javascript:void(0)' onclick=\"if (confirm('" . $locale['admin102'] . "')) location.href='" . BASEDIR . "news.php{$aidlink}&readmore=" . $data['news_id'] . "&op=del'; return false;\"><span style='cursor:pointer; text-decoration: none;' title=\"header=[<img src='" . BASEDIR . "advanced_news/images/adv_deletenews.gif' style='vertical-align:middle;'> " . $locale['admin101'] . " <font color='red'>" . $data['news_id'] . "</font>] body=[" . phpentities($locale['pop110']) . "] delay=[0] fade=[on]\"><img style='vertical-align:middle;' src='" . BASEDIR . "advanced_news/images/icon_deletenews.gif' alt='' border='0'></span></a> ";
$ticker_content .= "<a href='" . BASEDIR . "administration/news.php" . $aidlink . "'><span style='cursor:pointer; text-decoration: none;' title=\"header=[<img src='" . BASEDIR . "advanced_news/images/adv_writenews.gif' style='vertical-align:middle;'> <font color='#1D679F'>" . $locale['admin103'] . "</font>] body=[" . phpentities($locale['pop111']) . "] delay=[0] fade=[on]\"><img style='vertical-align:middle;' src='" . BASEDIR . "advanced_news/images/icon_writenews.gif' alt='' border='0'></span></a><br>";
} else {
$ticker_content .= "<br>";
}
}
}
if ($scrolling_news_author + $scrolling_ticker_date + $scrolling_ticker_comments + $scrolling_ticker_reads != "0") {
$ticker_content .= "";
if ($scrolling_news_author == "1") {
$ticker_content .= $locale['040'] . $data[user_name];
if ($scrolling_ticker_date + $scrolling_ticker_comments + $scrolling_ticker_reads != "0") {
$ticker_content .= "<br>";
}
}
if ($scrolling_ticker_date == "1") {
$ticker_content .= showdate("shortdate", $data['news_datestamp']);
示例10: phpentities
$data['license_text'] = "";
$data['license_name'] = "";
$action = FUSION_SELF;
}
echo '
<form action="' . $action . '" method="post">
<div style="text-align:center;">
<p>
<label for="name">' . $locale['PDP002'] . ':</label>
<input type="text" value="' . $data['license_name'] . '"
size="40" maxlength="100" name="name" id="name" class="textbox" />
</p>
<p>
<textarea cols="60" rows="15" class="textbox" name="text">' . phpentities(stripslash($data['license_text'])) . '</textarea><br />
<span class="small2">' . $locale['pdp_html_allowed'] . '</span>
<p>
<input type="submit" value="' . $locale['PDP010'] . '" class="button" name="save" />
</div>
<hr />
</form>';
}
/*
* show all
*/
$res = dbquery("SELECT CHAR_LENGTH(license_text) AS length,\n\tlicense_id, license_name\n\tFROM " . DB_PDP_LICENSES . "\n\tORDER BY license_name ASC");
if (dbrows($res)) {
echo "<table align='center' cellspacing='1' class='tbl-border'>\n<thead>\n<tr>\n\t<th class='tbl2' width='16'></th>\n\t<th class='tbl2' width='150'>" . $locale['PDP002'] . " [<a href='" . FUSION_SELF . "?new=1'>" . $locale['pdp_new'] . "]</a>]</th>\n\t<th class='tbl2'>" . $locale['PDP801'] . "</th>\n\t<th class='tbl2' colspan='2'># " . $locale['pdp_downloads'] . "</th>\n\t<th class='tbl2' width='16'></th>\n</tr>\n</thead>\n<tbody>";
} else {
示例11: descript
$submit_info['article_body'] = descript($_POST['article_body']);
$submit_info['article_breaks'] = isset($_POST['line_breaks']) ? "y" : "n";
$result = dbquery("INSERT INTO " . DB_SUBMISSIONS . " (submit_type, submit_user, submit_datestamp, submit_criteria) VALUES ('a', '" . $userdata['user_id'] . "', '" . time() . "', '" . addslashes(serialize($submit_info)) . "')");
add_to_title($locale['global_200'] . $locale['500']);
opentable($locale['500']);
echo "<div style='text-align:center'><br />\n" . $locale['510'] . "<br /><br />\n";
echo "<a href='submit.php?stype=a'>" . $locale['511'] . "</a><br /><br />\n";
echo "<a href='index.php'>" . $locale['412'] . "</a><br /><br />\n</div>\n";
closetable();
}
} else {
if (isset($_POST['preview_article'])) {
$article_cat = isnum($_POST['article_cat']) ? $_POST['article_cat'] : "0";
$article_subject = stripinput($_POST['article_subject']);
$article_snippet = phpentities(descript(stripslash($_POST['article_snippet'])));
$article_body = phpentities(descript(stripslash($_POST['article_body'])));
$breaks = isset($_POST['line_breaks']) ? " checked='checked'" : "";
opentable($article_subject);
echo isset($_POST['line_breaks']) ? nl2br($article_body) : $article_body;
closetable();
tablebreak();
}
if (!isset($_POST['preview_article'])) {
$article_cat = "0";
$article_subject = "";
$article_snippet = "";
$article_body = "";
$breaks = " checked='checked'";
}
$cat_list = "";
$sel = "";
示例12: dbquery
}
}
/*
* birthdays
*/
if (!$awec_settings['birthdays_are_events'] && $awec_settings['show_birthday_to_group'] >= 0 && checkgroup($awec_settings['show_birthday_to_group'])) {
$res = dbquery("SELECT user_name, user_birthdate, user_id,\n user_avatar,\n\t\t(YEAR(CURDATE())-YEAR(user_birthdate)) AS years_old\n FROM " . DB_USERS . "\n WHERE MONTH(user_birthdate)='" . date('n') . "'\n AND DAYOFMONTH(user_birthdate)='" . date("j") . "'");
if (dbrows($res)) {
$path = INFUSIONS . 'aw_ecal_panel';
echo '
<img src="' . $path . '/icons/birthday.gif" alt="' . $locale['EC712'] . '"
style="vertical-align:bottom;">
<strong>' . $locale['EC205'] . ':</strong>
<ul>';
while ($data = dbarray($res)) {
if (empty($data['user_avatar'])) {
$img = INFUSIONS . 'aw_ecal_panel/icons/noav.gif';
} else {
$img = BASEDIR . 'images/avatars/' . $data['user_avatar'];
}
$header = sprintf($locale['awec_user_birthday']['title'], $data['user_name']);
$body = '<img src="' . $img . '" alt="' . $data['user_name'] . '" />';
$body .= '<br />' . str_replace(array('%1', '%2'), array($data['user_name'], $data['years_old']), $locale['awec_user_birthday']['body']);
echo '
<li><a href="' . BASEDIR . 'profile.php?lookup=' . $data['user_id'] . '" title="cssbody[tbl1] cssheader=[tbl2] header=[' . phpentities($header) . '] body=[' . phpentities($body) . ']">' . $data['user_name'] . '</a> (' . $data['years_old'] . ')</li>';
}
echo '
</li>';
}
}
closeside();
示例13: substr_count
if ($data['thread_poll']) {
$thread_poll = "<span class='small' style='font-weight:bold'>[" . $locale['global_051'] . "]</span> ";
} else {
$thread_poll = "";
}
$message = $data['post_message'];
// try to fix an unknown bug: div's are not shown
#$qcount = substr_count($message, "[quote]");
#for ($q=0;$q < $qcount;$q++) $message = preg_replace('#\[quote\](.*?)\[/quote\]#si', '', $message); // problem with this: there are too much possible bb-codes
#$code_count = substr_count($message, "[code]");
#for ($q=0; $q < $code_count; $q++) $message = preg_replace("#\[code\](.*?)\[/code\]#sie", "", $message, 1);
$message = parseubb(nl2br(trimlink($message, 300)));
if ($data['post_smileys']) {
$message = parsesmileys($message);
}
$message = phpentities(str_replace(array("[", "]"), array("[", "]"), $message));
#$message = str_replace(array("<div", "</div"), array("<span", "</span"), $message); // does not show the thing correct
$div_count = substr_count($message, "<div");
for ($q = 0; $q < $div_count; $q++) {
$message = preg_replace('#<div(.*?)>(.*?)</div>#si', '', $message, 1);
}
// this is the best solution I could find
echo "</td>\n";
echo "<td width='100%' class='" . $row_color . "'>" . $thread_poll . "<a href='" . make_url(FORUM . "viewthread.php?thread_id=" . $data['thread_id'] . "&pid=" . $data['thread_lastpostid'], BASEDIR . "forum-thread-" . $data['thread_id'] . "-pid" . $data['thread_lastpostid'] . "-", $data['thread_subject'], ".html") . "#post_" . $data['thread_lastpostid'] . "' title='<strong>" . $data['thread_subject'] . "</strong><br/>" . $message . "' class='tooltip'>" . trimlink($data['thread_subject'], 30) . "</a>" . ($data['forum_markresolved'] && $data['thread_resolved'] ? $locale['global_067'] : "") . "<br />\n\r\n\t\t<span class='small2'>" . $locale['global_048'] . ": <a href='" . make_url(FORUM . "viewforum.php?forum_id=" . $data['forum_id'], BASEDIR . "forum-" . $data['forum_id'] . "-", $data['forum_name'], ".html") . "' title='" . $data['forum_name'] . "'>" . $data['forum_name'] . "</a></span></td>\n";
// Pimped: make_url
echo "<td width='1%' class='" . $row_color . "' style='text-align:center;white-space:nowrap'>" . $data['thread_views'] . "</td>\n";
echo "<td width='1%' class='" . $row_color . "' style='text-align:center;white-space:nowrap'>" . ($data['thread_postcount'] - 1) . "</td>\n";
if (IF_MULTI_LANGUAGE_FORUM) {
echo "<td width='1%' class='" . $row_color . "' style='text-align:center;white-space:nowrap'>" . get_image($data['forum_language'], $data['forum_language'], "", $data['forum_language'], "", true) . "</td>\n";
}
// Pimped
示例14: opentable
opentable($locale['400']);
echo "<div style='text-align:center'>\n<form name='selectform' method='post' action='" . FUSION_SELF . $aidlink . "&action=edit'>\n";
echo "<select name='news_id' class='textbox' style='width:250px'>\n" . $editlist . "</select>\n";
echo "<input type='submit' name='edit' value='" . $locale['420'] . "' class='button' />\n";
echo "<input type='submit' name='delete' value='" . $locale['421'] . "' onclick='return DeleteNews();' class='button' />\n";
echo "</form>\n</div>\n";
closetable();
}
if (isset($_GET['action']) && $_GET['action'] == "edit" && (isset($_POST['news_id']) && isnum($_POST['news_id'])) || isset($_GET['news_id']) && isnum($_GET['news_id'])) {
$result = dbquery("SELECT * FROM " . DB_NEWS . " WHERE news_id='" . (isset($_POST['news_id']) ? $_POST['news_id'] : $_GET['news_id']) . "'");
if (dbrows($result)) {
$data = dbarray($result);
$news_subject = $data['news_subject'];
$news_cat = $data['news_cat'];
$body = phpentities(stripslashes($data['news_news']));
$body2 = phpentities(stripslashes($data['news_extended']));
if ($data['news_start'] > 0) {
$news_start = getdate($data['news_start']);
}
if ($data['news_end'] > 0) {
$news_end = getdate($data['news_end']);
}
$news_visibility = $data['news_visibility'];
$news_draft = $data['news_draft'] == "1" ? " checked='checked'" : "";
$news_sticky = $data['news_sticky'] == "1" ? " checked='checked'" : "";
$news_breaks = $data['news_breaks'] == "y" ? " checked='checked'" : "";
$news_comments = $data['news_allow_comments'] == "1" ? " checked='checked'" : "";
$news_ratings = $data['news_allow_ratings'] == "1" ? " checked='checked'" : "";
} else {
redirect(FUSION_SELF . $aidlink);
}
示例15: opentable
/*
* GUI
*/
opentable($locale['PRP800']);
prp_admin_menu();
if (isset($_GET['edit']) || isset($_GET['new'])) {
if (isset($id)) {
$query_id = dbquery("SELECT license_id, license_text," . " license_name" . " FROM " . DB_PRP_LICENSES . "" . " WHERE license_id='{$id}'");
$data = dbarray($query_id);
$action = FUSION_SELF . "?id={$id}";
} else {
$data['license_text'] = "";
$data['license_name'] = "";
$action = FUSION_SELF;
}
echo "<form action='{$action}' method='POST'>\n<div align='center'>\n" . $locale['PRP002'] . ": <input type='text' value='" . $data['license_name'] . "'" . " size='40' maxlength='255' name='name' class='textbox'>\n<p>\n<textarea cols='70' rows='15' class='textbox' name='text'>" . phpentities(stripslash($data['license_text'])) . "</textarea>\n<p>\n<input type='submit' value='" . $locale['PRP010'] . "' class='button' name='save'>\n</div>\n<hr>\n</form>\n";
}
/*
* show all
*/
$query_id = dbquery("SELECT CHAR_LENGTH(license_text) AS length," . " license_id, license_name" . " FROM " . DB_PRP_LICENSES . "" . " ORDER BY license_name ASC");
if (dbrows($query_id)) {
echo "<table align='center' cellspacing='1' class='tbl-border'>\n<thead>\n<tr>\n\t<th class='tbl2' width='16'></th>\n\t<th class='tbl2' width='150'>" . $locale['PRP002'] . " [<a href='" . FUSION_SELF . "?new=1'>" . $locale['prp_new'] . "]</a></th>\n\t<th class='tbl2'>" . $locale['PRP801'] . "</th>\n\t<th class='tbl2' colspan='2'># " . $locale['prp_reviews'] . "</th>\n\t<th class='tbl2' width='16'></th>\n</tr>\n</thead>\n<tbody>";
} else {
if (!isset($_GET['new'])) {
fallback(FUSION_SELF . "?new=1");
}
echo "<p>" . $locale['PRP802'];
}
$lcount = 0;
while ($data = dbarray($query_id)) {