.com.unity Forums
  The Official e-Store of Shrapnel Games

This Month's Specials

Raging Tiger- Save $9.00
World Supremacy- Save $9.00

   







Go Back   .com.unity Forums > Shrapnel Community > Space Empires: IV & V

Reply
 
Thread Tools Display Modes
  #11  
Old October 27th, 2003, 01:39 PM
Ruatha's Avatar

Ruatha Ruatha is offline
Major General
 
Join Date: May 2002
Location: Linghem, Östergötland, Sweden
Posts: 2,255
Thanks: 0
Thanked 0 Times in 0 Posts
Ruatha is on a distinguished road
Default Re: PBW Emergency Site files v1.51 Finished and fixed.

Sure, I can set the sender to something generic.

Working some on a admin page:
Progress here
Admin page example (work in progress)
Reply With Quote
  #12  
Old October 27th, 2003, 09:47 PM
Ruatha's Avatar

Ruatha Ruatha is offline
Major General
 
Join Date: May 2002
Location: Linghem, Östergötland, Sweden
Posts: 2,255
Thanks: 0
Thanked 0 Times in 0 Posts
Ruatha is on a distinguished road
Default Re: PBW Emergency Site files v1.51 Finished and fixed.

I've set the Host's e-mail as sender, so you'll send the mail to yourself.
I've finished most of the admin screen.
Now you can:
-Change all data in configuration.txt
-Change all data in deadline.txt including deadline length
-Download all player files zipped into one, clear turnfiles dir.
-upload new turnfile and notify all players that new turn is out.

What to do before I post:
-Ability to change all player data.
-Password protect admin screen.
-Update readme.txt


=will be fixed tomorrow.
Nightie
Reply With Quote
  #13  
Old October 28th, 2003, 02:21 AM
geoschmo's Avatar

geoschmo geoschmo is offline
National Security Advisor
 
Join Date: Jan 2001
Location: Ohio
Posts: 8,450
Thanks: 0
Thanked 4 Times in 1 Post
geoschmo is on a distinguished road
Default Re: PBW Emergency Site files v1.51 Finished and fixed.

Well, generic wasn't really what I was looking for. I wanted to be able to set that and make it show my email as the return address. I imagine that's possible right? Maybe another line in the mail.php file?
__________________
I used to be somebody but now I am somebody else
Who I'll be tomorrow is anybody's guess
Reply With Quote
  #14  
Old October 28th, 2003, 07:28 AM
Rambie's Avatar

Rambie Rambie is offline
Sergeant
 
Join Date: Jul 2000
Location: Centerville, Utah, USA
Posts: 316
Thanks: 0
Thanked 0 Times in 0 Posts
Rambie is on a distinguished road
Default Re: PBW Emergency Site files v1.51 Finished and fixed.

Ruatha, you are doing a great job, keep it up! You're much appreciated by us addicted PBW players.

I don't know PHP, nor any programming language that well, so this may be a elementary question... but here goes anyway.

I was having a hard time getting the upload flag to work right. It looked like the IF test for the game name wasn't assigning a value to $testname if the $test1 and $test2 variables were equal. Thus throwing off the second IF statement. So I changed the code in Index.php

---From this---
$test1=strtolower(substr($file,0,-9));
$test2=strtolower("$gamename");
$ett=strlen($test1);
$tva=strlen($test2);
$tre=$tva-$ett;

if ($tre>0)
{
$testname=substr($gamename,0,-$tre);
}

if (strtolower(substr($file,0,-9)) == strtolower("$testname"))


---To this---
$test1=strtolower(substr($file,0,-9));
$test2=strtolower("$gamename");
$ett=strlen($test1);
$tva=strlen($test2);
$tre=$tva-$ett;

if ($tre>0)
{
$testname=substr($test2,0,-$tre);
}
else
{
$testname = $test2;
}

if ($test1 == $testname)


After making the changes the upload verification did seem to work OK. I changed the second IF statement so it wouldn't have to process the 'strtolower' (Convert string to lowercse I guess?) command again when the lowercase data was already in the $test1 and $test2 variables. I'm afraid to say this minor little change took me over 1-hour to figure out.

I don't know why the upload notification wasn't working for me, especially since I didn't see anyone else report any problems with it. But, I thought I would let you know incase anyone else was having this problem.

[ October 28, 2003, 05:32: Message edited by: Rambie ]
__________________
Rambie
www.xmission.com/~rstulce
Reply With Quote
  #15  
Old October 28th, 2003, 10:54 AM
Ruatha's Avatar

Ruatha Ruatha is offline
Major General
 
Join Date: May 2002
Location: Linghem, Östergötland, Sweden
Posts: 2,255
Thanks: 0
Thanked 0 Times in 0 Posts
Ruatha is on a distinguished road
Default Re: PBW Emergency Site files v1.51 Finished and fixed.

Thanks Rambie.
This site wasn't supposed to be this complex, so it's bad code.
I'm impressed you understood it, I almost doesn't anymore!

Included your change in thi s Last Version:
Complete ver 1.5

Patch 1.5

What's new?

Complete admin page, no more text files editing.
Upload and download turnfiles for the host through admin page.

Added history page.

All new readme.

Problems, report them.

I know the host get's the turnfiles in ACE compressed format, but I can't find a zip utility that supports long filenames through the command line??? (it must be a small exe file)!

The totally rewritten ver 2 is aimed at next PBW downtime, may it never come!

[ October 28, 2003, 08:55: Message edited by: Ruatha ]
Reply With Quote
  #16  
Old October 28th, 2003, 04:06 PM
Ruatha's Avatar

Ruatha Ruatha is offline
Major General
 
Join Date: May 2002
Location: Linghem, Östergötland, Sweden
Posts: 2,255
Thanks: 0
Thanked 0 Times in 0 Posts
Ruatha is on a distinguished road
Default Re: PBW Emergency Site files v1.51 Finished and fixed.

For all who has older Versions than 1.4 and need all files except CONFIGURATION.TXT DEADLINE.TXT and PLAYERDATA.TXT

here is your Version:
Get up to date to ver 1.5

It's the same as patch 1.5 but with MAIL.PHP included.

MAIL.PHP is the configuration file for automatic mails sent out from the server.
If you've already set up auto mails in MAIL.PHP use patch 1.5 instead.
(In MAIL.PHP data for the SMTP server and server mail account is entered, and auto mail must be enabled manually there to work!)


Hmm, I realized something - there was a Bug:
When turn was uploaded, deadline was old deadline + lenght of deadline, should be current time+ deadline length.
Is fixed now in all three archives.

Latest Version is now 1.51 (in zipfiles 1.5)

[ October 28, 2003, 14:56: Message edited by: Ruatha ]
Reply With Quote
  #17  
Old October 29th, 2003, 07:32 AM
Ruatha's Avatar

Ruatha Ruatha is offline
Major General
 
Join Date: May 2002
Location: Linghem, Östergötland, Sweden
Posts: 2,255
Thanks: 0
Thanked 0 Times in 0 Posts
Ruatha is on a distinguished road
Default Re: PBW Emergency Site files v1.51 Finished and fixed.

All is well ( I thought there was a bug but I had forgotten to update my own site.... )

I need to find a way to make the page refresh every time it is visited.
The meta tag I'm using now doesn't seem to work.
And I don't want it to refresh every X second.
And I don't want to use Java, only HTML or PHP.....

EDIT 1:
Problem seems solved, stand by for ver 1.52 coming soon. (hours)

EDIT2:
Nope not that easy!

Edit3:
I've tried:

code:
<script language=" JavaScript" ><!-- 
function MyReload()
{
window.location.reload();
}
//--></script>

Then change your <Body> to say;

<Body onLoad=" MyReload()" >

and

code:
<META HTTP-EQUIV="Pragma" CONTENT="no-Cache">
<META HTTP-EQUIV="EXPIRES" CONTENT="Mon, 31 Dec 2001 23:59:59 GMT">

Still don't work.
If players after uploading their turnfiles doesn't press refresh on their browsers they think the upload has failed!
Needs to fix this!

[ October 29, 2003, 08:05: Message edited by: Ruatha ]
Reply With Quote
  #18  
Old October 30th, 2003, 10:29 PM
geoschmo's Avatar

geoschmo geoschmo is offline
National Security Advisor
 
Join Date: Jan 2001
Location: Ohio
Posts: 8,450
Thanks: 0
Thanked 4 Times in 1 Post
geoschmo is on a distinguished road
Default Re: PBW Emergency Site files v1.51 Finished and fixed.

Ruatha,

Problems with the 1.51 files on my game. I can't change the admin password. Get errors in the log:

[30-Oct-2003 16:14:30] PHP Warning: fopen(password.php): failed to open stream: Permission denied in /home/spaceemp/public_html/pbw/geoschmo/kothasvge/setpassword.php on line 5
[30-Oct-2003 16:14:30] PHP Warning: fwrite(): supplied argument is not a valid stream resource in /home/spaceemp/public_html/pbw/geoschmo/kothasvge/setpassword.php on line 10
[30-Oct-2003 16:14:30] PHP Warning: fwrite(): supplied argument is not a valid stream resource in /home/spaceemp/public_html/pbw/geoschmo/kothasvge/setpassword.php on line 11
[30-Oct-2003 16:14:30] PHP Warning: fwrite(): supplied argument is not a valid stream resource in /home/spaceemp/public_html/pbw/geoschmo/kothasvge/setpassword.php on line 12
[30-Oct-2003 16:14:30] PHP Warning: fclose(): supplied argument is not a valid stream resource in /home/spaceemp/public_html/pbw/geoschmo/kothasvge/setpassword.php on line 14

Also, the link to download turn files and clear the directory doesn't work. I get a 404 error on that one.

The button to upload the new gamefile works partialy. It uploads teh new game file, but it doesn't move the old one to the backup folder. I end up with both of them in the gamefile directory. Not sure if the players get their email. I am checking on that.

error log for this one:

[30-Oct-2003 16:19:48] PHP Warning: fopen(deadline.txt): failed to open stream: Permission denied in /home/spaceemp/public_html/pbw/geoschmo/kothasvge/nextturn.php on line 195
[30-Oct-2003 16:19:48] PHP Warning: fwrite(): supplied argument is not a valid stream resource in /home/spaceemp/public_html/pbw/geoschmo/kothasvge/nextturn.php on line 197
[30-Oct-2003 16:19:48] PHP Warning: fwrite(): supplied argument is not a valid stream resource in /home/spaceemp/public_html/pbw/geoschmo/kothasvge/nextturn.php on line 198
[30-Oct-2003 16:19:48] PHP Warning: fwrite(): supplied argument is not a valid stream resource in /home/spaceemp/public_html/pbw/geoschmo/kothasvge/nextturn.php on line 199
[30-Oct-2003 16:19:48] PHP Warning: fwrite(): supplied argument is not a valid stream resource in /home/spaceemp/public_html/pbw/geoschmo/kothasvge/nextturn.php on line 200
[30-Oct-2003 16:19:48] PHP Warning: fwrite(): supplied argument is not a valid stream resource in /home/spaceemp/public_html/pbw/geoschmo/kothasvge/nextturn.php on line 201
[30-Oct-2003 16:19:48] PHP Warning: fclose(): supplied argument is not a valid stream resource in /home/spaceemp/public_html/pbw/geoschmo/kothasvge/nextturn.php on line 203
[30-Oct-2003 16:19:48] PHP Warning: fopen(history.html): failed to open stream: Permission denied in /home/spaceemp/public_html/pbw/geoschmo/kothasvge/nextturn.php on line 210
[30-Oct-2003 16:19:48] PHP Warning: fwrite(): supplied argument is not a valid stream resource in /home/spaceemp/public_html/pbw/geoschmo/kothasvge/nextturn.php on line 213
[30-Oct-2003 16:19:48] PHP Warning: fclose(): supplied argument is not a valid stream resource in /home/spaceemp/public_html/pbw/geoschmo/kothasvge/nextturn.php on line 215

News update does not work:

[30-Oct-2003 16:31:52] PHP Warning: fopen(news.html): failed to open stream: Permission denied in /home/spaceemp/public_html/pbw/geoschmo/kothasvge/set_news.php on line 7
[30-Oct-2003 16:31:52] PHP Warning: fwrite(): supplied argument is not a valid stream resource in /home/spaceemp/public_html/pbw/geoschmo/kothasvge/set_news.php on line 8
[30-Oct-2003 16:31:52] PHP Warning: fclose(): supplied argument is not a valid stream resource in /home/spaceemp/public_html/pbw/geoschmo/kothasvge/set_news.php on line 9
[30-Oct-2003 16:31:52] PHP Warning: fopen(history.html): failed to open stream: Permission denied in /home/spaceemp/public_html/pbw/geoschmo/kothasvge/set_news.php on line 13
[30-Oct-2003 16:31:52] PHP Warning: fwrite(): supplied argument is not a valid stream resource in /home/spaceemp/public_html/pbw/geoschmo/kothasvge/set_news.php on line 14
[30-Oct-2003 16:31:52] PHP Warning: fwrite(): supplied argument is not a valid stream resource in /home/spaceemp/public_html/pbw/geoschmo/kothasvge/set_news.php on line 15
[30-Oct-2003 16:31:52] PHP Warning: fwrite(): supplied argument is not a valid stream resource in /home/spaceemp/public_html/pbw/geoschmo/kothasvge/set_news.php on line 16
[30-Oct-2003 16:31:52] PHP Warning: fclose(): supplied argument is not a valid stream resource in /home/spaceemp/public_html/pbw/geoschmo/kothasvge/set_news.php on line 17


Geoschmo

[ October 30, 2003, 20:33: Message edited by: geoschmo ]
__________________
I used to be somebody but now I am somebody else
Who I'll be tomorrow is anybody's guess
Reply With Quote
  #19  
Old October 31st, 2003, 07:23 AM
Ruatha's Avatar

Ruatha Ruatha is offline
Major General
 
Join Date: May 2002
Location: Linghem, Östergötland, Sweden
Posts: 2,255
Thanks: 0
Thanked 0 Times in 0 Posts
Ruatha is on a distinguished road
Default Re: PBW Emergency Site files v1.51 Finished and fixed.

Hi, sorry Geo.

The upload button doesn't move the old file, it stays there as backup until the directory is cleared (stupid but so is it), the players will still get the right file though.

All the others is due to missing files, my fault, thought they where included in the older Versions but in some they where not.

Here is the fixed archives:

(Geo, use the patch below, not getuptodate!)

patch 1.5 fixed

complete 1.5 fixed

Getuptodate

[ October 31, 2003, 06:11: Message edited by: Ruatha ]
Reply With Quote
  #20  
Old October 31st, 2003, 07:40 AM
Fyron's Avatar

Fyron Fyron is offline
Shrapnel Fanatic
 
Join Date: Jul 2001
Location: Southern CA, USA
Posts: 18,394
Thanks: 0
Thanked 12 Times in 10 Posts
Fyron is an unknown quantity at this point
Default Re: PBW Emergency Site files v1.51 Finished and fixed.

Nice work!

[ October 31, 2003, 14:04: Message edited by: Imperator Fyron ]
__________________
It's not whether you win or lose that counts: it's how much pain you inflict along the way.
--- SpaceEmpires.net --- RSS --- SEnet ModWorks --- SEIV Modding 101 Tutorial
--- Join us in the #SpaceEmpires IRC channel on the Freenode IRC network.
--- Due to restrictively low sig limits, you must visit this link to view the rest of my signature.
Reply With Quote
Reply

Bookmarks


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT -4. The time now is 12:17 PM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©1999 - 2024, Shrapnel Games, Inc. - All Rights Reserved.