Temos pavadinimas: WordPress, Shopify ir PHPFusion programuotojų bendruomenė :: Priskirmas i grupe

Parašė Poker· 2008 Bal. 26 13:04:41
#4

Kiek suprantu šita soure dalis atsakinga už patekima i grupe?

$group_id = $_POST['group_id'];
   $result = dbquery("SELECT user_id,user_name,user_groups FROM ".$db_prefix."users WHERE user_groups REGEXP('^\\\.{$group_id}$|\\\.{$group_id}\\\.|\\\.{$group_id}$')");
   while ($data = dbarray($result)) {
      $user_groups = $data['user_groups'];
      $user_groups = preg_replace(array("(^\.{$group_id}$)","(\.{$group_id}\.)","(\.{$group_id}$)"), array("",".",""), $user_groups);
      $result2 = dbquery("UPDATE ".$db_prefix."users SET user_groups='$user_groups' WHERE user_id='".$data['user_id']."'");



Redagavo Poker· 2008 Bal. 26 13:04:03