Jump to content

Recommended Posts

Hello guys,
I have a problem with little warrior pkosite(template from Lucky's Archive). I already installed Website as provided in one other template that is very similar but missing the imcp (item mall control panel for this template). A day ago the template and db was working properly but idk what i did to it and now it keep on showing error no matter what i did(uninstall all db and resintall all db : accountserver, gamedb, website). Please help if u know whats the problem is or how to fix it (the problem w/ screenshot are shown in the attached photo).
 

storageError.jpg

Share this post


Link to post
Share on other sites
5 hours ago, Wantows said:

Put in your template/core/header.tpl on

<head> tag


<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />

 

Please read my problem again. I know html and that's not the problem. If thats the problem, ill have to quit design/rip/reskin pkosite (if something as simple as that are missing will bug the storage page and not all other page while all the pages share header content then idk why html layout exist in the first place). Please understand.

Edited by DangThao

Share this post


Link to post
Share on other sites

I thought this template was without any item mall panel o.o, are you trying to integrate the item mall from another site into it?

Have you tried to browse your website with some other browser / computer?

 


logo-big.png   logo.png

                                   Sunny Go! Online                                                                    pko.host                                                 

Share this post


Link to post
Share on other sites

This is my inc.storage.php

 

Replace and try. 

Create commerce folder on Pages. and put inc.storage.php

<?
	// ===================================================================================================
	// Package      : pkoSite
	// File         : inc.rules.php
	// Version      : 1.0.0
	// ===================================================================================================
	// History:
	//
	// v1.0.0       : release of the FINAL version ;o)
	// v0.0.1       : first release
	// ===================================================================================================
	// Disclaimer   : To make it short - if you steal code you're a pathetic, little loser :-)
	// ===================================================================================================

	// Prevent people from calling this file directly! Normally it doesn't matter but its always better
	// being save than being sorry.

	if (!defined('PKOSITE'))
		die('Go away!');
		
	if(!isLoggedIn())
		{
						$oSmarty->assign('message',			array( 'type'		=> 'error',
									       'messages'	=> array( 'You are not logged in.',
									       				  'Please <a href="'.site_url('login').'">login</a>.' ) ) );
		}
	else
		{		
			require_once('./classes/class.StorageBox.php');
			
			$StorageBox = new StorageBox('type');
				
			$oSmarty->assign('items' , $StorageBox -> ShowBox());
			$oSmarty->assign('characters' , $StorageBox -> GetCharacters());
		}

	
	
	$breadcrumbs	= array();

	$breadcrumbs[]	= array( 'caption'	=> 'Home',
				 'url'		=> $config['script_url']			);

	$breadcrumbs[]	= array( 'caption'	=> 'Storage Box',
				 'url'		=> ''						);

	$oSmarty->assign('breadcrumbs',		$breadcrumbs);

	// Display Template

	if (!$error)
		$oSmarty->display('file:pages/commerce/site_storage.tpl');

?>

class.StorageBox.php

<?php
		define ('DATABASE_AUCTION', 'auction');
class StorageBox
	{
		protected $Action;
	
		public function __construct($Action)
			{
				if ((!isset($_GET[$Action])) && (!isset($_POST[$Action]))) 
						$this->Action		= 'notassigned'; 
				else 
						$this->Action		= ((isset($_POST[$Action])) ? $_POST[$Action] : $_GET[$Action]);
						$this->Action		= strtolower(trim(preg_replace('/[^0-9a-z]/i','',$this->Action)));
			}
			
		public function ShowBox()
			{
				switch($this->Action)
					{
						case 'assigned':
							
								$GenerateBox = $this->GenerateAssigned();
									return $GenerateBox;
							
						break;
						case 'notassigned':
						
								$GenerateBox = $this->GenerateUnAssigned();
									return $GenerateBox;
						break;
						
						default:
							die('Unselected!');
					}
			}
			
		public function GetCharacters()
			{
				$GetCha = doQuery("SELECT cha_name, degree, cha_id FROM character WHERE delflag='0' AND act_id=".$_SESSION['aid']." AND kb_locked='0'", DATABASE_GAME);
				
				$characters = array();
				
				while($oRow = mssql_fetch_array($GetCha))
					{
						$characters[] = array(	'name' => $oRow['cha_name'],
												'id' =>	$oRow['cha_id'],
												'level' => $oRow['degree'],
											);
					}
					
				return $characters;
			}
			
		public function GenerateUnAssigned()
			{
					$GetNotAssigned = doQuery("SELECT * FROM StorageBox WHERE assigned='0' AND act_id=".$_SESSION['aid']." ORDER by storage_id DESC", DATABASE_AUCTION);
					
					$items = array();
					
					while($oRow = mssql_fetch_array($GetNotAssigned))
						{
							
							$items[] = array(	'id' => $oRow['storage_id'],
												'name' => $oRow['itemName'],
												'qty' => trim($oRow['quantity']),
												'icon' => trim($oRow['Icon']),
												
												);
						}
				
				return $items;
			}
			
		public function GenerateAssigned()
			{
				$Template = '<table>';
				$Template.= '<thead><tr>
									<th scope="col" class="top" width="30">Item</th>
									<th scope="col" class="top" width="30">Icon</th>
									<th scope="col" class="top" width="30">Assigned to</th>
									<th scope="col" class="top" width="30">Assign Date</th>
									</tr>
							</thead>';
					$GetNotAssigned = doQuery("SELECT * FROM StorageBox WHERE assigned='1' AND act_id=".$_SESSION['aid']." ORDER BY assigned_date DESC", DATABASE_AUCTION);
					
					while($oRow = mssql_fetch_array($GetNotAssigned))
						{
							$MallID = $oRow['storage_id'];
							$ItemName = $oRow['itemName'];
							$Quantity = $oRow['quantity'];
							$AssignedTO = $oRow['assigned_char'];
							$AssignDate = $oRow['assigned_date'];
							$Icon = trim($oRow['Icon']);
							
							$Template.= '<tr><td>'.$ItemName.'(x'.$Quantity.')</td><td style="text-align:center;"><img src="./img/icons/'.$Icon.'.png"></td><td>'.$AssignedTO.'</td><td>'.$AssignDate.'</td></tr>';
						}
				$Template.= '</table>';
				
				return $Template;
			}
	}

And site_storage.tpl 

create commerce folder in templates/pages and put site_storage.tpl

{include file='file:core/header.tpl'}

		{include file='file:sidebars/left.tpl'}
 		<div id="main">
			
		<!-- B.2 MAIN CONTENT -->
		
						{if count($message.messages) > 0}
						<div class="{$message.type}">
								<ul>
						{foreach item=text from=$message.messages}
							<li>{$text}</li>
						{/foreach}
						</ul>
						</div>
						{/if}
						<br/ >

{if $user.is_logged_in}
							<form method="POST" action="index.php?act=assign">
						{if count($items) > 0}
							<table width="100%" class="responce-table borderspacingsmall coloredFirstCell">
								<thead>
									<tr>
										<th scope="col" class="top" width="30">Select</th>
										<th scope="col" class="top" width="30">Item</th>
										<th scope="col" class="top" width="30">Icon</th>
									</tr>
								</thead>
								<tbody>
								{foreach item=item from=$items}
									<tr>
										<td width="15%">
											<input type="hidden" name="qty" value="{$item.qty}">
											<input type="radio" name="item_to_assign" value="{$item.id}">
										</td>
										<td>
											{$item.name} (x {$item.qty} )
										</td>
										<td style="text-align:center;">
											<img src="./images/new/icons/{$item.icon}.png">
										</td>
									</tr>
								{/foreach}
								</tbody>
							</table>
						<table style="border:0xp;" width="100%" class="responce-table borderspacingsmall coloredFirstCell">
								<tr>
						{if count($characters) > 0 }
									<td><b>Character:</b></td>
									<td>
										<select name="target_character" class="textCtrl">
							{foreach item=char from=$characters}
											<option value="{$char.id}">
												{$char.name} - Lv{$char.level}
											</option>
							{/foreach}
										</select>
									</td>
									<td>
									<button type="submit" name="assign_items" id="submit" class="button primary" tabindex="5" />&nbsp;&nbsp;&nbsp;Assign &nbsp;&nbsp;</button>
									
									</td>
						{else}
									<td>
										<b>You have no characters !?</b>
									</td>
						{/if}
								</tr>
							</table>
							</form>
						{else}
							You have bought no items! Go to <a href="index.php?act=mall">Item Mall</a> to buy some!
						{/if}

{/if}
		
	</div>



   
{include file='file:core/footer.tpl'}

remember put on your index.php 

		// ===========================================================================================
		// Commerce-Functions
		// ===========================================================================================
			
		
		
		case 'storage'		:
		case 'assign'		:
		

			require_once('pages'.DIRECTORY_SEPARATOR.'commerce'.DIRECTORY_SEPARATOR.'inc.'.$action.'.php');
			break;

		default			:
			
			die('Unknown page.');

You will need assign but i think you already have. if you don't have tell me and i send all archives of you need for work perfectly mall, mall admin, assign, item mall page and storage box.


gnr-patience.png

Share this post


Link to post
Share on other sites
3 hours ago, Wantows said:

This is my inc.storage.php

 

Replace and try. 

Create commerce folder on Pages. and put inc.storage.php


<?
	// ===================================================================================================
	// Package      : pkoSite
	// File         : inc.rules.php
	// Version      : 1.0.0
	// ===================================================================================================
	// History:
	//
	// v1.0.0       : release of the FINAL version ;o)
	// v0.0.1       : first release
	// ===================================================================================================
	// Disclaimer   : To make it short - if you steal code you're a pathetic, little loser :-)
	// ===================================================================================================

	// Prevent people from calling this file directly! Normally it doesn't matter but its always better
	// being save than being sorry.

	if (!defined('PKOSITE'))
		die('Go away!');
		
	if(!isLoggedIn())
		{
						$oSmarty->assign('message',			array( 'type'		=> 'error',
									       'messages'	=> array( 'You are not logged in.',
									       				  'Please <a href="'.site_url('login').'">login</a>.' ) ) );
		}
	else
		{		
			require_once('./classes/class.StorageBox.php');
			
			$StorageBox = new StorageBox('type');
				
			$oSmarty->assign('items' , $StorageBox -> ShowBox());
			$oSmarty->assign('characters' , $StorageBox -> GetCharacters());
		}

	
	
	$breadcrumbs	= array();

	$breadcrumbs[]	= array( 'caption'	=> 'Home',
				 'url'		=> $config['script_url']			);

	$breadcrumbs[]	= array( 'caption'	=> 'Storage Box',
				 'url'		=> ''						);

	$oSmarty->assign('breadcrumbs',		$breadcrumbs);

	// Display Template

	if (!$error)
		$oSmarty->display('file:pages/commerce/site_storage.tpl');

?>

class.StorageBox.php


<?php
		define ('DATABASE_AUCTION', 'auction');
class StorageBox
	{
		protected $Action;
	
		public function __construct($Action)
			{
				if ((!isset($_GET[$Action])) && (!isset($_POST[$Action]))) 
						$this->Action		= 'notassigned'; 
				else 
						$this->Action		= ((isset($_POST[$Action])) ? $_POST[$Action] : $_GET[$Action]);
						$this->Action		= strtolower(trim(preg_replace('/[^0-9a-z]/i','',$this->Action)));
			}
			
		public function ShowBox()
			{
				switch($this->Action)
					{
						case 'assigned':
							
								$GenerateBox = $this->GenerateAssigned();
									return $GenerateBox;
							
						break;
						case 'notassigned':
						
								$GenerateBox = $this->GenerateUnAssigned();
									return $GenerateBox;
						break;
						
						default:
							die('Unselected!');
					}
			}
			
		public function GetCharacters()
			{
				$GetCha = doQuery("SELECT cha_name, degree, cha_id FROM character WHERE delflag='0' AND act_id=".$_SESSION['aid']." AND kb_locked='0'", DATABASE_GAME);
				
				$characters = array();
				
				while($oRow = mssql_fetch_array($GetCha))
					{
						$characters[] = array(	'name' => $oRow['cha_name'],
												'id' =>	$oRow['cha_id'],
												'level' => $oRow['degree'],
											);
					}
					
				return $characters;
			}
			
		public function GenerateUnAssigned()
			{
					$GetNotAssigned = doQuery("SELECT * FROM StorageBox WHERE assigned='0' AND act_id=".$_SESSION['aid']." ORDER by storage_id DESC", DATABASE_AUCTION);
					
					$items = array();
					
					while($oRow = mssql_fetch_array($GetNotAssigned))
						{
							
							$items[] = array(	'id' => $oRow['storage_id'],
												'name' => $oRow['itemName'],
												'qty' => trim($oRow['quantity']),
												'icon' => trim($oRow['Icon']),
												
												);
						}
				
				return $items;
			}
			
		public function GenerateAssigned()
			{
				$Template = '<table>';
				$Template.= '<thead><tr>
									<th scope="col" class="top" width="30">Item</th>
									<th scope="col" class="top" width="30">Icon</th>
									<th scope="col" class="top" width="30">Assigned to</th>
									<th scope="col" class="top" width="30">Assign Date</th>
									</tr>
							</thead>';
					$GetNotAssigned = doQuery("SELECT * FROM StorageBox WHERE assigned='1' AND act_id=".$_SESSION['aid']." ORDER BY assigned_date DESC", DATABASE_AUCTION);
					
					while($oRow = mssql_fetch_array($GetNotAssigned))
						{
							$MallID = $oRow['storage_id'];
							$ItemName = $oRow['itemName'];
							$Quantity = $oRow['quantity'];
							$AssignedTO = $oRow['assigned_char'];
							$AssignDate = $oRow['assigned_date'];
							$Icon = trim($oRow['Icon']);
							
							$Template.= '<tr><td>'.$ItemName.'(x'.$Quantity.')</td><td style="text-align:center;"><img src="./img/icons/'.$Icon.'.png"></td><td>'.$AssignedTO.'</td><td>'.$AssignDate.'</td></tr>';
						}
				$Template.= '</table>';
				
				return $Template;
			}
	}

And site_storage.tpl 

create commerce folder in templates/pages and put site_storage.tpl


{include file='file:core/header.tpl'}

		{include file='file:sidebars/left.tpl'}
 		<div id="main">
			
		<!-- B.2 MAIN CONTENT -->
		
						{if count($message.messages) > 0}
						<div class="{$message.type}">
								<ul>
						{foreach item=text from=$message.messages}
							<li>{$text}</li>
						{/foreach}
						</ul>
						</div>
						{/if}
						<br/ >

{if $user.is_logged_in}
							<form method="POST" action="index.php?act=assign">
						{if count($items) > 0}
							<table width="100%" class="responce-table borderspacingsmall coloredFirstCell">
								<thead>
									<tr>
										<th scope="col" class="top" width="30">Select</th>
										<th scope="col" class="top" width="30">Item</th>
										<th scope="col" class="top" width="30">Icon</th>
									</tr>
								</thead>
								<tbody>
								{foreach item=item from=$items}
									<tr>
										<td width="15%">
											<input type="hidden" name="qty" value="{$item.qty}">
											<input type="radio" name="item_to_assign" value="{$item.id}">
										</td>
										<td>
											{$item.name} (x {$item.qty} )
										</td>
										<td style="text-align:center;">
											<img src="./images/new/icons/{$item.icon}.png">
										</td>
									</tr>
								{/foreach}
								</tbody>
							</table>
						<table style="border:0xp;" width="100%" class="responce-table borderspacingsmall coloredFirstCell">
								<tr>
						{if count($characters) > 0 }
									<td><b>Character:</b></td>
									<td>
										<select name="target_character" class="textCtrl">
							{foreach item=char from=$characters}
											<option value="{$char.id}">
												{$char.name} - Lv{$char.level}
											</option>
							{/foreach}
										</select>
									</td>
									<td>
									<button type="submit" name="assign_items" id="submit" class="button primary" tabindex="5" />&nbsp;&nbsp;&nbsp;Assign &nbsp;&nbsp;</button>
									
									</td>
						{else}
									<td>
										<b>You have no characters !?</b>
									</td>
						{/if}
								</tr>
							</table>
							</form>
						{else}
							You have bought no items! Go to <a href="index.php?act=mall">Item Mall</a> to buy some!
						{/if}

{/if}
		
	</div>



   
{include file='file:core/footer.tpl'}

remember put on your index.php 


		// ===========================================================================================
		// Commerce-Functions
		// ===========================================================================================
			
		
		
		case 'storage'		:
		case 'assign'		:
		

			require_once('pages'.DIRECTORY_SEPARATOR.'commerce'.DIRECTORY_SEPARATOR.'inc.'.$action.'.php');
			break;

		default			:
			
			die('Unknown page.');

You will need assign but i think you already have. if you don't have tell me and i send all archives of you need for work perfectly mall, mall admin, assign, item mall page and storage box.


Are thee the storage from a similar pkosite with Lyons addons and its working properly? Cause i believe Lyons addons are different than normal pkosite addons for item mall and so.

Share this post


Link to post
Share on other sites
1 minute ago, DangThao said:


Are thee the storage from a similar pkosite with Lyons addons and its working properly? Cause i believe Lyons addons are different than normal pkosite addons for item mall and so.

try and tell me if works, if u need mall page i give too and mall admin, i put yesterday in pko 1.0 and works fine


gnr-patience.png

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...