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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.