Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Post Installation Help
Author Message
craeyon
Hangin' Around



Joined: Jun 04, 2006
Posts: 40

PostPosted: Tue Jul 04, 2006 1:50 pm Reply with quote

Nukelan as we know it has absolutely no support for its software. Not only that, it doesnt even have any friggin documentation. And it is the only software on the web that is useful for making secure transactions and Lan Party registrations through your nuke site.

Couple of days ago. And i no hitwalker will remember this. I had some problems with site paths. Now everything is fine. Its not showing any errors. (i checked with error messages on) the problem how ever now....
[ Only registered users can see links on this board! Get registered or login! ]

...is that the seating chart won't work. I m guessing its rn's ol's security patches stopping it but i dont know. I am at a point where suicide is definately necesary. Can someone show me the light here?

Thanks

Craeyon
 
View user's profile Send private message
hitwalker
Sells PC To Pay For Divorce



Joined:
Posts: 5661

PostPosted: Tue Jul 04, 2006 2:43 pm Reply with quote

suicide for nuke s.it ?
Never...not in a lifetime.....lol

i suggest you hire someone to look into this...
as far as i see it things still are not okay...
 
View user's profile Send private message
jaded
Theme Guru



Joined: Nov 01, 2003
Posts: 1006

PostPosted: Tue Jul 04, 2006 3:02 pm Reply with quote

I detect some installation files still located in your INSTALLATION folder.

To continue would expose your site to damage.

You must either delete the INSTALLATION folder or rename it in order to proceed.


have you thought of removing the installation folder so that we can see this page? Smile

_________________
Themes BB Skins [ Only registered users can see links on this board! Get registered or login! ]
Graphic Tees [ Only registered users can see links on this board! Get registered or login! ]
Paranormal Tees [ Only registered users can see links on this board! Get registered or login! ]
Ghost Stories & More [ Only registered users can see links on this board! Get registered or login! ] 
View user's profile Send private message Visit poster's website
craeyon







PostPosted: Tue Jul 04, 2006 3:13 pm Reply with quote

hah u caught me at the same time when i just put them up to change my site's password they are off now.
 
jaded







PostPosted: Tue Jul 04, 2006 4:32 pm Reply with quote

well, I installed this and I have found the issue with that page. By viewing the source where the missing image is I have found this

Code:
<b>Fatal error</b>:  Call to undefined function:  current_security_level() in <b>/home/****/public_html/modules/Nukelan/seating_chart.php</b> on line <b>119</b><br />


now, I do not know how to fix it but perhaps someone else will.

Here is the code from lines 100 to 125

Code:
$colors["cell_background"] = "#000000";

$colors["cell_alternate"] = "#000000";
$colors["text"] = "#ffffff";
$colors["blended_text"] = "#444444";
$colors["graphs"] = $colors["primary"];
$uresult = mysql_query("SELECT * FROM nukelan_signedup WHERE lan_uid='$uid' AND lan_id='$pid'");
$urow = mysql_fetch_array($uresult);
$tresult = mysql_query("SELECT * FROM nukelan_seat_objects WHERE id='$urow[room_loc]' AND room_id='$roomid'");
$useat = mysql_fetch_array($tresult);
if(@mysql_num_rows(@mysql_query("SELECT * FROM nukelan_seat_rooms WHERE id='$roomid'"))) {
   
      echo "<b>"._NLCLICKBELOW." "._NLPUTMOUSE."</b><br>";
      if ($useat) echo "<b>"._NLHAVESEAT."  <font size=2 color=green>$useat[name]</font></b><br>";
      else echo "<b>"._NLNOSEATRESERVED."</b><br>";
   
 ?>
      <table border="0" cellpadding="1" cellspacing="0" width="100%">
         <tr><td align="center" colspan="2" bgcolor="<?=$colors["cell_title"]?>"><?php
         //if($_POST["act"] != "admindeleteallrooms") { ?>
            <img src="modules/<? echo "$ModName"; ?>/seating_image.php?c=<?php print ($_GET["c"] ? $_GET["c"] : "0") ?>&grid=<?php print ($_GET["grid"] == 1 ? "1" : "0") ?>&roomid=<?php print "$roomid" ?>" name="seat"<?php if(current_security_level()>=2) { ?> onClick="clicky((window.event.x - findPosX(document.seat)) / 5, (window.event.y - findPosY(document.seat)) / 5)" onMouseOver="coords((window.event.x - findPosX(document.seat)) / 5, (window.event.y - findPosY(document.seat)) / 5)"<?php } ?> usemap="#seatmap" border="0" ismap GALLERYIMG="no">
            <?php require_once("modules/$ModName/seating_map.php");
         //} ?>
         </td></tr><?
         
         //if($_POST["act"] != "admindeleteallrooms"&&current_security_level()==1) { ?>
<?php      echo "<tr><td><br><b>"._NLCLICKABOVE."  "._NLPUTMOUSE."</b><br><br></td></tr>";
            //}


also, here is line 119

Code:
            <img src="modules/<? echo "$ModName"; ?>/seating_image.php?c=<?php print ($_GET["c"] ? $_GET["c"] : "0") ?>&grid=<?php print ($_GET["grid"] == 1 ? "1" : "0") ?>&roomid=<?php print "$roomid" ?>" name="seat"<?php if(current_security_level()>=2) { ?> onClick="clicky((window.event.x - findPosX(document.seat)) / 5, (window.event.y - findPosY(document.seat)) / 5)" onMouseOver="coords((window.event.x - findPosX(document.seat)) / 5, (window.event.y - findPosY(document.seat)) / 5)"<?php } ?> usemap="#seatmap" border="0" ismap GALLERYIMG="no">
 
craeyon







PostPosted: Tue Jul 04, 2006 4:41 pm Reply with quote

your seeing that issue because your includes folder is called "includes" while the genius named his "include"

moron >_<

ill try you code. repla in a few mins.
 
hitwalker







PostPosted: Tue Jul 04, 2006 4:48 pm Reply with quote

jaded,he doesnt have that error,even better....there are absolutely no errors....
thing is ,the grid isnt showing....
 
craeyon







PostPosted: Tue Jul 04, 2006 4:50 pm Reply with quote

ok this is my code. I paseted your code in this to. See what is wrong with this.

Code:


<?php
// filename: seating_chart.php
// ---------------------------------------------------------------------
// Nukelan Modules pack
// version 2.0
// by: Artemis
//
// [ Only registered users can see links on this board! Get registered or login! ]
// http://www.nukelan.com
// =====================================================================
// Special thanks to:
// Contra - for integrating the Multipay and IPN option into Nukelan.
// you the man
// =====================================================================
// LICENSE
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License (GPL)
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
//
// To read the license please visit http://www.gnu.org/copyleft/gpl.html
// ----------------------------------------------------------------------

if(!eregi("modules.php", $_SERVER['PHP_SELF'])){
     die("You can't access this file directly...");
}

require_once("mainfile.php");
$ModName = basename( dirname( __FILE__ ) );
get_lang($ModName);
$moddir = "modules/$ModName/"; 

$index = $lanconfig['index'];
include ("header.php");
include ("includes/_universal.php");

global $uname, $uid;
   $user = base64_decode($user);
   $user = explode(":", $user);
        $uid = "$user[0]";
   $uname = "$user[1]";
   $pwd = "$user[2]";

OpenTable();
$lan = mysql_fetch_array(mysql_query("SELECT * FROM nukelan_parties WHERE party_id='$pid'"));
   echo "<center> :: <a href=\"modules.php?op=modload&name=$ModName&amp;file=index&amp;lanop=show_party&amp;party_id=$lan[party_id]\">"._NLEVENTINFO."</a> :";
   // if tournaments for this LAN
   if (mysql_num_rows(mysql_query("SELECT * FROM nukelan_tournaments WHERE config_id='$lan[party_id]'"))) {
   echo ": <a href=\"modules.php?op=modload&name=$ModName&amp;file=tourneys&amp;lanop=show_list&amp;pid=$lan[party_id]\">"._NLTOURNAMENTS."</a> :";
   }
   // if Prizes for this LAN
   if (mysql_num_rows(mysql_query("SELECT * FROM nukelan_prizes WHERE config_id='$lan[party_id]'"))) {
   echo ": <a href=\"modules.php?op=modload&name=$ModName&amp;file=prizes&amp;lanop=show_prizes&amp;party=$lan[party_id]\">"._NLPRIZES."</a> :";
   }
   // if lodgin for this LAN
   if (mysql_num_rows(mysql_query("SELECT * FROM nukelan_lodging WHERE config_id='$lan[party_id]'"))) {
   echo ": <a href=\"modules.php?op=modload&name=$ModName&amp;file=lodging&amp;lanop=show_lodges&amp;pid=$lan[party_id]\">"._NLLODGING."</a> :";
   }
   // if Seating Chart for this LAN
   if ($lan['schart'] > 0) {
   echo ": <a href=\"modules.php?op=modload&name=$ModName&amp;file=seating_chart&amp;seat=showChart&amp;pid=$lan[party_id]\">"._NLSEATINGCHART."</a> :";
   }
   // if LAN has sponsors
   if (mysql_num_rows(mysql_query("SELECT * FROM nukelan_sponsors_parties WHERE party_id='$lan[party_id]'"))) {
   echo ": <a href=\"modules.php?op=modload&name=$ModName&amp;file=sponsors&amp;pid=$lan[party_id]\">"._NLPARTYSPONSORS."</a> :";
   }
   echo ": <a href=\"modules.php?op=modload&name=$ModName&amp;file=profile&amp;pid=$lan[party_id]\">"._NLPROFILE."</a>  ::</center>";
CloseTable();
echo "<br>";
OpenTable();

function object_exists($tableID) {
   if(@mysql_num_rows(@mysql_query("SELECT * FROM nukelan_seat_objects WHERE id=" . $tableID))) return 1;
   else return 0;
}

$row = @mysql_fetch_array(@mysql_query("SELECT * FROM nukelan_signedup WHERE lan_uid='" . $_COOKIE["userid"] . "' AND lan_id='$pid'"));
$party = @mysql_fetch_array(@mysql_query("SELECT * FROM nukelan_parties WHERE party_id='$pid'"));
$roomid = "$party[schart]";

function showseats($pid,$row,$party,$roomid) {

global $uid, $ModName;
$colors["background"] = "#000000";
$colors["primary"] = "#00ff00";
$colors["secondary"] = "#009900";
$colors["border"] = "#00ff00";
$colors["cell_title"] = "#111111";
$colors["cell_background"] = "#000000";
$colors["cell_alternate"] = "#000000";
$colors["text"] = "#ffffff";
$colors["blended_text"] = "#444444";
$colors["graphs"] = $colors["primary"];
$colors["cell_background"] = "#000000";
$colors["cell_alternate"] = "#000000";
$colors["text"] = "#ffffff";
$colors["blended_text"] = "#444444";
$colors["graphs"] = $colors["primary"];
$uresult = mysql_query("SELECT * FROM nukelan_signedup WHERE lan_uid='$uid' AND lan_id='$pid'");
$urow = mysql_fetch_array($uresult);
$tresult = mysql_query("SELECT * FROM nukelan_seat_objects WHERE id='$urow[room_loc]' AND room_id='$roomid'");
$useat = mysql_fetch_array($tresult);
if(@mysql_num_rows(@mysql_query("SELECT * FROM nukelan_seat_rooms WHERE id='$roomid'"))) {
   
      echo "<b>"._NLCLICKBELOW." "._NLPUTMOUSE."</b><br>";
      if ($useat) echo "<b>"._NLHAVESEAT."  <font size=2 color=green>$useat[name]</font></b><br>";
      else echo "<b>"._NLNOSEATRESERVED."</b><br>";
   
 ?>
      <table border="0" cellpadding="1" cellspacing="0" width="100%">
         <tr><td align="center" colspan="2" bgcolor="<?=$colors["cell_title"]?>"><?php
         //if($_POST["act"] != "admindeleteallrooms") { ?>
            <img src="modules/<? echo "$ModName"; ?>/seating_image.php?c=<?php print ($_GET["c"] ? $_GET["c"] : "0") ?>&grid=<?php print ($_GET["grid"] == 1 ? "1" : "0") ?>&roomid=<?php print "$roomid" ?>" name="seat"<?php if(current_security_level()>=2) { ?> onClick="clicky((window.event.x - findPosX(document.seat)) / 5, (window.event.y - findPosY(document.seat)) / 5)" onMouseOver="coords((window.event.x - findPosX(document.seat)) / 5, (window.event.y - findPosY(document.seat)) / 5)"<?php } ?> usemap="#seatmap" border="0" ismap GALLERYIMG="no">
            <?php require_once("modules/$ModName/seating_map.php");
         //} ?>
         </td></tr><?
         
         //if($_POST["act"] != "admindeleteallrooms"&&current_security_level()==1) { ?>
<?php      echo "<tr><td><br><b>"._NLCLICKABOVE."  "._NLPUTMOUSE."</b><br><br></td></tr>";
            //}
            $numUsersHere = @mysql_result(mysql_query("SELECT COUNT(*) FROM nukelan_signedup WHERE lan_id='$pid' AND room_loc=" . $thisobj["id"]), 0); ?>
            <tr><td align="left" valign="top">
               <table border="0" cellpadding="0" cellspacing="0" width="100%">
               <tr><td colspan="2" bgcolor="<?=$colors["cell_title"]?>">&nbsp;<font color="<?=$colors["primary"]?>"><b>current table:  <?php print $thisobj['name'] ?></b></font></td></tr>
               <tr>
               <td valign="top" align="left" width="50%">
                  <table border="0" cellpadding="0" cellspacing="0"><?php
                  if($thisobj["type"] == "table") { ?>
                     <tr><td><b>&nbsp;users here:</b>&nbsp;<?php print $numUsersHere ?>/<?php print $thisobj["capacity"] ?></td></tr>
                     <tr><td><?php
                     if($numUsersHere > 0) {
                        //$usersHere = mysql_query("SELECT * FROM nukelan_signedup WHERE lan_id='$pid' AND room_loc=" . $thisobj["id"]);
                        $usersHere = mysql_query("SELECT l.*, u.* FROM nuke_users AS l LEFT JOIN nukelan_signedup AS u ON (l.user_id=u.lan_uid) WHERE u.lan_id='$pid' AND room_loc=" . $thisobj["id"] . " ORDER BY l.username");
                        while($userHere = mysql_fetch_array($usersHere)) {
                           ?>&nbsp;&nbsp;<?php print $userHere["username"] ?><br><?php
                        }
                     }
                     else {
                        echo "&nbsp;&nbsp;"._NLSMALLNONE."";
                     } ?></td></tr><?php
                  } else {
                     echo "<tr><td>&nbsp;&nbsp;"._NLNOTATABLE."</td></tr>";
                  } ?>
                  </table>
               </td>
               <td width="50%" valign="middle">
               <?php
               if ($party[active]) {
               echo "<font color=red><b>"._NLSORRYSHUTDOWN."</b></font>";
               } else {
               ShowButtons($pid,$thisobj);
               }
               ?>
               </td>
               </tr>
               </table>
            </td></tr>
      
         <?php
         } // end if(get[c])
   } else {
      echo ""._NLSORRYNOCHART."";
   }
   }
function ShowButtons($pid,$thisobj){
global $user, $uid, $ModName;
$sitting = mysql_num_rows(mysql_query("SELECT * FROM nukelan_signedup WHERE lan_uid='$uid' AND lan_id='$pid' AND room_loc >= '1'"));
     echo "   <table border=0>\n"
          ."    <tr>\n"; 
     if ($thisobj >= 1)
            echo "<td>\n"
                 ."      <form action=\"modules.php\" method=\"post\" style=\"margin: 0;\">\n"
            ."      <input type=hidden name=op value=modload>\n"
               ."      <input type=hidden name=name value=$ModName>\n"
               ."      <input type=hidden name=file value=seating_chart>\n"
               ."      <input type=hidden name=lanop value=userSit>\n"
            ."      <input type=hidden name=uid value=".$uid.">\n"
            ."      <input type=hidden name=rloc value=".$thisobj['id'].">\n"
            ."      <input type=hidden name=pid value='$pid'>\n"
               ."      <input type=submit value=\""._NLSITDOWNHERE."\" style=\"width: 120px;\">\n"
               ."      </form>\n"
               ."     </td>\n";
   if ($sitting==1)         
          echo "<td>\n"
            ."<form action=\"modules.php\" method=\"post\" style=\"margin: 0;\">\n"
            ."      <input type=hidden name=op value=modload>\n"
               ."      <input type=hidden name=name value=$ModName>\n"
               ."      <input type=hidden name=file value=seating_chart>\n"
               ."      <input type=hidden name=lanop value=userStand>\n"
            ."      <input type=hidden name=uid value=".$uid.">\n"
            ."      <input type=hidden name=pid value='$pid'>\n"
               ."      <input type=submit value=\""._NLSTANDUP."\" style=\"width: 120px;\">\n"
               ."      </form>\n"
               ."     </td>\n";
                        
   echo "</tr></table>\n";
}
function sitting($pid,$uid,$rloc,$action) {
if ($uid <= 1) die (""._NLREGISTERFORSEAT."");
$result = mysql_query("SELECT * FROM nukelan_seat_objects WHERE id='$rloc'");
$row = mysql_fetch_array($result);
$num_here = mysql_num_rows(mysql_query("SELECT * FROM nukelan_signedup WHERE lan_id='$pid' AND room_loc='$rloc'"));

switch ($action) {
  case 'stand':
  if (!mysql_query("UPDATE nukelan_signedup SET room_loc=NULL WHERE lan_uid='$uid' AND lan_id='$pid'")) echo "font size=2 color=red><b>"._NLCANNOTSTANDUP."</b></font>";
  //else echo"<h2>You do not have a reserved seat</h2>";
  break;
  default:
  if ($num_here >= $row['capacity']) echo "<font size=2 color=red><b>"._NLTABLEFULL."</b></font>";
  elseif (!mysql_query("UPDATE nukelan_signedup SET room_loc='$rloc' WHERE lan_uid='$uid' AND lan_id='$pid'")) echo "<font size=2 color=red><b>"._NLCANNOTSITHERE."</b></font>";
  //else echo "<h2>You have reserved a seat at table: $row[name]</h2>";
  break;
}

 
  switch ($lanop) {
    case 'userSit':
     sitting($pid,$uid,$rloc, '');
     mysql_query("DELETE FROM nukelan_map_temp WHERE uid='$uid'");
    mysql_query("INSERT INTO nukelan_map_temp SET uid='$uid', room_id='$roomid'");
     showseats($pid,$row,$party,$roomid);
   break;
   case 'userStand':
     sitting($pid,$uid,$rloc,'stand');
     mysql_query("DELETE FROM nukelan_map_temp WHERE uid='$uid'");
    mysql_query("INSERT INTO nukelan_map_temp SET uid='$uid', room_id='$roomid'");
     showseats($pid,$row,$party,$roomid);
   break;
    case 'showChart':
    mysql_query("DELETE FROM nukelan_map_temp WHERE uid='$uid'");
    mysql_query("INSERT INTO nukelan_map_temp SET uid='$uid', room_id='$roomid'");
     showseats($pid,$row,$party,$roomid);
    break;
  default:
     mysql_query("DELETE FROM nukelan_map_temp WHERE uid='$uid'");
    mysql_query("INSERT INTO nukelan_map_temp SET uid='$uid', room_id='$roomid'");
     showseats($pid,$row,$party,$roomid);
     break;
   }
   echo "</table>";
   
CloseTable();
include ("footer.php");
?>


this is the error that i get

Parse error: parse error, unexpected T_ELSE in /home/****/public_html/modules/Nukelan/seating_chart.php on line 167
 
hitwalker







PostPosted: Tue Jul 04, 2006 4:57 pm Reply with quote

i give up....2 hours on this junk is long enough..
 
craeyon







PostPosted: Tue Jul 04, 2006 5:01 pm Reply with quote

[ Only registered users can see links on this board! Get registered or login! ]

maybe a threatining email might work.

Jaded is this module working on yours? and and what file did u edit? the seating_?.php file?
 
gregexp
The Mouse Is Extension Of Arm



Joined: Feb 21, 2006
Posts: 1497
Location: In front of a screen....HELP! lol

PostPosted: Tue Jul 04, 2006 7:04 pm Reply with quote

Can someone please link to where I can download the module?

Im thinking this may be an error in how it handles situations.

_________________
For those who stand shall NEVER fall and those who fall shall RISE once more!! 
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger ICQ Number
craeyon







PostPosted: Tue Jul 04, 2006 7:24 pm Reply with quote

yes sir right here
[ Only registered users can see links on this board! Get registered or login! ]

its nukelan2.0
but the dood forgot to include the _config.php file inthe package. Hence you can take that from nukelan1.5 package.


Last edited by craeyon on Tue Jul 04, 2006 10:02 pm; edited 1 time in total 
craeyon







PostPosted: Tue Jul 04, 2006 9:25 pm Reply with quote

Ok here is my guess.

The GD Library (gd for gif draw) is not supported by the my webserver. Crying or Very sad

EDIT: Nevermind that...just got an email from support saying its already enabled on the webserver.
 
gregexp







PostPosted: Tue Jul 04, 2006 11:51 pm Reply with quote

anytime gd is not enabled, no security image will work(for logins)Wink

Thus the main reason it probably wasnt asked.
 
craeyon







PostPosted: Wed Jul 05, 2006 12:15 am Reply with quote

ok so there is someting wrong with the code.

the author emailed me this is what he said:

Code:


Howdy,

 

The error you’re getting happens for different reasons.  If you have already set up the seating room and given it dimensions (for a 20 foot by 20 foot room, I’d use 20x20) then the database should have enough info to make the image.

 

Since the image isn’t being created, we can assume one of two things.  Either A: the GD Library (gdlib) isn’t installed or configured on your web server.  Or B: for some odd reason the code isn’t executing properly.  If error reporting was turned on, we could get a closer look at the problem by going to

http://www.digitaldistrict.net/modules/Nukelan/seating_image.php?c=0&grid=0&roomid=1 but that doesn’t yield anything so I have to assume that not all errors are being printed for the time being.

 

In most cases, the seating chart doesn’t show because the GDLib isn’t installed, but if it is installed and the error is pointing at something else, I can try to be of some help.

 

Peace!

 

Brooks

(artemis)


and error reporting has been on since my very first post in this thread btw.

eh..
 
gregexp







PostPosted: Wed Jul 05, 2006 9:28 am Reply with quote

time to debug the script then.

After looking at the code, This was not ported to nuke the way (inmy opinion) It should be. The code creates its own mysql link, includes are set to the wrong file link, Those are in my first 5 minutes of looking at this:
this is what it was:
Code:
require_once("../../config.php");

$link = mysql_connect($dbhost, $dbuname, $dbpass)
        or die("Could not connect : " . mysql_error());
  //  print "Connected successfully";
    mysql_select_db($dbname) or die("Could not select database");
$page = getenv ("HTTP_HOST");
@require_once("http://$page/include/_functions.php");
function scale($value, $dim = 5) { return $value * $dim; }
function grabcolors($hexval) {
   $hex = substr($hexval, 1);
   $ret["r"] = hexdec(substr($hex, 0, 2));
   $ret["g"] = hexdec(substr($hex, 2, 2));
   $ret["b"] = hexdec(substr($hex, 4, 2));
   return $ret;
}

$roomid = $_SERVER['QUERY_STRING'];
$roomidloc = strpos("".$_SERVER['QUERY_STRING']."", 'roomid=');
$roomid = substr("".$_SERVER['QUERY_STRING']."", $roomidloc+7);
$ModName = basename( dirname( __FILE__ ) );
//$room = @mysql_fetch_array(@mysql_query("SELECT * FROM nukelan_seat_rooms WHERE id='$roomid'"));
$roomresult = mysql_query("SELECT width,height FROM nukelan_seat_rooms WHERE id='$roomid'");
$room["width"] = mysql_result($roomresult,0,"width");
//print mysql_result($roomresult,0,"width");
$room["height"] = mysql_result($roomresult,0,"height");
//print mysql_result($roomresult,0,"height");
mysql_free_result($roomresult);

$objects = @mysql_query("SELECT * FROM nukelan_seat_objects WHERE id > '0' AND room_id='$roomid'");
$img = imagecreate($room["width"] * 5, $room["height"] * 5)
   or die("cannot initialize new GD image stream.<br>administrator: please verify that the GD library is included in your PHP build.");
$seat["background"] = "#000000";
$seat["border"] = "#FFFFFF";
$seat["tablecolor"] = "#009900";
$seat["tableborder"] = "#00ff00";
$seat["voidcolor"] = "#000000";
$seat["voidborder"] = "#ffffff";
$seat["gridcolor"] = "#CCCCCC";
$seat["gridmidcolor"] = "#0000FF";
$seat["gridlitecolor"] = "#FFFFFF";
$seat["currentcolor"] = "#00ff00";

$c = grabcolors($seat["tablecolor"]);
$color["tablecolor"] = imagecolorallocate($img, $c["r"], $c["g"], $c["b"]);
$c = grabcolors($seat["tableborder"]);
$color["tableborder"] = imagecolorallocate($img, $c["r"], $c["g"], $c["b"]);
$c = grabcolors($seat["voidcolor"]);
$color["voidcolor"] = imagecolorallocate($img, $c["r"], $c["g"], $c["b"]);
$c = grabcolors($seat["voidborder"]);
$color["voidborder"] = imagecolorallocate($img, $c["r"], $c["g"], $c["b"]);
$c = grabcolors($seat["gridcolor"]);
$color["grid"] = imagecolorallocate($img, $c["r"], $c["g"], $c["b"]);
$c = grabcolors($seat["gridmidcolor"]);
$color["gridmid"] = imagecolorallocate($img, $c["r"], $c["g"], $c["b"]);
$c = grabcolors($seat["gridlitecolor"]);
$color["gridlite"] = imagecolorallocate($img, $c["r"], $c["g"], $c["b"]);
$c = grabcolors($seat["currentcolor"]);
$color["current"] = imagecolorallocate($img, $c["r"], $c["g"], $c["b"]);
$c = grabcolors($seat["background"]);
$color["bg"] = imagecolorallocate($img, $c["r"], $c["g"], $c["b"]);
$c = grabcolors($seat["border"]);
$color["border"] = imagecolorallocate($img, $c["r"], $c["g"], $c["b"]);
imagefill($img, 0, 0, $color["bg"]);
imagerectangle($img, 0, 0, scale($room["width"]) - 1, scale($room["height"]) - 1, $color["border"]);
while($thisobj = @mysql_fetch_array($objects)) {

   imagefilledrectangle($img, scale($thisobj["startx"]), scale($thisobj["starty"]), scale($thisobj["startx"] + $thisobj["width"]), scale($thisobj["starty"] + $thisobj["height"]), ($_GET["c"] == $thisobj["id"] ? $color["tablecolor"] : ($thisobj["type"] == "table" ? $color["tablecolor"] : $color["tablecolor"])));
   imagerectangle($img, scale($thisobj["startx"]), scale($thisobj["starty"]), scale($thisobj["startx"] + $thisobj["width"]), scale($thisobj["starty"] + $thisobj["height"]), ($thisobj["type"] == "table" ? $color["tableborder"] : $color["tableborder"]));
}
if($_GET["grid"] == 1) {
   for($i = 0; $i < $room["width"]; $i++) {
      if($i % 10 == 0) imageline($img, scale($i), 0, scale($i), scale($room["height"]), $color["gridlite"]);
      elseif($i % 5 == 0) imageline($img, scale($i), 0, scale($i), scale($room["height"]), $color["gridmid"]);
      else imageline($img, scale($i), 0, scale($i), scale($room["height"]), $color["grid"]);
   }
   for($i = 0; $i < $room["height"]; $i++) {
      if($i % 10 == 0) imageline($img, 0, scale($i), scale($room["width"]), scale($i), $color["gridlite"]);
      elseif($i % 5 == 0) imageline($img, 0, scale($i), scale($room["width"]), scale($i), $color["gridmid"]);
      else imageline($img, 0, scale($i), scale($room["width"]), scale($i), $color["grid"]);
   }
}
if (imagetypes() & IMG_GIF) {
    header ("Content-type: image/gif");
    imagegif ($img);
}
elseif(imagetypes() & IMG_PNG) {
   header("Content-type: image/png");
   imagepng($img);
}
elseif (imagetypes() & IMG_JPG) {
   header("Content-type: image/jpeg");
   imagejpeg($img, "", 100);
}
elseif(imagetypes() & IMG_WBMP) {
   header("Content-type: image/vnd.wap.wbmp");
   imagebmp($img);
}
else die("No image support in this PHP server");
//imagepng($img); // change to gif !
//imagedestroy($img);
?>


Now Ive change that to :
Code:
<?php

// filename: seating_image.php
// ---------------------------------------------------------------------
// Nukelan Modules pack
// version 2.0
// by: Artemis
//
// [ Only registered users can see links on this board! Get registered or login! ]
// [ Only registered users can see links on this board! Get registered or login! ]
// =====================================================================
// Special thanks to:
// Contra - for integrating the Multipay and IPN option into Nukelan.
// you the man
// =====================================================================
// LICENSE
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License (GPL)
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
//
// To read the license please visit [ Only registered users can see links on this board! Get registered or login! ]
// ----------------------------------------------------------------------

include("header.php");
$page = getenv ("HTTP_HOST");
@require_once("/modules/$module_name/includes/_functions.php");

function scale($value, $dim = 5) { return $value * $dim; }
function grabcolors($hexval) {
        $hex = substr($hexval, 1);
        $ret["r"] = hexdec(substr($hex, 0, 2));
        $ret["g"] = hexdec(substr($hex, 2, 2));
        $ret["b"] = hexdec(substr($hex, 4, 2));
        return $ret;
}

$roomid = $_SERVER['QUERY_STRING'];
$roomidloc = strpos("".$_SERVER['QUERY_STRING']."", 'roomid=');
$roomid = substr("".$_SERVER['QUERY_STRING']."", $roomidloc+7);
$ModName = basename( dirname( __FILE__ ) );
//$room = @mysql_fetch_array(@mysql_query("SELECT * FROM nukelan_seat_rooms WHERE id='$roomid'"));
$roomresult = mysql_query("SELECT width,height FROM nukelan_seat_rooms WHERE id='$roomid'");
$room["width"] = mysql_result($roomresult,0,"width");
//print mysql_result($roomresult,0,"width");
$room["height"] = mysql_result($roomresult,0,"height");
//print mysql_result($roomresult,0,"height");
mysql_free_result($roomresult);

$objects = @mysql_query("SELECT * FROM nukelan_seat_objects WHERE id > '0' AND room_id='$roomid'");
$img = imagecreate($room["width"] * 5, $room["height"] * 5)
        or die("cannot initialize new GD image stream.<br>administrator: please verify that the GD library is included in your PHP build.");
$seat["background"] = "#000000";
$seat["border"] = "#FFFFFF";
$seat["tablecolor"] = "#009900";
$seat["tableborder"] = "#00ff00";
$seat["voidcolor"] = "#000000";
$seat["voidborder"] = "#ffffff";
$seat["gridcolor"] = "#CCCCCC";
$seat["gridmidcolor"] = "#0000FF";
$seat["gridlitecolor"] = "#FFFFFF";
$seat["currentcolor"] = "#00ff00";

$c = grabcolors($seat["tablecolor"]);
$color["tablecolor"] = imagecolorallocate($img, $c["r"], $c["g"], $c["b"]);
$c = grabcolors($seat["tableborder"]);
$color["tableborder"] = imagecolorallocate($img, $c["r"], $c["g"], $c["b"]);
$c = grabcolors($seat["voidcolor"]);
$color["voidcolor"] = imagecolorallocate($img, $c["r"], $c["g"], $c["b"]);
$c = grabcolors($seat["voidborder"]);
$color["voidborder"] = imagecolorallocate($img, $c["r"], $c["g"], $c["b"]);
$c = grabcolors($seat["gridcolor"]);
$color["grid"] = imagecolorallocate($img, $c["r"], $c["g"], $c["b"]);
$c = grabcolors($seat["gridmidcolor"]);
$color["gridmid"] = imagecolorallocate($img, $c["r"], $c["g"], $c["b"]);
$c = grabcolors($seat["gridlitecolor"]);
$color["gridlite"] = imagecolorallocate($img, $c["r"], $c["g"], $c["b"]);
$c = grabcolors($seat["currentcolor"]);
$color["current"] = imagecolorallocate($img, $c["r"], $c["g"], $c["b"]);
$c = grabcolors($seat["background"]);
$color["bg"] = imagecolorallocate($img, $c["r"], $c["g"], $c["b"]);
$c = grabcolors($seat["border"]);
$color["border"] = imagecolorallocate($img, $c["r"], $c["g"], $c["b"]);
imagefill($img, 0, 0, $color["bg"]);
imagerectangle($img, 0, 0, scale($room["width"]) - 1, scale($room["height"]) - 1, $color["border"]);
while($thisobj = @mysql_fetch_array($objects)) {

        imagefilledrectangle($img, scale($thisobj["startx"]), scale($thisobj["starty"]), scale($thisobj["startx"] + $thisobj["width"]), scale($thisobj["starty"] + $thisobj["height"]), ($_GET["c"] == $thisobj["id"] ? $color["tablecolor"] : ($thisobj["type"] == "table" ? $color["tablecolor"] : $color["tablecolor"])));
        imagerectangle($img, scale($thisobj["startx"]), scale($thisobj["starty"]), scale($thisobj["startx"] + $thisobj["width"]), scale($thisobj["starty"] + $thisobj["height"]), ($thisobj["type"] == "table" ? $color["tableborder"] : $color["tableborder"]));
}
if($_GET["grid"] == 1) {
        for($i = 0; $i < $room["width"]; $i++) {
                if($i % 10 == 0) imageline($img, scale($i), 0, scale($i), scale($room["height"]), $color["gridlite"]);
                elseif($i % 5 == 0) imageline($img, scale($i), 0, scale($i), scale($room["height"]), $color["gridmid"]);
                else imageline($img, scale($i), 0, scale($i), scale($room["height"]), $color["grid"]);
        }
        for($i = 0; $i < $room["height"]; $i++) {
                if($i % 10 == 0) imageline($img, 0, scale($i), scale($room["width"]), scale($i), $color["gridlite"]);
                elseif($i % 5 == 0) imageline($img, 0, scale($i), scale($room["width"]), scale($i), $color["gridmid"]);
                else imageline($img, 0, scale($i), scale($room["width"]), scale($i), $color["grid"]);
        }
}
if (imagetypes() & IMG_GIF) {
    header ("Content-type: image/gif");
    imagegif ($img);
}
elseif(imagetypes() & IMG_PNG) {
        header("Content-type: image/png");
        imagepng($img);
}
elseif (imagetypes() & IMG_JPG) {
        header("Content-type: image/jpeg");
        imagejpeg($img, "", 100);
}
elseif(imagetypes() & IMG_WBMP) {
        header("Content-type: image/vnd.wap.wbmp");
        imagebmp($img);
}
else die("No image support in this PHP server");
//imagepng($img); // change to gif !
//imagedestroy($img);
?>
 
gregexp







PostPosted: Wed Jul 05, 2006 9:48 am Reply with quote

Now that I think about it, that shouldnt be header.php, It should be mainfile.php
 
craeyon







PostPosted: Wed Jul 05, 2006 12:21 pm Reply with quote

k so ill edit seating image with both headder.php and mainfile.php in it. lets see what happens.

get back in 10 mins.

DANG IT: not working Crying or Very sad
 
gregexp







PostPosted: Wed Jul 05, 2006 2:04 pm Reply with quote

ok this thing was definitley not ported to nuke properly.
ALL sql statements are made for mysql and if you dont run mysql then umm yeah, it wont work.

To be honest, this is out of my coding ability and I may be wrong from previous posts.
 
craeyon







PostPosted: Wed Jul 05, 2006 2:37 pm Reply with quote

what if i say i am running MySQL Version (v4.1.19-standard) ?
 
craeyon







PostPosted: Wed Jul 05, 2006 6:45 pm Reply with quote

omg guy you wont believe this but this thing randomly started working..
[ Only registered users can see links on this board! Get registered or login! ]

YESS!!!

acctaully his happened when i replaced seating_image.php file with the one i actaully got. when i go here.
[ Only registered users can see links on this board! Get registered or login! ]

i still get 3 errors but this thing works now... i have no clue why and how. if someone has an explaination please let me know.

Thanks hitwalker, jaded, darklord for your time and skillz i really appreciate it.

EDIT: I take back everything i said above except the last line. The thing shows up but when you hit sit down here it wont well.. make u sit down. wow this is a lot of pain.

EDIT: ok i m so confused. i cant sit down... while other people can.. this is wierd.

LAST EDIT: ok everything is fine sorry for repeatedly pasting messages. Thanks everyone.
 
Turned
New Member
New Member



Joined: Aug 12, 2007
Posts: 5

PostPosted: Thu Aug 23, 2007 10:53 pm Reply with quote

Hey... sorry to bruing up a old thread... having probs with this myself.

craeyon... could you please send me your seating_image and let me know how u fixed it?
 
View user's profile Send private message
craeyon







PostPosted: Thu Aug 23, 2007 10:58 pm Reply with quote

here it is..
[ Only registered users can see links on this board! Get registered or login! ]

its a txt file archived to a rar so just unzip it.. good luck..
 
Turned







PostPosted: Thu Aug 23, 2007 11:18 pm Reply with quote

no success.

Do you remember what you did to get it to work?
 
Turned







PostPosted: Thu Aug 23, 2007 11:19 pm Reply with quote

this is the page:
[ Only registered users can see links on this board! Get registered or login! ]
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Post Installation Help

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©