Example #1
0
 function receiveDataFromAList($name)
 {
     $list = new CVCAppendingList();
     $list->Init($name);
     $list->ReceiveItemsUsed();
     return $list->GetItemsUsed();
 }
Example #2
0
    ?>
><?php 
    echo $g['title'];
    ?>
</option>
<?php 
}
?>
  </select>
  <div id="gdesc" style="padding: 4px 10px;"><?php 
echo security_group_desc_by_access($user['access']);
?>
</div><div id="hr"></div>
  Является членом групп:
<?php 
$groups = new CVCAppendingList();
$groups->Init('groups', 'height=48px;');
$glist = group_list();
for ($i = 0; $i < count($glist); $i++) {
    $g = $glist[$i];
    $groups->AppendItem($g['name'], $g['id']);
}
$groups->SetItemsUsed(user_get_groups($id));
$groups->Draw();
?>
  <div class="formPast">
    <button class="submitBtn" type="button" onclick="nav ('.?<?php 
echo get_filters();
echo $page != '' ? '&page=' . $page : '';
?>
');">Назад</button>
Example #3
0
    echo $_POST['acgroup'] == $g['access'] ? ' selected' : '';
    ?>
><?php 
    echo $g['title'];
    ?>
</option>
<?php 
}
?>
  </select>
  <div id="gdesc" style="padding: 4px 10px;"><?php 
echo $glist[0]['desc'];
?>
</div><div id="hr"></div>
  Является членом групп:
<?php 
$groups = new CVCAppendingList();
$groups->Init('groups', 'height=48px;');
$glist = group_list();
for ($i = 0; $i < count($glist); $i++) {
    $g = $glist[$i];
    $groups->AppendItem($g['name'], $g['id']);
}
$groups->Draw();
?>
  <div class="formPast">
    <button class="submitBtn block" type="submit">Создать</button>
  </div>
</form>
<?php 
dd_formc();
Example #4
0
 function Contest_UpdateRecievedGroupUsed_Iterator($id = -1, $name, $table)
 {
     if ($id < 0) {
         $id = $_SESSION['WT_contest_id'];
     }
     $list = new CVCAppendingList();
     $list->Init($name);
     $list->SetItems($groups);
     $list->ReceiveItemsUsed();
     $glist = $list->GetItemsUsed();
     $n = count($glist);
     db_delete($table, "`contest_id`={$id}");
     for ($i = 0; $i < $n; $i++) {
         $gid = $glist[$i];
         if (db_count($table, "`contest_id`={$id} AND `group_id`={$gid}") > 0) {
             continue;
         }
         db_insert($table, array('contest_id' => $id, 'group_id' => $gid));
     }
 }
Example #5
0
 function user_update_received($id)
 {
     $name = stripslashes(trim($_POST['name']));
     $passwd = stripslashes($_POST['passwd']);
     $passwd_confirm = stripslashes($_POST['passwd_confirm']);
     $email = stripslashes($_POST['email']);
     if ($passwd != '' && $passwd != $passwd_confirm) {
         add_info('Ошибка подтверждения пароля.');
         return false;
     }
     $groups = new CVCAppendingList();
     $groups->Init('groups');
     $groups->ReceiveItemsUsed();
     if (user_update($id, $name, $email, $_POST['acgroup'], $groups->GetItemsUsed(), $passwd)) {
         $_POST = array();
     }
 }