Azer CMS Mythical Template (Átalakítva)

Indította FantasyGFX, 2011 szeptember 04, 05:00:36 DÉLUTÁN

Előző téma - Következő téma

IrOn


Archangel

Tehát, akkor functions-ba nincs benne a totaltime lekérés. elvileg csak a $sql-be kell beírni a name, race, class, gender után.

lokal


IrOn

bemásolnád azt ami az includes/functions.php-ba van?

lokal

Tessék az amit mondtál:

//Time
class time
{
  public $time = array();
  public $time_race;

  function time()
  {
    global $query, $array, $db_s;
   
    if(isset($_GET['page']) == "realm" && isset($_GET['id']) == true)
    {
      $id = "";
      if(isset($_GET['id']))
      {
        $id = $_GET['id'];
      }
      $sql = $query("SELECT id, char_db FROM $db_s.realms WHERE id='$id'")or die(mysql_error());
      while($get = $array($sql))
      {
        $db_c = $get['char_db'];
      }
      $sql = $query("SELECT name, race, class, gender, totaltime FROM $db_c.characters ORDER BY totaltime DESC LIMIT 0, 10")or die(mysql_error());
        while($get = $array($sql))
        {
          if($get['race'] == 1 || $get['race'] == 3 || $get['race'] == 4 || $get['race'] == 7 || $get['race'] == 11)
          {
            $this->time_race = "aly";
          }
          else
          {
            $this->time_race = "horde";
          }
         
          $this->time[] = $get;
        }
    }
  }
}
?>

IrOn

talán még itt kell beleirni: includes/replace.php

Idéz<?php
#- Azer CMS V1.5 Replace System -#
  //Set CopyRight Year
  $cdate = date('Y');
  //Set Anti-Bot
  $code = rand(10000, 90000);
  //Declare News Class
  $news = new news;
  //Declare Shouts Class
  $shouts = new shouts;
  //Declare Realms Class
  $realms = new realms;
  //Declare Vote Class
  $vote = new vote;
  //Declare Char Option Class
  $char_opt = new char_opt;
  //Declare Online Player Class
  $show_online = new online;
  //Declare User Info Class
  $uinfo = new account;
  $uinfo->info();
  //Declare Store Realms Class
  $store_realm = new store_realm;
  //Declare Store Characters Class
  $store_char = new store_char;
  //Declare Store Vote Items Class
  $store_vitems = new store_vitems;
  //Declare Store V.I.P Items Class
  $store_ditems = new store_ditems;
  //Top 10 Class
  $top = new top;
  //Top 10 Online
  $time = new time;

  //Declare Template Class
  $profile = new template;
  //Set Replaces
     //Global News System
     $profile->set("news_pages", news_pages());
     //Copyright Date
     $profile->set("copydate", "$cdate");
     //Copyright
     $profile->set("copyright", "$copyr");
     //News Data
     $profile->set("news_posts", $news->news_posts);
     //Site Title
     $profile->set("title", "$site_title");
     //Server Realmlist
     $profile->set("realmlist", "$realmlist");
     //Site Login Function
     $profile->set("log_in", login());
     //Session Display
     $profile->set("session", "$login");
     //Register Function
     $profile->set("register", register());
     //Anti-Bot
     $profile->set("antibot", "$code");
     //Shout Function
     $profile->set("post_shout", shout());
     //Shout View
     $profile->set("view_shouts", $shouts->view_shouts);
     //Shout Url
     $profile->set("shout_url", $shouts->shout_url);
     //Realms View
     $profile->set("view_realms", $realms->view_realms);
     //Realms Online Or Offline?
     $profile->set("realm_world", $realms->realm_world);
     //Realms Total Online
     $profile->set("total_number", $realms->total_number);
     //User Info
     $profile->set("user_get", $uinfo->user_get);
     //User's Site Rank
     $profile->set("user_admin", $uinfo->admin);
     //User's Current IP
     $profile->set("user_curip", $uinfo->curip);
     //User Banned?
     $profile->set("banned", $uinfo->banned);
     //Forgot Password
     $profile->set("forgot_password", forgot());
     //Change Password
     $profile->set("change_password", change_password());
     //Logout
     $profile->set("user_logout", logout());
     //Character Unstuck Realms
     $profile->set("view_realm", $char_opt->view_realm);
     //Character Unstuck Chars
     $profile->set("view_chars", $char_opt->view_char);
     //Unstuck & Revive Character
     $profile->set("unstuck_revive", unstuck_revive());
     //Paypal Email
     $profile->set("paypal_email", "$paypal");
     //Paypal Return Url
     $profile->set("paypal_return", "$p_r_url");
     //Online Players & Realm Name
     $profile->set("online_players", $show_online->show_online);
     $profile->set("realm_name", $show_online->realm_name);
     //View Vote Sites
     $profile->set("view_sites", $vote->view_sites);
     //Vote
     $profile->set("vote", vote_go());
     //Store Realms
     $profile->set("view_realm", $store_realm->view_realm);
     //Store Characters
     $profile->set("view_char", $store_char->view_char);
     //Store Character Db
     $profile->set("char_view_db", $store_char->char_view_db);
     //Store Realm Id
     $profile->set("char_view_id", $store_char->char_view_id);
     //Store Vote Items
     $profile->set("view_vitem", $store_vitems->view_vitem);
     //Store V.I.P Items
     $profile->set("view_ditem", $store_ditems->view_ditem);
     //Store Purchase
     $profile->set("store_purchase", store_purchase());
     //Top 10 PVP
     $profile->set("top", $top->top);
     $profile->set("race", $top->top_race);
    //Top 10 Online
     $profile->set("time", $time->time);
     $profile->set("race", $time->time_race);

  //Echo Template
  echo $profile->style();
?>

lokal

köszi ez igy faszán múködik de nincs rá valami mód h ne másodpercbe irja ki a played time-ot a toplistán?

FantasyGFX

Szerintem te arra gondolsz, hogy úgy írja ki, hogy Nap, Óra és Perc nem???
Mert ha igen akkor tessék

<?php
//Note:
//This version of the code is UNtested

//Configuration
$host "localhost";
$user "root";
$pass "";
$characters "characters"//Karakter adatbázis neve.
$con mysql_connect($host,$user,$pass) or die (mysql_error());
$border 0;
$hanyember 10;

//Function
function getTime($total)
{
  
$day = (int)($total/86400);
  
$total $total - ($day*86400);
  
$hour = (int)($total/3600);
  
$total $total - ($hour*3600);
  
$minute = (int)($total/60);

  
$time $day." nap ".$hour." óra ".$minute." perc";
  return 
$time;
}

//Query
$query mysql_query("SELECT `name`, `class`, `race`, `totaltime` FROM `".$characters."`.`characters` ORDER BY `totaltime`") or die (mysql_error());
$numrows mysql_num_rows($query);
$i 0;

//Printing the upper part of the table
echo "<table border='" $border "'>";
echo 
"<tr>";
echo 
"<td>";
echo 
"Név";
echo 
"</td>";
echo 
"<td>";
echo 
"Class";
echo 
"</td>";
echo 
"<td>";
echo 
"Race";
echo 
"</td>";
echo 
"<td>";
echo 
"Játékidő";
echo 
"</td>";
echo 
"</tr>";
//End

while($i $numrows)
{
if(
$i+== $hanyember)
break;
$nev mysql_result($query$i0);
$class mysql_result($query$i1);
$race mysql_result($query$i2);
$ido getTime(mysql_result($query$i3));

//TODO: change the race and class numbers to text, anybody can do it...

echo "<tr>";
echo 
"<td>";
echo 
$nev;
echo 
"</td>";
echo 
"<td>";
echo 
$class;
echo 
"</td>";
echo 
"<td>";
echo 
$race;
echo 
"</td>";
echo 
"<td>";
echo 
$ido;
echo 
"</td>";
echo 
"</tr>";

$i += 1;
}

echo 
"</table>";
echo 
"<br>Made by Doomkiller, Improved by $0undX";
?>

lokal

köszi fantasy de ezt pontosan hova kéne bemásolnom?

FantasyGFX

Jelenleg nem otthon vagyok de probáld a realm.phpba beilleszteni a végére töltsed ki az adatokat ha akkor se lesz jó akkor amint haza érek ránézek!

lokal

Sajnos nem akar működni nekem ez a változat fantasy :/

FantasyGFX

Akkor berakod 1 külön mappába azt kifogja hozni új oldalon ezt az egészet csinálsz a menübe 1 olyat h Top Kockák vagy nem tudom és akkor beirod ameik mappába raktad és ha akarsz akkor raksz be neki hátteret.

lokal

Idézetet írta: Fantasy Dátum 2011 október 23, 01:11:32 DÉLUTÁN
Akkor berakod 1 külön mappába azt kifogja hozni új oldalon ezt az egészet csinálsz a menübe 1 olyat h Top Kockák vagy nem tudom és akkor beirod ameik mappába raktad és ha akarsz akkor raksz be neki hátteret.

megcsináltam új oldalba az egészet amit mondtál, az lett az eredmény hogy egy az egybe kidobta azt ami a php file tartalma volt... kódba le tudnád nekem írni, hogy minek kéne lennie a php file tartalma?

Explo

Szerintem nagyon szép munkák, csak gratulálni tudok Fantasy!  :)
Soha nem lesz már olyan, mint régen. Más lesz. De ez nem jelenti azt, hogy rosszabb.

FantasyGFX


Powered by EzPortal