[Help] How to Fixed Logo Guild Show in Website..!

Results 1 to 14 of 14
  1. #1
    Enthusiast muonline1996 is offline
    MemberRank
    May 2020 Join Date
    37Posts

    sad [Help] How to Fixed Logo Guild Show in Website..!

    Help How to Fixed Logo Guild Show in Website... (PHP +MSSQL)

    example images :


    Code :
    PHP Code:
    <? $ICN_CS=mssql_query("select OWNER_GUILD,SIEGE_START_DATE,SIEGE_END_DATE from MuOnline.dbo.MuCastle_DATA");

    while(
    $row=mssql_fetch_assoc($ICN_CS)){

    $ICN_OWNER_GUILD=$row['OWNER_GUILD'];        

    $ICN_CS_Start=$row['SIEGE_START_DATE'];

    $ICN_CS_Battle=$row['SIEGE_END_DATE'];

    $ICN_CSlogo="select G_Name,G_Mark,G_Master from MuOnline.dbo.Guild where G_Name='$ICN_OWNER_GUILD'";

    $ICN_sql_siegelogo_check=mssql_query($ICN_CSlogo);        

    $row1=mssql_fetch_row($ICN_sql_siegelogo_check);        

    $ICN_logosiege=urlencode(bin2hex($row1[1]));

    $ICN_duenologo="select Name from MuOnline.dbo.Character where Name='$row1[2]'";        

    $ICN_sql_duenologo_check=mssql_query($ICN_duenologo);        

    $row2=mssql_fetch_row($ICN_sql_duenologo_check); ?>

    <table border="0" cellpadding="0" cellspacing="0">

    <tr><td bgcolor="#CCCC99"><img src="get.php?aL=<?=$ICN_logosiege;?>.png" alt="logo" width="100" height="100"></a></td></tr></table>

    <div class="siege_winner"><p>Guild: <b>

    <?=$ICN_OWNER_GUILD;?></b></p>

    <p>Master: <span><?=$row2[0];?></span></p></div>

    <div class="siege_prox">Last Castle Date: <?=$ICN_CS_Start;?> <span>Next Castle Date: 

    <?=$ICN_CS_Battle;?></span></div>

    <? }?>
    thank for fixed :)
    Last edited by muonline1996; 01-07-20 at 11:30 AM.


  2. #2
    if(!caffeine) continue; leorond is online now
    MemberRank
    Jul 2012 Join Date
    Czech RepublicLocation
    489Posts

    Re: [Help] How to Fixed Logo Guild Show in Website..!

    Quote Originally Posted by muonline1996 View Post
    Help How to Fixed Logo Guild Show in Website... (PHP +MSSQL)

    example images :


    Code :
    PHP Code:
    <? $ICN_CS=mssql_query("select OWNER_GUILD,SIEGE_START_DATE,SIEGE_END_DATE from MuOnline.dbo.MuCastle_DATA");

    while(
    $row=mssql_fetch_assoc($ICN_CS)){

    $ICN_OWNER_GUILD=$row['OWNER_GUILD'];        

    $ICN_CS_Start=$row['SIEGE_START_DATE'];

    $ICN_CS_Battle=$row['SIEGE_END_DATE'];

    $ICN_CSlogo="select G_Name,G_Mark,G_Master from MuOnline.dbo.Guild where G_Name='$ICN_OWNER_GUILD'";

    $ICN_sql_siegelogo_check=mssql_query($ICN_CSlogo);        

    $row1=mssql_fetch_row($ICN_sql_siegelogo_check);        

    $ICN_logosiege=urlencode(bin2hex($row1[1]));

    $ICN_duenologo="select Name from MuOnline.dbo.Character where Name='$row1[2]'";        

    $ICN_sql_duenologo_check=mssql_query($ICN_duenologo);        

    $row2=mssql_fetch_row($ICN_sql_duenologo_check); ?>

    <table border="0" cellpadding="0" cellspacing="0">

    <tr><td bgcolor="#CCCC99"><img src="get.php?aL=<?=$ICN_logosiege;?>.png" alt="logo" width="100" height="100"></a></td></tr></table>

    <div class="siege_winner"><p>Guild: <b>

    <?=$ICN_OWNER_GUILD;?></b></p>

    <p>Master: <span><?=$row2[0];?></span></p></div>

    <div class="siege_prox">Last Castle Date: <?=$ICN_CS_Start;?> <span>Next Castle Date: 

    <?=$ICN_CS_Battle;?></span></div>

    <? }?>
    thank for fixed :)
    Hi, I think the mistake will be to use the same function to display the guild logo, for example in the TOP 5 guild on the same page.

    Try creating the same function with a different name.

    Alternatively, comment out the feature in the TOP 5 Guild and see if the logo is displayed.

    Update: You shouldn't knit Apples with Pears.
    Learn to use echo(), print(), ...

  3. #3
    Enthusiast muonline1996 is offline
    MemberRank
    May 2020 Join Date
    37Posts

    Re: [Help] How to Fixed Logo Guild Show in Website..!

    @leorond not work!

    Use the echo : <? echo $ICN_logosiege; ?>

    Show results:

    1144441111333311113333111133331111333311116666111155551111555511
    Last edited by muonline1996; 01-07-20 at 01:46 PM.

  4. #4
    if(!caffeine) continue; leorond is online now
    MemberRank
    Jul 2012 Join Date
    Czech RepublicLocation
    489Posts

    Re: [Help] How to Fixed Logo Guild Show in Website..!

    PHP Code:
        $color[0]    =    "";
        
    $color[1]    =    "#000000";
        
    $color[2]    =    "#8c8a8d";
        
    $color[3]    =    "#ffffff";
        
    $color[4]    =    "#fe0000";
        
    $color[5]    =    "#ff8a00";
        
    $color[6]    =    "#ffff00";
        
    $color[7]    =    "#8cff01";
        
    $color[8]    =    "#00ff00";
        
    $color[9]    =    "#01ff8d";
        
    $color["a"]    =    "#00ffff";
        
    $color["b"]    =    "#008aff";
        
    $color["c"]    =    "#0000fe";
        
    $color["d"]    =    "#8c00ff";
        
    $color["e"]    =    "#ff00fe";
        
    $color["f"]    =    "#ff008c"
    I don't know how your function converts to IMG but it just assigns.

    Try replacing <img> </img> with <div> </div>

    - - - Updated - - -

    Quote Originally Posted by leorond View Post
    PHP Code:
        $color[0]    =    "";
        
    $color[1]    =    "#000000";
        
    $color[2]    =    "#8c8a8d";
        
    $color[3]    =    "#ffffff";
        
    $color[4]    =    "#fe0000";
        
    $color[5]    =    "#ff8a00";
        
    $color[6]    =    "#ffff00";
        
    $color[7]    =    "#8cff01";
        
    $color[8]    =    "#00ff00";
        
    $color[9]    =    "#01ff8d";
        
    $color["a"]    =    "#00ffff";
        
    $color["b"]    =    "#008aff";
        
    $color["c"]    =    "#0000fe";
        
    $color["d"]    =    "#8c00ff";
        
    $color["e"]    =    "#ff00fe";
        
    $color["f"]    =    "#ff008c"
    I don't know how your function converts to IMG but it just assigns.

    Try replacing <img> </img> with <div> </div>
    Or use the function

    PHP Code:
    <?
    function    guildlogo($guildmark,    $coordxy)
    {
        
    $guildmark    =    bin2hex($guildmark);
        
    $color[0]    =    "";
        
    $color[1]    =    "#000000";
        
    $color[2]    =    "#8c8a8d";
        
    $color[3]    =    "#ffffff";
        
    $color[4]    =    "#fe0000";
        
    $color[5]    =    "#ff8a00";
        
    $color[6]    =    "#ffff00";
        
    $color[7]    =    "#8cff01";
        
    $color[8]    =    "#00ff00";
        
    $color[9]    =    "#01ff8d";
        
    $color["a"]    =    "#00ffff";
        
    $color["b"]    =    "#008aff";
        
    $color["c"]    =    "#0000fe";
        
    $color["d"]    =    "#8c00ff";
        
    $color["e"]    =    "#ff00fe";
        
    $color["f"]    =    "#ff008c";
        
    $i            =    0;
        
    $td            =    0;
        
    $table        =    "<table style=\"width: ".(8*$coordxy)."px;height:".(8*$coordxy)."px\" border=0 cellpadding=0 cellspacing=0><tr>";
        do
        {
            
    $place    =    $guildmark{$i};
            
    $i++;
            
    $td++;
            
    $add    =    $color[$place];
            
    $table    .=    "<td class=\"guildlogo\" style=\"background-color: ".$add."; border:0px;\" width=\"".$coordxy."\" height=\"".$coordxy."\"></td>";
            if    (
    $td    ==    8)
            { 
                
    $table    .=    "</tr>"
                if    (
    $td    !=    64)    $table    .=    "<tr>";
                
    $td    =    0
            }
        }
        while    (
    $i    <    64);
        
    $table    .=    "</table>";
        return    
    $table;
    }
    ?>
    PHP Code:
    guildlogo("1144441111333311113333111133331111333311116666111155551111555511"size); 

  5. #5
    Enthusiast muonline1996 is offline
    MemberRank
    May 2020 Join Date
    37Posts

    Re: [Help] How to Fixed Logo Guild Show in Website..!

    My File :

    Castle.php
    PHP Code:
    https://drive.google.com/file/d/1vmjfrj0TQbz33eEGGivf5MKTk8Ml73G0/view 
    Castle2.php
    PHP Code:
    https://drive.google.com/file/d/1B3oEj8Q4pn1ELRxcDu3G9qsTvGKTv4so/view 

    you can fixed in my file ? :)
    Last edited by muonline1996; 01-07-20 at 04:25 PM.

  6. #6
    if(!caffeine) continue; leorond is online now
    MemberRank
    Jul 2012 Join Date
    Czech RepublicLocation
    489Posts

    Re: [Help] How to Fixed Logo Guild Show in Website..!

    Quote Originally Posted by muonline1996 View Post
    My File :

    Castle.php
    PHP Code:
    https://drive.google.com/file/d/1vmjfrj0TQbz33eEGGivf5MKTk8Ml73G0/view 
    Castle2.php
    PHP Code:
    https://drive.google.com/file/d/1B3oEj8Q4pn1ELRxcDu3G9qsTvGKTv4so/view 

    you can fixed in my file ? :)

    Try it like this. I didn't try it.
    PHP Code:
    <?php
    function    guildlogo($guildmark,    $coordxy)
    {
        
    $guildmark    =    bin2hex($guildmark);
        
    $color[0]    =    "";
        
    $color[1]    =    "#000000";
        
    $color[2]    =    "#8c8a8d";
        
    $color[3]    =    "#ffffff";
        
    $color[4]    =    "#fe0000";
        
    $color[5]    =    "#ff8a00";
        
    $color[6]    =    "#ffff00";
        
    $color[7]    =    "#8cff01";
        
    $color[8]    =    "#00ff00";
        
    $color[9]    =    "#01ff8d";
        
    $color["a"]    =    "#00ffff";
        
    $color["b"]    =    "#008aff";
        
    $color["c"]    =    "#0000fe";
        
    $color["d"]    =    "#8c00ff";
        
    $color["e"]    =    "#ff00fe";
        
    $color["f"]    =    "#ff008c";
        
    $i            =    0;
        
    $td            =    0;
        
    $table        =    "<table style=\"width: ".(8*$coordxy)."px;height:".(8*$coordxy)."px\" border=0 cellpadding=0 cellspacing=0><tr>";
        do
        {
            
    $place    =    $guildmark{$i};
            
    $i++;
            
    $td++;
            
    $add    =    $color[$place];
            
    $table    .=    "<td class=\"guildlogo\" style=\"background-color: ".$add."; border:0px;\" width=\"".$coordxy."\" height=\"".$coordxy."\"></td>";
            if    (
    $td    ==    8)
            { 
                
    $table    .=    "</tr>"
                if    (
    $td    !=    64)    $table    .=    "<tr>";
                
    $td    =    0
            }
        }
        while    (
    $i    <    64);
        
    $table    .=    "</table>";
        return    
    $table;
    }

    $ICN_CS=mssql_query("select OWNER_GUILD,SIEGE_START_DATE,SIEGE_END_DATE from MuOnline.dbo.MuCastle_DATA");
    while(
    $row=mssql_fetch_assoc($ICN_CS)){
    $ICN_OWNER_GUILD=$row['OWNER_GUILD'];
    $ICN_CS_Start=$row['SIEGE_START_DATE'];
    $ICN_CS_Battle=$row['SIEGE_END_DATE'];
    $ICN_CSlogo="select G_Name,G_Mark,G_Master from MuOnline.dbo.Guild where G_Name='$ICN_OWNER_GUILD'";
    $ICN_sql_siegelogo_check=mssql_query($ICN_CSlogo);
    $row1=mssql_fetch_row($ICN_sql_siegelogo_check);
    //$ICN_logosiege=urlencode(bin2hex($row1[1]));
    $ICN_logosiege=guildlogo($row1[1],5); 
    $ICN_duenologo="select Name from MuOnline.dbo.Character where Name='$row1[2]'";
    $ICN_sql_duenologo_check=mssql_query($ICN_duenologo);
    $row2=mssql_fetch_row($ICN_sql_duenologo_check);

    echo 
    "<table border='0' cellpadding='0' cellspacing='0'>
            <tr>
                <td bgcolor='#CCCC99'>"
    .$ICN_logosiege." alt='logo' width='100' height='100'>
                </td>
            </tr>
        </table>
        <div class='siege_winner'><p>Guild: <b>"
    .$ICN_OWNER_GUILD."</b></p>
            <p>Master: 
                <span>"
    .$row2[0]."</span>
            </p>
        </div>
        <div class='siege_prox'>Last Castle Date: "
    .$ICN_CS_Start."
            <span>Next Castle Date: "
    .$ICN_CS_Battle."</span>
        </div>"
    ;
    ?>
    Update:
    The entire code is not secure.
    You should also use the new PHP in which some functions like
    PHP Code:
    mssql_query (); 
    or
    PHP Code:
    bin2hex (); 
    Also
    PHP Code:
    <? ?>
    is wrong, it's supposed to be
    PHP Code:
    <?php ?>
    Last edited by leorond; 01-07-20 at 06:31 PM.

  7. #7
    cMuServices cMu is online now
    MemberRank
    Jan 2017 Join Date
    462Posts

    Re: [Help] How to Fixed Logo Guild Show in Website..!

    Quote Originally Posted by leorond View Post
    Try it like this. I didn't try it.
    PHP Code:
    <?php
    function    guildlogo($guildmark,    $coordxy)
    {
        
    $guildmark    =    bin2hex($guildmark);
        
    $color[0]    =    "";
        
    $color[1]    =    "#000000";
        
    $color[2]    =    "#8c8a8d";
        
    $color[3]    =    "#ffffff";
        
    $color[4]    =    "#fe0000";
        
    $color[5]    =    "#ff8a00";
        
    $color[6]    =    "#ffff00";
        
    $color[7]    =    "#8cff01";
        
    $color[8]    =    "#00ff00";
        
    $color[9]    =    "#01ff8d";
        
    $color["a"]    =    "#00ffff";
        
    $color["b"]    =    "#008aff";
        
    $color["c"]    =    "#0000fe";
        
    $color["d"]    =    "#8c00ff";
        
    $color["e"]    =    "#ff00fe";
        
    $color["f"]    =    "#ff008c";
        
    $i            =    0;
        
    $td            =    0;
        
    $table        =    "<table style=\"width: ".(8*$coordxy)."px;height:".(8*$coordxy)."px\" border=0 cellpadding=0 cellspacing=0><tr>";
        do
        {
            
    $place    =    $guildmark{$i};
            
    $i++;
            
    $td++;
            
    $add    =    $color[$place];
            
    $table    .=    "<td class=\"guildlogo\" style=\"background-color: ".$add."; border:0px;\" width=\"".$coordxy."\" height=\"".$coordxy."\"></td>";
            if    (
    $td    ==    8)
            { 
                
    $table    .=    "</tr>"
                if    (
    $td    !=    64)    $table    .=    "<tr>";
                
    $td    =    0
            }
        }
        while    (
    $i    <    64);
        
    $table    .=    "</table>";
        return    
    $table;
    }

    $ICN_CS=mssql_query("select OWNER_GUILD,SIEGE_START_DATE,SIEGE_END_DATE from MuOnline.dbo.MuCastle_DATA");
    while(
    $row=mssql_fetch_assoc($ICN_CS)){
    $ICN_OWNER_GUILD=$row['OWNER_GUILD'];
    $ICN_CS_Start=$row['SIEGE_START_DATE'];
    $ICN_CS_Battle=$row['SIEGE_END_DATE'];
    $ICN_CSlogo="select G_Name,G_Mark,G_Master from MuOnline.dbo.Guild where G_Name='$ICN_OWNER_GUILD'";
    $ICN_sql_siegelogo_check=mssql_query($ICN_CSlogo);
    $row1=mssql_fetch_row($ICN_sql_siegelogo_check);
    //$ICN_logosiege=urlencode(bin2hex($row1[1]));
    $ICN_logosiege=guildlogo($row1[1],5); 
    $ICN_duenologo="select Name from MuOnline.dbo.Character where Name='$row1[2]'";
    $ICN_sql_duenologo_check=mssql_query($ICN_duenologo);
    $row2=mssql_fetch_row($ICN_sql_duenologo_check);

    echo 
    "<table border='0' cellpadding='0' cellspacing='0'>
            <tr>
                <td bgcolor='#CCCC99'>"
    .$ICN_logosiege." alt='logo' width='100' height='100'>
                </td>
            </tr>
        </table>
        <div class='siege_winner'><p>Guild: <b>"
    .$ICN_OWNER_GUILD."</b></p>
            <p>Master: 
                <span>"
    .$row2[0]."</span>
            </p>
        </div>
        <div class='siege_prox'>Last Castle Date: "
    .$ICN_CS_Start."
            <span>Next Castle Date: "
    .$ICN_CS_Battle."</span>
        </div>"
    ;
    ?>
    Update:
    The entire code is not secure.
    You should also use the new PHP in which some functions like
    PHP Code:
    mssql_query (); 
    or
    PHP Code:
    bin2hex (); 
    Also
    PHP Code:
    <? ?>
    is wrong, it's supposed to be
    PHP Code:
    <?php ?>
    1. you speak about security and u tell him to use mssql_query? advice him to leave this website on the side and create new one using PDO connection.
    2. <? instant <?php is the same, its called "short open tag". nothing wrong using it, personally i don't use it but its doesnt harm anything.

  8. #8
    if(!caffeine) continue; leorond is online now
    MemberRank
    Jul 2012 Join Date
    Czech RepublicLocation
    489Posts

    Re: [Help] How to Fixed Logo Guild Show in Website..!

    Quote Originally Posted by cMu View Post
    1. you speak about security and u tell him to use mssql_query? advice him to leave this website on the side and create new one using PDO connection.
    2. <? instant <?php is the same, its called "short open tag". nothing wrong using it, personally i don't use it but its doesnt harm anything.
    I guess I just put it wrong, I should have written straight away that these functions will not work on web hosting.

    Also, short_open_tag "<?" will not work if a new PHP is set up.

    I do not know the reason for using the PDO? There are many other database connection options.

  9. #9
    cMuServices cMu is online now
    MemberRank
    Jan 2017 Join Date
    462Posts

    Re: [Help] How to Fixed Logo Guild Show in Website..!

    Quote Originally Posted by leorond View Post
    I guess I just put it wrong, I should have written straight away that these functions will not work on web hosting.

    Also, short_open_tag "<?" will not work if a new PHP is set up.

    I do not know the reason for using the PDO? There are many other database connection options.
    you talk about new php and u tell him to use mssql_query? its out dated bro.

  10. #10
    if(!caffeine) continue; leorond is online now
    MemberRank
    Jul 2012 Join Date
    Czech RepublicLocation
    489Posts

    Re: [Help] How to Fixed Logo Guild Show in Website..!

    Quote Originally Posted by cMu View Post
    you talk about new php and u tell him to use mssql_query? its out dated bro.
    Just a translation error. I am sorry

  11. #11
    Enthusiast muonline1996 is offline
    MemberRank
    May 2020 Join Date
    37Posts

    Re: [Help] How to Fixed Logo Guild Show in Website..!

    wow! ... it works

    you can fixed images size ? :)



  12. #12
    if(!caffeine) continue; leorond is online now
    MemberRank
    Jul 2012 Join Date
    Czech RepublicLocation
    489Posts

    Re: [Help] How to Fixed Logo Guild Show in Website..!

    Quote Originally Posted by muonline1996 View Post
    wow! ... it works

    you can fixed images size ? :)


    $coordxy = logo size
    PHP Code:
    guildlogo($guildmark,    $coordxy

  13. #13
    Enthusiast muonline1996 is offline
    MemberRank
    May 2020 Join Date
    37Posts

    Re: [Help] How to Fixed Logo Guild Show in Website..!

    Quote Originally Posted by leorond View Post
    $coordxy = logo size
    PHP Code:
    guildlogo($guildmark,    $coordxy
    @leorond //thank

  14. #14
    if(!caffeine) continue; leorond is online now
    MemberRank
    Jul 2012 Join Date
    Czech RepublicLocation
    489Posts

    Re: [Help] How to Fixed Logo Guild Show in Website..!

    Quote Originally Posted by muonline1996 View Post
    @leorond //thank
    For you

    PHP Code:
            if( strtotime($myrow[start_date])+86400 $real_time ) {$cs_status "Register for Attack";} //0 00:00 - 0 23:59
            
    elseif( (strtotime($myrow[start_date])+432000) > $real_time ) {$cs_status "Collect Sing of Lord";} //1 00:00 - 4 23:59
            
    elseif( (strtotime($myrow[start_date])+500400) > $real_time ) {$cs_status "Information Period";} //5 00:00 - 5 19:00
            
    elseif( (strtotime($myrow[start_date])+586800) > $real_time ) {$cs_status "Get Ready for Attack";} //5 19:00 - 6 19:00
            
    elseif( (strtotime($myrow[start_date])+594000) > $real_time ) {$cs_status "Attack Castle Siege";} //6 19:00 - 6 21:00
            
    else {$cs_status="Truce Period";} 



Advertisement