+ XDB::execute("DELETE FROM profile_binets
+ WHERE pid = {?}",
+ $page->pid());
+ if (!count($value)) {
+ return;
+ }
+ $insert = array();
+ foreach ($value as $id=>$text) {
+ $insert[] = XDB::format('({?}, {?})', $page->pid(), $id);
+ }
+ XDB::execute("INSERT INTO profile_binets (pid, binet_id)
+ VALUES " . implode(',', $insert));
+ }
+
+ public function getText($value) {
+ return implode(', ', $value);
+ }
+}
+
+class ProfilePageGroups extends ProfilePage
+{
+ protected $pg_template = 'profile/groups.tpl';
+
+ public function __construct(PlWizard $wiz)
+ {
+ parent::__construct($wiz);
+ $this->settings['section'] = new ProfileSettingSection();
+ $this->settings['binets'] = new ProfileSettingBinets();
+ $this->watched['section'] = $this->watched['binets'] = true;