The following warnings occurred:
Warning [2] Use of undefined constant SAPI_NAME - assumed 'SAPI_NAME' (this will throw an Error in a future version of PHP) - Line: 3388 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3388 errorHandler->error
/showthread.php 116 build_archive_link
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/inc/functions.php 3324 build_forum_breadcrumb
/showthread.php 195 build_forum_breadcrumb
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/showthread.php 195 build_forum_breadcrumb
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 786 - File: showthread.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/showthread.php 786 errorHandler->error






Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Page system
Author Message
Pidrila
Apprentice
*

Posts: 36
Likes Given: 0
Likes Received: 1 in 1 posts
Joined: Apr 2013
Reputation: 0



Post: #1
Page system
Hello everyone i have a little problem..
What i need is the page numeric system that shows the current page and the number of all pages on the dialog. like this - PAGE: [2/38]

There is a problem, because it's need to bee checking by mysql database. i have a script like auction script. but just modifieded..

Script: When item is adding to auction!
Code:
[FUNCTION f_auction_additem]
if (<argo.dispid> == i_platemail_chest) || (<argo.dispid> == i_platemail_leggings) || (<argo.dispid> == i_platemail_arms) || (<argo.dispid> == i_platemail_gloves) || (<argo.dispid> == i_platemail_gorget) || (<argo.dispid> == i_platemail_helm) || (<argo.baseid> == i_tourmaline) || (<argo.baseid> == i_tin) || (<argo.baseid> == i_bronze) || (<argo.baseid> == i_corrundum) || (<argo.baseid> == i_lead) || (<argo.baseid> == i_silver) || (<argo.baseid> == i_gold2) || (<argo.baseid> == i_titanium) || (<argo.baseid> == i_steel) || (<argo.baseid> == i_blackrock) || (<argo.baseid> == i_crystal) || (<argo.baseid> == i_inferno) || (<argo.baseid> == i_acid) || (<argo.baseid> == i_glory) || (<argo.baseid> == i_plazma) || (<argo.baseid> == i_aqua) || (<argo.baseid> == i_DarkKingdom) || (<argo.baseid> == i_aruguno)
serv.newitem i_bag
new.name <argo.name> auction chart
new.cont=<obj.findlayer.21.uid>
new.link=<argo.uid>
new.tag.category=1 // Te liksim Bows
new.dialog d_auction_sell_item
return 0

Auction sell item function, here item is adding in mysql database.
Code:
DB.EXECUTE "INSERT INTO <topobj.tag.auction_table>(uid, amount, category, name, currentbid, step, minimum_price, saletime, seller) VALUES('<link.uid>','<link.amount>','<eval <tag.category>>','<link.name>','<eval (<argtxt[1]>)>','0','0','99999999999','<src.uid>');"
DB.query "SELECT saletime FROM <topobj.tag.auction_table> WHERE uid='<link.uid>'"
if (<db.row.numrows> < 1)
    serv.log There was a problem when adding the item to the mysql database. Most likely the mysql database was not connected.
    src.sysmessage Putting this item for auction failed.
    remove
else
    link.cont=<uid>
    cont=<topobj.tag.safebox_uid>
    src.consume <def.auction_fee> i_gold
    src.sysmessage The item is up for auction.
endif
return 1

And this is when dialog opens and mysql selects items and showing on the dialog page..
Code:
//Mysql query that fetches the rows from <src.ctag.dialogindex> to <src.ctag.dialogindex>+8
DB.QUERY "SELECT * FROM <tag.auction_table> ORDER BY `id` DESC LIMIT <eval (<src.ctag.dialogindex>)>,<eval (<src.ctag.dialogindex>+8)>";

what i need is that when dialog opens, it will show how many pages are in the auction

that can be calculating by something like this
Code:
[b]src.ctag.allpages=<eval (((<ctag0.allitems>-1) / 7) + 1)>//how to check how many items are there?? because if i know how many items are there, then i can calculate by something like this
because in one page are 8 items in dialog! thats why -1) / 7) + 1)[/b]
PAGE:[<Page where are you>/<eval (<src.ctag.allpages>)>]


Please help me i someone is good a this.. and sorry for my bad english im not so good at it.. /facepalm/
04-09-2013 03:53 AM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Messages In This Thread
Page system - Pidrila - 04-09-2013 03:53 AM
RE: Page system - Pidrila - 04-09-2013, 05:27 AM
RE: Page system - Pidrila - 04-09-2013, 11:07 PM

Forum Jump:


User(s) browsing this thread: 1 Guest(s)