1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-02 04:40:44 +02:00

adding appropriate exit;

This commit is contained in:
mcfly
2007-12-28 01:17:00 +00:00
parent 65fb9372b9
commit 1337dd750f
2 changed files with 16 additions and 7 deletions

View File

@@ -11,8 +11,8 @@
| GNU General Public License (http://gnu.org). | GNU General Public License (http://gnu.org).
| |
| $Source: /cvs_backup/e107_0.8/content.php,v $ | $Source: /cvs_backup/e107_0.8/content.php,v $
| $Revision: 1.1.1.1 $ | $Revision: 1.2 $
| $Date: 2006-12-02 04:33:02 $ | $Date: 2007-12-28 01:17:00 $
| $Author: mcfly_e107 $ | $Author: mcfly_e107 $
+----------------------------------------------------------------------------+ +----------------------------------------------------------------------------+
*/ */
@@ -30,6 +30,7 @@ if($content_install = $sql -> db_Select("plugin", "*", "plugin_path = 'content'
//this will only work if the three main parents are not renamed ! //this will only work if the three main parents are not renamed !
if(!$sql -> db_Select("pcontent", "content_id", "content_heading='".$tp -> toDB($tmp[0])."'")){ if(!$sql -> db_Select("pcontent", "content_id", "content_heading='".$tp -> toDB($tmp[0])."'")){
header("location:".e_PLUGIN."content/content.php"); header("location:".e_PLUGIN."content/content.php");
exit;
}else{ }else{
$row = $sql -> db_Fetch(); $row = $sql -> db_Fetch();
} }
@@ -39,9 +40,10 @@ if($content_install = $sql -> db_Select("plugin", "*", "plugin_path = 'content'
$tmp[1] = intval($tmp[1]); $tmp[1] = intval($tmp[1]);
header("location:".e_PLUGIN."content/content.php?content.".$tmp[1]); header("location:".e_PLUGIN."content/content.php?content.".$tmp[1]);
exit;
}else{ //content recent page }else{ //content recent page
header("location:".e_PLUGIN."content/content.php?recent.".$row['content_id']); header("location:".e_PLUGIN."content/content.php?recent.".$row['content_id']);
exit;
} }
}elseif ($tmp[0] == "article" || $tmp[0] == "review") { }elseif ($tmp[0] == "article" || $tmp[0] == "review") {
@@ -49,6 +51,7 @@ if($content_install = $sql -> db_Select("plugin", "*", "plugin_path = 'content'
if (is_numeric($tmp[1])) { //item view if (is_numeric($tmp[1])) { //item view
$tmp[1] = intval($tmp[1]); $tmp[1] = intval($tmp[1]);
header("location:".e_PLUGIN."content/content.php?content.".$tmp[1]); header("location:".e_PLUGIN."content/content.php?content.".$tmp[1]);
exit;
}elseif($tmp[1] == "cat" ) { //category page }elseif($tmp[1] == "cat" ) { //category page
@@ -56,18 +59,23 @@ if($content_install = $sql -> db_Select("plugin", "*", "plugin_path = 'content'
//$mainparent = $aa -> getMainParent($tmp[2]); //$mainparent = $aa -> getMainParent($tmp[2]);
//header("location:".e_PLUGIN."content/content.php?cat.list.".$mainparent.""); //header("location:".e_PLUGIN."content/content.php?cat.list.".$mainparent."");
header("location:".e_PLUGIN."content/content.php"); header("location:".e_PLUGIN."content/content.php");
exit;
}else{ //view category }else{ //view category
header("location:".e_PLUGIN."content/content.php?cat.".$tmp[2]); header("location:".e_PLUGIN."content/content.php?cat.".$tmp[2]);
exit;
} }
} else { //recent page } else { //recent page
header("location:".e_PLUGIN."content/content.php?recent.".$row['content_id']); header("location:".e_PLUGIN."content/content.php?recent.".$row['content_id']);
exit;
} }
}else{ //redirect to new content main page }else{ //redirect to new content main page
header("location:".e_PLUGIN."content/content.php"); header("location:".e_PLUGIN."content/content.php");
exit;
} }
} }
//##### END REDIRECTION MANAGEMENT ------------------------------------------------------------------------- //##### END REDIRECTION MANAGEMENT -------------------------------------------------------------------------
header("location:".e_BASE."index.php");
exit;
?> ?>

View File

@@ -11,8 +11,8 @@
| GNU General Public License (http://gnu.org). | GNU General Public License (http://gnu.org).
| |
| $Source: /cvs_backup/e107_0.8/subcontent.php,v $ | $Source: /cvs_backup/e107_0.8/subcontent.php,v $
| $Revision: 1.1.1.1 $ | $Revision: 1.2 $
| $Date: 2006-12-02 04:33:09 $ | $Date: 2007-12-28 01:17:00 $
| $Author: mcfly_e107 $ | $Author: mcfly_e107 $
+----------------------------------------------------------------------------+ +----------------------------------------------------------------------------+
*/ */
@@ -21,8 +21,9 @@ require_once("class2.php");
//redirection to new content management plugin if it is installed //redirection to new content management plugin if it is installed
if ($sql -> db_Select("plugin", "*", "plugin_path = 'content' AND plugin_installflag = '1' ")){ if ($sql -> db_Select("plugin", "*", "plugin_path = 'content' AND plugin_installflag = '1' ")){
header("location:".e_PLUGIN."content/content_submit.php"); header("location:".e_PLUGIN."content/content_submit.php");
exit;
} else { } else {
header("location:".e_BASE."index.php"); header("location:".e_BASE."index.php");
exit;
} }
?> ?>