Jump to content

[SOLVED] THINGS DUPLICATING


TGWSE_GY

Recommended Posts

Okay, everything is duplicating multiple times when this script runs, I have checked and checked and trippled checked. It should not be happening, there are two files here

 

maineditor.php

<?php	
//Get database connectiong config
include('config.php');

$tbl = "jamsmag_reviews";

//Get title from db
$query = "SELECT * FROM $tbl ORDER BY id DESC LIMIT 1";
$result = mysql_query($query) or die(mysql_error());
$resultarray = mysql_fetch_assoc($result) or die(mysql_error());
$title = $resultarray['title'];
$article = $resultarray['article'];
$summary = $resultarray['summary'];



$search = "src=\"images";
$replace = "src=\"http://hmtotc.com/dev/projects/VRassoc/soundsurfer.biz/images";
$article_edited = str_replace($search, $replace, $article);
$article = $article_edited;

//Title
$oFCKeditor = new FCKeditor('title') ;
$oFCKeditor->ToolbarSet = 'title';
$oFCKeditor->Width = '75%' ;
$oFCKeditor->Height = '20' ;
$oFCKeditor->BasePath = '' ;
$oFCKeditor->Value = $title ;
$oFCKeditor->Create() ;

//Article
$oFCKeditor = new FCKeditor('article') ;
$oFCKeditor->ToolbarSet = 'article';
$oFCKeditor->Width = '100%' ;
$oFCKeditor->Height = '512' ;
$oFCKeditor->BasePath = '' ;
$oFCKeditor->Value = $article ;
$oFCKeditor->Create() ;

//Summary
$oFCKeditor = new FCKeditor('summary') ;
$oFCKeditor->ToolbarSet = 'summary';
$oFCKeditor->Width = '100%' ;
$oFCKeditor->Height = '100' ;
$oFCKeditor->BasePath = '' ;
$oFCKeditor->Value = $summary ;
$oFCKeditor->Create() ;U
?>

 

and news.php

 <?php	
//Get database connectiong config
include('config.php');

$tbl = "jamsmag_news";

//Get title from db
$query = "SELECT * FROM $tbl ORDER BY id DESC LIMIT 1";
$result = mysql_query($query) or (mysql_error());
$resultarray = mysql_fetch_assoc($result) or (mysql_error());
$title = $resultarray['title'];
$article = $resultarray['article'];
$summary = $resultarray['summary'];



$search = "src=\"images";
$replace = "src=\"http://hmtotc.com/dev/projects/VRassoc/soundsurfer.biz/images";
$article_edited = str_replace($search, $replace, $article);
$article = $article_edited;

//Title
echo "<center><h2>TITLE</h2></center>";
$oFCKeditor = new FCKeditor('title') ;
$oFCKeditor->ToolbarSet = 'title';
$oFCKeditor->Width = '100%' ;
$oFCKeditor->Height = '20%' ;
$oFCKeditor->BasePath = '' ;
$oFCKeditor->Value = $title ;
$oFCKeditor->Create() ;

//Article
echo "<center><h2>ARTICLE</h2></center>";
$oFCKeditor = new FCKeditor('article') ;
$oFCKeditor->ToolbarSet = 'article';
$oFCKeditor->Width = '100%' ;
$oFCKeditor->Height = '512' ;
$oFCKeditor->BasePath = '' ;
$oFCKeditor->Value = $article ;
$oFCKeditor->Create() ;

//Summary
echo "<center><h2>SUMMARY</h2></center>";
$oFCKeditor = new FCKeditor('summary') ;
$oFCKeditor->ToolbarSet = 'summary';
$oFCKeditor->Width = '100%' ;
$oFCKeditor->Height = '50%' ;
$oFCKeditor->BasePath = '' ;
$oFCKeditor->Value = $summary ;
$oFCKeditor->Create() ;
?>

 

Also here is a link so you can see what is going on

http://www.hmtotc.com/dev/projects/VRassoc/jamsmagazine.com/admin/classes/forms/maineditor.php?section=edit_news

 

For the world of me I cannot seem to see where the problem is. As this works on another domain with no issues whatsoever.

 

Thanks Guys! :facewall: :facewall: :facewall: :facewall: :facewall:::)

Link to comment
https://forums.phpfreaks.com/topic/170668-solved-things-duplicating/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.