PDA

View Full Version : My Site Appears to be going insane


Abronsyth
03-22-2012, 02:13 PM
...well, first, the theme keeps randomly changing it's colors or certain random bits of it. I checked the CSS, it's fine. Then, randomly one of the adoptables I put up (which I have the currency to afford) disappeared. It's still in the database, but it's not showing up. Then, it was saying that a pet I'd not clicked before has already been clicked by me. Several of my users reported the same things happening. The config.php is fine, my databases and tables are in order, so I have no idea what's going on.

Well, if anyone has a clue of what to do, please help.

EDIT:
Okay, all apparently is now working as it should be...gosh, this is peculiar!

Hall of Famer
03-22-2012, 03:11 PM
umm this is weird. My first thought was that your site was hacked, but... What do you mean by the theme colors keep changing randomly? I do not suppose it is even possible for a hacker to attempt this, especially when the css is unchanged(which means no one has touched the css file). Please keep an eye on this and take a screenshot if it ever happens again. Other than looking at the database, you may want to look at the logs from cPanel to see if any suspicious visitors have accessed your sites.

Abronsyth
03-23-2012, 01:51 PM
Well, everything has settled down. However, a knew, strange problem has occurred. I can no longer login. I tried resetting my password, but it doesn't seem to want to work. Just in case someone has figured out my password and hacked into my account, I changed the account to a regular member instead of admin for now...

I reset my password, got the email, then tried logging in with the new password, and it says I've entered an incorrect password. Any idea as to what may be going on..?

Edit:
Also, when trying to change my password, I get this error (I'm using a different account...)

Warning: Missing argument 3 for passencr(), called in /home/archurub/public_html/accountpost.php on line 79 and defined in /home/archurub/public_html/functions/functions.php on line 105

Warning: Missing argument 3 for passencr(), called in /home/archurub/public_html/accountpost.php on line 80 and defined in /home/archurub/public_html/functions/functions.php on line 105

Warning: Missing argument 3 for passencr(), called in /home/archurub/public_html/accountpost.php on line 81 and defined in /home/archurub/public_html/functions/functions.php on line 105

Hall of Famer
03-23-2012, 03:33 PM
umm you cannot log in? Did this just happen to you or all your members?

Anyway the new forgotpass.php and accountpost.php files are uploaded in the Mys v1.3.0 thread. You can find them here:
http://www.mysidiaadoptables.com/forum/showthread.php?p=22020#post22020

Note: This glitch will be fixed in Mys v1.3.1.

Abronsyth
03-23-2012, 03:53 PM
Okay, it's working now :)

Thanks,
HoF

Hall of Famer
03-23-2012, 04:09 PM
You are very welcome iris. Would you mind telling me if it was only you who could not log in, or that everyone from your site is having the same problem?

Abronsyth
03-23-2012, 04:54 PM
No one else has reported any problems, and I could use my Test account just fine. Somehow my password was changed to something I didn't know, and I was unable to change it back, so I was unable to login. It's been solved and I made my password even more impossible to guess...so hopefully I won't come into any more problems. :)

Oh, and on a very off-topic note, the banner in your signature looks lovely :)

Hall of Famer
03-23-2012, 04:59 PM
Ah I see, please do inform me if you are ever hacked again. I believe the script at this point uses secure password encryption that only world-class hackers can decode(those who can hack into government sites).

Oh thanks, this actually is the leading banner candidate of Mysidia Adoptables' new homepage. We will update you guys/gals once the new site is launched.

Abronsyth
03-23-2012, 05:08 PM
Hm, HoF, not really the place to tell you, but it seems that the image codes do not want to work...on every site, the adoptable is not showing up D: Below I am inserting the code for one of my pets from my site:
http://www.archurub.com/siggy.php?id=10 (http://www.archurub.com/levelup.php?id=10)

Can you see it? Here is the code itself:
http://www.archurub.com/siggy.php?id=10 (http://www.archurub.com/levelup.php?id=10)

Um...for me, not even the code can be seen...can you see it..?

EDIT:
Tried it on several sites, IE, and Fire Fox, and it doesn't show on any of them. Here is the code with stars placed in it:
http://www.archurub.com/siggy.php?id=10

EDIT again:
Oh, and there is a glitch where, when viewing an adoptable, it says that it is at it's maximum level, even if it is not.
See:
http://i1217.photobucket.com/albums/dd382/Iris-red-knee/GLITCHS.png

Tequila
03-23-2012, 05:19 PM
There is an asterisk (*) in the <img> tag. ;3

Abronsyth
03-23-2012, 05:29 PM
Nyxi, in the second part of my post, under the 'code' tags, I purposly put the asterisks in it so that the code itself can be seen, since it's not showing up for me...can you see any images up there? Or anything in the code area?

Tequila
03-23-2012, 05:35 PM
Ack, hm, could you post the whole part in a php tag? I can take a look there. I know that there were problems with the old versions on that as well...

Abronsyth
03-23-2012, 05:41 PM
Whole part of what? The myadopts.php?

<?php

include("functions/functions.php");
include("functions/functions_users.php");
include("functions/functions_adopts.php");
include("classes/class_pagination.php");
include("css/pagination.css");
include("inc/lang.php");

//***************//
// START SCRIPT //
//***************//

$id = $_GET["id"];
$act = $_GET["act"];
$more = $_GET["more"];
$page = $_GET["page"];

if($isloggedin == "yes")
{
if($act == "")
{
$article_title = "Your Collection";
// We need to get all of the user's adoptables from the database and display them...
$query = "SELECT * FROM {$prefix}owned_adoptables,
{$prefix}adoptables,
{$prefix}levels WHERE {$prefix}owned_adoptables.owner = '{$loggedinname}'
AND {$prefix}adoptables.type = {$prefix}owned_adoptables.type
AND {$prefix}levels.thisislevel = {$prefix}owned_adoptables.currentlevel
AND {$prefix}levels.adoptiename = {$prefix}adoptables.type
ORDER BY {$prefix}owned_adoptables.totalclicks";
$rowsperpage = 5;
$pagination = new Pagination($adopts, $query, $rowsperpage, "http://www.{$domain}{$scriptpath}/myadopts.php");
$pagination->setPage($_GET[page]);
$query = "SELECT * FROM {$prefix}owned_adoptables,
{$prefix}adoptables,
{$prefix}levels WHERE {$prefix}owned_adoptables.owner = '{$loggedinname}'
AND {$prefix}adoptables.type = {$prefix}owned_adoptables.type
AND {$prefix}levels.thisislevel = {$prefix}owned_adoptables.currentlevel
AND {$prefix}levels.adoptiename = {$prefix}adoptables.type
ORDER BY {$prefix}owned_adoptables.totalclicks LIMIT {$pagination->getLimit()},{$rowsperpage}";
$stmt = $adopts->query($query);


$article_content = "<table>
<tr>
<th></th><th>Name and Species</th><th>Image</th><th>Clicks</th>
</tr>";

while($row = $stmt->fetchObject()){
if($row->usealternates == 'yes') $image = $row->alternateimage;
else $image = $row->primaryimage;
if($row->currentlevel == 0) $image = $row->eggimage;
if($image=='') $image = $row->primaryimage;

$article_content .= "<tr>
<td><center><img src='picuploads/{$row->gender}.png'></center></td>
<td><center><em>{$row->name}</em> the {$row->type}</center></td>
<td><center><a href='myadopts.php?act=manage&id={$row->aid}'><img src='{$image}'></a></center></td>
<td><center>{$row->totalclicks}</center></td>
</tr>";
}
$article_content .= "</table><br /><br />{$pagination->showPage()}";
}
elseif($act == "manage")
{
// We are managing a specific adoptable

if(!is_numeric($id))
{
$article_title = $err_idnoexist;
$article_content = $err_idnoexist_text;
}
else
{
// See if the adoptable actually exists...

$stmt = $adopts->query("SELECT * FROM {$prefix}owned_adoptables WHERE owner='{$loggedinname}' and aid='{$id}'");
$row = $stmt->fetchObject();

// Check that the adoptable exists for real, or show an error...

if($row->aid == $id)
{
// The adoptable does exist, so we show the image and junk to the user...

$image = getcurrentimage($id);

$article_title = "Managing {$row->name}";
$article_content = "<img src='{$image}'><br /><br />This page allows you to manage {$row->name}. Click on an option below to change settings.<br /><br />
<b><a href='levelup.php?id={$id}'><img src='templates/icons/add.gif' border=0> Level Up {$row->name}</a><br />
<a href='myadopts.php?act=stats&id={$id}'><img src='templates/icons/stats.gif' border=0> Get Stats for {$row->name}</a><br />
<a href='myadopts.php?act=bbcode&id={$id}'><img src='templates/icons/bbcodes.gif' border=0> Get BBCodes / HTML Codes for {$row->name}</a><br />
<a href='myadopts.php?act=rename&id={$id}'><img src='templates/icons/title.gif' border=0> Rename {$row->name}</a><br />
<a href='myadopts.php?act=trade&id={$id}'><img src='templates/icons/trade.gif' border=0> Change Trade Status {$row->name}</a><br />
<a href='myadopts.php?act=freeze&id={$id}'><img src='templates/icons/freeze.gif' border=0> Freeze or Unfreeze {$row->name}</a><br />
<a href='myadopts.php?act=pound&id={$id}'><img src='templates/icons/delete.gif' border=0> Pound {$row->name}</a></b>";
}
else
{
$article_title = $err_idnoexist;
$article_content = $err_idnoexist_text;
}
}
} // End the MANAGE action code
elseif($act == "stats")
{
// We are getting the stats for the adoptable
// Check that an ID was submitted...
if(is_numeric($id))
{
// Now we see if the adoptable actually exists...

$stmt = $adopts->query("SELECT * FROM {$prefix}owned_adoptables WHERE owner='{$loggedinname}' and aid='{$id}'");
$row = $stmt->fetchObject();

if($row->aid == $id){
// The adoptable exists, so we show the stats for it...

$image = getcurrentimage($id);
$nextlevelexists = getnextlevelexists($type, $currentlevel);

// If a higher level exists, get that level's information...

if($nextlevelexists == "true"){
$nextlevel = $currentlevel + 1;

$stmt = $adopts->query("SELECT * FROM {$prefix}levels WHERE adoptiename='{$type}' and thisislevel='{$nextlevel}'");
$levels = $stmt->fetchObject();
$requiredclicks= $levels->requiredclicks; //The adoptable's ID

} // End grab next level info...

// Determine what to show for next level:

if($nextlevelexists == "true" and $nextlevel != ""){
// See how many more clicks to go
$ctg = $requiredclicks - $row->totalclicks;
$nloutput = "{$nextlevel}<br />Clicks Required for Level Increase: {$ctg}";
}
else $nloutput = "This adoptable is at its maximum level";

$article_title = "{$row->name}'s Statistics:";
$article_content = "<img src='{$image}'><br /><br />
<b>Total Clicks: {$row->totalclicks}<br />
Gender: <img src='picuploads/{$row->gender}.png'><br />
Trade Status: {$row->tradestatus}<br />
Current Level: {$row->currentlevel}<br />
Next Level: {$nloutput}<br /></b>";

// Voters Information...

$article_content .= "<h2>{$row->name}'s Voters:</h2><br />
{$lang_voters_explain}<br /><br />
<table width='450' border='1'>
<tr>
<td width='129'><strong>Username:</strong></td>
<td width='156'><strong>Date Voted: </strong></td>
<td width='82'><strong>Profile:</strong></td>
<td width='55'><strong>PM:</strong></td>
</tr>";

// Select the voters from the DB

$stmt = $adopts->query("SELECT * FROM {$prefix}vote_voters WHERE adoptableid='{$id}' ORDER BY date DESC LIMIT 10");

while ($row = $stmt->fetchObject())
{
if($row->username == "") $row->username = "Guest";
if($row->username == "Guest"){
$article_content .= "
<tr>
<td><div align='left'>Guest</div></td>
<td><div align='left'>{$row->date}</div></td>
<td><div align='center'></div></td>
<td><div align='center'></div></td>
</tr>";
}
else{
$article_content .= "
<tr>
<td><div align='left'>{$row->username}</div></td>
<td><div align='left'>{$row->date}</div></td>
<td><div align='center'><a href='profile.php?user={$row->username}' target='_blank'><img src='templates/buttons/profile.gif' border=0></a></div></td>
<td><div align='center'><a href='messages.php?act=newpm&user={$row->username}' target='_blank'><img src='templates/buttons/pm.gif' border=0></a></div></td>
</tr>";
}
}
$article_content .= "</table><br />";
}
else{
$article_title = $err_idnoexist;
$article_content = $err_idnoexist_text;
}
}
else
{
$article_title = $err_idnoexist;
$article_content = $err_idnoexist_text;
}
} // End the STATS code
elseif($act == "bbcode")
{
if(is_numeric($id))
{
// Now we see if the adoptable actually exists...

$stmt = $adopts->query("SELECT * FROM {$prefix}owned_adoptables WHERE owner='{$loggedinname}' and aid='{$id}'");
$row = $stmt->fetchObject();

if($row->aid == $id)
{
$altbb = grabanysetting("usealtbbcode");

// Adoptable exists, so show the BBCode:

$article_title = "Codes for {$row->name}";
$article_content = "{$lang_bbcode_explain}<br />
<p><u>Forum Codes / BBCode: </u></p>
<p>
<textarea name='textarea' cols='50' rows='4'>
http://www.{$domain}{$scriptpath}/siggy.php?id={$row->aid} (http://www.{$domain}{$scriptpath}/levelup.php?id={$row->aid})
</textarea>
</p>";

if($altbb == "yes")
{
// Use the seo friendly alternate bbcodes...

$article_content .= "
<p><u>Alternate BBCodes (Use if the above do not work on a forum): </u></p>
<p>
<textarea name='textarea' cols='50' rows='4'>
http://www.{$domain}{$scriptpath}/get/{$row->aid}.gif\" (http://www.{$domain}{$scriptpath}/levelup.php?id={$row->aid})
</textarea>
</p>";
}

$article_content .= "<p><u>HTML Code</u>:</p>
<p>
<textarea name='textarea' cols='50' rows='4'>
<a href=\"http://www.{$domain}{$scriptpath}/levelup.php?id={$row->aid}\" target=\"_blank\">
<img src=\"http://www.{$domain}{$scriptpath}/siggy.php?id={$row->aid}\" border=0>
</a>
</textarea>
</p>";
}
else
{
$article_title = $err_idnoexist;
$article_content = $err_idnoexist_text;
}
}
else
{
$article_title = $err_idnoexist;
$article_content = $err_idnoexist_text;
}
} // End the BBCODE generation for the adoptable...
elseif($act == "rename")
{
// We are renaming an adoptable

if(is_numeric($id))
{
// Now we see if the adoptable actually exists...

$stmt = $adopts->query("SELECT * FROM {$prefix}owned_adoptables WHERE owner='{$loggedinname}' and aid='{$id}'");
$row = $stmt->fetchObject();

if($row->aid == $id)
{
$image = getcurrentimage($id);

if($row->isfrozen != "yes")
{
if($more == "")
{
$article_title = "Rename {$row->name}";
$article_content = "<img src='{$image}'><br />{$lang_rename}{$row->name}{$lang_rename2}<br />
<form name='form1' method='get' action='myadopts.php'>
<p>Adoptable Name:
<input name='more' type='text' id='more'>
<input name='id' type='hidden' id='id' value='{$id}'>
<input name='act' type='hidden' id='act' value='rename'>
</p>
<p>
<input type='submit' name='Submit' value='Rename Adoptable'>
</p>
</form>";
}
else
{
// We are renaming the adoptable

// The adoptable exists, so now we can rename it...
$adopts->query("UPDATE {$prefix}owned_adoptables SET name='{$more}' WHERE aid='{$id}' and owner='{$loggedinname}'");

$article_title = $lang_rename_success_title;
$article_content = "<img src='{$image}'><br />{$lang_rename_success}{$more}.
You can now manage {$more} on the <a href='myadopts.php?act=manage&id={$id}'>My Adopts</a> page";
}
}
else
{
// We cannot rename a frozen adoptable...

$article_title = $lang_frozen_title;
$article_content = "{$lang_frozen}<a href='manage.php?act=freeze&id={$id}&more=unfreeze'>unfreeze</a> {$lang_frozen2}";
}
}
else
{
$article_title = $err_idnoexist;
$article_content = $err_idnoexist_text;
}
}
else
{
$article_title = $err_idnoexist;
$article_content = $err_idnoexist_text;
}

}
elseif($act == "trade")
{
// We are setting the trade status for an adoptable...

if(is_numeric($id))
{
// Now we see if the adoptable actually exists...

$stmt = $adopts->query("SELECT * FROM {$prefix}owned_adoptables WHERE owner='{$loggedinname}' and aid='{$id}'");
$row = $stmt->fetchObject();

if($row->aid == $id)
{
$image = getcurrentimage($id); // Get the image for the adopt...

if($more == "")
{
$article_title = "Setting trade status for {$row->name}";
$article_content = "Are you sure you wish to change the trade status of this adoptable?
<center><b><a href='myadopts.php?act=trade&id={$id}&more=confirm'>Yes I'd like to change its trade status</a></b><br /><br />
<b><a href='myadopts.php'>Nope I change my mind! Go back to the previous page.</a></b></center><br />";
}
elseif($more == "confirm")
{
$article_title = "Change trade status successfully";
if($row->tradestatus == "fortrade")
{
$query = "UPDATE {$prefix}owned_adoptables SET tradestatus='notfortrade' WHERE aid='{$id}' and owner='{$loggedinname}'";
$adopts->query($query);
$article_content = "The adoptable's trade status is now Not for Trade";
}
elseif($row->tradestatus == "notfortrade")
{
$query = "UPDATE {$prefix}owned_adoptables SET tradestatus='fortrade' WHERE aid='{$id}' and owner='{$loggedinname}'";
$adopts->query($query);
$article_content = "The adoptable's trade status is now For Trade";
}
else
{
$article_title = "Something is very very wrong";
$article_content = "Please check phpmyadmin to see if the settings are correct, or report your issue to Mysidia Adoptables support forum";
}
}
else
{
$article_title = "Invalid Action";
$article_content = "Invalid Action Specified";
}
}
else
{
$article_title = $err_idnoexist;
$article_content = $err_idnoexist;
}
}
else
{
$article_title = $err_idnoexist;
$article_content = $err_idnoexist_text;
}
}
elseif($act == "freeze")
{
// We are freezing an adoptable here...

if(is_numeric($id))
{
// Now we see if the adoptable actually exists...

$stmt = $adopts->query("SELECT * FROM {$prefix}owned_adoptables WHERE owner='{$loggedinname}' and aid='{$id}'");
$row = $stmt->fetchObject();

if($row->aid == $id)
{
$image = getcurrentimage($id); // Get the image for the adopt...

if($more == "")
{
if($row->isfrozen == "yes")
{
$status = "<img src='templates/icons/freeze.gif'> Frozen<br />";
$go = "<a href='myadopts.php?act=freeze&id={$id}&more=unfreeze'><img src='templates/icons/unfreeze.gif' border=0> Unfreeze This Adoptable</a>";
}
else
{
$status = "<img src='templates/icons/unfreeze.gif'> Not Frozen<br />";
$go = "<a href='myadopts.php?act=freeze&id={$id}&more=freeze'><img src='templates/icons/freeze.gif' border=0> Freeze This Adoptable</a>";
}

$article_title = $lang_freeze_title;
$article_content = "<img src='{$image}'><br /><b>{$row->name}'s Current Status: {$status}</b><br />
{$lang_freeze}<br /><br /><b>{$go}</b><br /><br />
{$lang_freeze_warning}";
}
else
{
// We are actually freezing or unfreezing the adopt...

if($more == "freeze")
{
$frz = "yes";
$article_title = "{$row->name} Frozen Successfully";
}
elseif($more == "unfreeze")
{
$frz = "no";
$article_title = "{$row->name} Unfrozen Successfully";
}

$adopts->query("UPDATE {$prefix}owned_adoptables SET isfrozen='{$frz}' WHERE aid='{$id}' and owner='{$loggedinname}'");
$article_content = "Action Complete. You may now manage {$row->name} on the <a href='myadopts.php?act=manage&id={$id}'>My Adopts</a> page";
}
}
else
{
$article_title = $err_idnoexist;
$article_content = $err_idnoexist_text;
}
}
else
{
$article_title = $err_idnoexist;
$article_content = $err_idnoexist_text;
}
}
elseif($act == "pound")
{
if(is_numeric($id))
{
// Now we see if the adoptable actually exists...

$stmt = $adopts->query("SELECT * FROM {$prefix}owned_adoptables WHERE owner='$loggedinname' and aid='$id'");
$row = $stmt->fetchObject();

if($row->aid == $id)
{
$image = getcurrentimage($id); // Get the image for the adopt...

if($more == "")
{
$article_title = "Pound {$row->name}";
$article_content = "<img src='{$image}'><br />{$lang_pound}<br /><br />{$lang_pound_warning}<br /><br />
<center><b><a href='myadopts.php?act=pound&id={$id}&more=confirm'>
<img src='templates/icons/delete.gif' border=0> Pound {$row->name} - I dont want it anymore!
<img src='templates/icons/delete.gif' border=0></a></b><br /><br />
<b><a href='myadopts.php'><img src='templates/icons/yes.gif' border=0>
DO NOT Pound {$row->name}! <img src='templates/icons/yes.gif' border=0></a></b></center><br />";
}
elseif($more == "confirm")
{
// Actually run the execution

$adopts->query("UPDATE {$prefix}owned_adoptables SET owner='SYSTEM' WHERE aid='{$id}'");
$article_title = $lang_pound_title_complete;
$article_content = $lang_pound_complete;
}
else
{
$article_title = "Invalid Action";
$article_content = "Invalid Action Specified";
}
}
else
{
$article_title = $err_idnoexist;
$article_content = $err_idnoexist_text;
}
}
else
{
$article_title = $err_idnoexist;
$article_content = $err_idnoexist_text;
}
}
else
{
// No valid action specified :: show an error

$article_title = $lang_invalid_action_title;
$article_content = $lang_invalid_action;
}
}
else
{

$article_title = $accden;
$article_content = $reqlogin;

} // End is logged in check else


//***************//
// OUTPUT PAGE //
//***************//

echo showpage($article_title, $article_content, $date);

?>

Tequila
03-23-2012, 05:47 PM
That's it...

I don't see anything, do you have the alternate bbcodes on?

Lemme test something...
http://www.archurub.com/get/10.gif (http://www.archurub.com/levelup.php?id=10)

Abronsyth
03-23-2012, 05:56 PM
Nyxi, yes, I have the alternate BBC codes on, and neither they, or the HTML codes are working properly.

Tequila
03-23-2012, 05:59 PM
Hm... Did you adjust your .htaccess file?

Abronsyth
03-23-2012, 06:03 PM
No, and I just took the Alternate off, test:
http://www.archurub.com/siggy.php?id=10 (http://www.archurub.com/levelup.php?id=10)

The code is up there...but I don't see it :T

Tequila
03-23-2012, 06:04 PM
I'm afraid that I don't know how to fix that... 3;

Hall of Famer
03-23-2012, 06:12 PM
Lemme try this on my demo site

http://www.mysidiarpg.com/site/mys131/siggy.php?id=3 (http://www.mysidiarpg.com/site/mys131/levelup.php?id=3)

The code is(added star symbol so it wont convert to image):


http://www.mysidiarpg.com/site/mys131/siggy.php?id=3
Works, so guess it is not the problem with the script.

Edit: It seems that your siggy file leads to an invalid page, which is weird. Did you upload that image through ACP?

Abronsyth
03-24-2012, 07:30 AM
HoF, I uploaded the images through the mysidia ACP, yes...testing with another pet:
(pet should show between here) http://www.archurub.com/siggy.php?id=3 (http://www.archurub.com/levelup.php?id=3) (and here).

Can anyone see anything..?

EDIT:
Here's the siggy.php file...maybe there's something wrong in there..?
<?php

include("functions/functions.php");
include("functions/functions_users.php");
include("functions/functions_adopts.php");
include("inc/lang.php");

//***************//
// START SCRIPT //
//***************//

// We need to grab an adoptable ID

$id = $_GET["id"];

// Check that ID exists and is valid

if(is_numeric($id)){

// The ID appears to be valid, so double check...


$stmt = $adopts->query("SELECT * FROM {$prefix}owned_adoptables WHERE aid='{$id}'") ;
$row = $stmt->fetchObject();

if($row->aid == $id){

// The adoptable exists, so let's try and show the image

$usingimage = "no";

$image = getcurrentimage($id);

// Let's see if the server has support for GD or not
// Also to use fancy images the image must be a gif and fancy images must be enabled...

$usegd = grabanysetting("gdimages");
$imageinfo = @getimagesize($image);
$imagemime = $imageinfo["mime"]; // Mime type of the image file, should be a .gif file...

if(function_exists('imagegif') and $usegd == "yes" and $imagemime == "image/gif")
{

$usingimage = "yes"; //Turn the template system off

// BEGIN NEW CODE

list($width, $height, $row->type, $attr) = getimagesize($image); // The size of the original adoptable image

// Begin the fancy outputs...

// Lets create the new target image, with a size big enough for the text for the adoptable

$newheight = $height + 72;

if($newwidth < 250){
$newwidth = 250;
}
else{
$newwidth = $width;
}

$img_temp = imagecreatetruecolor($newwidth, $newheight);


$alphablending = true;


// Lets create the image and save its transparency
$img_old = @imagecreatefromgif($image);
imagealphablending($img_old, true);
imagesavealpha($img_old, true);

// Lets copy the old image into the new image with
// the given size
ImageCopyResampled(
$img_temp,
$img_old,
0, 0, 0, 0,
$width,
$height,
$width,
$height
);


$textheight = $width + 2;

$image = $img_temp;

$bgi = imagecreatetruecolor($newwidth, $newheight);

$color = imagecolorallocate($bgi, 51, 51, 51);


$str1 = "Name: ".$row->name;
$str2 = "Owner: ".$row->owner;
$str3 = "Click Here to Feed Me!";
$str4 = "More Adopts at:";
$str5 = "www.".$domain;


imagestring ($image, 12, 0, $textheight, $str1, $color);
imagestring ($image, 12, 0, $textheight + 13, $str2, $color);
imagestring ($image, 12, 0, $textheight + 26, $str3, $color);
imagestring ($image, 12, 0, $textheight + 42, $str4, $color);
imagestring ($image, 12, 0, $textheight + 55, $str5, $color);

$background = imagecolorallocate($image, 0, 0, 0);
ImageColorTransparent($image, $background);

header("Content-Type: image/GIF");
ImageGif ($image);
imagedestroy($image);
imagedestroy($img_temp);
imagedestroy($img_old);
imagedestroy($bgi);

}
else{

// We are going to try and get this image the old fashioned way...
// Define a list of allowed file extentions...

$extList = array();
$extList['gif'] = 'image/gif';
$extList['jpg'] = 'image/jpeg';
$extList['jpeg'] = 'image/jpeg';
$extList['png'] = 'image/png';

//Define the output file type
$contentType = 'Content-type: '.$extList[ $imageinfo['extension'] ];

if($imageinfo['extension'] =! "image/gif" and $imageinfo['extension'] =! "image/jpeg" and $imageinfo['extension'] =! "image/png"){

// The file type is NOT ALLOWED
die("Hacking Attempt!");

}
else{

// File type is allowed, so proceed
// Try and read the file in

$status = "";

header ($contentType);
$status = readfile($image);

if($status == "" or $status == "false" or $status == "FALSE"){

// Reading the file failed, so show an error...
header ("text/plain");
die("Readfile appears to be disabled on your host.");

}



}

}


}
else{

// Bogus ID

$article_title = $err_idnoexist;
$article_content = $err_idnoexist_text;


}
}
else{

// Bogus ID

$article_title = $err_idnoexist;
$article_content = $err_idnoexist_text;

}

?>

PokePets
03-24-2012, 09:51 AM
Your siggy is not working? I had this too.
You must make sure that the siggy function is the very last function in your inc. functions file. So new functions must be placed above that function ;)

This could be the problem, If not ignore it :P

Abronsyth
03-24-2012, 10:28 AM
PokePets, in which file? I'm not sure what the 'inc. functions' file is..?

PokePets
03-24-2012, 02:04 PM
PokePets, in which file? I'm not sure what the 'inc. functions' file is..?
inc/functions.php

Sorry, it's inside the folder inc
The name of the file is functions.php

Hall of Famer
03-24-2012, 02:53 PM
I think I've found the cause of the image upload glitch. Can you post a screenshot of the table prefix.filesmap? Id like to see if my assumption is correct.

Abronsyth
03-24-2012, 03:27 PM
PokePets, I don't see and function.php file inside the inc folder...

HoF, sure, here's part of it:
http://i1217.photobucket.com/albums/dd382/Iris-red-knee/screenforproblem.png

Hall of Famer
03-24-2012, 03:30 PM
Yeah, just like what I thought. get rid of all these ../ and you will be fine. I will modify the admuploadpics.php file later tonight to fix the glitch.

Abronsyth
03-24-2012, 03:42 PM
Okay, removed all of that...now for the test:
{pet should show between here} http://www.archurub.com/siggy.php?id=10 (http://www.archurub.com/levelup.php?id=10){and here...}

Um...do you see anything..?

Hall of Famer
03-24-2012, 03:48 PM
I do not see anything at this moment. Can you show me the screenshot of your prefix.filesmap table again after you made the change? Also it may take some time for the image to be relocated, for the other user who had this problem it was the case.

Anyway, do not forget to download this new admuploadpic.php file from here if you do not want to ever have trouble with uploaded images in future:
http://www.mysidiaadoptables.com/forum/showpost.php?p=22186&postcount=9