本文整理匯總了PHP中meta_lang函數的典型用法代碼示例。如果您正苦於以下問題:PHP meta_lang函數的具體用法?PHP meta_lang怎麽用?PHP meta_lang使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。
在下文中一共展示了meta_lang函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: fab_feed
function fab_feed($type, $filename, $timeout)
{
global $sitename, $slogan, $nuke_url, $backend_image, $backend_title, $backend_width, $backend_height, $backend_language, $storyhome;
include "lib/feedcreator.class.php";
$rss = new UniversalFeedCreator();
$rss->useCached($type, $filename, $timeout);
$rss->title = $sitename;
$rss->description = $slogan;
$rss->descriptionTruncSize = 250;
$rss->descriptionHtmlSyndicated = true;
$rss->link = $nuke_url;
$rss->syndicationURL = $nuke_url . "/backend.php?op=" . $type;
$image = new FeedImage();
$image->title = $sitename;
$image->url = $backend_image;
$image->link = $nuke_url;
$image->description = $backend_title;
$image->width = $backend_width;
$image->height = $backend_height;
$rss->image = $image;
$xtab = news_aff("index", "where ihome='0' and archive='0'", $storyhome, "");
$story_limit = 0;
while ($story_limit < $storyhome and $story_limit < sizeof($xtab)) {
list($sid, $catid, $aid, $title, $time, $hometext, $bodytext, $comments, $counter, $topic, $informant, $notes) = $xtab[$story_limit];
$story_limit++;
$item = new FeedItem();
$item->title = preview_local_langue($backend_language, str_replace(""", "\"", $title));
$item->link = $nuke_url . "/article.php?sid={$sid}";
$item->description = meta_lang(preview_local_langue($backend_language, $hometext));
$item->descriptionHtmlSyndicated = true;
$item->date = convertdateTOtimestamp($time) + $gmt * 3600;
$item->source = $nuke_url;
$item->author = $aid;
$rss->addItem($item);
}
echo $rss->saveFeed($type, $filename);
}
示例2: elseif
<?php
/************************************************************** **********/
/* Modification par Jireck BaseRoc */
/* This program is free software. You can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 2 of the License. */
/************************************************************************/
global $theme;
$rep = false;
if (file_exists("themes/" . $theme . "/html/central.html")) {
$rep = $theme;
} elseif (file_exists("themes/default/html/central.html")) {
$rep = "default";
} else {
echo "central.html manquant / not find !< br />";
die;
}
if ($rep) {
ob_start();
include "themes/" . $rep . "/html/central.html";
$Xcontent = ob_get_contents();
ob_end_clean();
echo meta_lang(aff_langue($Xcontent));
}
示例3: previewStory
function previewStory($qid, $uid, $author, $subject, $hometext, $bodytext, $topic, $notes, $catid, $ihome, $members, $Mmembers, $deb_day, $deb_month, $deb_year, $deb_hour, $deb_min, $fin_day, $fin_month, $fin_year, $fin_hour, $fin_min, $epur)
{
global $NPDS_Prefix;
global $tipath, $hlpfile, $language, $aid, $radminsuper;
$hlpfile = "manuels/{$language}/newarticle.html";
$subject = stripslashes(str_replace('"', '"', $subject));
$hometext = stripslashes($hometext);
$bodytext = stripslashes($bodytext);
$notes = stripslashes($notes);
if ($topic < 1) {
$topic = 1;
}
$affiche = false;
$result2 = sql_query("SELECT topictext, topicimage, topicadmin FROM " . $NPDS_Prefix . "topics WHERE topicid='{$topic}'");
list($topictext, $topicimage, $topicadmin) = sql_fetch_row($result2);
if ($radminsuper) {
$affiche = true;
} else {
$topicadminX = explode(',', $topicadmin);
for ($i = 0; $i < count($topicadminX); $i++) {
if (trim($topicadminX[$i]) == $aid) {
$affiche = true;
}
}
}
if (!$affiche) {
header("location: admin.php?op=submissions");
}
$topiclogo = '<span class="label label-default pull-right"><strong>' . aff_langue($topictext) . '</strong></span>';
include 'header.php';
GraphicAdmin($hlpfile);
global $local_user_language;
echo '
<h3>' . adm_translate("Prévisualiser l'Article") . '</h3>
<form action="admin.php" method="post" name="adminForm">
<label class="form-control-label">' . adm_translate("Langue de Prévisualisation") . '</label> : ' . aff_localzone_langue("local_user_language");
echo '<div class="card card-block">';
if ($topicimage !== '') {
if (!($imgtmp = theme_image('topics/' . $topicimage))) {
$imgtmp = $tipath . $topicimage;
}
$timage = $imgtmp;
if (file_exists($imgtmp)) {
$topiclogo = '<img class="img-fluid N_sujetsize" src="' . $timage . '" align="right" alt="" />';
}
}
code_aff('<h3>' . $subject . $topiclogo . '</h3>', '<div class="text-muted">' . meta_lang($hometext) . '</div>', meta_lang($bodytext), meta_lang($notes));
echo '
<label class="form-control-label col-sm-4">' . adm_translate("Utilisateur") . '</label>
<input class="textbox_standard" type="text" name="author" size="50" value="' . $author . '" />
<label class="form-control-label col-sm-4">' . adm_translate("Titre") . '</label>
<input class="textbox" type="text" name="subject" size="50" value="' . $subject . '" />
<label class="form-control-label col-sm-4">' . adm_translate("Sujet") . '</label>
<select class="c-select form-control" name="topic">';
$toplist = sql_query("SELECT topicid, topictext, topicadmin FROM " . $NPDS_Prefix . "topics ORDER BY topictext");
if ($radminsuper) {
echo '
<option value="">' . adm_translate("Tous les Sujets") . '</option>';
}
while (list($topicid, $topics, $topicadmin) = sql_fetch_row($toplist)) {
$affiche = false;
if ($radminsuper) {
$affiche = true;
} else {
$topicadminX = explode(',', $topicadmin);
for ($i = 0; $i < count($topicadminX); $i++) {
if (trim($topicadminX[$i]) == $aid) {
$affiche = true;
}
}
}
if ($affiche) {
if ($topicid == $topic) {
$sel = 'selected="selected" ';
}
echo '
<option ' . $sel . ' value="' . $topicid . '">' . aff_langue($topics) . '</option>';
$sel = '';
}
}
echo '
</select>';
SelectCategory($catid);
echo '<br />';
if ($members == 1 and $Mmembers == '') {
$ihome = "-127";
}
if ($members == 1 and ($Mmembers > 1 and $Mmembers <= 127)) {
$ihome = $Mmembers;
}
puthome($ihome);
closetable2();
echo '<br /><b>' . adm_translate("Texte d'introduction") . '</b> :<br />
<textarea class="tin form-control" cols="70" rows="25" name="hometext" >' . $hometext . '</textarea>';
echo aff_editeur('hometext', '');
echo '<br /><b>' . adm_translate("Texte étendu") . '</b> :<br />
<textarea class="tin form-control" cols="70" rows="25" name="bodytext" >' . $bodytext . '</textarea>';
echo aff_editeur('bodytext', '');
echo '<br /><b>' . adm_translate("Notes") . '</b> :<br />
//.........這裏部分代碼省略.........
示例4: ob_start
$remp = '';
include "header.php";
echo '<div id="static_cont">';
if ($op != '' and $op) {
// Troll Control for security
if (preg_match('#^[a-z0-9_\\.-]#i', $op) and !stristr($op, ".*://") and !stristr($op, "..") and !stristr($op, "../") and !stristr($op, "script") and !stristr($op, "cookie") and !stristr($op, "iframe") and !stristr($op, "applet") and !stristr($op, "object") and !stristr($op, "meta")) {
if (file_exists("static/{$op}")) {
if (!$metalang and !$nl) {
include "static/{$op}";
} else {
ob_start();
include "static/{$op}";
$remp = ob_get_contents();
ob_end_clean();
if ($metalang) {
$remp = meta_lang(aff_code(aff_langue($remp)));
}
if ($nl) {
$remp = nl2br(str_replace(' ', ' ', htmlentities($remp, ENT_QUOTES, cur_charset)));
}
echo $remp;
}
if (!($imgtmp = theme_image("box/print.gif"))) {
$imgtmp = "images/print.gif";
}
echo '<p><a href="print.php?sid=static:' . $op . '&metalang=' . $metalang . '&nl=' . $nl . '" title="' . translate("Printer Friendly Page") . '"><i class="fa fa-2x fa-print"></i></a></p>';
// Si vous voulez tracer les appels au pages statiques : supprimer les // devant la ligne ci-dessous
// Ecr_Log("security", "static/$op", "");
} else {
echo "<p class=\"text-danger text-xs-center\">" . translate("Please enter information according to the specifications") . "</p>";
}
示例5: fab_edito
function fab_edito()
{
global $cookie;
if (isset($cookie[3])) {
if (file_exists("static/edito_membres.txt")) {
$fp = fopen("static/edito_membres.txt", "r");
if (filesize("static/edito_membres.txt") > 0) {
$Xcontents = fread($fp, filesize("static/edito_membres.txt"));
}
fclose($fp);
} else {
if (file_exists("static/edito.txt")) {
$fp = fopen("static/edito.txt", "r");
if (filesize("static/edito.txt") > 0) {
$Xcontents = fread($fp, filesize("static/edito.txt"));
}
fclose($fp);
}
}
} else {
if (file_exists("static/edito.txt")) {
$fp = fopen("static/edito.txt", "r");
if (filesize("static/edito.txt") > 0) {
$Xcontents = fread($fp, filesize("static/edito.txt"));
}
fclose($fp);
}
}
$affich = false;
$Xibid = strstr($Xcontents, "aff_jours");
if ($Xibid) {
parse_str($Xibid);
if ($aff_date + $aff_jours * 86400 - time() > 0) {
$affichJ = false;
$affichN = false;
if (NightDay() == "Jour" and $aff_jour == "checked") {
$affichJ = true;
}
if (NightDay() == "Nuit" and $aff_nuit == "checked") {
$affichN = true;
}
}
$XcontentsT = substr($Xcontents, 0, strpos($Xcontents, "aff_jours"));
$contentJ = substr($XcontentsT, strpos($XcontentsT, "[jour]") + 6, strpos($XcontentsT, "[/jour]") - 6);
$contentN = substr($XcontentsT, strpos($XcontentsT, "[nuit]") + 6, strpos($XcontentsT, "[/nuit]") - 19 - strlen($contentJ));
$Xcontents = '';
if ($affichJ) {
$Xcontents = $contentJ;
}
if ($affichN) {
if ($contentN != '') {
$Xcontents = $contentN;
} else {
$Xcontents = $contentJ;
}
}
if ($Xcontents != '') {
$affich = true;
}
} else {
$affich = true;
}
$Xcontents = meta_lang(aff_langue($Xcontents));
return array($affich, $Xcontents);
}
示例6: finishNewUser
function finishNewUser($uname, $name, $email, $user_avatar, $user_icq, $user_occ, $user_from, $user_intrest, $user_sig, $user_viewemail, $user_aim, $user_yim, $user_msnm, $pass, $user_lnl, $C1, $C2, $C3, $C4, $C5, $C6, $C7, $C8, $M1, $M2, $T1, $T2, $B1)
{
global $NPDS_Prefix;
global $makepass, $system, $adminmail, $sitename, $AutoRegUser, $memberpass, $gmt;
$stop = userCheck($uname, $email);
$user_regdate = time() + $gmt * 3600;
$stop = userCheck($uname, $email);
if (!$stop) {
include "header.php";
if (!$memberpass) {
$makepass = makepass();
} else {
$makepass = $pass;
}
if (!$system) {
$cryptpass = crypt($makepass, $makepass);
} else {
$cryptpass = $makepass;
}
$result = sql_query("INSERT INTO " . $NPDS_Prefix . "users VALUES (NULL,'{$name}','{$uname}','{$email}','','','{$user_avatar}','{$user_regdate}','{$user_icq}','{$user_occ}','{$user_from}','{$user_intrest}','{$user_sig}','{$user_viewemail}','','{$user_aim}','{$user_yim}','{$user_msnm}','','{$cryptpass}','10','','0','0','0','','0','','','10','0','0','1','0','','','{$user_lnl}')");
list($usr_id) = sql_fetch_row(sql_query("SELECT uid FROM " . $NPDS_Prefix . "users WHERE uname='{$uname}'"));
$result = sql_query("INSERT INTO " . $NPDS_Prefix . "users_extend VALUES ('{$usr_id}','{$C1}','{$C2}','{$C3}','{$C4}','{$C5}','{$C6}','{$C7}','{$C8}','{$M1}','{$M2}','{$T1}','{$T2}', '{$B1}')");
if ($user_sig) {
$attach = 1;
} else {
$attach = 0;
}
if ($AutoRegUser == 1 or !isset($AutoRegUser)) {
$result = sql_query("INSERT INTO " . $NPDS_Prefix . "users_status VALUES ('{$usr_id}','0','{$attach}','0','1','1','')");
} else {
$result = sql_query("INSERT INTO " . $NPDS_Prefix . "users_status VALUES ('{$usr_id}','0','{$attach}','0','1','0','')");
}
if ($result) {
if ($system == 1 or $memberpass) {
echo '<h2>' . translate("User") . '</h2>';
echo '<h2><i class="fa fa-user"></i> Inscription</h2>';
echo "<p class=\"lead\">" . translate("Your Password is: ") . "<strong>{$makepass}</strong></p>";
echo "<p class=\"lead\">" . translate("You can change it after you login at") . " : <a href=\"user.php?op=login&uname={$uname}&pass={$makepass}\"><strong>{$sitename}</strong></a></p>";
} else {
$message = "" . translate("Welcome to") . " {$sitename} !\n\n" . translate("You or someone else has used your email account") . " ({$email}) " . translate("to register an account at") . " {$sitename}.\n\n" . translate("The following is the member information:") . "\n" . translate("-Nickname: ") . " {$uname}\n" . translate("-Password: ") . " {$makepass}\n\n";
include "signat.php";
$subject = "" . translate("User Password for") . " {$uname}";
send_email($email, $subject, $message, "", true, "html");
echo '<h2>' . translate("User") . '</h2>';
echo '<h2><i class="fa fa-user"></i> Inscription</h2>';
echo '<p class="lead text-info"><i class="fa fa-exclamation"></i> ' . translate("You are now registered. You should receive your password at the email account you provided.") . '</p>';
}
//------------------------------------------------
if (file_exists("modules/include/new_user.inc")) {
include "modules/include/new_user.inc";
global $gmt;
$time = date(translate("dateinternal"), time() + $gmt * 3600);
$message = meta_lang(AddSlashes(str_replace("\n", "<br />", $message)));
$sql = "INSERT INTO " . $NPDS_Prefix . "priv_msgs (msg_image, subject, from_userid, to_userid, msg_time, msg_text) ";
$sql .= "VALUES ('', '{$sujet}', '{$emetteur_id}', '{$usr_id}', '{$time}', '{$message}')";
sql_query($sql);
}
//------------------------------------------------
//modif debut envoyer un mel à l'admin
send_email($adminmail, "Inscription sur {$sitename}", "Infos :\n Nom : {$name}\n ID : {$uname}\n Password : {$makepass}\n Email : {$email}", false, "text");
//modif pour envoyer un mel à l'admin
}
include "footer.php";
} else {
message_error($stop, "finish");
}
}
示例7: SuperCacheEmpty
$cache_obj->startCachingPage();
} else {
$cache_obj = new SuperCacheEmpty();
}
if ($cache_obj->genereting_output == 1 or $cache_obj->genereting_output == -1 or !$SuperCache) {
$title = aff_langue(stripslashes($title));
$hometext = aff_code(aff_langue(stripslashes($hometext)));
$bodytext = aff_code(aff_langue(stripslashes($bodytext)));
$notes = aff_code(aff_langue(stripslashes($notes)));
if ($notes != '') {
$notes = '<div class="note">' . translate("Note") . ' : "' . $notes . '"</div>';
}
if ($bodytext == '') {
$bodytext = meta_lang($hometext . '<br />' . $notes);
} else {
$bodytext = meta_lang($hometext . '<br />' . $bodytext . '<br />' . $notes);
}
if ($informant == '') {
$informant = $anonymous;
}
getTopics($sid);
if ($catid != 0) {
$resultx = sql_query("SELECT title FROM " . $NPDS_Prefix . "stories_cat WHERE catid='{$catid}'");
list($title1) = sql_fetch_row($resultx);
$title = '<a href="index.php?op=newindex&catid=' . $catid . '"><span class="noir">' . aff_langue($title1) . '</span></a> : ' . $title;
}
$boxtitle = translate("Related Links");
$boxstuff = '
<ul>';
$result = sql_query("SELECT name, url FROM " . $NPDS_Prefix . "related WHERE tid='{$topic}'");
while (list($name, $url) = sql_fetch_row($result)) {
示例8: faq_show
function faq_show($id_cat)
{
global $NPDS_Prefix;
push_header("suite");
$result = sql_query("select categories FROM " . $NPDS_Prefix . "faqcategories where id_cat='{$id_cat}'");
list($categories) = sql_fetch_row($result);
$categories = str_replace("'", "\\'", $categories);
echo "document.write('<p align=\"center\"><a name=\"{$id}\"></a><b>" . aff_langue($categories) . "</b></p>');\n";
$result = sql_query("select id, id_cat, question, answer from " . $NPDS_Prefix . "faqanswer where id_cat='{$id_cat}'");
while (list($id, $id_cat, $question, $answer) = sql_fetch_row($result)) {
$question = str_replace("'", "\\'", $question);
echo "document.write('<b>" . aff_langue($question) . "</b>');\n";
echo "document.write('<p align=\"justify\">" . links(convert_nl(str_replace("'", "\\'", meta_lang(aff_code(aff_langue($answer)))), "win", "html")) . "</p><br />');\n";
}
echo "document.write('.: <a href=\"javascript: history.go(0)\" style=\"font-size: 11px;\">" . push_translate("Home") . "</a> :.');\n";
push_footer();
sql_free_result($result);
}
示例9: PrintPage
function PrintPage($oper, $DB, $nl, $sid)
{
global $user, $cookie, $theme, $Default_Theme, $language, $site_logo, $sitename, $datetime, $nuke_url, $site_font, $Titlesitename;
global $NPDS_Prefix;
$aff = true;
if ($oper == 'news') {
$xtab = news_aff("libre", "where sid='{$sid}'", 1, 1);
list($sid, $catid, $aid, $title, $time, $hometext, $bodytext, $comments, $counter, $topic, $informant, $notes) = $xtab[0];
if ($topic != '') {
$result2 = sql_query("SELECT topictext FROM " . $NPDS_Prefix . "topics WHERE topicid='{$topic}'");
list($topictext) = sql_fetch_row($result2);
} else {
$aff = false;
}
}
if ($oper == 'archive') {
$xtab = news_aff("archive", "WHERE sid='{$sid}'", 1, 1);
list($sid, $catid, $aid, $title, $time, $hometext, $bodytext, $comments, $counter, $topic, $informant, $notes) = $xtab[0];
if ($topic != "") {
$result2 = sql_query("SELECT topictext FROM " . $NPDS_Prefix . "topics WHERE topicid='{$topic}'");
list($topictext) = sql_fetch_row($result2);
} else {
$aff = false;
}
}
if ($oper == "links") {
$DB = removeHack(stripslashes(htmlentities(urldecode($DB), ENT_NOQUOTES, cur_charset)));
$result = sql_query("SELECT url, title, description, date FROM " . $DB . "links_links WHERE lid='{$sid}'");
list($url, $title, $description, $time) = sql_fetch_row($result);
$title = stripslashes($title);
$description = stripslashes($description);
}
if ($oper == "static") {
if (preg_match('#^[a-z0-9_\\.-]#i', $sid) and !stristr($sid, ".*://") and !stristr($sid, "..") and !stristr($sid, "../") and !stristr($sid, "script") and !stristr($sid, "cookie") and !stristr($sid, "iframe") and !stristr($sid, "applet") and !stristr($sid, "object") and !stristr($sid, "meta")) {
if (file_exists("static/{$sid}")) {
ob_start();
include "static/{$sid}";
$remp = ob_get_contents();
ob_end_clean();
if ($DB) {
$remp = meta_lang(aff_code(aff_langue($remp)));
}
if ($nl) {
$remp = nl2br(str_replace(" ", " ", htmlentities($remp, ENT_QUOTES, cur_charset)));
}
$title = $sid;
} else {
$aff = false;
}
} else {
$remp = "<p align=\"center\" class=\"rouge\">" . translate("Please enter information according to the specifications") . "</p><br />";
$aff = false;
}
}
if ($aff == true) {
$Titlesitename = "NPDS - " . translate("Printer Friendly Page") . " / " . $title;
if (isset($time)) {
formatTimestamp($time);
}
include "meta/meta.php";
if (isset($user)) {
if ($cookie[9] == "") {
$cookie[9] = $Default_Theme;
}
if (isset($theme)) {
$cookie[9] = $theme;
}
$tmp_theme = $cookie[9];
if (!($file = @opendir("themes/{$cookie['9']}"))) {
$tmp_theme = $Default_Theme;
}
} else {
$tmp_theme = $Default_Theme;
}
echo import_css($tmp_theme, $language, $site_font, "", "");
echo "\n </head>\n <body style=\"background-color: #FFFFFF; background-image: none;\">\n <table border=\"0\"><tr><td>\n <table border=\"0\" width=\"640\" cellpadding=\"0\" cellspacing=\"1\" style=\"background-color: #000000;\"><tr><td>\n <table border=\"0\" width=\"640\" cellpadding=\"20\" cellspacing=\"1\" style=\"background-color: #FFFFFF;\"><tr><td>";
echo "<p align=\"center\">";
$pos = strpos($site_logo, "/");
if ($pos) {
echo "<img src=\"{$site_logo}\" border=\"0\" alt=\"\" />";
} else {
echo "<img src=\"images/{$site_logo}\" border=\"0\" alt=\"\" />";
}
echo "<br /><br /><b>" . aff_langue($title) . "</b><br /><br />";
if ($oper == "news" or $oper == "archive") {
$hometext = meta_lang(aff_code(aff_langue($hometext)));
$bodytext = meta_lang(aff_code(aff_langue($bodytext)));
echo "<span style=\"font-size: 10px;\"><b>" . translate("Date:") . "</b> {$datetime} :: <b>" . translate("Topic:") . "</b> " . aff_langue($topictext) . "<br /><br />\n </span></p>{$hometext}<br /><br />";
if ($bodytext != '') {
echo "{$bodytext}<br /><br />";
}
echo meta_lang(aff_code(aff_langue($notes)));
if ($oper == "news") {
echo "</td></tr><tr><td><br /><br /><br /><hr noshade=\"noshade\" class=\"ongl\" /><br />\n <p align=\"center\">" . translate("This article comes from") . " {$sitename}<br /><br />\n " . translate("The URL for this story is:") . "\n <a href=\"{$nuke_url}/article.php?sid={$sid}\">{$nuke_url}/article.php?sid={$sid}</a></p>";
} else {
echo "</td></tr><tr><td><br /><br /><br /><hr noshade=\"noshade\" class=\"ongl\" /><br />\n <p align=\"center\">" . translate("This article comes from") . " {$sitename}<br /><br />\n " . translate("The URL for this story is:") . "\n <a href=\"{$nuke_url}/article.php?sid={$sid}&archive=1\">{$nuke_url}/article.php?sid={$sid}&archive=1</a></p>";
}
}
if ($oper == "links") {
echo "<span style=\"font-size: 10px;\"><b>" . translate("Date:") . "</b> {$datetime}";
//.........這裏部分代碼省略.........
示例10: fopen
}
$Fcontent = "";
if (strstr($Xcontent, "!l_footer!")) {
$l_fic = $dir . "footer.html";
if (file_exists($l_fic)) {
$fp = fopen($l_fic, "r");
if (filesize($l_fic) > 0) {
$Fcontent = convert_ressources(fread($fp, filesize($l_fic)));
}
fclose($fp);
}
}
if ($adminblog and strstr($Xcontent, "!l_blog_ajouter!")) {
$blog_ajouter = "!l_blog_ajouterOK!";
} else {
$blog_ajouter = "";
}
$Xcontent = convert_ressources($Xcontent);
// Meta-lang et removehack local
$MNS_METALANG_words = array("'!l_header!'i" => "{$Hcontent}", "'!l_footer!'i" => "{$Fcontent}", "'!blog_page!{$perpage}'i" => "", "'!l_compteur!'i" => "{$cpt}", "'!l_new_pages!'i" => "{$new_pages}", "'!l_blog_ajouter!'i" => "{$blog_ajouter}", "'!blog!'i" => "{$content}", "'!copyright!'i" => "{$copyright}");
$Xcontent = preg_replace(array_keys($MNS_METALANG_words), array_values($MNS_METALANG_words), $Xcontent);
$Xcontent = meta_lang(MNSremoveHack($Xcontent));
//applique aff_video que sur la partie affichage
$rupt = strpos($Xcontent, "!v_yt!");
echo substr($Xcontent, 0, $rupt);
echo aff_video_yt(substr($Xcontent, $rupt + 6));
echo '
</body>
</html>';
}
}
示例11: Test
function Test($Yheader, $Ybody, $Yfooter)
{
global $hlpfile;
global $NPDS_Prefix;
include "header.php";
GraphicAdmin($hlpfile);
opentable();
// $type = HED or FOT
$result = sql_query("SELECT text, html FROM " . $NPDS_Prefix . "lnl_head_foot WHERE type='HED' and ref='{$Yheader}'");
$Xheader = sql_fetch_row($result);
$result = sql_query("SELECT text, html FROM " . $NPDS_Prefix . "lnl_body WHERE html='{$Xheader['1']}' and ref='{$Ybody}'");
$Xbody = sql_fetch_row($result);
$result = sql_query("SELECT text, html FROM " . $NPDS_Prefix . "lnl_head_foot WHERE type='FOT' and html='{$Xheader['1']}' and ref='{$Yfooter}'");
$Xfooter = sql_fetch_row($result);
// For Meta-Lang
global $cookie;
$uid = $cookie[0];
if ($Xheader[1] == 1) {
echo "<table width=\"100%\" cellspacing=\"2\" cellpadding=\"2\" border=\"0\"><tr><td class=\"header\">\n";
echo adm_translate("Prévisualiser") . " HTML";
echo "</td></tr></table>\n";
echo "<br />\n";
$Xmime = "html-nobr";
$message = meta_lang($Xheader[0] . $Xbody[0] . $Xfooter[0]);
} else {
echo "<table width=\"100%\" cellspacing=\"2\" cellpadding=\"2\" border=\"0\"><tr><td class=\"header\">\n";
echo adm_translate("Prévisualiser") . " " . adm_translate("TEXTE") . "";
echo "</td></tr></table>\n";
echo "<br />\n";
$Xmime = "text";
$message = meta_lang(nl2br($Xheader[0]) . nl2br($Xbody[0]) . nl2br($Xfooter[0]));
}
echo $message;
echo "<br /><br />\n";
echo "[ <a href=\"javascript:history.go(-1)\" class=\"noir\">" . adm_translate("Retour en arriére") . "</a> ]";
closetable();
global $adminmail;
send_email($adminmail, "LNL TEST", $message, "", true, $Xmime);
include "footer.php";
}
示例12: PrintSecPage
function PrintSecPage($artid)
{
global $NPDS_Prefix, $user, $cookie, $theme, $Default_Theme, $site_logo, $sitename, $nuke_url, $language, $site_font, $Titlesitename;
include "meta/meta.php";
if (isset($user)) {
if ($cookie[9] == '') {
$cookie[9] = $Default_Theme;
}
if (isset($theme)) {
$cookie[9] = $theme;
}
$tmp_theme = $cookie[9];
if (!($file = @opendir("themes/{$cookie['9']}"))) {
$tmp_theme = $Default_Theme;
}
} else {
$tmp_theme = $Default_Theme;
}
echo import_css($tmp_theme, $language, $site_font, "", "");
echo '
</head>
<body style="background-color: #FFFFFF; background-image: none;">
<p class="text-xs-center">';
$pos = strpos($site_logo, "/");
if ($pos) {
echo '<img src="' . $site_logo . '" border="0" alt="" />';
} else {
echo '<img src="images/' . $site_logo . '" border="0" alt="" />';
}
$result = sql_query("SELECT title, content FROM " . $NPDS_Prefix . "seccont WHERE artid='{$artid}'");
list($title, $content) = sql_fetch_row($result);
echo '<br /><br /><strong>' . aff_langue($title) . '</strong><br /><br /></p>';
$content = aff_code(aff_langue($content));
$pos_page = strpos($content, "[page");
if ($pos_page) {
$content = str_replace("[page", str_repeat("-", 50) . " [page", $content);
}
echo meta_lang($content);
echo '
<hr />
<p class="text-xs-center">
' . translate("This article comes from") . ' ' . $sitename . '<br /><br />
' . translate("The URL for this story is:") . '
<a href="' . $nuke_url . '/sections.php?op=viewarticle&artid=' . $artid . '">' . $nuke_url . '/sections.php?op=viewarticle&artid=' . $artid . '</a>
</p>
</body>
</html>';
}
示例13: FaqCatGoEdit
function FaqCatGoEdit($id)
{
global $hlpfile, $NPDS_Prefix, $local_user_language, $admf_ext, $f_meta_nom, $f_titre, $adminimg;
include "header.php";
GraphicAdmin($hlpfile);
$result = sql_query("SELECT fa.question, fa.answer, fa.id_cat, fc.categories FROM " . $NPDS_Prefix . "faqanswer fa LEFT JOIN " . $NPDS_Prefix . "faqcategories fc ON fa.id_cat = fc.id_cat WHERE fa.id='{$id}'");
list($question, $answer, $id_cat, $faq_cat) = sql_fetch_row($result);
adminhead($f_meta_nom, $f_titre, $adminimg);
echo '
<hr />
<h3>' . $faq_cat . '</h3>
<h4>' . $question . '</h4>
<h4>' . adm_translate("Prévisualiser") . '</h4>';
echo '
<label class="form-control-label" for="">' . aff_local_langue(adm_translate("Langue de Prévisualisation"), '', 'local_user_language') . '
</label>
<div class="card card-block">
<p>' . preview_local_langue($local_user_language, $question) . '</p>';
$answer = aff_code($answer);
echo '<p>' . meta_lang(preview_local_langue($local_user_language, $answer)) . '</p>
</div>';
echo '
<h4>' . adm_translate("Editer Question & Réponse") . '</h4>
<form action="admin.php" method="post" name="adminForm">
<fieldset>
<div class="form-group row">
<label class="form-control-label col-xs-12" for="question">' . adm_translate("Question") . '</label>
<div class="col-sm-12">
<textarea class="form-control" type="text" name="question" id="question" maxlength="255">' . $question . '</textarea>
<span class="help-block text-xs-right"><span id="countcar_question"></span></span>
</div>
</div>
<div class="form-group row">
<label class="form-control-label col-xs-12" for="answer">' . adm_translate("Réponse") . '</label>
<div class="col-sm-12">
<textarea class="tin form-control" name="answer" rows="15">' . $answer . '</textarea>
</div>
</div>
' . aff_editeur('answer', '') . '
<div class="form-group row">
<div class="col-sm-12">
<input type="hidden" name="id" value="' . $id . '" />
<input type="hidden" name="op" value="FaqCatGoSave" />
<button class="btn btn-outline-primary col-xs-12 col-sm-6" type="submit"><i class="fa fa-check-square fa-lg"></i> ' . adm_translate("Sauver les modifications") . '</button>
<button class="btn btn-outline-secondary col-xs-12 col-sm-6" href="admin.php?op=FaqCatGo&id_cat=' . $id_cat . '" >' . adm_translate("Retour en arrière") . '</a>
</div>
</div>
</fieldset>
</form>
<script type="text/javascript">
//<![CDATA[
$(document).ready(function() {
inpandfieldlen("question",255);
});
//]]>
</script>';
adminfoot('fv', '', '', '');
}
示例14: PrintPage
function PrintPage($oper, $DB, $nl, $sid)
{
global $user, $cookie, $theme, $Default_Theme, $language, $site_logo, $sitename, $datetime, $nuke_url, $site_font, $Titlesitename;
global $NPDS_Prefix;
$aff = true;
if ($oper == 'news') {
$xtab = news_aff('libre', "where sid='{$sid}'", 1, 1);
list($sid, $catid, $aid, $title, $time, $hometext, $bodytext, $comments, $counter, $topic, $informant, $notes) = $xtab[0];
if ($topic != '') {
$result2 = sql_query("SELECT topictext FROM " . $NPDS_Prefix . "topics WHERE topicid='{$topic}'");
list($topictext) = sql_fetch_row($result2);
} else {
$aff = false;
}
}
if ($oper == 'archive') {
$xtab = news_aff('archive', "WHERE sid='{$sid}'", 1, 1);
list($sid, $catid, $aid, $title, $time, $hometext, $bodytext, $comments, $counter, $topic, $informant, $notes) = $xtab[0];
if ($topic != '') {
$result2 = sql_query("SELECT topictext FROM " . $NPDS_Prefix . "topics WHERE topicid='{$topic}'");
list($topictext) = sql_fetch_row($result2);
} else {
$aff = false;
}
}
if ($oper == 'links') {
$DB = removeHack(stripslashes(htmlentities(urldecode($DB), ENT_NOQUOTES, cur_charset)));
$result = sql_query("SELECT url, title, description, date FROM " . $DB . "links_links WHERE lid='{$sid}'");
list($url, $title, $description, $time) = sql_fetch_row($result);
$title = stripslashes($title);
$description = stripslashes($description);
}
if ($oper == 'static') {
if (preg_match('#^[a-z0-9_\\.-]#i', $sid) and !stristr($sid, ".*://") and !stristr($sid, "..") and !stristr($sid, "../") and !stristr($sid, 'script') and !stristr($sid, "cookie") and !stristr($sid, 'iframe') and !stristr($sid, 'applet') and !stristr($sid, 'object') and !stristr($sid, 'meta')) {
if (file_exists("static/{$sid}")) {
ob_start();
include "static/{$sid}";
$remp = ob_get_contents();
ob_end_clean();
if ($DB) {
$remp = meta_lang(aff_code(aff_langue($remp)));
}
if ($nl) {
$remp = nl2br(str_replace(' ', ' ', htmlentities($remp, ENT_QUOTES, cur_charset)));
}
$title = $sid;
} else {
$aff = false;
}
} else {
$remp = '<div class="alert alert-danger">' . translate("Please enter information according to the specifications") . '</div>';
$aff = false;
}
}
if ($aff == true) {
$Titlesitename = 'NPDS - ' . translate("Printer Friendly Page") . ' / ' . $title;
if (isset($time)) {
formatTimestamp($time);
}
include "meta/meta.php";
if (isset($user)) {
if ($cookie[9] == '') {
$cookie[9] = $Default_Theme;
}
if (isset($theme)) {
$cookie[9] = $theme;
}
$tmp_theme = $cookie[9];
if (!($file = @opendir("themes/{$cookie['9']}"))) {
$tmp_theme = $Default_Theme;
}
} else {
$tmp_theme = $Default_Theme;
}
echo '
<link rel="stylesheet" href="lib/bootstrap/dist/css/bootstrap.min.css" />';
echo import_css($tmp_theme, $language, $site_font, '', '');
echo '
</head>
<body>
<div max-width="640" class="container p-1 n-hyphenate">
<div>';
$pos = strpos($site_logo, '/');
if ($pos) {
echo '<img class="img-fluid d-block mx-auto" src="' . $site_logo . '" alt="website logo" />';
} else {
echo '<img class="img-fluid d-block mx-auto" src="images/' . $site_logo . '" alt="website logo" />';
}
echo '
<h1 class="d-block text-xs-center my-2">' . aff_langue($title) . '</h1>';
if ($oper == 'news' or $oper == 'archive') {
$hometext = meta_lang(aff_code(aff_langue($hometext)));
$bodytext = meta_lang(aff_code(aff_langue($bodytext)));
echo '
<span class="float-xs-right text-capitalize" style="font-size: .8rem;"> ' . $datetime . '</span><br />
<hr />
<h2 class="mb-1">' . translate("Topic:") . ' ' . aff_langue($topictext) . '</h2>
</div>
<div>' . $hometext . '<br /><br />';
if ($bodytext != '') {
//.........這裏部分代碼省略.........
示例15: forum
//.........這裏部分代碼省略.........
$Mmod = true;
}
}
$last_post = get_last_post($myrow['forum_id'], "forum", "infos", $Mmod);
$ibid .= '
<tr align="left" valign="top">';
if ($tab_folder[$myrow['forum_id']][0] - $tab_folder[$myrow['forum_id']][1] > 0) {
$ibid .= '
<td class="lignb" align="center" valign="middle" width="5%"><img src="' . $imgtmpR . '" border="" alt="" /></td>';
} else {
$ibid .= '
<td class="lignb" align="center" valign="middle" width="5%"><img src="' . $imgtmp . '" border="" alt="" /></td>';
}
$name = stripslashes($myrow['forum_name']);
$redirect = false;
if (strstr(strtoupper($name), "<a HREF")) {
if ($colspanX == 7) {
$ibid .= '
<td width="40%" class="ligna" ' . $linked . '>' . $name;
} else {
$ibid .= '
<td width="45%" class="ligna" ' . $linked . '>' . $name;
}
$redirect = true;
} else {
if ($colspanX == 7) {
$ibid .= '
<td width="40%" class="ligna" ' . $linked . ' onclick=\'window.location.href="viewforum.php?forum=' . $myrow['forum_id'] . '"\'><a href="viewforum.php?forum=' . $myrow['forum_id'] . '" >' . $name . '</a>';
} else {
$ibid .= '
<td width="45%" class="ligna" ' . $linked . ' onclick=\'window.location.href="viewforum.php?forum=' . $myrow['forum_id'] . '"\'><a href="viewforum.php?forum=' . $myrow['forum_id'] . '" >' . $name . '</a>';
}
}
$desc = stripslashes(meta_lang($myrow['forum_desc']));
$ibid .= '<br />' . $desc . '</td>';
// Subscribe
if ($subscribe and $user) {
if (!$redirect) {
if ($tab_subscribe[$myrow['forum_id']]) {
$ibid .= '
<td class="lignb" width="5%" align="center" valign="middle"><input type="checkbox" name="Subforumid[' . $myrow['forum_id'] . ']" checked="checked" /></td>';
} else {
$ibid .= '
<td class="lignb" width="5%" align="center" valign="middle"><input type="checkbox" name="Subforumid[' . $myrow['forum_id'] . ']" /></td>';
}
} else {
$ibid .= '
<td class="lignb" width="5%" align="center" valign="middle"> </td>';
}
}
if (!$redirect) {
$ibid .= '
<td width="15%" align="center" valign="middle" class="ligna">';
if ($myrow['forum_access'] == "0" && $myrow['forum_type'] == "0") {
$ibid .= translate("Free for All");
}
if ($myrow['forum_type'] == "1") {
$ibid .= translate("Private");
}
if ($myrow['forum_type'] == "5") {
$ibid .= "PHP Script + " . translate("Group");
}
if ($myrow['forum_type'] == "6") {
$ibid .= "PHP Script";
}
if ($myrow['forum_type'] == "7") {