X-Git-Url: https://git.nubati.net/cgi-bin/gitweb.cgi?p=e-DoKo.git;a=blobdiff_plain;f=include%2Fpreferences.php;h=775c4b2d6ef359de26afcce6526d08df31a5f3d2;hp=613d96543371e37d0084b935ddc5a1026c756394;hb=c3f011c01dbab0d02321859a03d91dc88a7b560b;hpb=dca957af7210156af72555bb8544fde47e756376 diff --git a/include/preferences.php b/include/preferences.php index 613d965..775c4b2 100644 --- a/include/preferences.php +++ b/include/preferences.php @@ -18,7 +18,7 @@ $changed_cards = 0; $changed_timezone = 0; $changed_autosetup = 0; -display_user_menu(); +display_user_menu($myid); /* get old infos */ $PREF = DB_get_PREF($myid); @@ -92,6 +92,24 @@ if(myisset("autosetup")) } } +if(myisset("sorting")) + { + $sorting = $_REQUEST['sorting']; + if($sorting != $PREF['sorting']) + { + /* check if we already have an entry for the user, if so change it, if not create new one */ + $result = DB_query("SELECT * from User_Prefs". + " WHERE user_id='$myid' AND pref_key='sorting'" ); + if( DB_fetch_array($result)) + $result = DB_query("UPDATE User_Prefs SET value=".DB_quote_smart($sorting). + " WHERE user_id='$myid' AND pref_key='sorting'" ); + else + $result = DB_query("INSERT INTO User_Prefs VALUES(NULL,'$myid','sorting',". + DB_quote_smart($sorting).")"); + $changed_sorting=1; + } + } + if(myisset("password0") && $_REQUEST["password0"]!="" ) { @@ -166,6 +184,22 @@ echo " \n"; if($changed_autosetup) echo "changed"; echo " \n"; +echo " Sorting: "; + +echo " \n"; +if($changed_sorting) echo "changed"; +echo " \n"; echo " Card set: "; echo " ", " \n"; -echo " ", +echo " ", "\n"; echo " \n"; echo " \n";