Well, as you know doing manually will take ages as we have categories with 100 pages, so it won't do the trick, is there anything that can be changed i mean something in functions.php?
in my opinion there should be some changes in the following in functions.php
"cat_url" => $site_sess->url(ROOT_PATH."categories.php?".URL_CAT_ID."=".$image_row['cat_id']),
I am not sure i am right.
need your help.