require("inc_mem/memchk.php"); require("../inc/apodhead_noad.php"); require("../zinc/fn/confirmny.php"); require("../inc/db.php"); $db = mysql_connect($dbserver,$dbuser,$dbpw); mysql_select_db($dbname,$db); main(); mysql_close($db); require("../inc/apodfoot_noad.php"); //============================================== function main(){ global $db,$gbUserID; $MAXSHOWN=50; $cST=0; //============================================== //= ADD FAVORITE //============================================== if(isset($_GET['id']) && isset($_GET['t']) ){ $tbname=$_GET['t']; if($tbname=="game" || $tbname=="mov" || $tbname=="site" || $tbname=="dl"){ $exist=0; //-- CHECK IF EXIST ---------------------------- if( ($result = mysql_query("select data_id from ap_game_fav where data_id=".$_GET['id']." and member_id=".$gbUserID,$db)) ){ if( ($rs= mysql_fetch_array($result)) ){ $exist=1;} mysql_free_result($result); } if($exist==0)mysql_query("insert into ap_game_fav (data_id,member_id,last_dt) values(".$_GET['id'].",".$gbUserID.",now())"); } } //============================================== //= DISPLAY FAVORITE GAMES //============================================== print( boxhead('Favorite Games [view favorites in pop-up]',6,"630") ); print('
| ');
$cnt=0;
$result = mysql_query("select d.data_id,title,cat_string,d.picture from ap_game_data d,ap_game_fav f,ap_game_cat c where d.data_id=f.data_id and f.member_id=".$gbUserID." and d.cat_id=c.cat_id and d.status=1 LIMIT ".$cST.",".$MAXSHOWN,$db);
while( ($row = mysql_fetch_array($result)) != FALSE ){
if($row['picture']=="none")$gamepix="none";
else $gamepix="a/".(substr($row['picture'],0,1).'/'.$row['picture']);
print('');
$cnt++;
}
if($cnt==0)print(' '); print(' |