Post Pacific

Post Pacific (https://postpacific.mmorpg-game.online/index.php)
-   Lineage 2 Server Modifications ONLY! (https://postpacific.mmorpg-game.online/forumdisplay.php?f=28)
-   -   [Share] 7Signs Status page (https://postpacific.mmorpg-game.online/showthread.php?t=6563)

m4rk 08.01.2007 22:06

[Share] 7Signs Status page
 
I just found this on my old files so I spent 10 minutes adapting it for retail c4 official. Just put your SQL IP, user and PASS (By the way i Recommend that you use a limited user that only has SELECT rights on the needed tables)

I think everything is correct, if you do not agree then please just say it and we'll discuss it here. Any improvement done to this will be great, I'm sure about it.

Original SSQ status page made by KIRALEX.

version changes:
1.1
-Converted to C4 Official

1.1a
-fixed dusk/dawn inversion
-Set max score for contributing seal stones to 500 (in preparation to taking into account festival of darkness scores).

1.2
-New way to do things, why use long queries when you can modify a stored procedure so that it does the job for you?
-Now points are showed correctly, the total being 1000, 500 for seal stones and 500 for festival.

1.3
-Fastest and less complicated way to do things. Thanks Fidow for your fixes!

1.4
-The day of the event was messed up! Now fixed!

1.5
-Fixed image links (you could have done it yourself and posted the fix here ¬¬)

1.6
-Fixed image and day for leechz0rs

Вложения из исходного сообщения (сами файлы в копии отсутствуют):
SSQ_v.1.6.rar — 424893 байт

l2serverfull 08.01.2007 22:19

thxx i test :D

Rexx 08.01.2007 22:26

Thanks for the share, I have an the old version which I was going to adapt but you beat me to it and saved me some time.

Thanks
Rexx

mcrabben7 08.01.2007 22:53

Looks fine to me. I gave it a quick overview in Dreamweaver. Thanks for the share.

horyfilipe 09.01.2007 06:36

Ty.. to make it work 100% i had to <? $day_event = str_replace("-","",$day_event); ?>

m4rk 09.01.2007 08:15

Mmh I think this status page fails as it only shows points given by seal stones turned to the priests... I think official status page gives 500pts to seal stones and 500 to festival, I'll try to implement it later.

AsterisKSM 09.01.2007 10:39

it doesent work In C1-C4 ModdeD? :(

m4rk 09.01.2007 11:35

I'm afraid not... :s
I reshared a seven signs status panel made for c1-c4 moded here (last page)

EDIT: I made an error and inverted dawn and dusk, will fix it ASAP

m4rk 09.01.2007 13:41

Version 1.2! I think we can say that now this ssq status page is 100% correct :)

FidoW 09.01.2007 14:12

I have an easier way... store procedure lin_GetSSQStatus return all the values you need directly...

Code:

DEFINE("SSQ","USE lin2world EXEC lin_GetSSQStatus");
$result = mssql_query(SSQ);

$round_number = @mssql_result($result, 0, 0);
$dawnPoint = @mssql_result($result, 0, 1);
$twilPoint = @mssql_result($result, 0, 2);
$seal1 = @mssql_result($result, 0, 3);
$seal2 = @mssql_result($result, 0, 4);
$seal3 = @mssql_result($result, 0, 5);
$time = @mssql_result($result, 0, 10);
$ssStatus = @mssql_result($result, 0, 11);

And later using the original script... only modifying javacript vars to link with php vars...

Code:

<script language="JavaScript" type="text/javascript">
  var nthDay = <? echo $ntdDay; ?>;
  var currTime = '<? echo $currTime; ?>';
  var ssStatus = <? echo $ssStatus; ?>;
  var dawnPoint = <? echo $dawnPoint; ?>;
  var twilPoint = <? echo $twilPoint; ?>;
  var maxPointWidth = <? echo $maxPointWidth; ?>;
  var seal1 = <? echo $seal1; ?>;
  var seal2 = <? echo $seal2; ?>;
  var seal3 = <? echo $seal3; ?>;
</script>

$ntdDay and $currTime is possible to get like in your script.
$maxPointWidth i set it to 150 like original script.

m4rk 09.01.2007 14:31

Thanks for your fixes and for opening my eyes on using directly the stored procedure.

As I don't use the original script, I just adapted your suggestion to the php version.

Osito2Dancer 09.01.2007 18:32

There is a catch though:

If Dusk or Dawn wins the festival on every category, it doesnt matter how much seal stones does the other side donate, the festival overrides the seal contribution (so, if you win all festival categories, you win 7 signs, no matter what). I think this is the Official setup for SSQ (or so i've read on some pages, im not sure).

Ill fix this on my side, perhaps you should do it.

On another note: I was just importing the SSQ Page from C1.4 to C4 Retail, and now i find you here posting an already done job. Kudos to you man, good job!

Oso

m4rk 17.01.2007 00:32

Sorry guys, did not notice things were messed up. They should be fine now.
Please if you find any bugs... tell me, or fix them yourself and report them here.

kin 17.01.2007 11:16

It shows me Tuesday, but today is Wednesday :)
Had to add 1 day, but not sure it will work at the end of the week.
$day = $day_event+1;

JotaC 25.02.2007 19:59

Something a lot usefull ^^

Ty =)

kepler001 17.06.2007 02:37

not working

m4rk 17.06.2007 07:44

What do you mean not working?

kepler001 17.06.2007 14:02

SSQ_v.1.4.rar not work for me

FidoW 17.06.2007 14:35

Quote:

Originally Posted by kepler001 (Post 88878)
SSQ_v.1.4.rar not work for me

Download WinRAR ? :drunken:

kepler001 17.06.2007 19:09

hahahahahaa
nop
http://peru.sytes.net:8000/ssq/status.php image don´t work :S and status not´s correct

http://peru.sytes.net:8000/ss/ its correct

katso 17.06.2007 22:17

Quote:

Originally Posted by kepler001 (Post 88892)
hahahahahaa
nop
http://peru.sytes.net:8000/ssq/status.php image don´t work :S and status not´s correct

http://peru.sytes.net:8000/ss/ its correct

Same problem.

@Kepler001: podrias pasarme el link del status que funciona correctamente? Gracias.

m4rk 17.06.2007 22:47

images fixed, about the other problem you'll have to fix it yourself...
I'm not gonna share nor fix anything else in public, tired of people that don't even take the time to make a simple fix and share it ^^

kepler001 17.06.2007 23:58

http://peru.sytes.net:8000/ssq_v.1.5/status.php

hmm day not correct and not have imagen xD

m4rk 18.06.2007 06:17

fixed, I think.

kepler001 18.06.2007 14:47

http://peru.sytes.net:8000/ssq/status.php
very thanks Its perfect :DDDDDD
Thanks friends

katso 18.06.2007 19:43

Quote:

Originally Posted by kepler001 (Post 88950)
http://peru.sytes.net:8000/ssq/status.php
very thanks Its perfect :DDDDDD
Thanks friends

Yes, 100% agree, thanks, very thanks.

tpuNIsher 19.06.2007 04:51

English version & check for if ssq is at preparation stage ( i think that's the code :p ):
Code:

if($status == "0"){
$ss_status = "Preparation";
$day_effect = mssql_result($result_date, 0, 0);
$day_event = mssql_result(mssql_query("SELECT TOP 1 DATEDIFF(dd,(DATEADD(s, $day_effect, '19700101')) , getdate()) FROM [ssq_data]"), 0, 0); //День
$day = $day_event;
}

if($status == "1"){
$ss_status = "Competition";
$day_effect = mssql_result($result_date, 0, 0);
$day_event = mssql_result(mssql_query("SELECT TOP 1 DATEDIFF(dd,(DATEADD(s, $day_effect, '19700101')) , getdate()) FROM [ssq_data]"), 0, 0); //День
$day = $day_event+1;
}

if($status == "2"){
$ss_status = "Calculation";
$day_effect = mssql_result($result_date, 0, 0);
$day_event = mssql_result(mssql_query("SELECT TOP 1 DATEDIFF(dd,(DATEADD(s, $day_effect, '19700101')) , getdate()) FROM [ssq_data]"), 0, 0); //День
$day = $day_event;
}

if($status == "3"){
$ss_status = "Seal Effect";
$day_effect = mssql_result($result_date, 0, 1);
$day_event = mssql_result(mssql_query("SELECT TOP 1 DATEDIFF(dd,(DATEADD(s, $day_effect, '19700101')) , getdate()) FROM [ssq_data]"), 0, 0); //День
$day = $day_event +7;
}
$CONFIG['lang_day'] = "Day ";


Also, i think better change from caps to small letters :P blows away xhtml validity :P

Edit: i'll do it and paste in a bit.

tpuNIsher 19.06.2007 05:09

AS promised :P
Also, moved from <?= to a echo, won't work for some otherwise. (Didn't for me.)

Code:

<html>
<head>
<title><?php echo($CONFIG['title']); ?></title>
<meta http-equiv="content-Type" content="text/html; charset=windows-1251">
<link rel="stylesheet" href="images/style.css" type="text/css">
</head>
<body topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0">
<div align="center">
<table border="0" cellpadding="0" cellspacing="0" class="Style_10">
        <tbody>
                <tr valign="top">
                        <td class=style_11 height="225">
                                <table>
                                        <tbody>
                                                <tr valign="top">
                                                        <td>
                                                                <table class="Style_1" cellspacing="0" cellpadding="0" border="0" width="141">
                                                                        <tbody>
                                                                                <tr align="middle" height="26">
                                                                                        <td class="Style_2">
                                                                                        <b><font color="#E10000"><?php echo($CONFIG['lang_day']); ?><?php echo($day); ?></font> <?php echo($ss_status); ?></b>
                                                                                        </td>
                                                                                </tr>
                                                                        </tbody>
                                                                </table>
                                                                <table class="Style_3" cellspacing="0" cellpadding="0" width="141" border="0">
                                                                        <tbody>
                                                                                <tr>
                                                                                        <td></td>
                                                                                        <td><img height="16" src="images/timeBox1.jpg" width="140" border="0"></td>
                                                                                        <td></td>
                                                                                </tr>
                                                                                <tr>
                                                                                        <td valign="bottom" rowspan="2"><img height="125" src="images/timeBox2.jpg" width="45" border="0"></td>
                                                                                        <td><img src="images/image_eng/time<?php echo($day); ?>.jpg" width="140" height="139" border="0"></td>
                                                                                        <td valign="bottom" rowspan="2"><img height="125" src="images/timeBox3.jpg" width="66" border="0"></td>
                                                                                </tr>
                                                                                <tr>
                                                                                        <td><img height="12" src="images/timeBox4.jpg" width="140" border="0"></td>
                                                                                </tr>
                                                                        </tbody>
                                                                </table>
                                                        </td>
                                                        <td>
                                                                <table class="Style_4" cellspacing="0" cellpadding="0" width="200" border="0">
                                                                        <tbody>
                                                                                <tr align="middle" bgcolor="#606d6f" height="17">
                                                                                        <td align="center" class="Style_12"><?php echo($time); ?></td>
                                                                                </tr>
                                                                        </tbody>
                                                                </table>
                                                                <table class="Style_5" cellspacing="0" cellpadding="0" border="0">
                                                                        <tbody>
                                                                                <tr>
                                                                                        <td class="Style_6"><img height="1" src="images/dot.gif" width="1" border="0">Dawn </td>
                                                                                        <td class="Style_6"><img src="images/ssqbar2.gif" width="<?php echo($dawn_bar); ?>" height="9" border="0"> <?php echo($dawn_points); ?></td>
                                                                                </tr>
                                                                                <tr>
                                                                                        <td colspan="2" height="7"></td>
                                                                                </tr>
                                                                                <tr>
                                                                                        <td class="Style_6"><img STYLE="Style_7" height="1" src="images/dot.gif" width="1" border="0" />Dusk </td>
                                                                                        <td class="Style_6"><img src="images/ssqbar1.gif" width="<?php echo($dusk_bar); ?>" height="9" border="0"> <?php echo($dusk_points); ?></td>
                                                                                </tr>
                                                                        </tbody>
                                                                </table>
                                                                <table cellspacing="0" class="Style_8" cellpadding="0" border="0" align="center">
                                                                        <tbody>
                                                                                <tr>
                                                                                        <td><img src="images/<?php echo($bongin1_img); ?>" width="85" height="86" border="0"></td>
                                                                                        <td><img src="images/<?php echo($bongin2_img); ?>" width="85" height="86" border="0"></td>
                                                                                        <td><img src="images/<?php echo($bongin3_img); ?>" width="85" height="86" border="0"></td>
                                                                                </tr>
                                                                                <tr>
                                                                                        <td colspan="3"><div align="center" class="Style_9"><img height="16" src="images/bonginName.gif" width="258" border="0" ></div></td>
                                                                                </tr>
                                                                        </tbody>
                                                                </table>
                                                        </td>
                                                </tr>
                                        </tbody>
                                </table>
                        </td>
                </tr>
        </tbody>
</table>
</div>
<!-- Powered By KIRALEX -->
</body>
</html>

And copy the contents of img_eng to main images dir.

rodier 20.08.2007 23:44

its not working for me.. look
http://acc.elmoreden.net/7s/status.php
instead of images there are
http://acc.elmoreden.net/7s/images/image_%3C?=$CONFIG['lang']?>/time<?=$day?>.jpg

maybe problem with php?


edit: fixed. problem with php .. short_open_tag = On (must be - thx to GREENGHOST)

Phantom2005 21.08.2007 09:29

or just change <? to <?php which i prefer in any way since i like clean and optimized php codes in xhtml like tpuNIsher does as well prolly :-p

Also im anti <tbody>

Anyway this is my whole script it was based to work with L2CP based sites but it shouldn't be hard to make it have a mind of it's own :o
Enjoy.

Вложения из исходного сообщения (сами файлы в копии отсутствуют):
ssq_php_script.rar — 762842 байт

emanuel 21.08.2007 09:43

Quote:

Originally Posted by Phantom2005 (Post 95129)
or just change <? to <?php which i prefer in any way since i like clean and optimized php codes in xhtml like tpuNIsher does as well prolly :-p

Also im anti <tbody>

Anyway this is my whole script it was based to work with L2CP based sites but it shouldn't be hard to make it have a mind of it's own :o
Enjoy.


<tbody> tag is genereted when you save a web page with Firefox, IE, Opera...


All times are GMT. The time now is 22:52.